Commit 2bc2186b828023d779e5cbc38bbb81913208f4a4

Authored by xp.Huang
2 parents 8a745e24 cac9ef02

Merge branch 'f-dev' into 'main'

revert:变换设备列表状态位置

See merge request huang/yun-teng-iot-front!243
1 <template> 1 <template>
2 <div> 2 <div>
3 <PageWrapper dense contentFullHeight contentClass="flex"> 3 <PageWrapper dense contentFullHeight contentClass="flex">
4 - <OrganizationIdTree  
5 - class="w-1/4 xl:w-1/5"  
6 - @select="handleSelect"  
7 - style="position: relative"  
8 - ref="organizationIdTreeRef"  
9 - /> 4 + <OrganizationIdTree @select="handleSelect" ref="organizationIdTreeRef" />
10 <BasicTable 5 <BasicTable
11 style="flex: auto" 6 style="flex: auto"
12 @register="registerTable" 7 @register="registerTable"
1 <template> 1 <template>
2 <div> 2 <div>
3 <PageWrapper dense contentFullHeight contentClass="flex"> 3 <PageWrapper dense contentFullHeight contentClass="flex">
4 - <OrganizationIdTree  
5 - class="w-1/4 xl:w-1/5"  
6 - @select="handleSelect"  
7 - ref="organizationIdTreeRef"  
8 - /> 4 + <OrganizationIdTree @select="handleSelect" ref="organizationIdTreeRef" />
9 <BasicTable 5 <BasicTable
10 style="flex: auto" 6 style="flex: auto"
11 @register="registerTable" 7 @register="registerTable"
1 <template> 1 <template>
2 <div> 2 <div>
3 <PageWrapper dense contentFullHeight contentClass="flex"> 3 <PageWrapper dense contentFullHeight contentClass="flex">
4 - <OrganizationIdTree  
5 - class="w-1/4 xl:w-1/5"  
6 - @select="handleSelect"  
7 - ref="organizationIdTreeRef"  
8 - style="position: relative"  
9 - /> 4 + <OrganizationIdTree @select="handleSelect" ref="organizationIdTreeRef" />
10 <BasicTable 5 <BasicTable
11 style="flex: auto" 6 style="flex: auto"
12 :clickToRowSelect="false" 7 :clickToRowSelect="false"
@@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
11 :replaceFields="{ key: 'id', title: 'name' }" 11 :replaceFields="{ key: 'id', title: 'name' }"
12 :selectedKeys="selectedKeys" 12 :selectedKeys="selectedKeys"
13 @select="handleSelect" 13 @select="handleSelect"
  14 + v-bind="$attrs"
14 /> 15 />
15 </div> 16 </div>
16 </template> 17 </template>
@@ -18,6 +19,7 @@ @@ -18,6 +19,7 @@
18 import { onMounted, ref } from 'vue'; 19 import { onMounted, ref } from 'vue';
19 import { BasicTree, TreeItem } from '/@/components/Tree'; 20 import { BasicTree, TreeItem } from '/@/components/Tree';
20 import { getOrganizationList } from '/@/api/system/system'; 21 import { getOrganizationList } from '/@/api/system/system';
  22 +
21 const emit = defineEmits(['select']); 23 const emit = defineEmits(['select']);
22 const treeData = ref<TreeItem[]>([]); 24 const treeData = ref<TreeItem[]>([]);
23 const selectedKeys = ref<string[]>(); 25 const selectedKeys = ref<string[]>();
1 <template> 1 <template>
2 <div> 2 <div>
3 <PageWrapper dense contentFullHeight contentClass="flex"> 3 <PageWrapper dense contentFullHeight contentClass="flex">
4 - <OrganizationIdTree  
5 - class="w-1/4 xl:w-1/5"  
6 - @select="handleSelect"  
7 - ref="organizationIdTreeRef"  
8 - style="position: relative"  
9 - /> 4 + <OrganizationIdTree @select="handleSelect" ref="organizationIdTreeRef" />
10 <BasicTable 5 <BasicTable
11 style="flex: auto" 6 style="flex: auto"
12 :clickToRowSelect="false" 7 :clickToRowSelect="false"
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 </div> 16 </div>
17 <Tooltip> 17 <Tooltip>
18 <template #title> 18 <template #title>
19 - 设备数 :{{ growCardList?.deviceInfo.sumCount }} 今日新增 19 + 设备数 : {{ growCardList?.deviceInfo.sumCount }} 今日新增
20 {{ toThousands(growCardList?.deviceInfo?.todayAdd) }} 20 {{ toThousands(growCardList?.deviceInfo?.todayAdd) }}
21 </template> 21 </template>
22 <img src="/src/assets/images/tip.png" style="width: 1.125rem; height: 1.125rem" /> 22 <img src="/src/assets/images/tip.png" style="width: 1.125rem; height: 1.125rem" />
@@ -59,8 +59,8 @@ @@ -59,8 +59,8 @@
59 <template #title> 59 <template #title>
60 {{ 60 {{
61 !isAdmin(role) 61 !isAdmin(role)
62 - ? `告警数:今日新增${toThousands(growCardList?.alarmInfo?.todayAdd)}`  
63 - : `租户总量:今日新增${toThousands(growCardList?.alarmInfo?.todayAdd)}` 62 + ? `告警数:今日新增 ${toThousands(growCardList?.alarmInfo?.todayAdd)}`
  63 + : `租户总量:今日新增 ${toThousands(growCardList?.alarmInfo?.todayAdd)}`
64 }} 64 }}
65 </template> 65 </template>
66 <img src="/src/assets/images/tip.png" style="width: 1.125rem; height: 1.125rem" /> 66 <img src="/src/assets/images/tip.png" style="width: 1.125rem; height: 1.125rem" />
@@ -106,8 +106,10 @@ @@ -106,8 +106,10 @@
106 <template #title> 106 <template #title>
107 {{ 107 {{
108 !isAdmin(role) 108 !isAdmin(role)
109 - ? `消息数:今日新增${toThousands(growCardList?.messageInfo?.todayMessageAdd)}`  
110 - : `客户总量:今日新增${toThousands(growCardList?.messageInfo?.todayMessageAdd)}` 109 + ? `消息数:今日新增 ${toThousands(growCardList?.messageInfo?.todayMessageAdd)}`
  110 + : `客户总量:今日新增 ${toThousands(
  111 + growCardList?.messageInfo?.todayMessageAdd
  112 + )}`
111 }} 113 }}
112 </template> 114 </template>
113 <img src="/src/assets/images/tip.png" style="width: 1.125rem; height: 1.125rem" /> 115 <img src="/src/assets/images/tip.png" style="width: 1.125rem; height: 1.125rem" />
@@ -6,6 +6,12 @@ import { DeviceTypeEnum, DeviceState } from '/@/api/device/model/deviceModel'; @@ -6,6 +6,12 @@ import { DeviceTypeEnum, DeviceState } from '/@/api/device/model/deviceModel';
6 // 表格列数据 6 // 表格列数据
7 export const columns: BasicColumn[] = [ 7 export const columns: BasicColumn[] = [
8 { 8 {
  9 + title: '状态',
  10 + dataIndex: 'deviceState',
  11 + width: 120,
  12 + slots: { customRender: 'deviceState' },
  13 + },
  14 + {
9 title: '设备图片', 15 title: '设备图片',
10 dataIndex: 'deviceInfo.avatar', 16 dataIndex: 'deviceInfo.avatar',
11 width: 120, 17 width: 120,
@@ -45,12 +51,6 @@ export const columns: BasicColumn[] = [ @@ -45,12 +51,6 @@ export const columns: BasicColumn[] = [
45 width: 180, 51 width: 180,
46 }, 52 },
47 { 53 {
48 - title: '状态',  
49 - dataIndex: 'deviceState',  
50 - width: 120,  
51 - slots: { customRender: 'deviceState' },  
52 - },  
53 - {  
54 title: '最后连接时间', 54 title: '最后连接时间',
55 dataIndex: 'lastOnlineTime', 55 dataIndex: 'lastOnlineTime',
56 format: (text) => text && formatToDate(text, 'YYYY-MM-DD HH:mm:ss'), 56 format: (text) => text && formatToDate(text, 'YYYY-MM-DD HH:mm:ss'),
1 <template> 1 <template>
2 <div> 2 <div>
3 <PageWrapper dense contentFullHeight contentClass="flex"> 3 <PageWrapper dense contentFullHeight contentClass="flex">
4 - <OrganizationIdTree  
5 - class="w-1/6 xl:w-1/5"  
6 - @select="handleSelect"  
7 - ref="organizationIdTreeRef"  
8 - /> 4 + <OrganizationIdTree @select="handleSelect" ref="organizationIdTreeRef" />
9 <BasicTable style="flex: auto" @register="registerTable" class="w-5/6 xl:w-4/5"> 5 <BasicTable style="flex: auto" @register="registerTable" class="w-5/6 xl:w-4/5">
10 <template #toolbar> 6 <template #toolbar>
11 <Authority value="api:yt:device:post"> 7 <Authority value="api:yt:device:post">
1 <template> 1 <template>
2 <div> 2 <div>
3 <PageWrapper dense contentFullHeight contentClass="flex"> 3 <PageWrapper dense contentFullHeight contentClass="flex">
4 - <OrganizationIdTree  
5 - class="w-1/4 xl:w-1/5"  
6 - @select="handleSelect"  
7 - ref="organizationIdTreeRef"  
8 - /> 4 + <OrganizationIdTree @select="handleSelect" ref="organizationIdTreeRef" />
9 <BasicTable 5 <BasicTable
10 style="flex: auto" 6 style="flex: auto"
11 :clickToRowSelect="false" 7 :clickToRowSelect="false"