|
|
@@ -12,16 +12,18 @@ defineOptions({ name: 'TdDeviceDetail' })
|
|
|
|
|
|
dayjs.extend(quarterOfYear)
|
|
|
|
|
|
-const { params } = useRoute()
|
|
|
+const { query } = useRoute()
|
|
|
+
|
|
|
+console.log('query :>> ', query)
|
|
|
|
|
|
const data = ref({
|
|
|
- deviceCode: params.code || '',
|
|
|
- deviceName: params.name || '',
|
|
|
- lastInlineTime: params.time || '',
|
|
|
- ifInline: params.ifInline || '',
|
|
|
- dept: params.dept || '',
|
|
|
- vehicle: params.vehicle || '',
|
|
|
- carOnline: params.carOnline || ''
|
|
|
+ deviceCode: query.code || '',
|
|
|
+ deviceName: query.name || '',
|
|
|
+ lastInlineTime: query.time || '',
|
|
|
+ ifInline: query.ifInline || '',
|
|
|
+ dept: query.dept || '',
|
|
|
+ vehicle: query.vehicle || '',
|
|
|
+ carOnline: query.carOnline || ''
|
|
|
})
|
|
|
|
|
|
const disabledIdentifier = ref<string[]>(['online', 'vehicle_name', 'touchScreenDataAccumulate'])
|
|
|
@@ -100,10 +102,10 @@ let minInterval = 0
|
|
|
|
|
|
// 1. 加载 specs
|
|
|
const loadSpecs = async () => {
|
|
|
- if (!params.id) return
|
|
|
+ if (!query.id) return
|
|
|
specsLoading.value = true
|
|
|
- const res = await IotDeviceApi.getIotDeviceTds(Number(params.id))
|
|
|
- const zhbdres = await IotDeviceApi.getIotDeviceZHBDTds(Number(params.id))
|
|
|
+ const res = await IotDeviceApi.getIotDeviceTds(Number(query.id))
|
|
|
+ const zhbdres = await IotDeviceApi.getIotDeviceZHBDTds(Number(query.id))
|
|
|
|
|
|
zhbdspecs.value = zhbdres.sort((a, b) => b.modelOrder - a.modelOrder)
|
|
|
gatewayspecs.value = res.sort((a, b) => b.modelOrder - a.modelOrder)
|
|
|
@@ -365,7 +367,7 @@ onUnmounted(() => {
|
|
|
离线
|
|
|
</el-tag>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="中航北斗" class="online" type="plain">
|
|
|
+ <el-form-item v-if="data.carOnline" label="中航北斗" class="online" type="plain">
|
|
|
<el-tag
|
|
|
v-if="data.carOnline === 'true'"
|
|
|
type="success"
|