Casper Dai 1 год назад
Родитель
Сommit
fe2bab2e28

+ 2 - 2
.env.development

@@ -27,5 +27,5 @@ VUE_APP_OFFLINE_MAP_PROXY = '/tiles'
 # VUE_APP_GATEWAY = '10.180.88.84:8093'
 # VUE_APP_KEYCLOAK_OPTIONS_URL = 'http://10.180.88.84:8093/auth'
 # 屏管家
-# VUE_APP_GATEWAY = '172.31.4.238'
-# VUE_APP_KEYCLOAK_OPTIONS_URL = 'http://172.31.4.238/auth'
+VUE_APP_GATEWAY = '172.31.4.238'
+VUE_APP_KEYCLOAK_OPTIONS_URL = 'http://172.31.4.238/auth'

+ 15 - 15
src/router/index.js

@@ -386,6 +386,21 @@ export const asyncRoutes = [
         path: 'ai/camera',
         component: () => import('@/views/external/camera/snap/index'),
         meta: { title: '摄像头黑屏检测' }
+      },
+      {
+        path: 'template',
+        component: () => import('@/views/broadcast/template/index'),
+        meta: { title: '应急广播模板管理' }
+      },
+      {
+        path: 'mqtt',
+        component: () => import('@/views/platform/debug/index'),
+        meta: { title: 'MQTT' }
+      },
+      {
+        path: 'remote/log',
+        component: () => import('@/views/platform/remote-log/index'),
+        meta: { title: '日志抓取' }
       }
     ]
   },
@@ -514,26 +529,11 @@ export const asyncRoutes = [
         component: () => import('@/views/platform/tenant/index'),
         meta: { title: '租户管理' }
       },
-      {
-        path: 'template',
-        component: () => import('@/views/broadcast/template/index'),
-        meta: { title: '应急广播模板管理' }
-      },
       {
         path: 'ai/stock',
         component: () => import('@/views/platform/ai-stock/index'),
         meta: { title: 'AI审核库存' }
       },
-      {
-        path: 'mqtt',
-        component: () => import('@/views/platform/debug/index'),
-        meta: { title: 'MQTT' }
-      },
-      {
-        path: 'remote/log',
-        component: () => import('@/views/platform/remote-log/index'),
-        meta: { title: '日志抓取' }
-      },
       {
         path: 'cooperation',
         component: () => import('@/views/platform/cooperation/index'),

+ 2 - 2
src/views/device/detail/components/DeviceExternal/components/Traffic.vue

@@ -7,7 +7,7 @@
         class="l-flex l-flex--col l-flex__auto"
       >
         <el-tab-pane
-          label="实时画面"
+          label="瀹炴椂鐢婚潰"
           name="real"
         >
           <grid-table
@@ -28,7 +28,7 @@
           </grid-table>
         </el-tab-pane>
         <el-tab-pane
-          label="录像回放"
+          label="褰曞儚鍥炴斁"
           name="record"
         >
           <camera-record :cameras="cameras" />

+ 9 - 22
src/views/platform/remote-log/index.vue

@@ -5,15 +5,10 @@
     padding
     background
   >
-    <platform-page
-      class="l-flex__fill"
-      @change="onTenantChanged"
-    >
-      <schema-table
-        ref="table"
-        :schema="schema"
-      />
-    </platform-page>
+    <schema-table
+      ref="table"
+      :schema="schema"
+    />
     <confirm-dialog
       ref="editDialog"
       title="日志抓取配置"
@@ -97,6 +92,7 @@
 </template>
 
 <script>
+import { mapGetters } from 'vuex'
 import { parseTime } from '@/utils'
 import { getAssetUrl } from '@/api/asset'
 import { getDevicesByTenant } from '@/api/device'
@@ -156,12 +152,12 @@ export default {
         ]
       },
       currDeviceId: null,
-      currDeviceTenant: null,
       title: '',
       sn: ''
     }
   },
   computed: {
+    ...mapGetters(['tenant']),
     heartbeatSchema () {
       return {
         nonPagination: true,
@@ -194,7 +190,7 @@ export default {
       return {
         list: getRemoteLogs,
         autoRefresh: true,
-        condition: { tenant: this.currDeviceTenant, deviceId: this.currDeviceId },
+        condition: { tenant: this.tenant, deviceId: this.currDeviceId },
         cols: [
           { prop: 'settingId', label: '事件' },
           { label: '执行状态', type: 'tag', render: ({ status }) => {
@@ -215,15 +211,8 @@ export default {
     }
   },
   methods: {
-    onTenantChanged (tenant) {
-      this.$tenant = tenant
-      this.$refs.table?.pageTo(1)
-    },
     getDevicesByTenant (params) {
-      if (!this.$tenant) {
-        return Promise.resolve({ data: [] })
-      }
-      return getDevicesByTenant(this.$tenant.path, params)
+      return getDevicesByTenant(this.tenant, params)
     },
     getheartbeatData (params) {
       if (this.sn) {
@@ -268,7 +257,6 @@ export default {
         } else {
           this.logSetting = { ...defaultLogSettingForm }
         }
-        this.currDeviceTenant = device.tenant
         this.currDeviceId = device.id
         this.$refs.editDialog.show()
       })
@@ -284,7 +272,7 @@ export default {
       }
 
       await startRemoteLog({
-        tenant: this.currDeviceTenant,
+        tenant: this.tenant,
         deviceId: this.currDeviceId,
         duration,
         activate: true,
@@ -295,7 +283,6 @@ export default {
     },
     onResult (device) {
       this.$deviceName = device.name
-      this.currDeviceTenant = device.tenant
       this.currDeviceId = device.id
       this.$refs.resultDialog.show()
     },