Commit 77398391325bcdc52f8aa6a43407f90ec78d4e05

Authored by sqy
1 parent 135ef43c

'fix:为表格统一添加上标题,修复首页骨架屏没数据问题'

... ... @@ -74,6 +74,7 @@
74 74 const { organizationIdTreeRef, resetFn } = useResetOrganizationTree(searchInfo);
75 75 // 表格hooks
76 76 const [registerTable, { reload }] = useTable({
  77 + title: '告警联系人列表',
77 78 api: getAlarmContact,
78 79 columns,
79 80 clickToRowSelect: false,
... ...
... ... @@ -34,6 +34,7 @@
34 34
35 35 setup() {
36 36 const [registerTable, { reload }] = useTable({
  37 + title: '告警记录列表',
37 38 api: getDeviceAlarm,
38 39 columns: alarmColumns,
39 40 formConfig: {
... ...
... ... @@ -56,8 +56,8 @@
56 56 </Card>
57 57 </div>
58 58 <Card v-else :bordered="false" :bodyStyle="{ padding: 0 }" v-bind="$attrs">
59   - <Skeleton active :paragraph="{ rows: 10 }" :loading="!tenantTop10.length">
60   - <Descriptions :column="1" style="min-height: 180px" title="租户消息量TOP10">
  59 + <Skeleton active :paragraph="{ rows: 10 }" :loading="!tenantTop10">
  60 + <Descriptions :column="1" title="租户消息量TOP10" v-if="tenantTop10.length">
61 61 <template v-for="(item, index) in tenantTop10" :key="item.name">
62 62 <DescriptionsItem>
63 63 <span
... ... @@ -114,6 +114,7 @@
114 114 {{ item.name }}
115 115 </Tooltip>
116 116 </div>
  117 +
117 118 <div class="flex w-7/10">
118 119 <Progress
119 120 :showInfo="false"
... ... @@ -142,6 +143,7 @@
142 143 </DescriptionsItem>
143 144 </template>
144 145 </Descriptions>
  146 + <Empty v-else :image="Empty.PRESENTED_IMAGE_SIMPLE" />
145 147 </Skeleton>
146 148 <h1 style="color: rgba(0, 0, 0, 0.85); font-weight: bold; font-size: 16px">
147 149 本月即将过期租户</h1
... ... @@ -269,7 +271,9 @@
269 271 const tenantTop10 = ref<{ name: string; count: number }[]>([]);
270 272 onMounted(async () => {
271 273 if (isAdmin(props.role)) {
272   - tenantTop10.value = await getTenantTop10();
  274 + const res = await getTenantTop10();
  275 + if (res) tenantTop10.value = res;
  276 + else tenantTop10.value = [];
273 277 return;
274 278 }
275 279 const notice = await notifyMyGetrPageApi({ page: 1, pageSize: 5 });
... ...
... ... @@ -70,6 +70,7 @@
70 70 );
71 71 const NotifyManagerDrawerRef = ref();
72 72 const [registerTable, { reload }] = useTable({
  73 + title: '通知列表',
73 74 api: notifyGetTableApi,
74 75 columns,
75 76 formConfig: {
... ...
... ... @@ -30,6 +30,7 @@
30 30 setup() {
31 31 const [registerModal, { openModal }] = useModal();
32 32 const [registerTable, { reload }] = useTable({
  33 + title: '我的通知',
33 34 api: notifyMyGetrPageApi,
34 35 columns,
35 36 formConfig: {
... ...
... ... @@ -120,7 +120,7 @@
120 120 registerTable,
121 121 { reload, getSelectRowKeys, getSelectRows, setLoading, clearSelectedRowKeys },
122 122 ] = useTable({
123   - title: '数据转换列表',
  123 + title: '数据流转列表',
124 124 clickToRowSelect: false,
125 125 columns,
126 126 api: getConvertApi,
... ...
... ... @@ -58,7 +58,7 @@
58 58 const [registerDrawer, { openDrawer }] = useDrawer();
59 59 const { createMessage } = useMessage();
60 60 const [registerTable, { reload, getSelectRowKeys }] = useTable({
61   - title: '',
  61 + title: '租户配置列表',
62 62 clickToRowSelect: false,
63 63 api: getTableTenantProfileApi,
64 64 columns,
... ...
... ... @@ -92,7 +92,7 @@
92 92 },
93 93 ];
94 94 const [tenantTable, { reload, setLoading }] = useTable({
95   - title: '租户',
  95 + title: '租户列表',
96 96 api: getTenantPage,
97 97 columns: getBasicColumns(),
98 98 useSearchForm: true,
... ...