7e66680b by xiaomiao

大屏调整

1 parent 27ca87cc
......@@ -59,6 +59,9 @@ export default {
initChart () {
// 初始化echart
this.chart = this.$echarts.init(this.$el, 'tdTheme')
function nowSize(val,initWidth=1920){
return val * (nowClientWidth/initWidth);
}
this.chart.setOption(this.options, true)
......
......@@ -35,6 +35,16 @@ export default {
}
return rgbaColor;
},
fontSize(res) {
let docEl = document.documentElement,
clientWidth =
window.innerWidth ||
document.documentElement.clientWidth ||
document.body.clientWidth;
if (!clientWidth) return;
let fontSize = clientWidth / 1920;
return res * fontSize;
}
},
watch: {
cdata: {
......@@ -51,6 +61,7 @@ export default {
data: newData.legendItem,
textStyle: {
color: "#00DEFF",
fontSize:this.fontSize(12),
},
},
// calculable: true,
......@@ -97,8 +108,8 @@ export default {
textStyle: {
color: "rgba(255, 255, 255,0.7)", // x轴颜色
fontWeight: "normal",
fontSize: "12",
lineHeight: 22,
fontSize: this.fontSize(12),
lineHeight: this.fontSize(22),
},
},
data: this.xAxisData,
......@@ -136,7 +147,7 @@ export default {
smooth: false, //是否平滑
showSymbol: true,
symbol: "circle",
symbolSize: 6,
symbolSize: this.fontSize(6),
zlevel: 3,
lineStyle: {
normal: {
......@@ -154,7 +165,7 @@ export default {
smooth: false,
showSymbol: true,
symbol: "circle",
symbolSize: 8,
symbolSize: this.fontSize(8),
zlevel: 3,
lineStyle: {
normal: {
......@@ -172,7 +183,7 @@ export default {
smooth: false,
showSymbol: true,
symbol: "circle",
symbolSize: 8,
symbolSize: this.fontSize(8),
zlevel: 3,
lineStyle: {
normal: {
......
<template>
<Echart :options="options" id="centreLeft1Chart" :key="key" height="225px" width="80%"></Echart>
<Echart :options="options" id="centreLeft1Chart" :key="key" height="1.0417rem" width="80%"></Echart>
</template>
<script>
import Echart from '@/common/echart'
......@@ -23,7 +23,7 @@ export default {
handler (newData) {
console.log("newData",newData);
this.options = {
grid: {
grid: {
right:"1%",
bottom:"4%"
},
......@@ -49,7 +49,7 @@ export default {
{
name: "业务量",
type: "pie",
radius: [0,100],
radius: [20,100],
roseType: "area",
data: newData.seriesData
}
......@@ -67,7 +67,7 @@ export default {
<style lang="scss" scoped>
#centreLeft1Chart {
margin-bottom: 10px;
margin-left: 60px;
margin-bottom: .0521rem;
margin-left:60px;
}
</style>
......
......@@ -20,10 +20,14 @@ export default {
},
mounted () {
this.getdjywltotal();
window.addEventListener("resize", () => {
this.getdjywltotal();
});
},
methods: {
// 获取登记业务量玫瑰图数据
async getdjywltotal () {
this.cdata.seriesData=[]
try {
let p = {
DJLX: "",
......
......@@ -103,7 +103,7 @@ export default {
height: 33%;
background: url("~@/image/djywl.png") no-repeat;
background-size: 100% 100%;
padding: .2825rem 0 0 0;
padding: .3825rem 0 0 0;
}
.card3 {
......
......@@ -49,6 +49,7 @@ export default {
margin: auto;
display: flex;
justify-content: space-between;
margin-top: 15px;
}
// #box{
......