forked from dyf/dyf-vue-ui
联调中心,控制设备仅在线状态,发送指令
This commit is contained in:
@ -69,7 +69,7 @@
|
||||
:data="List"
|
||||
:height="Status.showSearch.length > 0 ? 'calc(100vh - 355px)' : 'calc(100vh - 255px)'"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column type="selection" width="50" align="center" :selectable="isSelectable"/>
|
||||
<el-table-column label="设备名称" align="center" prop="deviceName" />
|
||||
<el-table-column label="设备图片" align="center" prop="devicePic">
|
||||
<template #default="scope">
|
||||
@ -337,6 +337,12 @@ function handleQuery() {
|
||||
queryTime = setTimeout(getList, 500);
|
||||
}
|
||||
|
||||
const isSelectable = (row: any) => {
|
||||
// 仅当在线状态(onlineStatus == 1)时允许选中
|
||||
return row.onlineStatus === 1;
|
||||
}
|
||||
|
||||
|
||||
function getList() {
|
||||
Status.loading = true;
|
||||
api
|
||||
@ -1079,4 +1085,13 @@ onMounted(() => {
|
||||
.SingEditContent .item .imgContent:hover .opt {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.green {
|
||||
color: rgba(0, 165, 82, 1);
|
||||
}
|
||||
|
||||
.red {
|
||||
color: rgba(224, 52, 52, 1);
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user