yxk_pc_mdh/gyhl/static/js/232.7b2230e26ce12174739c.js

1 line
20 KiB
JavaScript
Raw Normal View History

2025-08-28 15:26:35 +08:00
webpackJsonp([232],{RLe7:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=a("BO1k"),s=a.n(l),i=a("d7EF"),r=a.n(i),n=a("//Fk"),o=a.n(n),c=(a("NYxO"),a("GKmE")),d=a("lbHh"),h=a.n(d),p={name:"schedule_dailyplan",created:function(){var e=this;document.onkeydown=function(t){"Enter"===t.key&&("first"===e.activeName?e.getList(1):"second"===e.activeName?e.getCopyList(1):"three"===e.activeName?e.getTeamList(1):e.getAllList(1))}},data:function(){return{total:0,pageSizes:[10,20,50],search_data:{pageno:1,pagesize:10},team_total:0,all_total:0,search_data_team:{pageno:1,pagesize:10},search_data_all:{pageno:1,pagesize:10},copy_total:0,search_data_copy:{pageno:1,pagesize:10},btnDelDisabled:!0,btnOtherDisabled:!0,rowIds:[],tableData:[],tableTeamData:[],tableAllData:[],tableCopyData:[],activeName:"first",depOptionsAll:[],selectDeptIdAll:[],depOptionsMy:[],selectDeptIdMy:[],userInfo:""}},computed:{},mounted:function(){this.$route.query.active&&(1==this.$route.query.active&&(this.activeName="second"),2==this.$route.query.active&&(this.activeName="three"),"cc"==this.$route.query.active&&(this.activeName="second"));var e=JSON.parse(h.a.get("userInfo"));this.userInfo=JSON.parse(h.a.get("userInfo")),this.search_data.userId=e.userId,this.search_data_team.deptId=e.deptId,this.search_data_copy.beSentPeopleId=e.userId,this.getList(),this.initialize()},watch:{activeName:function(e){switch(e){case"first":this.getList();break;case"second":this.getCopyList();break;case"three":this.getTeamList();break;case"end":this.getAllList()}}},methods:{initialize:function(){var e=this;o.a.all([this.$api.commonAPI.getDeptsTree()]).then(function(t){var a=r()(t,1)[0];0===a.code&&(e.depOptionsAll=a.data.children,e.setDeptList(e.depOptionsAll),e.setDeptListMy(a.data.children),e.setDeptList(e.depOptionsMy))}).catch(function(e){console.log(e)})},setDeptList:function(e){var t=!0,a=!1,l=void 0;try{for(var i,r=s()(e);!(t=(i=r.next()).done);t=!0){var n=i.value;n.hasChildren?this.setDeptList(n.children):n.children=void 0}}catch(e){a=!0,l=e}finally{try{!t&&r.return&&r.return()}finally{if(a)throw l}}},setDeptListMy:function(e){var t=!0,a=!1,l=void 0;try{for(var i,r=s()(e);!(t=(i=r.next()).done);t=!0){var n=i.value;n.id==this.userInfo.deptId?this.depOptionsMy=[n]:n.hasChildren&&this.setDeptListMy(n.children)}}catch(e){a=!0,l=e}finally{try{!t&&r.return&&r.return()}finally{if(a)throw l}}},handleChangeAll:function(e){this.search_data_copy.deptId=e.length>=1?e[e.length-1]:"",this.search_data_all.deptId=e.length>=1?e[e.length-1]:"",this.selectDeptIdAll=e},handleChangeMy:function(e){this.search_data_team.deptId=e.length>=1?e[e.length-1]:"",this.selectDeptIdMy=e},handleClick:function(){},getCopyList:function(e){var t=this;e&&(this.search_data_copy.pageno=1),this.search_data_copy.time?(this.search_data_copy.startTime=Object(c.b)(this.search_data_copy.time[0]),this.search_data_copy.endTime=Object(c.b)(this.search_data_copy.time[1])):(this.search_data_copy.startTime="",this.search_data_copy.endTime=""),this.search_data_copy.userId="",this.search_data_copy.deptId=0==this.selectDeptIdAll.length?"":this.search_data_copy.deptId,this.search_data_copy.beSentPeopleId=this.userInfo.userId,this.$api.dailyReportAPI.list(this.search_data_copy).then(function(e){e.data?(t.copy_total=e.data.totalRows,t.tableCopyData=e.data.datas?e.data.datas:[]):(t.copy_total=0,t.tableCopyData=[])}).catch(function(e){console.log(e)})},getTeamList:function(){var e=this;this.search_data_team.time?(this.search_data_team.startTime=Object(c.b)(this.search_data_team.time[0]),this.search_data_team.endTime=Object(c.b)(this.search_data_team.time[1])):(this.search_data_team.startTime="",this.search_data_team.endTime=""),this.search_data_team.beSentPeopleId="",this.search_data_team.userId="",this.search_data_team.deptId=0==this.selectDeptIdMy.length?this.userInfo.deptId:this.search_data_team.deptId,this.$api.dailyReportAPI.list(this.search_data_team).then(function(t){t.data?(e.team_total=t.data.totalRows,e.tableTeamData=t.data.datas?t.data.datas:[]):(e.team_total=0,e.tableTeamData=[])}).catch(fu