EMS2.0-Documents/7.部署文档/Linux安装/项目前端文件/IEMS/js/chunk-1c7c9b4a.0d379beb.js

2 lines
8.7 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1c7c9b4a"],{"11a5":function(e,n,t){"use strict";t.r(n);var a=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"app-container"},[t("div",{staticClass:"decorate"}),t("div",{staticClass:"table-container"},[t("el-table",{ref:"table",attrs:{data:e.list,fit:"","max-height":"580","highlight-current-row":"","header-row-class-name":"table-header","row-class-name":"table-row"}},[t("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),t("el-table-column",{attrs:{property:"name",align:"left",width:"200",label:e.$t("menu.permissionName")}}),t("el-table-column",{attrs:{property:"label",align:"left",label:e.$t("screen.information")}}),t("el-table-column",{attrs:{property:"label2",align:"left",label:e.$t("screen.chart")}}),t("el-table-column",{attrs:{label:e.$t("table.operate"),width:"220",align:"left"},scopedSlots:e._u([{key:"default",fn:function(n){return[t("span",{staticClass:"btnCancel",attrs:{title:e.$t("screen.information")},on:{click:function(t){return e.handleUpdate(n,1)}}},[t("i",{staticClass:"iconfont icon-bianji"}),e._v(e._s(e.$t("screen.information")))]),t("span",{staticClass:"btnCancel",attrs:{title:e.$t("screen.chart")},on:{click:function(t){return e.handleUpdate(n,2)}}},[t("i",{staticClass:"iconfont icon-bianji"}),e._v(e._s(e.$t("screen.chart")))])]}}])})],1),t("el-dialog",{attrs:{"close-on-click-modal":!1,title:e.$t("table.update"),visible:e.addDialog},on:{"update:visible":function(n){e.addDialog=n}}},[t("el-form",{ref:"form",attrs:{"label-width":"110px"}},[t("el-form-item",{attrs:{label:e.$t("device.typeName")}},[t("el-select",{attrs:{placeholder:e.$t("pSelect")},on:{change:e.getParamByTypeCode},model:{value:e.typeCode,callback:function(n){e.typeCode=n},expression:"typeCode"}},e._l(e.deviceTypeList,(function(e){return t("el-option",{key:e.typeCode,attrs:{label:e.typeName,value:e.typeCode}})})),1)],1),t("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.changeList},model:{value:e.checkList,callback:function(n){e.checkList=n},expression:"checkList"}})],1),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("span",{staticClass:"btn-item long",on:{click:function(n){e.addDialog=!1}}},[e._v(e._s(e.$t("btn.cancel")))]),t("span",{staticClass:"btn-item long",on:{click:e.updateData}},[e._v(e._s(e.$t("btn.save")))])])],1)],1)])},i=[],l=(t("a15b"),t("d81d"),t("d3b7"),t("159b"),t("4de4"),t("caad"),t("2532"),t("b0c0"),t("3785")),c=t("7930"),o={data:function(){return{total:0,flag:1,list:[],addDialog:!1,seleteData:{},checkList:[],deviceList:[],typeCode:"",deviceTypeList:[],scope:{}}},created:function(){this.url=this.$store.state.user.url+"/trajectory-service",this.getList(),this.getDeviceTypeList()},methods:{getList:function(){var e=this;Object(l["a"])({flag:1}).then((function(n){var t={name:"BATTERY INFORMATION",value:n.data,label:n.data.map((function(n){return"en"==e.$i18n.locale?n.enSignName:n.signName})).join()};Object(l["a"])({flag:2}).then((function(n){t.value2=n.data,t.label2=n.data.map((function(n){return"en"==e.$i18n.locale?n.enSignName:n.signName})).join(),e.list.push(t)}))})),Object(l["d"])({flag:1}).then((function(n){var t={name:"POWER INFORMATION",value:n.data,label:n.data.map((function(n){return"en"==e.$i18n.locale?n.enSignName:n.signName})).join()};Object(l["d"])({flag:2}).then((function(n){t.value2=n.data,t.label2=n.data.map((function(n){return"en"==e.$i18n.locale?n.enSignName:n.signName})).join(),e.list.push(t)}))})),Object(l["e"])({flag:1}).then((function(n){var t={name:"RECTIFY INFORMATION",value:n.data,label:n.data.map((function(n){return"en"==e.$i18n.locale?n.enSignName:n.signName})).join()};Object(l["e"])({flag:2}).then((function(n){t.value2=n.data,t.label2=n.data.map((function(n){return"en"==e.$i18n.locale?n.enSignName:n.signName})).join(),e.list.push(t)}))})),Object(l["f"])({flag:1}).then((function(n){var t={name:"SENSOR INFORMATION",value:n.data,label:n.data.map((function(n){return"en"==e.$i18n.locale?n.enSignName:n.signName})).join()};Object(l["f"])({flag:2}).then((function(n){t.value2=n.data,t.label2=n.data.map((function(n){return"en"==e.$i18n.locale?n.enSignName:n.signName})).join(),e.list.push(t)}))}))},changeList:function(){console.log(this.deviceList,this.checkList)},getDeviceTypeList:function(){var e=this;Object(c["c"])().then((function(n){e.deviceTypeList=e.filterDeptList(n.data.list)}))},filterDeptList:function(e){var n=this,t=[];return e.forEach((function(e){var a=e;console.log(e),e&&(e.subList&&(a.children=n.filterDeptList(e.subList,!0)),e.id=e.deptId+1,t.push(a))})),t},handleUpdate:function(e,n){var t=this;1==n?(this.checkList=e.row.value.map((function(e){return e.enSignName})),this.deviceList=e.row.value.map((function(e){return{enSignName:e.enSignName,flag:n,signName:e.signName,typeCode:e.typeCode,label:"en"==t.$i18n.locale?e.enSignName:e.signName,key:e.enSignName}}))):(this.checkList=e.row.value2.map((function(e){return e.enSignName})),this.deviceList=e.row.value2.map((function(e){return{enSignName:e.enSignName,flag:n,signName:e.signName,typeCode:e.typeCode,label:"en"==t.$i18n.locale?e.enSignName:e.signName,key:e.enSignName}}))),this.scope=e,this.typeCode="",this.flag=n,this.addDialog=!0},getParamByTypeCode:function(e){var n=this;Object(l["c"])({typeCode:e}).then((function(e){n.deviceList=n.deviceList.filter((function(e){return n.checkList.includes(e.enSignName)})),e.data.forEach((function(e){n.checkList.includes(e.enSignName)||n.deviceList.push({enSignName:e.enSignName,flag:n.flag,signName:e.signName,typeCode:e.typeCode,label:"en"==n.$i18n.locale?e.enSignName:e.signName,key:e.enSignName})}))}))},updateData:function(){var e=this,n=this.deviceList.filter((function(n){return e.checkList.includes(n.enSignName)}));n=n.map((function(n){return{enSignName:n.enSignName,flag:e.flag,signName:n.signName,typeCode:n.typeCode}})),"BATTERY INFORMATION"==this.scope.row.name?Object(l["g"])(n,this.flag).then((function(){1==e.flag?e.list.forEach((function(t){t.name==e.scope.row.name&&(t.value=n.map((function(e){return e})),t.label=n.map((function(n){return"en"==e.$i18n.locale?n.enSignName:n.signName})).join())})):e.list.forEach((function(t){t.name==e.scope.row.name&&(t.value2=n,t.label2=n.map((function(n){return"en"==e.$i18n.locale?n.enSignName:n.signName})).join())})),e.addDialog=!1})):"POWER INFORMATION"==this.scope.row.name?Object(l["i"])(n,this.flag).then((function(){1==e.flag?e.list.forEach((function(t){t.name==e.scope.row.name&&(t.value=n.map((function(e){return e})),t.label=n.map((function(n){return"en"==e.$i18n.locale?n.enSignName:n.signName})).join())})):e.list.forEach((function(t){t.name==e.scope.row.name&&(t.value2=n,t.label2=n.map((function(n){return"en"==e.$i18n.locale?n.enSignName:n.signName})).join())})),e.addDialog=!1})):"RECTIFY INFORMATION"==this.scope.row.name?Object(l["j"])(n,this.flag).then((function(){1==e.flag?e.list.forEach((function(t){t.name==e.scope.row.name&&(t.value=n.map((function(e){return e})),t.label=n.map((function(n){return"en"==e.$i18n.locale?n.enSignName:n.signName})).join())})):e.list.forEach((function(t){t.name==e.scope.row.name&&(t.value2=n,t.label2=n.map((function(n){return"en"==e.$i18n.locale?n.enSignName:n.signName})).join())})),e.addDialog=!1})):"SENSOR INFORMATION"==this.scope.row.name&&Object(l["k"])(n,this.flag).then((function(){1==e.flag?e.list.forEach((function(t){t.name==e.scope.row.name&&(t.value=n.map((function(e){return e})),t.label=n.map((function(n){return"en"==e.$i18n.locale?n.enSignName:n.signName})).join())})):e.list.forEach((function(t){t.name==e.scope.row.name&&(t.value2=n,t.label2=n.map((function(n){return"en"==e.$i18n.locale?n.enSignName:n.signName})).join())})),e.addDialog=!1}))}}},s=o,r=(t("315f"),t("2877")),u=Object(r["a"])(s,a,i,!1,null,"7debecd4",null);n["default"]=u.exports},"315f":function(e,n,t){"use strict";t("6f86")},"6f86":function(e,n,t){},7930:function(e,n,t){"use strict";t.d(n,"c",(function(){return i})),t.d(n,"a",(function(){return l})),t.d(n,"b",(function(){return c})),t.d(n,"d",(function(){return o}));var a=t("b775");function i(e){return Object(a["a"])({url:"device-service/type/getTypeList",method:"get",params:e})}function l(e){return Object(a["a"])({headers:{"Content-Type":"application/json"},url:"device-service/type/addType",method:"post",data:e})}function c(e){var n={typeById:e};return Object(a["a"])({url:"device-service/type/deleteType",method:"delete",params:n})}function o(e){return Object(a["a"])({headers:{"Content-Type":"application/json"},url:"device-service/type/updateType",method:"put",data:e})}}}]);
//# sourceMappingURL=chunk-1c7c9b4a.0d379beb.js.map