页面切图

This commit is contained in:
仲么了
2023-02-09 16:37:53 +08:00
parent 1393a997a8
commit 627c0a2853
30 changed files with 937 additions and 44 deletions

View File

@@ -72,20 +72,11 @@ export default {
}, {
text: 'I/O'
}],
content: [{
iconPath: '/static/share.png',
text: '分享',
}, {
iconPath: '/static/delate.png',
text: '删除',
}, {
iconPath: '/static/download.png',
text: '下载',
}, {
content: [ {
iconPath: '/static/record.png',
text: '记录',
}, {
iconPath: '/static/report2.png',
iconPath: '/static/report.png',
text: '告警',
}, {
iconPath: '/static/about.png',
@@ -96,9 +87,10 @@ export default {
},
methods: {
trigger (e) {
if (e.index === 0) {
console.log(e);
if (e.item.text === '分享') {
this.$refs.share.open()
} else if (e.index === 1) {
} else if (e.item.text === '删除') {
uni.showModal({
title: '提示',
content: '确定删除该设备吗?',
@@ -110,20 +102,52 @@ export default {
}
}
});
} else if (e.index === 2) {
} else if (e.item.text === '下载') {
this.$util.toast('下载成功')
} else if (e.index === 3) {
uni.navigateTo({ url: '/pages/device/record' })
} else if (e.index === 4) {
uni.navigateTo({ url: '/pages/device/report' })
} else if (e.index === 5) {
uni.navigateTo({ url: '/pages/device/about' })
} else if (e.item.text === '记录') {
uni.navigateTo({ url: '/pages/device/recordAPF' })
} else if (e.item.text === '告警') {
uni.navigateTo({ url: '/pages/device/reportAPF' })
} else if (e.item.text === '关于') {
uni.navigateTo({ url: '/pages/device/aboutAPF' })
} else if (e.item.text === '移交') {
uni.navigateTo({ url: '/pages/device/transfer' })
} else if (e.item.text === '反馈') {
uni.navigateTo({ url: '/pages/device/feedback' })
}
this.$refs.fab.close()
},
navMenuClick (idx) {
this.navMenuActive = idx
},
init () {
let userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
console.log(userInfo.role);
switch (userInfo.role) {
case 3:
this.content.splice(0, 0, {
iconPath: '/static/transfer.png',
text: '移交',
})
break;
case 4:
this.content.splice(0, 0, {
iconPath: '/static/share.png',
text: '分享',
}, {
iconPath: '/static/delate.png',
text: '删除',
})
case 5:
this.content.splice(0, 0, {
iconPath: '/static/feedback.png',
text: '反馈',
})
break;
default:
break;
}
setTimeout(() => {
// 获取nav高度
uni.createSelectorQuery().select('.nav').boundingClientRect((rect) => {