设备筛选bug处理

This commit is contained in:
kerwincui
2022-06-10 13:52:44 +08:00
parent 72cd1e95fd
commit 6f2800cdb8
3 changed files with 15 additions and 16 deletions

View File

@@ -259,11 +259,13 @@ export default {
let productId = this.$route.query.productId let productId = this.$route.query.productId
if (productId != null) { if (productId != null) {
this.queryParams.productId = Number(productId); this.queryParams.productId = Number(productId);
this.queryParams.groupId=null;
} }
// 分组筛选 // 分组筛选
let groupId = this.$route.query.groupId let groupId = this.$route.query.groupId
if (groupId != null) { if (groupId != null) {
this.queryParams.groupId = Number(groupId); this.queryParams.groupId = Number(groupId);
this.queryParams.productId=null;
} }
this.getList(); this.getList();
@@ -278,11 +280,13 @@ export default {
let productId = this.$route.query.productId let productId = this.$route.query.productId
if (productId != null) { if (productId != null) {
this.queryParams.productId = Number(productId); this.queryParams.productId = Number(productId);
this.queryParams.groupId=null;
} }
// 分组筛选 // 分组筛选
let groupId = this.$route.query.groupId let groupId = this.$route.query.groupId
if (groupId != null) { if (groupId != null) {
this.queryParams.groupId = Number(groupId); this.queryParams.groupId = Number(groupId);
this.queryParams.productId=null;
} }
this.getList(); this.getList();
} }

View File

@@ -331,14 +331,14 @@ export default {
updateDeviceStatus(device) { updateDeviceStatus(device) {
if (device.status == 3) { if (device.status == 3) {
this.statusColor.background = '#12d09f'; this.statusColor.background = '#12d09f';
this.title = "设备控制(在线)"; this.title = "在线模式";
} else { } else {
if (device.isShadow == 1) { if (device.isShadow == 1) {
this.statusColor.background = '#409EFF'; this.statusColor.background = '#409EFF';
this.title = "设备控制(影子模式"; this.title = "影子模式";
} else { } else {
this.statusColor.background = '#909399'; this.statusColor.background = '#909399';
this.title = "设备控制(设备不在线 未启用影子)"; this.title = "离线模式";
this.shadowUnEnable = true; this.shadowUnEnable = true;
} }
} }

View File

@@ -41,17 +41,12 @@
<el-table v-loading="loading" :data="authorizeList" @selection-change="handleSelectionChange" @cell-dblclick="celldblclick" size="small"> <el-table v-loading="loading" :data="authorizeList" @selection-change="handleSelectionChange" @cell-dblclick="celldblclick" size="small">
<el-table-column type="selection" :selectable="selectable" width="55" align="center" /> <el-table-column type="selection" :selectable="selectable" width="55" align="center" />
<el-table-column label="状态" align="center" prop="active" width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.iot_auth_status" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="active" width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.iot_auth_status" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="授权码" width="320" align="center" prop="authorizeCode" /> <el-table-column label="授权码" width="320" align="center" prop="authorizeCode" />
<el-table-column label="状态" align="center" prop="active" width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.iot_auth_status" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="设备ID" width="75" align="center" prop="deviceId" /> <el-table-column label="设备ID" width="75" align="center" prop="deviceId" />
<el-table-column label="设备编号" width="150" align="center" prop="serialNumber" /> <el-table-column label="设备编号" width="150" align="center" prop="serialNumber" />
<el-table-column label="授权时间" align="center" prop="updateTime" width="180"> <el-table-column label="授权时间" align="center" prop="updateTime" width="180">
@@ -186,7 +181,7 @@ export default {
// 编辑类型remark=备注、auth=设备授权 // 编辑类型remark=备注、auth=设备授权
editType: '', editType: '',
// 编辑界面宽度 // 编辑界面宽度
editWidth:'500px', editWidth: '500px',
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 选中数组 // 选中数组
@@ -365,10 +360,10 @@ export default {
this.open = true; this.open = true;
if (this.editType == 'auth') { if (this.editType == 'auth') {
this.title = "选择设备"; this.title = "选择设备";
this.editWidth="800px"; this.editWidth = "800px";
} else { } else {
this.title = "备注信息"; this.title = "备注信息";
this.editWidth="500px"; this.editWidth = "500px";
} }
// 取消选中 // 取消选中