EMS2.0-Documents/7.部署文档/Window安装/项目前端文件/IEMS/js/chunk-4cc169e3.689ed2c4.js

2 lines
17 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4cc169e3"],{"0e8f":function(e,t,r){"use strict";r.d(t,"d",(function(){return n})),r.d(t,"e",(function(){return o})),r.d(t,"c",(function(){return c})),r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return d}));var a=r("b775"),i=r("4328"),s=r.n(i);function n(e){return Object(a["a"])({url:"user-service/dept/getDeptTreeList",method:"get",params:e})}function o(e){return Object(a["a"])({url:"user-service/dept/getDeptSubByDeptId",method:"get",params:e})}function c(e){var t=s.a.stringify(e);return Object(a["a"])({url:"user-service/dept/updateDept",method:"post",data:t})}function l(e){var t=s.a.stringify(e);return Object(a["a"])({url:"user-service/dept/saveDept",method:"post",data:t})}function d(e){return Object(a["a"])({headers:{"Content-Type":"application/json"},url:"user-service/dept/removeDept",method:"get",params:e})}},8098:function(e,t,r){"use strict";r("a439")},"9e04":function(e,t,r){"use strict";r.d(t,"g",(function(){return i})),r.d(t,"a",(function(){return s})),r.d(t,"c",(function(){return n})),r.d(t,"i",(function(){return o})),r.d(t,"j",(function(){return c})),r.d(t,"h",(function(){return l})),r.d(t,"b",(function(){return d})),r.d(t,"d",(function(){return u})),r.d(t,"e",(function(){return m})),r.d(t,"f",(function(){return p}));var a=r("b775");function i(e){return Object(a["a"])({url:"trajectory-service/deptAlarm/getTaskByAlarmId",method:"get",params:e})}function s(e){return Object(a["a"])({url:"alarm-service/alarm/clearAlarmStatus?alarmId="+e,method:"post"})}function n(e){return Object(a["a"])({url:"alarm-service/alarm/getAlarmList",method:"get",params:e})}function o(e){return Object(a["a"])({url:"alarm-service/alarm/getTipAlarmList",method:"get",params:e})}function c(e){return Object(a["a"])({url:"alarm-service/alarm/updateAlarmReadStatus",method:"post",params:e})}function l(e){return Object(a["a"])({url:"device-service/deviceLog/getDeviceLogList",method:"get",params:e})}function d(e){return Object(a["a"])({url:"alarm-service/statistics/getAlarmLevel",method:"get",params:e})}function u(e){return Object(a["a"])({url:"alarm-service/statistics/getAlarmStatus",method:"get",params:e})}function m(e){return Object(a["a"])({url:"alarm-service/statistics/getAlarmTypeLevel",method:"get",params:e})}function p(e){return Object(a["a"])({url:"alarm-service/statistics/getAlarmTypeStatus",method:"get",params:e})}},a219:function(e,t,r){"use strict";var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-dialog",{attrs:{"close-on-click-modal":!1,title:e.textMap[e.dialogStatus],visible:e.$store.state.work.addDialog,"before-close":e.handleClose},on:{"update:visible":function(t){return e.$set(e.$store.state.work,"addDialog",t)}}},[r("el-scrollbar",{staticStyle:{height:"100%","padding-bottom":"8px"},attrs:{vertical:!0}},[r("el-form",{directives:[{name:"show",rawName:"v-show",value:0===e.active,expression:"active === 0"}],ref:"form",attrs:{"status-icon":"",model:e.form,rules:e.rules,"label-width":"135px",inline:""}},[r("el-form-item",{attrs:{label:e.$t("work.taskName"),prop:"taskName"}},[r("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("work.taskName"),maxlength:"50"},model:{value:e.form.taskName,callback:function(t){e.$set(e.form,"taskName",t)},expression:"form.taskName"}})],1),r("el-form-item",{attrs:{label:e.$t("work.taskType"),prop:"orderType"}},[r("el-select",{staticStyle:{width:"150px"},attrs:{clearable:"",disabled:e.flag},on:{change:e.changeOrder},model:{value:e.form.orderType,callback:function(t){e.$set(e.form,"orderType",t)},expression:"form.orderType"}},e._l(e.options,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1),r("el-input",{directives:[{name:"show",rawName:"v-show",value:"5"==e.form.orderType,expression:"form.orderType == '5'"}],staticStyle:{width:"100px"},attrs:{type:"text",maxlength:"20",prop:"otherRemark"},model:{value:e.otherRemark,callback:function(t){e.otherRemark=t},expression:"otherRemark"}})],1),r("el-form-item",{attrs:{label:e.$t("work.recipient"),prop:"receiveName"}},[r("el-select",{attrs:{placeholder:e.$t("pEnter")+e.$t("work.recipient"),clearable:""},model:{value:e.form.receiveName,callback:function(t){e.$set(e.form,"receiveName",t)},expression:"form.receiveName"}},e._l(e.userList,(function(e,t){return r("el-option",{key:t,attrs:{value:e.userName}})})),1)],1),r("el-form-item",{attrs:{label:e.$t("work.accepted"),prop:"checkName"}},[r("el-select",{attrs:{clearable:""},model:{value:e.form.checkName,callback:function(t){e.$set(e.form,"checkName",t)},expression:"form.checkName"}},e._l(e.userList,(function(e,t){return r("el-option",{key:t,attrs:{value:e.userName}})})),1)],1),r("el-form-item",{attrs:{label:e.$t("device.phone"),prop:"telephone"}},[r("el-input",{attrs:{maxlength:"11",placeholder:e.$t("pEnter")+e.$t("work.recipient")+" "+e.$t("device.phone")},model:{value:e.form.telephone,callback:function(t){e.$set(e.form,"telephone",t)},expression:"form.telephone"}})],1),r("el-form-item",{attrs:{label:e.$t("listQuery.deptId"),prop:"deptId"}},[r("el-cascader",{attrs:{"show-all-levels":!1,options:e.deptList,props:{checkStrictly:!0,emitPath:!1},clearable:""},model:{value:e.form.deptId,callback:function(t){e.$set(e.form,"deptId",t)},expression:"form.deptId"}})],1),r("el-form-item",{attrs:{label:e.$t("work.time"),prop:"startTime"}},[r("el-date-picker",{attrs:{type:"datetimerange","start-placeholder":e.$t("startTime"),"end-placeholder":e.$t("endTime"),"picker-options":e.pickerOptions0,"value-format":"yyyy-MM-dd HH:mm:ss","default-time":["12:00:00"],editable:!1},model:{value:e.arrayTime,callback:function(t){e.arrayTime=t},expression:"arrayTime"}})],1),r("el-form-item",{attrs:{label:e.$t("work.remark"),prop:"remark"}},[r("el-input",{attrs:{type:"textarea",placeholder:e.$t("pEnter")+e.$t("work.remark"),maxlength:"100"},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1),r("el-form",{directives:[{name:"show",rawName:"v-show",value:1===e.active,expression:"active === 1"}],attrs:{"label-width":"125px",inline:""}},[4!=e.form.orderType||e.flag?e._e():r("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},e._l(e.deviceCategoryList,(function(e){return r("el-tab-pane",{key:e.value,attrs:{label:e.label,name:e.value}})})),1),r("el-transfer",{ref:"transfers",staticStyle:{width:"800px",margin:"0px auto"},attrs:{filterable:"","filter-placeholder":e.$t("pEnter")+e.$t("device.deviceName"),titles:[e.$t("table.optional"),e.$t("table.selected")],data:e.deviceList,"target-order":"unshift"},on:{change:e.changeNmae},model:{value:e.seletedList,callback:function(t){e.seletedList=t},expression:"seletedList"}})],1)],1),r("span",{directives:[{name:"show",rawName:"v-show",value:0===e.active,expression:"active === 0"}],staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("span",{staticClass:"btn-item long",on:{click:e.next}},[e._v(" "+e._s(e.$t("work.next"))+" ")])]),r("span",{directives:[{name:"show",rawName:"v-show",value:1===e.active,expression:"active === 1"}],staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("span",{staticClass:"btn-item long",on:{click:function(t){e.active=0}}},[e._v(e._s(e.$t("work.previous"))+" ")]),r("span",{staticClass:"btn-item",on:{click:e.closed}},[e._v(e._s(e.$t("btn.cancel")))]),r("span",{staticClass:"btn-item",on:{click:function(t){"create"==e.dialogStatus?e.createData():e.updateData()}}},[e._v(e._s(e.$t("btn.save")))])])],1)],1)},i=[],s=r("1da1"),n=r("2909"),o=(r("96cf"),r("d9e2"),r("d81d"),r("4de4"),r("d3b7"),r("caad"),r("2532"),r("99af"),r("3ca3"),r("ddb0"),r("159b"),r("c24f")),c=r("9e04"),l=r("0e8f"),d=r("9b41"),u={props:["dialogStatus","otherRemarkParent","arrayTimeParent","flag"],data:function(){var e=this,t=function(t,r,a){"5"==r&&""==e.otherRemark?a(new Error(e.$t("pEnter")+e.$t("work.time"))):""==r||null==r?a(new Error(e.$t("pEnter")+e.$t("work.taskType"))):a()},r=function(t,r,a){e.arrayTime.length<=0?a(new Error(e.$t("pEnter")+e.$t("work.time"))):a()};return{textMap:{update:this.$t("table.update"),create:this.$t("table.create")},createStatus:!1,active:0,arrayTime:[],options:[{value:"1",label:this.$t("work.install")},{value:"3",label:this.$t("work.dismantle")},{value:"4",label:this.$t("work.faults")},{value:"5",label:this.$t("work.other")}],userList:[],deptList:[],otherRemark:"",rules:{telephone:[{required:!0,message:this.$t("pEnter")+this.$t("device.phone"),trigger:"blur"}],taskName:[{required:!0,message:this.$t("pEnter")+this.$t("work.taskName"),trigger:"blur"}],orderType:[{required:!0,validator:t,trigger:"change"}],startTime:[{required:!0,validator:r,trigger:"change"}],checkName:[{required:!0,message:this.$t("pEnter")+this.$t("work.accepted"),trigger:"change"}],receiveName:[{required:!0,message:this.$t("pEnter")+this.$t("work.recipient"),trigger:"change"}],deptId:[{required:!0,message:this.$t("pEnter")+this.$t("listQuery.deptId"),trigger:"change"}]},pickerOptions0:{disabledDate:function(e){return e.getTime()<Date.now()-864e5}},deviceCategory:null,deviceCategoryList:[{value:"normal",label:this.$t("work.normal")},{value:"fault",label:this.$t("work.fault")}],seletedList:[],deviceList:[],alarmList:[],activeName:"fault"}},computed:{form:{get:function(){return this.$store.state.work.form},set:function(e){this.$store.state.work.form=e}},addDialog:{get:function(){return this.$store.state.work.addDialog},set:function(e){this.$store.state.work.addDialog=e}}},watch:{arrayTime:function(e){e&&(this.form.startTime=e&&e[0],this.form.deadline=e&&e[1])},addDialog:function(e){var t=this;this.$store.state.work.selectDevice=[],!1===e&&(this.$store.state.work.form.deviceList=[],"create"==this.dialogStatus&&(this.$store.state.work.form={})),1==e&&(this.active=0,"update"==this.dialogStatus&&(this.otherRemark=this.otherRemarkParent,this.arrayTime=this.arrayTimeParent),this.$nextTick((function(){t.$refs["form"].clearValidate()})))}},mounted:function(){this.getUser(),this.getDeptInfo()},methods:{changeOrder:function(){this.form=Object.assign({},this.form)},getUser:function(){var e=this;Object(o["e"])().then((function(t){e.userList=t.data.list}))},next:function(){var e=this,t=[];this.$refs.form.validate((function(r){if(r){if(e.active++>2&&(e.active=0),e.seletedList=[],e.deviceList=e.$store.state.work.deviceAllList.map((function(t){return e.seletedList.push(t.alarmId?t.alarmId-0:t.deviceCode),{label:t.deviceName,key:t.alarmId?t.alarmId-0:t.deviceCode,alarmId:t.alarmId,deviceCode:t.deviceCode,deviceId:t.deviceId,deviceType:t.deviceType,deviceName:t.deviceName,latitude:t.latitude,longitude:t.longitude,areaId:t.areaId,disabled:!!e.flag}})),e.flag)return;4==e.form.orderType?(e.activeName="fault",Object(c["c"])({alarmStatus:1}).then((function(r){e.alarmList=r.data.list,t=r.data.list.map((function(e){return{label:e.deviceName,key:e.alarmId,deviceCode:e.deviceCode,deviceType:e.typeCode,deviceName:e.deviceName,alarmId:e.alarmId}})),t=t.filter((function(t){return!e.seletedList.includes(t.key)})),e.deviceList=[].concat(Object(n["a"])(t),Object(n["a"])(e.deviceList))}))):Object(d["h"])().then((function(r){t=r.data.list.map((function(e){return{label:e.deviceName,key:e.deviceCode,deviceId:e.deviceId,deviceType:e.deviceType,deviceName:e.deviceName,latitude:e.latitude,longitude:e.longitude,areaId:e.deptId}})),t=t.filter((function(t){return!e.seletedList.includes(t.key)})),e.deviceList=[].concat(Object(n["a"])(t),Object(n["a"])(e.deviceList))}))}}))},changeNmae:function(e){console.log(e)},handleClick:function(e){var t=this;if(console.log(e),"fault"==this.activeName){var r=[];this.seletedList.length>0&&(r=this.deviceList.filter((function(e){return t.seletedList.includes(e.key)}))),this.deviceList=this.alarmList.map((function(e){return{label:e.deviceName,key:e.alarmId,deviceCode:e.deviceCode,deviceType:e.typeName,deviceName:e.deviceName,alarmId:e.alarmId}})),this.deviceList=[].concat(Object(n["a"])(this.deviceList),Object(n["a"])(r))}else this.getDeviceList()},getDeviceList:function(){var e=this,t=[];this.seletedList.length>0&&(this.deviceList=this.deviceList.filter((function(t){return e.seletedList.includes(t.key)}))),Object(d["h"])().then((function(r){t=r.data.list.map((function(e){return{label:e.deviceName,key:e.deviceCode,deviceId:e.deviceId,deviceType:e.deviceType,deviceName:e.deviceName,latitude:e.latitude,longitude:e.longitude}})),t=t.filter((function(t){return!e.seletedList.includes(t.key)})),e.deviceList=[].concat(Object(n["a"])(e.deviceList),Object(n["a"])(t))}))},closed:function(){this.addDialog=!1,this.$refs["form"].resetFields(),this.active=0},createData:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.createStatus){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.getSelectedList();case 4:e.form.deviceList.length>0&&(e.createStatus=!0,Object(d["n"])(e.form).then((function(t){e.addDialog=!1,e.createStatus=!1,e.$store.state.alarm.workDialog=!1,200===t.status&&(e.$notify({title:e.$t("title.success"),message:e.$t("title.addSuccess"),type:"success",duration:3e3}),e.$parent.getList&&e.$parent.getList(),e.$parent.workList&&e.$parent.workList(),e.arrayTime=[])})).catch((function(){e.createStatus=!1})));case 5:case"end":return t.stop()}}),t)})))()},getSelectedList:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){var r,a,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:r=[],r=e.deviceList.filter((function(t){return console.log(e.seletedList.includes(t.key)),e.seletedList.includes(t.key)})),console.log(r,e.deviceList,r.length),a=regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(console.log(r[t].alarmId,"----1"),!r[t].alarmId){e.next=5;break}return console.log(r[t].alarmId),e.next=5,Object(d["h"])({deviceCode:r[t].deviceCode}).then((function(e){e.data.list.forEach((function(e){r[t].deviceCode==e.deviceCode&&(r[t].deviceId=e.deviceId,r[t].deviceType=e.deviceType,r[t].deviceName=e.deviceName,r[t].latitude=e.latitude,r[t].longitude=e.longitude,r[t].areaId=e.deptId)})),console.log("-----------1------")}));case 5:case"end":return e.stop()}}),e)})),i=0;case 5:if(!(i<r.length)){t.next=10;break}return t.delegateYield(a(i),"t0",7);case 7:i++,t.next=5;break;case 10:e.form.deviceList=r.map((function(e){return e})),console.log(e.form.deviceList);case 12:case"end":return t.stop()}}),t)})))()},addTask:function(){this.$store.state.work.isDialog=!0,"1"!==this.form.orderType&&"3"!==this.form.orderType?this.$store.state.work.changeName="alarm":this.$store.state.work.changeName="noAlarm"},updateData:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.getSelectedList();case 2:e.form.deviceList.length>0&&Object(d["t"])(e.form).then((function(t){200===t.status&&(e.addDialog=!1,e.$store.state.alarm.workDialog=!1,e.$notify({title:e.$t("title.success"),message:e.$t("title.updateSuccess"),type:"success",duration:3e3}),e.$parent.getList&&e.$parent.getList(),e.$parent.workList&&e.$parent.workList(),e.arrayTime=[])}));case 3:case"end":return t.stop()}}),t)})))()},getdeptIdList:function(e){var t=this;e.length||(e=[e]);var r=e.map((function(e){var r={};return e.subBeanList?(r.children=t.getdeptIdList(e.subBeanList),r.label=e.nodeBean.deptName,r.value=e.nodeBean.deptId,r):(r.label=e.nodeBean.deptName,r.value=e.nodeBean.deptId,r)}));return r},getDeptInfo:function(){var e=this;Object(l["e"])().then((function(t){t.data&&(e.deptList=e.getdeptIdList(t.data))}))},handleClose:function(e){var t=this;this.$confirm(this.$t("work.Confirm")).then((function(){e(),0===t.active&&t.$refs["form"].clearValidate(),t.active=0,t.arrayTime=[],t.$store.state.work.type="",t.$refs["form"].resetFields()})).catch((function(){}))}}},m=u,p=(r("8098"),r("2877")),f=Object(p["a"])(m,a,i,!1,null,"f9cc66b2",null);t["a"]=f.exports},a439:function(e,t,r){},c24f:function(e,t,r){"use strict";r.d(t,"e",(function(){return i})),r.d(t,"d",(function(){return s})),r.d(t,"a",(function(){return n})),r.d(t,"c",(function(){return o})),r.d(t,"b",(function(){return c}));var a=r("b775");function i(e){return Object(a["a"])({url:"user-service/user/getUserList",method:"get",params:e})}function s(e){return Object(a["a"])({url:"user-service/user/getUserByUserName",method:"get",params:e})}function n(e){return Object(a["a"])({headers:{"Content-Type":"application/json"},url:"user-service/user/saveSysuser",method:"post",data:e})}function o(e){return Object(a["a"])({headers:{"Content-Type":"application/json"},url:"user-service/user/updateSysuser",method:"post",data:e})}function c(e){var t={userIds:e};return Object(a["a"])({url:"user-service/user/removeSysuser",method:"get",params:t})}}}]);
//# sourceMappingURL=chunk-4cc169e3.689ed2c4.js.map