Commit 1a10b267 authored by 张牧越's avatar 张牧越

bugfix

parent bf602083
NODE_ENV = "development"
Mock: true
VUE_APP_API_URL = "http://qjwl.ythplan.com/"
VUE_APP_API_URL = " http://cmhv8b.natappfree.cc"
File added
import request from "@/utils/request"
import noLoadingrequest from "@/utils/request"
import noLoadingrequest from "@/utils/noloadingRequest"
export function getXAccessToken(token) {
return request({
......@@ -245,7 +245,7 @@ export function getNoiseDeviceList(params) {
}
export function getCurrentMonitorStatis(params) {
return request({
return noLoadingrequest({
url: '/pweb/s/env/realtime/data',
method: 'get',
params
......
......@@ -160,13 +160,14 @@ export default {
},
bodyScale() {
var deviceHeight = window.screen.height;
// var deviceWidth = window.screen.width;
var scale = deviceHeight / 1250; // height:550=2100 height:720=1680 height:940=1250 height:2160=1080
var pixelHeights = document.body.clientHeight;
var minus = pixelHeights - deviceHeight;
console.log(minus);
var scale = deviceHeight / 1220; // height:550=2100 height:720=1680 height:940=1220 height:2160=1080
// var canvasScale = deviceWidth / 1920;
// 1.777778 16:9 1080
//1.6 16:10 1100
// 1.547 1728:890 1350
console.log(window.screen.width / window.screen.height);
document.body.style.zoom = scale;
document.styleSheets[document.styleSheets.length - 1].insertRule(
"canvas:not(.amap-layer):not(.amap-labels) {zoom: " +
......
......@@ -545,6 +545,7 @@ export default {
display: flex;
justify-content: space-between;
height: 100%;
padding-bottom: 0;
}
.side-area {
width: 25%;
......
......@@ -509,6 +509,7 @@ export default {
<style lang="less" scoped>
#earlywarning {
padding: 12px 20px;
padding-bottom: 0;
}
.top-stauts {
display: flex;
......
......@@ -401,6 +401,7 @@ export default {
padding: 12px 20px;
display: flex;
justify-content: space-between;
padding-bottom: 0;
}
.side-area {
width: 25%;
......
......@@ -199,7 +199,7 @@ export default {
methods: {
initMap() {
AMapLoader.load({
key: "fc00c5b70f67a8414344682f217d4b6e",
key: "a7387204aeee9f238b217bad35460ba9",
version: "1.4.15",
plugins: ["AMap.MarkerClusterer", "AMap.DistrictSearch"],
})
......@@ -211,10 +211,10 @@ export default {
zoom: 20,
center: this.mapCenter,
resizeEnable: true,
mapStyle: "amap://styles/darkblue",
mapStyle: "amap://styles/1dda787b3ac1ce28f171d2f153726eb7",
});
this.$nextTick(() => {
var scale = window.screen.height / 1250;
var scale = window.screen.height / 1220;
console.log(document.getElementById("amap-container").style);
document.getElementById("amap-container").style.zoom = 1 / scale;
});
......@@ -421,6 +421,7 @@ export default {
padding: 12px 20px;
display: flex;
justify-content: space-between;
padding-bottom: 0;
}
.side-area {
width: 25%;
......
......@@ -225,7 +225,7 @@ export default {
},
initMap() {
AMapLoader.load({
key: "fc00c5b70f67a8414344682f217d4b6e",
key: "a7387204aeee9f238b217bad35460ba9",
version: "1.4.15",
plugins: ["AMap.MarkerClusterer", "AMap.DistrictSearch"],
})
......@@ -237,11 +237,11 @@ export default {
zoom: 19,
center: this.mapCenter,
resizeEnable: true,
mapStyle: "amap://styles/darkblue",
mapStyle: "amap://styles/1dda787b3ac1ce28f171d2f153726eb7",
});
this.map.on("click", () => {});
this.$nextTick(() => {
var scale = window.screen.height / 1250;
var scale = window.screen.height / 1220;
document.getElementById("amap-container").style.zoom = 1 / scale;
});
})
......@@ -287,6 +287,7 @@ export default {
padding: 12px 20px;
display: flex;
justify-content: space-between;
padding-bottom: 0;
}
.side-area {
width: 25%;
......
......@@ -74,7 +74,7 @@ export default {
},
initMap() {
AMapLoader.load({
key: "fc00c5b70f67a8414344682f217d4b6e",
key: "a7387204aeee9f238b217bad35460ba9",
version: "1.4.15",
plugins: ["AMap.MarkerClusterer", "AMap.DistrictSearch"],
}).then((AMap) => {
......@@ -85,10 +85,10 @@ export default {
zoom: 20,
center: this.mapCenter,
resizeEnable: true,
mapStyle: "amap://styles/darkblue",
mapStyle: "amap://styles/1dda787b3ac1ce28f171d2f153726eb7",
});
this.$nextTick(() => {
var scale = window.screen.height / 1250;
var scale = window.screen.height / 1220;
document.getElementById("sample-map-container").style.zoom =
1 / scale;
});
......
......@@ -31,7 +31,11 @@
<div class="mid-area">
<Title text="实时监测" type="long"></Title>
<ShadowContainer>
<div id="stats-container">
<div
id="stats-container"
v-loading="loading"
element-loading-background="rgba(0, 0, 0, 0.8)"
>
<div class="temp">
<div class="text">温度/℃</div>
<div class="value" style="color: #ff6151">
......@@ -190,6 +194,7 @@ export default {
activeType: "pm25_data",
lineChart: null,
page: 1,
loading: false,
};
},
computed: {},
......@@ -511,8 +516,10 @@ export default {
});
},
changeMonitor(monitor, index) {
this.loading = true;
this.activeIndex = index;
getCurrentMonitorStatis({ device_id: monitor.id }).then((res) => {
this.loading = false;
this.currentMonitorStatis = res.data;
});
},
......@@ -586,8 +593,10 @@ export default {
padding: 12px 20px;
display: flex;
justify-content: space-between;
padding-bottom: 0;
.side-area {
width: 28%;
min-width: calc(calc(100% - 880px) / 2);
}
.mid-area {
width: calc(44% - 40px);
......@@ -641,7 +650,7 @@ export default {
}
#aqi-chart {
width: 100%;
height: 200px;
height: 250px;
}
.monitor {
display: flex;
......@@ -934,4 +943,7 @@ export default {
}
}
}
::v-deep .el-loading-mask {
position: absolute !important;
}
</style>
\ No newline at end of file
......@@ -597,6 +597,7 @@ export default {
padding: 12px 20px;
display: flex;
justify-content: space-between;
padding-bottom: 0;
.side-area {
width: 28%;
}
......
......@@ -621,6 +621,7 @@ export default {
padding: 12px 20px;
display: flex;
justify-content: space-between;
padding-bottom: 0;
.lt-area {
width: 20%;
}
......
......@@ -253,7 +253,7 @@ export default {
methods: {
initMap() {
AMapLoader.load({
key: "fc00c5b70f67a8414344682f217d4b6e",
key: "a7387204aeee9f238b217bad35460ba9",
version: "1.4.15",
plugins: ["AMap.MarkerClusterer", "AMap.DistrictSearch"],
})
......@@ -265,14 +265,14 @@ export default {
zoom: 20,
center: this.mapCenter,
resizeEnable: true,
mapStyle: "amap://styles/darkblue",
mapStyle: "amap://styles/1dda787b3ac1ce28f171d2f153726eb7",
});
this.map.on("click", (e) => {
console.log(e);
this.capWindowVisible = false;
});
this.$nextTick(() => {
var scale = window.screen.height / 1250;
var scale = window.screen.height / 1220;
document.getElementById("amap-container").style.zoom = 1 / scale;
});
this.getSafeCapDeviceList();
......@@ -410,6 +410,7 @@ export default {
padding: 12px 20px;
display: flex;
justify-content: space-between;
padding-bottom: 0;
.side-area {
width: 20%;
}
......
......@@ -84,7 +84,7 @@ export default {
},
initMap() {
AMapLoader.load({
key: "fc00c5b70f67a8414344682f217d4b6e",
key: "a7387204aeee9f238b217bad35460ba9",
version: "1.4.15",
plugins: ["AMap.MarkerClusterer", "AMap.DistrictSearch"],
}).then((AMap) => {
......@@ -95,10 +95,10 @@ export default {
zoom: 20,
center: this.mapCenter,
resizeEnable: true,
mapStyle: "amap://styles/darkblue",
mapStyle: "amap://styles/1dda787b3ac1ce28f171d2f153726eb7",
});
this.$nextTick(() => {
var scale = window.screen.height / 1250;
var scale = window.screen.height / 1220;
document.getElementById("route-map-container").style.zoom = 1 / scale;
});
this.search();
......
......@@ -314,6 +314,7 @@ export default {
padding: 12px 20px;
display: flex;
justify-content: space-between;
padding-bottom: 0;
.side-area {
width: 20%;
}
......
......@@ -446,7 +446,7 @@ export default {
},
initMap() {
AMapLoader.load({
key: "fc00c5b70f67a8414344682f217d4b6e",
key: "a7387204aeee9f238b217bad35460ba9",
version: "1.4.15",
plugins: ["AMap.MarkerClusterer", "AMap.DistrictSearch"],
})
......@@ -458,10 +458,10 @@ export default {
zoom: 19,
center: this.mapCenter,
resizeEnable: true,
mapStyle: "amap://styles/darkblue",
mapStyle: "amap://styles/1dda787b3ac1ce28f171d2f153726eb7",
});
this.$nextTick(() => {
var scale = window.screen.height / 1250;
var scale = window.screen.height / 1220;
document.getElementById("amap-container").style.zoom = 1 / scale;
});
this.map.on("click", (e) => {
......@@ -723,6 +723,7 @@ export default {
padding: 12px 20px;
display: flex;
justify-content: space-between;
padding-bottom: 0;
.side-area {
width: 25%;
}
......
......@@ -189,7 +189,7 @@ export default {
methods: {
initMap() {
AMapLoader.load({
key: "fc00c5b70f67a8414344682f217d4b6e",
key: "a7387204aeee9f238b217bad35460ba9",
version: "1.4.15",
plugins: ["AMap.MarkerClusterer", "AMap.DistrictSearch"],
})
......@@ -201,11 +201,11 @@ export default {
zoom: 20,
center: this.mapCenter,
resizeEnable: true,
mapStyle: "amap://styles/darkblue",
mapStyle: "amap://styles/1dda787b3ac1ce28f171d2f153726eb7",
});
this.$nextTick(() => {
var scale = window.screen.height / 1250;
var scale = window.screen.height / 1220;
document.getElementById("amap-container").style.zoom = 1 / scale;
});
this.map.on("click", () => {
......@@ -499,6 +499,7 @@ export default {
padding: 12px 20px;
display: flex;
justify-content: space-between;
padding-bottom: 0;
}
.side-area {
width: 25%;
......
......@@ -9,7 +9,9 @@ import ShadowContainer from "@/components/ShadowContainer"
import * as echarts from "echarts"
import scroll from 'vue-seamless-scroll'
import "@/assets/iconfont/iconfont.css";
window._AMapSecurityConfig = {
securityJsCode: 'c74dee3a77a5864a52dbe04fc8f93586',
}
Vue.use(scroll)
Vue.prototype.$echarts = echarts
......
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