app.ce874635.js 38 KB

12
  1. (function(e){function t(t){for(var c,r,o=t[0],u=t[1],i=t[2],s=0,d=[];s<o.length;s++)r=o[s],Object.prototype.hasOwnProperty.call(l,r)&&l[r]&&d.push(l[r][0]),l[r]=0;for(c in u)Object.prototype.hasOwnProperty.call(u,c)&&(e[c]=u[c]);b&&b(t);while(d.length)d.shift()();return a.push.apply(a,i||[]),n()}function n(){for(var e,t=0;t<a.length;t++){for(var n=a[t],c=!0,o=1;o<n.length;o++){var u=n[o];0!==l[u]&&(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 o=window["webpackJsonp"]=window["webpackJsonp"]||[],u=o.push.bind(o);o.push=t,o=o.slice();for(var i=0;i<o.length;i++)t(o[i]);var b=u;a.push([0,"chunk-vendors"]),n()})({0:function(e,t,n){e.exports=n("56d7")},"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){},"2fdb":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 o=n("d959"),u=n.n(o);const i={},b=u()(i,[["render",r]]);var s=b,d=n("6c02"),p=Object(c["gb"])("data-v-1f087cb8");Object(c["H"])("data-v-1f087cb8");var f={class:"zy-template"},m={class:"login"},j=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 o=Object(c["N"])("el-input"),u=Object(c["N"])("el-form-item"),i=Object(c["N"])("el-button"),b=Object(c["N"])("el-form");return Object(c["E"])(),Object(c["j"])("div",f,[Object(c["n"])("div",m,[j,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"])(u,{label:"账号:",prop:"username"},{default:p((function(){return[Object(c["n"])(o,{modelValue:a.form.username,"onUpdate:modelValue":t[1]||(t[1]=function(e){return a.form.username=e})},null,8,["modelValue"])]})),_:1}),Object(c["n"])(u,{label:"密码:",prop:"password"},{default:p((function(){return[Object(c["n"])(o,{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"])(i,{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")}}),k=_,w={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){k.setToken(e.data),t.$router.replace("/")}))}))}}};n("fa4b");const N=u()(w,[["render",y],["__scopeId","data-v-1f087cb8"]]);var z=N,V=n("a408"),x=n.n(V),C=Object(c["gb"])("data-v-a09bf7be");Object(c["H"])("data-v-a09bf7be");var L=Object(c["n"])("div",{class:"logo"},[Object(c["n"])("img",{src:x.a,alt:"logo"})],-1),R=Object(c["n"])("i",{class:"el-icon-monitor"},null,-1),P=Object(c["m"])("设备管理"),$=Object(c["m"])("位置分布"),q=Object(c["m"])("设备列表-路牌"),G=Object(c["n"])("i",{class:"el-icon-monitor"},null,-1),U=Object(c["m"])("设备监控"),D=Object(c["m"])("MQTT消息日志"),I=Object(c["n"])("i",{class:"el-icon-setting"},null,-1),F=Object(c["m"])("系统设置"),E=Object(c["m"])("用户管理"),A=Object(c["m"])("设备组管理"),T={class:"dropdown"},S={class:"el-dropdown-link"},M=Object(c["n"])("i",{class:"el-icon-arrow-down el-icon--right"},null,-1),H=Object(c["m"])("退出登录");Object(c["F"])();var Z=C((function(e,t,n,l,a,r){var o=Object(c["N"])("el-menu-item"),u=Object(c["N"])("router-link"),i=Object(c["N"])("el-submenu"),b=Object(c["N"])("el-menu"),s=Object(c["N"])("el-aside"),d=Object(c["N"])("el-dropdown-item"),p=Object(c["N"])("el-dropdown-menu"),f=Object(c["N"])("el-dropdown"),m=Object(c["N"])("el-header"),j=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"])(s,{width:"200px"},{default:C((function(){return[L,Object(c["n"])(b,{"default-active":"1","background-color":"#141B2E","text-color":"#E4ECFF"},{default:C((function(){return[Object(c["n"])(i,{index:"1"},{title:C((function(){return[R,P]})),default:C((function(){return[Object(c["n"])(u,{to:"/map/lp"},{default:C((function(){return[Object(c["n"])(o,{index:"1-1"},{default:C((function(){return[$]})),_:1})]})),_:1}),Object(c["n"])(u,{to:"/devices/lp"},{default:C((function(){return[Object(c["n"])(o,{index:"1-2"},{default:C((function(){return[q]})),_:1})]})),_:1})]})),_:1}),Object(c["n"])(i,{index:"2"},{title:C((function(){return[G,U]})),default:C((function(){return[Object(c["n"])(u,{to:"/logs"},{default:C((function(){return[Object(c["n"])(o,{index:"2-1"},{default:C((function(){return[D]})),_:1})]})),_:1})]})),_:1}),Object(c["n"])(i,{index:"3"},{title:C((function(){return[I,F]})),default:C((function(){return[Object(c["n"])(u,{to:"/users"},{default:C((function(){return[Object(c["n"])(o,{index:"3-1"},{default:C((function(){return[E]})),_:1})]})),_:1}),Object(c["n"])(u,{to:"/groups"},{default:C((function(){return[Object(c["n"])(o,{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"])(m,{class:"header",style:{height:"50px"}},{default:C((function(){return[Object(c["n"])("div",T,[Object(c["n"])(f,{trigger:"click"},{dropdown:C((function(){return[Object(c["n"])(p,null,{default:C((function(){return[Object(c["n"])(d,{onClick:r.logout},{default:C((function(){return[H]})),_:1},8,["onClick"])]})),_:1})]})),default:C((function(){return[Object(c["n"])("span",S,[Object(c["m"])(Object(c["R"])(a.nickname),1),M])]})),_:1})])]})),_:1}),Object(c["n"])(O,null,{default:C((function(){return[Object(c["n"])(j,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})})),B={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(k.getToken());e.nickname=n.nickname}))},logout:function(){var e=this;this.$http.Get(this.$global.logout,{}).then((function(t){e.$router.replace("/login"),k.removeToken()}))}}};n("e7ee");const J=u()(B,[["render",Z],["__scopeId","data-v-a09bf7be"]]);var K=J,X={class:"zy-template"},Y=Object(c["n"])("div",{class:"zy-main-title"},"MQTT消息日志",-1),Q={class:"zy-module"},W=Object(c["m"])("查询"),ee={class:"zy-module"};function te(e,t,n,l,a,r){var o=Object(c["N"])("el-input"),u=Object(c["N"])("el-form-item"),i=Object(c["N"])("el-option"),b=Object(c["N"])("el-select"),s=Object(c["N"])("el-button"),d=Object(c["N"])("el-form"),p=Object(c["N"])("el-table-column"),f=Object(c["N"])("el-tag"),m=Object(c["N"])("el-popover"),j=Object(c["N"])("el-table"),O=Object(c["N"])("el-pagination");return Object(c["E"])(),Object(c["j"])("div",X,[Y,Object(c["n"])("div",Q,[Object(c["n"])(d,{ref:"form",model:a.query,"label-width":"60px"},{default:Object(c["cb"])((function(){return[Object(c["n"])(u,{label:"设备码:",class:"zy-search-form-item"},{default:Object(c["cb"])((function(){return[Object(c["n"])(o,{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"])(u,{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"])(i,{value:"0",label:"服务器接收"}),Object(c["n"])(i,{value:"1",label:"服务器发送"})]})),_:1},8,["modelValue"])]})),_:1}),Object(c["n"])(u,{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"])(i,{value:e.code,label:e.remark},null,8,["value","label"])})),256))]})),_:1},8,["modelValue"])]})),_:1}),Object(c["n"])(s,{type:"primary",size:"mini",onClick:r.submit},{default:Object(c["cb"])((function(){return[W]})),_:1},8,["onClick"])]})),_:1},8,["model"])]),Object(c["n"])("div",ee,[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:"设备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"])(m,{placement:"bottom",width:120,trigger:"click",content:e.row.remark},{reference:Object(c["cb"])((function(){return[Object(c["n"])(f,{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 ne={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 ce=u()(ne,[["render",te]]);var le=ce;n("b0c0");Object(c["H"])("data-v-4d6459ae");Object(c["F"])();var ae=Object(c["gb"])("data-v-a07131f8");Object(c["H"])("data-v-a07131f8");var re={class:"zy-template"},oe=Object(c["n"])("div",{class:"zy-main-title"},"设备组管理",-1),ue={class:"zy-module"},ie=Object(c["m"])("查询"),be={class:"zy-module"},se=Object(c["m"])("增加"),de=Object(c["m"])("编辑"),pe={class:"dialog-footer"},fe=Object(c["m"])("取 消"),me=Object(c["m"])("提 交"),je={class:"dialog-footer"},Oe=Object(c["m"])("取 消"),ge=Object(c["m"])("提 交");Object(c["F"])();var he=ae((function(e,t,n,l,a,r){var o=Object(c["N"])("el-input"),u=Object(c["N"])("el-form-item"),i=Object(c["N"])("el-button"),b=Object(c["N"])("el-form"),s=Object(c["N"])("el-table-column"),d=Object(c["N"])("el-table"),p=Object(c["N"])("el-pagination"),f=Object(c["N"])("el-dialog");return Object(c["E"])(),Object(c["j"])("div",re,[oe,Object(c["n"])("div",ue,[Object(c["n"])(b,{model:a.query,"label-width":"80px"},{default:ae((function(){return[Object(c["n"])(u,{label:"关键字",class:"zy-search-form-item"},{default:ae((function(){return[Object(c["n"])(o,{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"])(i,{type:"primary",size:"mini",onClick:r.submit},{default:ae((function(){return[ie]})),_:1},8,["onClick"])]})),_:1},8,["model"])]),Object(c["n"])("div",be,[Object(c["n"])(i,{type:"primary",size:"small",style:{"margin-bottom":"20px"},onClick:t[2]||(t[2]=function(e){return a.addDialog=!0})},{default:ae((function(){return[se]})),_:1}),Object(c["n"])(d,{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:ae((function(){return[Object(c["n"])(s,{prop:"code",label:"设备组编号",width:"100"}),Object(c["n"])(s,{prop:"name",label:"设备组名称",width:"120"}),Object(c["n"])(s,{prop:"item",label:"所属项目",width:"150"}),Object(c["n"])(s,{label:"备注","min-width":"500"},{default:ae((function(e){return[Object(c["m"])(Object(c["R"])(e.row.remark),1)]})),_:1}),Object(c["n"])(s,{prop:"createTime",label:"创建时间",width:"180"}),Object(c["n"])(s,{label:"操作",width:"100","min-width":"10%"},{default:ae((function(e){return[Object(c["n"])(i,{onClick:function(t){return r.handleUpdate(e.row)},type:"text",size:"small"},{default:ae((function(){return[de]})),_: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[8]||(t[8]=function(e){return a.addDialog=e}),width:"500px"},{footer:ae((function(){return[Object(c["n"])("span",pe,[Object(c["n"])(i,{onClick:t[6]||(t[6]=function(e){return a.addDialog=!1})},{default:ae((function(){return[fe]})),_:1}),Object(c["n"])(i,{type:"primary",onClick:t[7]||(t[7]=function(e){return r.addSubmit("addForm")})},{default:ae((function(){return[me]})),_:1})])]})),default:ae((function(){return[Object(c["n"])(b,{ref:"addForm",model:a.addForm,"label-width":"100px",rules:a.rules},{default:ae((function(){return[Object(c["n"])(u,{label:"设备组编号:",prop:"code"},{default:ae((function(){return[Object(c["n"])(o,{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"])(u,{label:"设备组名称:"},{default:ae((function(){return[Object(c["n"])(o,{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"])(u,{label:"备注:"},{default:ae((function(){return[Object(c["n"])(o,{type:"textarea",modelValue:a.addForm.remark,"onUpdate:modelValue":t[5]||(t[5]=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[14]||(t[14]=function(e){return a.updateDialog=e}),width:"500px"},{footer:ae((function(){return[Object(c["n"])("span",je,[Object(c["n"])(i,{onClick:t[12]||(t[12]=function(e){return a.updateDialog=!1})},{default:ae((function(){return[Oe]})),_:1}),Object(c["n"])(i,{type:"primary",onClick:t[13]||(t[13]=function(e){return r.updateSubmit("updateForm")})},{default:ae((function(){return[ge]})),_:1})])]})),default:ae((function(){return[Object(c["n"])(b,{ref:"updateForm",model:a.updateForm,"label-width":"100px",rules:a.rules},{default:ae((function(){return[Object(c["n"])(u,{label:"设备组编号:",prop:"code"},{default:ae((function(){return[Object(c["n"])(o,{modelValue:a.updateForm.code,"onUpdate:modelValue":t[9]||(t[9]=function(e){return a.updateForm.code=e}),maxlength:"30",placeholder:"不可重复"},null,8,["modelValue"])]})),_:1}),Object(c["n"])(u,{label:"设备组名称:"},{default:ae((function(){return[Object(c["n"])(o,{modelValue:a.updateForm.name,"onUpdate:modelValue":t[10]||(t[10]=function(e){return a.updateForm.name=e}),maxlength:"30"},null,8,["modelValue"])]})),_:1}),Object(c["n"])(u,{label:"备注:"},{default:ae((function(){return[Object(c["n"])(o,{type:"textarea",modelValue:a.updateForm.remark,"onUpdate:modelValue":t[11]||(t[11]=function(e){return a.updateForm.remark=e}),maxlength:"100"},null,8,["modelValue"])]})),_:1})]})),_:1},8,["model","rules"])]})),_:1},8,["modelValue"])])})),ve={data:function(){return{query:{key:null},page:{current:1,size:20},addDialog:!1,updateDialog:!1,updateForm:{},addForm:{code:null,name:null,remark:null},rules:{code:[{required:!0,message:"项目编号必填",trigger:"blur"}]}}},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,remark:e.remark},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){console.log(e.data),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 ye=u()(ve,[["render",he],["__scopeId","data-v-a07131f8"]]);var _e=ye,ke={class:"zy-template"},we=Object(c["n"])("div",{class:"zy-main-title"},"设备列表-路牌",-1),Ne={class:"zy-module"},ze=Object(c["m"])("查询"),Ve={class:"zy-module"},xe=Object(c["m"])("在线"),Ce=Object(c["m"])("离线"),Le=Object(c["m"])("详情");function Re(e,t,n,l,a,r){var o=Object(c["N"])("el-input"),u=Object(c["N"])("el-form-item"),i=Object(c["N"])("el-option"),b=Object(c["N"])("el-select"),s=Object(c["N"])("el-button"),d=Object(c["N"])("el-form"),p=Object(c["N"])("el-table-column"),f=Object(c["N"])("el-tag"),m=Object(c["N"])("el-table"),j=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,[we,Object(c["n"])("div",Ne,[Object(c["n"])(d,{ref:"form",model:a.query,"label-width":"60px"},{default:Object(c["cb"])((function(){return[Object(c["n"])(u,{label:"设备码:",class:"zy-search-form-item"},{default:Object(c["cb"])((function(){return[Object(c["n"])(o,{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"])(u,{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"])(i,{key:e,value:e},null,8,["value"])})),128))]})),_:1},8,["modelValue"])]})),_:1}),Object(c["n"])(s,{type:"primary",size:"mini",onClick:r.submit},{default:Object(c["cb"])((function(){return[ze]})),_:1},8,["onClick"])]})),_:1},8,["model"])]),Object(c["n"])("div",Ve,[Object(c["n"])(m,{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"])(f,{key:0,type:"success",size:"small"},{default:Object(c["cb"])((function(){return[xe]})),_:1})):Object(c["k"])("",!0),0===e.row.status?(Object(c["E"])(),Object(c["j"])(f,{key:1,type:"danger",size:"small"},{default:Object(c["cb"])((function(){return[Ce]})),_: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"])(s,{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"])(j,{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("d81d");var Pe={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:1,size:this.page.size,groupId:this.query.groupId,openNum:this.query.openNum};this.getDevicesList(t)},detailHandler:function(e){console.log(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){e.groups=t.data.map((function(e){return e.code}))}))}}};const $e=u()(Pe,[["render",Re]]);var qe=$e,Ge=Object(c["gb"])("data-v-4ef70a8e");Object(c["H"])("data-v-4ef70a8e");var Ue={class:"zy-template"},De=Object(c["n"])("div",{class:"zy-main-title title"},"设备列表-路牌",-1),Ie={class:"zy-module search"},Fe=Object(c["m"])("查询"),Ee={id:"map",class:"map"},Ae={key:0,class:"map__panel"};Object(c["F"])();var Te=Ge((function(e,t,n,l,a,r){var o=Object(c["N"])("el-option"),u=Object(c["N"])("el-select"),i=Object(c["N"])("el-form-item"),b=Object(c["N"])("el-button"),s=Object(c["N"])("el-form");return Object(c["E"])(),Object(c["j"])("div",Ue,[De,Object(c["n"])("div",Ie,[Object(c["n"])(s,{ref:"form",model:a.form,"label-width":"60px"},{default:Ge((function(){return[Object(c["n"])(i,{label:"设备码:",class:"zy-search-form-item"},{default:Ge((function(){return[Object(c["n"])(u,{modelValue:a.form.openNum,"onUpdate:modelValue":t[1]||(t[1]=function(e){return a.form.openNum=e}),filterable:"",clearable:"",placeholder:" ",size:"mini"},{default:Ge((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"])(o,{key:e,value:e},null,8,["value"])})),128))]})),_:1},8,["modelValue"])]})),_:1}),Object(c["n"])(b,{type:"primary",size:"mini",onClick:r.submit},{default:Ge((function(){return[Fe]})),_:1},8,["onClick"])]})),_:1},8,["model"])]),Object(c["n"])("div",Ee,[null!=a.device?(Object(c["E"])(),Object(c["j"])("div",Ae,[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)])])})),Se=(n("4160"),n("159b"),{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 Me=u()(Se,[["render",Te],["__scopeId","data-v-4ef70a8e"]]);var He=Me,Ze={class:"zy-template"},Be=Object(c["n"])("div",{class:"zy-main-title"},"用户管理",-1),Je={class:"zy-module"},Ke=Object(c["m"])("查询"),Xe={class:"zy-module"},Ye=Object(c["m"])("是"),Qe=Object(c["m"])("否"),We=Object(c["m"])("配置设备组"),et={class:"dialog-footer"},tt=Object(c["m"])("取 消"),nt=Object(c["m"])("提 交");function ct(e,t,n,l,a,r){var o=Object(c["N"])("el-input"),u=Object(c["N"])("el-form-item"),i=Object(c["N"])("el-button"),b=Object(c["N"])("el-form"),s=Object(c["N"])("el-table-column"),d=Object(c["N"])("el-tag"),p=Object(c["N"])("el-table"),f=Object(c["N"])("el-pagination"),m=Object(c["N"])("el-tree"),j=Object(c["N"])("el-dialog");return Object(c["E"])(),Object(c["j"])("div",Ze,[Be,Object(c["n"])("div",Je,[Object(c["n"])(b,{ref:"form",model:a.query,"label-width":"60px"},{default:Object(c["cb"])((function(){return[Object(c["n"])(u,{label:"关键字:",class:"zy-search-form-item"},{default:Object(c["cb"])((function(){return[Object(c["n"])(o,{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"])(i,{type:"primary",size:"mini",onClick:r.submit},{default:Object(c["cb"])((function(){return[Ke]})),_:1},8,["onClick"])]})),_:1},8,["model"])]),Object(c["n"])("div",Xe,[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"])(s,{prop:"openId",label:"微信open-id",width:"300"}),Object(c["n"])(s,{prop:"randomCode",label:"随机码",width:"180"}),Object(c["n"])(s,{label:"管理员权限",width:"120"},{default:Object(c["cb"])((function(e){return[1===e.row.admin?(Object(c["E"])(),Object(c["j"])(d,{key:0,type:"success"},{default:Object(c["cb"])((function(){return[Ye]})),_:1})):Object(c["k"])("",!0),0===e.row.admin?(Object(c["E"])(),Object(c["j"])(d,{key:1},{default:Object(c["cb"])((function(){return[Qe]})),_:1})):Object(c["k"])("",!0)]})),_:1}),Object(c["n"])(s,{prop:"createTime",label:"注册时间","min-width":"10%"}),Object(c["n"])(s,{label:"操作",width:"200","min-width":"10%"},{default:Object(c["cb"])((function(e){return[Object(c["n"])(i,{onClick:function(t){return r.setGroups(e.row.id)},type:"text",size:"small"},{default:Object(c["cb"])((function(){return[We]})),_:2},1032,["onClick"]),Object(c["n"])(i,{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"])(f,{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"])(j,{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",et,[Object(c["n"])(i,{onClick:t[2]||(t[2]=function(e){return a.groupDialog=!1}),size:"small"},{default:Object(c["cb"])((function(){return[tt]})),_:1}),Object(c["n"])(i,{type:"success",onClick:r.setGroupSubmit,size:"small"},{default:Object(c["cb"])((function(){return[nt]})),_: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"])(u,{label:"配置组:"},{default:Object(c["cb"])((function(){return[Object(c["n"])(m,{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"])])}var lt={data:function(){return{query:{key:""},page:{current:1,size:20},defaultProps:{children:"children",label:"name"},groupDialog:!1,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(console.log(t),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}))}},refresh:function(){var e={key:this.query.key,current:this.page.current,size:this.page.size};this.getUserList(e)}}};const at=u()(lt,[["render",ct]]);var rt=at,ot=[{path:"/",name:"Layout",component:K,children:[{path:"/logs",name:"Logs",component:le},{path:"/devices/lp",name:"DevicesLp",component:qe},{path:"/map/lp",name:"MapLp",component:He},{path:"/groups",name:"Group",component:_e},{path:"/users",name:"Users",component:rt}]},{path:"/login",name:"Login",component:z}],ut=Object(d["a"])({history:Object(d["b"])(),routes:ot}),it=ut,bt="http://lq.ailishi.org:4032/bms/api/operate/",st={login:bt+"admin/login.do",logout:bt+"admin/logout.do",verify:bt+"admin/verify.do",users:{listPage:bt+"user/listPage.do",adminAccess:bt+"user/adminAccess.do",getNoAccessGroups:bt+"user/getNoAccessGroups.do",saveGroupAccess:bt+"user/saveGroupAccess.do"},lp:{listPage:bt+"device/lp/listPage.do",listAll:bt+"device/lp/listAll.do",detail:bt+"device/lp/detail.do"},logs:{listPage:bt+"logs/listPage.do",instructions:bt+"logs/instruction.do"},group:{listPage:bt+"group/listPage.do",save:bt+"group/save.do",listAll:bt+"group/listAll.do",update:bt+"group/update.do"},webSocket:"wss://www.mang406.top/webSocket/"},dt={URL:st},pt=(n("d3b7"),n("3ca3"),n("ddb0"),n("2b3d"),n("bc3a")),ft=n.n(pt);ft.a.defaults.headers["channel"]="bms",ft.a.interceptors.request.use((function(e){var t=k.getToken();return null!=t&&(e.headers["token"]=JSON.parse(k.getToken()).token),e})),ft.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("请先登录"),it.replace("/login");break;case 500:l["b"].error("服务器开小差了");break;default:l["b"].error("请求状态异常");break}throw"stop"}),(function(e){throw console.log(e),"stop"}));var mt,jt=ft.a,Ot=n("4328"),gt=n.n(Ot);function ht(){null!=mt&&mt.close(),mt=l["a"].service({text:"正在加载"})}function vt(){null!=mt&&mt.close()}var yt={Post:function(e,t){return ht(),new Promise((function(n,c){jt.post(e,gt.a.stringify(t)).then((function(e){n(e)}))["catch"]((function(e){}))["finally"]((function(){vt()}))}))},Get:function(e,t){return ht(),new Promise((function(n,c){jt.get(e,{params:t}).then((function(e){n(e)}))["catch"]((function(e){console.log(e)}))["finally"]((function(){vt()}))}))},Download:function(e,t,n){jt.post(e,gt.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)}))}},_t={Http:yt},kt=Object(c["i"])(s);kt.config.globalProperties.$http=_t.Http,kt.config.globalProperties.$global=dt.URL,kt.use(it).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"},e7ee:function(e,t,n){"use strict";n("2fdb")},fa4b:function(e,t,n){"use strict";n("2413")}});
  2. //# sourceMappingURL=app.ce874635.js.map