ymy 1 سال پیش
والد
کامیت
df59a5cbaa

+ 8 - 0
src/api/base/equipment.js

@@ -60,4 +60,12 @@ export function adList(data) {
     method: 'get',
     params:data
   })
+}
+//修改第三方设备状态
+export function otherEquipState(data) {
+  return request({
+    url:'/equimpent/equipmentOnStateChange',
+    method: 'get',
+    params:data
+  })
 }

+ 19 - 2
src/benyun/components/byArea/byArea.vue

@@ -82,7 +82,8 @@
   }
 */
 
-  import { computed,getCurrentInstance,nextTick  } from "vue";
+  import { computed,getCurrentInstance,nextTick,onUnmounted  } from "vue";
+  import $bus from '@/benyun/utils/bus.js'
   const { proxy } = getCurrentInstance();
   const value = ref('')
   const config = ref({})
@@ -311,7 +312,20 @@
   }
   const onChange = () => {
     let data = getValue()
-    emit('onChange', data)
+    emit('onChange', data);
+    let objData = {
+      provinceCode: provinceCode.value,
+      cityCode: cityCode.value,
+      countyCode: countyCode.value,
+      townCode: townCode.value,
+      province: province.value,
+      city: city.value,
+      county: county.value,
+      town: town.value,
+      area: area.value,
+      areaCode: areaCode.value
+    }
+    $bus.emit('areaEvent',objData);// 提供数据
   }
   //获取省数据
   const getProvince = () => {
@@ -370,6 +384,9 @@
       data.success(res.data);
     }).catch(err => {})
   }
+  onUnmounted(() => {
+      $bus.off('areaEvent');
+  });
 
   defineExpose({
     getValue,setValue,getConfig,setConfig,clearValue

+ 8 - 0
src/benyun/components/bySelect/bySelect.vue

@@ -12,6 +12,7 @@
       <el-option
         v-for="item in options"
         :key="item[itemValue]"
+        :disabled="eventDisable(item)"
         :label="item[itemLabel]"
         :value="item[itemValue]">
       </el-option>
@@ -72,6 +73,13 @@
       return config.value.request ? config.value.request : null;
     }
   })
+  const eventDisable = item => {
+    if(attrs.value.disabledHandle){
+      return attrs.value.disabledHandle(item)
+    }
+    return false
+    
+  }
   //设置配置
   const setConfig = c => {
     if(c){

+ 5 - 2
src/benyun/components/moduleView/moduleView.vue

@@ -9,7 +9,7 @@
   >
     <transition name="el-zoom-in-top">
       <div class="search" v-if="searchConfig" v-show="!hideSearch">
-        <by-form :propConfig="searchConfig" :ref="searchID"></by-form>
+        <by-form class="search-filter" :propConfig="searchConfig" :ref="searchID"></by-form>
         <div class="search-btn">
           <el-button type="primary" icon="Search" @click="search">搜索</el-button>
           <el-button icon="Refresh" @click="resert">重置</el-button>
@@ -331,9 +331,12 @@
   .search{
     width: 100%;
     padding-bottom: 8px;
+    display: flex;
+    justify-content: space-between;
     .search-btn{
-      width: 100%;
+      width: 200px;
       display: flex;
+      flex-shrink: 0;
       justify-content: flex-end;
     }
   }

+ 3 - 0
src/benyun/utils/bus.js

@@ -0,0 +1,3 @@
+import mitt from 'mitt';
+const $bus = mitt();
+export default $bus;

+ 34 - 3
src/components/mapMaker/index.vue

@@ -3,7 +3,8 @@
 </template>
 
 <script setup>
-  import { computed,getCurrentInstance,nextTick, ref  } from "vue";
+  import { computed,getCurrentInstance,nextTick, ref,onMounted  } from "vue";
+  import $bus from '@/benyun/utils/bus.js'
   const { proxy } = getCurrentInstance();
   const value = ref('')
   const config = ref({})
@@ -13,6 +14,7 @@
   const zoom = ref(12) //地图层级
   const emit = defineEmits();
   const _id = ref('')
+  const geocoder = ref('');
   const props = defineProps({
     propConfig:{},
     propValue:{},
@@ -64,7 +66,14 @@
   const initMap = callback => {
     if(map.value) return
     map.value = new T.Map(_id.value);
-    map.value.centerAndZoom(new T.LngLat(109.411030,24.328160), zoom.value);
+    //创建对象 
+		geocoder.value = new T.Geocoder();
+    if(lng.value && lat.value){
+      map.value.centerAndZoom(new T.LngLat(lng.value,lat.value), zoom.value);
+    }else{
+      map.value.centerAndZoom(new T.LngLat(109.411030,24.328160), zoom.value);
+    }
+    
     const cp = new T.CoordinatePickup(map.value, {callback: getLngLat})
     cp.addEvent();
     if(callback) {
@@ -96,12 +105,23 @@
               getLngLat({lng:lng.value,lat:lat.value})
             })
           }else{
+            map.value.centerAndZoom(new T.LngLat(lng.value,lat.value), zoom.value);
             getLngLat({lng:lng.value,lat:lat.value})
           }
         }
       }
     })
   }
+  const searchResult = result => {
+    if(result.getStatus() == 0){
+			map.value.panTo(result.getLocationPoint(), zoom.value);
+      // map.value.clearOverLays();
+      // //创建标注对象
+      // var marker = new T.Marker(result.getLocationPoint());
+      // //向地图上添加标注
+      // map.value.addOverLay(marker);
+		}
+  }
 
   defineExpose({
     getValue,getConfig,setConfig,clearValue,setValue
@@ -118,7 +138,18 @@
   nextTick(() => {
     initMap()
   })
-  
+  // 接收数据
+onMounted(()=>{
+  $bus.on('areaEvent',(data)=>{
+    let area = data.area ? data.area : '';
+    if(area){
+      area = area.replaceAll('/','');
+      if(geocoder.value){
+        geocoder.value.getPoint(area, searchResult);
+      }
+    }
+  })
+})
 
 </script>
 

+ 46 - 1
src/main.js

@@ -12,6 +12,8 @@ import store from './store'
 import router from './router'
 import directive from './directive' // directive
 
+import { getQueryObject } from '@/utils'
+
 // 注册指令
 import plugins from './plugins' // plugins
 import request from '@/utils/request'
@@ -142,9 +144,52 @@ function importJS() { // 引入 "天地图"
   })
 }
 
+const omsLogin = () => {
+  let params = getQueryObject();
+  const ticket = params.ticket;
+  const ssoToken = params.ssoToken;
+  if(ticket || ssoToken){
+    let data = {}
+    const url = ticket ? '/sso/doLoginByTicket' : '/sso/doLoginByToken'
+    if(ticket) {
+      data.ticket = ticket
+    }
+    if(ssoToken) {
+      data.token = ssoToken
+    }
+    store.dispatch('GetToken',{
+      url,data
+    }).then(() => {
+      unitVue()
+    }).catch(err => {
+      let msg = '未知错误,请联系管理员!'
+      if(err && err.msg) {
+        msg = err.msg
+      }
+      MessageBox.alert(msg, '提示', {
+        confirmButtonText: '确定',
+        callback: () => {
+          store.dispatch('LogOut').then(() => {})
+        }
+      });
+    })
+  }else if(getToken()){
+    unitVue()
+  }else{
+    const redirect = location.origin
+    location.href = `${import.meta.env.VITE_APP_LOGIN_URL}?&redirect=${encodeURIComponent(redirect)}`
+  }
+}
+
+const unitVue = () => {
+  Promise.all([importJS()]).then(result => {
+    app.mount('#app')
+  })
+}
+
+// omsLogin()
 
 Promise.all([importJS()]).then(result => {
   app.mount('#app')
 })
 
-

+ 42 - 40
src/permission.js

@@ -12,7 +12,7 @@ import { getQueryObject } from '@/utils'
 
 NProgress.configure({ showSpinner: false });
 
-// const whiteList = ['/login', '/register','/demo/table'];
+const whiteList = ['/login', '/register','/demo/table'];
 
 const handle = (to,next) => {
   isRelogin.show = true
@@ -59,47 +59,49 @@ router.beforeEach((to, from, next) => {
     // }
   } else {
 
-    const params = getQueryObject()
-    const ticket = params.ticket;
-    const ssoToken = params.ssoToken;
-    console.log(params)
-    if(!ticket && !ssoToken){
-      const redirect = location.origin
-      location.href = `${import.meta.env.VITE_APP_LOGIN_URL}?&redirect=${encodeURIComponent(redirect)}`
-    }else{
-      const url = ticket ? '/sso/doLoginByTicket' : '/sso/doLoginByToken'
-      let data = {}
-      if(ticket) {
-        data.ticket = ticket
-      }
-      if(ssoToken) {
-        data.token = ssoToken
-      }
-      useUserStore().GetToken({url,data}).then(() =>{
-        handle(to,next)
-      }).catch(err => {
-        let msg = '未知错误,请联系管理员!'
-        if(err && err.msg) {
-         msg = err.msg
-        }
-        ElMessageBox.alert(msg, '提示', {
-          confirmButtonText: '确定',
-          callback: () => {
-            const redirect = location.origin
-            location.href = `${import.meta.env.VITE_APP_LOGIN_URL}?&redirect=${encodeURIComponent(redirect)}`
-          }
-        })
-      })
-    }
+    // const redirect = location.origin
+    // location.href = `${import.meta.env.VITE_APP_LOGIN_URL}?&redirect=${encodeURIComponent(redirect)}`
 
-    // // 没有token
-    // if (whiteList.indexOf(to.path) > -1) {
-    //   // 在免登录白名单,直接进入
-    //   next()
-    // } else {
-    //   next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
-    //   NProgress.done()
+    // const params = getQueryObject()
+    // const ticket = params.ticket;
+    // const ssoToken = params.ssoToken;
+    // if(!ticket && !ssoToken){
+    //   const redirect = location.origin
+    //   location.href = `${import.meta.env.VITE_APP_LOGIN_URL}?&redirect=${encodeURIComponent(redirect)}`
+    // }else{
+    //   const url = ticket ? '/sso/doLoginByTicket' : '/sso/doLoginByToken'
+    //   let data = {}
+    //   if(ticket) {
+    //     data.ticket = ticket
+    //   }
+    //   if(ssoToken) {
+    //     data.token = ssoToken
+    //   }
+    //   useUserStore().GetToken({url,data}).then(() =>{
+    //     handle(to,next)
+    //   }).catch(err => {
+    //     let msg = '未知错误,请联系管理员!'
+    //     if(err && err.msg) {
+    //      msg = err.msg
+    //     }
+    //     ElMessageBox.alert(msg, '提示', {
+    //       confirmButtonText: '确定',
+    //       callback: () => {
+    //         const redirect = location.origin
+    //         location.href = `${import.meta.env.VITE_APP_LOGIN_URL}?&redirect=${encodeURIComponent(redirect)}`
+    //       }
+    //     })
+    //   })
     // }
+
+    // 没有token
+    if (whiteList.indexOf(to.path) > -1) {
+      // 在免登录白名单,直接进入
+      next()
+    } else {
+      next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
+      NProgress.done()
+    }
   }
 })
 

+ 24 - 23
src/views/base/adManage/index.vue

@@ -40,8 +40,8 @@
         },
         {
           span:8,
-          labelWidth:16,
-          // label:'时间',
+          labelWidth:70,
+          label:'时间',
           prop:'time',
           component:'by-date',
           compConfig:{
@@ -68,12 +68,13 @@
         align:'center',
         // checkbox:true
       },
-      columns:[{
-        title:'广告ID',
-        field:'planId',
-      },
+      columns:[
+      //   {
+      //   title:'广告ID',
+      //   field:'planId',
+      // },
       {
-        title:'广告计划',
+        title:'广告名称',
         isDetail:true,
         field:'planName',
       },
@@ -93,22 +94,22 @@
       {
         title:'上架状态',
         field:'onState',
-        // component:'textChange',
-        // compConfig:{
-        //   attr:{
-        //     data:[{
-        //       label:'上架',
-        //       value:1,
-        //       backgroundColor:'#f0f9eb',
-        //       color:'#67c23a'
-        //     },{
-        //       label:'下架',
-        //       value:0,
-        //       backgroundColor:'#fef0f0',
-        //       color:'#f56c6c'
-        //     }]
-        //   }
-        // }
+        component:'textChange',
+        compConfig:{
+          attr:{
+            data:[{
+              label:'上架',
+              value:'上架',
+              backgroundColor:'#f0f9eb',
+              color:'#67c23a'
+            },{
+              label:'下架',
+              value:'下架',
+              backgroundColor:'#fef0f0',
+              color:'#f56c6c'
+            }]
+          }
+        }
       },
       {
         title:'时间',

+ 2 - 1
src/views/base/adPlan/components/auSuccess.vue

@@ -32,7 +32,8 @@
         },
         {
           span:8,
-          labelWidth:16,
+          // labelWidth:16,
+          label:'推送时间',
           prop:'time',
           component:'by-date',
           compConfig:{

+ 2 - 2
src/views/base/adPlan/components/auditView.vue

@@ -35,8 +35,8 @@
         },
         {
           span:8,
-          labelWidth:16,
-          // label:'时间',
+          // labelWidth:16,
+          label:'推送时间',
           prop:'time',
           component:'by-date',
           compConfig:{

+ 2 - 1
src/views/base/adPlan/components/refuseView.vue

@@ -32,8 +32,9 @@
         },
         {
           span:8,
-          labelWidth:16,
+          // labelWidth:16,
           prop:'time',
+          label:'推送时间',
           component:'by-date',
           compConfig:{
             attr:{

+ 7 - 6
src/views/base/adPutIn/index.vue

@@ -39,8 +39,8 @@
         },
         {
           span:8,
-          labelWidth:16,
-          // label:'时间',
+          labelWidth:120,
+          label:'最后同步时间',
           prop:'time',
           component:'by-date',
           compConfig:{
@@ -68,10 +68,11 @@
         align:'center',
         // checkbox:true
       },
-      columns:[{
-        title:'设备ID',
-        field:'equipmentId',
-      },
+      columns:[
+      //   {
+      //   title:'设备ID',
+      //   field:'equipmentId',
+      // },
       {
         title:'设备名称',
         field:'equipmentName',

+ 26 - 4
src/views/base/equipment/components/stateRadio.vue

@@ -6,7 +6,9 @@
 </template>
 
 <script setup>
+  import { otherEquipState } from '@/api/base/equipment.js'
   import { nextTick, ref } from 'vue'
+
   const emit = defineEmits();
   const radio = ref(null)
   const props = defineProps({
@@ -15,18 +17,38 @@
     parentValue:{}
   })
   const setValue = data => {
-    radio.value = data
+    radio.value = data ? data : 0
+  }
+  const getValue = () => {
+    return radio.value
   }
   const change = () => {
     emit('onChange',radio.value);
+    if(props.parentValue.equipmentCode&&props.parentValue.equipmentId){
+      otherEquipState({
+        equipmentCode:props.parentValue.equipmentCode,
+        change:radio.value ? true : false
+      }).then(() => {
+        proxy.$message({
+          message:'设备状态更新成功!',
+          type:'success'
+        });
+      }).catch(() => {
+        proxy.$message({
+          message:'设备状态更新失败!',
+          type:'error'
+        });
+      })
+    }
+    
   }
   defineExpose({
-    setValue
+    setValue,getValue
   })
 
   nextTick(() => {
-    if(props.propValue || props.propValue === 0){
-      setValue(props.propValue)
+    if(props.parentValue){
+      setValue(props.parentValue.onState)
     }else{
       radio.value = 1
       change()

+ 10 - 21
src/views/base/equipment/index.vue

@@ -31,14 +31,14 @@
           component:'by-input',
           compConfig:{ 
             attr:{
-              placeholder:'请输入设备ID、设备名称、维修人、维修方式',
+              placeholder:'请输入设备编码、设备名称、维修人、维修电话',
               prefixIcon:'vxe-icon-search'
             }
           }
         },{
           span:6,
-          labelWidth:16,
-          // label:'授权状态',
+          labelWidth:80,
+          label:'状态',
           prop:'state',
           component:'by-select',
           compConfig:{ 
@@ -51,17 +51,14 @@
               },{
                 label:'关闭',
                 value:0
-              },{
-                label:'维护中',
-                value:2
               }]
             }
           }
         },
         {
           span:6,
-          labelWidth:16,
-          // label:'在线状态',
+          labelWidth:100,
+          label:'在线状态',
           prop:'onState',
           component:'by-select',
           compConfig:{
@@ -123,11 +120,6 @@
               value:0,
               backgroundColor:'#fef0f0',
               color:'#f56c6c'
-            },{
-              label:'维护中',
-              value:2,
-              backgroundColor:'#f5f9fd',
-              color:'#409EFF'
             }]
           }
         }
@@ -161,7 +153,7 @@
         field:'maintainName'
       },
       {
-        title:'维修电话',
+        title:'维修电话',
         field:'maintainTelephone'
       },
       {
@@ -207,7 +199,7 @@
             state:[
               {required: true, message: '请选择状态', trigger: 'blur'},
             ],
-            addrCodeInfo:[
+            addrCode:[
               {required: true, message: '请选择位置', trigger: 'blur'}
             ],
             addrInfo:[
@@ -217,7 +209,7 @@
               {required: true, message: '请输入维修人', trigger: 'blur'},
             ],
             onState:[
-              {required: true, message: '请输入在线状态', trigger: 'change'},
+              {required: true, message: '请输入在线状态', trigger: 'blur'},
             ],
             maintainTelephone:[
             {required: true, message: '请输入维修人电话', trigger: 'blur'},
@@ -273,9 +265,6 @@
                 },{
                   label:'关闭',
                   value:0
-                },{
-                  label:'维护中',
-                  value:2
                 }]
               }
             }
@@ -291,7 +280,7 @@
             prop:'maintainName',
             component:'by-input'
           },{
-            label:'维修电话',
+            label:'维修电话',
             prop:'maintainTelephone',
             component:'by-input'
           }],
@@ -302,7 +291,7 @@
           // }],
           [{
             label:'位置',
-            prop:'addrCodeInfo',
+            prop:'addrCode',
             component:'by-area',
             compConfig:{
               attr:{

+ 15 - 2
src/views/base/merchantManage/index.vue

@@ -30,7 +30,7 @@
           span:8,
           // label:'设备名称',
           labelWidth:16,
-          prop:'text',
+          prop:'searchText',
           component:'by-input',
           compConfig:{ 
             attr:{
@@ -58,6 +58,10 @@
         // checkbox:true
       },
       columns:[
+      {
+        title:'商户ID',
+        field:'commercialId',
+      },
       {
         isDetail:true,
         title:'商户名称',
@@ -70,7 +74,16 @@
       },
       {
         title:'关联小程序',
-        field:'apps'
+        field:'apps',
+        formatField: row => {
+          let n = ''
+          if(row.apps && row.apps.length > 0){
+            for(const item of row.apps){
+              n = n ? n + ',' + item : item
+            }
+          }
+          return n;
+        }
       },
       {
         title:'联系人',

+ 11 - 7
src/views/base/orderManage/index.vue

@@ -33,8 +33,8 @@ const config = ref({
       },
       {
         span:8,
-        labelWidth:16,
-        // label:'时间',
+        // labelWidth:16,
+        label:'订单时间',
         prop:'time',
         component:'by-date',
         compConfig:{
@@ -73,19 +73,23 @@ const config = ref({
     },
     {
       title:'规格',
-      field:'specs'
+      field:'specs',
+      width:100
     },
     {
       title:'单价',
-      field:'goodsPrice'
+      field:'goodsPrice',
+      width:100
     },
     {
       title:'订单总额',
-      field:'totalPrice'
+      field:'totalPrice',
+      width:100
     },
     {
       title:'交易状态',
-      field:'state'
+      field:'state',
+      width:120
     },
     {
       title:'买家',
@@ -96,7 +100,7 @@ const config = ref({
       field:'vendorName'
     },
     {
-      title:'创建时间',
+      title:'订单时间',
       field:'createTime'
     }]
   }

+ 2 - 2
src/views/base/productManage/index.vue

@@ -34,8 +34,8 @@
         },
         {
           span:8,
-          labelWidth:16,
-          // label:'时间',
+          labelWidth:80,
+          label:'时间',
           prop:'time',
           component:'by-date',
           compConfig:{

+ 4 - 1
src/views/base/shopManage/components/appletView.vue

@@ -130,7 +130,10 @@
                 retConfig:{
                   commercialName:'commercialName',
                   commercialId:'commercialId'
-                }
+                },
+                // disabledHandle: item => {
+                //   return item.state == 1 ? false : true
+                // }
               },
               request:{
                 url:'/app/getCommercialList',

+ 2 - 2
src/views/base/shopManage/components/offlineShop.vue

@@ -31,7 +31,7 @@
           component:'by-input',
           compConfig:{ 
             attr:{
-              placeholder:'请输入店铺ID、店铺名称',
+              placeholder:'请输入区域名称',
               prefixIcon:'vxe-icon-search'
             }
           }
@@ -57,7 +57,7 @@
       columns:[
       {
         isDetail:true,
-        title:'店铺名称',
+        title:'区域名称',
         field:'storeName',
       },
       {

+ 1 - 1
src/views/base/shopManage/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="shop-box">
     <el-tabs v-model="activeName" class="shop-tabs" @tab-change="tabChange">
-      <el-tab-pane label="线下店铺" name="first">
+      <el-tab-pane label="线下区域" name="first">
         <offlineShop ref="first" />
       </el-tab-pane>
       <el-tab-pane label="小程序" name="second">

+ 28 - 31
src/views/base/userManage/index.vue

@@ -16,12 +16,7 @@
     },
     search:{
       attr:{
-        size:'mini',
-        rules:{
-          name:[{
-            required: true, message: '请输入名称', trigger: 'blur'
-          }]
-        }
+        size:'mini'
       },
       columns:[
         [{
@@ -32,26 +27,27 @@
           component:'by-input',
           compConfig:{ 
             attr:{
-              placeholder:'请输入用户名、手机号',
+              placeholder:'请输入用户ID、用户名、手机号',
               prefixIcon:'vxe-icon-search'
             }
           }
         },
-        {
-          span:8,
-          labelWidth:16,
-          // label:'时间',
-          prop:'time',
-          component:'by-date',
-          compConfig:{
-            attr:{
-              startPlaceholder:'开始时间',
-              endPlaceholder:'结束时间',
-              // format:'yyyy-MM-dd',
-              type:'datetimerange'
-            }
-          }
-        }]
+        // {
+        //   span:8,
+        //   // labelWidth:16,
+        //   label:'扫描时间',
+        //   prop:'time',
+        //   component:'by-date',
+        //   compConfig:{
+        //     attr:{
+        //       startPlaceholder:'开始时间',
+        //       endPlaceholder:'结束时间',
+        //       // format:'yyyy-MM-dd',
+        //       type:'datetimerange'
+        //     }
+        //   }
+        // }
+      ]
       ]
     },
     tool:{
@@ -68,12 +64,13 @@
         align:'center',
         // checkbox:true
       },
-      columns:[{
-        title:'用户ID',
-        field:'userId',
-      },
+      columns:[
+      // {
+      //   title:'用户ID',
+      //   field:'userId',
+      // },
       {
-        title:'用户名',
+        title:'用户名',
         field:'userName',
       },
       {
@@ -81,19 +78,19 @@
         field:'userTelephone'
       },
       {
-        title:'起始接入设备',
+        title:'扫码设备',
         field:'startEquipmentName'
       },
       {
-        title:'起始接入时间',
+        title:'扫描时间',
         field:'startTime'
       },
       {
-        title:'最近接入设备',
+        title:'进去扫描设备',
         field:'endEquipmentName'
       },
       {
-        title:'最近接入时间',
+        title:'进去扫描时间',
         field:'endTime'
       },
       {

+ 15 - 3
src/views/index.vue

@@ -47,8 +47,9 @@
         <div class="title">
           <span>设备</span>
           <div class="eqiup-state">
-            <div class="success">正常使用:{{suc}}台</div>
-            <div class="disad">禁止使用:{{dis}}台</div>
+            <div class="success"><span class="label-state">正常使用:</span>{{suc}}台</div>
+            <div class="disad"><span class="label-state">禁止使用:</span>{{dis}}台</div>
+            <!-- <div class="maintenance"><span class="label-state">维护中:</span>{{maintenance}}台</div> -->
           </div>
         </div>
         <div class="show-main">
@@ -76,6 +77,7 @@
   const equipNum = ref(0);
   const suc = ref(0)
   const dis = ref(0)
+  const maintenance = ref(0)
   const select = ref('month')
   const options = ref([
     {
@@ -147,6 +149,7 @@
       equipNum.value = res.data.total;
       dis.value = res.data[1]
       suc.value = res.data[0]
+      maintenance.value = res.data[2]
     }).catch(() =>{})
   }
 
@@ -163,6 +166,11 @@
 </script>
 
 <style scoped lang="scss">
+.label-state{
+  width: 100px;
+  text-align: right;
+  display: inline-block;
+}
 .home {
   width: calc(100% - 64px);
   height: calc(100% - 48px);
@@ -226,10 +234,14 @@
       font-size: 12px;
       .success{
         color: #00AE66;
-        padding-bottom: 8px;
+        padding-bottom: 4px;
       }
       .disad{
         color: #f00;
+        padding-bottom: 4px;
+      }
+      .maintenance{
+        color: dodgerblue;
       }
     }