zhaothird

This commit is contained in:
redamancy-qian
2022-04-16 00:48:53 +08:00
parent 4bc2b41a38
commit f052bda831
42 changed files with 369 additions and 73 deletions

View File

@@ -294,7 +294,7 @@ export default {
}
})
},
/**
/**
* Mqtt发布消息
* @type 类型(1=属性2=功能3=OTA升级4=实时监测)
* @device 设备
@@ -443,16 +443,15 @@ export default {
model.value = 0;
this.mqttPublish(4, this.monitorDevice, model);
},
/** 查询设备列表 */
/** 查询所有简短设备列表 */
getList() {
this.loading = true;
if (null != this.daterangeActiveTime && '' != this.daterangeActiveTime) {
this.queryParams.params["beginActiveTime"] = this.daterangeActiveTime[0];
this.queryParams.params["endActiveTime"] = this.daterangeActiveTime[1];
}
// 设置用户的角色 用以区分自己创建的设备
// 由于admin可以看所有数据所以判断
if (this.$store.state.user.roles !=="admin"){
// 判断是否是admin角色
if (this.$store.state.user.roles.indexOf("admin") === -1){
this.queryParams.userName = this.$store.state.user.name
}
listDeviceShort(this.queryParams).then(response => {

View File

@@ -95,6 +95,10 @@ export default {
/** 查询产品列表 */
getList() {
this.loading = true;
// 判断是否是admin角色
if (this.$store.state.user.roles.indexOf("admin") === -1){
this.queryParams.tenantName = this.$store.state.user.name
}
listProduct(this.queryParams).then(response => {
this.productList = response.rows;
this.total = response.total;
@@ -125,7 +129,7 @@ export default {
setRadioSelected(productId) {
for (let i = 0; i < this.productList.length; i++) {
if (this.productList[i].productId == productId) {
this.productList[i].isSelect = true;
this.productList[i].isSelect = true;
} else {
this.productList[i].isSelect = false;
}