This commit is contained in:
2025-05-09 17:33:23 +08:00
parent 491566bded
commit 1d2aee2c7c
6 changed files with 186 additions and 2 deletions
+163 -1
View File
@@ -1968,7 +1968,7 @@
})--%>
createZL({ name: '<%=QualityRate%>', value1: <%=zlallNumber%>, value2: <%=zlfinishNumber%>, el: 'zl-map1' })
createZL({ name: '<%=OnePassRate%>', value1: <%=zlgjallNumber%>, value2: <%=zlgjfinishNumber%>, el: 'zl-map2' })
createZL({ name: '<%=OnePassRateOfWelding%>', value1: <%=hjallNumber%>, value2: <%=hjfinishNumber%>, el: 'zl-map3' })
createZL3({ name: '<%=OnePassRateOfWelding%>', value1: <%=hjallNumber%>, value2: <%=hjfinishNumber%>, el: 'zl-map3' })
function createZL(obj) {
let AOption1 = {
title: [{
@@ -2131,6 +2131,168 @@
var aPassChart = echarts.init(document.getElementById(obj.el));
aPassChart.setOption(AOption1);
}
function createZL3(obj) {
let AOption1 = {
title: [{
text: obj.name || '',
top: '62%',
left: 'center',
textStyle: {
color: '#FFFFFF',
fontSize: 14,
fontWeight: 100
}
}, {
// text: `总计:${obj.value1} | 合格数:${obj.value2}`,
text: [`{a|<%=total%>}{b|${obj.value1}}{c||}{a|<%=qualified%>}{d|${obj.value2}}`],
top: '80%',
left: 'center',
textStyle: {
rich: {
a: {
fontSize: 14,
color: '#DADADA',
},
b: {
color: '#FFFFFF',
fontSize: 14,
},
c: {
padding: [0, 6],
fontSize: 14,
color: '#FFFFFF',
},
d: {
fontSize: 14,
color: '#12CDA2',
}
}
}
},
],
series: [
{
name: '',
type: 'gauge',
radius: "60%",
center: ["50%", "30%"],
startAngle: 360,
endAngle: 0,
splitNumber: 20,
progress: {
show: false
},
axisLine: {
roundCap: true,
lineStyle: {
width: 20,
color: [[1, new echarts.graphic.LinearGradient(
0, 0, 0, 1, // 这四个参数分别表示渐变的起点 (x1, y1) 与终点 (x2, y2)
[
{ offset: 0, color: 'RGBA(38, 223, 235, .4)' }, // 0% 处的颜色
{ offset: 1, color: '#29F1FA' } // 100% 处的颜色
]
)]]
}
},
detail: {
valueAnimation: true,
formatter: function (value) {
if (obj.value1 == 0) {
str = `{a|0}{b|%}`
} else {
str = `{a|${(obj.value2 / obj.value1 * 100).toFixed(2)}}{b|%}`
}
return str;
},
color: 'inherit',
offsetCenter: [0, 0],
rich: {
a: {
fontSize: 20,
color: '#FFFFFF'
},
b: {
fontSize: 12,
color: '#FFFFFF'
}
}
},
pointer: {
show: false
},
axisLabel: {
show: false
},
splitLine: {
distance: -20,
length: 20,
lineStyle: {
color: '#021837',
width: 4,
}
},
axisTick: {
show: false
},
anchor: {
show: false
},
data: [
{ value: obj.value1 },
],
},
{
name: '',
type: 'gauge',
radius: "68%",
center: ["50%", "30%"],
startAngle: 20,
endAngle: 200,
splitNumber: 20,
progress: {
show: false
},
axisLine: {
roundCap: true,
lineStyle: {
width: 1,
color: [[1, new echarts.graphic.LinearGradient(
0, 0, 0, 1, // 这四个参数分别表示渐变的起点 (x1, y1) 与终点 (x2, y2)
[
{ offset: 0, color: 'RGBA(38, 223, 235, .4)' }, // 0% 处的颜色
{ offset: 1, color: '#29F1FA' } // 100% 处的颜色
]
)]]
}
},
pointer: {
show: false
},
axisLabel: {
show: false
},
splitLine: {
show: false
},
axisTick: {
show: false
},
anchor: {
show: false
},
}
]
};
var aPassChart = echarts.init(document.getElementById(obj.el));
aPassChart.setOption(AOption1);
}
// 风险巡检图标
createFXMap()