app.5ae097f3.js 50 KB

12
  1. (function(e){function t(t){for(var c,r,u=t[0],i=t[1],o=t[2],d=0,s=[];d<u.length;d++)r=u[d],Object.prototype.hasOwnProperty.call(l,r)&&l[r]&&s.push(l[r][0]),l[r]=0;for(c in i)Object.prototype.hasOwnProperty.call(i,c)&&(e[c]=i[c]);b&&b(t);while(s.length)s.shift()();return a.push.apply(a,o||[]),n()}function n(){for(var e,t=0;t<a.length;t++){for(var n=a[t],c=!0,u=1;u<n.length;u++){var i=n[u];0!==l[i]&&(c=!1)}c&&(a.splice(t--,1),e=r(r.s=n[0]))}return e}var c={},l={app:0},a=[];function r(t){if(c[t])return c[t].exports;var n=c[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=c,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)r.d(n,c,function(t){return e[t]}.bind(null,c));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/";var u=window["webpackJsonp"]=window["webpackJsonp"]||[],i=u.push.bind(u);u.push=t,u=u.slice();for(var o=0;o<u.length;o++)t(u[o]);var b=i;a.push([0,"chunk-vendors"]),n()})({0:function(e,t,n){e.exports=n("56d7")},"047d":function(e,t,n){"use strict";n("3028")},"0feb":function(e,t,n){"use strict";n("2ece")},1:function(e,t){},"18c2":function(e,t,n){},1993:function(e,t,n){},2413:function(e,t,n){},"2ece":function(e,t,n){},3028:function(e,t,n){},"56d7":function(e,t,n){"use strict";n.r(t);n("e260"),n("e6cf"),n("cca6"),n("a79d");var c=n("7a23"),l=n("3fd4"),a=(n("18c2"),{id:"app"});function r(e,t){var n=Object(c["N"])("router-view");return Object(c["E"])(),Object(c["j"])("div",a,[Object(c["n"])(n)])}n("0feb");var u=n("d959"),i=n.n(u);const o={},b=i()(o,[["render",r]]);var d=b,s=n("6c02"),p=Object(c["gb"])("data-v-1f087cb8");Object(c["H"])("data-v-1f087cb8");var m={class:"zy-template"},j={class:"login"},f=Object(c["n"])("div",{class:"login__left"},null,-1),O={class:"login__right"},g={class:"login__right__box"},h=Object(c["n"])("h1",null,"登录您的账户",-1),v=Object(c["m"])("登录");Object(c["F"])();var y=p((function(e,t,n,l,a,r){var u=Object(c["N"])("el-input"),i=Object(c["N"])("el-form-item"),o=Object(c["N"])("el-button"),b=Object(c["N"])("el-form");return Object(c["E"])(),Object(c["j"])("div",m,[Object(c["n"])("div",j,[f,Object(c["n"])("div",O,[Object(c["n"])("div",g,[h,Object(c["n"])(b,{ref:"loginForm",model:a.form,"label-width":"60px",rules:a.rules},{default:p((function(){return[Object(c["n"])(i,{label:"账号:",prop:"username"},{default:p((function(){return[Object(c["n"])(u,{modelValue:a.form.username,"onUpdate:modelValue":t[1]||(t[1]=function(e){return a.form.username=e})},null,8,["modelValue"])]})),_:1}),Object(c["n"])(i,{label:"密码:",prop:"password"},{default:p((function(){return[Object(c["n"])(u,{type:"password",modelValue:a.form.password,"onUpdate:modelValue":t[2]||(t[2]=function(e){return a.form.password=e})},null,8,["modelValue"])]})),_:1}),Object(c["n"])(o,{type:"primary",onClick:t[3]||(t[3]=function(e){return r.submitForm("loginForm")})},{default:p((function(){return[v]})),_:1})]})),_:1},8,["model","rules"])])])])])})),_=(n("ac1f"),n("5319"),{setToken:function(e){window.localStorage.setItem("BMS_TOKEN",JSON.stringify(e))},getToken:function(){return window.localStorage.getItem("BMS_TOKEN")},removeToken:function(){window.localStorage.removeItem("BMS_TOKEN")}}),w=_,k={data:function(){return{form:{username:"",password:""},rules:{username:[{required:!0,message:"请输入用户名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}]}}},methods:{submitForm:function(e){var t=this;this.$refs[e].validate((function(e){if(!e)return!1;t.$http.Post(t.$global.login,t.form).then((function(e){w.setToken(e.data),t.$router.replace("/")}))}))}}};n("fa4b");const N=i()(k,[["render",y],["__scopeId","data-v-1f087cb8"]]);var z=N,V=n("a408"),x=n.n(V),C=Object(c["gb"])("data-v-00ea7316");Object(c["H"])("data-v-00ea7316");var q=Object(c["n"])("div",{class:"logo"},[Object(c["n"])("img",{src:x.a,alt:"logo"})],-1),L=Object(c["n"])("i",{class:"el-icon-monitor"},null,-1),R=Object(c["m"])("设备管理"),$=Object(c["m"])("位置分布"),F=Object(c["m"])("设备列表-路牌"),P=Object(c["m"])("设备列表-普适型"),D=Object(c["n"])("i",{class:"el-icon-monitor"},null,-1),U=Object(c["m"])("设备监控"),I=Object(c["m"])("MQTT消息日志"),G=Object(c["n"])("i",{class:"el-icon-setting"},null,-1),E=Object(c["m"])("系统设置"),T=Object(c["m"])("用户管理"),A=Object(c["m"])("设备组管理"),S={class:"dropdown"},M={class:"el-dropdown-link"},H=Object(c["n"])("i",{class:"el-icon-arrow-down el-icon--right"},null,-1),B=Object(c["m"])("退出登录");Object(c["F"])();var Z=C((function(e,t,n,l,a,r){var u=Object(c["N"])("el-menu-item"),i=Object(c["N"])("router-link"),o=Object(c["N"])("el-submenu"),b=Object(c["N"])("el-menu"),d=Object(c["N"])("el-aside"),s=Object(c["N"])("el-dropdown-item"),p=Object(c["N"])("el-dropdown-menu"),m=Object(c["N"])("el-dropdown"),j=Object(c["N"])("el-header"),f=Object(c["N"])("router-view"),O=Object(c["N"])("el-main"),g=Object(c["N"])("el-container");return Object(c["E"])(),Object(c["j"])(g,{class:"container"},{default:C((function(){return[Object(c["n"])(d,{width:"200px"},{default:C((function(){return[q,Object(c["n"])(b,{"default-active":"1","background-color":"#141B2E","text-color":"#E4ECFF"},{default:C((function(){return[Object(c["n"])(o,{index:"1"},{title:C((function(){return[L,R]})),default:C((function(){return[Object(c["n"])(i,{to:"/map/lp"},{default:C((function(){return[Object(c["n"])(u,{index:"1-1"},{default:C((function(){return[$]})),_:1})]})),_:1}),Object(c["n"])(i,{to:"/devices/lp"},{default:C((function(){return[Object(c["n"])(u,{index:"1-2"},{default:C((function(){return[F]})),_:1})]})),_:1}),Object(c["n"])(i,{to:"/devices/ubi"},{default:C((function(){return[Object(c["n"])(u,{index:"1-3"},{default:C((function(){return[P]})),_:1})]})),_:1})]})),_:1}),Object(c["n"])(o,{index:"2"},{title:C((function(){return[D,U]})),default:C((function(){return[Object(c["n"])(i,{to:"/logs"},{default:C((function(){return[Object(c["n"])(u,{index:"2-1"},{default:C((function(){return[I]})),_:1})]})),_:1})]})),_:1}),Object(c["n"])(o,{index:"3"},{title:C((function(){return[G,E]})),default:C((function(){return[Object(c["n"])(i,{to:"/users"},{default:C((function(){return[Object(c["n"])(u,{index:"3-1"},{default:C((function(){return[T]})),_:1})]})),_:1}),Object(c["n"])(i,{to:"/groups"},{default:C((function(){return[Object(c["n"])(u,{index:"3-2"},{default:C((function(){return[A]})),_:1})]})),_:1})]})),_:1})]})),_:1})]})),_:1}),Object(c["n"])(g,null,{default:C((function(){return[Object(c["n"])(j,{class:"header",style:{height:"50px"}},{default:C((function(){return[Object(c["n"])("div",S,[Object(c["n"])(m,{trigger:"click"},{dropdown:C((function(){return[Object(c["n"])(p,null,{default:C((function(){return[Object(c["n"])(s,{onClick:r.logout},{default:C((function(){return[B]})),_:1},8,["onClick"])]})),_:1})]})),default:C((function(){return[Object(c["n"])("span",M,[Object(c["m"])(Object(c["R"])(a.nickname),1),H])]})),_:1})])]})),_:1}),Object(c["n"])(O,null,{default:C((function(){return[Object(c["n"])(f,null,{default:C((function(e){var t=e.Component;return[(Object(c["E"])(),Object(c["j"])(c["c"],null,[(Object(c["E"])(),Object(c["j"])(Object(c["P"])(t)))],1024))]})),_:1})]})),_:1})]})),_:1})]})),_:1})})),J={data:function(){return{nickname:"管理员"}},mounted:function(){this.initToken()},methods:{initToken:function(){var e=this;this.$http.Get(this.$global.verify,{}).then((function(t){var n=JSON.parse(w.getToken());e.nickname=n.nickname}))},logout:function(){var e=this;this.$http.Get(this.$global.logout,{}).then((function(t){e.$router.replace("/login"),w.removeToken()}))}}};n("047d");const K=i()(J,[["render",Z],["__scopeId","data-v-00ea7316"]]);var X=K,Y={class:"zy-template"},Q=Object(c["n"])("div",{class:"zy-main-title"},"MQTT消息日志",-1),W={class:"zy-module"},ee=Object(c["m"])("查询"),te={class:"zy-module"};function ne(e,t,n,l,a,r){var u=Object(c["N"])("el-input"),i=Object(c["N"])("el-form-item"),o=Object(c["N"])("el-option"),b=Object(c["N"])("el-select"),d=Object(c["N"])("el-button"),s=Object(c["N"])("el-form"),p=Object(c["N"])("el-table-column"),m=Object(c["N"])("el-tag"),j=Object(c["N"])("el-popover"),f=Object(c["N"])("el-table"),O=Object(c["N"])("el-pagination");return Object(c["E"])(),Object(c["j"])("div",Y,[Q,Object(c["n"])("div",W,[Object(c["n"])(s,{ref:"form",model:a.query,"label-width":"60px"},{default:Object(c["cb"])((function(){return[Object(c["n"])(i,{label:"设备码:",class:"zy-search-form-item"},{default:Object(c["cb"])((function(){return[Object(c["n"])(u,{modelValue:a.query.openNum,"onUpdate:modelValue":t[1]||(t[1]=function(e){return a.query.openNum=e}),size:"mini",clearable:""},null,8,["modelValue"])]})),_:1}),Object(c["n"])(i,{label:"类型:",class:"zy-search-form-item"},{default:Object(c["cb"])((function(){return[Object(c["n"])(b,{modelValue:a.query.type,"onUpdate:modelValue":t[2]||(t[2]=function(e){return a.query.type=e}),size:"mini",value:"",placeholder:" ",clearable:""},{default:Object(c["cb"])((function(){return[Object(c["n"])(o,{value:"0",label:"服务器接收"}),Object(c["n"])(o,{value:"1",label:"服务器发送"})]})),_:1},8,["modelValue"])]})),_:1}),Object(c["n"])(i,{label:"指令:",class:"zy-search-form-item"},{default:Object(c["cb"])((function(){return[Object(c["n"])(b,{modelValue:a.query.m,"onUpdate:modelValue":t[3]||(t[3]=function(e){return a.query.m=e}),size:"mini",value:"",placeholder:" ",clearable:""},{default:Object(c["cb"])((function(){return[(Object(c["E"])(!0),Object(c["j"])(c["b"],null,Object(c["L"])(a.mList,(function(e){return Object(c["E"])(),Object(c["j"])(o,{value:e.code,label:e.remark},null,8,["value","label"])})),256))]})),_:1},8,["modelValue"])]})),_:1}),Object(c["n"])(d,{type:"primary",size:"mini",onClick:r.submit},{default:Object(c["cb"])((function(){return[ee]})),_:1},8,["onClick"])]})),_:1},8,["model"])]),Object(c["n"])("div",te,[Object(c["n"])(f,{data:a.page.records,"header-cell-class-name":"zy-table-header-cell","cell-class-name":"zy-table-cell",stripe:""},{default:Object(c["cb"])((function(){return[Object(c["n"])(p,{prop:"openNum",label:"设备ID",width:"150"}),Object(c["n"])(p,{label:"类型",width:"80"},{default:Object(c["cb"])((function(e){return[Object(c["m"])(Object(c["R"])(0==e.row.type?"接收":"发送"),1)]})),_:1}),Object(c["n"])(p,{label:"指令",width:"80"},{default:Object(c["cb"])((function(e){return[Object(c["n"])(j,{placement:"bottom",width:120,trigger:"click",content:e.row.remark},{reference:Object(c["cb"])((function(){return[Object(c["n"])(m,{style:{cursor:"pointer"}},{default:Object(c["cb"])((function(){return[Object(c["m"])(Object(c["R"])(e.row.m),1)]})),_:2},1024)]})),_:2},1032,["content"])]})),_:1}),Object(c["n"])(p,{prop:"content",label:"内容","min-width":"500"}),Object(c["n"])(p,{prop:"createTime",label:"时间",width:"180"})]})),_:1},8,["data"]),Object(c["n"])(O,{class:"zy-table-pagination",background:"",layout:"prev, pager, next","current-page":a.page.current,total:a.page.total,"page-size":a.page.size,onCurrentChange:r.pagination},null,8,["current-page","total","page-size","onCurrentChange"])])])}var ce={data:function(){return{query:{openNum:"",type:null,m:null},mList:null,page:{current:1,size:20}}},mounted:function(){this.getAllInstruction(),this.getListPage()},methods:{submit:function(){var e={current:1,size:this.page.size,openNum:this.query.openNum,type:this.query.type,m:this.query.m};this.getListPage(e)},pagination:function(e){var t={current:e,size:this.page.size,openNum:this.query.openNum,type:this.query.type,m:this.query.m};this.getListPage(t)},getListPage:function(e){var t=this;this.$http.Post(this.$global.logs.listPage,e).then((function(e){t.page=e.data,console.log(e.data)}))},getAllInstruction:function(){var e=this;this.$http.Get(this.$global.logs.instructions,{}).then((function(t){e.mList=t.data,console.log(t.data)}))}}};const le=i()(ce,[["render",ne]]);var ae=le;n("b0c0");Object(c["H"])("data-v-4d6459ae");Object(c["F"])();var re=Object(c["gb"])("data-v-25f9e008");Object(c["H"])("data-v-25f9e008");var ue={class:"zy-template"},ie=Object(c["n"])("div",{class:"zy-main-title"},"设备组管理",-1),oe={class:"zy-module"},be=Object(c["m"])("查询"),de={class:"zy-module"},se=Object(c["m"])("增加"),pe=Object(c["m"])("编辑"),me={class:"dialog-footer"},je=Object(c["m"])("取 消"),fe=Object(c["m"])("提 交"),Oe={class:"dialog-footer"},ge=Object(c["m"])("取 消"),he=Object(c["m"])("提 交");Object(c["F"])();var ve=re((function(e,t,n,l,a,r){var u=Object(c["N"])("el-input"),i=Object(c["N"])("el-form-item"),o=Object(c["N"])("el-button"),b=Object(c["N"])("el-form"),d=Object(c["N"])("el-table-column"),s=Object(c["N"])("el-table"),p=Object(c["N"])("el-pagination"),m=Object(c["N"])("el-option"),j=Object(c["N"])("el-select"),f=Object(c["N"])("el-dialog");return Object(c["E"])(),Object(c["j"])("div",ue,[ie,Object(c["n"])("div",oe,[Object(c["n"])(b,{model:a.query,"label-width":"80px"},{default:re((function(){return[Object(c["n"])(i,{label:"关键字",class:"zy-search-form-item"},{default:re((function(){return[Object(c["n"])(u,{modelValue:a.query.name,"onUpdate:modelValue":t[1]||(t[1]=function(e){return a.query.name=e}),size:"mini",placeholder:"编号/名称/备注",clearable:""},null,8,["modelValue"])]})),_:1}),Object(c["n"])(o,{type:"primary",size:"mini",onClick:r.submit},{default:re((function(){return[be]})),_:1},8,["onClick"])]})),_:1},8,["model"])]),Object(c["n"])("div",de,[Object(c["n"])(o,{type:"primary",size:"small",style:{"margin-bottom":"20px"},onClick:t[2]||(t[2]=function(e){return a.addDialog=!0})},{default:re((function(){return[se]})),_:1}),Object(c["n"])(s,{data:a.page.records,"max-height":"800",stripe:"",size:"small","header-cell-class-name":"zy-table-header-cell","cell-class-name":"zy-table-cell"},{default:re((function(){return[Object(c["n"])(d,{prop:"code",label:"设备组编号",width:"100"}),Object(c["n"])(d,{prop:"type",label:"所属设备类型",width:"100"}),Object(c["n"])(d,{prop:"name",label:"设备组名称",width:"120"}),Object(c["n"])(d,{prop:"item",label:"所属项目",width:"150"}),Object(c["n"])(d,{label:"备注","min-width":"500"},{default:re((function(e){return[Object(c["m"])(Object(c["R"])(e.row.remark),1)]})),_:1}),Object(c["n"])(d,{prop:"createTime",label:"创建时间",width:"180"}),Object(c["n"])(d,{label:"操作",width:"100","min-width":"10%"},{default:re((function(e){return[Object(c["n"])(o,{onClick:function(t){return r.handleUpdate(e.row)},type:"text",size:"small"},{default:re((function(){return[pe]})),_:2},1032,["onClick"])]})),_:1})]})),_:1},8,["data"]),Object(c["n"])(p,{class:"zy-table-pagination",background:"",layout:"prev, pager, next","current-page":a.page.current,total:a.page.total,"page-size":a.page.size,onCurrentChange:r.pagination},null,8,["current-page","total","page-size","onCurrentChange"])]),Object(c["n"])(f,{title:"添加设备组",modelValue:a.addDialog,"onUpdate:modelValue":t[9]||(t[9]=function(e){return a.addDialog=e}),width:"500px"},{footer:re((function(){return[Object(c["n"])("span",me,[Object(c["n"])(o,{onClick:t[7]||(t[7]=function(e){return a.addDialog=!1})},{default:re((function(){return[je]})),_:1}),Object(c["n"])(o,{type:"primary",onClick:t[8]||(t[8]=function(e){return r.addSubmit("addForm")})},{default:re((function(){return[fe]})),_:1})])]})),default:re((function(){return[Object(c["n"])(b,{ref:"addForm",model:a.addForm,"label-width":"100px",rules:a.rules},{default:re((function(){return[Object(c["n"])(i,{label:"设备组编号:",prop:"code"},{default:re((function(){return[Object(c["n"])(u,{modelValue:a.addForm.code,"onUpdate:modelValue":t[3]||(t[3]=function(e){return a.addForm.code=e}),maxlength:"30",placeholder:"不可重复"},null,8,["modelValue"])]})),_:1}),Object(c["n"])(i,{label:"设备组名称:"},{default:re((function(){return[Object(c["n"])(u,{modelValue:a.addForm.name,"onUpdate:modelValue":t[4]||(t[4]=function(e){return a.addForm.name=e}),maxlength:"30"},null,8,["modelValue"])]})),_:1}),Object(c["n"])(i,{label:"设备类型:",prop:"type"},{default:re((function(){return[Object(c["n"])(j,{modelValue:a.addForm.type,"onUpdate:modelValue":t[5]||(t[5]=function(e){return a.addForm.type=e}),size:"mini",placeholder:"请选择"},{default:re((function(){return[Object(c["n"])(m,{label:"普适型",value:"gnss"}),Object(c["n"])(m,{label:"路牌",value:"lupai"})]})),_:1},8,["modelValue"])]})),_:1}),Object(c["n"])(i,{label:"备注:"},{default:re((function(){return[Object(c["n"])(u,{type:"textarea",modelValue:a.addForm.remark,"onUpdate:modelValue":t[6]||(t[6]=function(e){return a.addForm.remark=e}),maxlength:"100"},null,8,["modelValue"])]})),_:1})]})),_:1},8,["model","rules"])]})),_:1},8,["modelValue"]),Object(c["n"])(f,{title:"修改设备组",modelValue:a.updateDialog,"onUpdate:modelValue":t[16]||(t[16]=function(e){return a.updateDialog=e}),width:"500px"},{footer:re((function(){return[Object(c["n"])("span",Oe,[Object(c["n"])(o,{onClick:t[14]||(t[14]=function(e){return a.updateDialog=!1})},{default:re((function(){return[ge]})),_:1}),Object(c["n"])(o,{type:"primary",onClick:t[15]||(t[15]=function(e){return r.updateSubmit("updateForm")})},{default:re((function(){return[he]})),_:1})])]})),default:re((function(){return[Object(c["n"])(b,{ref:"updateForm",model:a.updateForm,"label-width":"100px",rules:a.rules},{default:re((function(){return[Object(c["n"])(i,{label:"设备组编号:",prop:"code"},{default:re((function(){return[Object(c["n"])(u,{modelValue:a.updateForm.code,"onUpdate:modelValue":t[10]||(t[10]=function(e){return a.updateForm.code=e}),maxlength:"30",placeholder:"不可重复"},null,8,["modelValue"])]})),_:1}),Object(c["n"])(i,{label:"设备组名称:"},{default:re((function(){return[Object(c["n"])(u,{modelValue:a.updateForm.name,"onUpdate:modelValue":t[11]||(t[11]=function(e){return a.updateForm.name=e}),maxlength:"30"},null,8,["modelValue"])]})),_:1}),Object(c["n"])(i,{label:"设备类型:",prop:"type"},{default:re((function(){return[Object(c["n"])(j,{modelValue:a.updateForm.type,"onUpdate:modelValue":t[12]||(t[12]=function(e){return a.updateForm.type=e}),size:"mini",placeholder:"请选择"},{default:re((function(){return[Object(c["n"])(m,{label:"普适型",value:"gnss"}),Object(c["n"])(m,{label:"路牌",value:"lupai"})]})),_:1},8,["modelValue"])]})),_:1}),Object(c["n"])(i,{label:"备注:"},{default:re((function(){return[Object(c["n"])(u,{type:"textarea",modelValue:a.updateForm.remark,"onUpdate:modelValue":t[13]||(t[13]=function(e){return a.updateForm.remark=e}),maxlength:"100"},null,8,["modelValue"])]})),_:1})]})),_:1},8,["model","rules"])]})),_:1},8,["modelValue"])])})),ye={data:function(){return{query:{key:null},page:{current:1,size:20},addDialog:!1,updateDialog:!1,updateForm:{},addForm:{code:null,name:null,type:null,remark:null},rules:{code:[{required:!0,message:"项目编号必填",trigger:"blur"}],type:[{required:!0,message:"所属设备类型必选",trigger:"change"}]}}},mounted:function(){this.getListPage(this.page)},methods:{submit:function(){var e={name:this.query.name,itemId:this.query.itemId,status:this.query.status};this.getListPage(e)},pagination:function(e){var t={name:this.query.name,current:e,size:this.page.size};this.getListPage(t)},getListPage:function(e){var t=this;this.$http.Get(this.$global.group.listPage,e).then((function(e){t.page=e.data}))},handleUpdate:function(e){this.updateForm={id:e.id,code:e.code,name:e.name,type:e.type,remark:e.remark},console.log(this.updateForm),this.updateDialog=!0},addSubmit:function(e){var t=this;this.$refs[e].validate((function(e){if(!e)return!1;t.$http.Post(t.$global.group.save,t.addForm).then((function(e){t.$message.success("添加成功!"),t.refresh()}))}))},updateSubmit:function(e){var t=this;this.$refs[e].validate((function(e){if(!e)return!1;t.$http.Post(t.$global.group.update,t.updateForm).then((function(e){t.$message.success("修改成功!"),t.refresh()}))}))},refresh:function(){this.addDialog=!1,this.updateDialog=!1;var e={key:this.query.key,current:this.page.current,size:this.page.size};this.getListPage(e)}}};const _e=i()(ye,[["render",ve],["__scopeId","data-v-25f9e008"]]);var we=_e,ke={class:"zy-template"},Ne=Object(c["n"])("div",{class:"zy-main-title"},"设备列表-路牌",-1),ze={class:"zy-module"},Ve=Object(c["m"])("查询"),xe={class:"zy-module"},Ce=Object(c["m"])("在线"),qe=Object(c["m"])("离线"),Le=Object(c["m"])("详情");function Re(e,t,n,l,a,r){var u=Object(c["N"])("el-input"),i=Object(c["N"])("el-form-item"),o=Object(c["N"])("el-option"),b=Object(c["N"])("el-select"),d=Object(c["N"])("el-button"),s=Object(c["N"])("el-form"),p=Object(c["N"])("el-table-column"),m=Object(c["N"])("el-tag"),j=Object(c["N"])("el-table"),f=Object(c["N"])("el-pagination"),O=Object(c["N"])("el-descriptions-item"),g=Object(c["N"])("el-descriptions"),h=Object(c["N"])("el-dialog");return Object(c["E"])(),Object(c["j"])("div",ke,[Ne,Object(c["n"])("div",ze,[Object(c["n"])(s,{ref:"form",model:a.query,"label-width":"60px"},{default:Object(c["cb"])((function(){return[Object(c["n"])(i,{label:"设备码:",class:"zy-search-form-item"},{default:Object(c["cb"])((function(){return[Object(c["n"])(u,{modelValue:a.query.openNum,"onUpdate:modelValue":t[1]||(t[1]=function(e){return a.query.openNum=e}),size:"mini",clearable:""},null,8,["modelValue"])]})),_:1}),Object(c["n"])(i,{label:"设备组:",class:"zy-search-form-item"},{default:Object(c["cb"])((function(){return[Object(c["n"])(b,{modelValue:a.query.groupId,"onUpdate:modelValue":t[2]||(t[2]=function(e){return a.query.groupId=e}),filterable:"",clearable:"",placeholder:" ",size:"mini"},{default:Object(c["cb"])((function(){return[(Object(c["E"])(!0),Object(c["j"])(c["b"],null,Object(c["L"])(a.groups,(function(e){return Object(c["E"])(),Object(c["j"])(o,{key:e,value:e},null,8,["value"])})),128))]})),_:1},8,["modelValue"])]})),_:1}),Object(c["n"])(d,{type:"primary",size:"mini",onClick:r.submit},{default:Object(c["cb"])((function(){return[Ve]})),_:1},8,["onClick"])]})),_:1},8,["model"])]),Object(c["n"])("div",xe,[Object(c["n"])(j,{data:a.page.records,"header-cell-class-name":"zy-table-header-cell","cell-class-name":"zy-table-cell",stripe:""},{default:Object(c["cb"])((function(){return[Object(c["n"])(p,{prop:"openNum",label:"设备码","min-width":"180"},{default:Object(c["cb"])((function(e){return[Object(c["m"])("IMEI"+Object(c["R"])(e.row.openNum),1)]})),_:1}),Object(c["n"])(p,{prop:"groupId",label:"设备组","min-width":"120"}),Object(c["n"])(p,{prop:"createTime",label:"创建时间","min-width":"180"}),Object(c["n"])(p,{prop:"battery",label:"电量","min-width":"80"}),Object(c["n"])(p,{prop:"s4g",label:"信号","min-width":"80"}),Object(c["n"])(p,{label:"状态","min-width":"100"},{default:Object(c["cb"])((function(e){return[1===e.row.status?(Object(c["E"])(),Object(c["j"])(m,{key:0,type:"success",size:"small"},{default:Object(c["cb"])((function(){return[Ce]})),_:1})):Object(c["k"])("",!0),0===e.row.status?(Object(c["E"])(),Object(c["j"])(m,{key:1,type:"danger",size:"small"},{default:Object(c["cb"])((function(){return[qe]})),_:1})):Object(c["k"])("",!0)]})),_:1}),Object(c["n"])(p,{prop:"updateTime",label:"最近通讯时间","min-width":"180"}),Object(c["n"])(p,{label:"操作","min-width":"80"},{default:Object(c["cb"])((function(e){return[Object(c["n"])(d,{onClick:function(t){return r.detailHandler(e.row.openNum)},type:"text",size:"small"},{default:Object(c["cb"])((function(){return[Le]})),_:2},1032,["onClick"])]})),_:1})]})),_:1},8,["data"]),Object(c["n"])(f,{class:"zy-table-pagination",background:"",layout:"prev, pager, next","current-page":a.page.current,total:a.page.total,"page-size":a.page.size,onCurrentChange:r.pagination},null,8,["current-page","total","page-size","onCurrentChange"])]),Object(c["n"])(h,{title:"设备详情",modelValue:a.detailDialog,"onUpdate:modelValue":t[3]||(t[3]=function(e){return a.detailDialog=e}),width:"500px"},{default:Object(c["cb"])((function(){return[Object(c["n"])(g,{column:2,border:""},{default:Object(c["cb"])((function(){return[Object(c["n"])(O,{label:"设备码:"},{default:Object(c["cb"])((function(){return[Object(c["m"])(Object(c["R"])(a.detail.openNum),1)]})),_:1}),Object(c["n"])(O,{label:"唤醒间隔:"},{default:Object(c["cb"])((function(){return[Object(c["m"])(Object(c["R"])(a.detail.wakeInt),1)]})),_:1}),Object(c["n"])(O,{label:"阈值:"},{default:Object(c["cb"])((function(){return[Object(c["m"])(Object(c["R"])(a.detail.thresh),1)]})),_:1}),Object(c["n"])(O,{label:"温度:"},{default:Object(c["cb"])((function(){return[Object(c["m"])(Object(c["R"])(a.detail.temp),1)]})),_:1}),Object(c["n"])(O,{label:"电量:"},{default:Object(c["cb"])((function(){return[Object(c["m"])(Object(c["R"])(a.detail.battery),1)]})),_:1}),Object(c["n"])(O,{label:"信号:"},{default:Object(c["cb"])((function(){return[Object(c["m"])(Object(c["R"])(a.detail.s4g),1)]})),_:1}),Object(c["n"])(O,{label:"上传类型:"},{default:Object(c["cb"])((function(){return[Object(c["m"])(Object(c["R"])(a.detail.dataType),1)]})),_:1}),Object(c["n"])(O,{label:"X:"},{default:Object(c["cb"])((function(){return[Object(c["m"])(Object(c["R"])(a.detail.x),1)]})),_:1}),Object(c["n"])(O,{label:"Y:"},{default:Object(c["cb"])((function(){return[Object(c["m"])(Object(c["R"])(a.detail.y),1)]})),_:1}),Object(c["n"])(O,{label:"Z:"},{default:Object(c["cb"])((function(){return[Object(c["m"])(Object(c["R"])(a.detail.z),1)]})),_:1}),Object(c["n"])(O,{label:"angleX:"},{default:Object(c["cb"])((function(){return[Object(c["m"])(Object(c["R"])(a.detail.anglex),1)]})),_:1}),Object(c["n"])(O,{label:"angleY:"},{default:Object(c["cb"])((function(){return[Object(c["m"])(Object(c["R"])(a.detail.angley),1)]})),_:1}),Object(c["n"])(O,{label:"angleZ:"},{default:Object(c["cb"])((function(){return[Object(c["m"])(Object(c["R"])(a.detail.anglexz),1)]})),_:1}),Object(c["n"])(O,{label:"经度:"},{default:Object(c["cb"])((function(){return[Object(c["m"])(Object(c["R"])(a.detail.lon),1)]})),_:1}),Object(c["n"])(O,{label:"纬度:"},{default:Object(c["cb"])((function(){return[Object(c["m"])(Object(c["R"])(a.detail.lat),1)]})),_:1}),Object(c["n"])(O,{label:"定位模式:"},{default:Object(c["cb"])((function(){return[Object(c["m"])(Object(c["R"])(1==a.detail.mode?"GPS":"基站"),1)]})),_:1})]})),_:1})]})),_:1},8,["modelValue"])])}n("4160"),n("159b");var $e={data:function(){return{query:{openNum:"",type:null},page:{current:1,size:20},groups:[],detailDialog:!1,detail:{}}},mounted:function(){this.getDevicesList(),this.getGroupList()},methods:{submit:function(){var e={current:1,size:this.page.size,groupId:this.query.groupId,openNum:this.query.openNum};this.getDevicesList(e)},pagination:function(e){var t={current:e,size:this.page.size,groupId:this.query.groupId,openNum:this.query.openNum};this.getDevicesList(t)},detailHandler:function(e){this.detailDialog=!0,this.getDeviceDetail(e)},getDevicesList:function(e){var t=this;this.$http.Get(this.$global.lp.listPage,e).then((function(e){t.page=e.data}))},getDeviceDetail:function(e){var t=this,n={openNum:e};this.$http.Get(this.$global.lp.detail,n).then((function(e){t.detail=e.data}))},getGroupList:function(){var e=this;this.$http.Get(this.$global.group.listAll,{}).then((function(t){var n=[];e.groups=t.data.forEach((function(e){"lupai"==e.type&&n.push(e.code)})),e.groups=n}))}}};const Fe=i()($e,[["render",Re]]);var Pe=Fe,De=(n("b680"),n("e25e"),{class:"zy-template"}),Ue=Object(c["n"])("div",{class:"zy-main-title"},"设备列表-普适型",-1),Ie={class:"zy-module"},Ge=Object(c["m"])("查询"),Ee={class:"zy-module"},Te=Object(c["m"])("在线"),Ae=Object(c["m"])("离线"),Se=Object(c["m"])("点击查看"),Me=Object(c["n"])("img",{src:"http://lq.ailishi.org:4032/chenyi/static/bg.59f1ed01.png",alt:"二维码",width:"200",height:"200"},null,-1),He=Object(c["n"])("i",{class:"el-icon-warning warning"},null,-1),Be=Object(c["n"])("i",{class:"el-icon-warning warning"},null,-1),Ze=Object(c["m"])("备注"),Je={class:"dialog-footer"},Ke=Object(c["m"])("取 消"),Xe=Object(c["m"])("提 交");function Ye(e,t,n,l,a,r){var u=Object(c["N"])("el-input"),i=Object(c["N"])("el-form-item"),o=Object(c["N"])("el-option"),b=Object(c["N"])("el-select"),d=Object(c["N"])("el-button"),s=Object(c["N"])("el-form"),p=Object(c["N"])("el-table-column"),m=Object(c["N"])("el-tag"),j=Object(c["N"])("el-popover"),f=Object(c["N"])("el-tooltip"),O=Object(c["N"])("el-table"),g=Object(c["N"])("el-pagination"),h=Object(c["N"])("el-descriptions-item"),v=Object(c["N"])("el-descriptions"),y=Object(c["N"])("el-dialog");return Object(c["E"])(),Object(c["j"])("div",De,[Ue,Object(c["n"])("div",Ie,[Object(c["n"])(s,{ref:"form",model:a.query,"label-width":"60px"},{default:Object(c["cb"])((function(){return[Object(c["n"])(i,{label:"设备码:",class:"zy-search-form-item"},{default:Object(c["cb"])((function(){return[Object(c["n"])(u,{modelValue:a.query.openNum,"onUpdate:modelValue":t[1]||(t[1]=function(e){return a.query.openNum=e}),size:"mini",clearable:""},null,8,["modelValue"])]})),_:1}),Object(c["n"])(i,{label:"设备组:",class:"zy-search-form-item"},{default:Object(c["cb"])((function(){return[Object(c["n"])(b,{modelValue:a.query.groupId,"onUpdate:modelValue":t[2]||(t[2]=function(e){return a.query.groupId=e}),filterable:"",clearable:"",placeholder:" ",size:"mini"},{default:Object(c["cb"])((function(){return[(Object(c["E"])(!0),Object(c["j"])(c["b"],null,Object(c["L"])(a.groups,(function(e){return Object(c["E"])(),Object(c["j"])(o,{key:e,value:e},null,8,["value"])})),128))]})),_:1},8,["modelValue"])]})),_:1}),Object(c["n"])(d,{type:"primary",size:"mini",onClick:r.submit},{default:Object(c["cb"])((function(){return[Ge]})),_:1},8,["onClick"])]})),_:1},8,["model"])]),Object(c["n"])("div",Ee,[Object(c["n"])(O,{data:a.page.records,"header-cell-class-name":"zy-table-header-cell","cell-class-name":"zy-table-cell",stripe:""},{default:Object(c["cb"])((function(){return[Object(c["n"])(p,{prop:"openNum",label:"设备码","min-width":"180"},{default:Object(c["cb"])((function(e){return[Object(c["m"])("IMEI"+Object(c["R"])(e.row.openNum),1)]})),_:1}),Object(c["n"])(p,{prop:"groupId",label:"设备组","min-width":"120"}),Object(c["n"])(p,{label:"状态","min-width":"100"},{default:Object(c["cb"])((function(e){return[1===e.row.status?(Object(c["E"])(),Object(c["j"])(m,{key:0,type:"success",size:"small"},{default:Object(c["cb"])((function(){return[Te]})),_:1})):Object(c["k"])("",!0),0===e.row.status?(Object(c["E"])(),Object(c["j"])(m,{key:1,type:"danger",size:"small"},{default:Object(c["cb"])((function(){return[Ae]})),_:1})):Object(c["k"])("",!0)]})),_:1}),Object(c["n"])(p,{label:"设备二维码","min-width":"120"},{default:Object(c["cb"])((function(){return[Object(c["n"])(j,{placement:"right",width:200,trigger:"click"},{reference:Object(c["cb"])((function(){return[Object(c["n"])(d,{type:"text"},{default:Object(c["cb"])((function(){return[Se]})),_:1})]})),default:Object(c["cb"])((function(){return[Me]})),_:1})]})),_:1}),Object(c["n"])(p,{label:"电池电压","min-width":"80"},{default:Object(c["cb"])((function(e){return[Object(c["m"])(Object(c["R"])(null==e.row.powerVolt?"":e.row.powerVolt.toFixed(2))+" ",1),null!=e.row.powerVolt&&e.row.powerVolt.toFixed(2)<10?(Object(c["E"])(),Object(c["j"])(f,{key:0,effect:"dark",content:"电压低于10V",placement:"right-start"},{default:Object(c["cb"])((function(){return[He]})),_:1})):Object(c["k"])("",!0)]})),_:1}),Object(c["n"])(p,{label:"4G信号","min-width":"80"},{default:Object(c["cb"])((function(e){return[Object(c["m"])(Object(c["R"])(e.row.signal4g)+" ",1),null!=e.row.signal4g&&""!==e.row.signal4g&&parseInt(e.row.signal4g)<18?(Object(c["E"])(),Object(c["j"])(f,{key:0,effect:"dark",content:"信号值低于18",placement:"right-start"},{default:Object(c["cb"])((function(){return[Be]})),_:1})):Object(c["k"])("",!0)]})),_:1}),Object(c["n"])(p,{prop:"oemType",label:"板卡类型","min-width":"100"}),Object(c["n"])(p,{prop:"version",label:"软件版本号","min-width":"100"}),Object(c["n"])(p,{prop:"lon",label:"经度","min-width":"120"}),Object(c["n"])(p,{prop:"lat",label:"纬度","min-width":"120"}),Object(c["n"])(p,{prop:"satNum",label:"卫星颗数","min-width":"80"}),Object(c["n"])(p,{prop:"sim",label:"卡号","min-width":"120"}),Object(c["n"])(p,{prop:"freq",label:"上传频率(秒)","min-width":"120"}),Object(c["n"])(p,{prop:"updateTime",label:"最近通讯时间","min-width":"180"}),Object(c["n"])(p,{prop:"createTime",label:"创建时间","min-width":"180"}),Object(c["n"])(p,{prop:"remark",label:"备注","min-width":"240"}),Object(c["n"])(p,{label:"操作","min-width":"80"},{default:Object(c["cb"])((function(e){return[Object(c["n"])(d,{onClick:function(t){return r.editRemark(e.row)},type:"text",size:"small"},{default:Object(c["cb"])((function(){return[Ze]})),_:2},1032,["onClick"])]})),_:1})]})),_:1},8,["data"]),Object(c["n"])(g,{class:"zy-table-pagination",background:"",layout:"prev, pager, next","current-page":a.page.current,total:a.page.total,"page-size":a.page.size,onCurrentChange:r.pagination},null,8,["current-page","total","page-size","onCurrentChange"])]),Object(c["n"])(y,{title:"设备详情",modelValue:a.detailDialog,"onUpdate:modelValue":t[3]||(t[3]=function(e){return a.detailDialog=e}),width:"500px"},{default:Object(c["cb"])((function(){return[Object(c["n"])(v,{column:2,border:""},{default:Object(c["cb"])((function(){return[Object(c["n"])(h,{label:"设备码:"},{default:Object(c["cb"])((function(){return[Object(c["m"])(Object(c["R"])(a.detail.openNum),1)]})),_:1}),Object(c["n"])(h,{label:"定位模式:"},{default:Object(c["cb"])((function(){return[Object(c["m"])(Object(c["R"])(1==a.detail.mode?"GPS":"基站"),1)]})),_:1})]})),_:1})]})),_:1},8,["modelValue"]),Object(c["n"])(y,{title:"编辑",modelValue:a.updateDialog,"onUpdate:modelValue":t[7]||(t[7]=function(e){return a.updateDialog=e}),width:"500px"},{footer:Object(c["cb"])((function(){return[Object(c["n"])("span",Je,[Object(c["n"])(d,{onClick:t[5]||(t[5]=function(e){return a.updateDialog=!1})},{default:Object(c["cb"])((function(){return[Ke]})),_:1}),Object(c["n"])(d,{type:"primary",onClick:t[6]||(t[6]=function(e){return r.updateSubmit("updateForm")})},{default:Object(c["cb"])((function(){return[Xe]})),_:1})])]})),default:Object(c["cb"])((function(){return[Object(c["n"])(s,{ref:"updateForm",model:a.updateForm,"label-width":"100px",rules:e.rules},{default:Object(c["cb"])((function(){return[Object(c["n"])(i,{label:"备注:"},{default:Object(c["cb"])((function(){return[Object(c["n"])(u,{type:"textarea",modelValue:a.updateForm.remark,"onUpdate:modelValue":t[4]||(t[4]=function(e){return a.updateForm.remark=e}),maxlength:"100"},null,8,["modelValue"])]})),_:1})]})),_:1},8,["model","rules"])]})),_:1},8,["modelValue"])])}var Qe={data:function(){return{query:{openNum:"",type:null},page:{current:1,size:20},groups:[],detailDialog:!1,updateDialog:!1,updateForm:{},detail:{}}},mounted:function(){this.getListPage(),this.getGroupList()},methods:{submit:function(){var e={current:1,size:this.page.size,groupId:this.query.groupId,openNum:this.query.openNum};this.getListPage(e)},pagination:function(e){var t={current:e,size:this.page.size,groupId:this.query.groupId,openNum:this.query.openNum};this.getListPage(t)},editRemark:function(e){this.updateForm={openNum:e.openNum,remark:e.remark},this.updateDialog=!0},getListPage:function(e){var t=this;this.$http.Get(this.$global.ubi.listPage,e).then((function(e){t.page=e.data}))},updateSubmit:function(e){var t=this;this.$refs[e].validate((function(e){if(!e)return!1;t.$http.Post(t.$global.deviceBase.updateRemark,t.updateForm).then((function(e){t.$message.success("修改成功!"),t.refresh()}))}))},getGroupList:function(){var e=this;this.$http.Get(this.$global.group.listAll,{}).then((function(t){var n=[];e.groups=t.data.forEach((function(e){"gnss"==e.type&&n.push(e.code)})),e.groups=n}))},refresh:function(){this.updateDialog=!1;var e={current:this.page.current,size:this.page.size,groupId:this.query.groupId,openNum:this.query.openNum};this.getListPage(e)}}};const We=i()(Qe,[["render",Ye]]);var et=We,tt=Object(c["gb"])("data-v-4ef70a8e");Object(c["H"])("data-v-4ef70a8e");var nt={class:"zy-template"},ct=Object(c["n"])("div",{class:"zy-main-title title"},"设备列表-路牌",-1),lt={class:"zy-module search"},at=Object(c["m"])("查询"),rt={id:"map",class:"map"},ut={key:0,class:"map__panel"};Object(c["F"])();var it=tt((function(e,t,n,l,a,r){var u=Object(c["N"])("el-option"),i=Object(c["N"])("el-select"),o=Object(c["N"])("el-form-item"),b=Object(c["N"])("el-button"),d=Object(c["N"])("el-form");return Object(c["E"])(),Object(c["j"])("div",nt,[ct,Object(c["n"])("div",lt,[Object(c["n"])(d,{ref:"form",model:a.form,"label-width":"60px"},{default:tt((function(){return[Object(c["n"])(o,{label:"设备码:",class:"zy-search-form-item"},{default:tt((function(){return[Object(c["n"])(i,{modelValue:a.form.openNum,"onUpdate:modelValue":t[1]||(t[1]=function(e){return a.form.openNum=e}),filterable:"",clearable:"",placeholder:" ",size:"mini"},{default:tt((function(){return[(Object(c["E"])(!0),Object(c["j"])(c["b"],null,Object(c["L"])(a.openNumList,(function(e){return Object(c["E"])(),Object(c["j"])(u,{key:e,value:e},null,8,["value"])})),128))]})),_:1},8,["modelValue"])]})),_:1}),Object(c["n"])(b,{type:"primary",size:"mini",onClick:r.submit},{default:tt((function(){return[at]})),_:1},8,["onClick"])]})),_:1},8,["model"])]),Object(c["n"])("div",rt,[null!=a.device?(Object(c["E"])(),Object(c["j"])("div",ut,[Object(c["n"])("p",null,"设 备 号: "+Object(c["R"])(a.device.openNum),1),Object(c["n"])("p",null,"设 备 组: "+Object(c["R"])(a.device.groupId),1),Object(c["n"])("p",null,"状 态: "+Object(c["R"])(1==a.device.status?"在线":"离线"),1),Object(c["n"])("p",null,"电 量: "+Object(c["R"])(a.device.battery),1),Object(c["n"])("p",null,"温 度: "+Object(c["R"])(a.device.temp),1),Object(c["n"])("p",null,"信号强度: "+Object(c["R"])(a.device.s4g),1),Object(c["n"])("p",null,"唤醒间隔(小时): "+Object(c["R"])(a.device.wakeInt),1),Object(c["n"])("p",null,"阈值: "+Object(c["R"])(a.device.thresh),1),Object(c["n"])("p",null,"X: "+Object(c["R"])(a.device.x),1),Object(c["n"])("p",null,"Y: "+Object(c["R"])(a.device.y),1),Object(c["n"])("p",null,"Z: "+Object(c["R"])(a.device.z),1),Object(c["n"])("p",null,"angleX: "+Object(c["R"])(a.device.anglex),1),Object(c["n"])("p",null,"angleY: "+Object(c["R"])(a.device.angley),1),Object(c["n"])("p",null,"angleZ: "+Object(c["R"])(a.device.anglez),1),Object(c["n"])("p",null,"经 度: "+Object(c["R"])(a.device.lon),1),Object(c["n"])("p",null,"纬 度: "+Object(c["R"])(a.device.lat),1),Object(c["n"])("p",null,"定位模式: "+Object(c["R"])(1==a.device.mode?"GPS":"基站"),1),Object(c["n"])("p",null,"上传时间: "+Object(c["R"])(a.device.updateTime),1),Object(c["n"])("p",null,"位置: "+Object(c["R"])(a.device.site),1)])):Object(c["k"])("",!0)])])})),ot=(n("d81d"),{data:function(){return{map:null,markers:[],icon:"",form:{openNum:""},openNumList:[],deviceList:[],device:null}},activated:function(){this.initMap(),this.getDeviceList()},methods:{initMap:function(){var e={zoom:6};this.map=new AMap.Map("map",e),this.icon=new AMap.Icon({image:"/static/img/point.png",size:[40,40],imageSize:[40,40]})},submit:function(){var e=this;""!==this.form.openNum&&this.deviceList.forEach((function(t){e.form.openNum===t.openNum&&(null!=t.latGcj&&null!=t.lonGcj?e.map.setZoomAndCenter(16,[t.lonGcj,t.latGcj]):e.$message.warning("该设备暂无定位信息"),e.device=t)}))},addMarkers:function(e){var t=this,n=[];null!=this.markers&&0!==this.markers.length&&this.map.remove(this.markers),e.forEach((function(e){null!=e.latGcj&&null!=e.lonGcj&&n.push(t.buildMarker(e))})),this.map.add(n),this.markers=n},buildMarker:function(e){var t=this;return new AMap.Marker({position:[e.lonGcj,e.latGcj],icon:this.icon,title:e.deviceId,animation:"AMAP_ANIMATION_DROP"}).on("click",(function(){t.map.setZoomAndCenter(16,[e.lonGcj,e.latGcj]),t.device=e}))},getDeviceList:function(){var e=this;this.$http.Get(this.$global.lp.listAll,{}).then((function(t){e.deviceList=t.data,console.log(t.data),e.openNumList=t.data.map((function(e){return e.openNum})),e.addMarkers(e.deviceList)}))}}});n("8dfb");const bt=i()(ot,[["render",it],["__scopeId","data-v-4ef70a8e"]]);var dt=bt,st={class:"zy-template"},pt=Object(c["n"])("div",{class:"zy-main-title"},"用户管理",-1),mt={class:"zy-module"},jt=Object(c["m"])("查询"),ft={class:"zy-module"},Ot=Object(c["m"])("是"),gt=Object(c["m"])("否"),ht=Object(c["m"])("编辑"),vt=Object(c["m"])("配置设备组"),yt={class:"dialog-footer"},_t=Object(c["m"])("取 消"),wt=Object(c["m"])("提 交"),kt={class:"dialog-footer"},Nt=Object(c["m"])("取 消"),zt=Object(c["m"])("提 交");function Vt(e,t,n,l,a,r){var u=Object(c["N"])("el-input"),i=Object(c["N"])("el-form-item"),o=Object(c["N"])("el-button"),b=Object(c["N"])("el-form"),d=Object(c["N"])("el-table-column"),s=Object(c["N"])("el-tag"),p=Object(c["N"])("el-table"),m=Object(c["N"])("el-pagination"),j=Object(c["N"])("el-tree"),f=Object(c["N"])("el-dialog");return Object(c["E"])(),Object(c["j"])("div",st,[pt,Object(c["n"])("div",mt,[Object(c["n"])(b,{ref:"form",model:a.query,"label-width":"60px"},{default:Object(c["cb"])((function(){return[Object(c["n"])(i,{label:"关键字:",class:"zy-search-form-item"},{default:Object(c["cb"])((function(){return[Object(c["n"])(u,{modelValue:a.query.key,"onUpdate:modelValue":t[1]||(t[1]=function(e){return a.query.key=e}),size:"mini",placeholder:"用户名/昵称/手机号/随机码"},null,8,["modelValue"])]})),_:1}),Object(c["n"])(o,{type:"primary",size:"mini",onClick:r.submit},{default:Object(c["cb"])((function(){return[jt]})),_:1},8,["onClick"])]})),_:1},8,["model"])]),Object(c["n"])("div",ft,[Object(c["n"])(p,{data:a.page.records,stripe:"","header-cell-class-name":"zy-table-header-cell","cell-class-name":"zy-table-cell"},{default:Object(c["cb"])((function(){return[Object(c["n"])(d,{prop:"randomCode",label:"随机码","min-width":"120"}),Object(c["n"])(d,{label:"管理员权限","min-width":"80"},{default:Object(c["cb"])((function(e){return[1===e.row.admin?(Object(c["E"])(),Object(c["j"])(s,{key:0,type:"success",size:"small"},{default:Object(c["cb"])((function(){return[Ot]})),_:1})):Object(c["k"])("",!0),0===e.row.admin?(Object(c["E"])(),Object(c["j"])(s,{key:1,size:"small"},{default:Object(c["cb"])((function(){return[gt]})),_:1})):Object(c["k"])("",!0)]})),_:1}),Object(c["n"])(d,{prop:"createTime",label:"注册时间","min-width":"180"}),Object(c["n"])(d,{prop:"remark",label:"备注","min-width":"250"}),Object(c["n"])(d,{label:"操作","min-width":"150"},{default:Object(c["cb"])((function(e){return[Object(c["n"])(o,{onClick:function(t){return r.edit(e.row)},type:"text",size:"small"},{default:Object(c["cb"])((function(){return[ht]})),_:2},1032,["onClick"]),Object(c["n"])(o,{onClick:function(t){return r.setGroups(e.row.id)},type:"text",size:"small"},{default:Object(c["cb"])((function(){return[vt]})),_:2},1032,["onClick"]),Object(c["n"])(o,{onClick:function(t){return r.setAdmin(e.row)},type:"text",size:"small",class:0===e.row.admin?"":"red"},{default:Object(c["cb"])((function(){return[Object(c["m"])(Object(c["R"])(0===e.row.admin?"设为管理员":"取消管理员"),1)]})),_:2},1032,["onClick","class"])]})),_:1})]})),_:1},8,["data"]),Object(c["n"])(m,{class:"zy-table-pagination",background:"",layout:"prev, pager, next",total:a.page.total,"page-size":a.page.size,onCurrentChange:r.pagination,"current-page":a.page.current},null,8,["total","page-size","onCurrentChange","current-page"])]),Object(c["n"])(f,{title:"配置权限",modelValue:a.groupDialog,"onUpdate:modelValue":t[3]||(t[3]=function(e){return a.groupDialog=e}),width:"500px"},{footer:Object(c["cb"])((function(){return[Object(c["n"])("span",yt,[Object(c["n"])(o,{onClick:t[2]||(t[2]=function(e){return a.groupDialog=!1}),size:"small"},{default:Object(c["cb"])((function(){return[_t]})),_:1}),Object(c["n"])(o,{type:"success",onClick:r.setGroupSubmit,size:"small"},{default:Object(c["cb"])((function(){return[wt]})),_:1},8,["onClick"])])]})),default:Object(c["cb"])((function(){return[Object(c["n"])(b,{"label-width":"100px"},{default:Object(c["cb"])((function(){return[Object(c["n"])(i,{label:"配置组:"},{default:Object(c["cb"])((function(){return[Object(c["n"])(j,{data:a.groupList,"show-checkbox":"","node-key":"code",ref:"tree","highlight-current":"",props:a.defaultProps,accordion:""},null,8,["data","props"])]})),_:1})]})),_:1})]})),_:1},8,["modelValue"]),Object(c["n"])(f,{title:"编辑",modelValue:a.updateDialog,"onUpdate:modelValue":t[7]||(t[7]=function(e){return a.updateDialog=e}),width:"500px"},{footer:Object(c["cb"])((function(){return[Object(c["n"])("span",kt,[Object(c["n"])(o,{onClick:t[5]||(t[5]=function(e){return a.updateDialog=!1})},{default:Object(c["cb"])((function(){return[Nt]})),_:1}),Object(c["n"])(o,{type:"primary",onClick:t[6]||(t[6]=function(e){return r.updateSubmit("updateForm")})},{default:Object(c["cb"])((function(){return[zt]})),_:1})])]})),default:Object(c["cb"])((function(){return[Object(c["n"])(b,{ref:"updateForm",model:a.updateForm,"label-width":"100px",rules:e.rules},{default:Object(c["cb"])((function(){return[Object(c["n"])(i,{label:"备注:"},{default:Object(c["cb"])((function(){return[Object(c["n"])(u,{type:"textarea",modelValue:a.updateForm.remark,"onUpdate:modelValue":t[4]||(t[4]=function(e){return a.updateForm.remark=e}),maxlength:"100"},null,8,["modelValue"])]})),_:1})]})),_:1},8,["model","rules"])]})),_:1},8,["modelValue"])])}var xt={data:function(){return{query:{key:""},page:{current:1,size:20},defaultProps:{children:"children",label:"name"},groupDialog:!1,updateDialog:!1,updateForm:{},selUserId:null,groupList:null}},mounted:function(){this.getUserList(this.page)},methods:{submit:function(){var e={key:this.query.key};this.getUserList(e)},pagination:function(e){var t={key:this.query.key,current:e,size:this.page.size};this.getUserList(t)},getUserList:function(e){var t=this;this.$http.Get(this.$global.users.listPage,e).then((function(e){t.page=e.data}))},setGroups:function(e){this.groupDialog=!0,this.selUserId=e,this.getGroupList(e)},setAdmin:function(e){var t=this,n={userId:e.id,admin:1==e.admin?0:1};this.$http.Post(this.$global.users.adminAccess,n).then((function(e){t.$message.success("设置成功!"),t.refresh()}))},getGroupList:function(e){var t=this,n={userId:e};this.$http.Get(this.$global.users.getNoAccessGroups,n).then((function(e){var n=[];for(var c in e.data)n.push({name:c,children:e.data[c]});console.log(n),t.groupList=n}))},setGroupSubmit:function(){var e=this,t=this.$refs.tree.getCheckedKeys(!0);if(null==t||t.length<=0)this.$message.error("至少配置一个组!");else{var n="";t.forEach((function(e){n+=e+","})),n=n.substr(0,n.length-1);var c={userId:this.selUserId,groups:n};this.$http.Post(this.$global.users.saveGroupAccess,c).then((function(t){e.$message.success("配置成功!"),e.groupDialog=!1}))}},edit:function(e){this.updateForm={id:e.id,remark:e.remark},this.updateDialog=!0},updateSubmit:function(e){var t=this;this.$refs[e].validate((function(e){if(!e)return!1;t.$http.Post(t.$global.users.updateRemark,t.updateForm).then((function(e){t.$message.success("修改成功!"),t.refresh()}))}))},refresh:function(){this.updateDialog=!1;var e={key:this.query.key,current:this.page.current,size:this.page.size};this.getUserList(e)}}};const Ct=i()(xt,[["render",Vt]]);var qt=Ct,Lt=[{path:"/",name:"Layout",component:X,children:[{path:"/logs",name:"Logs",component:ae},{path:"/devices/lp",name:"DevicesLp",component:Pe},{path:"/devices/ubi",name:"DevicesUbi",component:et},{path:"/map/lp",name:"MapLp",component:dt},{path:"/groups",name:"Group",component:we},{path:"/users",name:"Users",component:qt}]},{path:"/login",name:"Login",component:z}],Rt=Object(s["a"])({history:Object(s["b"])(),routes:Lt}),$t=Rt,Ft="http://lq.ailishi.org:4032/bms/api/operate/",Pt={login:Ft+"admin/login.do",logout:Ft+"admin/logout.do",verify:Ft+"admin/verify.do",users:{listPage:Ft+"user/listPage.do",adminAccess:Ft+"user/adminAccess.do",getNoAccessGroups:Ft+"user/getNoAccessGroups.do",saveGroupAccess:Ft+"user/saveGroupAccess.do",updateRemark:Ft+"user/remark.do"},deviceBase:{updateRemark:Ft+"device/base/remark.do"},lp:{listPage:Ft+"device/lp/listPage.do",listAll:Ft+"device/lp/listAll.do",detail:Ft+"device/lp/detail.do"},ubi:{listPage:Ft+"device/ubi/listPage.do",detail:Ft+"device/ubi/detail.do"},logs:{listPage:Ft+"logs/listPage.do",instructions:Ft+"logs/instruction.do"},group:{listPage:Ft+"group/listPage.do",save:Ft+"group/save.do",listAll:Ft+"group/listAll.do",update:Ft+"group/update.do"},webSocket:"wss://www.mang406.top/webSocket/"},Dt={URL:Pt},Ut=(n("d3b7"),n("3ca3"),n("ddb0"),n("2b3d"),n("bc3a")),It=n.n(Ut);It.a.defaults.headers["channel"]="bms",It.a.interceptors.request.use((function(e){var t=w.getToken();return null!=t&&(e.headers["token"]=JSON.parse(w.getToken()).token),e})),It.a.interceptors.response.use((function(e){switch(e.data.status){case 200:return e.data;case 300:l["b"].error(e.data.msg);break;case 400:l["b"].error("请先登录"),$t.replace("/login");break;case 500:l["b"].error("服务器开小差了");break;default:l["b"].error("请求状态异常");break}throw"stop"}),(function(e){throw console.log(e),"stop"}));var Gt,Et=It.a,Tt=n("4328"),At=n.n(Tt);function St(){null!=Gt&&Gt.close(),Gt=l["a"].service({text:"正在加载"})}function Mt(){null!=Gt&&Gt.close()}var Ht={Post:function(e,t){return St(),new Promise((function(n,c){Et.post(e,At.a.stringify(t)).then((function(e){n(e)}))["catch"]((function(e){}))["finally"]((function(){Mt()}))}))},Get:function(e,t){return St(),new Promise((function(n,c){Et.get(e,{params:t}).then((function(e){n(e)}))["catch"]((function(e){console.log(e)}))["finally"]((function(){Mt()}))}))},Download:function(e,t,n){Et.post(e,At.a.stringify(t),{responseType:"blob"}).then((function(e){var t=document.createElement("a");t.style.display="none",t.href=window.URL.createObjectURL(new Blob([e])),t.setAttribute("download",n),document.body.appendChild(t),t.click(),URL.revokeObjectURL(t.href),document.body.removeChild(t)}))}},Bt={Http:Ht},Zt=Object(c["i"])(d);Zt.config.globalProperties.$http=Bt.Http,Zt.config.globalProperties.$global=Dt.URL,Zt.use($t).use(l["c"]).mount("#app")},"8dfb":function(e,t,n){"use strict";n("1993")},a408:function(e,t,n){e.exports=n.p+"img/logo.e8ecd770.png"},fa4b:function(e,t,n){"use strict";n("2413")}});
  2. //# sourceMappingURL=app.5ae097f3.js.map