Commit aa566217 authored by xinzhedeai's avatar xinzhedeai

公共代码抽取

parent 4363260e
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<div class="f20 color-theme ml10">后台管理</div> <div class="f20 color-theme ml10">后台管理</div>
</div> --> </div> -->
<div class="flex-text ml10 mr10 mt40" style="align-items: start;"> <div class="flex-text ml10 mr10 mt15" style="align-items: start;">
<div style="width: 490px;height: calc(100vh - 110px);"> <div style="width: 490px;height: calc(100vh - 110px);">
<!-- 通知公告 --> <!-- 通知公告 -->
<div style="background: linear-gradient(to bottom, rgba(13,27,48,.7), rgba(13,27,48,0));"> <div style="background: linear-gradient(to bottom, rgba(13,27,48,.7), rgba(13,27,48,0));">
...@@ -84,7 +84,8 @@ ...@@ -84,7 +84,8 @@
<!-- 右侧容器 --> <!-- 右侧容器 -->
<div style="width: calc(100vw - 490px); height: calc(100vh - 110px);"> <div style="width: calc(100vw - 490px); height: calc(100vh - 110px);">
<img :src="filePath" alt="" srcset=""> <img :src="filePath" alt="" srcset="" style="width: 100%; height: 100%;">
<!-- <img src="https://dummyimage.com/200x275" alt="" srcset="" style="width: 100%; height: 100%;"> -->
</div> </div>
</div> </div>
...@@ -134,7 +135,7 @@ ...@@ -134,7 +135,7 @@
type: '1' // 1:矿山全景2:资源储量3:开发利用4:地质环境5:绿色矿山6:水监测 7:土监测 type: '1' // 1:矿山全景2:资源储量3:开发利用4:地质环境5:绿色矿山6:水监测 7:土监测
} }
}).then(res => { }).then(res => {
this.filePath = host + res.data.body this.filePath = host + '/file' + res.data.body
}); });
this.isReady = true this.isReady = true
......
...@@ -230,8 +230,8 @@ ...@@ -230,8 +230,8 @@
} }
}).then(res => { }).then(res => {
this.sensorLIst = res.data.body || []; this.sensorLIst = res.data.body || [];
if (this.sensorLIst.length) { if (this.sensorLIst.length) { // 如果列表有值,默认取第1个设备的值
this.currentSensorId = this.sensorLIst[0].equipNo this.changeSensor({equipNo: this.sensorLIst[0].equipNo})
} }
console.log('sdfsdf', res) console.log('sdfsdf', res)
// fn && fn() // fn && fn()
......
...@@ -62,6 +62,10 @@ var gemhoUtil = { ...@@ -62,6 +62,10 @@ var gemhoUtil = {
}; };
}, },
mounted() { mounted() {
window.onresize = () => {
location.reload()
}
if (!token) { if (!token) {
window.open(host + '/#/login', '_self') window.open(host + '/#/login', '_self')
return return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment