1 line
20 KiB
JavaScript
1 line
20 KiB
JavaScript
|
webpackJsonp([242],{"/tWT":function(t,e,a){"use strict";Object.defineProperty(e,"__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")),h=a("lbHh"),d=a.n(h),p={name:"schedule_monthplan",created:function(){var t=this;document.onkeydown=function(e){"Enter"===e.key&&("first"===t.activeName?t.getList(1):"second"===t.activeName?t.getCopyList(1):"three"===t.activeName?t.getTeamList(1):t.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"));var t=JSON.parse(d.a.get("userInfo"));this.userInfo=JSON.parse(d.a.get("userInfo")),this.search_data.userId=t.userId,this.search_data_team.deptId=t.deptId,this.search_data_copy.beSentPeopleId=t.userId,this.getList(),this.initialize()},watch:{activeName:function(t){switch(t){case"first":this.getList();break;case"three":this.getTeamList();break;case"second":this.getCopyList();break;case"end":this.getAllList()}}},methods:{initialize:function(){var t=this;o.a.all([this.$api.commonAPI.getDeptsTree()]).then(function(e){var a=r()(e,1)[0];0===a.code&&(t.depOptionsAll=a.data.children,t.setDeptList(t.depOptionsAll),t.setDeptListMy(a.data.children),t.setDeptList(t.depOptionsMy))}).catch(function(t){console.log(t)})},setDeptList:function(t){var e=!0,a=!1,l=void 0;try{for(var i,r=s()(t);!(e=(i=r.next()).done);e=!0){var n=i.value;n.hasChildren?this.setDeptList(n.children):n.children=void 0}}catch(t){a=!0,l=t}finally{try{!e&&r.return&&r.return()}finally{if(a)throw l}}},setDeptListMy:function(t){var e=!0,a=!1,l=void 0;try{for(var i,r=s()(t);!(e=(i=r.next()).done);e=!0){var n=i.value;n.id==this.userInfo.deptId?this.depOptionsMy=[n]:n.hasChildren&&this.setDeptListMy(n.children)}}catch(t){a=!0,l=t}finally{try{!e&&r.return&&r.return()}finally{if(a)throw l}}},handleChangeAll:function(t){this.search_data_copy.deptId=t.length>=1?t[t.length-1]:"",this.search_data_all.deptId=t.length>=1?t[t.length-1]:"",this.selectDeptIdAll=t},handleChangeMy:function(t){this.search_data_team.deptId=t.length>=1?t[t.length-1]:"",this.selectDeptIdMy=t},handleClick:function(){},getCopyList:function(t){var e=this;t&&(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.monthReportAPI.list(this.search_data_copy).then(function(t){t.data?(e.copy_total=t.data.totalRows,e.tableCopyData=t.data.datas?t.data.datas:[]):(e.copy_total=0,e.tableCopyData=[])}).catch(function(t){console.log(t)})},getTeamList:function(t){var e=this;t&&(this.search_data_team.pageno=1),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.monthReportAPI.list(this.search_data_team).then(function(t){t.data?(console.log("this is work"),e.team_total=t.data.totalRows,e.tableTeamData=t.data.datas?t.data.datas:[]):(e.team_total=0,e.tableTeamData=[])}).
|