2 lines
45 KiB
JavaScript
2 lines
45 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f4b4d28a"],{"0e8f":function(e,t,a){"use strict";a.d(t,"d",(function(){return o})),a.d(t,"e",(function(){return n})),a.d(t,"c",(function(){return l})),a.d(t,"a",(function(){return c})),a.d(t,"b",(function(){return d}));var i=a("b775"),s=a("4328"),r=a.n(s);function o(e){return Object(i["a"])({url:"user-service/dept/getDeptTreeList",method:"get",params:e})}function n(e){return Object(i["a"])({url:"user-service/dept/getDeptSubByDeptId",method:"get",params:e})}function l(e){var t=r.a.stringify(e);return Object(i["a"])({url:"user-service/dept/updateDept",method:"post",data:t})}function c(e){var t=r.a.stringify(e);return Object(i["a"])({url:"user-service/dept/saveDept",method:"post",data:t})}function d(e){return Object(i["a"])({headers:{"Content-Type":"application/json"},url:"user-service/dept/removeDept",method:"get",params:e})}},"14cb":function(e,t,a){"use strict";a("1a02")},"1a02":function(e,t,a){},"333d":function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"pagination-container"},[a("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)},s=[],r=(a("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,n=(a("14cb"),a("2877")),l=Object(n["a"])(o,i,s,!1,null,"4dfad654",null);t["a"]=l.exports},4381:function(e,t,a){"use strict";a("d3b7"),a("caad"),a("2532"),a("d9e2");var i=a("4360"),s={inserted:function(e,t){var a=t.value,s=i["a"].getters&&i["a"].getters.butPermission;if(console.log(s,"roles"),!(a&&a instanceof Array&&a.length>0))throw new Error("need roles! Like v-permission=\"['admin','editor']\"");var r=a,o=s.some((function(e){return r.includes(e)}));if(console.log(o,"hasPermission"),o)i["a"].state.user.permissionFlag[r]=!1;else{i["a"].state.user.permissionFlag[r]=!0,console.log(i["a"].state.user.permissionFlag[r],"permissionRoles");var n=document.createElement("div");n.style.cursor="not-allowed",n.style.display="inline-block",e.style.pointerEvents="none",e.parentNode.insertBefore(n,e),e.parentNode&&e.parentNode.removeChild(e),n.appendChild(e),console.log(e,"permissionRoles")}}},r=function(e){e.directive("permission",s)};window.Vue&&(window["permission"]=s,Vue.use(r)),s.install=r;t["a"]=s},"571f":function(e,t,a){"use strict";a.d(t,"e",(function(){return s})),a.d(t,"f",(function(){return r})),a.d(t,"d",(function(){return o})),a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return l})),a.d(t,"c",(function(){return c})),a.d(t,"g",(function(){return d}));var i=a("b775");function s(e){return Object(i["a"])({url:"device-service/site/getSiteList",method:"get",params:e})}function r(e){return Object(i["a"])({url:"device-service/site/getUnChoiceDevice",method:"get",params:e})}function o(e){return Object(i["a"])({url:"device-service/site/getHasChoiceDevice",method:"get",params:e})}function n(e){return Object(i["a"])({headers:{"Content-Type":"application/json"},url:"device-service/site/addSite",method:"post",data:e})}function l(e){return Object(i["a"])({headers:{"Content-Type":"application/json"},url:"device-service/site/addSiteDevice",method:"post",data:e})}function c(e){var t={siteById:e};return Object(i["a"])({url:"device-service/site/deleteSite",method:"delete",params:t})}function d(e){return Object(i["a"])({headers:{"Content-Type":"application/json"},url:"device-service/site/updateSite",method:"put",data:e})}},"61f7":function(e,t,a){"use strict";a.d(t,"c",(function(){return i})),a.d(t,"a",(function(){return s})),a.d(t,"b",(function(){return r}));a("ac1f"),a("00b4"),a("d9e2"),a("a9e3"),a("5319");function i(e,t,a){""===t?a(new Error("请输入手机号码")):/^[0-9-]+$/.test(t)?a():a(new Error("手机号码格式不对"))}function s(e){if(e||0===e){if(e.length>0){var t=e.replace(/(^\s*)|(\s*$)/g,"");return t||"--"}return e}return"--"}function r(e){if(!e)return"";var t=new Date(e),a=t.getFullYear(),i=t.getMonth()+1,s=t.getDate(),r=t.getHours(),n=t.getMinutes(),l=t.getSeconds();return a+"-"+o(i)+"-"+o(s)+"\n"+o(r)+":"+o(n)+":"+o(l)}function o(e){return e<10?"0"+e:e}},8209:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container gateway"},[a("div",{staticClass:"decorate"}),a("div",{staticClass:"filter-container"},[a("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"}}),a("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 a("el-option",{key:t.siteCode,attrs:{label:t.siteName,value:t.siteCode},nativeOn:{click:function(t){return e.handleFilter("siteCode")}}})})),1),a("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 a("el-option",{key:t.deviceId,attrs:{label:t.deviceName,value:t.deviceCode},nativeOn:{click:function(t){return e.handleFilter.apply(null,arguments)}}})})),1),a("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"}}),a("span",{staticClass:"btn-item",on:{click:e.handleFilter}},[a("i",{staticClass:"iconfont icon-sousuo"}),e._v(e._s(e.$t("btn.search")))]),a("span",{staticClass:"btn-item",on:{click:e.clearListQuery}},[a("i",{staticClass:"el-icon-refresh-left"}),e._v(" "+e._s(e.$t("btn.resetting")))]),a("span",{staticClass:"btn-item",on:{click:function(t){return e.handleCreate()}}},[a("i",{staticClass:"iconfont icon-a-"}),e._v(e._s(e.$t("btn.add")))]),a("div",{staticClass:"control-container"},["super"==e.userName?a("span",{staticClass:"btn-item"},[e._v(e._s(e.$t("menu.addToplevel")))]):e._e()])],1),a("div",{staticClass:"table-container"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],attrs:{data:e.data,"row-key":"deviceId","max-height":"580","default-expand-all":"","header-row-class-name":"table-header","row-class-name":"table-row","highlight-current-row":"","tree-props":{children:"children",hasChildren:"hasChildren"}},on:{"expand-change":e.getChange,"current-change":e.handleCurrentChange}},[a("el-table-column",{attrs:{prop:"assetNum",align:"left",width:"100",label:e.$t("device.assetNum")}}),a("el-table-column",{attrs:{prop:"deviceName",label:e.$t("device.deviceName"),width:"180",align:"center"}}),a("el-table-column",{attrs:{prop:"model",align:"left",width:"100",label:e.$t("device.model")}}),a("el-table-column",{attrs:{prop:"deptName",align:"left",label:e.$t("department.deptName")}}),a("el-table-column",{attrs:{prop:"siteName",align:"left",label:e.$t("device.siteName")}}),a("el-table-column",{attrs:{prop:"online",align:"left",width:"100",label:e.$t("device.online")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("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"))+" ")]}}])}),a("el-table-column",{attrs:{prop:"imei",align:"left",label:e.$t("device.imei")}}),a("el-table-column",{attrs:{prop:"softVer",align:"left",label:e.$t("device.softVer")}}),a("el-table-column",{attrs:{prop:"hardVer",align:"left",label:e.$t("device.hardVer")}}),a("el-table-column",{attrs:{label:e.$t("table.operate"),width:"400",align:"left"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticClass:"btnCancel",attrs:{title:e.$t("gateway.softVers")},on:{click:function(a){return e.updateSoft(t)}}},[a("i",{staticClass:"iconfont icon-ruanjianshengji"}),e._v(e._s(e.$t("gateway.softVers")))]),a("span",{staticClass:"btnCancel",attrs:{title:e.$t("gateway.hardVers")},on:{click:function(a){return e.updateHard(t)}}},[a("i",{staticClass:"iconfont icon-yingjianshengji"}),e._v(e._s(e.$t("gateway.hardVers")))]),a("span",{staticClass:"btnCancel",attrs:{title:e.$t("gateway.oid")},on:{click:function(a){return e.updateOID(t)}}},[a("i",{staticClass:"iconfont icon-yingjianshengji"}),e._v(e._s(e.$t("gateway.oid")))]),a("span",{staticClass:"btnCancel",attrs:{title:e.$t("table.update")},on:{click:function(a){return e.handleMore(t)}}},[a("i",{staticClass:"iconfont icon-gengduo"}),e._v(e._s(e.$t("table.more")))]),a("span",{staticClass:"btnCancel",attrs:{title:e.$t("table.update")},on:{click:function(a){return e.handleUpdate(t)}}},[a("i",{staticClass:"iconfont icon-bianji"}),e._v(e._s(e.$t("table.update")))]),a("span",{staticClass:"btnCancel delete",attrs:{title:e.$t("table.delete")},on:{click:function(a){return e.handleDelete(t)}}},[a("i",{staticClass:"iconfont icon-a--"}),e._v(e._s(e.$t("table.delete")))])]}}])})],1),a("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),a("el-dialog",{attrs:{"close-on-click-modal":!1,title:e.textMap[e.dialogStatus],visible:e.addDialog},on:{"update:visible":function(t){e.addDialog=t}}},[a("el-scrollbar",{staticStyle:{height:"100%"},attrs:{vertical:!0}},[a("el-form",{ref:"form",attrs:{rules:e.rules,model:e.form,inline:"","label-width":"155px"}},[a("span",[e._v(e._s(e.$t("cabinet.basicInfo")))]),a("el-divider"),a("el-form-item",{attrs:{label:e.$t("device.typeCode"),prop:"typeCode"}},[a("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 a("el-option",{key:e.typeCode,attrs:{label:e.typeName,value:e.typeCode}})})),1)],1),a("el-form-item",{attrs:{label:e.$t("device.deviceCode"),prop:"deviceCode"}},[a("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),a("el-form-item",{attrs:{label:e.$t("device.deviceName"),prop:"deviceName"}},[a("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),a("el-form-item",{attrs:{label:e.$t("device.model"),prop:"model"}},[a("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),a("el-form-item",{attrs:{label:e.$t("listQuery.deptId"),prop:"deptId"}},[a("el-cascader",{attrs:{"show-all-levels":!1,options:e.deptIdList,props:{checkStrictly:!0,emitPath:!1,props:{}},clearable:""},on:{change:e.getSitesList},model:{value:e.form.deptId,callback:function(t){e.$set(e.form,"deptId",t)},expression:"form.deptId"}})],1),a("el-form-item",{attrs:{label:e.$t("listQuery.siteCode"),prop:"siteCode"}},[a("el-select",{attrs:{placeholder:e.$t("listQuery.siteCode")},on:{change:e.getCabinetsList},model:{value:e.form.siteCode,callback:function(t){e.$set(e.form,"siteCode",t)},expression:"form.siteCode"}},e._l(e.sitesList,(function(e){return a("el-option",{key:e.siteCode,attrs:{label:e.siteName,value:e.siteCode}})})),1)],1),a("el-form-item",{attrs:{label:e.$t("device.cabinetCode"),prop:"cabinetCode"}},[a("el-select",{attrs:{placeholder:e.$t("listQuery.cabinetCode")},model:{value:e.form.cabinetCode,callback:function(t){e.$set(e.form,"cabinetCode",t)},expression:"form.cabinetCode"}},e._l(e.cabinetsList,(function(e){return a("el-option",{key:e.deviceId+"--",attrs:{label:e.deviceName,value:e.deviceCode}})})),1)],1),a("el-form-item",{attrs:{label:e.$t("device.factory"),prop:"factory"}},[a("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),a("el-form-item",{attrs:{label:e.$t("device.owner"),prop:"owner"}},[a("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),a("el-form-item",{attrs:{label:e.$t("device.director"),prop:"director"}},[a("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),a("el-form-item",{attrs:{label:e.$t("device.phone"),prop:"phone"}},[a("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),a("el-form-item",{attrs:{label:e.$t("device.sort"),prop:"sort"}},[a("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),a("div",[e._v(e._s(e.$t("gateway.IOInfo")))]),a("el-divider"),a("el-form-item",{attrs:{label:e.$t("device.serialNum"),prop:"serialNum"}},[a("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.serialNum"),maxlength:"20"},model:{value:e.form.serialNum,callback:function(t){e.$set(e.form,"serialNum",t)},expression:"form.serialNum"}})],1),a("el-form-item",{attrs:{label:e.$t("device.assetNum"),prop:"assetNum"}},[a("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.assetNum"),maxlength:"20"},model:{value:e.form.assetNum,callback:function(t){e.$set(e.form,"assetNum",t)},expression:"form.assetNum"}})],1),a("el-form-item",{attrs:{label:e.$t("gateway.netMethod"),prop:"netMethod"}},[a("el-select",{attrs:{placeholder:e.$t("pSelect")},model:{value:e.form.netMethod,callback:function(t){e.$set(e.form,"netMethod",t)},expression:"form.netMethod"}},e._l(e.deptType,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value,disabled:e.disabled}})})),1)],1),a("el-form-item",{attrs:{label:"IP",prop:"gateIp"}},[a("el-input",{attrs:{placeholder:e.$t("pEnter")+"IP",maxlength:"20"},model:{value:e.form.gateIp,callback:function(t){e.$set(e.form,"gateIp",t)},expression:"form.gateIp"}})],1),a("el-form-item",{attrs:{label:e.$t("gateway.gatePort"),prop:"gatePort"}},[a("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("gateway.gatePort"),maxlength:"20"},model:{value:e.form.gatePort,callback:function(t){e.$set(e.form,"gatePort",t)},expression:"form.gatePort"}})],1),a("el-form-item",{attrs:{label:e.$t("gateway.snmpPort"),prop:"snmpPort"}},[a("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("gateway.snmpPort"),maxlength:"20"},model:{value:e.form.snmpPort,callback:function(t){e.$set(e.form,"snmpPort",t)},expression:"form.snmpPort"}})],1),a("el-form-item",{attrs:{label:e.$t("gateway.operator"),prop:"operator"}},[a("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("gateway.operator"),maxlength:"20"},model:{value:e.form.operator,callback:function(t){e.$set(e.form,"operator",t)},expression:"form.operator"}})],1),a("el-form-item",{attrs:{label:e.$t("gateway.SIM"),prop:"sim"}},[a("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("gateway.SIM"),maxlength:"20"},model:{value:e.form.sim,callback:function(t){e.$set(e.form,"sim",t)},expression:"form.sim"}})],1),a("el-form-item",{attrs:{label:"IMEI",prop:"imei"}},[a("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),a("el-form-item",{attrs:{label:"IMSI",prop:"imsi"}},[a("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),a("el-form-item",{attrs:{label:e.$t("gateway.ratedPower"),prop:"ratedPower"}},[a("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("gateway.ratedPower"),maxlength:"20"},model:{value:e.form.ratedPower,callback:function(t){e.$set(e.form,"ratedPower",t)},expression:"form.ratedPower"}})],1),a("el-form-item",{attrs:{label:e.$t("gateway.company"),prop:"company"}},[a("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("gateway.company"),maxlength:"20"},model:{value:e.form.company,callback:function(t){e.$set(e.form,"company",t)},expression:"form.company"}})],1),a("el-form-item",{attrs:{label:e.$t("gateway.agent"),prop:"agent"}},[a("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("gateway.agent"),maxlength:"20"},model:{value:e.form.agent,callback:function(t){e.$set(e.form,"agent",t)},expression:"form.agent"}})],1),a("el-form-item",{attrs:{label:e.$t("gateway.mobile"),prop:"mobile"}},[a("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("gateway.mobile"),maxlength:"20"},model:{value:e.form.mobile,callback:function(t){e.$set(e.form,"mobile",t)},expression:"form.mobile"}})],1),a("el-form-item",{attrs:{label:e.$t("gateway.email"),prop:"email"}},[a("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("gateway.email"),maxlength:"20"},model:{value:e.form.email,callback:function(t){e.$set(e.form,"email",t)},expression:"form.email"}})],1),a("el-form-item",{attrs:{label:e.$t("gateway.weChat"),prop:"weChat"}},[a("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("gateway.weChat"),maxlength:"20"},model:{value:e.form.weChat,callback:function(t){e.$set(e.form,"weChat",t)},expression:"form.weChat"}})],1),a("el-form-item",{attrs:{label:e.$t("device.softVer")}},[a("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.softVer"),maxlength:"20"},model:{value:e.form.softVer,callback:function(t){e.$set(e.form,"softVer",t)},expression:"form.softVer"}})],1),a("el-form-item",{attrs:{label:e.$t("device.softVer")}},[a("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.softVer"),maxlength:"20"},model:{value:e.form.hardVer,callback:function(t){e.$set(e.form,"hardVer",t)},expression:"form.hardVer"}})],1)],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("span",{staticClass:"btn-item long",on:{click:function(t){e.addDialog=!1}}},[e._v(e._s(e.$t("btn.cancel")))]),a("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),a("el-dialog",{staticClass:"gatewayDialog",attrs:{"close-on-click-modal":!1,title:e.$t("cabinet.more"),visible:e.seeDialog},on:{"update:visible":function(t){e.seeDialog=t}}},[a("div",{staticClass:"infoBox",staticStyle:{"margin-bottom":"20px"}},[a("div",{staticClass:"title"},[a("i",{staticClass:"iconfont icon-biaoti"}),a("span",[e._v(e._s(e.$t("cabinet.basicInfo")))])]),a("el-row",{staticClass:"row"},[a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(this.$t("device.typeName")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.typeName)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(this.$t("device.deviceCode")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.deviceCode)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(this.$t("device.deviceName")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.deviceName)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(this.$t("device.model")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.model)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(this.$t("listQuery.deptId")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.deptName)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(this.$t("device.cabinetCode")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.cabinetCode)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(this.$t("device.factory")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.factory)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(this.$t("device.owner")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.owner)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(this.$t("device.director")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.director)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(this.$t("device.phone")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.phone)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(this.$t("device.serialNum")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.serialNum)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(this.$t("device.assetNum")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.assetNum)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(this.$t("gateway.netMethod")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.netMethod)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(" IP ")]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.gateIp)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(this.$t("gateway.gatePort")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.gatePort)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(this.$t("gateway.snmpPort")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.snmpPort)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(this.$t("gateway.operator")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.operator)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(this.$t("gateway.SIM")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.SIM)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(" IMEI ")]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.imei)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(" IMSI ")]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.imsi)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(this.$t("gateway.ratedPower")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.ratedPower)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(this.$t("gateway.company")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.company)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(this.$t("gateway.agent")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.agent)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(this.$t("gateway.mobile")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.mobile)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(this.$t("gateway.email")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.email)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(this.$t("gateway.weChat")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(this.form.weChat)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(this.$t("device.installTime")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(e._f("switchTimeFormat")(this.form.installTime))+" ")])],1)],1),a("div",{staticClass:"infoBox"},[a("div",{staticClass:"title"},[a("i",{staticClass:"iconfont icon-biaoti"}),a("span",[e._v(e._s(e.$t("gateway.monitoringInfo")))])]),a("el-row",{staticClass:"row"},[a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(e.$t("device.online")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(" "+e._s(1==e.form.online?e.$t("device.onLine"):e.$t("device.outLine"))+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(e.$t("device.softVer")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(e.form.softVer)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(e.$t("gateway.softTime")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(e._f("switchTimeFormat")(e.form.softTime))+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(e.$t("gateway.network")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(e.form.network)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(e.$t("device.hardVer")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(e.form.hardVer)+" ")]),a("el-col",{staticClass:"name",attrs:{span:3}},[e._v(e._s(e.$t("gateway.hardTime")))]),a("el-col",{staticClass:"value",attrs:{span:5}},[e._v(e._s(e._f("switchTimeFormat")(e.form.hardTime))+" ")])],1)],1)]),a("el-dialog",{staticClass:"uploadDialog",attrs:{"close-on-click-modal":!1,title:e.$t("gateway.oid"),visible:e.oidDialog},on:{"update:visible":function(t){e.oidDialog=t}}},[a("el-form",{ref:"oid",attrs:{rules:e.rules,model:e.forms,inline:"","label-width":"140px"}},[a("el-form-item",{attrs:{label:e.$t("device.upload"),prop:"file"}},[a("el-upload",{ref:"uploadoid",staticClass:"upload-demo",attrs:{action:"",drag:"","before-upload":e.beforeUploadOid,"on-success":e.handleFileSuccess,"on-error":e.handleFileError,"on-remove":e.handleRemove,"http-request":e.uploadOid}},[a("i",{staticClass:"el-icon-upload"})])],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("span",{staticClass:"btn-item long",on:{click:function(t){e.oidDialog=!1}}},[e._v(e._s(e.$t("btn.cancel")))]),a("span",{staticClass:"btn-item long",on:{click:e.updateGateoidImport}},[e._v(e._s(e.$t("btn.define")))])])],1),a("el-dialog",{staticClass:"uploadDialog",attrs:{"close-on-click-modal":!1,title:e.$t("gateway."+e.forms.type+"Vers"),visible:e.uploadDialog},on:{"update:visible":function(t){e.uploadDialog=t}}},[a("el-form",{ref:"forms",attrs:{rules:e.rules,model:e.forms,inline:"","label-width":"140px"}},["soft"==e.forms.type?a("el-form-item",{style:{width:"100%"},attrs:{label:e.$t("device.softVer"),prop:"version"}},[a("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.softVer"),maxlength:"20"},model:{value:e.forms.version,callback:function(t){e.$set(e.forms,"version",t)},expression:"forms.version"}})],1):e._e(),"hard"==e.forms.type?a("el-form-item",{style:{width:"100%"},attrs:{label:e.$t("device.hardVer"),prop:"version"}},[a("el-input",{attrs:{placeholder:e.$t("pEnter")+e.$t("device.hardVer"),maxlength:"20"},model:{value:e.forms.version,callback:function(t){e.$set(e.forms,"version",t)},expression:"forms.version"}})],1):e._e(),a("el-form-item",{attrs:{label:e.$t("device.upload")+"txt",prop:"zipFile"}},[a("el-upload",{ref:"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}},[a("i",{staticClass:"el-icon-upload"})])],1),a("el-form-item",{attrs:{label:e.$t("device.upload")+"zip",prop:"txtFile"}},[a("el-upload",{ref:"uploads",staticClass:"upload-demo",attrs:{action:"",drag:"","before-upload":e.beforeUploads,"on-success":e.handleFileSuccess,"on-error":e.handleFileError,"on-remove":e.handleRemoves,"http-request":e.uploadFiles}},[a("i",{staticClass:"el-icon-upload"})])],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("span",{staticClass:"btn-item long",on:{click:function(t){e.uploadDialog=!1}}},[e._v(e._s(e.$t("btn.cancel")))]),a("span",{staticClass:"btn-item long",on:{click:e.upImport}},[e._v(e._s(e.$t("btn.define")))])])],1)],1)},s=[],r=(a("d9e2"),a("ac1f"),a("00b4"),a("d81d"),a("d3b7"),a("159b"),a("4e82"),a("b0c0"),a("caad"),a("b775"));function o(e){return Object(r["a"])({url:"device-service/gate/addGatewayDevice",method:"post",data:e})}function n(e){return Object(r["a"])({url:"device-service/gate/getGatewayDeviceList",method:"get",params:e})}function l(e){return Object(r["a"])({url:"device-service/gate/deleteCabinet",method:"delete",params:e})}function c(e){return Object(r["a"])({url:"device-service/gate/updateGatewayDevice",method:"put",data:e})}function d(e){var t=new FormData;return t.append("zipFile",e.zipFile),t.append("txtFile",e.txtFile),t.append("deviceCode",e.deviceCode),t.append("version",e.version),Object(r["a"])({url:"device-service/gate/upgradeSoftGateway",method:"post",data:t})}function u(e){var t=new FormData;return t.append("file",e.file),t.append("gateCode",e.gateCode),Object(r["a"])({url:"device-service/import/updateGateOidImport",method:"post",data:t})}function p(e){var t=new FormData;return t.append("zipFile",e.zipFile),t.append("txtFile",e.txtFile),t.append("deviceCode",e.deviceCode),t.append("version",e.version),Object(r["a"])({url:"device-service/gate/upgradeHardGateway",method:"post",data:t})}var m=a("aa98"),f=a("0e8f"),v=a("571f"),h=a("4381"),g=a("333d"),b=a("61f7"),C={components:{Pagination:g["a"]},computed:{userName:function(){return this.$store.state.user.userName},deptId:function(){return this.$store.state.user.deptId}},filters:{switchTimeFormat:function(e){var t=Object(b["b"])(e);return t}},directives:{permission:h["a"]},data:function(){var e=this,t=function(t,a,i){""===a?i(new Error(e.$t("validate.phone"))):/^[0-9-]+$/.test(a)?i():i(new Error(e.$t("validate.phoneFormat")))};return{listLoading:!1,seeDialog:!1,uploadDialog:!1,oidDialog:!1,createStatus:!1,deviceTypeList:[{typeCode:"GATEWAY",typeId:18,typeName:"Gateway"}],deptIdList:[],deptType:[{value:"4/5G无线",label:"4/5G无线",disabled:!1},{value:"LAN/Wi-Fi",label:"LAN/Wi-Fi",disabled:!1}],textMap:{update:this.$t("table.update"),create:this.$t("table.create")},rules:{sort:[{required:!0,message:this.$t("pSelect")+this.$t("device.sort"),trigger:"blur"}],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:"change"}],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:"change"}],cabinetCode:[{required:!0,message:this.$t("pSelect")+this.$t("device.cabinetCode"),trigger:"blur"}],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"}],ratedPower:[{required:!0,message:this.$t("pEnter")+this.$t("gateway.ratedPower"),trigger:"blur"}],serialNum:[{required:!0,message:this.$t("pEnter")+this.$t("device.serialNum"),trigger:"blur"}],assetNum:[{required:!0,message:this.$t("pEnter")+this.$t("device.assetNum"),trigger:"blur"}],gateIp:[{required:!0,message:this.$t("pEnter")+"IP",trigger:"blur"}],netMethod:[{required:!0,message:this.$t("pSelect")+this.$t("gateway.netMethod"),trigger:"change"}],siteCode:[{required:!0,message:this.$t("pSelect")+this.$t("listQuery.siteCode"),trigger:"change"}],gatePort:[{required:!0,message:this.$t("pEnter")+this.$t("gateway.gatePort"),trigger:"blur"}],snmpPort:[{required:!0,message:this.$t("pEnter")+this.$t("gateway.snmpPort"),trigger:"blur"}],operator:[{required:!0,message:this.$t("pEnter")+this.$t("device.operator"),trigger:"blur"}],sim:[{required:!0,message:this.$t("pEnter")+this.$t("gateway.SIM"),trigger:"blur"}],imei:[{required:!0,message:this.$t("pEnter")+"IMEI",trigger:"blur"}],imsi:[{required:!0,message:this.$t("pEnter")+"IMSI",trigger:"blur"}],company:[{required:!0,message:this.$t("pEnter")+this.$t("device.company"),trigger:"blur"}],agent:[{required:!0,message:this.$t("pEnter")+this.$t("gateway.agent"),trigger:"blur"}],mobile:[{required:!0,validator:t,trigger:"blur"}],email:[{required:!0,message:this.$t("pEnter")+this.$t("gateway.email"),trigger:"blur"}],weChat:[{required:!0,message:this.$t("pEnter")+this.$t("gateway.weChat"),trigger:"blur"}],txtFile:[{required:!0,trigger:"change"}],zipFile:[{required:!0,trigger:"change"}],file:[{required:!0,trigger:"change"}],version:[{required:!0,message:this.$t("pEnter"),trigger:"blur"}]},dialogStatus:"",parentName:"",form:{gateId:null,deviceCode:null,ratedPower:null,serialNum:null,assetNum:null,installTime:null,netMethod:null,gatelp:null,gatePort:null,snmpPort:null,operator:null,sim:null,IMEI:null,imsi:null,company:null,agent:null,mobile:null,email:null,weChat:null,softVer:null,softTime:null,hardVer:null,hardTime:null,online:null,network:null,deviceld:null,deviceName:null,typeCode:null,cabinetCode:null,sort:null,deptld:null,factory:null,model:null,director:null,owner:null,phone:null},forms:{file:"",deviceode:"",version:"",type:"soft"},currentRow:null,addDialog:!1,total:0,listQuery:{deptId:null,siteCode:null,cabinetCode:null,deviceName:null,curPage:1,pageSize:10},data:[],cabinetList:[],siteCodeList:[],sitesList:[],cabinetsList:[],moveList:[]}},created:function(){this.getList(),this.getDeptList(),this.getSiteList(),this.getCabinetList()},methods:{getDeptList:function(){var e=this;Object(f["e"])().then((function(t){e.deptIdList=t.data&&e.getdeptIdList(t.data)}))},getSiteList:function(){var e=this;Object(v["e"])({deptId:this.listQuery.deptId}).then((function(t){e.siteCodeList=t.data.list}))},getCabinetList:function(){var e=this;Object(m["l"])({deptId:this.listQuery.deptId,siteCode:this.listQuery.siteCode}).then((function(t){e.cabinetList=t.data.list}))},getSitesList:function(){var e=this;Object(v["e"])({deptId:this.form.deptId}).then((function(t){e.sitesList=t.data.list,e.form.siteCode&&(e.form.siteCode="")}))},getCabinetsList:function(){var e=this;Object(m["l"])({deptId:this.form.deptId,siteCode:this.form.siteCode}).then((function(t){e.cabinetsList=t.data.list,e.form.cabinetCode&&(e.form.cabinetCode="")}))},getdeptIdList:function(e){var t=this;e.length||(e=[e]);var a=e.map((function(e){var a={};return e.subBeanList?(a.children=t.getdeptIdList(e.subBeanList),a.label=e.nodeBean.deptName,a.value=e.nodeBean.deptId,a):(a.label=e.nodeBean.deptName,a.value=e.nodeBean.deptId,a)}));return a},clearListQuery:function(){this.listQuery={deptId:null,siteCode:null,cabinetCode:null,deviceName:null,curPage:1,pageSize:10},this.getList()},getList:function(){var e=this;this.listLoading=!0,n(this.listQuery).then((function(t){e.listLoading=!1,e.data=t.data.list,e.total=t.data.totalRow}))},filterDeptList:function(e){var t=this,a=[];return e.forEach((function(e){var i=e;console.log(e),e&&(e.subList&&(i.children=t.filterDeptList(e.subList,!0)),e.id=e.deptId+1,a.push(i))})),a},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())},handleUpdate:function(e){var t=this;this.form=Object.assign({},e.row),this.form.imei=e.row.IMEI,this.form.sim=e.row.SIM,this.form.imsi=e.row.IMSI,this.dialogStatus="update",this.addDialog=!0,Object(v["e"])({deptId:this.form.deptId}).then((function(e){t.sitesList=e.data.list})),Object(m["l"])({deptId:this.form.deptId,siteCode:this.form.siteCode}).then((function(e){t.cabinetsList=e.data.list})),this.$nextTick((function(){t.$refs["form"].clearValidate()}))},updateData:function(){var e=this;this.$refs.form.validate((function(t){if(t){var a={device:{deviceCode:e.form.deviceCode,deviceName:e.form.deviceName,typeCode:e.form.typeCode,deptId:e.form.deptId,deviceId:e.form.deviceId,factory:e.form.factory,cabinetCode:e.form.cabinetCode,director:e.form.director,model:e.form.model,owner:e.form.owner,phone:e.form.phone,sort:e.form.sort},gateway:{agent:e.form.agent,assetNum:e.form.assetNum,company:e.form.company,deviceCode:e.form.deviceCode,email:e.form.email,gateId:e.form.gateId,gateIp:e.form.gateIp,gatePort:e.form.gatePort,hardVer:e.form.hardVer,imei:e.form.imei,imsi:e.form.imsi,mobile:e.form.mobile,netMethod:e.form.netMethod,network:e.form.network,operator:e.form.operator,ratedPower:e.form.ratedPower,serialNum:e.form.serialNum,sim:e.form.sim,snmpPort:e.form.snmpPort,softVer:e.form.softVer,weChat:e.form.weChat},siteCode:e.form.siteCode};c(a).then((function(){e.$notify({title:e.$t("title.success"),message:e.$t("title.updateSuccess"),type:"success",duration:3e3}),e.getList(),e.getDeptList(),e.addDialog=!1}))}}))},resetForm:function(){for(var e in this.form)this.form[e]=null;this.form.typeCode="GATEWAY"},handleMore:function(e){this.form=e.row,this.seeDialog=!0},handleCreate:function(){var e=this;this.resetForm(),this.addDialog=!0,this.dialogStatus="create",this.$nextTick((function(){e.$refs["form"].clearValidate()}))},createData:function(){var e=this;this.createStatus||this.$refs.form.validate((function(t){if(t){var a={device:{deviceCode:e.form.deviceCode,deviceName:e.form.deviceName,typeCode:e.form.typeCode,deptId:e.form.deptId,factory:e.form.factory,cabinetCode:e.form.cabinetCode,director:e.form.director,model:e.form.model,owner:e.form.owner,phone:e.form.phone,sort:e.form.sort},gateway:{agent:e.form.agent,assetNum:e.form.assetNum,company:e.form.company,deviceCode:e.form.deviceCode,email:e.form.email,gateId:e.form.gateId,gateIp:e.form.gateIp,gatePort:e.form.gatePort,hardVer:e.form.hardVer,imei:e.form.imei,imsi:e.form.imsi,mobile:e.form.mobile,netMethod:e.form.netMethod,network:e.form.network,operator:e.form.operator,ratedPower:e.form.ratedPower,serialNum:e.form.serialNum,sim:e.form.sim,snmpPort:e.form.snmpPort,softVer:e.form.softVer,weChat:e.form.weChat},siteCode:e.form.siteCode};o(a).then((function(){e.createStatus=!1,e.$notify({title:e.$t("title.success"),message:e.$t("title.addSuccess"),type:"success",duration:3e3}),e.parentName="",e.currentRow=null,e.getList(),e.getDeptList(),e.addDialog=!1})).catch((function(){e.createStatus=!1}))}}))},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(){l({deviceCode:e.row.deviceCode}).then((function(){t.getList(),t.$notify({title:t.$t("title.success"),message:t.$t("title.deleteSuccess"),type:"success",duration:3e3})}))}))},handleCurrentChange:function(e){this.currentRow=e||null},getChange:function(e,t){console.log(e,t)},beforeUploadOid:function(e){console.log(e,"file");var t=["xlsx","xls"],a=e.name.substring(e.name.lastIndexOf(".")+1,e.name.length);return t.includes(a)?(console.log(t.includes(a)),!0):(this.$message.info("文件格式不对,仅限xls和xlsx"),!1)},beforeUpload:function(e){console.log(e,"file");var t=["txt","sh","tar"],a=e.name.substring(e.name.lastIndexOf(".")+1,e.name.length);return t.includes(a)?(console.log(t.includes(a)),!0):(this.$message.info("文件格式不对,仅限txt文件"),!1)},beforeUploads:function(e){console.log(e,"file");var t=["zip","sh","tar"],a=e.name.substring(e.name.lastIndexOf(".")+1,e.name.length);return t.includes(a)?(console.log(t.includes(a)),!0):(this.$message.info("文件格式不对,仅限zip文件"),!1)},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.txtFile=""},handleRemoves:function(){this.forms.zipFile=""},uploadOid:function(e){this.forms.file=e.file},uploadFile:function(e){this.forms.txtFile=e.file},uploadFiles:function(e){this.forms.zipFile=e.file},updateSoft:function(e){var t=this;this.forms={deviceCode:e.row.deviceCode,type:"soft",version:"",txtFile:"",zipFile:""},this.uploadDialog=!0,this.$nextTick((function(){t.$refs["forms"].clearValidate(),t.$refs.upload.clearFiles(),t.$refs.uploads.clearFiles()}))},updateHard:function(e){var t=this;this.forms={deviceCode:e.row.deviceCode,type:"hard",version:"",txtFile:"",zipFile:""},this.uploadDialog=!0,this.$nextTick((function(){t.$refs["forms"].clearValidate(),t.$refs.upload.clearFiles(),t.$refs.uploads.clearFiles()}))},updateOID:function(e){var t=this;this.forms={gateCode:e.row.deviceCode,file:""},this.oidDialog=!0,this.$nextTick((function(){t.$refs.oid.clearValidate(),t.$refs.uploadoid.clearFiles()}))},upImport:function(){var e=this;this.$refs.forms.validate((function(t){t&&("soft"==e.forms.type?e.upgradeSoftGateway():e.upgradeHardGateway())}))},updateGateoidImport:function(){var e=this;this.$refs.oid.validate((function(t){t&&u(e.forms).then((function(){e.oidDialog=!1}))}))},upgradeSoftGateway:function(){var e=this;d(this.forms).then((function(){e.uploadDialog=!1}))},upgradeHardGateway:function(){var e=this;p(this.forms).then((function(){e.uploadDialog=!1}))}}},$=C,y=(a("b78e"),a("2877")),_=Object(y["a"])($,i,s,!1,null,"2d35e2a1",null);t["default"]=_.exports},aa98:function(e,t,a){"use strict";a.d(t,"l",(function(){return s})),a.d(t,"a",(function(){return r})),a.d(t,"c",(function(){return o})),a.d(t,"q",(function(){return n})),a.d(t,"h",(function(){return l})),a.d(t,"i",(function(){return c})),a.d(t,"m",(function(){return d})),a.d(t,"p",(function(){return u})),a.d(t,"b",(function(){return p})),a.d(t,"o",(function(){return m})),a.d(t,"f",(function(){return f})),a.d(t,"s",(function(){return v})),a.d(t,"g",(function(){return h})),a.d(t,"t",(function(){return g})),a.d(t,"n",(function(){return b})),a.d(t,"e",(function(){return C})),a.d(t,"d",(function(){return $})),a.d(t,"r",(function(){return y})),a.d(t,"j",(function(){return _})),a.d(t,"k",(function(){return w}));var i=a("b775");function s(e){return Object(i["a"])({url:"device-service/cabinet/getCabinetList",method:"get",params:e})}function r(e){return Object(i["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(i["a"])({headers:{"Content-Type":"multipart/form-data"},url:"device-service/import/addCabinetsImport",method:"post",data:t})}function n(e){return Object(i["a"])({headers:{"Content-Type":"application/json"},url:"device-service/cabinet/updateCabinet",method:"put",data:e})}function l(e){var t={cabinetCode:e};return Object(i["a"])({url:"device-service/cabinet/deleteCabinet",method:"delete",params:t})}function c(e){var t={cabinetCodes:e};return Object(i["a"])({url:"device-service/cabinet/deleteCabinetList",method:"delete",params:t})}function d(e){return Object(i["a"])({url:"device-service/cabinet/getInsideDeviceByCabinetCode",method:"get",params:e})}function u(e){return Object(i["a"])({url:"device-service/cabinet/getUnCheckDeviceByDeptId",method:"get",params:e})}function p(e){return Object(i["a"])({headers:{"Content-Type":"application/json"},url:"device-service/cabinet/addCabinetInsideDevice",method:"post",data:e})}function m(e){return Object(i["a"])({url:"device-service/inside/getMoveDeviceList",method:"get",params:e})}function f(e){return Object(i["a"])({headers:{"Content-Type":"application/json"},url:"device-service/inside/addInsideMove",method:"post",data:e})}function v(e){return Object(i["a"])({headers:{"Content-Type":"application/json"},url:"device-service/inside/updateMoveDevice",method:"put",data:e})}function h(e){var t=new FormData;return t.append("file",e),Object(i["a"])({headers:{"Content-Type":"multipart/form-data"},url:"device-service/import/addMovesImport",method:"post",data:t})}function g(e){var t=new FormData;return t.append("file",e.file),t.append("moveCode",e.moveCode),Object(i["a"])({headers:{"Content-Type":"multipart/form-data"},url:"device-service/import/updateMoveOidImport",method:"post",data:t})}function b(e){return Object(i["a"])({url:"device-service/inside/getInsideDeviceList",method:"get",params:e})}function C(e){return Object(i["a"])({headers:{"Content-Type":"application/json"},url:"device-service/inside/addInsideDevice",method:"post",data:e})}function $(e){var t=new FormData;return t.append("file",e),Object(i["a"])({headers:{"Content-Type":"multipart/form-data"},url:"device-service/import/addDevicesImport",method:"post",data:t})}function y(e){return Object(i["a"])({headers:{"Content-Type":"application/json"},url:"device-service/inside/updateInsideDevice",method:"put",data:e})}function _(e){var t={deviceCode:e};return Object(i["a"])({url:"device-service/inside/deleteCabinet",method:"delete",params:t})}function w(e){var t={deviceCodes:e};return Object(i["a"])({url:"device-service/inside/deleteInsideDeviceList",method:"delete",params:t})}},b78e:function(e,t,a){"use strict";a("eaec")},eaec:function(e,t,a){}}]);
|
||
//# sourceMappingURL=chunk-f4b4d28a.62249e82.js.map
|