Bläddra i källkod

今天头皮发麻的一天

panxiandiao_i 5 år sedan
förälder
incheckning
0da2ae56b8

+ 8 - 8
src/api/HMvehicle.js

@@ -4,25 +4,25 @@ import { HMvehicleUrl } from '@/apiConfig/api'
 // 创建设备/激活设备
 export function createHmVirtualDevice(data) {
   return request({
-    url: HMvehicleUrl + '/virtual-devices/hm/createDevice',
+    url: HMvehicleUrl + '/virtual-devices/ebike/createDevice',
     method: 'post',
     data
   })
 }
 
 // 查询设备信息
-export function queryDeviceInfo(params) {
+export function queryDeviceInfo(data) {
   return request({
-    url: HMvehicleUrl + '/virtual-devices/hm/queryDeviceInfo',
-    method: 'get',
-    params
+    url: HMvehicleUrl + '/virtual-devices/ebike/queryDeviceInfo',
+    method: 'post',
+    data
   })
 }
 
 // 删除设备
 export function delHmVirtualDevice(params) {
   return request({
-    url: HMvehicleUrl + '/virtual-devices/hm/delDevice',
+    url: HMvehicleUrl + '/virtual-devices/ebike/delDevice',
     method: 'get',
     params
   })
@@ -31,7 +31,7 @@ export function delHmVirtualDevice(params) {
 // 下线设备
 export function offHmvirtualDevice(params) {
   return request({
-    url: HMvehicleUrl + '/virtual-devices/hm/offDevice',
+    url: HMvehicleUrl + '/virtual-devices/ebike/offDevice',
     method: 'get',
     params
   })
@@ -40,7 +40,7 @@ export function offHmvirtualDevice(params) {
 // 更新锁状态
 export function updateLockStatus(params) {
   return request({
-    url: HMvehicleUrl + '/virtual-devices/hm/updateLockStatus',
+    url: HMvehicleUrl + '/virtual-devices/ebike/updateLockStatus',
     method: 'get',
     params
   })

+ 18 - 0
src/api/qualityCenter.js

@@ -81,3 +81,21 @@ export function getClientInfo(params) {
     params
   })
 }
+
+// 热修复数据
+export function getHotpatch(params) {
+  return request({
+    url: qualityUrl + '/api/app/get-hotpatch-count',
+    method: 'get',
+    params
+  })
+}
+
+// 热修复数据详情
+export function getHotpatchProcess(params) {
+  return request({
+    url: qualityUrl + '/api/app/get-hotpatch',
+    method: 'get',
+    params
+  })
+}

+ 1 - 1
src/apiConfig/api.js

@@ -6,4 +6,4 @@ export const mockUrl = 'http://10.179.24.176:8980' // 线下
 
 export const qualityUrl = 'http://10.179.209.19:8898' // 质量度量
 
-export const HMvehicleUrl = 'http://172.23.161.143:9999' // 电单车
+export const HMvehicleUrl = 'http://172.23.162.108:9999' // 电单车

+ 7 - 0
src/router/index.js

@@ -470,6 +470,13 @@ export const constantRoutes = [
             hidden: true,
             component: () => import('@/views/quality/qualityDefectProcess.vue'),
             meta: { title: '缺陷过程' }
+          },
+          {
+            path: 'qualityHotpatchProcess',
+            name: '热修复过程',
+            hidden: true,
+            component: () => import('@/views/quality/qualityHotpatchProcess.vue'),
+            meta: { title: '热修复过程' }
           }
         ]
       },

+ 15 - 2
src/views/Platform/defectManagement.vue

@@ -345,11 +345,24 @@ export default {
     dataQuery(e) {
       this.bizJson = localStorage.getItem('key')
       this.indexPage = e
+      this.curIndex = 0
       this.indexPage.bizId = this.bizJson
       this.indexPage.pageSize = this.pageSize
       this.indexPage.curIndex = this.curIndex
       bugList(this.indexPage).then(res => {
         this.tableData = res.data
+        this.total = res.total
+      })
+    },
+    dataQueryInSearch(e) {
+      this.bizJson = localStorage.getItem('key')
+      this.indexPage = e
+      this.indexPage.bizId = this.bizJson
+      this.indexPage.pageSize = this.pageSize
+      this.indexPage.curIndex = this.curIndex
+      bugList(this.indexPage).then(res => {
+        this.tableData = res.data
+        this.total = res.total
       })
     },
     // // 删除报告
@@ -417,11 +430,11 @@ export default {
     },
     handleSizeChange(size) {
       this.pageSize = size
-      this.getList()
+      this.dataQueryInSearch(this.queryCode)
     },
     handleCurrentChange(curIndex) {
       this.curIndex = curIndex
-      this.getList()
+      this.dataQueryInSearch(this.queryCode)
     },
     createdCode() {
       // this.titName = '新建'

+ 15 - 2
src/views/onlineProblem/problemList.vue

@@ -158,11 +158,24 @@ export default {
     dataQuery(e) {
       this.bizJson = localStorage.getItem('key')
       this.indexPage = e
+      this.curIndex = 0
       this.indexPage.bizId = this.bizJson
       this.indexPage.pageSize = this.pageSize
       this.indexPage.curIndex = this.curIndex
       bugList(this.indexPage).then(res => {
         this.tableData = res.data
+        this.total = res.total
+      })
+    },
+    dataQueryInSearch(e) {
+      this.bizJson = localStorage.getItem('key')
+      this.indexPage = e
+      this.indexPage.bizId = this.bizJson
+      this.indexPage.pageSize = this.pageSize
+      this.indexPage.curIndex = this.curIndex
+      bugList(this.indexPage).then(res => {
+        this.tableData = res.data
+        this.total = res.total
       })
     },
     // // 删除报告
@@ -204,11 +217,11 @@ export default {
     },
     handleSizeChange(size) {
       this.pageSize = size
-      this.getList()
+      this.dataQueryInSearch(this.queryCode)
     },
     handleCurrentChange(curIndex) {
       this.curIndex = curIndex
-      this.getList()
+      this.dataQueryInSearch(this.queryCode)
     },
     createdCode() {
       this.form = {}

+ 3 - 0
src/views/quality/qualityDefectProcess.vue

@@ -125,6 +125,9 @@ export default {
     handleCurrentChange(curIndex) {
       this.curIndex = curIndex
       this._initProcess()
+    },
+    errorFun(errorText) {
+      this.$notify({ title: 'Failed', message: errorText, type: 'error', duration: 2000 })
     }
   }
 }

+ 164 - 0
src/views/quality/qualityHotpatchProcess.vue

@@ -0,0 +1,164 @@
+
+<template>
+  <div id="window-judge" class="set-background">
+    <div class="block">
+      <div style="text-align:right;">
+        <el-link type="primary">指标计算指南</el-link>
+      </div>
+      <div class="title-search-output">
+        <h4>热修复数据</h4>
+        <div class="search-output">
+          <el-input v-model="input" size="medium" style="margin-right:5px" />
+          <el-button plain type="info" size="medium" style="margin-right:35px">搜索</el-button>
+          <el-button size="medium" type="primary">导出</el-button>
+        </div>
+      </div>
+      <el-table
+        :data="tableData"
+        border
+        style="width: 100%"
+        size="mini"
+      >
+        <el-table-column
+          prop="appKey"
+          label="app_Key"
+          align="center"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          prop="appName"
+          label="名称"
+          align="center"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          prop="appVersion"
+          label="版本号"
+          align="center"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          prop="description"
+          label="描述"
+          align="center"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          prop="module"
+          label="资源包地址"
+          align="center"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          prop="bugCreateTime"
+          label="问题类型"
+          align="center"
+          show-overflow-tooltip
+        >
+          <template slot-scope="scope">{{ scope.row.problemType === 1 ? 'Crash修复':'功能修复' }}</template>
+        </el-table-column>
+        <el-table-column
+          prop="publishTime"
+          label="最近放量时间"
+          align="center"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          prop="status"
+          label="状态"
+          align="center"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          prop="submitTime"
+          label="提交时间"
+          align="center"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          prop="submitter"
+          label="提交人"
+          align="center"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          prop="typeName"
+          label="type"
+          align="center"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          prop="versionNum"
+          label="version"
+          align="center"
+          show-overflow-tooltip
+        />
+      </el-table>
+    </div>
+  </div>
+</template>
+
+<script>
+import { getHotpatchProcess } from '@/api/qualityCenter'
+// import { apiBusinessLineAll } from '@/api/qualityMeasurement.js'
+// import Json from '@/api/home.json'
+export default {
+  data() {
+    return {
+      tableData: [],
+      input: '',
+      processSerach: {}
+    }
+  },
+  created() {
+    this._initProcess()
+  },
+  methods: {
+    _initProcess() {
+      this.processSerach = { appKey: 'f9a0bc6213db35deb155ff08bffa90a9' }
+      getHotpatchProcess(this.processSerach).then(res => {
+        res.code === 0 ? this.tableData = res.data.ahs : this.errorFun(res.msg)
+      })
+    },
+    errorFun(errorText) {
+      this.$notify({ title: 'Failed', message: errorText, type: 'error', duration: 2000 })
+    }
+  }
+}
+</script>
+
+<style lang="stylus" scoped>
+  .set-background
+    background-color #F2F3F6
+    display flex
+    justify-content center
+    .block
+      background-color rgba(255,255,255,1)
+      box-shadow 0px 0px 11px 0px rgba(238,240,245,1)
+      border-radius 7px
+      width 97%
+      min-height calc(100vh - 100px)
+      margin-top 25px
+      padding 29px 20px
+      margin-bottom 22px
+      .title-search-output
+        display flex
+        align-items center
+        justify-content space-between
+        margin 15px 0
+        h4
+          border-left 4px solid #4665b2
+          padding-left 10px
+          color #5A738E
+        .search-output
+          display flex
+          justify-content space-around
+    .block >>> th
+      background-color #F1F4F7 !important
+      font-size 10px
+    .block >>> .el-table__body-wrapper  .cell
+      font-size 10px
+      white-space nowrap
+      text-overflow ellipsis
+      overflow hidden
+</style>

+ 101 - 39
src/views/quality/qualityMeasurement.vue

@@ -5,7 +5,7 @@
       <el-menu :default-active="activeIndex" active-text-color="#409EFF" mode="horizontal" @select="handleSelect">
         <el-menu-item index="0">业务线数据</el-menu-item>
         <el-menu-item index="3">部门数据</el-menu-item>
-        <!-- <el-menu-item index="5">客户端数据</el-menu-item> -->
+        <el-menu-item index="5">客户端数据</el-menu-item>
       </el-menu>
       <el-date-picker
         v-model="timeInterval"
@@ -19,14 +19,29 @@
     </el-header>
     <el-container style="height:calc(100vh - 140px);">
       <el-aside class="aside">
-        <el-tree ref="treeBox" accordion :data="dealWithBusinessDate" node-key="id" highlight-current :props="defaultProps" style="margin-top:20px" @node-click="handleNodeClick" />
+        <el-tree ref="treeBox" :default-expanded-keys="expandedClient" accordion :data="dealWithBusinessDate" node-key="id" highlight-current :props="defaultProps" style="margin-top:20px" @node-click="handleNodeClick" />
       </el-aside>
       <el-main class="combine-table">
         <el-tabs v-model="activeIndexSecondary" @tab-click="handleClick">
           <el-tab-pane :label="guild" name="first">
             <!-- 上线过程 -->
-            <h4>1.上线过程</h4>
+            <h4>1. 上线过程</h4>
             <el-table
+              v-show="pauseKey === 5"
+              :data="clientOnline"
+              border
+              style="width: 100%"
+              size="mini"
+            >
+              <el-table-column
+                label="上线总数"
+                align="center"
+              >
+                <template slot-scope="scope"><a href="javascript:void(0)" style="color:#20a0ff" @click="toClientView()">{{ scope.row.clientOnlineCount }}</a></template>
+              </el-table-column>
+            </el-table>
+            <el-table
+              v-show="pauseKey !== 5"
               :data="[onlineProcess]"
               border
               style="width: 100%"
@@ -49,6 +64,7 @@
               </el-table-column>
             </el-table>
             <el-table
+              v-show="pauseKey !== 5"
               :data="[onlineProcess]"
               border
               style="width: 100%"
@@ -97,6 +113,7 @@
               </el-table-column>
             </el-table>
             <el-table
+              v-show="pauseKey !== 5"
               :data="[onlineProcess]"
               border
               style="width: 100%"
@@ -168,6 +185,7 @@
               </el-table-column>
             </el-table>
             <el-table
+              v-show="pauseKey !== 5"
               :data="[onlineProcess]"
               border
               style="width: 100%"
@@ -202,8 +220,9 @@
               />
             </el-table>
             <!-- 线上问题 -->
-            <h4>2.线上问题</h4>
+            <h4 v-show="pauseKey !== 5">2. 线上问题</h4>
             <el-table
+              v-show="pauseKey !== 5"
               :data="[problemData]"
               border
               style="width: 100%"
@@ -211,7 +230,7 @@
             >
               <el-table-column
                 prop="totalCount"
-                label="上线次数"
+                label="问题总数"
                 width="170"
                 align="center"
               />
@@ -265,24 +284,13 @@
               </el-table-column>
             </el-table>
             <el-table
+              v-show="pauseKey !== 5"
               :data="[problemData]"
               border
               style="width: 100%"
               class="move-border-top"
               size="mini"
             >
-              <el-table-column
-                prop="unResponsibilityTimeCount"
-                label="未定责P5+问题"
-                style="width:25%;"
-                align="center"
-              />
-              <el-table-column
-                prop="historyResponsibilityCount"
-                label="遗留P5+问题定责"
-                style="width:25%;"
-                align="center"
-              />
               <el-table-column
                 prop="handleDurationPercent"
                 label="线上问题处理完成率"
@@ -297,8 +305,9 @@
               />
             </el-table>
             <!-- 线下缺陷 -->
-            <h4>3.线下缺陷</h4>
+            <h4 v-show="pauseKey !== 5">3. 线下缺陷</h4>
             <el-table
+              v-show="pauseKey !== 5"
               :data="[DefeatData]"
               border
               style="width: 100%"
@@ -440,7 +449,7 @@
 
 <script>
 import axios from 'axios'
-import { getBusiness, getDepartment, getOnlineProblem, getOnlineAllCount, getOnlineVitium, getHandlerCount } from '@/api/qualityCenter'
+import { getBusiness, getDepartment, getOnlineProblem, getOnlineAllCount, getOnlineVitium, getHandlerCount, getClientInfo, getHotpatch } from '@/api/qualityCenter'
 
 export default {
   filters: {
@@ -461,6 +470,8 @@ export default {
       guild: '',
       businessData: [],
       DefeatData: [],
+      expandedClient: [],
+      noWayId: 1,
       problemData: '',
       defaultProps: {
         children: 'child',
@@ -468,6 +479,9 @@ export default {
       },
       loadingOnlineProcess: true,
       activeIndex: '0',
+      clientOnline: [{
+        clientOnlineCount: ''
+      }],
       activeIndexSecondary: 'first',
       // timeInterval: '',
       pauseTreeNode: {},
@@ -488,7 +502,7 @@ export default {
     async _initBusinessTreeAndBeginInfo() {
       this.loadingOnlineProcess = true
       await getBusiness().then(res => {
-        this.businessData = res.code === 0 ? res.data : ''
+        res.code === 0 ? this.businessData = res.data : this.errorFun(res.msg)
         const processFunc = (arr) => { // modules和child
           arr.forEach((each) => {
             if (each.modules) {
@@ -510,7 +524,7 @@ export default {
     async initDepartmentTree() {
       this.loadingOnlineProcess = true
       await getDepartment().then(res => {
-        this.dealWithBusinessDate = res.code === 0 ? res.data : ''
+        res.code === 0 ? this.dealWithBusinessDate = res.data : this.errorFun(res.msg)
         this.pauseTreeNode = this.dealWithBusinessDate[0] ? this.dealWithBusinessDate[0] : ''
         this.pauseKey = 3
         this.pauseId = this.pauseTreeNode.id ? this.pauseTreeNode.id : ''
@@ -518,23 +532,36 @@ export default {
       this.deleteAfter()
     },
     // 点击客户端数据导航栏显示默认数据
-    // async initClientTree() {
-    //   // this.loadingOnlineProcess = true
-    //   await getClientInfo().then(res => {
-    //     this.businessData = res.code === 0 ? res.data : ''
-    //     this.dealWithBusinessDate = this.businessData.map(each => ({
-    //       ...each,
-    //       child: each.details.map(detail => ({
-    //         ...detail,
-    //         name: detail.step
-    //       }))
-    //     }))
-    //     this.pauseTreeNode = this.dealWithBusinessDate[0] ? this.dealWithBusinessDate[0] : ''
-    //     this.pauseKey = 5
-    //     this.pauseId = this.pauseTreeNode.appKey ? this.pauseTreeNode.appKey : ''
-    //   })
-    //   this.clientAfter()
-    // },
+    async initClientTree() {
+      this.loadingOnlineProcess = true
+      await getClientInfo().then(res => {
+        res.code === 0 ? this.businessData = res.data : this.errorFun(res.msg)
+        this.dealWithBusinessDate = this.businessData.map(each => ({
+          ...each,
+          id: this.noWayId++,
+          child: each.details.map(detail => ({
+            ...detail,
+            name: detail.osType,
+            id: each.name + detail.appKey + detail.osType
+          }))
+        }))
+        this.pauseTreeNode = this.dealWithBusinessDate[0].child[0] ? this.dealWithBusinessDate[0].child[0] : ''
+        this.expandedClient = [this.dealWithBusinessDate[0].id]
+        this.pauseKey = 5
+        this.pauseId = this.pauseTreeNode.id ? this.pauseTreeNode.id : ''
+      })
+      this.clientAfter()
+    },
+    // 客户端数据
+    clientAfter() {
+      this.guild = this.treeGuideClient(this.dealWithBusinessDate, this.pauseTreeNode.id).join('/')
+      // const pretermitSearch = { appKey: 'f9a0bc6213db35deb155ff08bffa90a9', startTime: this.timeInterval[0], endTime: this.timeInterval[1] }
+      const pretermitSearch = { appKey: 'f9a0bc6213db35deb155ff08bffa90a9' }
+      getHotpatch(pretermitSearch).then((res) => {
+        res.code === 0 ? this.clientOnline[0].clientOnlineCount = res.data : this.errorFun(res.msg)
+        this.loadingOnlineProcess = false
+      })
+    },
     // 部门table数据不需要缺陷数据
     deleteAfter() {
       this.guild = this.treeGuide(this.dealWithBusinessDate, this.pauseTreeNode.id, this.pauseTreeNode.type).join('/')
@@ -613,6 +640,16 @@ export default {
       })
       window.open(href, '_blank')
     },
+    toClientView() {
+      // 新页面跳转
+      const { href } = this.$router.resolve({
+        name: '热修复过程',
+        query: {
+          appKey: this.pauseTreeNode.appKey
+        }
+      })
+      window.open(href, '_blank')
+    },
     toDefectView() {
       // 新页面跳转
       const { href } = this.$router.resolve({
@@ -640,12 +677,31 @@ export default {
       getPath(myArr, id, type)
       return res
     },
+    // 树形结构导航
+    treeGuideClient(myArr, id) {
+      let res
+      // path,存储路径
+      const getPath = (arr, id, path = []) => {
+        return arr.reduce((a, c) => {
+          if (c.id === id) {
+            res = [...path, c.name]
+          }
+          if (c.child) {
+            return getPath(c.child, id, [...path, c.name])
+          }
+        }, [])
+      }
+      getPath(myArr, id)
+      return res
+    },
     // 业务树
     handleNodeClick(data) {
       this.loadingOnlineProcess = true
       this.pauseTreeNode = data
       this.pauseId = data.id
-      this.pauseKey = data.type
+      if (this.pauseKey !== 5) {
+        this.pauseKey = data.type
+      }
       if (this.pauseKey === 3 && this.activeIndexSecondary === 'first') {
         this.deleteAfter()
         return
@@ -653,6 +709,12 @@ export default {
         this.guild = this.treeGuide(this.dealWithBusinessDate, this.pauseTreeNode.id, this.pauseTreeNode.type).join('/')
         this.handleClick()
         return
+      } else if (this.pauseKey === 5 && this.pauseTreeNode.appKey) {
+        this.clientAfter()
+        return
+      } else if (this.pauseKey === 5 && !this.pauseTreeNode.appKey) {
+        this.loadingOnlineProcess = false
+        return
       }
       this.allCountAndProlemGet()
     },

+ 6 - 3
src/views/quality/qualityProcess.vue

@@ -24,17 +24,20 @@
           prop="model"
           label="模块"
           align="center"
+          show-overflow-tooltip
         />
         <el-table-column
           prop="odinId"
           label="上线单号"
           align="center"
           width="70"
+          show-overflow-tooltip
         />
         <el-table-column
           prop="name"
           label="项目名称"
           align="center"
+          show-overflow-tooltip
         />
         <el-table-column
           prop="handlerZh"
@@ -147,6 +150,9 @@ export default {
     handleCurrentChange(curIndex) {
       this.curIndex = curIndex
       this._initProcess()
+    },
+    errorFun(errorText) {
+      this.$notify({ title: 'Failed', message: errorText, type: 'error', duration: 2000 })
     }
   }
 }
@@ -185,7 +191,4 @@ export default {
       margin 0 0 10px 0
     .block >>> .el-table__body-wrapper  .cell
       font-size 10px
-      white-space nowrap
-      text-overflow ellipsis
-      overflow hidden
 </style>

+ 10 - 60
src/views/virtualDevices/HMvehicle.vue

@@ -41,12 +41,6 @@
               style="width: 100%"
               size="mini"
             >
-              <el-table-column
-                prop="id"
-                label="ID"
-                align="center"
-                width="50"
-              />
               <el-table-column
                 prop="vehicleId"
                 label="车辆ID"
@@ -103,7 +97,7 @@
                   <div class="specail-lock">
                     <div :class="{ 'el-icon-lock': scope.row.lockStatus === 0 ,'el-icon-unlock': scope.row.lockStatus === 1}" @click="updateLock(scope.row.ecuId, scope.row.lockStatus)" />
                     <div>
-                      <el-button size="mini" type="success" plain @click="activate(scope.row.ecuId, scope.row.vehicleId, scope.row.batteryId, scope.row.imsi, scope.row.imei, scope.row.vehicleVersion, scope.row.cityName)">激活</el-button>
+                      <el-button size="mini" type="success" plain @click="activate(scope.row.ecuId, scope.row.vehicleId, 'BAT0118022210043', scope.row.imsi, scope.row.imei, scope.row.vehicleVersion, scope.row.cityName)">激活</el-button>
                       <el-button size="mini" type="info" plain @click="offHmvirtual(scope.row.ecuId)">下线</el-button>
                       <el-button size="mini" type="danger" @click="dialogBug(scope.row.ecuId)">删除</el-button>
                       <el-dialog
@@ -161,50 +155,6 @@ export default {
       city: cityJson,
       value: '',
       dialogVisible: false,
-      hmVehicleBaseInfo: {
-        'batteryVoltage': 36511,
-        'controllerTemperature': 25,
-        'holzerVelocity': 2,
-        'rechargeNum': 1,
-        'ridingCurrent': 10,
-        'rscap': 26511,
-        'rsoc': 27,
-        'singleMileage': 10,
-        'soh': 0,
-        'totalMileage': 66,
-        'vehicleStatus': {
-          'vAccStatus': 1,
-          'vBatteryLockStatus': 1,
-          'vBluetoothConnectionStatus': 1,
-          'vBorrowOrReturnStatus': 1,
-          'vExternalBatteryExistStatus': 0,
-          'vHandlerStatus': 1,
-          'vMotorLockStatus': 0,
-          'vMovingStatus': 0,
-          'vRearWheelLockStatus': 0,
-          'vRidingStatus': 0,
-          'vSleepStatus': 0
-        }
-      },
-      hmVehicleBaseStationInfo: {
-        'cellId': 37299,
-        'lac': 8448,
-        'mcc': 1120,
-        'mnc': 0
-      },
-      hmVehicleGpsInfo: {
-        'azimuth': 4,
-        'gpsSignalInfo': {
-          'backupBattery': 9,
-          'gpsLocationStatus': 1,
-          'gpsSatelliteNum': 9,
-          'gpsSignalStrength': 9
-        },
-        'gpsSpeed': 0,
-        'high': 1.2,
-        'lat': 31.85659153128749,
-        'lng': 117.26081489617174
-      },
       lockOptions: [
         {
           name: '未开启',
@@ -237,7 +187,7 @@ export default {
     _queryDeviceInfo() {
       const params = { page: this.curIndex, pageSize: this.pageSize }
       queryDeviceInfo(params).then(res => {
-        res.success === 1 ? this.tableData = res.data : this.errorFun('initialization')
+        res.code === 200 ? this.tableData = res.data : this.errorFun(res.msg)
         this.loading = false
       })
     },
@@ -257,7 +207,7 @@ export default {
         }
       }
       queryDeviceInfo(queryCode).then(res => {
-        res.success === 1 ? this.tableData = res.data : this.errorFun()
+        res.code === 200 ? this.tableData = res.data : this.errorFun(res.msg)
       })
     },
     createdCode() {
@@ -277,29 +227,29 @@ export default {
           this.successFun('update')
           // this._queryDeviceInfo()
         } else {
-          this.errorFun('update')
+          this.errorFun(res.msg)
         }
       })
     },
     activate(ecuId, vehicleId, batteryId, imsi, imei, vehicleVersion, cityName) {
-      const params = { ecuId: ecuId, vehicleId: vehicleId, batteryId: batteryId, imsi: imsi, imei: imei, vehicleVersion: vehicleVersion, cityName: cityName, hmVehicleBaseInfo: this.hmVehicleBaseInfo, hmVehicleBaseStationInfo: this.hmVehicleBaseStationInfo, hmVehicleGpsInfo: this.hmVehicleGpsInfo }
+      const params = { ecuId: ecuId, vehicleId: vehicleId, batteryId: batteryId, imsi: imsi, imei: imei, vehicleVersion: vehicleVersion, cityName: cityName }
       createHmVirtualDevice(params).then(res => {
         if (res.code === 200) {
           this.successFun('activate')
           this._queryDeviceInfo()
         } else {
-          this.errorFun('activate')
+          this.errorFun(res.msg)
         }
       })
     },
     offHmvirtual(ecuId) {
       const params = { ecuId: ecuId }
       offHmvirtualDevice(params).then(res => {
-        if (res.success === 1) {
+        if (res.code === 200) {
           this.successFun('offLine')
           this._queryDeviceInfo()
         } else {
-          this.errorFun('offLine')
+          this.errorFun(res.msg)
         }
       })
     },
@@ -315,7 +265,7 @@ export default {
           this.successFun('delete')
           this._queryDeviceInfo()
         } else {
-          this.errorFun('delete')
+          this.errorFun(res.msg)
         }
       })
       this.dialogVisible = false
@@ -324,7 +274,7 @@ export default {
       this.$notify({ title: 'Success', message: `${successText} Successfully`, type: 'success', duration: 2000 })
     },
     errorFun(errorText) {
-      this.$notify({ title: 'Failed', message: `${errorText} Failed`, type: 'error', duration: 2000 })
+      this.$notify({ title: 'Failed', message: errorText, type: 'error', duration: 2000 })
     }
   }
 }