From 2635851a44bcafcc7e2439752ede859c44aec2d9 Mon Sep 17 00:00:00 2001
From: zhaohy <1695786511@qq.com>
Date: Thu, 15 Aug 2024 17:21:34 +0800
Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E7=94=B5=E5=8A=A8?=
=?UTF-8?q?=E9=97=A8=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../view/equipmentControl/electricDoor/index.vue | 29 +++++++----
.../view/equipmentControl/electricDoor/tables.vue | 57 ++++++++--------------
2 files changed, 39 insertions(+), 47 deletions(-)
diff --git a/hx-ai-intelligent/src/view/equipmentControl/electricDoor/index.vue b/hx-ai-intelligent/src/view/equipmentControl/electricDoor/index.vue
index ede2899..3b2b72c 100644
--- a/hx-ai-intelligent/src/view/equipmentControl/electricDoor/index.vue
+++ b/hx-ai-intelligent/src/view/equipmentControl/electricDoor/index.vue
@@ -56,13 +56,20 @@
{{ record.EGstRu }}
+ border:
+ '1px solid ' +
+ { '0': '#bfcde2', '1': '#0dffa4', '2': '#ffbc46' }[record.EGstRu],
+ color: { '0': '#bfcde2', '1': '#0dffa4', '2': '#ffbc46' }[record.EGstRu],
+ }">
+ {{ record.runMode.label }}
+
@@ -114,12 +121,11 @@
})
.then((res) => {
if (res.msg === 'success') {
- console.log(res, '数据');
dataSource.value = res.data;
}
});
};
- const intervalId = setInterval(getDoorList, 10000);
+ const intervalId = setInterval(getDoorList, 600000);
//页面 创建
onMounted(() => {
//调用电梯接口 定时获取电梯接口 获取当前门状态
@@ -127,10 +133,10 @@
});
// 页面销毁
onUnmounted(() => {
- console.log('组件已卸载');
// 这里写销毁时需要执行的逻辑
clearInterval(intervalId);
});
+ //table ref
const tables = ref(null);
const customRow = (record: any) => {
return {
@@ -157,7 +163,7 @@
dataIndex: 'time',
key: 'time',
width: 100,
- customRender: ({ value }) => {
+ customRender: ({ value }: any) => {
return value.substring(11, 19);
},
},
@@ -334,4 +340,7 @@
transform: translateX(400px); /* 移动到离开位置 */
}
}
+ :deep(.ant-tabs) {
+ overflow-y: auto !important;
+ }
diff --git a/hx-ai-intelligent/src/view/equipmentControl/electricDoor/tables.vue b/hx-ai-intelligent/src/view/equipmentControl/electricDoor/tables.vue
index ce74fdd..417db8b 100644
--- a/hx-ai-intelligent/src/view/equipmentControl/electricDoor/tables.vue
+++ b/hx-ai-intelligent/src/view/equipmentControl/electricDoor/tables.vue
@@ -1,11 +1,14 @@
-
+
- {{ record.state }}
+ {{
+ record.switchStatus.label
+ }}
@@ -26,9 +29,10 @@
const handleChangePage = (current: number, pageSize: number) => {
pagination.value.current = current;
pagination.value.pageSize = pageSize;
- console.log(current, pageSize);
+ getList();
};
const info = ref({});
+ const loading = ref(false);
const pagination = ref({
total: 0,
size: 'small',
@@ -45,8 +49,8 @@
const columnLog = [
{
title: '执行时间',
- dataIndex: 'age',
- key: 'age',
+ dataIndex: 'time',
+ key: 'time',
width: 140,
},
{
@@ -56,34 +60,9 @@
width: 80,
},
];
- const dataSourceLog = ref([
- { age: '2024-07-26 23:50:20', state: '开启' },
- { age: '2024-07-26 23:50:20', state: '关闭' },
- { age: '2024-07-26 23:50:20', state: '开启' },
- { age: '2024-07-26 23:50:20', state: '关闭' },
- { age: '2024-07-26 23:50:20', state: '开启' },
- { age: '2024-07-26 23:50:20', state: '关闭' },
- { age: '2024-07-26 23:50:20', state: '开启' },
- { age: '2024-07-26 23:50:20', state: '关闭' },
- { age: '2024-07-26 23:50:20', state: '开启' },
- { age: '2024-07-26 23:50:20', state: '关闭' },
- { age: '2024-07-26 23:50:20', state: '开启' },
- { age: '2024-07-26 23:50:20', state: '关闭' },
- { age: '2024-07-26 23:50:20', state: '开启' },
- { age: '2024-07-26 23:50:20', state: '关闭' },
- { age: '2024-07-26 23:50:20', state: '开启' },
- { age: '2024-07-26 23:50:20', state: '关闭' },
- { age: '2024-07-26 23:50:20', state: '开启' },
- { age: '2024-07-26 23:50:20', state: '关闭' },
- { age: '2024-07-26 23:50:20', state: '开启' },
- { age: '2024-07-26 23:50:20', state: '关闭' },
- { age: '2024-07-26 23:50:20', state: '开启' },
- { age: '2024-07-26 23:50:20', state: '关闭' },
- { age: '2024-07-26 23:50:20', state: '开启' },
- { age: '2024-07-26 23:50:20', state: '关闭' },
- { age: '2024-07-26 23:50:20', state: '开启' },
- ]);
+ const dataSourceLog = ref([]);
const getList = () => {
+ loading.value = true;
http
.get(electricDoorApi.getDeviceRecordList, {
projectId: state.projectId,
@@ -94,9 +73,12 @@
})
.then((res) => {
if (res.msg === 'success') {
- console.log(res, '数据');
- dataSourceLog.value = res.data;
+ dataSourceLog.value = res.data.data;
+ pagination.value.total = res.data.total;
}
+ })
+ .finally(() => {
+ loading.value = false;
});
};
const toggle = (data: any) => {
@@ -110,6 +92,7 @@
pagination,
handleChangePage,
info,
+ loading,
getList,
};
},