|
|
@ -12,7 +12,7 @@ |
|
|
|
src="../image/liftState/escalator.png" |
|
|
|
alt="" /> |
|
|
|
<div style="margin-left: 6px; font-size: 20px; line-height: 28px"> |
|
|
|
{{ selctLeft.name }} |
|
|
|
{{ selctLeft.deviceInfoName }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- 左侧抽屉的关闭按钮 --> |
|
|
@ -23,6 +23,7 @@ |
|
|
|
<a-table |
|
|
|
style="width: 100%" |
|
|
|
:columns="column" |
|
|
|
:loading="loading" |
|
|
|
:data-source="dataSource" |
|
|
|
:pagination="pagination"> |
|
|
|
<template #bodyCell="{ record, column }"> |
|
|
@ -31,15 +32,15 @@ |
|
|
|
style="background-color: rgba(0, 0, 0, 0.5); width: 50px" |
|
|
|
:style="{ |
|
|
|
border: { |
|
|
|
'0': '1px solid rgba(0, 255, 210, 1)', //2 |
|
|
|
'1': '1px solid rgba(191, 205, 226, 1)', //关闭 |
|
|
|
}[record.switch], |
|
|
|
'1': '1px solid rgba(0, 255, 210, 1)', //2 |
|
|
|
'0': '1px solid rgba(191, 205, 226, 1)', //关闭 |
|
|
|
}[record.switchStatus.value], |
|
|
|
color: { |
|
|
|
'0': 'rgba(0, 255, 210, 1)', //正常 |
|
|
|
'1': 'rgba(191, 205, 226, 1)', //关闭 |
|
|
|
}[record.switch], |
|
|
|
'1': 'rgba(0, 255, 210, 1)', //正常 |
|
|
|
'0': 'rgba(191, 205, 226, 1)', //关闭 |
|
|
|
}[record.switchStatus.value], |
|
|
|
}" |
|
|
|
>{{ { '0': '开启', '1': '关闭' }[record.switch] }}</a-tag |
|
|
|
>{{ { '1': '开启', '0': '关闭' }[record.switchStatus.value] }}</a-tag |
|
|
|
> |
|
|
|
</template> |
|
|
|
<template v-if="column.dataIndex === 'state'"> |
|
|
@ -48,18 +49,18 @@ |
|
|
|
:style="{ |
|
|
|
border: { |
|
|
|
'0': '1px solid rgba(0, 255, 210, 1)', //正常 |
|
|
|
'1': '1px solid rgba(255, 188, 70, 1)', //维修 |
|
|
|
'2': '1px solid rgba(255, 118, 54, 1)', //故障 |
|
|
|
'1': '1px solid rgba(255, 118, 54, 1)', //故障 |
|
|
|
'2': '1px solid rgba(255, 188, 70, 1)', //维修 |
|
|
|
'3': '1px solid rgba(243, 97, 99, 1)', //告警 |
|
|
|
}[record.state], |
|
|
|
}[record.runStatus.value], |
|
|
|
color: { |
|
|
|
'0': 'rgba(0, 255, 210, 1)', //正常 |
|
|
|
'1': 'rgba(255, 188, 70, 1)', //维修 |
|
|
|
'2': 'rgba(255, 118, 54, 1)', //故障 |
|
|
|
'1': 'rgba(255, 118, 54, 1)', //故障 |
|
|
|
'2': 'rgba(255, 188, 70, 1)', //维修 |
|
|
|
'3': 'rgba(243, 97, 99, 1)', //告警 |
|
|
|
}[record.state], |
|
|
|
}[record.runStatus.value], |
|
|
|
}" |
|
|
|
>{{ { '0': '正常', '1': '维修', '2': '故障', '3': '告警' }[record.state] }}</a-tag |
|
|
|
>{{ record.runStatus.label }}</a-tag |
|
|
|
> |
|
|
|
</template> |
|
|
|
<template v-if="column.dataIndex === 'lift'"> |
|
|
@ -72,24 +73,16 @@ |
|
|
|
'2': '1px solid rgba(255, 188, 70, 1)', //暂停 |
|
|
|
'3': '1px solid rgba(243, 97, 99, 1)', //急停 |
|
|
|
'4': '1px solid rgba(167, 66, 255, 1)', //未知 |
|
|
|
}[record.lift], |
|
|
|
}[record.runMode.value], |
|
|
|
color: { |
|
|
|
'0': 'rgba(0, 255, 210, 1)', //上行 |
|
|
|
'1': 'rgba(0, 255, 210, 1)', //下行 |
|
|
|
'2': 'rgba(255, 188, 70, 1)', //暂停 |
|
|
|
'3': 'rgba(243, 97, 99, 1)', //急停 |
|
|
|
'4': 'rgba(167, 66, 255, 1)', //未知 |
|
|
|
}[record.lift], |
|
|
|
}[record.runMode.value], |
|
|
|
}" |
|
|
|
>{{ |
|
|
|
{ |
|
|
|
'0': '上行', //上行 |
|
|
|
'1': '下行', //下行 |
|
|
|
'2': '暂停', //暂停 |
|
|
|
'3': '急停', //急停 |
|
|
|
'4': '未知', //未知 |
|
|
|
}[record.lift] |
|
|
|
}}</a-tag |
|
|
|
>{{ record.runMode.label }}</a-tag |
|
|
|
> |
|
|
|
</template> |
|
|
|
</template> |
|
|
@ -99,38 +92,25 @@ |
|
|
|
</template> |
|
|
|
<script setup lang="ts"> |
|
|
|
import { DoubleRightOutlined } from '@ant-design/icons-vue'; |
|
|
|
|
|
|
|
import { liftSystemApi } from '/@/api/liftSystem'; |
|
|
|
import { http } from '/nerv-lib/util'; |
|
|
|
// 全局变量 |
|
|
|
import { items } from '/@/store/item'; |
|
|
|
// 全局变量 |
|
|
|
const state = items(); |
|
|
|
import { ref } from 'vue'; |
|
|
|
const emit = defineEmits(['clickDrawer']); |
|
|
|
|
|
|
|
const selctLeft = ref({}); |
|
|
|
const loading = ref(false); |
|
|
|
// 改变页码 |
|
|
|
const handleChangePage = (current: number, pageSize: number) => { |
|
|
|
pagination.value.current = current; |
|
|
|
pagination.value.pageSize = pageSize; |
|
|
|
getList(); |
|
|
|
}; |
|
|
|
|
|
|
|
const dataSource = ref([ |
|
|
|
{ time: '2022-03-01 10:00:00', state: '0', switch: '0', lift: 1 }, |
|
|
|
{ time: '2022-03-01 10:00:00', state: '1', switch: 0, lift: 2 }, |
|
|
|
{ time: '2022-03-01 10:00:00', state: '2', switch: 0, lift: 1 }, |
|
|
|
{ time: '2022-03-01 10:00:00', state: '3', switch: 0, lift: 0 }, |
|
|
|
{ time: '2022-03-01 10:00:00', state: '1', switch: 0, lift: 1 }, |
|
|
|
{ time: '2022-03-01 10:00:00', state: '3', switch: 0, lift: 3 }, |
|
|
|
{ time: '2022-03-01 10:00:00', state: '2', switch: 0, lift: 1 }, |
|
|
|
{ time: '2022-03-01 10:00:00', state: '0', switch: 0, lift: 4 }, |
|
|
|
{ time: '2022-03-01 10:00:00', state: '1', switch: 0, lift: 1 }, |
|
|
|
{ time: '2022-03-01 10:00:00', state: '3', switch: 0, lift: 1 }, |
|
|
|
{ time: '2022-03-01 10:00:00', state: '2', switch: 0, lift: 1 }, |
|
|
|
{ time: '2022-03-01 10:00:00', state: '2', switch: 0, lift: 0 }, |
|
|
|
{ time: '2022-03-01 10:00:00', state: '1', switch: 0, lift: 1 }, |
|
|
|
{ time: '2022-03-01 10:00:00', state: '3', switch: 0, lift: 3 }, |
|
|
|
{ time: '2022-03-01 10:00:00', state: '1', switch: 0, lift: 1 }, |
|
|
|
{ time: '2022-03-01 10:00:00', state: '0', switch: 0, lift: 4 }, |
|
|
|
{ time: '2022-03-01 10:00:00', state: '2', switch: 0, lift: 1 }, |
|
|
|
{ time: '2022-03-01 10:00:00', state: '1', switch: 0, lift: 2 }, |
|
|
|
{ time: '2022-03-01 10:00:00', state: '2', switch: 0, lift: 1 }, |
|
|
|
]); |
|
|
|
const dataSource = ref([]); |
|
|
|
const pagination = ref({ |
|
|
|
total: dataSource.value.length, |
|
|
|
size: 'small', |
|
|
@ -169,9 +149,31 @@ |
|
|
|
width: 80, |
|
|
|
}, |
|
|
|
]; |
|
|
|
const getList = () => { |
|
|
|
loading.value = true; |
|
|
|
http |
|
|
|
.get(liftSystemApi.getDeviceRecordList, { |
|
|
|
projectId: state.projectId, |
|
|
|
siteId: state.siteId, |
|
|
|
codeList: selctLeft.value.record.deviceInfoCode, |
|
|
|
page: pagination.value.current, |
|
|
|
size: pagination.value.pageSize, |
|
|
|
}) |
|
|
|
.then((res) => { |
|
|
|
if (res.msg === 'success') { |
|
|
|
dataSource.value = res.data.data; |
|
|
|
pagination.value.total = res.data.total; |
|
|
|
} |
|
|
|
}) |
|
|
|
.finally(() => { |
|
|
|
loading.value = false; |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
const toggle = (data: any) => { |
|
|
|
pagination.value.current = 1; |
|
|
|
selctLeft.value = data; |
|
|
|
getList(); |
|
|
|
}; |
|
|
|
const clickDrawer = () => { |
|
|
|
emit('clickDrawer'); |
|
|
@ -278,4 +280,7 @@ |
|
|
|
:deep(.anticon) { |
|
|
|
color: #fff !important; |
|
|
|
} |
|
|
|
:deep(.ant-empty-description) { |
|
|
|
color: white !important; |
|
|
|
} |
|
|
|
</style> |
|
|
|