This commit is contained in:
仲么了
2023-08-31 09:29:40 +08:00
parent 05b28a17e7
commit a105006e0f
4 changed files with 41 additions and 15 deletions

View File

@@ -6,7 +6,7 @@
<Cn-htmlToImg domId="header" @renderFinish="renderFinish">
<view class="header" id="header" ref="header" @click="previewImg">
<img
:src="deviceInfo.filePath"
:src="topoImg"
style="width: 375px; display: block"
mode="widthFix"
@load="domLoading = false"
@@ -119,6 +119,7 @@ export default {
navMenuActive: 0,
navHeight: 0,
img: '',
topoImg:'',
navMenuList: [
{
text: '基本',
@@ -247,6 +248,19 @@ export default {
this.navMenuActive = idx
uni.pageScrollTo({scrollTop: 0, duration: 0})
},
downloadImg() {
uni.downloadFile({
url: this.deviceInfo.filePath,
success: (res) => {
console.log(res)
pathToBase64(res.tempFilePath).then((res) => {
console.log(res)
this.topoImg = res
})
},
})
},
init() {
console.log('init')
@@ -255,6 +269,7 @@ export default {
queryTopologyDiagram(this.devId).then((res) => {
res.data.filePath = this.$config.static + res.data.filePath
this.deviceInfo = res.data
this.downloadImg()
uni.setNavigationBarTitle({title: this.deviceInfo.devName || '设备详情'})
this.topolodyData.filter((item) => {
let index = this.deviceInfo.appsLineTopologyDiagramPO.findIndex((element) => {