二维码生成
This commit is contained in:
@@ -158,6 +158,8 @@ export default {
|
||||
timer: null,
|
||||
devId: '',
|
||||
dictData: [],
|
||||
isMaster: 0,
|
||||
userInfo: {},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -200,7 +202,7 @@ export default {
|
||||
} else if (e.item.text === '关于') {
|
||||
uni.navigateTo({ url: '/pages/device/APF/about' })
|
||||
} else if (e.item.text === '移交') {
|
||||
uni.navigateTo({ url: '/pages/device/transfer' })
|
||||
uni.navigateTo({ url: '/pages/device/transfer?id=' + this.devId })
|
||||
} else if (e.item.text === '反馈') {
|
||||
uni.navigateTo({ url: '/pages/device/feedback' })
|
||||
} else if (e.item.text === '用户') {
|
||||
@@ -219,9 +221,7 @@ export default {
|
||||
uni.pageScrollTo({ scrollTop: 0, duration: 0 })
|
||||
},
|
||||
init() {
|
||||
let userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
||||
console.log(userInfo.authorities)
|
||||
switch (userInfo.authorities) {
|
||||
switch (this.userInfo.authorities) {
|
||||
case 1:
|
||||
this.content.splice(0, 1)
|
||||
this.content.splice(
|
||||
@@ -240,12 +240,6 @@ export default {
|
||||
case 2:
|
||||
this.content.splice(0, 1)
|
||||
break
|
||||
case 3:
|
||||
this.content.splice(0, 0, {
|
||||
iconPath: '/static/transfer.png',
|
||||
text: '移交',
|
||||
})
|
||||
break
|
||||
case 4:
|
||||
this.content.splice(
|
||||
1,
|
||||
@@ -317,6 +311,7 @@ export default {
|
||||
console.log(`订阅成功:/zl/devData/${this.devId}`)
|
||||
this.client.publish(`/zl/askDevData/${this.devId}`)
|
||||
this.timer = setInterval(() => {
|
||||
console.log('askDevData')
|
||||
this.client.publish(`/zl/askDevData/${this.devId}`)
|
||||
}, 10000)
|
||||
}
|
||||
@@ -334,6 +329,9 @@ export default {
|
||||
})
|
||||
.on('message', (topic, message) => {
|
||||
console.log('接收推送信息:', message.toString())
|
||||
if (!message.toString()) {
|
||||
return
|
||||
}
|
||||
this.loading = false
|
||||
let dataList = []
|
||||
this.deviceInfo.appsLineTopologyDiagramPO.forEach((element) => {
|
||||
@@ -368,11 +366,30 @@ export default {
|
||||
},
|
||||
onLoad(options) {
|
||||
this.dictData = uni.getStorageSync(this.$cacheKey.dictData)
|
||||
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
||||
|
||||
this.devId = options.id
|
||||
this.isMaster = options.isMaster
|
||||
this.content.splice(0, 0, {
|
||||
iconPath: '/static/transfer.png',
|
||||
text: '移交',
|
||||
})
|
||||
if (this.isMaster == 1) {
|
||||
this.content.splice(0, 0, {
|
||||
iconPath: '/static/transfer.png',
|
||||
text: '移交',
|
||||
})
|
||||
if (this.userInfo.authorities !== 'engineering_user') {
|
||||
this.content.splice(0, 0, {
|
||||
iconPath: '/static/share.png',
|
||||
text: '分享',
|
||||
})
|
||||
}
|
||||
}
|
||||
this.init()
|
||||
queryTopologyDiagram(options.id).then((res) => {
|
||||
this.deviceInfo = res.data
|
||||
console.log(this.dictData);
|
||||
console.log(this.dictData)
|
||||
this.dictData.forEach((item) => {
|
||||
if (item.code == 'Line_Position') {
|
||||
item.children.forEach((item2) => {
|
||||
|
||||
Reference in New Issue
Block a user