2 lines
30 KiB
JavaScript
2 lines
30 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4d7054f5"],{"0e8f":function(e,t,i){"use strict";i.d(t,"d",(function(){return o})),i.d(t,"e",(function(){return l})),i.d(t,"c",(function(){return s})),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 l(e){return Object(n["a"])({url:"user-service/dept/getDeptSubByDeptId",method:"get",params:e})}function s(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){},"22f3":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,l=(i("14cb"),i("2877")),s=Object(l["a"])(o,n,a,!1,null,"4dfad654",null);t["a"]=s.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 l=document.createElement("div");l.style.cursor="not-allowed",l.style.display="inline-block",e.style.pointerEvents="none",e.parentNode.insertBefore(l,e),e.parentNode&&e.parentNode.removeChild(e),l.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 l})),i.d(t,"b",(function(){return s})),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 l(e){return Object(n["a"])({headers:{"Content-Type":"application/json"},url:"device-service/site/addSite",method:"post",data:e})}function s(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 l}));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 l(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 l})),i.d(t,"h",(function(){return s})),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 $})),i.d(t,"d",(function(){return C})),i.d(t,"r",(function(){return y})),i.d(t,"j",(function(){return w})),i.d(t,"k",(function(){return I}));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 l(e){return Object(n["a"])({headers:{"Content-Type":"application/json"},url:"device-service/cabinet/updateCabinet",method:"put",data:e})}function s(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 $(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 y(e){return Object(n["a"])({headers:{"Content-Type":"application/json"},url:"device-service/inside/updateInsideDevice",method:"put",data:e})}function w(e){var t={deviceCode:e};return Object(n["a"])({url:"device-service/inside/deleteCabinet",method:"delete",params:t})}function I(e){var t={deviceCodes:e};return Object(n["a"])({url:"device-service/inside/deleteInsideDeviceList",method:"delete",params:t})}},c9cd: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")},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")},model:{value:e.listQuery.cabinetCode,callback:function(t){e.$set(e.listQuery,"cabinetCode",t)},expression:"listQuery.cabinetCode"}},e._l(e.cabinetList,(function(t){return i("el-option",{key:t.deviceId,attrs:{label:t.deviceName,value:t.deviceCode},nativeOn:{click:function(t){return e.handleFilter.apply(null,arguments)}}})})),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.addMovesImport}},[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:"imei",align:"left",label:"IMEI"}}),i("el-table-column",{attrs:{property:"imsi",align:"left",label:"IMSI"}}),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:{property:"rssi",align:"left",label:e.$t("device.rssi")}}),i("el-table-column",{attrs:{property:"operator",align:"left",label:e.$t("device.operator")}}),i("el-table-column",{attrs:{label:e.$t("table.operate"),width:"280",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",attrs:{title:e.$t("device.upload")},on:{click:function(i){return e.handleUpload(t)}}},[i("i",{staticClass:"iconfont icon-a-"}),e._v(e._s(e.$t("device.upload")))]),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":"140px"}},[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(t){return i("el-option",{key:t.typeCode,attrs:{label:t.typeName,value:t.typeCode},on:{change:e.handleFilter}})})),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.deviceCode"),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("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.host"),prop:"host"}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.host"),maxlength:"20"},model:{value:e.form.host,callback:function(t){e.$set(e.form,"host",t)},expression:"form.host"}})],1),i("el-form-item",{attrs:{label:e.$t("device.port"),prop:"port"}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.port"),maxlength:"20"},model:{value:e.form.port,callback:function(t){e.$set(e.form,"port",t)},expression:"form.port"}})],1),i("el-form-item",{attrs:{label:e.$t("device.trapIp"),prop:"trapIp"}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.trapIp"),maxlength:"20"},model:{value:e.form.trapIp,callback:function(t){e.$set(e.form,"trapIp",t)},expression:"form.trapIp"}})],1),i("el-form-item",{attrs:{label:e.$t("device.fsuCode"),prop:"fsuCode"}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.fsuCode"),maxlength:"20"},model:{value:e.form.fsuCode,callback:function(t){e.$set(e.form,"fsuCode",t)},expression:"form.fsuCode"}})],1),i("el-form-item",{attrs:{label:e.$t("device.software")}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.software"),maxlength:"20"},model:{value:e.form.software,callback:function(t){e.$set(e.form,"software",t)},expression:"form.software"}})],1),i("el-form-item",{attrs:{label:e.$t("device.hardware")}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.hardware"),maxlength:"20"},model:{value:e.form.hardware,callback:function(t){e.$set(e.form,"hardware",t)},expression:"form.hardware"}})],1),i("el-form-item",{attrs:{label:e.$t("device.power")}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.power"),maxlength:"20"},model:{value:e.form.power,callback:function(t){e.$set(e.form,"power",t)},expression:"form.power"}})],1),i("el-form-item",{attrs:{label:e.$t("device.rssi")}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.rssi"),maxlength:"20"},model:{value:e.form.rssi,callback:function(t){e.$set(e.form,"rssi",t)},expression:"form.rssi"}})],1),i("el-form-item",{attrs:{label:e.$t("device.portCount")}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.portCount"),maxlength:"20"},model:{value:e.form.portCount,callback:function(t){e.$set(e.form,"portCount",t)},expression:"form.portCount"}})],1),i("el-form-item",{attrs:{label:"IMEI",prop:"imei"}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+"IMEI",maxlength:"20"},model:{value:e.form.imei,callback:function(t){e.$set(e.form,"imei",t)},expression:"form.imei"}})],1),i("el-form-item",{attrs:{label:"IMSI",prop:"imsi"}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+"IMSI",maxlength:"20"},model:{value:e.form.imsi,callback:function(t){e.$set(e.form,"imsi",t)},expression:"form.imsi"}})],1),i("el-form-item",{attrs:{label:e.$t("device.network")}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.network"),maxlength:"20"},model:{value:e.form.network,callback:function(t){e.$set(e.form,"network",t)},expression:"form.network"}})],1),i("el-form-item",{attrs:{label:e.$t("device.operator")}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.operator"),maxlength:"20"},model:{value:e.form.operator,callback:function(t){e.$set(e.form,"operator",t)},expression:"form.operator"}})],1),i("el-form-item",{attrs:{label:e.$t("device.company")}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.company"),maxlength:"20"},model:{value:e.form.company,callback:function(t){e.$set(e.form,"company",t)},expression:"form.company"}})],1),i("el-form-item",{attrs:{label:e.$t("device.agent"),prop:"agent"}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.agent"),maxlength:"20"},model:{value:e.form.agent,callback:function(t){e.$set(e.form,"agent",t)},expression:"form.agent"}})],1),i("el-form-item",{attrs:{label:e.$t("device.agentPhone"),prop:"phone"}},[i("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.agentPhone"),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.logonTime")}},[i("el-date-picker",{attrs:{type:"datetime",placeholder:e.$t("table.datetime"),"picker-options":e.pickerOptions0,"value-format":"yyyy-MM-dd HH:mm:ss","default-time":"12:00:00",editable:!1},model:{value:e.form.logonTime,callback:function(t){e.$set(e.form,"logonTime",t)},expression:"form.logonTime"}})],1)],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),i("el-dialog",{attrs:{"close-on-click-modal":!1,title:e.textMap.create,visible:e.uploadDialog},on:{"update:visible":function(t){e.uploadDialog=t}}},[i("el-form",{ref:"forms",attrs:{rules:e.rules,model:e.forms,inline:"","label-width":"130px"}},[i("el-form-item",{staticStyle:{width:"100%"},attrs:{label:e.$t("device.upload")}},[i("el-upload",{staticClass:"upload-demo",attrs:{action:"",drag:"","before-upload":e.beforeUpload,"on-success":e.handleFileSuccess,"on-error":e.handleFileError,"on-remove":e.handleRemove,"http-request":e.uploadFile}},[i("i",{staticClass:"el-icon-upload"})])],1)],1),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("span",{staticClass:"btn-item long",on:{click:function(t){e.uploadDialog=!1}}},[e._v(e._s(e.$t("btn.cancel")))]),i("span",{staticClass:"btn-item long",on:{click:e.updateMoveOidImport}},[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("a15b"),i("2f62")),l=i("aa98"),s=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,uploadDialog:!1,textMap:{update:this.$t("table.update"),create:this.$t("table.create")},dialogStatus:"",form:{deviceId:null,cabinetId:null,typeCode:null,moveId:null,deviceCode:null,deviceName:null,deptId:null,cabinetCode:null,software:null,hardware:null,power:null,rssi:null,portCount:null,imei:null,imsi:null,network:null,online:null,operator:null,company:null,agent:null,phone:null,logonTime:null,host:null,port:null,trapIp:null,fsuCode:null},forms:{moveCode:"",file:""},total:0,listQuery:{siteCode:null,cabinetCode:null,deptId:null,deviceName:null,curPage:1,pageSize:10},listLoading:!0,list:null,deviceTypeList:[],deptIdList:[],siteCodeList:[],cabinetList:[],onlineOptions:[{value:0,label:this.$t("device.outLine")},{value:1,label:this.$t("device.onLine")}],rules:{file:[{required:!0,trigger:"change"}],typeCode:[{required:!0,message:this.$t("pSelect")+this.$t("device.typeCode"),trigger:"blur"}],deviceCode:[{required:!0,message:this.$t("pSelect")+this.$t("device.deviceCode"),trigger:"blur"}],deviceName:[{required:!0,message:this.$t("pSelect")+this.$t("device.deviceName"),trigger:"blur"}],deptId:[{required:!0,message:this.$t("pSelect")+this.$t("listQuery.deptId"),trigger:"blur"}],cabinetCode:[{required:!0,message:this.$t("pSelect")+this.$t("device.cabinetCode"),trigger:"blur"}],host:[{required:!0,message:this.$t("pEnter")+this.$t("device.host"),trigger:"blur"}],trapIp:[{required:!0,message:this.$t("pEnter")+this.$t("device.trapIp"),trigger:"blur"}],fsuCode:[{required:!0,message:this.$t("pEnter")+this.$t("device.fsuCode"),trigger:"blur"}],port:[{required:!0,message:this.$t("pEnter")+this.$t("device.port"),trigger:"blur"}],imei:[{required:!0,message:this.$t("pEnter")+"IMEI",trigger:"blur"}],imsi:[{required:!0,message:this.$t("pEnter")+"IMSI",trigger:"blur"}],agent:[{required:!0,message:this.$t("pEnter")+this.$t("device.agent"),trigger:"blur"}],phone:[{required:!0,validator:t,trigger:"blur"}]},pickerOptions0:{disabledDate:function(e){return e.getTime()>Date.now()-864e5}},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)},addMovesImport:function(e){var t=this;Object(l["g"])(e.file).then((function(){t.$refs.upload.clearFiles(),t.getList()})).catach((function(){t.$refs.upload.clearFiles()}))},handleFileSuccess:function(e){console.log(e,"handleFileSuccess"),200===e.status&&console.log(e,"200")},handleFileError:function(e){console.log(e,"err")},handleRemove:function(){this.forms.file=""},uploadFile:function(e){this.forms.file=e.file},updateMoveOidImport:function(){var e=this;this.$refs.forms.validate((function(t){t&&Object(l["t"])(e.forms).then((function(){e.uploadDialog=!1}))}))},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(s["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(l["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(l["o"])(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(l["f"])(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(l["s"])(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,deptId:e.row.deptId,moveId:e.row.moveId,cabinetCode:e.row.cabinetCode,typeCode:e.row.typeCode,software:e.row.software,hardware:e.row.hardware,power:e.row.power,rssi:e.row.rssi,portCount:e.row.portCount,imei:e.row.imei,imsi:e.row.imsi,network:e.row.network,online:e.row.online,operator:e.row.operator,company:e.row.company,agent:e.row.agent,phone:e.row.phone,logonTime:e.row.logonTime,host:e.row.host,port:e.row.port,trapIp:e.row.trapIp,fsuCode:e.row.fsuCode},this.dialogStatus="update",this.addDialog=!0,this.$nextTick((function(){t.$refs["form"].clearValidate()}))},handleUpload:function(e){var t=this;console.log(e,"scope"),this.forms={moveCode:e.row.deviceCode,file:""},this.uploadDialog=!0,this.$nextTick((function(){t.$refs["forms"].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(l["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(l["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(l["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("f0ca"),i("2877")),v=Object(h["a"])(m,n,a,!1,null,null,null);t["default"]=v.exports},f0ca:function(e,t,i){"use strict";i("22f3")}}]);
|
||
//# sourceMappingURL=chunk-4d7054f5.724766b6.js.map
|