大屏缩放问题
This commit is contained in:
parent
2b4bfdd039
commit
e39d2911b4
|
|
@ -6,5 +6,5 @@ module.exports = {
|
|||
NODE_ENV: '"production"',
|
||||
//post用当前域名
|
||||
// API_ROOT: '"http://' + testUrl + '/iot"'
|
||||
API_ROOT: '"/dev/api"',
|
||||
API_ROOT: '"/dev-api"',
|
||||
}
|
||||
|
|
|
|||
14
src/App.vue
14
src/App.vue
|
|
@ -4,7 +4,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import autofit from 'autofit.js'
|
||||
// import autofit from 'autofit.js'
|
||||
export default {
|
||||
name: 'app',
|
||||
created() {
|
||||
|
|
@ -19,12 +19,12 @@ export default {
|
|||
document.getElementsByTagName('head')[0].appendChild(link)
|
||||
},
|
||||
mounted() {
|
||||
autofit.init({
|
||||
designHeight: 1080, //高度
|
||||
designWidth: 1920, //宽度
|
||||
renderDom: '#app',
|
||||
resize: true,
|
||||
})
|
||||
// autofit.init({
|
||||
// designHeight: 1080, //高度
|
||||
// designWidth: 1920, //宽度
|
||||
// renderDom: '#app',
|
||||
// resize: true,
|
||||
// })
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
|
|
|||
|
|
@ -312,6 +312,20 @@ export default {
|
|||
itemStyle: { normal: { areaColor: '#0A2B7B' } },
|
||||
},
|
||||
]
|
||||
for (let i = 0; i < splitList.length; i++) {
|
||||
let geoCoord = geoCoordMap[splitList[i].name]
|
||||
if (geoCoord) {
|
||||
splitList[i].value = geoCoord.concat(splitList[i].value)
|
||||
}
|
||||
}
|
||||
|
||||
mapData.forEach((e) => {
|
||||
splitList.forEach((v) => {
|
||||
if (e.name == v.name) {
|
||||
v.count = e.a
|
||||
}
|
||||
})
|
||||
})
|
||||
let imgUrl = require('../../assets/img/myImage/tankuang.png')
|
||||
let echartOption = {
|
||||
geo: [
|
||||
|
|
|
|||
|
|
@ -1,16 +1,12 @@
|
|||
<template>
|
||||
<div class="screen-container">
|
||||
<div class="screen-container" id="myContainer" >
|
||||
<div class="data-v-container" :key="key">
|
||||
<div class="title-bg">
|
||||
<div class="btn-content">
|
||||
<el-button
|
||||
size="medium"
|
||||
type="primary"
|
||||
@click="
|
||||
() => {
|
||||
$router.go(-1)
|
||||
}
|
||||
"
|
||||
@click="goBack"
|
||||
>返回</el-button
|
||||
>
|
||||
<el-button size="medium" type="primary" @click="goBackstage"
|
||||
|
|
@ -133,6 +129,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import autofit from 'autofit.js'
|
||||
import CenterFold from '../../components/home/centerFold.vue'
|
||||
import CountryMap from '../../components/home/countryMap.vue'
|
||||
import LeftOne from '../../components/home/leftOne.vue'
|
||||
|
|
@ -174,35 +171,40 @@ export default {
|
|||
// 地图点击时的查询参数
|
||||
queryParams: null,
|
||||
dateTimeString: '',
|
||||
autofitInstance: null, // 添加一个变量来存储 autofit 实例
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
|
||||
mounted() {
|
||||
this.initAutofit();
|
||||
|
||||
this.getCurrentDateTime()
|
||||
setInterval(this.getCurrentDateTime, 1000)
|
||||
// let that = this
|
||||
// AMap.plugin('AMap.CitySearch', function () {
|
||||
// var citySearch = new AMap.CitySearch()
|
||||
// citySearch.getLocalCity(function (status, result) {
|
||||
// if (status === 'complete' && result.info === 'OK') {
|
||||
// AMap.plugin('AMap.Weather', function () {
|
||||
// var weather = new AMap.Weather();
|
||||
// weather.getLive('宁夏回族自治区', function (err, data) {
|
||||
// // console.log(err, data);
|
||||
// that.weatherData = data
|
||||
// that.weatherUrl = data.weather == '晴' ? ONE : data.weather == '多云' ? TWO : data.weather == '中雪' ? THREE : ''
|
||||
// });
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
// this.getWeather()
|
||||
this.getMapSelect(this.maType)
|
||||
this.getMapSelect(this.maType);
|
||||
// getMaintenanceWarningApi().then((res) => {
|
||||
// this.transformList = res.data
|
||||
// })
|
||||
|
||||
},
|
||||
methods: {
|
||||
goBack(){
|
||||
autofit.off();
|
||||
this.$router.go(-1);
|
||||
},
|
||||
// handleWheel(event) {
|
||||
// console.log('111111111', event)
|
||||
// if (event.ctrlKey) {
|
||||
// event.preventDefault();
|
||||
// }
|
||||
// },
|
||||
initAutofit() {
|
||||
autofit.init({
|
||||
designHeight: 1080,
|
||||
designWidth: 1920,
|
||||
renderDom: '#myContainer',
|
||||
resize: true,
|
||||
});
|
||||
},
|
||||
openDrawer(query) {
|
||||
this.queryParams = query
|
||||
console.log(query, 'c参数')
|
||||
|
|
|
|||
|
|
@ -667,11 +667,6 @@ atob@^2.1.2:
|
|||
resolved "https://registry.npmmirror.com/atob/-/atob-2.1.2.tgz"
|
||||
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
|
||||
|
||||
autofit.js@^3.1.1:
|
||||
version "3.2.2"
|
||||
resolved "https://registry.npmmirror.com/autofit.js/-/autofit.js-3.2.2.tgz"
|
||||
integrity sha512-oo6e5GGhYKrpIgn6/KHzbtvWKm+dk6925wJoz8XGhKw2tlzc+dF9TBaJL/bOXnmpeRR82oxWLBOcOi2WDa6DIw==
|
||||
|
||||
autoprefixer@^6.3.1:
|
||||
version "6.7.7"
|
||||
resolved "https://registry.npmmirror.com/autoprefixer/-/autoprefixer-6.7.7.tgz"
|
||||
|
|
|
|||
Loading…
Reference in New Issue