2 lines
28 KiB
JavaScript
2 lines
28 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-604c36ae","chunk-21eda8ed"],{"0478":function(t,e,a){"use strict";a("2e1c")},"0e8f":function(t,e,a){"use strict";a.d(e,"d",(function(){return r})),a.d(e,"e",(function(){return o})),a.d(e,"c",(function(){return l})),a.d(e,"a",(function(){return c})),a.d(e,"b",(function(){return u}));var s=a("b775"),i=a("4328"),n=a.n(i);function r(t){return Object(s["a"])({url:"user-service/dept/getDeptTreeList",method:"get",params:t})}function o(t){return Object(s["a"])({url:"user-service/dept/getDeptSubByDeptId",method:"get",params:t})}function l(t){var e=n.a.stringify(t);return Object(s["a"])({url:"user-service/dept/updateDept",method:"post",data:e})}function c(t){var e=n.a.stringify(t);return Object(s["a"])({url:"user-service/dept/saveDept",method:"post",data:e})}function u(t){return Object(s["a"])({headers:{"Content-Type":"application/json"},url:"user-service/dept/removeDept",method:"get",params:t})}},"2e1c":function(t,e,a){},"35df":function(t,e,a){"use strict";a("c3d7")},"61f7":function(t,e,a){"use strict";a.d(e,"c",(function(){return s})),a.d(e,"a",(function(){return i})),a.d(e,"b",(function(){return n}));a("ac1f"),a("00b4"),a("d9e2"),a("a9e3"),a("5319");function s(t,e,a){""===e?a(new Error("请输入手机号码")):/^[0-9-]+$/.test(e)?a():a(new Error("手机号码格式不对"))}function i(t){if(t||0===t){if(t.length>0){var e=t.replace(/(^\s*)|(\s*$)/g,"");return e||"--"}return t}return"--"}function n(t){if(!t)return"";var e=new Date(t),a=e.getFullYear(),s=e.getMonth()+1,i=e.getDate(),n=e.getHours(),o=e.getMinutes(),l=e.getSeconds();return a+"-"+r(s)+"-"+r(i)+"\n"+r(n)+":"+r(o)+":"+r(l)}function r(t){return t<10?"0"+t:t}},"754f":function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{attrs:{"close-on-click-modal":!1,title:t.textMap[t.$store.state.partol.dialogStatus],visible:t.$store.state.partol.addDialog,"before-close":t.handleClose},on:{"update:visible":function(e){return t.$set(t.$store.state.partol,"addDialog",e)}}},[a("el-scrollbar",{staticStyle:{height:"100%","padding-bottom":"8px"},attrs:{vertical:!0}},[0===t.active?a("el-form",{ref:"form",attrs:{rules:t.rules,"status-icon":"",model:t.$store.state.partol.form,"label-width":"125px",inline:""}},[a("el-form-item",{attrs:{label:t.$t("work.taskName"),prop:"taskName"}},[a("el-input",{attrs:{placeholder:t.$t("pEnter")+t.$t("work.taskName"),maxlength:"50"},model:{value:t.form.taskName,callback:function(e){t.$set(t.form,"taskName",e)},expression:"form.taskName"}})],1),a("el-form-item",{attrs:{label:t.$t("work.Days"),prop:"cycle"}},[a("el-input",{attrs:{placeholder:t.$t("pEnter")+t.$t("work.Days")},model:{value:t.form.cycle,callback:function(e){t.$set(t.form,"cycle",e)},expression:"form.cycle"}})],1),a("el-form-item",{attrs:{label:t.$t("work.recipient"),prop:"receiveName"}},[a("el-select",{model:{value:t.form.receiveName,callback:function(e){t.$set(t.form,"receiveName",e)},expression:"form.receiveName"}},t._l(t.$store.state.partol.getUserList,(function(t,e){return a("el-option",{key:e,attrs:{value:t.userName}})})),1)],1),a("el-form-item",{attrs:{label:t.$t("device.phone"),prop:"telephone"}},[a("el-input",{model:{value:t.form.telephone,callback:function(e){t.$set(t.form,"telephone",e)},expression:"form.telephone"}})],1),a("el-form-item",{attrs:{label:t.$t("listQuery.deptId"),prop:"deptId"}},[a("el-cascader",{attrs:{"show-all-levels":!1,options:t.$store.state.partol.deptList,props:{checkStrictly:!0,emitPath:!1},clearable:""},model:{value:t.form.deptId,callback:function(e){t.$set(t.form,"deptId",e)},expression:"form.deptId"}})],1),a("el-form-item",{attrs:{label:t.$t("work.accepted"),prop:"checkName"}},[a("el-select",{model:{value:t.form.checkName,callback:function(e){t.$set(t.form,"checkName",e)},expression:"form.checkName"}},t._l(t.$store.state.partol.getUserList,(function(t,e){return a("el-option",{key:e,attrs:{value:t.userName}})})),1)],1),a("el-form-item",{attrs:{label:t.$t("work.time"),prop:"startTime"}},[a("el-date-picker",{attrs:{type:"datetimerange","start-placeholder":t.$t("startTime"),"end-placeholder":t.$t("endTime"),"picker-options":t.pickerOptions0,"value-format":"yyyy-MM-dd HH:mm:ss",editable:!1},model:{value:t.$store.state.partol.arrayTime,callback:function(e){t.$set(t.$store.state.partol,"arrayTime",e)},expression:"$store.state.partol.arrayTime"}})],1),a("el-form-item",{attrs:{label:t.$t("work.remark"),prop:"remark"}},[a("el-input",{attrs:{type:"textarea",maxlength:"100"},model:{value:t.form.remark,callback:function(e){t.$set(t.form,"remark",e)},expression:"form.remark"}})],1)],1):t._e(),a("el-form",{directives:[{name:"show",rawName:"v-show",value:1===t.active,expression:"active === 1"}],attrs:{"label-width":"125px",inline:""}},[a("el-transfer",{ref:"transfers",staticStyle:{width:"800px",margin:"0px auto"},attrs:{filterable:"","filter-placeholder":t.$t("pEnter")+t.$t("device.deviceName"),titles:[t.$t("table.optional"),t.$t("table.selected")],data:t.deviceList,"target-order":"unshift"},model:{value:t.seletedList,callback:function(e){t.seletedList=e},expression:"seletedList"}})],1)],1),0===t.active?a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:t.next}},[t._v(t._s(t.$t("work.next"))+" ")])],1):t._e(),1===t.active?a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.active=0}}},[t._v(" "+t._s(t.$t("work.previous")))]),a("span",{staticClass:"btn-item long",on:{click:function(e){t.$store.state.partol.addDialog=!1}}},[t._v(t._s(t.$t("btn.cancel")))]),a("span",{staticClass:"btn-item long",on:{click:function(e){"create"===t.$store.state.partol.dialogStatus?t.createData():t.updateData()}}},[t._v(t._s(t.$t("btn.save")))])],1):t._e()],1)},i=[],n=a("2909"),r=(a("d9e2"),a("d3b7"),a("159b"),a("d81d"),a("4de4"),a("caad"),a("2532"),a("99af"),a("ac1f"),a("1276"),a("a9e3"),a("9b41")),o=a("61f7"),l=a("cadb");function c(t){return t>9?t:"0".concat(t)}function u(t){var e=t.getFullYear(),a=c(t.getMonth()+1),s=c(t.getDate()),i=c(t.getHours()),n=c(t.getMinutes()),r=c(t.getSeconds());return"".concat(e,"-").concat(a,"-").concat(s," ").concat(i,":").concat(n,":").concat(r)}var d={data:function(){var t=this,e=function(e,a,s){t.arrayTime.length<=0?s(new Error(t.$t("pEnter")+t.$t("work.time"))):s()};return{textMap:{update:this.$t("table.update"),create:this.$t("table.create")},createStatus:!1,active:0,name:"tableData",subTaskList:[],groupedArray:null,pickerOptions0:{disabledDate:function(t){return t.getTime()<Date.now()-864e5}},rules:{telephone:[{required:!0,validator:o["c"],trigger:"blur"}],taskName:[{required:!0,message:this.$t("pEnter")+this.$t("work.taskName"),trigger:"blur"}],cycle:[{required:!0,message:this.$t("pEnter")+this.$t("work.Days"),trigger:"blur"}],orderType:[{required:!0,message:this.$t("pEnter")+this.$t("work.taskType"),trigger:"blur"}],startTime:[{required:!0,validator:e,trigger:"blur"}],checkName:[{required:!0,message:this.$t("pEnter")+this.$t("work.taskName"),trigger:"blur"}],receiveName:[{required:!0,message:this.$t("pEnter")+this.$t("work.recipient"),trigger:"blur"}],deptId:[{required:!0,message:this.$t("pEnter")+this.$t("listQuery.deptId"),trigger:"blur"}]},seletedList:[],deviceList:[]}},computed:{form:function(){return this.$store.state.partol.form},arrayTime:function(){return this.$store.state.partol.arrayTime},addDialog:function(){return this.$store.state.partol.addDialog},activeName:function(){return this.$store.state.partol.activeName}},watch:{arrayTime:function(t){t&&(this.form.startTime=t&&t[0],this.form.deadline=t&&t[1])},addDialog:function(t){var e=this;!1===t&&setTimeout((function(){e.active=0,e.$store.state.partol.arrayTime=[]}),0)}},methods:{handleCreate:function(){this.$children.forEach((function(t){t.workBree&&t.handleCreate()}))},handleDelete:function(){var t=this;this.$children.forEach((function(e){if(e.workBree){if(console.log(e.taskCount),!e.taskCount)return;t.$confirm(t.$t("title.delPointOutWork"),t.$t("title.pointOut"),{confirmButtonText:t.$t("title.delete"),cancelButtonText:t.$t("title.cancel"),type:"warning"}).then((function(){Object(r["c"])({taskIdStr:e.taskCount}).then((function(a){console.log(a),e.workList(),t.$notify({title:t.$t("title.success"),message:t.$t("title.deleteSuccess"),type:"success",duration:3e3})}))}))}}))},next:function(){var t=this,e=[];this.$refs.form.validate((function(a){a&&(t.active++>2&&(t.active=0),t.seletedList=[],t.deviceList=t.$store.state.work.deviceAllList.map((function(e){return t.seletedList.push(e.alarmId?e.alarmId-0:e.deviceCode),{label:e.deviceName,key:e.alarmId?e.alarmId-0:e.deviceCode,alarmId:e.alarmId,deviceId:e.deviceId,deviceType:e.deviceType,deviceName:e.deviceName,latitude:e.latitude,longitude:e.longitude,areaId:e.areaId}})),Object(r["h"])().then((function(a){e=a.data.list.map((function(t){return{label:t.deviceName,key:t.deviceCode,deviceId:t.deviceId,deviceType:t.deviceType,deviceName:t.deviceName,latitude:t.latitude,longitude:t.longitude,areaId:t.deptId}})),e=e.filter((function(e){return!t.seletedList.includes(e.key)})),t.deviceList=[].concat(Object(n["a"])(e),Object(n["a"])(t.deviceList))})))}))},createData:function(){var t=this;this.createStatus||(this.getGroup(),this.form.deviceList=this.deviceList.filter((function(e){return t.seletedList.includes(e.key)})),this.form.subTaskList=this.subTaskList,this.form.deviceList.length>0&&(this.createStatus=!0,Object(r["m"])(this.form).then((function(e){console.log(e),t.createStatus=!1,t.$store.state.partol.addDialog=!1,t.subTaskList=[],t.active=0,t.$notify({title:t.$t("title.success"),message:t.$t("title.addSuccess"),type:"success",duration:3e3}),t.$parent.workList()})).catch((function(){t.createStatus=!1}))))},updateData:function(){var t=this;this.form.deviceList=Object(n["a"])(this.$store.state.partol.form.deviceList),this.getGroup(),this.form.taskType="巡检",this.form.subTaskList=this.subTaskList,this.form.deviceList.length>0&&Object(r["s"])(this.form).then((function(e){console.log(e),t.$store.state.partol.addDialog=!1,t.subTaskList=[],t.active=0,t.$notify({title:t.$t("title.success"),message:t.$t("title.updateSuccess"),type:"success",duration:3e3}),t.$parent.workList()}))},handleClose:function(t){var e=this;this.$confirm(this.$t("work.Confirm")).then((function(a){t(),e.active=0,e.$store.state.partol.arrayTime=[],e.$refs["form"].clearValidate()})).catch((function(t){}))},getGroup:function(){var t=this;this.groupedArray=Object(l["b"])(Object(l["a"])(this.form.startTime.split(" ")[0],this.form.deadline.split(" ")[0]),Number(1*this.form.cycle+1),this.form.deadline.split(" ")[1]),this.subTaskList=[];var e=0,a=this.groupedArray.length;this.groupedArray.forEach((function(s){var i="";i=a===e+1?t.form.deadline.split(" ")[1]:"00:00:00";var n="";n=0===e?t.form.startTime.split(" ")[1]:"00:00:00";var r=new Date(s[s.length-1]+" "+i);r=r.setDate(r.getDate()),r=new Date(r),t.subTaskList.push({startTime:s[0]+" "+n,deadline:u(r),taskName:t.form.taskName,receiveName:t.form.receiveName,Telephone:t.form.Telephone,deptId:t.form.deptId,remark:t.form.remark,checkName:t.form.checkName}),e++}))}}},p=d,f=a("2877"),m=Object(f["a"])(p,s,i,!1,null,null,null);e["default"]=m.exports},c24f:function(t,e,a){"use strict";a.d(e,"e",(function(){return i})),a.d(e,"d",(function(){return n})),a.d(e,"a",(function(){return r})),a.d(e,"c",(function(){return o})),a.d(e,"b",(function(){return l}));var s=a("b775");function i(t){return Object(s["a"])({url:"user-service/user/getUserList",method:"get",params:t})}function n(t){return Object(s["a"])({url:"user-service/user/getUserByUserName",method:"get",params:t})}function r(t){return Object(s["a"])({headers:{"Content-Type":"application/json"},url:"user-service/user/saveSysuser",method:"post",data:t})}function o(t){return Object(s["a"])({headers:{"Content-Type":"application/json"},url:"user-service/user/updateSysuser",method:"post",data:t})}function l(t){var e={userIds:t};return Object(s["a"])({url:"user-service/user/removeSysuser",method:"get",params:e})}},c3d7:function(t,e,a){},d2b0:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-dialog",{staticClass:"gisDialog",attrs:{title:t.$t("work.Subinspectiontask"),visible:t.dialogTableVisible,modal:!1},on:{"update:visible":function(e){t.dialogTableVisible=e}}},[a("div",{staticClass:"table-container"},[a("el-table",{attrs:{data:t.gridData,"highlight-current-row":"","header-row-class-name":"table-header","row-class-name":"table-row"}},[a("el-table-column",{attrs:{property:"taskName",align:"left",label:t.$t("work.taskName")}}),a("el-table-column",{attrs:{property:"receiveName",align:"left",label:t.$t("work.recipient")}}),a("el-table-column",{attrs:{property:"startTime",align:"left",label:t.$t("startTime"),"show-overflow-tooltip":""}}),a("el-table-column",{attrs:{property:"deadline",align:"left",label:t.$t("endTime"),"show-overflow-tooltip":""}}),a("el-table-column",{attrs:{property:"finishTime",align:"left",label:t.$t("completionTime"),"show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.finishTime?a("span",[t._v(t._s(e.row.finishTime))]):t._e(),e.row.finishTime?t._e():a("span",[t._v("- -")])]}}])}),a("el-table-column",{attrs:{label:t.$t("work.status"),align:"left"},scopedSlots:t._u([{key:"default",fn:function(e){return[-1===e.row.status?a("span",{staticClass:"btn yellow"},[t._v(t._s(t.$t("work.unpublished")))]):t._e(),0===e.row.status?a("span",{staticClass:"btn blue"},[t._v(t._s(t.$t("work.notStarted")))]):t._e(),1===e.row.status?a("span",{staticClass:"btn"},[t._v(t._s(t.$t("work.inProgress")))]):t._e(),2===e.row.status?a("span",{staticClass:"btn white"},[t._v(t._s(t.$t("work.suspend")))]):t._e(),3===e.row.status?a("span",{staticClass:"btn white"},[t._v(t._s(t.$t("work.complete")))]):t._e(),4===e.row.status?a("span",{staticClass:"btn blue"},[t._v(t._s(t.$t("work.failed")))]):t._e(),5===e.row.status?a("span",{staticClass:"btn purple"},[t._v(t._s(t.$t("work.tobeAccepted")))]):t._e(),6===e.row.status?a("span",{staticClass:"btn red"},[t._v(t._s(t.$t("work.timedout")))]):t._e()]}}])}),a("el-table-column",{attrs:{label:t.$t("table.operate"),width:"200",align:"left"},scopedSlots:t._u([{key:"default",fn:function(e){return[-1===e.row.status?a("span",{staticClass:"btnCancel",on:{click:function(a){return t.getOut(e)}}},[a("i",{staticClass:"iconfont icon-biaoti"}),t._v(t._s(t.$t("work.release")))]):t._e(),1===e.row.status?a("span",{staticClass:"btnCancel",on:{click:function(a){return t.stop(e)}}},[a("i",{staticClass:"iconfont icon-chakan"}),t._v(t._s(t.$t("work.suspend")))]):t._e(),1===e.row.status?a("span",{staticClass:"btnCancel",on:{click:function(a){return t.apply(e)}}},[a("i",{staticClass:"iconfont icon-biaoti"}),t._v(t._s(t.$t("work.check")))]):t._e(),a("span",{staticClass:"btnCancel",on:{click:function(a){return t.seeEq(e)}}},[a("i",{staticClass:"iconfont icon-kejian"}),t._v(" "+t._s(t.$t("work.see")))])]}}])})],1),a("pagination",{directives:[{name:"show",rawName:"v-show",value:t.sonTotal>0,expression:"sonTotal > 0"}],attrs:{total:t.sonTotal,"page-sizes":[1,5,10,20],page:t.getSonList.curPage,limit:t.getSonList.pageSize},on:{"update:page":function(e){return t.$set(t.getSonList,"curPage",e)},"update:limit":function(e){return t.$set(t.getSonList,"pageSize",e)},pagination:t.sonList}})],1)]),a("el-dialog",{staticStyle:{height:"800px"},attrs:{title:t.$t("work.see"),visible:t.seeDialog},on:{"update:visible":function(e){t.seeDialog=e}}},[a("son-equipment")],1)],1)},i=[],n=(a("d3b7"),a("159b"),a("d81d"),a("9b41")),r=a("cadb"),o=a("333d"),l=a("7877"),c={components:{Pagination:o["a"],sonEquipment:l["a"]},props:["parentTaskId","parentTaskStatus"],data:function(){return{gridData:null,dialogTableVisible:!1,sonTotal:0,getSonList:{releaseName:localStorage.getItem("sitename2"),curPage:1,pageSize:5,startTime:null,deadline:null,status:null,taskType:"巡检",parentId:null},sonPatrol:"sonPatrol",seeDialog:!1}},mounted:function(){},watch:{dialogTableVisible:function(t){0==t&&this.$parent.workList()}},methods:{handleCreate:function(){this.$children.forEach((function(t){t.workBree&&t.handleCreate()}))},handleDeleteBatch:function(){var t=this;this.$children.forEach((function(e){if(e.workBree){if(console.log(e.taskCount),!e.taskCount)return;t.$confirm(t.$t("title.delPointOutWork"),t.$t("title.pointOut"),{confirmButtonText:t.$t("title.delete"),cancelButtonText:t.$t("title.cancel"),type:"warning"}).then((function(){Object(n["c"])({taskIdStr:e.taskCount}).then((function(a){console.log(a),e.workList(),t.$notify({title:t.$t("title.success"),message:t.$t("title.deleteSuccess"),type:"success",duration:3e3})}))}))}}))},sonList:function(){var t=this;Object(n["k"])(this.getSonList).then((function(e){t.gridData=e.data.list,t.sonTotal=e.data.totalRow,t.gridData=t.gridData.map((function(t){return t=Object.assign({},t),6==Object(r["c"])(t.startTime,t.deadline,e.timestamp,t.status)&&(t.status=6),t}))})),console.log(this.parentTaskId,this.parentTaskStatus)},apply:function(t){var e=this;Object(n["b"])({taskId:t.row.taskId}).then((function(t){e.sonList(t)}))},handleDelete:function(t){var e=this;this.$confirm(this.$t("title.delPointOutWork"),this.$t("title.pointOut"),{confirmButtonText:this.$t("title.delete"),cancelButtonText:this.$t("title.cancel"),type:"warning"}).then((function(){Object(n["e"])({taskId:t.row.taskId}).then((function(t){console.log(t),e.sonList(),e.$notify({title:e.$t("title.success"),message:e.$t("title.deleteSuccess"),type:"success",duration:3e3})}))}))},getOut:function(t){var e=this;Object(n["q"])({status:0,taskId:t.row.taskId}).then((function(t){e.sonList(t),e.$parent.workList()}))},stop:function(t){var e=this;Object(n["r"])({status:2,taskId:t.row.taskId}).then((function(t){e.sonList(t)}))},seeEq:function(t){var e=this;console.log(t,"----2---"),Object(n["j"])({taskId:t.row.taskId}).then((function(t){e.$store.state.work.deviceAllList=t.data.deviceList,e.seeDialog=!0}))}}},u=c,d=(a("0478"),a("2877")),p=Object(d["a"])(u,s,i,!1,null,"2a195f66",null);e["default"]=p.exports},dbcb:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("div",{staticClass:"decorate"}),a("div",{staticClass:"filter-container",staticStyle:{border:"0"}},[t._t("default"),a("el-select",{staticClass:"filter-item",staticStyle:{width:"150px"},attrs:{placeholder:t.$t("work.status")},on:{change:t.handleFilter},model:{value:t.listQuery.status,callback:function(e){t.$set(t.listQuery,"status",e)},expression:"listQuery.status"}},t._l(t.status,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1),a("el-date-picker",{staticClass:"filter-item",attrs:{type:"datetimerange","start-placeholder":t.$t("startTime"),"end-placeholder":t.$t("endTime"),"value-format":"yyyy-MM-dd HH:mm:ss",editable:!1},on:{change:t.handleFilter},model:{value:t.arrayTimeSearch,callback:function(e){t.arrayTimeSearch=e},expression:"arrayTimeSearch"}}),a("span",{staticClass:"btn-item",on:{click:t.handleFilter}},[a("i",{staticClass:"iconfont icon-sousuo"}),t._v(t._s(t.$t("btn.search"))+" ")]),a("span",{staticClass:"btn-item",on:{click:t.wipeCondition}},[a("i",{staticClass:"el-icon-refresh-left"}),t._v(t._s(t.$t("btn.resetting"))+" ")]),a("div",{staticClass:"control-container"},[a("span",{staticClass:"btn-item",on:{click:t.handleCreate}},[a("i",{staticClass:"iconfont icon-a-"}),t._v(t._s(t.$t("btn.add"))+" ")]),a("span",{staticClass:"btn-item delete",on:{click:t.handleDeletes}},[a("i",{staticClass:"iconfont icon-shanchu"}),t._v(t._s(t.$t("btn.delete")))])])],2),a("div",{staticClass:"table-container"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],attrs:{data:t.workForm,"max-height":"580","highlight-current-row":"","header-row-class-name":"table-header","row-class-name":"table-row"},on:{"selection-change":t.handleSelectionChange,"row-dblclick":t.handleUpdates}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),a("el-table-column",{attrs:{property:"taskName",align:"left",label:t.$t("work.taskName")}}),a("el-table-column",{attrs:{property:"receiveName",align:"left",label:t.$t("work.recipient")}}),a("el-table-column",{attrs:{property:"telephone",align:"left",label:t.$t("device.phone")},scopedSlots:t._u([{key:"default",fn:function(e){return[null!==e.row.telephone?a("span",[t._v(t._s(e.row.telephone))]):t._e(),null===e.row.telephone?a("span",[t._v("- -")]):t._e()]}}])}),a("el-table-column",{attrs:{property:"startTime",align:"left",label:t.$t("startTime"),width:"170"}}),a("el-table-column",{attrs:{property:"deadline",align:"left",label:t.$t("endTime"),width:"170"}}),a("el-table-column",{attrs:{property:"finishTime",align:"left",label:t.$t("completionTime"),width:"170"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{directives:[{name:"show",rawName:"v-show",value:e.row.finishTime,expression:"scope.row.finishTime"}]},[t._v(t._s(e.row.scope))]),a("span",{directives:[{name:"show",rawName:"v-show",value:!e.row.finishTime,expression:"!scope.row.finishTime"}]},[t._v("- -")])]}}])}),a("el-table-column",{attrs:{align:"left",label:t.$t("work.remark"),"show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[null!==e.row.remark?a("span",[t._v(t._s(e.row.remark))]):t._e(),null===e.row.remark?a("span",[t._v("- -")]):t._e()]}}])}),a("el-table-column",{attrs:{label:t.$t("work.status"),align:"left"},scopedSlots:t._u([{key:"default",fn:function(e){return[-1===e.row.status?a("span",{staticClass:"btn yellow"},[t._v(t._s(t.$t("work.unpublished")))]):t._e(),0===e.row.status?a("span",{staticClass:"btn blue"},[t._v(t._s(t.$t("work.notStarted")))]):t._e(),1===e.row.status?a("span",{staticClass:"btn"},[t._v(t._s(t.$t("work.inProgress")))]):t._e(),2===e.row.status?a("span",{staticClass:"btn white"},[t._v(t._s(t.$t("work.suspend")))]):t._e(),3===e.row.status?a("span",{staticClass:"btn white"},[t._v(t._s(t.$t("work.complete")))]):t._e(),4===e.row.status?a("span",{staticClass:"btn blue"},[t._v(t._s(t.$t("work.failed")))]):t._e(),5===e.row.status?a("span",{staticClass:"btn purple"},[t._v(t._s(t.$t("work.tobeAccepted")))]):t._e(),6===e.row.status?a("span",{staticClass:"btn red"},[t._v(t._s(t.$t("work.timedout")))]):t._e()]}}])}),a("el-table-column",{attrs:{label:t.$t("table.operate"),width:"300",align:"left"},scopedSlots:t._u([{key:"default",fn:function(e){return[-1===e.row.status?a("span",{staticClass:"btnCancel",on:{click:function(a){return t.getOut(e)}}},[a("i",{staticClass:"iconfont icon-biaoti"}),t._v(t._s(t.$t("work.release"))+" ")]):t._e(),-1===e.row.status?a("span",{staticClass:"btnCancel",on:{click:function(a){return t.handleUpdate(e.row)}}},[a("i",{staticClass:"iconfont icon-bianji"}),t._v(t._s(t.$t("table.update"))+" ")]):t._e(),1===e.row.status?a("span",{staticClass:"btnCancel",on:{click:function(a){return t.stop(e)}}},[a("i",{staticClass:"iconfont icon-chakan"}),t._v(t._s(t.$t("work.suspend"))+" ")]):t._e(),a("span",{staticClass:"btnCancel",on:{click:function(a){return t.seeSon(e)}}},[a("i",{staticClass:"iconfont icon-kejian"}),t._v(" "+t._s(t.$t("work.see"))+" ")]),a("span",{staticClass:"btnCancel",on:{click:function(a){return t.handleDelete(e)}}},[a("i",{staticClass:"iconfont icon-a--"}),t._v(t._s(t.$t("table.delete"))+" ")])]}}])})],1)],1),a("pagination",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total > 0"}],attrs:{total:t.total,page:t.listQuery.curPage,limit:t.listQuery.pageSize},on:{"update:page":function(e){return t.$set(t.listQuery,"curPage",e)},"update:limit":function(e){return t.$set(t.listQuery,"pageSize",e)},pagination:t.workList}}),a("table-data"),a("son-patrol",{attrs:{parentTaskId:t.parentTaskId,parentTaskStatus:t.parentTaskStatus}})],1)},i=[],n=(a("d3b7"),a("159b"),a("a15b"),a("d81d"),a("9b41")),r=a("0e8f"),o=a("c24f"),l=a("333d"),c=a("d2b0"),u=a("754f"),d=a("cadb"),p={components:{Pagination:l["a"],sonPatrol:c["default"],tableData:u["default"]},data:function(){return{sonPatrol:null,total:0,list:null,listLoading:!0,downloadLoading:!1,light:!1,workForm:null,arrayTimeSearch:[],listQuery:{releaseName:localStorage.getItem("sitename2"),curPage:1,pageSize:10,startTime:null,deadline:null,status:null,taskType:"巡检",parentId:null},userList:{},status:[{value:-1,label:this.$t("work.unpublished")},{value:0,label:this.$t("work.notStarted")},{value:1,label:this.$t("work.inProgress")},{value:2,label:this.$t("work.suspend")},{value:3,label:this.$t("work.passed")},{value:4,label:this.$t("work.failed")}],taskCount:null,workBree:"workBree",lampList:null,parentTaskId:"",parentTaskStatus:""}},created:function(){this.getDepartmentList(),this.workList(),this.getUsers()},watch:{arrayTimeSearch:function(t){this.listQuery.startTime=t&&t[0],this.listQuery.deadline=t&&t[1]}},computed:{form:{get:function(){return this.$store.state.partol.form},set:function(t){this.$store.state.partol.form=t}}},methods:{handleSelectionChange:function(t){var e=[];t.forEach((function(t){e.push(t.taskId)})),this.taskCount=e.join(",")},seeSon:function(t){this.parentTaskId=t.row.taskId,this.parentTaskStatus=t.row.status,this.$children.forEach((function(e){e.sonPatrol&&(e.dialogTableVisible=!0,e.getSonList.parentId=t.row.taskId,e.sonList())}))},apply:function(t){var e=this;Object(n["b"])({taskId:t.row.taskId}).then((function(t){e.workList(t)}))},getOut:function(t){var e=this;Object(n["p"])({status:0,taskId:t.row.taskId}).then((function(t){e.workList(t)}))},stop:function(t){var e=this;Object(n["p"])({status:2,taskId:t.row.taskId}).then((function(t){e.workList(t)}))},getUsers:function(){var t=this;Object(o["e"])(this.userList).then((function(e){t.$store.state.partol.getUserList=e.data.list}))},workList:function(){var t=this;this.listLoading=!0,Object(n["k"])(this.listQuery).then((function(e){t.listLoading=!1,t.workForm=e.data.list,t.total=e.data.totalRow,t.workForm=t.workForm.map((function(t){return t=Object.assign({},t),6==Object(d["c"])(t.startTime,t.deadline,e.timestamp,t.status)&&(t.status=6),t}))}))},validatenull:function(t){return!(t&&t.length>0)},filterDeptList:function(t){var e=this,a=[];return!t.length&&t.nodeBean&&(t=[t]),t[0]?(t.forEach((function(t){var s={value:t.nodeBean.deptId,label:t.nodeBean.deptName,children:e.validatenull(t.subBeanList)?null:e.filterDeptList(t.subBeanList,!0)};a.push(s)})),a):[]},getDepartmentList:function(){var t=this;Object(r["e"])().then((function(e){t.$store.state.partol.deptList=t.filterDeptList(e.data)}))},resetForm:function(){for(var t in this.form)this.form[t]=null;this.form.deviceList=[],this.$store.state.work.deviceAllList=[]},handleCreate:function(){this.resetForm(),this.$store.state.partol.addDialog=!0,this.$store.state.partol.dialogStatus="create"},handleUpdates:function(t){this.handleUpdate(t)},handleUpdate:function(t){var e=this;this.$store.state.partol.arrayTime=[t.startTime,t.deadline],this.form=Object.assign({},t),Object(n["j"])(this.$store.state.partol.form).then((function(t){e.form=t.data,e.$store.state.work.deviceAllList=t.data.deviceList||[]})),this.$store.state.partol.dialogStatus="update",this.$store.state.partol.addDialog=!0},handleDelete:function(t){var e=this;this.$confirm(this.$t("title.delPointOutWork"),this.$t("title.pointOut"),{confirmButtonText:this.$t("title.delete"),cancelButtonText:this.$t("title.cancel"),type:"warning"}).then((function(){Object(n["e"])({taskId:t.row.taskId}).then((function(t){e.$notify({title:e.$t("title.success"),message:e.$t("title.deleteSuccess"),type:"success",duration:3e3}),e.workList(t)}))}))},handleDeletes:function(){var t=this;this.taskCount&&this.$confirm(this.$t("title.delPointOutWork"),this.$t("title.pointOut"),{confirmButtonText:this.$t("title.delete"),cancelButtonText:this.$t("title.cancel"),type:"warning"}).then((function(){Object(n["c"])({taskIdStr:t.taskCount}).then((function(e){console.log(e),t.workList(),t.$notify({title:t.$t("title.success"),message:t.$t("title.deleteSuccess"),type:"success",duration:3e3})}))}))},handleFilter:function(){this.listQuery.curPage=1,this.workList()},wipeCondition:function(){for(var t in this.listQuery)"curPage"!==t&&"pageSize"!==t&&"releaseName"!==t&&"taskType"!==t&&(this.listQuery[t]=null);this.arrayTimeSearch=[],this.workList()},headClassName:function(t){var e=t.row,a=t.rowIndex;return console.log(e,a),"headName"},rowClassName:function(t){var e=t.row,a=t.rowIndex;return console.log(e,a),(a+1)%2!==0?"cellNameOdd":"cellNameEven"}}},f=p,m=(a("35df"),a("2877")),h=Object(m["a"])(f,s,i,!1,null,"701bb298",null);e["default"]=h.exports}}]);
|
|
//# sourceMappingURL=chunk-604c36ae.874c10ad.js.map
|