mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-17 16:36:03 +08:00
zhaothird
This commit is contained in:
@@ -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 => {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user