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