分组中添加设备前端

This commit is contained in:
kerwincui
2022-06-06 15:52:48 +08:00
parent 1f7a127499
commit e6ccf6ee58
6 changed files with 69 additions and 30 deletions

View File

@@ -390,7 +390,7 @@ export default {
// 信息详情
notice: {},
// 是否为管理员
isAdmin: true,
isAdmin: false,
// 设备列表
deviceList: [],
// 设备总数
@@ -433,11 +433,8 @@ export default {
},
methods: {
init() {
// 设置用户的角色 用以区分自己创建的设备
// 由于admin可以看所有数据所以判断
if (this.$store.state.user.roles.indexOf("admin") === -1) {
this.isAdmin = false
} else {
if (this.$store.state.user.roles.indexOf("tenant") === -1 && this.$store.state.user.roles.indexOf("general") === -1) {
this.isAdmin = true
this.getServer();
this.getMqttStats();
this.statisticMqtt();