qinqiao %!s(int64=5) %!d(string=hai) anos
pai
achega
46580c6219

+ 196 - 196
.eslintrc.js

@@ -1,198 +1,198 @@
 module.exports = {
-  root: true,
-  parserOptions: {
-    parser: 'babel-eslint',
-    sourceType: 'module'
-  },
-  env: {
-    browser: true,
-    node: true,
-    es6: true,
-  },
-  extends: ['plugin:vue/recommended', 'eslint:recommended'],
+    root: true,
+    parserOptions: {
+        parser: 'babel-eslint',
+        sourceType: 'module'
+    },
+    env: {
+        browser: true,
+        node: true,
+        es6: true,
+    },
+    extends: ['plugin:vue/recommended', 'eslint:recommended'],
 
-  // add your custom rules here
-  //it is base on https://github.com/vuejs/eslint-config-vue
-  rules: {
-    "vue/max-attributes-per-line": [2, {
-      "singleline": 10,
-      "multiline": {
-        "max": 1,
-        "allowFirstLine": false
-      }
-    }],
-    "vue/singleline-html-element-content-newline": "off",
-    "vue/multiline-html-element-content-newline":"off",
-    "vue/name-property-casing": ["error", "PascalCase"],
-    "vue/no-v-html": "off",
-    'accessor-pairs': 2,
-    'arrow-spacing': [2, {
-      'before': true,
-      'after': true
-    }],
-    'block-spacing': [2, 'always'],
-    'brace-style': [2, '1tbs', {
-      'allowSingleLine': true
-    }],
-    'camelcase': [0, {
-      'properties': 'always'
-    }],
-    'comma-dangle': [2, 'never'],
-    'comma-spacing': [2, {
-      'before': false,
-      'after': true
-    }],
-    'comma-style': [2, 'last'],
-    'constructor-super': 2,
-    'curly': [2, 'multi-line'],
-    'dot-location': [2, 'property'],
-    'eol-last': 2,
-    'eqeqeq': ["error", "always", {"null": "ignore"}],
-    'generator-star-spacing': [2, {
-      'before': true,
-      'after': true
-    }],
-    'handle-callback-err': [2, '^(err|error)$'],
-    'indent': [2, 2, {
-      'SwitchCase': 1
-    }],
-    'jsx-quotes': [2, 'prefer-single'],
-    'key-spacing': [2, {
-      'beforeColon': false,
-      'afterColon': true
-    }],
-    'keyword-spacing': [2, {
-      'before': true,
-      'after': true
-    }],
-    'new-cap': [2, {
-      'newIsCap': true,
-      'capIsNew': false
-    }],
-    'new-parens': 2,
-    'no-array-constructor': 2,
-    'no-caller': 2,
-    'no-console': 'off',
-    'no-class-assign': 2,
-    'no-cond-assign': 2,
-    'no-const-assign': 2,
-    'no-control-regex': 0,
-    'no-delete-var': 2,
-    'no-dupe-args': 2,
-    'no-dupe-class-members': 2,
-    'no-dupe-keys': 2,
-    'no-duplicate-case': 2,
-    'no-empty-character-class': 2,
-    'no-empty-pattern': 2,
-    'no-eval': 2,
-    'no-ex-assign': 2,
-    'no-extend-native': 2,
-    'no-extra-bind': 2,
-    'no-extra-boolean-cast': 2,
-    'no-extra-parens': [2, 'functions'],
-    'no-fallthrough': 2,
-    'no-floating-decimal': 2,
-    'no-func-assign': 2,
-    'no-implied-eval': 2,
-    'no-inner-declarations': [2, 'functions'],
-    'no-invalid-regexp': 2,
-    'no-irregular-whitespace': 2,
-    'no-iterator': 2,
-    'no-label-var': 2,
-    'no-labels': [2, {
-      'allowLoop': false,
-      'allowSwitch': false
-    }],
-    'no-lone-blocks': 2,
-    'no-mixed-spaces-and-tabs': 2,
-    'no-multi-spaces': 2,
-    'no-multi-str': 2,
-    'no-multiple-empty-lines': [2, {
-      'max': 1
-    }],
-    'no-native-reassign': 2,
-    'no-negated-in-lhs': 2,
-    'no-new-object': 2,
-    'no-new-require': 2,
-    'no-new-symbol': 2,
-    'no-new-wrappers': 2,
-    'no-obj-calls': 2,
-    'no-octal': 2,
-    'no-octal-escape': 2,
-    'no-path-concat': 2,
-    'no-proto': 2,
-    'no-redeclare': 2,
-    'no-regex-spaces': 2,
-    'no-return-assign': [2, 'except-parens'],
-    'no-self-assign': 2,
-    'no-self-compare': 2,
-    'no-sequences': 2,
-    'no-shadow-restricted-names': 2,
-    'no-spaced-func': 2,
-    'no-sparse-arrays': 2,
-    'no-this-before-super': 2,
-    'no-throw-literal': 2,
-    'no-trailing-spaces': 2,
-    'no-undef': 2,
-    'no-undef-init': 2,
-    'no-unexpected-multiline': 2,
-    'no-unmodified-loop-condition': 2,
-    'no-unneeded-ternary': [2, {
-      'defaultAssignment': false
-    }],
-    'no-unreachable': 2,
-    'no-unsafe-finally': 2,
-    'no-unused-vars': [2, {
-      'vars': 'all',
-      'args': 'none'
-    }],
-    'no-useless-call': 2,
-    'no-useless-computed-key': 2,
-    'no-useless-constructor': 2,
-    'no-useless-escape': 0,
-    'no-whitespace-before-property': 2,
-    'no-with': 2,
-    'one-var': [2, {
-      'initialized': 'never'
-    }],
-    'operator-linebreak': [2, 'after', {
-      'overrides': {
-        '?': 'before',
-        ':': 'before'
-      }
-    }],
-    'padded-blocks': [2, 'never'],
-    'quotes': [2, 'single', {
-      'avoidEscape': true,
-      'allowTemplateLiterals': true
-    }],
-    'semi': [2, 'never'],
-    'semi-spacing': [2, {
-      'before': false,
-      'after': true
-    }],
-    'space-before-blocks': [2, 'always'],
-    'space-before-function-paren': [2, 'never'],
-    'space-in-parens': [2, 'never'],
-    'space-infix-ops': 2,
-    'space-unary-ops': [2, {
-      'words': true,
-      'nonwords': false
-    }],
-    'spaced-comment': [2, 'always', {
-      'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
-    }],
-    'template-curly-spacing': [2, 'never'],
-    'use-isnan': 2,
-    'valid-typeof': 2,
-    'wrap-iife': [2, 'any'],
-    'yield-star-spacing': [2, 'both'],
-    'yoda': [2, 'never'],
-    'prefer-const': 2,
-    'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
-    'object-curly-spacing': [2, 'always', {
-      objectsInObjects: false
-    }],
-    'array-bracket-spacing': [2, 'never']
-  }
-}
+    // add your custom rules here
+    //it is base on https://github.com/vuejs/eslint-config-vue
+    rules: {
+        "vue/max-attributes-per-line": [2, {
+            "singleline": 10,
+            "multiline": {
+                "max": 1,
+                "allowFirstLine": false
+            }
+        }],
+        "vue/singleline-html-element-content-newline": "off",
+        "vue/multiline-html-element-content-newline": "off",
+        "vue/name-property-casing": ["error", "PascalCase"],
+        "vue/no-v-html": "off",
+        'accessor-pairs': 2,
+        'arrow-spacing': [2, {
+            'before': true,
+            'after': true
+        }],
+        'block-spacing': [2, 'always'],
+        'brace-style': [2, '1tbs', {
+            'allowSingleLine': true
+        }],
+        'camelcase': [0, {
+            'properties': 'always'
+        }],
+        'comma-dangle': [2, 'never'],
+        'comma-spacing': [2, {
+            'before': false,
+            'after': true
+        }],
+        'comma-style': [2, 'last'],
+        'constructor-super': 2,
+        'curly': [2, 'multi-line'],
+        'dot-location': [2, 'property'],
+        'eol-last': 2,
+        'eqeqeq': ["error", "always", { "null": "ignore" }],
+        'generator-star-spacing': [2, {
+            'before': true,
+            'after': true
+        }],
+        'handle-callback-err': [2, '^(err|error)$'],
+        'indent': [2, 2, {
+            'SwitchCase': 1
+        }],
+        'jsx-quotes': [2, 'prefer-single'],
+        'key-spacing': [2, {
+            'beforeColon': false,
+            'afterColon': true
+        }],
+        'keyword-spacing': [2, {
+            'before': true,
+            'after': true
+        }],
+        'new-cap': [2, {
+            'newIsCap': true,
+            'capIsNew': false
+        }],
+        'new-parens': 2,
+        'no-array-constructor': 2,
+        'no-caller': 2,
+        'no-console': 'off',
+        'no-class-assign': 2,
+        'no-cond-assign': 2,
+        'no-const-assign': 2,
+        'no-control-regex': 0,
+        'no-delete-var': 2,
+        'no-dupe-args': 2,
+        'no-dupe-class-members': 2,
+        'no-dupe-keys': 2,
+        'no-duplicate-case': 2,
+        'no-empty-character-class': 2,
+        'no-empty-pattern': 2,
+        'no-eval': 2,
+        'no-ex-assign': 2,
+        'no-extend-native': 2,
+        'no-extra-bind': 2,
+        'no-extra-boolean-cast': 2,
+        'no-extra-parens': [2, 'functions'],
+        'no-fallthrough': 2,
+        'no-floating-decimal': 2,
+        'no-func-assign': 2,
+        'no-implied-eval': 2,
+        'no-inner-declarations': [2, 'functions'],
+        'no-invalid-regexp': 2,
+        'no-irregular-whitespace': 2,
+        'no-iterator': 2,
+        'no-label-var': 2,
+        'no-labels': [2, {
+            'allowLoop': false,
+            'allowSwitch': false
+        }],
+        'no-lone-blocks': 2,
+        'no-mixed-spaces-and-tabs': 2,
+        'no-multi-spaces': 2,
+        'no-multi-str': 2,
+        'no-multiple-empty-lines': [2, {
+            'max': 1
+        }],
+        'no-native-reassign': 2,
+        'no-negated-in-lhs': 2,
+        'no-new-object': 2,
+        'no-new-require': 2,
+        'no-new-symbol': 2,
+        'no-new-wrappers': 2,
+        'no-obj-calls': 2,
+        'no-octal': 2,
+        'no-octal-escape': 2,
+        'no-path-concat': 2,
+        'no-proto': 2,
+        'no-redeclare': 2,
+        'no-regex-spaces': 2,
+        'no-return-assign': [2, 'except-parens'],
+        'no-self-assign': 2,
+        'no-self-compare': 2,
+        'no-sequences': 2,
+        'no-shadow-restricted-names': 2,
+        'no-spaced-func': 2,
+        'no-sparse-arrays': 2,
+        'no-this-before-super': 2,
+        'no-throw-literal': 2,
+        'no-trailing-spaces': 2,
+        'no-undef': 2,
+        'no-undef-init': 2,
+        'no-unexpected-multiline': 2,
+        'no-unmodified-loop-condition': 2,
+        'no-unneeded-ternary': [2, {
+            'defaultAssignment': false
+        }],
+        'no-unreachable': 2,
+        'no-unsafe-finally': 2,
+        'no-unused-vars': [2, {
+            'vars': 'all',
+            'args': 'none'
+        }],
+        'no-useless-call': 2,
+        'no-useless-computed-key': 2,
+        'no-useless-constructor': 2,
+        'no-useless-escape': 0,
+        'no-whitespace-before-property': 2,
+        'no-with': 2,
+        'one-var': [2, {
+            'initialized': 'never'
+        }],
+        'operator-linebreak': [2, 'after', {
+            'overrides': {
+                '?': 'before',
+                ':': 'before'
+            }
+        }],
+        'padded-blocks': [2, 'never'],
+        'quotes': [2, 'single', {
+            'avoidEscape': true,
+            'allowTemplateLiterals': true
+        }],
+        'semi': [2, 'never'],
+        'semi-spacing': [2, {
+            'before': false,
+            'after': true
+        }],
+        'space-before-blocks': [2, 'always'],
+        'space-before-function-paren': [2, 'never'],
+        'space-in-parens': [2, 'never'],
+        'space-infix-ops': 2,
+        'space-unary-ops': [2, {
+            'words': true,
+            'nonwords': false
+        }],
+        'spaced-comment': [2, 'always', {
+            'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
+        }],
+        'template-curly-spacing': [2, 'never'],
+        'use-isnan': 2,
+        'valid-typeof': 2,
+        'wrap-iife': [2, 'any'],
+        'yield-star-spacing': [2, 'both'],
+        'yoda': [2, 'never'],
+        'prefer-const': 2,
+        'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
+        'object-curly-spacing': [2, 'always', {
+            objectsInObjects: false
+        }],
+        'array-bracket-spacing': [2, 'never']
+    }
+}

+ 110 - 0
src/api/htVehicle.js

@@ -0,0 +1,110 @@
+import request from '@/utils/request'
+import { mockUrl } from '@/apiConfig/virtualDevices'
+// ================================== Rule ======================================
+
+// 获取锁类型、锁供应商类型
+export function queryLockCreateInfo() {
+    return request({
+        url: mockUrl + '/htw/device/queryLockCreateInfo',
+        method: 'get'
+    })
+}
+
+// 查看详情
+export function queryVehicleCreateInfo(params) {
+    return request({
+        url: mockUrl + `/htw/device/queryVehicleCreateInfo?lockModel=` + params,
+        method: 'get',
+        params
+    })
+}
+
+// 获取车类型、车辆供应商类型
+// export function queryVehicleCreateInfo(data) {
+//     return request({
+//         url: mockUrl + '/htw/device/queryVehicleCreateInfo',
+//         method: 'post',
+//         data
+//     })
+// }
+
+// 新建设备
+export function createDevice(data) {
+    return request({
+        url: mockUrl + '/htw/device/createDevice',
+        method: 'post',
+        data
+    })
+}
+
+// 删除设备
+export function deleteDevice(data) {
+    return request({
+        url: mockUrl + `/htw/device/deleteDevice`,
+        method: 'post',
+        data
+    })
+}
+
+// 设备上线开关
+export function deviceOnline(data) {
+    return request({
+        url: mockUrl + '/htw/device/deviceOnline',
+        method: 'post',
+        data
+    })
+}
+
+// 设备下线开关
+export function deviceOffline(data) {
+    return request({
+        url: mockUrl + '/htw/device/deviceOffline',
+        method: 'post',
+        data
+    })
+}
+
+// 设备开锁
+export function unlockVehicle(data) {
+    return request({
+        url: mockUrl + '/htw/device/opt/unlockVehicle',
+        method: 'post',
+        data
+    })
+}
+
+// 设备关锁
+export function lockVehicle(data) {
+    return request({
+        url: mockUrl + '/htw/device/opt/lockVehicle',
+        method: 'post',
+        data
+    })
+}
+
+// 编辑
+export function updateLockAttr(data) {
+    return request({
+        url: mockUrl + '/htw/user/device/updateLockAttr',
+        method: 'post',
+        data
+    })
+}
+
+// 查询用户设备详情(首页刚进来)
+export function getDevices(data) {
+    return request({
+        url: mockUrl + '/htw/user/device/getDevices',
+        method: 'post',
+        data
+    })
+}
+
+// 查询设备属性
+export function getLockAttrInfo(data) {
+    return request({
+        url: mockUrl + '/htw/user/device/getLockAttrInfo',
+        method: 'post',
+        data
+    })
+}

+ 25 - 25
src/api/teamPage.js

@@ -3,44 +3,44 @@ import { mockUrl } from '@/apiConfig/api'
 
 // 新增团队成员
 export function createMembers(data) {
-  return request({
-    url: mockUrl + `/teamMembers/create`,
-    method: 'post',
-    data
-  })
+    return request({
+        url: mockUrl + `/teamMembers/create`,
+        method: 'post',
+        data
+    })
 }
 
 // 修改
 export function updateMembers(data) {
-  return request({
-    url: mockUrl + `/teamMembers/update`,
-    method: 'post',
-    data
-  })
+    return request({
+        url: mockUrl + `/teamMembers/update`,
+        method: 'post',
+        data
+    })
 }
 
 // 删除
 export function deleteMembers(id, data) {
-  return request({
-    url: mockUrl + `/teamMembers/delete?id=` + id,
-    method: 'post',
-    data
-  })
+    return request({
+        url: mockUrl + `/teamMembers/delete?id=` + id,
+        method: 'post',
+        data
+    })
 }
 
 // 查看列表
 export function getMemberList(data) {
-  return request({
-    url: mockUrl + `/teamMembers/ListTeamMember`,
-    method: 'post',
-    data
-  })
+    return request({
+        url: mockUrl + `/teamMembers/ListTeamMember`,
+        method: 'post',
+        data
+    })
 }
 
 // 查看详情
 export function getMembers(id) {
-  return request({
-    url: mockUrl + `/teamMembers/get?id=` + id,
-    method: 'get'
-  })
-}
+    return request({
+        url: mockUrl + `/teamMembers/get?id=` + id,
+        method: 'get'
+    })
+}

+ 3 - 0
src/apiConfig/virtualDevices.js

@@ -0,0 +1,3 @@
+/*eslint-disable*/ //规避eslint的检查,如没有eslint可不写
+// export const mockUrl = 'http://mock.Intra.xiaojukeji.com' // 线上
+export const mockUrl = 'http://172.23.163.93:9999/virtual-devices' // 线下

+ 441 - 386
src/router/index.js

@@ -1,4 +1,3 @@
-
 import Vue from 'vue'
 import Router from 'vue-router'
 
@@ -34,411 +33,467 @@ import Home from '@/views/home/index'
  * a base page that does not have permission requirements
  * all roles can be accessed
  */
-export const constantRoutes = [
-  {
-    path: '/login',
-    component: () => import('@/views/login/index'),
-    hidden: true
-  },
+export const constantRoutes = [{
+        path: '/login',
+        component: () =>
+            import ('@/views/login/index'),
+        hidden: true
+    },
 
-  {
-    path: '/404',
-    component: () => import('@/views/404'),
-    hidden: true
-  },
+    {
+        path: '/404',
+        component: () =>
+            import ('@/views/404'),
+        hidden: true
+    },
 
-  {
-    path: '/',
-    component: Home,
-    hidden: true
-  },
+    {
+        path: '/',
+        component: Home,
+        hidden: true
+    },
 
-  {
-    path: '/home',
-    component: Home,
-    name: '首页',
-    hidden: true
-  },
+    {
+        path: '/home',
+        component: Home,
+        name: '首页',
+        hidden: true
+    },
 
-  // {
-  //   path: '/home',
-  //   component: Layout,
-  //   redirect: '/dashboard',
-  //   children: [{
-  //     path: 'dashboard',
-  //     name: 'Dashboard',
-  //     component: () => import('@/views/dashboard/index'),
-  //     meta: { title: 'Dashboard', icon: 'dashboard' }
-  //   }]
-  // },
-  {
-    path: '/Platform',
-    component: Layout,
-    redirect: '/Platform/workbench',
-    name: '流程管控',
-    meta: { title: '流程管控', icon: 'env' },
-    children: [
-      {
-        path: 'workbench',
-        name: 'workbench',
-        // hidden: true,
-        component: () => import('@/views/Platform/workbench'),
-        meta: { title: '我的工作台' }
-      },
-      {
-        path: 'projectPage',
-        name: 'projectPage',
-        component: () => import('@/views/Platform/projectPage'),
-        meta: { title: '项目管理' }
-      },
-      {
-        path: 'useCasePage',
-        name: 'useCasePage',
-        hidden: true,
-        component: () => import('@/views/Platform/useCasePage'),
-        meta: { title: '用例管理' }
-      },
-      {
-        path: '/Platform/presentation',
-        name: '测试管理',
-        component: () => import('@/views/Platform/presentation/testa'),
-        meta: { title: '测试管理' },
-        children: [
-          {
-            path: 'testPageData',
-            name: '测试计划管理',
-            hidden: true,
-            component: () => import('@/views/Platform/presentation/testPage.vue'),
-            meta: { title: '测试计划管理' }
-          },
-          {
-            path: 'testPresentation',
-            name: '日报报告',
-            component: () => import('@/views/Platform/presentation/testPresentation'),
-            meta: { title: '日报报告' }
-          },
-          {
-            path: 'ResultPage',
-            name: '准出报告',
-            component: () => import('@/views/Platform/presentation/ResultPage'),
-            meta: { title: '准出报告' }
-          },
-          {
-            path: 'Assumptions',
-            name: '提测报告',
-            component: () => import('@/views/Platform/presentation/Assumptions'),
-            meta: { title: '提测报告' }
-          },
-          {
-            path: 'DailyNewsAdded',
-            name: '日报报告',
-            hidden: true,
-            component: () => import('@/views/Platform/presentation/DailyNewsAdded'),
-            meta: { title: '新增日报报告' }
-          },
-          {
-            path: 'presentationReport',
-            name: '提测报告',
-            hidden: true,
-            component: () => import('@/views/Platform/presentation/presentationReport'),
-            meta: { title: '新增服务器提测报告' }
-          },
-          {
-            path: 'acceptTheReport',
-            name: '提测预览',
-            hidden: true,
-            component: () => import('@/views/Platform/presentation/acceptTheReport'),
-            meta: { title: '提测预览' }
-          },
-          {
-            path: 'testPresenyL',
-            name: '日报预览',
-            hidden: true,
-            component: () => import('@/views/Platform/presentation/testPresenyL'),
-            meta: { title: '日报预览' }
-          },
-          {
-            path: 'ResultPageyL',
-            name: '准出预览',
-            hidden: true,
-            component: () => import('@/views/Platform/presentation/ResultPageyL'),
-            meta: { title: '准出预览' }
-          },
-          {
-            path: 'Acceptance',
-            name: '准出报告',
-            hidden: true,
-            component: () => import('@/views/Platform/presentation/Acceptance'),
-            meta: { title: '准出报告,新增服务器端报告' }
-          },
-          {
-            path: 'ClientAcceptance',
-            name: '准出报告',
-            hidden: true,
-            component: () => import('@/views/Platform/presentation/ClientAcceptance'),
-            meta: { title: '准出报告,新增客户端报告' }
-          },
-          {
-            path: 'PresentReport',
-            name: '提测报告,新增报告',
-            hidden: true,
-            component: () => import('@/views/Platform/presentation/PresentReport'),
-            meta: { title: '新增客户端提测报告' }
-          },
-          {
-            path: 'projectQuery',
-            name: '项目查看编辑',
-            hidden: true,
-            component: () => import('@/views/Platform/projectQuery/projectQuery.vue'),
-            meta: { title: '项目查看编辑' }
-          },
-          {
-            path: 'taskQuery',
-            name: '任务查看编辑',
-            hidden: true,
-            component: () => import('@/views/Platform/projectQuery/taskQuery.vue'),
-            meta: { title: '任务查看编辑' }
-          }
-        ]
-      },
-      {
-        path: '/Platform/defectManagement',
-        name: '缺陷管理',
-        component: () => import('@/views/Platform/defectManagement'),
-        meta: { title: '缺陷管理' },
-        children: [
-          {
-            path: 'bugCreate',
-            name: '新建Bug',
-            hidden: true,
-            component: () => import('@/views/Platform/bugManage/bugCreate'),
-            meta: { title: '新建Bug' }
-          },
-          {
-            path: 'bugQuery',
-            name: '查看Bug',
-            hidden: true,
-            component: () => import('@/views/Platform/bugManage/bugQuery'),
-            meta: { title: '查看Bug' }
-          },
-          {
-            path: 'bugUpdate',
-            name: '更新Bug',
-            hidden: true,
-            component: () => import('@/views/Platform/bugManage/bugUpdate'),
-            meta: { title: '更新Bug' }
-          }
+    // {
+    //   path: '/home',
+    //   component: Layout,
+    //   redirect: '/dashboard',
+    //   children: [{
+    //     path: 'dashboard',
+    //     name: 'Dashboard',
+    //     component: () => import('@/views/dashboard/index'),
+    //     meta: { title: 'Dashboard', icon: 'dashboard' }
+    //   }]
+    // },
+    {
+        path: '/Platform',
+        component: Layout,
+        redirect: '/Platform/workbench',
+        name: '流程管控',
+        meta: { title: '流程管控', icon: 'env' },
+        children: [{
+                path: 'workbench',
+                name: 'workbench',
+                // hidden: true,
+                component: () =>
+                    import ('@/views/Platform/workbench'),
+                meta: { title: '我的工作台' }
+            },
+            {
+                path: 'projectPage',
+                name: 'projectPage',
+                component: () =>
+                    import ('@/views/Platform/projectPage'),
+                meta: { title: '项目管理' }
+            },
+            {
+                path: 'useCasePage',
+                name: 'useCasePage',
+                hidden: true,
+                component: () =>
+                    import ('@/views/Platform/useCasePage'),
+                meta: { title: '用例管理' }
+            },
+            {
+                path: '/Platform/presentation',
+                name: '测试管理',
+                component: () =>
+                    import ('@/views/Platform/presentation/testa'),
+                meta: { title: '测试管理' },
+                children: [{
+                        path: 'testPageData',
+                        name: '测试计划管理',
+                        hidden: true,
+                        component: () =>
+                            import ('@/views/Platform/presentation/testPage.vue'),
+                        meta: { title: '测试计划管理' }
+                    },
+                    {
+                        path: 'testPresentation',
+                        name: '日报报告',
+                        component: () =>
+                            import ('@/views/Platform/presentation/testPresentation'),
+                        meta: { title: '日报报告' }
+                    },
+                    {
+                        path: 'ResultPage',
+                        name: '准出报告',
+                        component: () =>
+                            import ('@/views/Platform/presentation/ResultPage'),
+                        meta: { title: '准出报告' }
+                    },
+                    {
+                        path: 'Assumptions',
+                        name: '提测报告',
+                        component: () =>
+                            import ('@/views/Platform/presentation/Assumptions'),
+                        meta: { title: '提测报告' }
+                    },
+                    {
+                        path: 'DailyNewsAdded',
+                        name: '日报报告',
+                        hidden: true,
+                        component: () =>
+                            import ('@/views/Platform/presentation/DailyNewsAdded'),
+                        meta: { title: '新增日报报告' }
+                    },
+                    {
+                        path: 'presentationReport',
+                        name: '提测报告',
+                        hidden: true,
+                        component: () =>
+                            import ('@/views/Platform/presentation/presentationReport'),
+                        meta: { title: '新增服务器提测报告' }
+                    },
+                    {
+                        path: 'acceptTheReport',
+                        name: '提测预览',
+                        hidden: true,
+                        component: () =>
+                            import ('@/views/Platform/presentation/acceptTheReport'),
+                        meta: { title: '提测预览' }
+                    },
+                    {
+                        path: 'testPresenyL',
+                        name: '日报预览',
+                        hidden: true,
+                        component: () =>
+                            import ('@/views/Platform/presentation/testPresenyL'),
+                        meta: { title: '日报预览' }
+                    },
+                    {
+                        path: 'ResultPageyL',
+                        name: '准出预览',
+                        hidden: true,
+                        component: () =>
+                            import ('@/views/Platform/presentation/ResultPageyL'),
+                        meta: { title: '准出预览' }
+                    },
+                    {
+                        path: 'Acceptance',
+                        name: '准出报告',
+                        hidden: true,
+                        component: () =>
+                            import ('@/views/Platform/presentation/Acceptance'),
+                        meta: { title: '准出报告,新增服务器端报告' }
+                    },
+                    {
+                        path: 'ClientAcceptance',
+                        name: '准出报告',
+                        hidden: true,
+                        component: () =>
+                            import ('@/views/Platform/presentation/ClientAcceptance'),
+                        meta: { title: '准出报告,新增客户端报告' }
+                    },
+                    {
+                        path: 'PresentReport',
+                        name: '提测报告,新增报告',
+                        hidden: true,
+                        component: () =>
+                            import ('@/views/Platform/presentation/PresentReport'),
+                        meta: { title: '新增客户端提测报告' }
+                    },
+                    {
+                        path: 'projectQuery',
+                        name: '项目查看编辑',
+                        hidden: true,
+                        component: () =>
+                            import ('@/views/Platform/projectQuery/projectQuery.vue'),
+                        meta: { title: '项目查看编辑' }
+                    },
+                    {
+                        path: 'taskQuery',
+                        name: '任务查看编辑',
+                        hidden: true,
+                        component: () =>
+                            import ('@/views/Platform/projectQuery/taskQuery.vue'),
+                        meta: { title: '任务查看编辑' }
+                    }
+                ]
+            },
+            {
+                path: '/Platform/defectManagement',
+                name: '缺陷管理',
+                component: () =>
+                    import ('@/views/Platform/defectManagement'),
+                meta: { title: '缺陷管理' },
+                children: [{
+                        path: 'bugCreate',
+                        name: '新建Bug',
+                        hidden: true,
+                        component: () =>
+                            import ('@/views/Platform/bugManage/bugCreate'),
+                        meta: { title: '新建Bug' }
+                    },
+                    {
+                        path: 'bugQuery',
+                        name: '查看Bug',
+                        hidden: true,
+                        component: () =>
+                            import ('@/views/Platform/bugManage/bugQuery'),
+                        meta: { title: '查看Bug' }
+                    },
+                    {
+                        path: 'bugUpdate',
+                        name: '更新Bug',
+                        hidden: true,
+                        component: () =>
+                            import ('@/views/Platform/bugManage/bugUpdate'),
+                        meta: { title: '更新Bug' }
+                    }
+                ]
+            },
+            {
+                path: 'teamPage',
+                name: 'teamPage',
+                hidden: true,
+                component: () =>
+                    import ('@/views/Platform/teamPage'),
+                meta: { title: '团队管理' }
+            }
         ]
-      },
-      {
-        path: 'teamPage',
-        name: 'teamPage',
-        hidden: true,
-        component: () => import('@/views/Platform/teamPage'),
-        meta: { title: '团队管理' }
-      }]
-  },
-  {
-    path: '/env-platform',
-    component: Layout,
-    redirect: '/env-platform/env',
-    name: '环境',
-    meta: { title: '环境平台', icon: 'env_platform' },
-    children: [
-      {
-        path: 'env',
-        name: 'env',
-        component: () => import('@/views/env/index.vue'),
-        meta: { title: '环境管理' }
+    },
+    {
+        path: '/env-platform',
+        component: Layout,
+        redirect: '/env-platform/env',
+        name: '环境',
+        meta: { title: '环境平台', icon: 'env_platform' },
+        children: [{
+                path: 'env',
+                name: 'env',
+                component: () =>
+                    import ('@/views/env/index.vue'),
+                meta: { title: '环境管理' }
 
-      },
-      {
-        path: 'businessline',
-        name: 'businessline',
-        component: () => import('@/views/env/index.vue'),
-        meta: { title: '业务线管理' }
-      },
-      {
-        path: 'whitelist',
-        name: 'whitelist',
-        component: () => import('@/views/env/index.vue'),
-        meta: { title: '白名单管理' }
-      },
-      {
-        path: 'module',
-        name: 'module',
-        component: () => import('@/views/env/index.vue'),
-        meta: { title: '模块管理' }
-      },
-      {
-        path: 'group',
-        name: 'group',
-        component: () => import('@/views/env/index.vue'),
-        meta: { title: 'Group管理' }
-      },
-      {
-        path: 'topic',
-        name: 'topic',
-        component: () => import('@/views/env/index.vue'),
-        meta: { title: 'Topic管理' }
-      },
-      {
-        path: 'mq',
-        name: 'mq',
-        component: () => import('@/views/env/index.vue'),
-        meta: { title: 'MQ管理' }
-      },
-      {
-        path: 'data',
-        name: 'data',
-        component: () => import('@/views/env/index.vue'),
-        meta: { title: '数据统计' }
-      }
-    ]
-  },
+            },
+            {
+                path: 'businessline',
+                name: 'businessline',
+                component: () =>
+                    import ('@/views/env/index.vue'),
+                meta: { title: '业务线管理' }
+            },
+            {
+                path: 'whitelist',
+                name: 'whitelist',
+                component: () =>
+                    import ('@/views/env/index.vue'),
+                meta: { title: '白名单管理' }
+            },
+            {
+                path: 'module',
+                name: 'module',
+                component: () =>
+                    import ('@/views/env/index.vue'),
+                meta: { title: '模块管理' }
+            },
+            {
+                path: 'group',
+                name: 'group',
+                component: () =>
+                    import ('@/views/env/index.vue'),
+                meta: { title: 'Group管理' }
+            },
+            {
+                path: 'topic',
+                name: 'topic',
+                component: () =>
+                    import ('@/views/env/index.vue'),
+                meta: { title: 'Topic管理' }
+            },
+            {
+                path: 'mq',
+                name: 'mq',
+                component: () =>
+                    import ('@/views/env/index.vue'),
+                meta: { title: 'MQ管理' }
+            },
+            {
+                path: 'data',
+                name: 'data',
+                component: () =>
+                    import ('@/views/env/index.vue'),
+                meta: { title: '数据统计' }
+            }
+        ]
+    },
+    {
+        path: '/virtualDevices',
+        component: Layout,
+        name: '虚拟设备',
+        meta: { title: '虚拟设备', icon: 'env_platform' },
+        children: [{
+                path: 'HTvehicle',
+                name: '单车',
+                component: () =>
+                    import ('@/views/virtualDevices/HTvehicle.vue'),
+                meta: { title: '单车' }
+            },
 
-  {
-    path: '/mock',
-    component: Layout,
-    redirect: '/mock/interface',
-    name: 'Mock',
-    meta: { title: 'Mock服务', icon: 'MQ' },
-    children: [
-      {
-        path: 'interface',
-        name: 'Interface',
-        component: () => import('@/views/mock/interface'),
-        meta: { title: 'dubbo mock' }
-      },
-      {
-        path: 'interface/:rule',
-        name: 'Rule',
-        hidden: true,
-        component: () => import('@/views/mock/rule'),
-        meta: { title: 'dubbo规则' }
-      },
-      {
-        path: 'httpmock',
-        name: 'httpmock',
-        component: () => import('@/views/mock/httpmock'),
-        meta: { title: 'http mock' }
-      },
-      {
-        path: 'httpmock/:httprule',
-        name: 'Httprule',
-        hidden: true,
-        component: () => import('@/views/mock/httprule'),
-        meta: { title: 'httpmock规则' }
-      }
-    ]
-  },
+            {
+                path: 'HMvehicle',
+                name: '电单车',
+                component: () =>
+                    import ('@/views/virtualDevices/HMvehicle.vue'),
+                meta: { title: '电单车' }
+            }
+        ]
+    },
+    {
+        path: '/mock',
+        component: Layout,
+        redirect: '/mock/interface',
+        name: 'Mock',
+        meta: { title: 'Mock服务', icon: 'MQ' },
+        children: [{
+                path: 'interface',
+                name: 'Interface',
+                component: () =>
+                    import ('@/views/mock/interface'),
+                meta: { title: 'dubbo mock' }
+            },
+            {
+                path: 'interface/:rule',
+                name: 'Rule',
+                hidden: true,
+                component: () =>
+                    import ('@/views/mock/rule'),
+                meta: { title: 'dubbo规则' }
+            },
+            {
+                path: 'httpmock',
+                name: 'httpmock',
+                component: () =>
+                    import ('@/views/mock/httpmock'),
+                meta: { title: 'http mock' }
+            },
+            {
+                path: 'httpmock/:httprule',
+                name: 'Httprule',
+                hidden: true,
+                component: () =>
+                    import ('@/views/mock/httprule'),
+                meta: { title: 'httpmock规则' }
+            }
+        ]
+    },
 
-  {
-    path: '/data',
-    component: Layout,
-    redirect: '/data/upload-file',
-    name: '数据中心',
-    hidden: true,
-    meta: { title: '数据中心', icon: 'examlpe' },
-    children: [
-      {
-        path: 'upload-file',
-        name: 'jar包管理',
-        component: () => import('@/views/data/upload.vue'),
-        meta: { title: 'jar包管理' }
-      },
-      {
-        path: 'item',
-        name: '动态数据',
-        component: () => import('@/views/data/index.vue'),
-        meta: { title: '动态数据' }
-      }
-    ]
-  },
-  {
-    path: '/online-quality',
-    component: Layout,
-    redirect: '/online-quality/check-list',
-    name: '上线质检',
-    meta: { title: '上线质检', icon: '上线质检' },
-    children: [
-      {
-        path: 'check-list',
-        name: '模板管理',
-        component: () => import('@/views/online-quality/CheckConfig/index.vue'),
-        meta: { title: '模板管理' }
-      },
-      {
-        path: 'history-task',
-        name: '历史任务',
-        component: () => import('@/views/online-quality/HistoryTask/index.vue'),
-        meta: { title: '历史任务' }
-      },
-      {
-        path: 'history-task-details/:taskId',
-        props: true,
-        name: '历史任务详情',
+    {
+        path: '/data',
+        component: Layout,
+        redirect: '/data/upload-file',
+        name: '数据中心',
         hidden: true,
-        component: () => import('@/views/online-quality/HistoryTask/taskDetails.vue'),
-        meta: { title: '历史任务详情' }
-      },
-      {
-        path: 'block-server',
-        name: '阻断服务',
-        component: () => import('@/views/online-quality/BlockServer/index.vue'),
-        meta: { title: '阻断服务' }
-      }
-    ]
-  },
+        meta: { title: '数据中心', icon: 'examlpe' },
+        children: [{
+                path: 'upload-file',
+                name: 'jar包管理',
+                component: () =>
+                    import ('@/views/data/upload.vue'),
+                meta: { title: 'jar包管理' }
+            },
+            {
+                path: 'item',
+                name: '动态数据',
+                component: () =>
+                    import ('@/views/data/index.vue'),
+                meta: { title: '动态数据' }
+            }
+        ]
+    }, {
+        path: '/online-quality',
+        component: Layout,
+        redirect: '/online-quality/check-list',
+        name: '上线质检',
+        meta: { title: '上线质检', icon: '上线质检' },
+        children: [{
+                path: 'check-list',
+                name: '模板管理',
+                component: () =>
+                    import ('@/views/online-quality/CheckConfig/index.vue'),
+                meta: { title: '模板管理' }
+            },
+            {
+                path: 'history-task',
+                name: '历史任务',
+                component: () =>
+                    import ('@/views/online-quality/HistoryTask/index.vue'),
+                meta: { title: '历史任务' }
+            },
+            {
+                path: 'history-task-details/:taskId',
+                props: true,
+                name: '历史任务详情',
+                hidden: true,
+                component: () =>
+                    import ('@/views/online-quality/HistoryTask/taskDetails.vue'),
+                meta: { title: '历史任务详情' }
+            },
+            {
+                path: 'block-server',
+                name: '阻断服务',
+                component: () =>
+                    import ('@/views/online-quality/BlockServer/index.vue'),
+                meta: { title: '阻断服务' }
+            }
+        ]
+    },
 
-  { path: '*', redirect: '/404', hidden: true },
+    { path: '*', redirect: '/404', hidden: true },
 
-  {
-    path: '/quality',
-    component: Layout,
-    redirect: '/quality/qualityMarket',
-    name: '质量度量',
-    // hidden: true,
-    meta: { title: '质量度量', icon: 'rule' },
-    children: [
-      {
-        path: 'qualityMarket',
-        name: '质量大盘',
-        // hidden: true,
-        component: () => import('@/views/quality/qualityMarket.vue'),
-        meta: { title: '质量大盘' }
-      },
-      {
-        path: 'qualityMarket',
-        name: '质量大盘',
+    {
+        path: '/quality',
+        component: Layout,
+        redirect: '/quality/qualityMarket',
+        name: '质量度量',
         // hidden: true,
-        component: () => import('@/views/quality/qualityMarket.vue'),
-        meta: { title: '质量大盘' },
-        children: [
-          {
-            path: 'qualityProcess',
-            name: '上线过程',
-            hidden: true,
-            component: () => import('@/views/quality/qualityProcess.vue'),
-            meta: { title: '上线过程' }
-          }
+        meta: { title: '质量度量', icon: 'rule' },
+        children: [{
+                path: 'qualityMarket',
+                name: '质量大盘',
+                // hidden: true,
+                component: () =>
+                    import ('@/views/quality/qualityMarket.vue'),
+                meta: { title: '质量大盘' }
+            },
+            {
+                path: 'qualityMarket',
+                name: '质量大盘',
+                // hidden: true,
+                component: () =>
+                    import ('@/views/quality/qualityMarket.vue'),
+                meta: { title: '质量大盘' },
+                children: [{
+                    path: 'qualityProcess',
+                    name: '上线过程',
+                    hidden: true,
+                    component: () =>
+                        import ('@/views/quality/qualityProcess.vue'),
+                    meta: { title: '上线过程' }
+                }]
+            }
         ]
-      }
-    ]
-  }
+    }
 ]
 
 const createRouter = () => new Router({
-  // mode: 'history', // require service support
-  scrollBehavior: () => ({ y: 0 }),
-  routes: constantRoutes
+    // mode: 'history', // require service support
+    scrollBehavior: () => ({ y: 0 }),
+    routes: constantRoutes
 })
 const router = createRouter()
 
 // Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
 export function resetRouter() {
-  const newRouter = createRouter()
-  router.matcher = newRouter.matcher // reset router
+    const newRouter = createRouter()
+    router.matcher = newRouter.matcher // reset router
 }
 
-export default router
+export default router

+ 0 - 0
src/views/virtualDevices/HMvehicle.vue


+ 759 - 0
src/views/virtualDevices/HTvehicle.vue

@@ -0,0 +1,759 @@
+<template style="height=0px;improtanent">
+  <div class="app-container">
+    <el-header style="height: auto;!improtant">
+      <div class="filter-container" style="padding-bottom: 20px;!improtant">
+        <div style="font-size:13px" color="#333B4A">
+          车辆ID<el-input v-model="listQuery.vehicleId" placeholder="请填写" style="width: 130px;" class="filter-item" @keyup.enter.native="handleFilter" /> &nbsp;
+          锁ID <el-input v-model="listQuery.lockNo" placeholder="请填写" style="width: 130px;" class="filter-item" />&nbsp;
+          锁类型 <el-select v-model="listQuery.lockModel" placeholder="请填写" style="width: 130px;" class="filter-item" filterable clearable @change="getDataType(listQuery.lockModel)">
+            <el-option v-for="item in lockModelList" :key="item.model" :label="item.modelName" :value="item.model" />
+          </el-select>&nbsp;
+          状态 <el-select v-model="listQuery.lockStatus" placeholder="请填写" style="width: 130px;" class="filter-item" filterable clearable>
+            <el-option v-for="item in lockStatusOptions" :key="item.value" :label="item.label" :value="item.value" />
+          </el-select>&nbsp;
+
+          <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getDevicesList(listQuery)">搜索</el-button>
+          <el-button class="filter-item" style="margin-left: 1px;" type="primary" icon="el-icon-edit" @click="dialogFormVisible = true, createdCode()">新增</el-button>
+        </div>
+      </div>
+    </el-header>
+
+    <el-table :key="tableKey" :data="list" fit highlight-current-row style="width: 100%;" border :header-cell-style="{background:'#F0F7FF',color:'#606266'}">
+      <el-table-column label="车辆ID" prop="vehicleId" align="center" min-width="100">
+        <template slot-scope="scope"><a href="javascript:void(0)" style="color:#20a0ff" @click="dialogDetailVisible = true,deviceDetails(scope.row.vehicleId)(scope.row.vehicleId)">{{ scope.row.vehicleId }}</a></template>
+      </el-table-column>
+      <el-table-column label="锁ID" min-width="100px" align="center">
+        <template slot-scope="scope"><span>{{ scope.row.lockNo }}</span></template>
+      </el-table-column>
+      <el-table-column label="锁类型" min-width="80px" align="center">
+        <template slot-scope="scope"><span>{{ scope.row.lockModelInfo.modelName }}</span></template>
+      </el-table-column>
+
+      <el-table-column label="在线状态" class-name="status-col" min-width="100">
+        <template slot-scope="{row}"><el-tag :type="row.isOnline | statusFilter">{{ statusMaps.get(row.isOnline) }}</el-tag></template>
+      </el-table-column>
+      <el-table-column label="锁状态" class-name="status-col" min-width="100px">
+        <template slot-scope="{row}"><el-tag :type="row.lockStatus | statusFilter">{{ lockStatusMaps.get(row.lockStatus) }}</el-tag></template>
+      </el-table-column>
+      <el-table-column label="经度" min-width="80px" align="center">
+        <template slot-scope="scope"><span>{{ scope.row.deviceLng }}</span></template>
+      </el-table-column>
+      <el-table-column label="纬度" min-width="80px" align="center">
+        <template slot-scope="scope"><span>{{ scope.row.deviceLat }}</span></template>
+      </el-table-column>
+      <el-table-column label="创建时间" min-width="120px" align="center">
+        <template slot-scope="scope"><span>{{ scope.row.createTime }}</span></template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" min-width="250px" class-name="small-padding fixed-width" fixed="right">
+        <template slot-scope="{row}">
+
+          <el-button v-if="row.isOnline!=1" size="mini" type="success" @click="handleModifyStatus(row, 1)">上线</el-button>
+          <el-button v-if="row.isOnline!=0" size="mini" type="danger" @click="handleModifyStatus(row, 0)">下线</el-button>
+          <el-button type="primary" size="mini" @click="handleUpdate(row)">编辑</el-button>
+          <el-button type="danger" size="mini" @click="deleteCodeData(row)">删除</el-button>
+          <i v-if="row.lockStatus!=1" class="el-icon-unlock" @click="handleModifyStatus(row, 1)" />
+          <i v-if="row.lockStatus!=0" class="el-icon-lock" @click="handleModifyStatus(row, 0)" />
+
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- <pagination v-show="total>0" :total="total" :page.sync="listQuery.curIndex" :limit.sync="listQuery.pageSize" @pagination="getList" /> -->
+    <!-- 新增 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" width="75%">
+      <el-form ref="addDeviceForms" :rules="addDeviceDataRules" :model="addDeviceData" label-position="left" label-width="80px" style="width: 250px; margin-left:80px;">
+        <div style="display:flex;justfy-content:space-between">
+          <div style="margin-left: 20%;">
+            <el-form-item label="业务线" prop="bizType">
+              <el-input v-model="addDeviceData.bizType" :disabled="true" style="width:200px;" placeholder="单车" />
+            </el-form-item>
+
+            <el-form-item label="锁类型" prop="lockModel">
+              <el-select v-model="addDeviceData.lockModel" class="filter-item" filterable clearable placeholder="请填写" @change="chooseLockType()">
+                <el-option v-for="item in lockModelList" :key="item.model" :label="item.modelName" :value="item.model" />
+              </el-select>
+            </el-form-item>
+
+            <el-form-item label="锁供应商" prop="lockSupplier">
+              <el-select v-model="addDeviceData.lockSupplier" :disabled="shouldShow" class="filter-item" filterable clearable placeholder="请填写">
+                <el-option v-for="item in lockSupplierList" :key="item.supplierId" :label="item.supplierName" :value="item.supplierId" />
+              </el-select>
+            </el-form-item>
+          </div>
+          <div style="margin-left: 30%;">
+            <el-form-item label="车辆个数" prop="deviceNum">
+              <el-input v-model="addDeviceData.deviceNum" style="width:200px;" placeholder="请填写" />
+            </el-form-item>
+
+            <el-form-item label="车供应商" style="flex-grow:1" prop="bikeSupplier">
+              <el-select v-model="addDeviceData.bikeSupplier" class="filter-item" filterable clearable placeholder="请填写">
+                <el-option v-for="item in bikeSupplierList" :key="item.supplierId" :label="item.supplierName" :value="item.supplierId" />
+              </el-select>
+            </el-form-item>
+
+            <el-form-item label="车辆类型" prop="bikeModel">
+              <el-select v-model="addDeviceData.bikeModel" class="filter-item" filterable clearable placeholder="请填写">
+                <el-option v-for="item in bikeModelList" :key="item.model" :label="item.modelName" :value="item.model" />
+              </el-select>
+            </el-form-item>
+          </div>
+        </div>
+      </el-form>
+      <br><br><br>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible = false">取消</el-button>
+        <el-button v-if="showSubmitBtn" type="primary" @click="createData(addDeviceData)">确定</el-button>
+      </div>
+    </el-dialog>
+    <!-- 查看详情 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogDetailVisible" width="75%">
+      <el-form ref="serviceDataForms" :rules="serviceDataRules" :model="DetailData" label-position="left" label-width="100px" style="width: 250px; margin-left:80px;">
+        <div style="display:flex;justfy-content:space-between">
+          <div style="margin-left: 20%;">
+            <el-form-item label="业务线" prop="bizType">
+              <el-input v-model="DetailData.bizType" :disabled="true" style="width:200px;" placeholder="单车" />
+            </el-form-item>
+
+            <el-form-item label="锁ID" prop="lockNo">
+              <el-input v-model="DetailData.lockNo" style="width:200px;" placeholder="请填写" />
+            </el-form-item>
+
+            <el-form-item label="车辆ID" prop="vehicleId">
+              <el-input v-model="DetailData.vehicleId" style="width:200px;" placeholder="请填写" />
+            </el-form-item>
+            <!-- <el-form-item label="锁供应商" prop="test1">
+              <el-input v-model="serviceData.test2" style="width:200px;" placeholder="请填写" />
+            </el-form-item>
+            <el-form-item label="车辆供应商" prop="test1">
+              <el-input v-model="serviceData.test2" style="width:200px;" placeholder="请填写" />
+            </el-form-item> -->
+            <el-form-item label="锁状态" prop="lockStatus">
+              <el-input v-model="DetailData.lockStatus" style="width:200px;" placeholder="请填写" />
+            </el-form-item>
+            <el-form-item label="经度" prop="deviceLng">
+              <el-input v-model="DetailData.deviceLng" style="width:200px;" placeholder="请填写" />
+            </el-form-item>
+            <el-form-item label="纬度" prop="deviceLat">
+              <el-input v-model="DetailData.deviceLat" style="width:200px;" placeholder="请填写" />
+            </el-form-item>
+
+          </div>
+          <div style="margin-left: 30%;">
+            <el-form-item label="EcuID" prop="deviceId">
+              <el-input v-model="DetailData.deviceId" style="width:200px;" placeholder="请填写" />
+            </el-form-item>
+            <el-form-item label="IccID" prop="iccid">
+              <el-input v-model="DetailData.iccid" style="width:200px;" placeholder="请填写" />
+            </el-form-item>
+            <el-form-item label="Mac地址" prop="macAddr">
+              <el-input v-model="DetailData.macAddr" style="width:200px;" placeholder="请填写" />
+            </el-form-item>
+            <el-form-item label="bluetooth_key" prop="bluetoothKey">
+              <el-input v-model="DetailData.bluetoothKey" style="width:200px;" placeholder="请填写" />
+            </el-form-item>
+            <el-form-item label="bluetooth_password" prop="bluetoothPassword">
+              <el-input v-model="DetailData.bluetoothPassword" style="width:200px;" placeholder="请填写" />
+            </el-form-item>
+            <el-form-item label="电量信息" prop="lockBatteryLevel">
+              <el-input v-model="DetailData.lockBatteryLevel" style="width:200px;" placeholder="请填写" />
+            </el-form-item>
+          </div>
+        </div>
+      </el-form>
+      <br><br><br>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogDetailVisible = false">关闭</el-button>
+        <!-- <el-button v-if="showSubmitBtn" type="primary">确定</el-button> -->
+      </div>
+    </el-dialog>
+    <!--  编辑 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogCreateVisible" width="75%">
+      <el-form ref="serviceDataForms" :rules="serviceDataRules" :model="serviceData" label-position="left" label-width="80px" style="width: 250px; margin-left:80px;">
+        <div style="display:flex;justfy-content:space-between">
+          <div style="margin-left: 20%;">
+            <el-form-item label="经度" prop="customName">
+              <el-input v-model="serviceData.customName" style="width:200px;" placeholder="单车" />
+            </el-form-item>
+
+            <el-form-item label="纬度" prop="url">
+              <el-select v-model="serviceData.returnDataTypeStr" class="filter-item" filterable clearable placeholder="请填写">
+                <el-option v-for="item in envSelectDataType" :key="item.code" :label="item.msg" :value="item.code" />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="电量" prop="test2">
+              <el-input v-model="serviceData.test2" style="width:200px;" placeholder="请填写" />
+            </el-form-item>
+
+          </div>
+          <div style="margin-left: 30%;">
+
+            <el-form-item label="业务线" style="flex-grow:1" prop="returnDataTypeStr">
+              <el-input v-model="serviceData.customName" :disabled="true" style="width:200px;" placeholder="单车" />
+            </el-form-item>
+            <el-form-item label="锁ID" style="flex-grow:1" prop="returnDataTypeStr">
+              <el-input v-model="serviceData.customName" :disabled="true" style="width:200px;" placeholder="单车" />
+            </el-form-item>
+            <el-form-item label="锁状态" style="flex-grow:1" prop="returnDataTypeStr">
+              <el-input v-model="serviceData.customName" :disabled="true" style="width:200px;" placeholder="单车" />
+            </el-form-item>
+            <el-form-item label="车辆ID" style="flex-grow:1" prop="returnDataTypeStr">
+              <el-input v-model="serviceData.customName" :disabled="true" style="width:200px;" placeholder="单车" />
+            </el-form-item>
+            <el-form-item label="锁供应商" style="flex-grow:1" prop="returnDataTypeStr">
+              <el-input v-model="serviceData.customName" :disabled="true" style="width:200px;" placeholder="单车" />
+            </el-form-item>
+            <el-form-item label="车辆供应商" style="flex-grow:1" prop="returnDataTypeStr">
+              <el-input v-model="serviceData.customName" :disabled="true" style="width:200px;" placeholder="单车" />
+            </el-form-item>
+            <el-form-item label="EcuID" style="flex-grow:1" prop="returnDataTypeStr">
+              <el-input v-model="serviceData.customName" :disabled="true" style="width:200px;" placeholder="单车" />
+            </el-form-item>
+            <el-form-item label="IccID" style="flex-grow:1" prop="returnDataTypeStr">
+              <el-input v-model="serviceData.customName" :disabled="true" style="width:200px;" placeholder="单车" />
+            </el-form-item>
+            <el-form-item label="Mac地址" style="flex-grow:1" prop="returnDataTypeStr">
+              <el-input v-model="serviceData.customName" :disabled="true" style="width:200px;" placeholder="单车" />
+            </el-form-item>
+            <el-form-item label="bluetooth_key" style="flex-grow:1" prop="returnDataTypeStr">
+              <el-input v-model="serviceData.customName" :disabled="true" style="width:200px;" placeholder="单车" />
+            </el-form-item>
+            <el-form-item label="bluetooth_password" style="flex-grow:1" prop="returnDataTypeStr">
+              <el-input v-model="serviceData.customName" :disabled="true" style="width:200px;" placeholder="单车" />
+            </el-form-item>
+
+          </div>
+        </div>
+      </el-form>
+      <br><br><br>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible = false">取消</el-button>
+        <el-button v-if="showSubmitBtn" type="primary" @click="createData(serviceData)">确定</el-button>
+      </div>
+    </el-dialog>
+
+  </div>
+  <!-- changeCopy, -->
+</template>
+
+<script>
+import { queryLockCreateInfo, queryVehicleCreateInfo, createDevice, deleteDevice, deviceOnline, deviceOffline, unlockVehicle, lockVehicle, updateLockAttr, getDevices, getLockAttrInfo } from '@/api/htVehicle'
+import waves from '@/directive/waves' // waves directive
+import { parseTime } from '@/utils'
+import Pagination from '@/components/Pagination' // secondary package based on el-pagination
+
+var envSelections = []
+var consumerSelections = []
+
+export default {
+  name: 'Httpmock',
+  components: { Pagination },
+  directives: { waves },
+  filters: {
+    statusFilter(status) {
+      const statusMap = {
+        1: 'success',
+        draft: 'info',
+        0: 'danger'
+      }
+      return statusMap[status]
+    }
+  },
+  data() {
+    return {
+
+      dialogFormVisible: false,
+      dialogDetailVisible: false,
+      dialogCreateVisible: false,
+      shouldShow: false,
+
+      total: 0,
+      num: '',
+      tableKey: 0,
+      list: null,
+      // list: {
+      //   vehicleId: '',
+      //   lockNo: '',
+      //   lockBatteryLevel: '',
+      //   deviceId: '',
+      //   macAddr: '',
+      //   bluetoothPassword: '',
+      //   bluetoothKey: '',
+      //   bluetoothVersion: '',
+      //   lockCommVersion: '',
+      //   iccid: '',
+      //   deviceLat: '',
+      //   deviceLng: '',
+      //   isOnline: '',
+      //   lockStatus: '',
+      //   lockModelNo: '',
+      //   headstockNo: '',
+      //   headstockNoUrl: '',
+      //   tailstockNo: '',
+      //   tailstockNoUrl: '',
+      //   frameNo: '',
+      //   lockNoUrl: '',
+      //   bikeModelInfo: {
+      //     model: '',
+      //     modelName: '' },
+      //   lockModelInfo: {
+      //     model: '',
+      //     modelName: '' },
+      //   createTime: '',
+      //   modiftTime: ''
+      // },
+      statusMaps: new Map([[1, '已开启'], [0, '未开启']]),
+      lockStatusMaps: new Map([[1, '已开锁'], [0, '已关锁']]),
+      statusOperateMap: new Map([[1, '开启'], [0, '关闭']]),
+      options: [{ value: '', label: '全部显示' }, { value: '1', label: '已开启' }, { value: '0', label: '未开启' }],
+      bizType: [{ value: '1', label: '电单车' }, { value: '2', label: '单车' }],
+      lockStatusOptions: [{ value: '1', label: '已开锁' }, { value: '2', label: '已关锁' }],
+      lockModelList: [],
+      lockSupplierList: [],
+      bikeModelList: [],
+      bikeSupplierList: [],
+      listQuery: {
+        // lockModel: '',
+        // bikeModel: '',
+        // vehicleId: '',
+        // lockNo: ''
+      },
+      textMap: {
+        update: '编辑',
+        create: '新增',
+        details: '设备详情'
+      },
+      userInformation: localStorage.getItem('username'),
+      userNames: localStorage.getItem('realname'),
+      userData: '',
+      importanceOptions: [1, 2, 3],
+      envSelectDataType: '',
+      envSelections,
+      methodProtocol: 'http',
+      consumerSelections,
+      sortOptions: [{ label: 'ID Ascending', key: '+id' }, { label: 'ID Descending', key: '-id' }],
+      statusOptions: ['published', 'draft', 'deleted'],
+      showReviewer: false,
+      showSubmitBtn: true,
+      // temp: {
+      //   id: undefined,
+      //   importance: 1,
+      //   actualUrl: '',
+      //   creator: '',
+      //   mockUrl: '',
+      //   timestamp: new Date(),
+      //   title: '',
+      //   type: '',
+      //   status: 'published'
+      // },
+      addDeviceData: {
+        bizType: '单车',
+        lockModel: '',
+        bikeModel: '',
+        deviceNum: '',
+        lockSupplier: '',
+        bikeSupplier: ''
+      },
+      DetailData: {},
+      serviceData: {
+        customName: ''
+
+      },
+      serviceDataRules: {},
+      serviceDataExt: {
+        id: 0
+      },
+      dialogStatus: '',
+      listLoading: true,
+      dialogDetails: false,
+
+      dialogPvVisible: false,
+      pvData: [],
+      addDeviceDataRules: {
+        lockModel: [{ required: true, message: '锁类型不能为空', trigger: 'change' }],
+        bikeModel: [{ required: true, message: '车辆类型不能为空', trigger: 'change' }],
+        deviceNum: [{ required: true, message: '车辆个数不能为空', trigger: 'change' }],
+        lockSupplier: [{ required: true, message: '锁供应商不能为空', trigger: 'change' }],
+        bikeSupplier: [{ required: true, message: '车辆供应商不能为空', trigger: 'change' }]
+
+      },
+      downloadLoading: false
+    }
+  },
+  created() {
+    this.getMyDevicesList()
+    this.getLockModelList()
+  },
+  methods: {
+    createdCode() {
+      this.dialogStatus = 'create'
+    },
+    // 查看设备详情
+    deviceDetails(vel) {
+      this.dialogStatus = 'details'
+      this.listQuery.vehicleId = vel
+      this.userData = { id: '', ename: this.userInformation, name: this.userNames }
+      this.objData = { deviceQueryInfo: this.listQuery, user: this.userData }
+      getDevices(this.objData).then(response => {
+        this.list = response.data
+        this.total = response.data.total
+      })
+    },
+
+    //  获取锁类型、锁供应商类型
+    getLockModelList() {
+      queryLockCreateInfo().then(response => {
+        // console.log(response.data)
+        this.lockModelList = response.data.modelInfos
+        this.lockSupplierList = response.data.supplierInfos
+      })
+      // queryLockCreateInfo().catch(res => {
+      //   console.log(res)
+      // })
+    },
+
+    // 获取车类型、车供应商
+    chooseLockType() {
+      // console.log(this.addDeviceData.lockModel)
+      queryVehicleCreateInfo(this.addDeviceData.lockModel).then(response => {
+        // console.log(response.data)
+        this.bikeModelList = response.data.modelInfos
+        this.bikeSupplierList = response.data.supplierInfos
+        console.log(this.bikeModelList)
+      })
+    },
+
+    // 搜索
+    getDevicesList(vel) {
+      this.listQuery = vel
+      this.userData = { id: '', ename: this.userInformation, name: this.userNames }
+      this.objData = { deviceQueryInfo: this.listQuery, user: this.userData }
+      getDevices(this.objData).then(response => {
+        this.list = response.data
+        this.total = response.data.total
+      })
+    },
+    // 进首页
+    getMyDevicesList() {
+      this.userData = { id: '', ename: this.userInformation, name: this.userNames }
+      this.objData = { deviceQueryInfo: this.listQuery, user: this.userData }
+      getDevices(this.objData).then(response => {
+        this.list = response.data
+        this.total = response.data.total
+      })
+    },
+
+    explain() {
+      if (this.showexplain === false) {
+        this.showexplain = true
+      } else {
+        this.showexplain = false
+      }
+    },
+    deleteCodeData(e) {
+      this.$confirm('确定要删除这条车辆信息吗?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.handleDelete(e)
+        this.$message({ type: 'success', message: '删除成功!' })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        })
+      })
+    },
+
+    // 编辑
+    updateDeviceInfo(vel) {
+      if (vel === this.list) {
+        this.bizData = {
+          name: vel.name,
+          id: vel.id,
+          role: vel.role,
+          email: vel.email,
+          teamId: vel.bizId,
+          bizId: vel.bizId
+        }
+      } else {
+        this.bizData = vel
+        this.bizData.name = vel.name
+        this.bizData.role = vel.role
+        this.bizData.email = vel.email
+        this.bizData.teamId = vel.teamId
+        this.bizData.bizId = vel.bizId
+      }
+      this.userData = { id: '', ename: this.userInformation, name: this.userNames }
+      this.objData = { teamMembersInfo: this.bizData, user: this.userData }
+      updateMembers(this.objData).then(response => {
+        if (response.code === 200) {
+          this.dialogFormVisible = false
+          this.successFun()
+          this.getAllList()
+        } else {
+          this.errorFun()
+        }
+      })
+    },
+    handleDelete(e) {
+      // this.userData = { id: '', ename: this.userInformation, name: this.userNames }
+      // deleteMembers(e.id, this.userData).then(response => {
+      //   if (response.code === 200) {
+      //     this.getAllList()
+      //     // this.queryList({ 'teamId': e.teamId })
+      //     this.successFun()
+      //   } else {
+      //     this.errorFun(response.msg)
+      //   }
+      // })
+    },
+    // 获取method方法
+    // mockGetMethod() {
+    //   this.envMethod = []
+    //   getSupportMethods().then(response => {
+    //     if (response.code) {
+    //       for (var i = 0; i < response.data.length; i++) {
+    //         var obj = {}
+    //         obj.str = response.data[i]
+    //         this.envMethod.push(obj)
+    //       }
+    //     } else {
+    //       this.$message({ message: '请求失败!', type: 'danger' })
+    //     }
+    //   })
+    // },
+    // getMethod(val) {
+    //   this.listQuery.method = val
+    // },
+    // 获取data数据
+    // mockDataTypes() {
+    //   this.envSelectDataType = []
+    //   changeDataType().then(response => {
+    //     if (response.code) {
+    //       this.envSelectDataType = response.data
+    //     } else {
+    //       this.$message({ message: '请求失败!', type: 'danger' })
+    //     }
+    //   })
+    // },
+    // getDataType(val) {
+    //   this.listQuery.returnDataType = val
+    // },
+    // 点击搜索时调用
+    handleFilter() {
+      // this.getList()
+    },
+    // 点击开启,关闭时调用
+    handleModifyStatus(row, status) {
+      // var statusData = { id: row.id, status: status }
+      // changeStatus(statusData).then(response => {
+      //   if (response.code === 200) {
+      //     row.status = status
+      //     this.$message({ message: row.id.toString() + ' ' + this.statusOperateMap.get(status) + '成功!', type: 'success' })
+      //   } else {
+      //     this.$message({ message: row.id.toString() + ' ' + this.statusOperateMap.get(status) + '失败!', type: 'danger' })
+      //   }
+      // })
+    },
+
+    // sortChange(data) {
+    //   const { prop, order } = data
+    //   if (prop === 'id') {
+    //     this.sortByID(order)
+    //   }
+    // },
+    // sortByID(order) {
+    //   if (order === 'ascending') {
+    //     this.listQuery.sort = '+id'
+    //   } else {
+    //     this.listQuery.sort = '-id'
+    //   }
+    //   this.handleFilter()
+    // },
+    // resetServiceData() {
+    //   this.serviceData = {
+    //     customName: '',
+    //     url: '',
+    //     method: '',
+    //     returnDataTypeStr: '',
+    //     mockUrl: '',
+    //     returnDataType: '',
+    //     envChannel: 1,
+    //     id: '',
+    //     status: 1,
+    //     actualUrl: '',
+    //     creator: ''
+    //   }
+    // },
+    // hearder新增时调用
+    handleCreate() {
+      // this.shouldShow = false
+      // this.resetServiceData()
+      // this.dialogStatus = 'create'
+      // this.dialogFormVisible = true
+      // this.showSubmitBtn = true
+      // this.$nextTick(() => {
+      //   this.$refs['serviceDataForms'].clearValidate()
+      // })
+    },
+    // 点击提交时调用
+    createData(ele) {
+      this.$refs['addDeviceForms'].validate((valid) => {
+        if (valid) {
+          this.addDeviceData = ele
+          this.addDeviceData.bizType = 2
+          console.log(this.userData)
+          this.userData = { id: '', ename: this.userInformation, name: this.userNames }
+          this.objData = { htwDeviceInfo: this.addDeviceData, user: this.userData }
+          createDevice(this.objData).then(response => {
+            if (response.code === 200) {
+              this.dialogFormVisible = false
+              // this.getList()
+              this.$notify({ title: 'Success', message: response.msg, type: 'success', duration: 1000 })
+            } else {
+              this.$notify({ title: 'Failed', message: response.msg, type: 'error', duration: 1000 })
+            }
+          })
+        }
+      })
+    },
+    // 编辑
+    handleUpdate(row) {
+      this.dialogCreateVisible = true
+      var queryData = {
+        lockBatteryLevel: row.lockBatteryLevel,
+        deviceLat: row.deviceLat,
+        deviceLng: row.deviceLng
+        // vehicleId: row.vehicleId,
+        //  lockNo: row.lockNo,
+        // creator: row.creator,
+        // method: row.method,
+
+        // mockUrl: row.mockUrl,
+        // lockStatus: row.lockStatus,
+        // iccid: row.iccid,
+        // deviceId: row.deviceId,
+        // macAddr: row.macAddr,
+        // bluetoothPassword: row.bluetoothPassword,
+        // bluetoothKey: row.bluetoothKey
+      }
+      var rowList = row
+      this.shouldShow = false
+      updateLockAttr(queryData).then(response => {
+        if (response.data) {
+          this.serviceData.lockBatteryLevel = rowList.lockBatteryLevel
+          this.serviceData.deviceLat = rowList.deviceLat
+          this.serviceData.deviceLng = rowList.deviceLng
+          this.serviceData.vehicleId = rowList.vehicleId
+          this.serviceData.lockNo = rowList.lockNo
+          this.serviceData.lockStatus = rowList.lockStatus
+          this.serviceData.iccid = rowList.iccid
+          this.serviceData.deviceId = rowList.deviceId
+          this.serviceData.macAddr = rowList.macAddr
+          this.serviceData.bluetoothPassword = rowList.bluetoothPassword
+          this.serviceData.bluetoothKey = rowList.bluetoothKey
+          this.dialogStatus = 'update'
+          this.dialogFormVisible = true
+          this.showSubmitBtn = true
+          this.$nextTick(() => {
+            this.$refs['serviceDataForms'].clearValidate()
+          })
+        }
+      })
+    },
+    // 查看
+    handleCheck(row) {
+      // this.shouldShow = true
+      // this.serviceData = row
+
+      // this.dialogStatus = 'update'
+      // this.dialogFormVisible = true
+      // this.showSubmitBtn = false
+
+    },
+    // 复制
+    handleCopy(row) {
+      this.serviceData = row
+      // var queryData = { id: row.id }
+      this.shouldShow = false
+
+      this.dialogStatus = 'create'
+      this.dialogFormVisible = true
+      this.showSubmitBtn = true
+      // this.$nextTick(() => {
+      //   this.$refs['serviceDataForms'].clearValidate()
+      // })
+      // })
+    },
+    updateData(ele) {
+      // this.$refs['serviceDataForms'].validate((valid) => {
+      //   if (valid) {
+      //     console.log(ele)
+      //     const tempData = {
+      //       id: this.serviceData.id,
+      //       customName: this.serviceData.customName,
+      //       url: this.serviceData.url,
+      //       envChannel: this.serviceData.envChannel,
+      //       method: ele.method,
+      //       actualUrl: this.serviceData.actualUrl,
+      //       status: this.serviceData.status,
+      //       creator: this.serviceData.creator,
+      //       returnDataType: ele.returnDataTypeStr,
+      //       mockUrl: this.serviceData.mockUrl
+      //     }
+      //     updateService(tempData).then(response => {
+      //       if (response.code === 200) {
+      //         this.dialogFormVisible = false
+      //         this.getList()
+      //         this.$notify({ title: 'Success', message: response.msg, type: 'success', duration: 2000 })
+      //       } else {
+      //         this.$notify({ title: 'Failed', message: response.msg, type: 'error', duration: 2000 })
+      //       }
+      //     })
+      //   }
+      // })
+    },
+    formatJson(filterVal, jsonData) {
+      return jsonData.map(v => filterVal.map(j => {
+        if (j === 'timestamp') {
+          return parseTime(v[j])
+        } else {
+          return v[j]
+        }
+      }))
+    },
+    redirectTo(id, mehtodName, methodProtocol) {
+      console.log(methodProtocol)
+      this.$router.push({
+        path: `/mock/httpmock/${id}`, query: { mehtodName: mehtodName, methodProtocol: methodProtocol }
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+.showInfo {
+  width: 400px;
+  height: 400px;
+  text-align: center;
+  position: fixed;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%,-50%);
+}
+.showZm {
+  position:absolute;
+  background-color: #ccc;
+  width: 100%;
+  height: 100%;
+  opacity: 0.5;
+}
+.showBtn {
+  color: red;
+  padding-left: 200px;
+}
+.filter-item {
+  margin-top: 10px;
+}
+</style>