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 1 <template>
2 2 <div>
3 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 5 <BasicTable
11 6 style="flex: auto"
12 7 @register="registerTable"
... ...
1 1 <template>
2 2 <div>
3 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 5 <BasicTable
10 6 style="flex: auto"
11 7 @register="registerTable"
... ...
1 1 <template>
2 2 <div>
3 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 5 <BasicTable
11 6 style="flex: auto"
12 7 :clickToRowSelect="false"
... ...
... ... @@ -11,6 +11,7 @@
11 11 :replaceFields="{ key: 'id', title: 'name' }"
12 12 :selectedKeys="selectedKeys"
13 13 @select="handleSelect"
  14 + v-bind="$attrs"
14 15 />
15 16 </div>
16 17 </template>
... ... @@ -18,6 +19,7 @@
18 19 import { onMounted, ref } from 'vue';
19 20 import { BasicTree, TreeItem } from '/@/components/Tree';
20 21 import { getOrganizationList } from '/@/api/system/system';
  22 +
21 23 const emit = defineEmits(['select']);
22 24 const treeData = ref<TreeItem[]>([]);
23 25 const selectedKeys = ref<string[]>();
... ...
1 1 <template>
2 2 <div>
3 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 5 <BasicTable
11 6 style="flex: auto"
12 7 :clickToRowSelect="false"
... ...
... ... @@ -16,7 +16,7 @@
16 16 </div>
17 17 <Tooltip>
18 18 <template #title>
19   - 设备数 :{{ growCardList?.deviceInfo.sumCount }} 今日新增
  19 + 设备数 : {{ growCardList?.deviceInfo.sumCount }} 今日新增
20 20 {{ toThousands(growCardList?.deviceInfo?.todayAdd) }}
21 21 </template>
22 22 <img src="/src/assets/images/tip.png" style="width: 1.125rem; height: 1.125rem" />
... ... @@ -59,8 +59,8 @@
59 59 <template #title>
60 60 {{
61 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 65 </template>
66 66 <img src="/src/assets/images/tip.png" style="width: 1.125rem; height: 1.125rem" />
... ... @@ -106,8 +106,10 @@
106 106 <template #title>
107 107 {{
108 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 114 </template>
113 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 // 表格列数据
7 7 export const columns: BasicColumn[] = [
8 8 {
  9 + title: '状态',
  10 + dataIndex: 'deviceState',
  11 + width: 120,
  12 + slots: { customRender: 'deviceState' },
  13 + },
  14 + {
9 15 title: '设备图片',
10 16 dataIndex: 'deviceInfo.avatar',
11 17 width: 120,
... ... @@ -45,12 +51,6 @@ export const columns: BasicColumn[] = [
45 51 width: 180,
46 52 },
47 53 {
48   - title: '状态',
49   - dataIndex: 'deviceState',
50   - width: 120,
51   - slots: { customRender: 'deviceState' },
52   - },
53   - {
54 54 title: '最后连接时间',
55 55 dataIndex: 'lastOnlineTime',
56 56 format: (text) => text && formatToDate(text, 'YYYY-MM-DD HH:mm:ss'),
... ...
1 1 <template>
2 2 <div>
3 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 5 <BasicTable style="flex: auto" @register="registerTable" class="w-5/6 xl:w-4/5">
10 6 <template #toolbar>
11 7 <Authority value="api:yt:device:post">
... ...
1 1 <template>
2 2 <div>
3 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 5 <BasicTable
10 6 style="flex: auto"
11 7 :clickToRowSelect="false"
... ...