优化大屏加载速度和打包大小

This commit is contained in:
wgx 2025-11-15 16:49:04 +08:00
parent 382f3dfab1
commit 445f8b6e6a
7 changed files with 47 additions and 64 deletions

View File

@ -26,7 +26,7 @@
.btn_right_time{
position : relative;
float : right;
width : 97%;
/*width : 97%;*/
height : 1.6vw;
text-align : right;
line-height : 1.6vw;

View File

@ -53,7 +53,7 @@
.btn_right_time{
position : relative;
float : right;
width : 97%;
/*width : 97%;*/
height : 1.6vw;
text-align : right;
line-height : 1.6vw;

View File

@ -665,7 +665,9 @@ export default {
//
infor(){
var onformation = JSON.parse(window.sessionStorage.getItem('password'));
this.inforname = onformation.realname
if(onformation){
this.inforname = onformation.realname
}
},
//
getNowTime () {
@ -925,7 +927,7 @@ export default {
.btn_right_time{
position : relative;
float : right;
width : 97%;
//width : 97%;
height : 1.6vw;
text-align : right;
line-height : 1.6vw;

View File

@ -92,16 +92,16 @@
<span class="in1con_lf_imglf_tit">农田面源污染监测站</span>
<span class="in1con_lf_imglf_num"> <animate-number class="in1con_lf_imglf_num_jix" ref="reNum" from="0" :to="stationCount0" :key="stationCount0" duration="3000"></animate-number> </span>
</div>
<div class="in1con_lf_imglf animate__animated animate__delay-1s animate__infinite animate__slow animate__pulse">
<img src="@/assets/image/xmgk02.png" class="in1con_lf_imgone" alt="">
<span class="in1con_lf_imglf_tit">畜禽养殖污染监测站</span>
<span class="in1con_lf_imglf_num"><animate-number class="in1con_lf_imglf_num_jix" ref="reNum" from="0" :to="stationCount1" :key="stationCount1" duration="3000"></animate-number></span>
</div>
<div class="in1con_lf_imglf animate__animated animate__delay-1s animate__infinite animate__slow animate__pulse">
<img src="@/assets/image/xmgk03.png" class="in1con_lf_imgone" alt="">
<span class="in1con_lf_imglf_tit">太阳能诱虫灯</span>
<span class="in1con_lf_imglf_num"><animate-number class="in1con_lf_imglf_num_jix" ref="reNum" from="0" :to="pestLightCount" :key="pestLightCount" duration="3000"></animate-number></span>
</div>
<!-- <div class="in1con_lf_imglf animate__animated animate__delay-1s animate__infinite animate__slow animate__pulse">-->
<!-- <img src="@/assets/image/xmgk02.png" class="in1con_lf_imgone" alt="">-->
<!-- <span class="in1con_lf_imglf_tit">畜禽养殖污染监测站</span>-->
<!-- <span class="in1con_lf_imglf_num"><animate-number class="in1con_lf_imglf_num_jix" ref="reNum" from="0" :to="stationCount1" :key="stationCount1" duration="3000"></animate-number></span>-->
<!-- </div>-->
<!-- <div class="in1con_lf_imglf animate__animated animate__delay-1s animate__infinite animate__slow animate__pulse">-->
<!-- <img src="@/assets/image/xmgk03.png" class="in1con_lf_imgone" alt="">-->
<!-- <span class="in1con_lf_imglf_tit">太阳能诱虫灯</span>-->
<!-- <span class="in1con_lf_imglf_num"><animate-number class="in1con_lf_imglf_num_jix" ref="reNum" from="0" :to="pestLightCount" :key="pestLightCount" duration="3000"></animate-number></span>-->
<!-- </div>-->
</div>
</div>
<div style="background: #0d4e62;height: 1px;width: 94%;margin: 0 auto;margin-top: 0.4vw;"></div>
@ -638,7 +638,7 @@ export default {
this.briefconValue = res.result.project_brief.detailList
this.pestLightCount = res.result.pestLightCount
this.stationCount0 = res.result.stationCount[0].stationCount
this.stationCount1 = res.result.stationCount[1].stationCount
// this.stationCount1 = res.result.stationCount[1].stationCount
this.climate_env = res.result.climate_env.detailList
this.water_conser = res.result.water_conser.detailList
this.roll_info = res.result.roll_info
@ -1180,7 +1180,9 @@ export default {
//
infor(){
var onformation = JSON.parse(window.sessionStorage.getItem('password'));
this.inforname = onformation.realname
if(onformation){
this.inforname = onformation.realname
}
},
guanbi(){
this.dialogTableVisible = false

View File

@ -19,10 +19,10 @@
</div>
<div class="nav_btn">
<div class="btn_left">
<span class="btn_left_time"> {{ nowTime }}</span> <span class="btn_left_tianq" style="z-index: 9999;"><hefentianqi /></span>
<span class="btn_left_time"> {{ nowTime }}</span> <span class="btn_left_tianq" style="z-index: 9999;"></span>
</div>
<div class="btn_right">
<div class="btn_right"><hefentianqi />
<img src="@/assets/image/quanping.png" class="quanping" v-if="fullscreen==false" @click="screen" alt="">
<img src="@/assets/image/quanpingtui.png" class="quanping" @click="screen" alt="" v-else>
<span class="btn_right_time"><img src="@/assets/image/header.png" @click="dialogVisible = true" class="peoimg" alt=""></span>
@ -97,11 +97,11 @@
<span class="in1con_lf_imglf_tit">农田面源污染监测站</span>
<span class="in1con_lf_imglf_num"> <animate-number class="in1con_lf_imglf_num_jix" ref="reNum" from="0" :to="stationCount0" :key="stationCount0" duration="3000"></animate-number> </span>
</div>
<div class="in1con_lf_imglf animate__animated animate__delay-1s animate__infinite animate__slow animate__pulse">
<img src="@/assets/image/xmgk02.png" class="in1con_lf_imgone" alt="">
<span class="in1con_lf_imglf_tit">畜禽养殖污染监测站</span>
<span class="in1con_lf_imglf_num"><animate-number class="in1con_lf_imglf_num_jix" ref="reNum" from="0" :to="stationCount1" :key="stationCount1" duration="3000"></animate-number></span>
</div>
<!-- <div class="in1con_lf_imglf animate__animated animate__delay-1s animate__infinite animate__slow animate__pulse">-->
<!-- <img src="@/assets/image/xmgk02.png" class="in1con_lf_imgone" alt="">-->
<!-- <span class="in1con_lf_imglf_tit">畜禽养殖污染监测站</span>-->
<!-- <span class="in1con_lf_imglf_num"><animate-number class="in1con_lf_imglf_num_jix" ref="reNum" from="0" :to="stationCount1" :key="stationCount1" duration="3000"></animate-number></span>-->
<!-- </div>-->
<!-- <div class="in1con_lf_imglf animate__animated animate__delay-1s animate__infinite animate__slow animate__pulse">-->
<!-- <img src="@/assets/image/xmgk03.png" class="in1con_lf_imgone" alt="">-->
<!-- <span class="in1con_lf_imglf_tit">太阳能诱虫灯</span>-->
@ -754,7 +754,7 @@ export default {
this.briefconValue = res.result.project_brief.detailList
this.pestLightCount = res.result.pestLightCount
this.stationCount0 = res.result.stationCount[0].stationCount
this.stationCount1 = res.result.stationCount[1].stationCount
// this.stationCount1 = res.result.stationCount[1].stationCount
this.climate_env = res.result.climate_env.detailList
this.water_conser = res.result.water_conser.detailList
this.roll_info = res.result.roll_info
@ -985,7 +985,7 @@ export default {
viewMode:'3D',
resizeEnable: true,
zoom: zoomnum,
center:[110.632024, 35.548859],//
center:[111.436625,36.771975],//
mapStyle: 'amap://styles/blue',
dragEnable: true,//truesetStatus/getStatus
jogEnable: true,//使truesetStatus/getStatus
@ -997,7 +997,7 @@ export default {
showIndoorMap: false, //
expandZoomRange: true,//,zooms使truezoomsPC2019/20
forceVector: true,
scale:(2,2.5)
scale:(2 , 2.5)
});
that.aMap.on('complete', (e) =>{
// AMap.LabelsLayer
@ -1081,10 +1081,8 @@ export default {
this.$forceUpdate()
that.aMap.setFitView();
setTimeout(() => {
// that.aMap.setZoom(that.aMap.getZoom()-2);
let temp = that.aMap.getCenter();//
console.log(temp);
that.aMap.setZoomAndCenter(that.aMap.getZoom()-2, [temp.lng, temp.lat - 0.03]);
that.aMap.setZoomAndCenter(that.aMap.getZoom()-2, [temp.lng, temp.lat - 0.15]);
},2000)
});
})
@ -1533,7 +1531,9 @@ export default {
//
infor(){
var onformation = JSON.parse(window.sessionStorage.getItem('password'));
this.inforname = onformation.realname
if(onformation){
this.inforname = onformation.realname
}
},
guanbi(){
this.dialogTableVisible = false

View File

@ -796,7 +796,9 @@ export default {
//
infor(){
var onformation = JSON.parse(window.sessionStorage.getItem('password'));
this.inforname = onformation.realname
if(onformation){
this.inforname = onformation.realname
}
},
//
getNowTime () {
@ -1081,7 +1083,7 @@ export default {
.btn_right_time{
position : relative;
float : right;
width : 97%;
//width : 97%;
height : 1.6vw;
text-align : right;
line-height : 1.6vw;

View File

@ -1,41 +1,18 @@
新的组件(.vue文件
<template>
<div>
<div id="he-plugin-simple"></div>
<div style="display: inline-block" >
<!-- 新的组件(.vue文件 -->
<!-- <div id="he-plugin-simple"></div>-->
<!-- <iframe width="300" scrolling="no" height="25" frameborder="0" allowtransparency="true"-->
<!-- src="https://i.tianqi.com?c=code&amp;id=10&amp;color=%23FFFFFF&amp;icon=1&amp;py=fenxi&amp;site=12"-->
<!-- style="pointer-events: none;"></iframe>-->
<!-- <iframe width="300" height="40" src="https://i.tianqi.com/?c=code&a=getcode&id=11&icon=1&color=%23FFFFFF" frameborder="0"></iframe>-->
<iframe width="300" height="40" src="https://i.tianqi.com/?c=code&a=getcode&id=34&icon=1&color=%23FFFFFF&py=fenxi" frameborder="0"></iframe>
</div>
</template>
<script>
export default {
created() {
window.WIDGET = { //WIDGET
'CONFIG': {
"modules": "01234",
"background": "5",
"tmpColor": "BCD3F5",
"tmpSize": "14",
"city": "101100805",
"cityColor": "BCD3F5",
"citySize": "14",
"aqiColor": "BCD3F5",
"aqiSize": "14",
"weatherIconSize": "24",
"alertIconSize": "18",
"padding": "5px 10px 10px 10px",
"shadow": "0",
"language": "auto",
"fixed": "false",
"vertical": "top",
"horizontal": "left",
"key": "185cfb2f004d49969fe27d481eb3fbf6"
}
}
var script = document.createElement('script')
script.type = 'text/javascript'
script.src = 'https://widget.qweather.net/simple/static/js/he-simple-common.js?v=2.0"'
document.getElementsByTagName('head')[0].appendChild(script)
}
created() { }
}
</script>