EMS2.0-Documents/7.部署文档/Window安装/项目前端文件/IEMS/js/chunk-c991a9d8.ce13e7b6.js

2 lines
26 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c991a9d8"],{"0e8f":function(e,t,i){"use strict";i.d(t,"d",(function(){return o})),i.d(t,"e",(function(){return s})),i.d(t,"c",(function(){return l})),i.d(t,"a",(function(){return c})),i.d(t,"b",(function(){return d}));var n=i("b775"),a=i("4328"),r=i.n(a);function o(e){return Object(n["a"])({url:"user-service/dept/getDeptTreeList",method:"get",params:e})}function s(e){return Object(n["a"])({url:"user-service/dept/getDeptSubByDeptId",method:"get",params:e})}function l(e){var t=r.a.stringify(e);return Object(n["a"])({url:"user-service/dept/updateDept",method:"post",data:t})}function c(e){var t=r.a.stringify(e);return Object(n["a"])({url:"user-service/dept/saveDept",method:"post",data:t})}function d(e){return Object(n["a"])({headers:{"Content-Type":"application/json"},url:"user-service/dept/removeDept",method:"get",params:e})}},"14cb":function(e,t,i){"use strict";i("1a02")},"1a02":function(e,t,i){},"333d":function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"pagination-container"},[i("el-pagination",e._b({attrs:{background:e.background,"current-page":e.currentPage,"page-size":e.pageSize,layout:e.layout,"page-sizes":e.pageSizes,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"update:pageSize":function(t){e.pageSize=t},"update:page-size":function(t){e.pageSize=t},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}},"el-pagination",e.$attrs,!1))],1)},a=[],r=(i("a9e3"),{name:"Pagination",props:{total:{required:!0,type:Number},page:{type:Number,default:0},limit:{type:Number,default:20},pageSizes:{type:Array,default:function(){return[5,10,20,30,70]}},layout:{type:String,default:"total, sizes, prev, pager, next, jumper"},background:{type:Boolean,default:!0},hidden:{type:Boolean,default:!1}},computed:{currentPage:{get:function(){return this.page},set:function(e){this.$emit("update:page",e)}},pageSize:{get:function(){return this.limit},set:function(e){this.$emit("update:limit",e)}}},methods:{handleSizeChange:function(e){this.$emit("pagination",{page:this.currentPage,limit:e})},handleCurrentChange:function(e){this.$emit("pagination",{page:e,limit:this.pageSize})}}}),o=r,s=(i("14cb"),i("2877")),l=Object(s["a"])(o,n,a,!1,null,"4dfad654",null);t["a"]=l.exports},4381:function(e,t,i){"use strict";i("d3b7"),i("caad"),i("2532"),i("d9e2");var n=i("4360"),a={inserted:function(e,t){var i=t.value,a=n["a"].getters&&n["a"].getters.butPermission;if(console.log(a,"roles"),!(i&&i instanceof Array&&i.length>0))throw new Error("need roles! Like v-permission=\"['admin','editor']\"");var r=i,o=a.some((function(e){return r.includes(e)}));if(console.log(o,"hasPermission"),o)n["a"].state.user.permissionFlag[r]=!1;else{n["a"].state.user.permissionFlag[r]=!0,console.log(n["a"].state.user.permissionFlag[r],"permissionRoles");var s=document.createElement("div");s.style.cursor="not-allowed",s.style.display="inline-block",e.style.pointerEvents="none",e.parentNode.insertBefore(s,e),e.parentNode&&e.parentNode.removeChild(e),s.appendChild(e),console.log(e,"permissionRoles")}}},r=function(e){e.directive("permission",a)};window.Vue&&(window["permission"]=a,Vue.use(r)),a.install=r;t["a"]=a},"571f":function(e,t,i){"use strict";i.d(t,"e",(function(){return a})),i.d(t,"f",(function(){return r})),i.d(t,"d",(function(){return o})),i.d(t,"a",(function(){return s})),i.d(t,"b",(function(){return l})),i.d(t,"c",(function(){return c})),i.d(t,"g",(function(){return d}));var n=i("b775");function a(e){return Object(n["a"])({url:"device-service/site/getSiteList",method:"get",params:e})}function r(e){return Object(n["a"])({url:"device-service/site/getUnChoiceDevice",method:"get",params:e})}function o(e){return Object(n["a"])({url:"device-service/site/getHasChoiceDevice",method:"get",params:e})}function s(e){return Object(n["a"])({headers:{"Content-Type":"application/json"},url:"device-service/site/addSite",method:"post",data:e})}function l(e){return Object(n["a"])({headers:{"Content-Type":"application/json"},url:"device-service/site/addSiteDevice",method:"post",data:e})}function c(e){var t={siteById:e};return Object(n["a"])({url:"device-service/site/deleteSite",method:"delete",params:t})}function d(e){return Object(n["a"])({headers:{"Content-Type":"application/json"},url:"device-service/site/updateSite",method:"put",data:e})}},7930:function(e,t,i){"use strict";i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return o})),i.d(t,"d",(function(){return s}));var n=i("b775");function a(e){return Object(n["a"])({url:"device-service/type/getTypeList",method:"get",params:e})}function r(e){return Object(n["a"])({headers:{"Content-Type":"application/json"},url:"device-service/type/addType",method:"post",data:e})}function o(e){var t={typeById:e};return Object(n["a"])({url:"device-service/type/deleteType",method:"delete",params:t})}function s(e){return Object(n["a"])({headers:{"Content-Type":"application/json"},url:"device-service/type/updateType",method:"put",data:e})}},aa98:function(e,t,i){"use strict";i.d(t,"l",(function(){return a})),i.d(t,"a",(function(){return r})),i.d(t,"c",(function(){return o})),i.d(t,"q",(function(){return s})),i.d(t,"h",(function(){return l})),i.d(t,"i",(function(){return c})),i.d(t,"m",(function(){return d})),i.d(t,"p",(function(){return u})),i.d(t,"b",(function(){return p})),i.d(t,"o",(function(){return f})),i.d(t,"f",(function(){return m})),i.d(t,"s",(function(){return h})),i.d(t,"g",(function(){return v})),i.d(t,"t",(function(){return b})),i.d(t,"n",(function(){return g})),i.d(t,"e",(function(){return y})),i.d(t,"d",(function(){return C})),i.d(t,"r",(function(){return $})),i.d(t,"j",(function(){return L})),i.d(t,"k",(function(){return j}));var n=i("b775");function a(e){return Object(n["a"])({url:"device-service/cabinet/getCabinetList",method:"get",params:e})}function r(e){return Object(n["a"])({headers:{"Content-Type":"application/json"},url:"device-service/cabinet/addCabinet",method:"post",data:e})}function o(e){var t=new FormData;return t.append("file",e),Object(n["a"])({headers:{"Content-Type":"multipart/form-data"},url:"device-service/import/addCabinetsImport",method:"post",data:t})}function s(e){return Object(n["a"])({headers:{"Content-Type":"application/json"},url:"device-service/cabinet/updateCabinet",method:"put",data:e})}function l(e){var t={cabinetCode:e};return Object(n["a"])({url:"device-service/cabinet/deleteCabinet",method:"delete",params:t})}function c(e){var t={cabinetCodes:e};return Object(n["a"])({url:"device-service/cabinet/deleteCabinetList",method:"delete",params:t})}function d(e){return Object(n["a"])({url:"device-service/cabinet/getInsideDeviceByCabinetCode",method:"get",params:e})}function u(e){return Object(n["a"])({url:"device-service/cabinet/getUnCheckDeviceByDeptId",method:"get",params:e})}function p(e){return Object(n["a"])({headers:{"Content-Type":"application/json"},url:"device-service/cabinet/addCabinetInsideDevice",method:"post",data:e})}function f(e){return Object(n["a"])({url:"device-service/inside/getMoveDeviceList",method:"get",params:e})}function m(e){return Object(n["a"])({headers:{"Content-Type":"application/json"},url:"device-service/inside/addInsideMove",method:"post",data:e})}function h(e){return Object(n["a"])({headers:{"Content-Type":"application/json"},url:"device-service/inside/updateMoveDevice",method:"put",data:e})}function v(e){var t=new FormData;return t.append("file",e),Object(n["a"])({headers:{"Content-Type":"multipart/form-data"},url:"device-service/import/addMovesImport",method:"post",data:t})}function b(e){var t=new FormData;return t.append("file",e.file),t.append("moveCode",e.moveCode),Object(n["a"])({headers:{"Content-Type":"multipart/form-data"},url:"device-service/import/updateMoveOidImport",method:"post",data:t})}function g(e){return Object(n["a"])({url:"device-service/inside/getInsideDeviceList",method:"get",params:e})}function y(e){return Object(n["a"])({headers:{"Content-Type":"application/json"},url:"device-service/inside/addInsideDevice",method:"post",data:e})}function C(e){var t=new FormData;return t.append("file",e),Object(n["a"])({headers:{"Content-Type":"multipart/form-data"},url:"device-service/import/addDevicesImport",method:"post",data:t})}function $(e){return Object(n["a"])({headers:{"Content-Type":"application/json"},url:"device-service/inside/updateInsideDevice",method:"put",data:e})}function L(e){var t={deviceCode:e};return Object(n["a"])({url:"device-service/inside/deleteCabinet",method:"delete",params:t})}function j(e){var t={deviceCodes:e};return Object(n["a"])({url:"device-service/inside/deleteInsideDeviceList",method:"delete",params:t})}},bcf5:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"app-container"},[i("div",{staticClass:"decorate"}),i("div",{staticClass:"filter-container"},[i("el-cascader",{staticClass:"filter-item",attrs:{"show-all-levels":!1,placeholder:e.$t("listQuery.deptId"),options:e.deptIdList,props:{checkStrictly:!0,emitPath:!1,props:{}},clearable:""},on:{change:function(t){return e.handleFilter("deptId")}},model:{value:e.listQuery.deptId,callback:function(t){e.$set(e.listQuery,"deptId",t)},expression:"listQuery.deptId"}}),i("el-select",{staticClass:"filter-item",attrs:{placeholder:e.$t("listQuery.siteCode")},on:{change:e.handleFilter},model:{value:e.listQuery.siteCode,callback:function(t){e.$set(e.listQuery,"siteCode",t)},expression:"listQuery.siteCode"}},e._l(e.siteCodeList,(function(t){return i("el-option",{key:t.siteCode,attrs:{label:t.siteName,value:t.siteCode},nativeOn:{click:function(t){return e.handleFilter("siteCode")}}})})),1),i("el-select",{staticClass:"filter-item",attrs:{placeholder:e.$t("listQuery.cabinetCode")},on:{change:e.handleFilter},model:{value:e.listQuery.cabinetCode,callback:function(t){e.$set(e.listQuery,"cabinetCode",t)},expression:"listQuery.cabinetCode"}},e._l(e.cabinetList,(function(e){return i("el-option",{key:e.deviceId,attrs:{label:e.deviceName,value:e.deviceCode}})})),1),i("el-select",{staticClass:"filter-item",attrs:{placeholder:e.$t("deviceType.typeCode")},on:{change:e.handleFilter},model:{value:e.listQuery.typeCode,callback:function(t){e.$set(e.listQuery,"typeCode",t)},expression:"listQuery.typeCode"}},e._l(e.deviceTypeList,(function(e){return i("el-option",{key:e.typeCode,attrs:{label:e.typeName,value:e.typeCode}})})),1),i("el-input",{staticClass:"filter-item",attrs:{placeholder:e.$t("device.deviceName")},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleFilter.apply(null,arguments)}},model:{value:e.listQuery.deviceName,callback:function(t){e.$set(e.listQuery,"deviceName",t)},expression:"listQuery.deviceName"}}),i("span",{staticClass:"btn-item",on:{click:e.handleFilter}},[i("i",{staticClass:"iconfont icon-sousuo"}),e._v(e._s(e.$t("btn.search")))]),i("span",{staticClass:"btn-item",on:{click:e.clearListQuery}},[i("i",{staticClass:"el-icon-refresh-left"}),e._v(" "+e._s(e.$t("btn.resetting")))]),i("div",{staticClass:"control-container"},[i("el-upload",{ref:"upload",attrs:{action:"","file-list":e.fileList,"before-upload":e.beforeUpload,"on-success":e.handleFileSuccess,"on-error":e.handleFileError,"http-request":e.addDevicesImport}},[i("span",{staticClass:"btn-item",attrs:{slot:"trigger"},slot:"trigger"},[i("i",{staticClass:"iconfont icon-a-"}),e._v(e._s(e.$t("btn.adds")))])]),i("span",{staticClass:"btn-item",on:{click:function(t){return e.handleCreate()}}},[i("i",{staticClass:"iconfont icon-a-"}),e._v(e._s(e.$t("btn.addDevice")))]),i("span",{staticClass:"btn-item delete",on:{click:e.deleteList}},[i("i",{staticClass:"iconfont icon-shanchu"}),e._v(e._s(e.$t("btn.delete")))])],1)],1),i("div",{staticClass:"table-container"},[i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],ref:"table",attrs:{data:e.list,fit:"","max-height":"580","highlight-current-row":"","header-row-class-name":"table-header","row-class-name":"table-row"}},[i("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),i("el-table-column",{attrs:{property:"deviceCode",align:"left",label:e.$t("device.deviceCode")}}),i("el-table-column",{attrs:{property:"deviceName",align:"left",label:e.$t("device.deviceName")}}),i("el-table-column",{attrs:{property:"typeName",align:"left",label:e.$t("device.typeName")}}),i("el-table-column",{attrs:{property:"cabinetName",align:"left",label:e.$t("device.cabinetCode")}}),i("el-table-column",{attrs:{property:"deptName",align:"left",label:e.$t("listQuery.deptId")}}),i("el-table-column",{attrs:{property:"siteName",align:"left",label:e.$t("listQuery.siteCode")}}),i("el-table-column",{attrs:{property:"factory",align:"left",label:e.$t("device.factory")}}),i("el-table-column",{attrs:{property:"model",align:"left",label:e.$t("device.model")}}),i("el-table-column",{attrs:{property:"director",align:"left",label:e.$t("device.director")}}),i("el-table-column",{attrs:{property:"phone",align:"left",label:e.$t("device.phone")}}),i("el-table-column",{attrs:{property:"owner",align:"left",label:e.$t("device.owner")}}),i("el-table-column",{attrs:{label:e.$t("device.online"),align:"left"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",{staticClass:"pot",class:{red:1!=t.row.online}}),e._v(" "+e._s(1==t.row.online?e.$t("device.onLine"):e.$t("device.outLine"))+" ")]}}])}),i("el-table-column",{attrs:{label:e.$t("table.operate"),width:"180",align:"left"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",{staticClass:"btnCancel",attrs:{title:e.$t("table.update")},on:{click:function(i){return e.handleUpdate(t)}}},[i("i",{staticClass:"iconfont icon-bianji"}),e._v(e._s(e.$t("table.update")))]),i("span",{staticClass:"btnCancel delete",attrs:{title:e.$t("table.delete")},on:{click:function(i){return e.handleDelete(t)}}},[i("i",{staticClass:"iconfont icon-a--"}),e._v(e._s(e.$t("table.delete")))])]}}])})],1),i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.listQuery.curPage,limit:e.listQuery.pageSize},on:{"update:page":function(t){return e.$set(e.listQuery,"curPage",t)},"update:limit":function(t){return e.$set(e.listQuery,"pageSize",t)},pagination:e.getList}})],1),i("el-dialog",{attrs:{"close-on-click-modal":!1,title:e.textMap[e.dialogStatus],visible:e.addDialog},on:{"update:visible":function(t){e.addDialog=t}}},[i("el-form",{ref:"form",attrs:{rules:e.rules,"status-icon":"",model:e.form,inline:"","label-width":"150px"}},[i("el-form-item",{attrs:{label:e.$t("device.typeCode"),prop:"typeCode"}},[i("el-select",{attrs:{placeholder:e.$t("pSelect"),disabled:"update"===e.dialogStatus},model:{value:e.form.typeCode,callback:function(t){e.$set(e.form,"typeCode",t)},expression:"form.typeCode"}},e._l(e.deviceTypeList,(function(e){return i("el-option",{key:e.typeCode,attrs:{label:e.typeName,value:e.typeCode}})})),1)],1),i("el-form-item",{attrs:{label:e.$t("device.deviceCode"),prop:"deviceCode"}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.deviceCode"),maxlength:"20",disabled:"update"===e.dialogStatus},model:{value:e.form.deviceCode,callback:function(t){e.$set(e.form,"deviceCode",t)},expression:"form.deviceCode"}})],1),i("el-form-item",{attrs:{label:e.$t("device.deviceName"),prop:"deviceName"}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.deviceName"),maxlength:"20"},model:{value:e.form.deviceName,callback:function(t){e.$set(e.form,"deviceName",t)},expression:"form.deviceName"}})],1),i("el-form-item",{attrs:{label:e.$t("device.model"),prop:"model"}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.model"),maxlength:"20"},model:{value:e.form.model,callback:function(t){e.$set(e.form,"model",t)},expression:"form.model"}})],1),i("el-form-item",{attrs:{label:e.$t("listQuery.deptId"),prop:"deptId"}},[i("el-cascader",{attrs:{"show-all-levels":!1,options:e.deptIdList,props:{checkStrictly:!0,emitPath:!1,props:{}},clearable:""},on:{change:function(t){return e.handleChange(e.form)}},model:{value:e.form.deptId,callback:function(t){e.$set(e.form,"deptId",t)},expression:"form.deptId"}})],1),i("el-form-item",{attrs:{label:e.$t("device.cabinetCode"),prop:"cabinetCode"}},[i("el-select",{model:{value:e.form.cabinetCode,callback:function(t){e.$set(e.form,"cabinetCode",t)},expression:"form.cabinetCode"}},e._l(e.cabinetList,(function(e){return i("el-option",{key:e.deviceId,attrs:{label:e.deviceName,value:e.deviceCode}})})),1)],1),i("el-form-item",{attrs:{label:e.$t("device.factory"),prop:"factory"}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.factory"),maxlength:"20"},model:{value:e.form.factory,callback:function(t){e.$set(e.form,"factory",t)},expression:"form.factory"}})],1),i("el-form-item",{attrs:{label:e.$t("device.owner"),prop:"owner"}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.owner"),maxlength:"20"},model:{value:e.form.owner,callback:function(t){e.$set(e.form,"owner",t)},expression:"form.owner"}})],1),i("el-form-item",{attrs:{label:e.$t("device.director"),prop:"director"}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.director"),maxlength:"20"},model:{value:e.form.director,callback:function(t){e.$set(e.form,"director",t)},expression:"form.director"}})],1),i("el-form-item",{attrs:{label:e.$t("device.phone"),prop:"phone"}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.phone"),maxlength:"20"},model:{value:e.form.phone,callback:function(t){e.$set(e.form,"phone",t)},expression:"form.phone"}})],1),i("el-form-item",{attrs:{label:e.$t("device.sort"),prop:"sort"}},[i("el-input-number",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.sort"),min:1,max:10},model:{value:e.form.sort,callback:function(t){e.$set(e.form,"sort",t)},expression:"form.sort"}})],1),"CAMERA"==e.form.typeCode?i("el-form-item",{attrs:{label:e.$t("device.deviceSerial"),prop:"deviceSerial"}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.deviceSerial")},model:{value:e.form.deviceSerial,callback:function(t){e.$set(e.form,"deviceSerial",t)},expression:"form.deviceSerial"}})],1):e._e(),"CAMERA"==e.form.typeCode?i("el-form-item",{attrs:{label:e.$t("device.channelNo"),prop:"channelNo"}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.channelNo")},model:{value:e.form.channelNo,callback:function(t){e.$set(e.form,"channelNo",t)},expression:"form.channelNo"}})],1):e._e()],1),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("span",{staticClass:"btn-item long",on:{click:function(t){e.addDialog=!1}}},[e._v(e._s(e.$t("btn.cancel")))]),i("span",{staticClass:"btn-item long",on:{click:function(t){"create"===e.dialogStatus?e.createData():e.updateData()}}},[e._v(e._s(e.$t("btn.define")))])])],1)],1)},a=[],r=i("5530"),o=(i("d9e2"),i("ac1f"),i("00b4"),i("b0c0"),i("caad"),i("d81d"),i("d3b7"),i("159b"),i("4e82"),i("a15b"),i("2f62")),s=i("aa98"),l=i("7930"),c=i("0e8f"),d=i("571f"),u=i("333d"),p=i("4381"),f={components:{Pagination:u["a"]},directives:{permission:p["a"]},data:function(){var e=this,t=function(t,i,n){""===i?n(new Error(e.$t("validate.phone"))):/^[0-9-]+$/.test(i)?n():n(new Error(e.$t("validate.phoneFormat")))};return{createStatus:!1,addDialog:!1,textMap:{update:this.$t("table.update"),create:this.$t("table.create")},dialogStatus:"",form:{deviceId:null,deviceCode:null,typeCode:null,deviceName:null,deptId:null,cabinetCode:null,factory:null,model:null,director:null,phone:null,owner:null,sort:null,deviceSerial:null,channelNo:null},total:0,listQuery:{siteCode:null,cabinetCode:null,deptId:null,deviceName:null,curPage:1,pageSize:10},listLoading:!0,list:null,deviceTypeList:[],deptIdList:[],siteCodeList:[],cabinetList:[],rules:{sort:[{required:!0,message:this.$t("pEnter")+this.$t("device.sort"),trigger:"blur"}],typeCode:[{required:!0,message:this.$t("pSelect")+this.$t("device.typeCode"),trigger:"change"}],deviceCode:[{required:!0,message:this.$t("pEnter")+this.$t("device.deviceCode"),trigger:"blur"}],deviceName:[{required:!0,message:this.$t("pEnter")+this.$t("device.deviceName"),trigger:"blur"}],deptId:[{required:!0,message:this.$t("pSelect")+this.$t("listQuery.deptId"),trigger:"change"}],cabinetCode:[{required:!0,message:this.$t("pSelect")+this.$t("device.cabinetCode"),trigger:"change"}],model:[{required:!0,message:this.$t("pEnter")+this.$t("device.model"),trigger:"blur"}],factory:[{required:!0,message:this.$t("pEnter")+this.$t("device.factory"),trigger:"blur"}],owner:[{required:!0,message:this.$t("pEnter")+this.$t("device.owner"),trigger:"blur"}],director:[{required:!0,message:this.$t("pEnter")+this.$t("device.director"),trigger:"blur"}],phone:[{required:!0,validator:t,trigger:"blur"}]},fileList:[]}},computed:Object(r["a"])({},Object(o["b"])(["userName"])),created:function(){this.getList(),this.getTypeList(),this.getDeptSubByDeptId(),this.getSiteList(),this.getCabinetList()},methods:{beforeUpload:function(e){console.log(e,"file");var t=["xlsx","xls"],i=e.name.substring(e.name.lastIndexOf(".")+1,e.name.length);return t.includes(i)?(console.log(t.includes(i)),!0):(this.$message.info("文件格式不对仅限xls和xlsx"),!1)},handleFileSuccess:function(e){console.log(e,"handleFileSuccess"),200===e.status&&console.log(e,"200")},handleFileError:function(e){console.log(e,"err")},addDevicesImport:function(e){var t=this;Object(s["d"])(e.file).then((function(){t.$refs.upload.clearFiles(),t.getList()})).catach((function(){t.$refs.upload.clearFiles()}))},validatenull:function(e){return!(e&&e.length>0)},getdeptIdList:function(e){var t=this;e.length||(e=[e]);var i=e.map((function(e){var i={};return e.subBeanList?(i.children=t.getdeptIdList(e.subBeanList),i.label=e.nodeBean.deptName,i.value=e.nodeBean.deptId,i):(i.label=e.nodeBean.deptName,i.value=e.nodeBean.deptId,i)}));return i},clearListQuery:function(){this.listQuery={siteCode:null,cabinetCode:null,deptId:null,deviceName:null,curPage:1,pageSize:10},this.getList()},getTypeList:function(){var e=this;Object(l["c"])().then((function(t){e.deviceTypeList=e.filterDeptList(t.data.list)}))},filterDeptList:function(e){var t=this,i=[];return e.forEach((function(e){var n=e;console.log(e),e&&(e.subList&&(n.children=t.filterDeptList(e.subList,!0)),e.id=e.deptId+1,i.push(n))})),i},getDeptSubByDeptId:function(){var e=this;Object(c["e"])().then((function(t){e.deptIdList=t.data&&e.getdeptIdList(t.data)}))},getSiteList:function(){var e=this;Object(d["e"])({deptId:this.listQuery.deptId}).then((function(t){e.siteCodeList=t.data.list}))},getCabinetList:function(){var e=this;Object(s["l"])({deptId:this.listQuery.deptId,siteCode:this.listQuery.siteCode}).then((function(t){e.cabinetList=t.data.list}))},checkedChange:function(e){var t=this.$refs.tree.getCheckedKeys();t.length>1&&(t.shift(),this.$refs.tree.setCheckedKeys(e.deptId))},getList:function(){var e=this;this.listLoading=!0,Object(s["n"])(this.listQuery).then((function(t){e.listLoading=!1,e.list=t.data.list,e.total=t.data.totalRow}))},createData:function(){var e=this;this.createStatus||this.$refs.form.validate((function(t){t&&(e.createStatus=!0,Object(s["e"])(e.form).then((function(t){200==t.status&&(e.createStatus=!1,e.$notify({title:e.$t("title.success"),message:e.$t("title.addSuccess"),type:"success",duration:3e3}),e.getList(),e.addDialog=!1)})).catch((function(){e.createStatus=!1})))}))},updateData:function(){var e=this;this.$refs.form.validate((function(t){t&&Object(s["r"])(e.form).then((function(t){200==t.status&&(e.$notify({title:e.$t("title.success"),message:e.$t("title.updateSuccess"),type:"success",duration:3e3}),e.getList(),e.addDialog=!1)}))}))},resetForm:function(){for(var e in this.form)this.form[e]=null},handleCreate:function(){var e=this;this.resetForm(),this.addDialog=!0,this.dialogStatus="create",this.$nextTick((function(){e.$refs["form"].clearValidate()}))},handleUpdate:function(e){var t=this;this.form={deviceId:e.row.deviceId,deviceCode:e.row.deviceCode,deviceName:e.row.deviceName,typeCode:e.row.typeCode,deptId:e.row.deptId,cabinetCode:e.row.cabinetCode,factory:e.row.factory,model:e.row.model,director:e.row.director,phone:e.row.phone,owner:e.row.owner,sort:e.row.sort,deviceSerial:null,channelNo:null},"CAMERA"==e.row.typeCode&&(this.form.monitorId=e.row.monitorId,this.form.deviceSerial=e.row.deviceSerial,this.form.channelNo=e.row.channelNo),this.dialogStatus="update",this.addDialog=!0,this.$nextTick((function(){t.$refs["form"].clearValidate()}))},handleDelete:function(e){var t=this;this.$confirm(this.$t("title.delPointOutDevice"),this.$t("title.pointOut"),{confirmButtonText:this.$t("title.delete"),cancelButtonText:this.$t("title.cancel"),type:"warning"}).then((function(){Object(s["j"])(e.row.deviceCode).then((function(e){200==e.status&&(t.getList(),t.$notify({title:t.$t("title.success"),message:t.$t("title.deleteSuccess"),type:"success",duration:3e3}))}))}))},deleteList:function(){var e=this;this.$refs.table.selection.length?this.$confirm(this.$t("title.delPointOutDevice"),this.$t("title.pointOut"),{confirmButtonText:this.$t("title.delete"),cancelButtonText:this.$t("title.cancel"),type:"warning"}).then((function(){var t=e.$refs.table.selection.map((function(e){return e.deviceCode})),i=t.join(",");Object(s["k"])(i).then((function(t){200==t.status&&(e.getList(),e.$notify({title:e.$t("title.success"),message:e.$t("title.deleteSuccess"),type:"success",duration:3e3}))}))})):this.$notify({title:this.$t("title.fail"),message:this.$t("pSelect")+this.$t("user.user"),type:"warning",duration:3e3})},handleFilter:function(e){this.listQuery.curPage=1,this.getList(),"deptId"==e&&(this.siteCodeList=[],this.listQuery.siteCode=null,this.getSiteList(),this.cabinetList=[],this.listQuery.cabinetCode=null,this.getCabinetList()),"siteCode"==e&&(this.cabinetList=[],this.listQuery.cabinetCode=null,this.getCabinetList())},handleChange:function(e){var t=this;e.cabinetCode=null,Object(s["l"])({deptId:e.deptId}).then((function(e){t.cabinetList=e.data.list}))},formatJson:function(e,t){return t.map((function(t){return e.map((function(e){return t[e]}))}))}}},m=f,h=i("2877"),v=Object(h["a"])(m,n,a,!1,null,null,null);t["default"]=v.exports}}]);
//# sourceMappingURL=chunk-c991a9d8.ce13e7b6.js.map