手机端适配

ds1.0
fanluyan 2 years ago
parent 9739da7c49
commit 8f954d4675

@ -52,6 +52,7 @@ export default {
width: 100%; width: 100%;
height: 40px; height: 40px;
font-size: 12px; font-size: 12px;
line-height: 40px;
.logo { .logo {
display: none; display: none;
} }
@ -99,6 +100,13 @@ export default {
top: 41px; top: 41px;
// //
.stritleEchartsPage { .stritleEchartsPage {
height: 100%;
.exportDialog {
.el-dialog {
margin-top: 140px !important;
width: 80%;
}
}
.el-card .el-card__body { .el-card .el-card__body {
padding: 8px; padding: 8px;
height: calc(100% - 16px); height: calc(100% - 16px);
@ -113,13 +121,14 @@ export default {
p { p {
padding: 1.5%; padding: 1.5%;
margin: 1.5%; margin: 1.5%;
zoom: 0.8;
span { span {
font-size: 12px !important; font-size: 12px !important;
} }
} }
} }
.chartClass { .chartClass {
zoom: 0.5; height: calc(100% - 16px);
} }
.dateBox { .dateBox {
top: 8px; top: 8px;
@ -146,6 +155,28 @@ export default {
} }
} }
} }
.picSetBox {
.swiperBox {
.title {
height: 20px;
line-height: 20px;
.el-breadcrumb {
height: 20px;
line-height: 20px;
font-size: 12px;
}
}
.thumb-example {
height: calc(100% - 8px);
.picTop {
height: 70%;
}
.picBottom {
height: 30%;
}
}
}
}
.picSetBox { .picSetBox {
.parameterArea { .parameterArea {
width: 180px; width: 180px;
@ -171,12 +202,14 @@ export default {
} }
.infoDialog { .infoDialog {
.el-dialog { .el-dialog {
width: 80% !important;
margin-top: 120px !important;
} }
} }
.setTimeDialog { .setTimeDialog {
.el-dialog { .el-dialog {
width: 80% !important; width: 80% !important;
margin-top: 15vh !important; margin-top: 120px !important;
} }
} }
} }
@ -207,7 +240,7 @@ export default {
.bigpic { .bigpic {
position: relative; position: relative;
img { img {
height: auto; height: 200px;
} }
.caption { .caption {
position: absolute; position: absolute;
@ -241,7 +274,7 @@ export default {
height: auto; height: auto;
.el-dialog { .el-dialog {
width: 100% !important; width: 100% !important;
margin-top: 120px !important; margin-top: 140px !important;
} }
} }
} }

@ -5,7 +5,7 @@
export default { export default {
props: { props: {
pieData: {}, pieData: {},
boxStyle: {} boxStyle: {},
}, },
data() { data() {
return {}; return {};
@ -22,61 +22,61 @@ export default {
// //
myChart.setOption({ myChart.setOption({
legend: { legend: {
orient: 'vertical', orient: "vertical",
top: 'center', top: "center",
left: 'right' left: "right",
}, },
tooltip: { tooltip: {
trigger: 'item' trigger: "item",
}, },
series: [ series: [
{ {
// name: 'Access From', // name: 'Access From',
type: 'pie', type: "pie",
radius: ['40%', '70%'], radius: ["40%", "70%"],
center: ['35%', '50%'], center: ["35%", "50%"],
avoidLabelOverlap: false, avoidLabelOverlap: false,
itemStyle: { itemStyle: {
borderRadius: 10, borderRadius: 10,
borderColor: '#fff', borderColor: "#fff",
borderWidth: 2 borderWidth: 2,
}, },
label: { label: {
show: false, show: false,
position: 'center' position: "center",
}, },
emphasis: { emphasis: {
label: { label: {
show: false, show: false,
fontSize: 40, fontSize: 12,
fontWeight: 'bold' fontWeight: "bold",
} },
}, },
labelLine: { labelLine: {
show: false show: false,
},
data: this.pieData,
}, },
data: this.pieData ],
}
]
}); });
window.addEventListener('resize', () => { window.addEventListener("resize", () => {
// echartsresizeecharts // echartsresizeecharts
myChart.resize(); myChart.resize();
}); });
} },
}, },
watch: { watch: {
pieData(val, old) { pieData(val, old) {
this.drawBar(); this.drawBar();
} },
}, },
beforeDestroy() { beforeDestroy() {
/* resize /* resize
容易导致内存泄漏和额外CPU或GPU占用哦*/ 容易导致内存泄漏和额外CPU或GPU占用哦*/
window.removeEventListener('resize', () => { window.removeEventListener("resize", () => {
myChart.resize(); myChart.resize();
}); });
} },
}; };
</script> </script>
<style lang="less"> <style lang="less">

@ -251,12 +251,14 @@ export default {
top: 20, top: 20,
bottom: 20, bottom: 20,
}, },
series: [ series: [
{ {
type: "pie", type: "pie",
// minAngle: 15, //
startAngle: 150, //
radius: ["40%", "70%"], radius: ["40%", "70%"],
avoidLabelOverlap: false, avoidLabelOverlap: false,
itemStyle: { itemStyle: {
borderRadius: 10, borderRadius: 10,
borderColor: "#fff", borderColor: "#fff",
@ -264,14 +266,14 @@ export default {
}, },
label: { label: {
show: true, show: true,
fontSize: 16, fontSize: 12,
fontWeight: "bold", fontWeight: "normal",
formatter: "{b}\n{d}%", formatter: "{b}\n{d}%",
}, },
emphasis: { emphasis: {
label: { label: {
show: true, show: true,
fontSize: 26, fontSize: 12,
fontWeight: "bold", fontWeight: "bold",
formatter: "{b}\n{d}%", formatter: "{b}\n{d}%",
}, },
@ -313,7 +315,7 @@ export default {
top: "10%", top: "10%",
left: "10%", left: "10%",
right: "10%", right: "10%",
bottom: "10%", bottom: "13%",
}, },
xAxis: { xAxis: {
type: "category", type: "category",
@ -413,15 +415,15 @@ export default {
}, },
label: { label: {
show: true, show: true,
fontSize: 16, fontSize: 14,
fontWeight: "bold", fontWeight: "normal",
formatter: "{b}\n{d}%", formatter: "{b}\n{d}%",
}, },
emphasis: { emphasis: {
label: { label: {
show: true, show: true,
fontSize: 26, fontSize: 14,
fontWeight: "bold", fontWeight: "normal",
formatter: "{b}\n{d}%", formatter: "{b}\n{d}%",
}, },
}, },

Loading…
Cancel
Save