yxk_pc_mdh/gyhl/static/js/47.47f981ed3bd4a5f5516d.js

1 line
18 KiB
JavaScript

webpackJsonp([47],{"7tYt":function(e,t){},EaSe:function(e,t){},KRkn:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a("d7EF"),i=a.n(s),n=a("//Fk"),o=a.n(n),r=(a("GKmE"),a("ysqt")),l=a("3MlD"),c=a("bzuE"),d={name:"mesInspection_daily_all",components:{btnInput:r.a,dialogChooseSingleUser:l.a},data:function(){return{total:0,pageSizes:[10,20,50],search_data:{pageno:1,pagesize:10},statusList:[{id:56,name:"待处理"},{id:167,name:"关闭"},{id:999,name:"超时未处理"},{id:131,name:"已完成"}],getUserList:[],btnDelDisabled:!0,btnOtherDisabled:!0,chooseUserVisible:!1,rowIds:[],tableData:[],dialogVisible:!1,pictLoading:!1,dialogRebutVisible:!1,reason:"",config:c.a}},created:function(){var e=this;document.onkeydown=function(t){"Enter"===t.key&&e.search()}},mounted:function(){this.getList(),this.initData()},methods:{getUser:function(e){e?(this.$set(this.search_data,"engineerName",e.name),this.$set(this.search_data,"engineerId",e.id)):(this.$set(this.search_data,"engineerName",""),this.$set(this.search_data,"engineerId",""))},sortChange:function(e){var t={column:e.column,prop:e.prop,order:e.order},a="ascending"==t.order?"asc":"desc";this.$set(this.search_data,"sort",t.prop),this.$set(this.search_data,"order",a),this.getList()},clickRow:function(e){this.$refs.tb.toggleRowSelection(e)},initData:function(){var e=this;o.a.all([this.$api.commonAPI.getUsers()]).then(function(t){var a=i()(t,1)[0];0===a.code&&(e.getUserList=a.datas)}).catch(function(e){console.log(e)})},getList:function(){var e=this;this.pictLoading=!0,this.$api.mesPatroPlanAPI.recordList(this.search_data).then(function(t){e.pictLoading=!1,t.data?(e.total=t.data.totalRows,e.tableData=t.data.datas?t.data.datas:[]):(e.total=0,e.tableData=[])}).catch(function(e){console.log(e)})},search:function(){this.search_data.pageno=1,this.getList()},handleCurrentChange:function(e){this.search_data.pageno=e,this.getList()},handleSizeChange:function(e){this.search_data.pagesize=e,this.getList()},add:function(){this.$router.push({path:"/mesInspection/daily_add",query:{t:Date.now()}})},close:function(){var e=this,t=[];this.rowIds.forEach(function(e){t.push(e.id)});var a={ids:t,closeReason:this.reason};this.$confirm("确认关闭选中的巡检任务吗?","提示",{type:"warning"}).then(function(){e.$api.mesPatroPlanAPI.batchCloseRecord(a).then(function(t){0===t.code?(e.$message({message:t.msg,type:"success"}),e.getList(),e.dialogRebutVisible=!1):e.$message({message:t.msg?t.msg:"关闭巡检任务失败,请重试",type:"error"})}).catch(function(t){e.$message({message:"关闭巡检任务失败,请重试",type:"error"})})})},execution:function(){var e=this.rowIds[0];if(58!==e.reportStatusId){var t=e.id;this.$router.push({path:"/mesInspection/daily_handle",query:{id:t,t:Date.now(),noticeId:""}})}else this.$alert("巡检已完成验收,您无法再次执行该巡检任务!","提示",{type:"warning"})},complete:function(){var e=this.rowIds[0];if(58!==e.reportStatusId){var t=e.id;this.$router.push({path:"/mesInspection/daily_check",query:{id:t,t:Date.now()}})}else this.$alert("巡检已完成验收,您无法再次验收该巡检任务!","提示",{type:"warning"})},importPlan:function(){},exportPlan:function(){},viewDetail:function(e){146===e.reportStatusId?this.$router.push({path:"/mesInspection/daily_add",query:{id:e.id,t:Date.now()}}):this.$router.push({path:"/mesInspection/daily_detail",query:{id:e.id,t:Date.now()}})},openDetails:function(e){this.$router.push({path:"/mesInspection/detail",query:{id:e.id,t:Date.now()}})},remove:function(){var e=this,t=[];this.rowIds.forEach(function(e){t.push(e.id)});var a={ids:t};this.$confirm("确认删除选中的巡检记录吗?","提示",{type:"warning"}).then(function(){e.$api.mesPatroPlanAPI.batchRemoveRecord(a).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"})})})},handleSelectionChange:function(e){this.rowIds=e,this.setBtn(e)},setBtn:function(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}}},h={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"knowledge-box"},[a("div",{staticClass:"sys-operate"},[a("el-button",{directives:[{name:"has",rawName:"v-has",value:"mesInspection:daily:add",expression:"'mesInspection:daily: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:"mesInspection:daily:remove",expression:"'mesInspection:daily:remove'"}],attrs:{type:"primary",disabled:e.btnDelDisabled},on:{click:function(t){return e.remove()}}},[e._v("删除")])],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:"33.3%"},attrs:{label:"任务状态"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择任务状态"},model:{value:e.search_data.status,callback:function(t){e.$set(e.search_data,"status",t)},expression:"search_data.status"}},e._l(e.statusList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1),e._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"33.3%"},attrs:{label:"巡检人"}},[a("btn-input",{attrs:{valueText:e.search_data.engineerName,valueId:e.search_data.engineerId,chooseVisible:e.chooseUserVisible},on:{"update:valueText":function(t){return e.$set(e.search_data,"engineerName",t)},"update:value-text":function(t){return e.$set(e.search_data,"engineerName",t)},"update:valueId":function(t){return e.$set(e.search_data,"engineerId",t)},"update:value-id":function(t){return e.$set(e.search_data,"engineerId",t)},"update:chooseVisible":function(t){e.chooseUserVisible=t},"update:choose-visible":function(t){e.chooseUserVisible=t}}})],1),e._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"33.3%"},attrs:{label:"巡检单号"}},[a("el-input",{attrs:{placeholder:"请输入巡检单号"},model:{value:e.search_data.workOrderno,callback:function(t){e.$set(e.search_data,"workOrderno",t)},expression:"search_data.workOrderno"}})],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",{directives:[{name:"loading",rawName:"v-loading",value:e.pictLoading,expression:"pictLoading"}],ref:"tb",attrs:{border:"",data:e.tableData,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}},on:{"sort-change":e.sortChange,"row-click":e.clickRow,"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"recordWorkOrderNo",label:"巡检单号",width:"160",align:"center","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-link",{attrs:{type:"primary"},on:{click:function(a){return e.viewDetail(t.row)}}},[e._v(e._s(t.row.recordWorkOrderNo))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"patrolRecordName",label:"巡检名称",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"patrolPersonName",align:"center",label:"巡检人员"}}),e._v(" "),a("el-table-column",{attrs:{prop:"patroldeptName",align:"center",label:"巡检部门"}}),e._v(" "),a("el-table-column",{attrs:{prop:"reportStatusName",align:"center",label:"任务状态"}}),e._v(" "),a("el-table-column",{attrs:{sortable:"custom",prop:"sortTime",align:"center",label:"计划开始时间",width:"124","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{sortable:"custom",prop:"endTime",align:"center",label:"计划完成时间",width:"124","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"planWorkOrderNo",align:"center",label:"计划单号","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"patrolPlanName",align:"center",label:"计划名称","show-overflow-tooltip":""}})],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-dialog",{attrs:{title:"关闭任务",visible:e.dialogRebutVisible,width:"500px"},on:{"update:visible":function(t){e.dialogRebutVisible=t}}},[a("el-form",{attrs:{"label-width":"60px"}},[a("el-form-item",{attrs:{label:"原因"}},[a("el-input",{attrs:{type:"textarea",autosize:{minRows:4},placeholder:"请输入关闭原因"},model:{value:e.reason,callback:function(t){e.reason=t},expression:"reason"}})],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dialogRebutVisible=!1}}},[e._v(e._s(e.config.cancelText))]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.close()}}},[e._v("确定")])],1)],1),e._v(" "),a("dialogChooseSingleUser",{attrs:{visible:e.chooseUserVisible},on:{"update:visible":function(t){e.chooseUserVisible=t},change:e.getUser}})],1)},staticRenderFns:[]};var u={name:"mesInspection_daily_unhandle",data:function(){return{total:0,pageSizes:[10,20,50],search_data:{pageno:1,pagesize:10,singleStatus:56,sort:"endTime",order:"desc"},statusList:[],getUserList:[],btnDelDisabled:!0,btnOtherDisabled:!0,rowIds:[],tableData:[],dialogVisible:!1,pictLoading:!1,dialogRebutVisible:!1,reason:"",config:c.a}},created:function(){var e=this;document.onkeydown=function(t){"Enter"===t.key&&e.search()}},mounted:function(){this.getList(),this.initData()},methods:{sortChange:function(e){var t={column:e.column,prop:e.prop,order:e.order},a="ascending"==t.order?"asc":"desc";this.$set(this.search_data,"sort",t.prop),this.$set(this.search_data,"order",a),this.getList()},clickRow:function(e){this.$refs.tb.toggleRowSelection(e)},initData:function(){var e=this;o.a.all([this.$api.commonAPI.getUsers(),this.$api.dictAPI.getDictsByType("task_status")]).then(function(t){var a=i()(t,2),s=a[0],n=a[1];0===s.code&&(e.getUserList=s.datas),0===n.code&&(e.statusList=n.datas)}).catch(function(e){console.log(e)})},getList:function(){var e=this;this.pictLoading=!0,this.$api.mesPatroPlanAPI.recordList(this.search_data).then(function(t){e.pictLoading=!1,t.data?(e.total=t.data.totalRows,e.tableData=t.data.datas?t.data.datas:[]):(e.total=0,e.tableData=[])}).catch(function(e){console.log(e)})},search:function(){this.search_data.pageno=1,this.getList()},handleCurrentChange:function(e){this.search_data.pageno=e,this.getList()},handleSizeChange:function(e){this.search_data.pagesize=e,this.getList()},add:function(){this.$router.push({path:"/mesInspection/daily_add",query:{t:Date.now()}})},close:function(){var e=this,t=[];this.rowIds.forEach(function(e){t.push(e.id)});var a={ids:t,closeReason:this.reason};this.$confirm("确认关闭选中的巡检任务吗?","提示",{type:"warning"}).then(function(){e.$api.mesPatroPlanAPI.batchCloseRecord(a).then(function(t){0===t.code?(e.$message({message:t.msg,type:"success"}),e.getList(),e.dialogRebutVisible=!1):e.$message({message:t.msg?t.msg:"关闭巡检任务失败,请重试",type:"error"})}).catch(function(t){e.$message({message:"关闭巡检任务失败,请重试",type:"error"})})})},execution:function(){var e=this.rowIds[0];if(58!==e.reportStatusId){var t=e.id;this.$router.push({path:"/mesInspection/daily_handle",query:{id:t,t:Date.now(),noticeId:""}})}else this.$alert("巡检已完成验收,您无法再次执行该巡检任务!","提示",{type:"warning"})},complete:function(){var e=this.rowIds[0];if(58!==e.reportStatusId){var t=e.id;this.$router.push({path:"/mesInspection/daily_check",query:{id:t,t:Date.now()}})}else this.$alert("巡检已完成验收,您无法再次验收该巡检任务!","提示",{type:"warning"})},importPlan:function(){},exportPlan:function(){},viewDetail:function(e){146===e.reportStatusId?this.$router.push({path:"/mesInspection/daily_add",query:{id:e.id,t:Date.now()}}):this.$router.push({path:"/mesInspection/daily_detail",query:{id:e.id,t:Date.now()}})},openDetails:function(e){this.$router.push({path:"/mesInspection/detail",query:{id:e.id,t:Date.now()}})},remove:function(){var e=this,t=[];this.rowIds.forEach(function(e){t.push(e.id)});var a={ids:t};this.$confirm("确认删除选中的巡检记录吗?","提示",{type:"warning"}).then(function(){e.$api.mesPatroPlanAPI.batchRemove(a).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"})})})},handleSelectionChange:function(e){this.rowIds=e,this.setBtn(e)},setBtn:function(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}}},p={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"knowledge-box"},[a("div",{staticClass:"sys-operate"},[a("el-button",{directives:[{name:"has",rawName:"v-has",value:"mesInspection:daily:execution",expression:"'mesInspection:daily:execution'"}],attrs:{type:"primary",disabled:e.btnOtherDisabled},on:{click:function(t){return e.execution()}}},[e._v("巡检执行")]),e._v(" "),a("el-button",{directives:[{name:"has",rawName:"v-has",value:"mesInspection:daily:close",expression:"'mesInspection:daily:close'"}],attrs:{type:"primary",disabled:e.btnDelDisabled},on:{click:function(t){e.dialogRebutVisible=!0}}},[e._v("关闭任务")])],1),e._v(" "),a("div",{staticClass:"sys-search"},[a("el-form",{attrs:{inline:""}},[a("el-form-item",{attrs:{label:"巡检单号"}},[a("el-input",{attrs:{placeholder:"请输入巡检单号"},model:{value:e.search_data.workOrderno,callback:function(t){e.$set(e.search_data,"workOrderno",t)},expression:"search_data.workOrderno"}})],1),e._v(" "),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",{directives:[{name:"loading",rawName:"v-loading",value:e.pictLoading,expression:"pictLoading"}],ref:"tb",attrs:{border:"","default-sort":{prop:"endTime",order:"ascending"},data:e.tableData,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}},on:{"sort-change":e.sortChange,"row-click":e.clickRow,"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"recordWorkOrderNo",label:"巡检单号",width:"160",align:"center","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-link",{attrs:{type:"primary"},on:{click:function(a){return e.viewDetail(t.row)}}},[e._v(e._s(t.row.recordWorkOrderNo))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"patrolRecordName",label:"巡检名称",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"patrolPersonName",align:"center",label:"巡检人员"}}),e._v(" "),a("el-table-column",{attrs:{prop:"patroldeptName",align:"center",label:"巡检部门"}}),e._v(" "),a("el-table-column",{attrs:{prop:"reportStatusName",align:"center",label:"任务状态"}}),e._v(" "),a("el-table-column",{attrs:{prop:"overTime",align:"center",label:"允许超时(分钟)"}}),e._v(" "),a("el-table-column",{attrs:{sortable:"custom",prop:"sortTime",align:"center",label:"计划开始时间",width:"124","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{sortable:"custom",prop:"endTime",align:"center",label:"计划完成时间",width:"124","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"planWorkOrderNo",align:"center",label:"计划单号","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"patrolPlanName",align:"center",label:"计划名称","show-overflow-tooltip":""}})],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-dialog",{attrs:{center:"",title:"关闭任务",visible:e.dialogRebutVisible,width:"500px"},on:{"update:visible":function(t){e.dialogRebutVisible=t}}},[a("el-form",{attrs:{"label-width":"60px"}},[a("el-form-item",{attrs:{label:"原因"}},[a("el-input",{attrs:{type:"textarea",autosize:{minRows:4},placeholder:"请输入关闭原因"},model:{value:e.reason,callback:function(t){e.reason=t},expression:"reason"}})],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dialogRebutVisible=!1}}},[e._v(e._s(e.config.cancelText))]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.close()}}},[e._v("确定")])],1)],1)],1)},staticRenderFns:[]};var m={name:"mesInspection_daily",components:{MainPage:a("VU/8")(d,h,!1,function(e){a("kRca")},"data-v-6e34d53c",null).exports,HandlePage:a("VU/8")(u,p,!1,function(e){a("7tYt")},"data-v-362f5e22",null).exports},data:function(){return{firstShow:!1,threeShow:!1,activeName:"first"}},mounted:function(){var e=this;this.$nextTick(function(t){e.activeName="first",e.firstShow=!0})},watch:{activeName:function(e){switch(e){case"first":this.firstShow=!0;break;case"three":this.threeShow=!0}}},methods:{}},g={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("span",{attrs:{slot:"label"},slot:"label"},[a("el-badge",{staticClass:"item"},[e._v("待处理")])],1),e._v(" "),e.firstShow?a("HandlePage"):e._e()],1),e._v(" "),a("el-tab-pane",{attrs:{label:"",name:"three"}},[a("span",{attrs:{slot:"label"},slot:"label"},[a("el-badge",{staticClass:"item"},[e._v("所有的")])],1),e._v(" "),e.threeShow?a("MainPage"):e._e()],1)],1)],1)])},staticRenderFns:[]};var f=a("VU/8")(m,g,!1,function(e){a("EaSe"),a("nvT9")},"data-v-c9cb5d52",null);t.default=f.exports},kRca:function(e,t){},nvT9:function(e,t){}});