|
|
@@ -1,25 +1,13 @@
|
|
|
// 绘制中间动态环图
|
|
|
-const drawWorkShopChart = (myChart, datas) => {
|
|
|
+const drawWorkShopChart = (datas) => {
|
|
|
const options = [];
|
|
|
let number = 50;
|
|
|
datas.forEach((item) => {
|
|
|
- const obj = { value: number, name: item.name };
|
|
|
+ const obj = { value: number, name: item.name,...item };
|
|
|
options.push(obj);
|
|
|
number += 10;
|
|
|
});
|
|
|
const workShopOption = {
|
|
|
- title: [{
|
|
|
- show: true,
|
|
|
- text: "",
|
|
|
- textStyle: {
|
|
|
- color: "white",
|
|
|
- fontSize: 24,
|
|
|
- fontWeight: "bold"
|
|
|
- },
|
|
|
- top: "48%",
|
|
|
- left: "26%"
|
|
|
- },
|
|
|
- ],
|
|
|
series: [
|
|
|
{
|
|
|
name: 'pie',
|
|
|
@@ -39,23 +27,16 @@ const drawWorkShopChart = (myChart, datas) => {
|
|
|
show: false,
|
|
|
position: 'center'
|
|
|
},
|
|
|
- emphasis: {
|
|
|
- label: {
|
|
|
- show: true,
|
|
|
- fontSize: 24,
|
|
|
- fontWeight: "bold",
|
|
|
- },
|
|
|
- },
|
|
|
labelLine: {
|
|
|
show: false
|
|
|
},
|
|
|
selectedMode: 'single',
|
|
|
- selectedOffset: 20,
|
|
|
+ selectedOffset: 6,
|
|
|
// 选中的样式
|
|
|
select: {
|
|
|
label: {
|
|
|
show: true,
|
|
|
- fontSize: 24,
|
|
|
+ fontSize: 20,
|
|
|
fontWeight: 'bold',
|
|
|
color: "#ffffff"
|
|
|
},
|
|
|
@@ -64,37 +45,6 @@ const drawWorkShopChart = (myChart, datas) => {
|
|
|
}
|
|
|
]
|
|
|
};
|
|
|
- workShopOption.title[0].text = workShopOption.series[0].data[0].name;
|
|
|
- window.dispatchEvent(
|
|
|
- new CustomEvent("onmessageChange", {
|
|
|
- detail: {
|
|
|
- warehouseId: datas[0].id
|
|
|
- },
|
|
|
- })
|
|
|
- );
|
|
|
- let index = 1;
|
|
|
- window.timeTicket = window.setInterval(() => {
|
|
|
- if (index > datas.length - 1) {
|
|
|
- index = 0
|
|
|
- }
|
|
|
- myChart.dispatchAction({
|
|
|
- type: 'select',
|
|
|
- seriesIndex: 0,
|
|
|
- dataIndex: index
|
|
|
- });
|
|
|
-
|
|
|
- window.dispatchEvent(
|
|
|
- new CustomEvent("onmessageChange", {
|
|
|
- detail: {
|
|
|
- warehouseId: datas[index].id
|
|
|
- },
|
|
|
- })
|
|
|
- );
|
|
|
- myChart.setOption({
|
|
|
- title: [{ text: '' }],
|
|
|
- });
|
|
|
- index++
|
|
|
- }, 6000 * 10 * 1)
|
|
|
|
|
|
return workShopOption
|
|
|
}
|
|
|
@@ -157,7 +107,7 @@ const drawMalfunctionNumber = () => {
|
|
|
padding: [0, 0, 0, 0],
|
|
|
textStyle: {
|
|
|
color: '#ffffff',
|
|
|
- fontSize: '14',
|
|
|
+ fontSize: '12',
|
|
|
}
|
|
|
},
|
|
|
data: yName
|
|
|
@@ -172,7 +122,7 @@ const drawMalfunctionNumber = () => {
|
|
|
margin: 10,
|
|
|
textStyle: {
|
|
|
color: '#ffffff',
|
|
|
- fontSize: '14',
|
|
|
+ fontSize: '12',
|
|
|
}
|
|
|
},
|
|
|
data: number,
|
|
|
@@ -269,7 +219,7 @@ const drawMalfunctionChart = () => {
|
|
|
icon: "rect",
|
|
|
right: 0,
|
|
|
textStyle: {
|
|
|
- fontSize: 14,
|
|
|
+ fontSize: 12,
|
|
|
fontFamily: "PingFangSC, PingFang SC",
|
|
|
fontWeight: 400,
|
|
|
color: "#ffffff",
|
|
|
@@ -283,13 +233,13 @@ const drawMalfunctionChart = () => {
|
|
|
boundaryGap: false,
|
|
|
data: stateData.xData,
|
|
|
nameTextStyle: {
|
|
|
- fontSize: 14,
|
|
|
+ fontSize: 12,
|
|
|
fontFamily: "PingFangSC, PingFang SC",
|
|
|
fontWeight: 400,
|
|
|
color: "#ffffff",
|
|
|
},
|
|
|
axisLabel: {
|
|
|
- fontSize: 14,
|
|
|
+ fontSize: 12,
|
|
|
fontFamily: "PingFangSC, PingFang SC",
|
|
|
fontWeight: 400,
|
|
|
color: "#ffffff",
|
|
|
@@ -299,13 +249,13 @@ const drawMalfunctionChart = () => {
|
|
|
type: "value",
|
|
|
name: "数量",
|
|
|
nameTextStyle: {
|
|
|
- fontSize: 14,
|
|
|
+ fontSize: 12,
|
|
|
fontFamily: "PingFangSC, PingFang SC",
|
|
|
fontWeight: 400,
|
|
|
color: "#ffffff",
|
|
|
},
|
|
|
axisLabel: {
|
|
|
- fontSize: 14,
|
|
|
+ fontSize: 12,
|
|
|
fontFamily: "PingFangSC, PingFang SC",
|
|
|
fontWeight: 400,
|
|
|
color: "#ffffff",
|
|
|
@@ -600,7 +550,7 @@ const drawMaintainChart = () => {
|
|
|
formatter: (e) => {
|
|
|
return e.value / 1000 * 100 + '%';
|
|
|
},
|
|
|
- fontSize: 16,
|
|
|
+ fontSize: 12,
|
|
|
color: '#ffffff',
|
|
|
offset: [0, -10],
|
|
|
},
|
|
|
@@ -652,7 +602,7 @@ const drawOutInChart = () => {
|
|
|
axisLabel: {
|
|
|
interval: 0,
|
|
|
color: '#ffffff',
|
|
|
- fontSize: 16
|
|
|
+ fontSize: 14
|
|
|
},
|
|
|
},
|
|
|
yAxis: {
|
|
|
@@ -661,7 +611,7 @@ const drawOutInChart = () => {
|
|
|
margin: 30,
|
|
|
show: true,
|
|
|
color: '#ffffff',
|
|
|
- fontSize: 16
|
|
|
+ fontSize: 14
|
|
|
},
|
|
|
axisTick: {
|
|
|
show: false,
|
|
|
@@ -752,12 +702,12 @@ const drawCountChart = (dieCountChart, data) => {
|
|
|
fontWeight: "400",
|
|
|
rich: {
|
|
|
a: {
|
|
|
- fontSize: 30,
|
|
|
+ fontSize: 24,
|
|
|
color: "#00baff",
|
|
|
fontWeight: "600",
|
|
|
},
|
|
|
c: {
|
|
|
- fontSize: 40,
|
|
|
+ fontSize: 30,
|
|
|
color: "#00baff",
|
|
|
padding: [6, 4],
|
|
|
},
|
|
|
@@ -795,13 +745,13 @@ const drawCountChart = (dieCountChart, data) => {
|
|
|
radius: ["23%", "28%"],
|
|
|
avoidLabelOverlap: false,
|
|
|
hoverAnimation: true,
|
|
|
- minAngle:26,
|
|
|
- color: ["#50aee4", "#f90c29", "#2f67f6", "#0d2983",'#7979f7'],
|
|
|
+ minAngle: 26,
|
|
|
+ color: ["#50aee4", "#f90c29", "#2f67f6", "#0d2983", '#7979f7'],
|
|
|
label: {
|
|
|
normal: {
|
|
|
- show:true,
|
|
|
+ show: true,
|
|
|
formatter: "{b} {c}",
|
|
|
- fontSize: 16,
|
|
|
+ fontSize: 14,
|
|
|
fontWeight: 600,
|
|
|
color: "#ffffff",
|
|
|
},
|
|
|
@@ -829,7 +779,7 @@ const drawCountChart = (dieCountChart, data) => {
|
|
|
emphasis: {
|
|
|
label: {
|
|
|
show: true,
|
|
|
- fontSize: 13,
|
|
|
+ fontSize: 16,
|
|
|
fontWeight: "bold",
|
|
|
},
|
|
|
},
|
|
|
@@ -1095,22 +1045,6 @@ const drawCountChart = (dieCountChart, data) => {
|
|
|
return dataArr;
|
|
|
}
|
|
|
|
|
|
- // function doing() {
|
|
|
- // let option1 = dieCountChart.getOption();
|
|
|
- // option1.series[2].startAngle = option1.series[2].startAngle + 10;
|
|
|
- // option1.series[4].startAngle = option1.series[4].startAngle - 10;
|
|
|
- // option1.series[5].startAngle = option1.series[5].startAngle + 5;
|
|
|
- // dieCountChart.setOption(option1);
|
|
|
- // }
|
|
|
-
|
|
|
- // function startTimer() {
|
|
|
- // timer = setInterval(doing, 100);
|
|
|
- // }
|
|
|
-
|
|
|
- // 过渡完成后开始动画
|
|
|
- // dieCountChart.on("finished", () => {
|
|
|
- // setTimeout(startTimer, 0);
|
|
|
- // });
|
|
|
return option2
|
|
|
|
|
|
}
|