fix:修改电动门页面

This commit is contained in:
zhaohy
2024-08-15 17:21:34 +08:00
parent 07f1903c98
commit 2635851a44
2 changed files with 39 additions and 47 deletions

View File

@@ -56,13 +56,20 @@
<template #bodyCell="{ record, column }">
<template v-if="column.dataIndex === 'EGstRu'">
<a-tag
style="background-color: rgba(0, 0, 0, 0.5); width: 50px"
style="
background-color: rgba(0, 0, 0, 0.5);
width: 60px;
font-size: 14px;
border-radius: 4px;
"
:style="{
border: '1px solid' + ['#39d7bb', '#f3614d', '#ffa403'][record.EGstRu],
color: ['#39d7bb', '#f3614d', '#ffa403'][record.EGstRu],
}"
>{{ record.EGstRu }}</a-tag
>
border:
'1px solid ' +
{ '0': '#bfcde2', '1': '#0dffa4', '2': '#ffbc46' }[record.EGstRu],
color: { '0': '#bfcde2', '1': '#0dffa4', '2': '#ffbc46' }[record.EGstRu],
}">
{{ record.runMode.label }}
</a-tag>
</template>
</template>
</a-table>
@@ -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;
}
</style>