yxk_pc_mdh/gyhl/static/js/242.94cc0706ea93a25d62aa.js

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=[])}).catch(function(t){console.log(t)})},getAllList:function(t){var e=this;t&&(this.search_data_all.pageno=1),this.search_data_all.time?(this.search_data_all.startTime=Object(c.b)(this.search_data_all.time[0]),this.search_data_all.endTime=Object(c.b)(this.search_data_all.time[1])):(this.search_data_all.startTime="",this.search_data_all.endTime=""),this.search_data_all.beSentPeopleId="",this.search_data_all.userId="",this.search_data_all.deptId=0==this.selectDeptIdAll.length?"":this.search_data_all.deptId,this.$api.monthReportAPI.list(this.search_data_all).then(function(t){t.data?(e.all_total=t.data.totalRows,e.tableAllData=t.data.datas?t.data.datas:[]):(e.all_total=0,e.tableAllData=[])}).catch(function(t){console.log(t)})},getList:function(t){var e=this;t&&(this.search_data.pageno=1),this.search_data.time?(this.search_data.startTime=Object(c.b)(this.search_data.time[0]),this.search_data.endTime=Object(c.b)(this.search_data.time[1])):(this.search_data.startTime="",this.search_data.endTime=""),this.search_data.beSentPeopleId="",this.search_data.deptId="",this.search_data.userId=this.userInfo.userId,this.$api.monthReportAPI.list(this.search_data).then(function(t){t.data?(e.total=t.data.totalRows,e.tableData=t.data.datas?t.data.datas:[]):(e.total=0,e.tableData=[])}).catch(function(t){console.log(t)})},search:function(){this.search_data_team.pageno=1,this.getTeamList()},searchAll:function(){this.search_data_all.pageno=1,this.getAllList()},handleCurrentChange:function(t){this.search_data.pageno=t,this.getList()},handleSizeChange:function(t){this.search_data.pagesize=t,this.getList()},handleTeamCurrentChange:function(t){this.search_data_team.pageno=t,this.getTeamList()},handleTeamSizeChange:function(t){this.search_data_team.pagesize=t,this.getTeamList()},handleAllCurrentChange:function(t){this.search_data_all.pageno=t,this.getAllList()},handleAllSizeChange:function(t){this.search_data_all.pagesize=t,this.getAllList()},handleCopyCurrentChange:function(t){this.search_data_copy.pageno=t,this.getCopyList()},handleCopySizeChange:function(t){this.search_data_copy.pagesize=t,this.getCopyList()},add:function(){this.$router.push({path:"/schedule/monthplan_add",query:{t:Date.now()}})},remove:function(){var t=this,e=[];this.rowIds.forEach(function(t){e.push(t.id)}),this.$confirm("确认删除选中的工作月报吗?","提示",{type:"warning"}).then(function(){t.$api.monthReportAPI.batchRemove(e).then(function(e){0===e.code?(t.$message({message:e.msg,type:"success"}),t.getList()):t.$message({message:e.msg?e.msg:"删除失败,请重试",type:"error"})}).catch(function(e){t.$message({message:"删除失败,请重试",type:"error"})})})},editDetail:function(t){this.$router.push({path:"/schedule/monthplan_edit",query:{id:t.id,t:Date.now()}})},openDetails:function(t,e){this.$router.push({path:"/schedule/monthplan_detail",query:{id:t.id,from:e,t:(new Date).getTime()}})},handleSelectionChange:function(t){this.rowIds=t;var e=!0,a=!0;t.length>0?(a=!1,1==t.length&&(e=!1)):(e=!0,a=!0),this.btnDelDisabled=a,this.btnOtherDisabled=e}}},_={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"sys-box approve-box"},[a("div",{staticClass:"sys-tabs"},[a("el-tabs",{model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"我发起的",name:"first"}},[a("div",{staticClass:"sys-operate"},[a("el-button",{directives:[{name:"has",rawName:"v-has",value:"schedule:monthPlan:add",expression:"'schedule:monthPlan:add'"}],attrs:{type:"primary"},on:{click:function(e){return t.add()}}},[t._v("新增")]),t._v(" "),a("el-button",{directives:[{name:"has",rawName:"v-has",value:"schedule:monthPlan:remove",expression:"'schedule:monthPlan:remove'"}],attrs:{type:"primary",disabled:t.btnDelDisabled},on:{click:function(e){return t.remove()}}},[t._v("删除")])],1),t._v(" "),a("div",{staticClass:"sys-search"},[a("el-form",{staticClass:"form_item_search_out",attrs:{inline:""}},[a("div",{staticClass:"form_item_input_out"},[a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"40%"},attrs:{label:"填报日期"}},[a("el-date-picker",{attrs:{type:"daterange",format:"yyyy-MM-dd","range-separator":"—","start-placeholder":"开始时间","end-placeholder":"结束时间"},model:{value:t.search_data.time,callback:function(e){t.$set(t.search_data,"time",e)},expression:"search_data.time"}})],1)],1),t._v(" "),a("div",{staticClass:"form_item_btn_out",staticStyle:{left:"calc((100% - 170px) * 0.4)"}},[a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.getList(1)}}},[t._v("查询")])],1)],1)])],1),t._v(" "),a("div",{staticClass:"sys-table"},[a("el-table",{attrs:{border:"",data:t.tableData,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{prop:"createTime",align:"center",label:"日期","show-overflow-tooltip":"",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-link",{attrs:{type:"primary"},on:{click:function(a){return t.editDetail(e.row)}}},[t._v(t._s(e.row.createTime.substr(0,10))+"\n ")])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"userName",label:"姓名",align:"center",width:"200"}}),t._v(" "),a("el-table-column",{attrs:{prop:"deptName",align:"center",label:"部门"}}),t._v(" "),a("el-table-column",{attrs:{prop:"comContent",align:"center","show-overflow-tooltip":"",label:"本月完成工作"}}),t._v(" "),a("el-table-column",{attrs:{prop:"needConcertContent",align:"center","show-overflow-tooltip":"",label:"需协调资源"}}),t._v(" "),a("el-table-column",{attrs:{prop:"mustContet",align:"center","show-overflow-tooltip":"",label:"必做事项"}}),t._v(" "),a("el-table-column",{attrs:{prop:"waitContet",align:"center","show-overflow-tooltip":"",label:"待办事项"}}),t._v(" "),a("el-table-column",{attrs:{prop:"statusName",align:"center",label:"状态"}})],1)],1),t._v(" "),a("div",{staticClass:"sys-pagination"},[a("el-pagination",{attrs:{"current-page":t.search_data.pageno,"page-sizes":t.pageSizes,"page-size":t.search_data.pagesize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)]),t._v(" "),a("el-tab-pane",{attrs:{label:"发给我的",name:"second"}},[a("div",{staticClass:"sys-search"},[a("el-form",{staticClass:"form_item_search_out",attrs:{inline:""}},[a("div",{staticClass:"form_item_input_out"},[a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"33%"},attrs:{label:"填报人"}},[a("el-input",{attrs:{clearable:"",placeholder:"姓名"},model:{value:t.search_data_copy.userName,callback:function(e){t.$set(t.search_data_copy,"userName",e)},expression:"search_data_copy.userName"}})],1),t._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"33%"},attrs:{label:"填报日期"}},[a("el-date-picker",{attrs:{type:"daterange",format:"yyyy-MM-dd","range-separator":"—","start-placeholder":"开始时间","end-placeholder":"结束时间"},model:{value:t.search_data_copy.time,callback:function(e){t.$set(t.search_data_copy,"time",e)},expression:"search_data_copy.time"}})],1),t._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"33%"},attrs:{label:"部门"}},[a("el-cascader",{attrs:{clearable:"",options:t.depOptionsAll,props:{expandTrigger:"hover",label:"text",value:"id",checkStrictly:!0}},on:{change:t.handleChangeAll},model:{value:t.selectDeptIdAll,callback:function(e){t.selectDeptIdAll=e},expression:"selectDeptIdAll"}})],1)],1),t._v(" "),a("div",{staticClass:"form_item_btn_out"},[a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.getCopyList(1)}}},[t._v("查询")])],1)],1)])],1),t._v(" "),a("div",{staticClass:"sys-table"},[a("el-table",{attrs:{border:"",data:t.tableCopyData,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}}},[a("el-table-column",{attrs:{prop:"createTime",align:"center",label:"日期","show-overflow-tooltip":"",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-link",{attrs:{type:"primary"},on:{click:function(a){return t.openDetails(e.row,1)}}},[t._v(t._s(e.row.createTime.substr(0,10))+"\n ")])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"userName",label:"姓名",align:"center",width:"200"}}),t._v(" "),a("el-table-column",{attrs:{prop:"deptName",align:"center",label:"部门"}}),t._v(" "),a("el-table-column",{attrs:{prop:"comContent",align:"center","show-overflow-tooltip":"",label:"本月完成工作"}}),t._v(" "),a("el-table-column",{attrs:{prop:"needConcertContent",align:"center","show-overflow-tooltip":"",label:"需协调资源"}}),t._v(" "),a("el-table-column",{attrs:{prop:"mustContet",align:"center","show-overflow-tooltip":"",label:"必做事项"}}),t._v(" "),a("el-table-column",{attrs:{prop:"waitContet",align:"center","show-overflow-tooltip":"",label:"待办事项"}}),t._v(" "),a("el-table-column",{attrs:{prop:"readStatus",align:"center","show-overflow-tooltip":"",label:"状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.sign?a("span",{staticStyle:{color:"#f1a61b"}},[t._v(t._s(e.row.readStatus))]):a("span",[t._v(t._s(e.row.readStatus))])]}}])})],1)],1),t._v(" "),a("div",{staticClass:"sys-pagination"},[a("el-pagination",{attrs:{"current-page":t.search_data_copy.pageno,"page-sizes":t.pageSizes,"page-size":t.search_data_copy.pagesize,layout:"total, sizes, prev, pager, next, jumper",total:t.copy_total},on:{"size-change":t.handleCopySizeChange,"current-change":t.handleCopyCurrentChange}})],1)]),t._v(" "),a("el-tab-pane",{attrs:{label:"我的团队",name:"three"}},[a("div",{staticClass:"sys-search"},[a("el-form",{staticClass:"form_item_search_out",attrs:{inline:""}},[a("div",{staticClass:"form_item_input_out"},[a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"33%"},attrs:{label:"填报人"}},[a("el-input",{attrs:{clearable:"",placeholder:"团队成员姓名"},model:{value:t.search_data_team.userName,callback:function(e){t.$set(t.search_data_team,"userName",e)},expression:"search_data_team.userName"}})],1),t._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"33%"},attrs:{label:"填报日期"}},[a("el-date-picker",{attrs:{type:"daterange",format:"yyyy-MM-dd","range-separator":"—","start-placeholder":"开始时间","end-placeholder":"结束时间"},model:{value:t.search_data_team.time,callback:function(e){t.$set(t.search_data_team,"time",e)},expression:"search_data_team.time"}})],1),t._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"33%"},attrs:{label:"我的部门"}},[a("el-cascader",{attrs:{clearable:"",options:t.depOptionsMy,props:{expandTrigger:"hover",label:"text",value:"id",checkStrictly:!0}},on:{change:t.handleChangeMy},model:{value:t.selectDeptIdMy,callback:function(e){t.selectDeptIdMy=e},expression:"selectDeptIdMy"}})],1)],1),t._v(" "),a("div",{staticClass:"form_item_btn_out"},[a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.search()}}},[t._v("查询")])],1)],1)])],1),t._v(" "),a("div",{staticClass:"sys-table"},[a("el-table",{attrs:{border:"",data:t.tableTeamData,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}}},[a("el-table-column",{attrs:{prop:"createTime",align:"center",label:"日期","show-overflow-tooltip":"",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-link",{attrs:{type:"primary"},on:{click:function(a){return t.openDetails(e.row,2)}}},[t._v(t._s(e.row.createTime.substr(0,10))+"\n ")])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"userName",label:"姓名",align:"center",width:"200"}}),t._v(" "),a("el-table-column",{attrs:{prop:"deptName",align:"center",label:"部门"}}),t._v(" "),a("el-table-column",{attrs:{prop:"comContent",align:"center","show-overflow-tooltip":"",label:"本月完成工作"}}),t._v(" "),a("el-table-column",{attrs:{prop:"needConcertContent",align:"center","show-overflow-tooltip":"",label:"需协调资源"}}),t._v(" "),a("el-table-column",{attrs:{prop:"mustContet",align:"center","show-overflow-tooltip":"",label:"必做事项"}}),t._v(" "),a("el-table-column",{attrs:{prop:"waitContet",align:"center","show-overflow-tooltip":"",label:"待办事项"}})],1)],1),t._v(" "),a("div",{staticClass:"sys-pagination"},[a("el-pagination",{attrs:{"current-page":t.search_data_team.pageno,"page-sizes":t.pageSizes,"page-size":t.search_data_team.pagesize,layout:"total, sizes, prev, pager, next, jumper",total:t.team_total},on:{"size-change":t.handleTeamSizeChange,"current-change":t.handleTeamCurrentChange}})],1)]),t._v(" "),a("el-tab-pane",{attrs:{label:"所有列表",name:"end"}},[a("div",{staticClass:"sys-search"},[a("el-form",{staticClass:"form_item_search_out",attrs:{inline:""}},[a("div",{staticClass:"form_item_input_out"},[a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"33%"},attrs:{label:"填报人"}},[a("el-input",{attrs:{clearable:"",placeholder:"填报人"},model:{value:t.search_data_all.userName,callback:function(e){t.$set(t.search_data_all,"userName",e)},expression:"search_data_all.userName"}})],1),t._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"33%"},attrs:{label:"填报日期"}},[a("el-date-picker",{attrs:{type:"daterange",format:"yyyy-MM-dd","range-separator":"—","start-placeholder":"开始时间","end-placeholder":"结束时间"},model:{value:t.search_data_all.time,callback:function(e){t.$set(t.search_data_all,"time",e)},expression:"search_data_all.time"}})],1),t._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"33%"},attrs:{label:"部门"}},[a("el-cascader",{attrs:{clearable:"",options:t.depOptionsMy,props:{expandTrigger:"hover",label:"text",value:"id",checkStrictly:!0}},on:{change:t.handleChangeAll},model:{value:t.selectDeptIdAll,callback:function(e){t.selectDeptIdAll=e},expression:"selectDeptIdAll"}})],1)],1),t._v(" "),a("div",{staticClass:"form_item_btn_out"},[a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.searchAll()}}},[t._v("查询")])],1)],1)])],1),t._v(" "),a("div",{staticClass:"sys-table"},[a("el-table",{attrs:{border:"",data:t.tableAllData,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}}},[a("el-table-column",{attrs:{prop:"createTime",align:"center",label:"日期","show-overflow-tooltip":"",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-link",{attrs:{type:"primary"},on:{click:function(a){return t.openDetails(e.row,2)}}},[t._v(t._s(e.row.createTime.substr(0,10))+"\n ")])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"userName",label:"姓名",align:"center",width:"200"}}),t._v(" "),a("el-table-column",{attrs:{prop:"deptName",align:"center",label:"部门"}}),t._v(" "),a("el-table-column",{attrs:{prop:"comContent",align:"center","show-overflow-tooltip":"",label:"本月完成工作"}}),t._v(" "),a("el-table-column",{attrs:{prop:"needConcertContent",align:"center","show-overflow-tooltip":"",label:"需协调资源"}}),t._v(" "),a("el-table-column",{attrs:{prop:"mustContet",align:"center","show-overflow-tooltip":"",label:"必做事项"}}),t._v(" "),a("el-table-column",{attrs:{prop:"waitContet",align:"center","show-overflow-tooltip":"",label:"待办事项"}})],1)],1),t._v(" "),a("div",{staticClass:"sys-pagination"},[a("el-pagination",{attrs:{"current-page":t.search_data_all.pageno,"page-sizes":t.pageSizes,"page-size":t.search_data_all.pagesize,layout:"total, sizes, prev, pager, next, jumper",total:t.all_total},on:{"size-change":t.handleAllSizeChange,"current-change":t.handleAllCurrentChange}})],1)])],1)],1)])},staticRenderFns:[]};var m=a("VU/8")(p,_,!1,function(t){a("snPh"),a("CDUf")},"data-v-2393911f",null);e.default=m.exports},CDUf:function(t,e){},snPh:function(t,e){}});