|
|
@@ -77,11 +77,14 @@
|
|
|
@change="changePage"
|
|
|
>
|
|
|
<template #bodyCell="{column, record}">
|
|
|
+ <template v-if="column.key === 'id'" >
|
|
|
+ <a @click="goDetailPage(record.id)">{{record.id}}</a>
|
|
|
+ </template>
|
|
|
<template v-if="column.key === 'deviceStatus'" >
|
|
|
- <a-tag :color="record.deviceStatus.color" >{{record.deviceStatus.name}}</a-tag>
|
|
|
- </template>
|
|
|
+ <a-tag :color="record.deviceStatus.color" >{{record.deviceStatus.name}}</a-tag>
|
|
|
+ </template>
|
|
|
<template v-if="column.key === 'deviceNodeType'" >
|
|
|
- {{record.deviceNodeType == 'GATEWAY' ? '直连类型' : '非直连类型' }}
|
|
|
+ <a-Tag>{{record.deviceNodeType == 'GATEWAY' ? '直连类型' : '非直连类型' }}</a-Tag>
|
|
|
</template>
|
|
|
</template>
|
|
|
</a-table>
|
|
|
@@ -118,6 +121,9 @@
|
|
|
}"
|
|
|
>
|
|
|
<template #bodyCell="{column, record}" >
|
|
|
+ <template v-if="column.key === 'id'" >
|
|
|
+ <a @click="goDetailPage(record.id)">{{record.id}}</a>
|
|
|
+ </template>
|
|
|
<template v-if="column.key === 'action'" >
|
|
|
<a-space>
|
|
|
<a >详情</a>
|
|
|
@@ -234,10 +240,17 @@ import { ReloadIconTsx } from '@/components/MicroComponents/index'
|
|
|
import { DeviceContriller, ModelController } from '@/controller'
|
|
|
import { computed, onMounted, reactive, ref, watch } from 'vue'
|
|
|
import { PlusCircleOutlined, DeleteOutlined } from '@ant-design/icons-vue'
|
|
|
-import { Form } from 'ant-design-vue'
|
|
|
+import { Form, Tag } from 'ant-design-vue'
|
|
|
+import { useRouter } from 'vue-router'
|
|
|
+
|
|
|
+const router = useRouter()
|
|
|
|
|
|
const useForm = Form.useForm
|
|
|
|
|
|
+const goDetailPage = (id: string) => {
|
|
|
+ router.push({ path: '/device/detail', query: { id } })
|
|
|
+}
|
|
|
+
|
|
|
const columns = [
|
|
|
|
|
|
{
|
|
|
@@ -247,7 +260,8 @@ const columns = [
|
|
|
},
|
|
|
{
|
|
|
title: '设备ID',
|
|
|
- dataIndex: 'id'
|
|
|
+ dataIndex: 'id',
|
|
|
+ key: 'id'
|
|
|
},
|
|
|
{
|
|
|
title: '设备名称',
|
|
|
@@ -277,6 +291,11 @@ const columns = [
|
|
|
]
|
|
|
|
|
|
const groupDeviceColumns = [
|
|
|
+ {
|
|
|
+ title: '设备ID',
|
|
|
+ dataIndex: 'id',
|
|
|
+ key: 'id'
|
|
|
+ },
|
|
|
{
|
|
|
title: '设备名称',
|
|
|
dataIndex: 'deviceLabel'
|