1 line
20 KiB
JavaScript
1 line
20 KiB
JavaScript
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(function(e){console.log(e)})},getAllList:function(){var e=this;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.deptId=0==this.selectDeptIdAll.length?"":this.search_data_all.deptId,this.$api.dailyReportAPI.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.team_total=0,e.tableAllData=[])}).catch(function(e){console.log(e)})},getList:function(e){var t=this;e&&(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.dailyReportAPI.list(this.search_data).then(function(e){e.data?(t.total=e.data.totalRows,t.tableData=e.data.datas?e.data.datas:[]):(t.total=0,t.tableData=[])}).catch(function(e){console.log(e)})},search:function(){this.search_data_team.pageno=1,this.getTeamList()},searchAll:function(){this.search_data_all.pageno=1,this.getAllList()},handleCurrentChange:function(e){this.search_data.pageno=e,this.getList()},handleSizeChange:function(e){this.search_data.pagesize=e,this.getList()},handleTeamCurrentChange:function(e){this.search_data_team.pageno=e,this.getTeamList()},handleTeamSizeChange:function(e){this.search_data_team.pagesize=e,this.getTeamList()},handleAllCurrentChange:function(e){this.search_data_all.pageno=e,this.getAllList()},handleAllSizeChange:function(e){this.search_data_all.pagesize=e,this.getAllList()},handleCopyCurrentChange:function(e){this.search_data_copy.pageno=e,this.getCopyList()},handleCopySizeChange:function(e){this.search_data_copy.pagesize=e,this.getCopyList()},add:function(){this.$router.push({path:"/schedule/dailyplan_add",query:{t:Date.now()}})},remove:function(){var e=this,t=[];this.rowIds.forEach(function(e){t.push(e.id)}),this.$confirm("确认删除选中的工作日志吗?","提示",{type:"warning"}).then(function(){e.$api.dailyReportAPI.batchRemove(t).then(function(t){0===t.code?(e.$message({message:t.msg,type:"success"}),e.getList()):e.$message({message:t.msg?t.msg:"删除失败,请重试",type:"error"})}).catch(function(t){e.$message({message:"删除失败,请重试",type:"error"})})})},editDetail:function(e){console.log(e.createTime),this.$router.push({path:"/schedule/dailyplan_edit",query:{id:e.id,t:Date.now()}})},openDetails:function(e,t){this.$router.push({path:"/schedule/dailyplan_detail",query:{id:e.id,from:t,t:(new Date).getTime()}})},handleSelectionChange:function(e){this.rowIds=e;var t=!0,a=!0;e.length>0?(a=!1,1==e.length&&(t=!1)):(t=!0,a=!0),this.btnDelDisabled=a,this.btnOtherDisabled=t}}},m={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"sys-box approve-box"},[a("div",{staticClass:"sys-tabs"},[a("el-tabs",{model:{value:e.activeName,callback:function(t){e.activeName=t},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:dailyPlan:add",expression:"'schedule:dailyPlan:add'"}],attrs:{type:"primary"},on:{click:function(t){return e.add()}}},[e._v("新增")]),e._v(" "),a("el-button",{directives:[{name:"has",rawName:"v-has",value:"schedule:dailyPlan:remove",expression:"'schedule:dailyPlan:remove'"}],attrs:{type:"primary",disabled:e.btnDelDisabled},on:{click:function(t){return e.remove()}}},[e._v("\n 删除\n ")])],1),e._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":"结束时间"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.getList(1)}},model:{value:e.search_data.time,callback:function(t){e.$set(e.search_data,"time",t)},expression:"search_data.time"}})],1)],1),e._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(t){return e.getList(1)}}},[e._v("查询")])],1)],1)])],1),e._v(" "),a("div",{staticClass:"sys-table"},[a("el-table",{attrs:{border:"",data:e.tableData,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"createTime",align:"center",label:"日期","show-overflow-tooltip":"",width:"160"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-link",{attrs:{type:"primary"},on:{click:function(a){return e.editDetail(t.row)}}},[e._v(e._s(t.row.createTime.substr(0,10))+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"userName",label:"姓名",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"deptName",align:"center",label:"部门"}}),e._v(" "),a("el-table-column",{attrs:{prop:"comContent",align:"center","show-overflow-tooltip":"",label:"今日完成工作"}}),e._v(" "),a("el-table-column",{attrs:{prop:"uncomCOntent",align:"center","show-overflow-tooltip":"",label:"未完成工作"}}),e._v(" "),a("el-table-column",{attrs:{prop:"mustContent",align:"center","show-overflow-tooltip":"",label:"明日必做事项"}}),e._v(" "),a("el-table-column",{attrs:{prop:"needConcertContent",align:"center","show-overflow-tooltip":"",label:"待办事项"}}),e._v(" "),a("el-table-column",{attrs:{prop:"statusName",align:"center",label:"状态"}})],1)],1),e._v(" "),a("div",{staticClass:"sys-pagination"},[a("el-pagination",{attrs:{"current-page":e.search_data.pageno,"page-sizes":e.pageSizes,"page-size":e.search_data.pagesize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)]),e._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:e.search_data_copy.userName,callback:function(t){e.$set(e.search_data_copy,"userName",t)},expression:"search_data_copy.userName"}})],1),e._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:e.search_data_copy.time,callback:function(t){e.$set(e.search_data_copy,"time",t)},expression:"search_data_copy.time"}})],1),e._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"33%"},attrs:{label:"部门"}},[a("el-cascader",{attrs:{clearable:"",options:e.depOptionsAll,props:{expandTrigger:"hover",label:"text",value:"id",checkStrictly:!0}},on:{change:e.handleChangeAll},model:{value:e.selectDeptIdAll,callback:function(t){e.selectDeptIdAll=t},expression:"selectDeptIdAll"}})],1)],1),e._v(" "),a("div",{staticClass:"form_item_btn_out"},[a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.getCopyList(1)}}},[e._v("查询")])],1)],1)])],1),e._v(" "),a("div",{staticClass:"sys-table"},[a("el-table",{attrs:{border:"",data:e.tableCopyData,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}}},[a("el-table-column",{attrs:{prop:"createTime",align:"center",label:"日期",width:"160","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-link",{attrs:{type:"primary"},on:{click:function(a){return e.openDetails(t.row,1)}}},[e._v(e._s(t.row.createTime.substr(0,10))+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"userName",label:"姓名",align:"center",width:"200"}}),e._v(" "),a("el-table-column",{attrs:{prop:"deptName",align:"center",label:"部门"}}),e._v(" "),a("el-table-column",{attrs:{prop:"comContent",align:"center","show-overflow-tooltip":"",label:"今日完成工作"}}),e._v(" "),a("el-table-column",{attrs:{prop:"uncomCOntent",align:"center","show-overflow-tooltip":"",label:"未完成工作"}}),e._v(" "),a("el-table-column",{attrs:{prop:"mustContent",align:"center","show-overflow-tooltip":"",label:"明日必做事项"}}),e._v(" "),a("el-table-column",{attrs:{prop:"needConcertContent",align:"center","show-overflow-tooltip":"",label:"待办事项"}}),e._v(" "),a("el-table-column",{attrs:{prop:"readStatus",align:"center","show-overflow-tooltip":"",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[1==t.row.sign?a("span",{staticStyle:{color:"#f1a61b"}},[e._v(e._s(t.row.readStatus))]):a("span",[e._v(e._s(t.row.readStatus))])]}}])})],1)],1),e._v(" "),a("div",{staticClass:"sys-pagination"},[a("el-pagination",{attrs:{"current-page":e.search_data_copy.pageno,"page-sizes":e.pageSizes,"page-size":e.search_data_copy.pagesize,layout:"total, sizes, prev, pager, next, jumper",total:e.copy_total},on:{"size-change":e.handleCopySizeChange,"current-change":e.handleCopyCurrentChange}})],1)]),e._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:"30%"},attrs:{label:"填报人"}},[a("el-input",{attrs:{clearable:"",placeholder:"团队成员姓名"},model:{value:e.search_data_team.userName,callback:function(t){e.$set(e.search_data_team,"userName",t)},expression:"search_data_team.userName"}})],1),e._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"36%"},attrs:{label:"填报日期"}},[a("el-date-picker",{attrs:{type:"daterange",format:"yyyy-MM-dd","range-separator":"—","start-placeholder":"开始时间","end-placeholder":"结束时间"},model:{value:e.search_data_team.time,callback:function(t){e.$set(e.search_data_team,"time",t)},expression:"search_data_team.time"}})],1),e._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"33%"},attrs:{label:"我的部门"}},[a("el-cascader",{attrs:{clearable:"",options:e.depOptionsMy,props:{expandTrigger:"hover",label:"text",value:"id",checkStrictly:!0}},on:{change:e.handleChangeMy},model:{value:e.selectDeptIdMy,callback:function(t){e.selectDeptIdMy=t},expression:"selectDeptIdMy"}})],1)],1),e._v(" "),a("div",{staticClass:"form_item_btn_out"},[a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.search()}}},[e._v("查询")])],1)],1)])],1),e._v(" "),a("div",{staticClass:"sys-table"},[a("el-table",{attrs:{border:"",data:e.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:e._u([{key:"default",fn:function(t){return[a("el-link",{attrs:{type:"primary"},on:{click:function(a){return e.openDetails(t.row,2)}}},[e._v(e._s(t.row.createTime.substr(0,10))+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"userName",label:"姓名",align:"center",width:"200"}}),e._v(" "),a("el-table-column",{attrs:{prop:"deptName",align:"center",label:"部门"}}),e._v(" "),a("el-table-column",{attrs:{prop:"comContent",align:"center","show-overflow-tooltip":"",label:"今日完成工作"}}),e._v(" "),a("el-table-column",{attrs:{prop:"uncomCOntent",align:"center","show-overflow-tooltip":"",label:"未完成工作"}}),e._v(" "),a("el-table-column",{attrs:{prop:"mustContent",align:"center","show-overflow-tooltip":"",label:"明日必做事项"}}),e._v(" "),a("el-table-column",{attrs:{prop:"needConcertContent",align:"center","show-overflow-tooltip":"",label:"待办事项"}})],1)],1),e._v(" "),a("div",{staticClass:"sys-pagination"},[a("el-pagination",{attrs:{"current-page":e.search_data_team.pageno,"page-sizes":e.pageSizes,"page-size":e.search_data_team.pagesize,layout:"total, sizes, prev, pager, next, jumper",total:e.team_total},on:{"size-change":e.handleTeamSizeChange,"current-change":e.handleTeamCurrentChange}})],1)]),e._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:"30%"},attrs:{label:"填报人"}},[a("el-input",{attrs:{clearable:"",placeholder:"填报人"},model:{value:e.search_data_all.userName,callback:function(t){e.$set(e.search_data_all,"userName",t)},expression:"search_data_all.userName"}})],1),e._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"36%"},attrs:{label:"填报日期"}},[a("el-date-picker",{attrs:{type:"daterange",format:"yyyy-MM-dd","range-separator":"—","start-placeholder":"开始时间","end-placeholder":"结束时间"},model:{value:e.search_data_all.time,callback:function(t){e.$set(e.search_data_all,"time",t)},expression:"search_data_all.time"}})],1),e._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"33%"},attrs:{label:"部门"}},[a("el-cascader",{attrs:{clearable:"",options:e.depOptionsMy,props:{expandTrigger:"hover",label:"text",value:"id",checkStrictly:!0}},on:{change:e.handleChangeAll},model:{value:e.selectDeptIdAll,callback:function(t){e.selectDeptIdAll=t},expression:"selectDeptIdAll"}})],1)],1),e._v(" "),a("div",{staticClass:"form_item_btn_out"},[a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.searchAll()}}},[e._v("查询")])],1)],1)])],1),e._v(" "),a("div",{staticClass:"sys-table"},[a("el-table",{attrs:{border:"",data:e.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:e._u([{key:"default",fn:function(t){return[a("el-link",{attrs:{type:"primary"},on:{click:function(a){return e.openDetails(t.row,2)}}},[e._v(e._s(t.row.createTime.substr(0,10))+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"userName",label:"姓名",align:"center",width:"200"}}),e._v(" "),a("el-table-column",{attrs:{prop:"deptName",align:"center",label:"部门"}}),e._v(" "),a("el-table-column",{attrs:{prop:"comContent",align:"center","show-overflow-tooltip":"",label:"今日完成工作"}}),e._v(" "),a("el-table-column",{attrs:{prop:"uncomCOntent",align:"center","show-overflow-tooltip":"",label:"未完成工作"}}),e._v(" "),a("el-table-column",{attrs:{prop:"mustContent",align:"center","show-overflow-tooltip":"",label:"明日必做事项"}}),e._v(" "),a("el-table-column",{attrs:{prop:"needConcertContent",align:"center","show-overflow-tooltip":"",label:"待办事项"}})],1)],1),e._v(" "),a("div",{staticClass:"sys-pagination"},[a("el-pagination",{attrs:{"current-page":e.search_data_all.pageno,"page-sizes":e.pageSizes,"page-size":e.search_data_all.pagesize,layout:"total, sizes, prev, pager, next, jumper",total:e.all_total},on:{"size-change":e.handleAllSizeChange,"current-change":e.handleAllCurrentChange}})],1)])],1)],1)])},staticRenderFns:[]};var _=a("VU/8")(p,m,!1,function(e){a("bBmx"),a("apPw")},"data-v-2ec091e8",null);t.default=_.exports},apPw:function(e,t){},bBmx:function(e,t){}}); |