bug处理

This commit is contained in:
kerwincui
2022-06-12 02:06:03 +08:00
parent 5f675aa796
commit 9cd08b74d1
6 changed files with 95 additions and 28 deletions

View File

@@ -33,8 +33,10 @@
<el-row type="flex" :gutter="10" justify="space-between">
<el-col :span="20" style="text-align:left;">
<el-link type="" :underline="false" @click="handleEditDevice(item)" style="font-weight:bold;font-size:16px;line-height:32px;">
<svg-icon icon-class="device" v-if="item.isOwner==1" />
<svg-icon icon-class="share" v-else />
<el-tooltip class="item" effect="dark" content="分享的设备" placement="top-start">
<svg-icon icon-class="share" style="font-size:20px;" v-if="item.isOwner!=1" />
</el-tooltip>
<svg-icon icon-class="device" v-if="item.isOwner==1" />
{{item.deviceName}}
<el-tag size="mini" type="info">Version {{item.firmwareVersion}}</el-tag>
</el-link>
@@ -51,11 +53,13 @@
</el-row>
<el-row :gutter="10">
<el-col :span="15">
<div style="text-align:left;line-height:40px;font-size:14px;">
<dict-tag :options="dict.type.iot_device_status" :value="item.status" size="small" style="display:inline-block;margin-right:10px;" />
<el-tag type="success" size="small" v-if="item.isShadow==1">启用影子</el-tag>
<el-tag type="info" size="small" v-else>禁用影子</el-tag>
<dict-tag :options="dict.type.iot_location_way" :value="item.locationWay" size="small" style="display:inline-block;margin-left:10px;" />
<div style="text-align:left;line-height:40px;">
<dict-tag :options="dict.type.iot_device_status" :value="item.status" size="small" style="display:inline-block;" />
<span style="display:inline-block;margin:0 10px;">
<el-tag type="success" size="small" v-if="item.isShadow==1">影子</el-tag>
<el-tag type="info" size="small" v-else>影子</el-tag>
</span>
<dict-tag :options="dict.type.iot_location_way" :value="item.locationWay" size="small" style="display:inline-block;" />
</div>
<el-descriptions :column="1" size="mini">
<el-descriptions-item label="编号">
@@ -261,13 +265,13 @@ export default {
let productId = this.$route.query.productId
if (productId != null) {
this.queryParams.productId = Number(productId);
this.queryParams.groupId=null;
this.queryParams.groupId = null;
}
// 分组筛选
let groupId = this.$route.query.groupId
if (groupId != null) {
this.queryParams.groupId = Number(groupId);
this.queryParams.productId=null;
this.queryParams.productId = null;
}
this.getList();
@@ -282,13 +286,13 @@ export default {
let productId = this.$route.query.productId
if (productId != null) {
this.queryParams.productId = Number(productId);
this.queryParams.groupId=null;
this.queryParams.groupId = null;
}
// 分组筛选
let groupId = this.$route.query.groupId
if (groupId != null) {
this.queryParams.groupId = Number(groupId);
this.queryParams.productId=null;
this.queryParams.productId = null;
}
this.getList();
}
@@ -631,6 +635,6 @@ export default {
<style scoped>
.card-item {
border-radius:15px;
border-radius: 15px;
}
</style>

View File

@@ -16,7 +16,7 @@
<el-table-column label="设备编号" align="center" prop="serialNumber" />
<el-table-column label="产品名称" align="center" prop="productName" />
<el-table-column label="设备类型" align="center">
<template slot-scope="scope">
<template slot-scope="scope">
<el-tag type="success" v-if="scope.row.isOwner==0">分享</el-tag>
<el-tag type="primary" v-else>拥有</el-tag>
</template>
@@ -28,7 +28,7 @@
</el-table-column>
</el-table>
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
<!-- <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> -->
</div>
</template>
@@ -53,7 +53,7 @@ export default {
data() {
return {
// 设备分组
deviceGroup:{},
deviceGroup: {},
// 遮罩层
loading: true,
// 选中数组
@@ -67,8 +67,8 @@ export default {
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
userId:null,
pageSize: 500,
userId: null,
deviceName: null,
productId: null,
productName: null,
@@ -89,7 +89,7 @@ export default {
handler(newVal, oldVal) {
this.deviceGroup = newVal;
// 获取分组下的设备
this.queryParams.userId=this.deviceGroup.userId;
this.queryParams.userId = this.deviceGroup.userId;
this.queryParams.pageNum = 1;
this.getDeviceIdsByGroupId();
},
@@ -104,6 +104,8 @@ export default {
getDeviceIdsByGroupId() {
getDeviceIds(this.deviceGroup.groupId).then(response => {
this.ids = response.data;
// Id数组传递到父组件
this.$emit('idsToParentEvent', this.ids)
this.getList();
});
},
@@ -143,8 +145,6 @@ export default {
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.deviceId)
console.log("选择赋值");
console.log(this.ids);
this.single = selection.length !== 1
this.multiple = !selection.length
// Id数组传递到父组件