mirror of
https://github.com/kerwincui/FastBee.git
synced 2025-10-14 20:25:58 +08:00
分享设备列表接口以及sql修改
This commit is contained in:
@@ -18,6 +18,9 @@ const user = {
|
||||
SET_NAME: (state, name) => {
|
||||
state.name = name
|
||||
},
|
||||
SET_USERID: (state, userId) => {
|
||||
state.userId = userId
|
||||
},
|
||||
SET_AVATAR: (state, avatar) => {
|
||||
state.avatar = avatar
|
||||
},
|
||||
@@ -94,6 +97,7 @@ const user = {
|
||||
}
|
||||
commit('SET_NAME', user.userName)
|
||||
commit('SET_AVATAR', avatar)
|
||||
commit('SET_USERID', user.userId)
|
||||
resolve(res)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
|
@@ -112,6 +112,7 @@ export default {
|
||||
pageSize: 10,
|
||||
deviceName: null,
|
||||
userName: null,
|
||||
userId: null,
|
||||
tenantName: null,
|
||||
isOwner: null,
|
||||
},
|
||||
@@ -238,7 +239,7 @@ export default {
|
||||
// 获取设备列表
|
||||
// 判断是否是admin角色
|
||||
if (this.$store.state.user.roles.indexOf("admin") === -1) {
|
||||
this.queryParams.userName = this.$store.state.user.name
|
||||
this.queryParams.userId = this.$store.state.user.userId
|
||||
}
|
||||
listDeviceShort(this.queryParams).then(response => {
|
||||
let deviceList = response.rows;
|
||||
|
@@ -452,7 +452,7 @@ export default {
|
||||
}
|
||||
// 判断是否是admin角色
|
||||
if (this.$store.state.user.roles.indexOf("admin") === -1) {
|
||||
this.queryParams.userName = this.$store.state.user.name
|
||||
this.queryParams.userId = this.$store.state.user.userId
|
||||
}
|
||||
listDeviceShort(this.queryParams).then(response => {
|
||||
this.deviceList = response.rows;
|
||||
|
Reference in New Issue
Block a user