xuechunyuan 3 years ago
commit 998bbb9576
  1. 9
      src/views/components/showmap.vue
  2. 20
      src/views/dashboard/home.vue

@ -162,6 +162,13 @@ export default {
} }
}, },
methods: { methods: {
//echarts
fontSize(res){
const clientWidth = window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
if (!clientWidth) return;
let fontSize = clientWidth / 1920;
return res*fontSize;
},
createCharts1() { createCharts1() {
var convertData = (data) => { var convertData = (data) => {
var res = []; var res = [];
@ -354,7 +361,7 @@ export default {
text: ["高", "低"], text: ["高", "低"],
orient: "horizontal", orient: "horizontal",
itemWidth: 15, itemWidth: 15,
itemHeight: 150, itemHeight: this.fontSize(150),
right: 0, right: 0,
bottom: 3, bottom: 3,
inRange: { inRange: {

@ -367,6 +367,13 @@ export default {
backMap() { backMap() {
this.$refs.pathMap.backMap(); this.$refs.pathMap.backMap();
}, },
//echarts
fontSize(res){
const clientWidth = window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
if (!clientWidth) return;
let fontSize = clientWidth / 1920;
return res*fontSize;
},
// //
doMap(item) { doMap(item) {
this.$refs.pathMap.queryDingwei(item.deviceId); this.$refs.pathMap.queryDingwei(item.deviceId);
@ -690,7 +697,7 @@ export default {
title: { title: {
text: "仓库收件量趋势", text: "仓库收件量趋势",
textStyle: { textStyle: {
fontSize: 15, fontSize: this.fontSize(15),
color: "#fff", color: "#fff",
}, },
top: 0, top: 0,
@ -699,9 +706,10 @@ export default {
data: ["到件量", "派件量"], data: ["到件量", "派件量"],
textStyle: { textStyle: {
color: "#fff", color: "#fff",
fontSize:this.fontSize(12)
}, },
top: 0, top: 0,
right: 10, right: "2%",
itemHeight: 8, itemHeight: 8,
}, },
tooltip: { tooltip: {
@ -728,6 +736,7 @@ export default {
}, },
axisLabel: { axisLabel: {
color: "rgba(255, 255, 255, .7)", color: "rgba(255, 255, 255, .7)",
fontSize:this.fontSize(12)
}, },
}, },
yAxis: { yAxis: {
@ -735,6 +744,7 @@ export default {
axisLabel: { axisLabel: {
show: true, show: true,
color: "#fff", color: "#fff",
fontSize:this.fontSize(12)
}, },
splitLine: { splitLine: {
lineStyle: { lineStyle: {
@ -837,7 +847,7 @@ export default {
beta: 0, beta: 0,
}, },
backgroundColor: null, backgroundColor: null,
marginTop: -10, marginTop: -45,
}, },
colors: ["#00bdff", "#52f4c1", "#00dbec"], colors: ["#00bdff", "#52f4c1", "#00dbec"],
title: { title: {
@ -1288,6 +1298,7 @@ export default {
font-family: "FZSK"; font-family: "FZSK";
font-size: 0.16rem; font-size: 0.16rem;
color: #ffffff; color: #ffffff;
font-style: italic;
} }
} }
@ -1424,6 +1435,7 @@ export default {
font-family: "FZSK"; font-family: "FZSK";
font-size: 0.16rem; font-size: 0.16rem;
color: #ffffff; color: #ffffff;
font-style: italic;
img { img {
width: 0.18rem; width: 0.18rem;
@ -1716,7 +1728,7 @@ export default {
background-size: 100% 100%; background-size: 100% 100%;
// background-position-y: 0.5rem; // background-position-y: 0.5rem;
// background-position-x: -3px; // background-position-x: -3px;
top: 2.2rem; top: 2rem;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }

Loading…
Cancel
Save