|
|
@ -2,16 +2,22 @@
|
|
|
|
<div class="dpiePanel" id="dpieWrap">
|
|
|
|
<div class="dpiePanel" id="dpieWrap">
|
|
|
|
<div class="dpieLegend">
|
|
|
|
<div class="dpieLegend">
|
|
|
|
<div class="dpieRow" v-for="item in data" :key="item.name">
|
|
|
|
<div class="dpieRow" v-for="item in data" :key="item.name">
|
|
|
|
<div class="flex-center">
|
|
|
|
<div
|
|
|
|
<div
|
|
|
|
class="dpieIcon"
|
|
|
|
class="dpieIcon"
|
|
|
|
:style="{ backgroundImage: `url(${item.itemStyle.icon})` }"
|
|
|
|
:style="{ backgroundColor: item.itemStyle.color }"
|
|
|
|
></div>
|
|
|
|
></div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="dpieNameWrap">
|
|
|
|
<div class="dpieName">{{ item.name }}</div>
|
|
|
|
<div class="dpieName">{{ item.name }}</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
<div class="dpieValue">{{ item.value }}</div>
|
|
|
|
class="dpieValue"
|
|
|
|
<div class="dpieRate">
|
|
|
|
:style="{
|
|
|
|
{{ ((100 * item.value) / total).toFixed(0) }}%
|
|
|
|
color: item.itemStyle.tcolor,
|
|
|
|
|
|
|
|
textShadow: item.itemStyle.textShadow,
|
|
|
|
|
|
|
|
}"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
{{ item.value }}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -21,7 +27,6 @@
|
|
|
|
:style="{
|
|
|
|
:style="{
|
|
|
|
height: parseInt(viewH) + 'px',
|
|
|
|
height: parseInt(viewH) + 'px',
|
|
|
|
width: 2 * viewH + 'px',
|
|
|
|
width: 2 * viewH + 'px',
|
|
|
|
marginLeft: parseInt(0.5 * viewH) + 'px',
|
|
|
|
|
|
|
|
}"
|
|
|
|
}"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<div ref="dpieWrapRef" class="dpieWrap"></div>
|
|
|
|
<div ref="dpieWrapRef" class="dpieWrap"></div>
|
|
|
@ -37,17 +42,33 @@ export default {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
data: [
|
|
|
|
data: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name: "按照要求整改",
|
|
|
|
name: "已整改",
|
|
|
|
value: 528,
|
|
|
|
value: 228,
|
|
|
|
itemStyle: {
|
|
|
|
itemStyle: {
|
|
|
|
color: "#FFC052",
|
|
|
|
color: "#378DFF",
|
|
|
|
|
|
|
|
icon: require("@/assets/images/team/yzgi.png"),
|
|
|
|
|
|
|
|
tcolor: "##E3F6FF",
|
|
|
|
|
|
|
|
textShadow: "0px 0px 9px rgba(87,207,255,0.88)",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name: "安全隐患企业",
|
|
|
|
name: "未按要求整改",
|
|
|
|
value: 128,
|
|
|
|
value: 21,
|
|
|
|
itemStyle: {
|
|
|
|
itemStyle: {
|
|
|
|
color: "#FF745A",
|
|
|
|
color: "#DC4E4E",
|
|
|
|
|
|
|
|
icon: require("@/assets/images/team/wzgi.png"),
|
|
|
|
|
|
|
|
tcolor: "#FF7757",
|
|
|
|
|
|
|
|
textShadow: "0px 0px 9px rgba(255,119,87,0.88)",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: "整改中",
|
|
|
|
|
|
|
|
value: 50,
|
|
|
|
|
|
|
|
itemStyle: {
|
|
|
|
|
|
|
|
color: "#EBCD6C",
|
|
|
|
|
|
|
|
icon: require("@/assets/images/team/zgzi.png"),
|
|
|
|
|
|
|
|
tcolor: "#FFF5E3",
|
|
|
|
|
|
|
|
textShadow: "0px 0px 9px rgba(255,202,87,0.88)",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
@ -62,7 +83,7 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let temp = this.getHeight();
|
|
|
|
let temp = this.getHeight();
|
|
|
|
let height = parseInt(temp / 3);
|
|
|
|
let height = parseInt(temp / 5);
|
|
|
|
this.viewH = 2 * height;
|
|
|
|
this.viewH = 2 * height;
|
|
|
|
console.log(height);
|
|
|
|
console.log(height);
|
|
|
|
|
|
|
|
|
|
|
@ -162,10 +183,10 @@ export default {
|
|
|
|
show: false,
|
|
|
|
show: false,
|
|
|
|
boxHeight: boxHeight, //圆环的高度
|
|
|
|
boxHeight: boxHeight, //圆环的高度
|
|
|
|
left: 0,
|
|
|
|
left: 0,
|
|
|
|
top: -18, //3d饼图的位置
|
|
|
|
top: -22, //3d饼图的位置
|
|
|
|
viewControl: {
|
|
|
|
viewControl: {
|
|
|
|
//3d效果可以放大、旋转等,请自己去查看官方配置
|
|
|
|
//3d效果可以放大、旋转等,请自己去查看官方配置
|
|
|
|
alpha: 24, //角度
|
|
|
|
alpha: 22, //角度
|
|
|
|
distance: 120, //调整视角到主体的距离,类似调整zoom
|
|
|
|
distance: 120, //调整视角到主体的距离,类似调整zoom
|
|
|
|
rotateSensitivity: 0, //设置为0无法旋转
|
|
|
|
rotateSensitivity: 0, //设置为0无法旋转
|
|
|
|
zoomSensitivity: 0, //设置为0无法缩放
|
|
|
|
zoomSensitivity: 0, //设置为0无法缩放
|
|
|
@ -183,7 +204,7 @@ export default {
|
|
|
|
series.sort((a, b) => {
|
|
|
|
series.sort((a, b) => {
|
|
|
|
return b.pieData.value - a.pieData.value;
|
|
|
|
return b.pieData.value - a.pieData.value;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
return (height * 50) / series[0].pieData.value;
|
|
|
|
return (height * 60) / series[0].pieData.value;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 生成扇形的曲面参数方程,用于 series-surface.parametricEquation
|
|
|
|
// 生成扇形的曲面参数方程,用于 series-surface.parametricEquation
|
|
|
@ -280,7 +301,7 @@ export default {
|
|
|
|
radius: ["80%", "80%"],
|
|
|
|
radius: ["80%", "80%"],
|
|
|
|
center: ["50%", "50%"], //指示线的位置
|
|
|
|
center: ["50%", "50%"], //指示线的位置
|
|
|
|
itemStyle: {
|
|
|
|
itemStyle: {
|
|
|
|
opacity: 0,
|
|
|
|
opacity: 1,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
});
|
|
|
|
option && myChart.setOption(option);
|
|
|
|
option && myChart.setOption(option);
|
|
|
@ -313,7 +334,7 @@ export default {
|
|
|
|
position: absolute;
|
|
|
|
position: absolute;
|
|
|
|
right: vw(30);
|
|
|
|
right: vw(30);
|
|
|
|
height: 100%;
|
|
|
|
height: 100%;
|
|
|
|
width: 200px;
|
|
|
|
width: 140px;
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: center;
|
|
|
|
justify-content: center;
|
|
|
@ -321,26 +342,21 @@ export default {
|
|
|
|
padding: vw(6) vw(8);
|
|
|
|
padding: vw(6) vw(8);
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
margin-bottom: 6px;
|
|
|
|
margin-bottom: 6px;
|
|
|
|
background-color: rgba(108, 128, 151, 0.1);
|
|
|
|
|
|
|
|
.dpieIcon {
|
|
|
|
.dpieIcon {
|
|
|
|
margin-right: 6px;
|
|
|
|
margin-right: 6px;
|
|
|
|
width: 8px;
|
|
|
|
width: 32px;
|
|
|
|
height: 8px;
|
|
|
|
height: 38px;
|
|
|
|
transform: rotate(45deg);
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
|
|
|
background-position: center center;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.dpieName {
|
|
|
|
.dpieName {
|
|
|
|
font-size: 12px;
|
|
|
|
font-size: 14px;
|
|
|
|
color: #d0deee;
|
|
|
|
color: #fff5e3;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.dpieValue {
|
|
|
|
.dpieValue {
|
|
|
|
font-size: 16px;
|
|
|
|
font-size: 20px;
|
|
|
|
color: #ffffff;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.dpieRate {
|
|
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|