From 628ee4dccd7041c5e6e8ece593c1719358a82665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Tue, 26 Mar 2024 16:49:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/board/pourInto/index2.vue | 2676 +++++++++++++++++-- src/views/report/repairRateReport/index.vue | 149 +- 2 files changed, 2606 insertions(+), 219 deletions(-) diff --git a/src/views/board/pourInto/index2.vue b/src/views/board/pourInto/index2.vue index ad6f8ca..5010674 100644 --- a/src/views/board/pourInto/index2.vue +++ b/src/views/board/pourInto/index2.vue @@ -5,6 +5,13 @@ :style="'top:'+(titlePosition[k]&&titlePosition[k].top||0)+'%;left:'+(titlePosition[k]&&titlePosition[k].left||0)+'%'"> {{ i }} + +
+ 产线1 + 产线2 + 合并 + +
@@ -419,6 +426,7 @@ export default { name: "Liner", data() { return { + nowLine: 2, title: [ '灌注', '电检', @@ -504,14 +512,14 @@ export default { e: 'zzgx-02', i: "scada_zz_up_dj_01('CX_02')", f: (e) => { - this.dj =e[0] || {} + this.dj = e[0] || {} } }, { e: 'zzgx-03', i: "scada_zz_up_xn_01('CX_02')", f: (e) => { - this.zl =e[0] || {} + this.zl = e[0] || {} } }, { @@ -695,7 +703,7 @@ export default { formatter: function (params) { return ( "{a|" + - parseFloat(data.Y_VALUE_TWO) + + parseFloat(data.Y_VALUE_TWO) + "}" + "\n{b|合格数}" ); @@ -774,7 +782,7 @@ export default { formatter: function (params) { return ( "{a|" + - parseFloat(data.X_VALUE) + + parseFloat(data.X_VALUE) + "%}" + "\n{b|合格率}" ); @@ -1099,7 +1107,7 @@ export default { center: ["50%", "50%"], data: [ { - value:(parseFloat(data.Y_VALUE_ONE) === 0 ? 0.01 : parseFloat(data.Y_VALUE_ONE)), + value: (parseFloat(data.Y_VALUE_ONE) === 0 ? 0.01 : parseFloat(data.Y_VALUE_ONE)), label: { normal: { rich: { @@ -1350,7 +1358,7 @@ export default { center: ["50%", "50%"], data: [ { - value:(parseFloat(data.Y_VALUE_ONE) === 0 ? 0.01 : parseFloat(data.Y_VALUE_ONE)), + value: (parseFloat(data.Y_VALUE_ONE) === 0 ? 0.01 : parseFloat(data.Y_VALUE_ONE)), label: { normal: { rich: { @@ -1575,220 +1583,2432 @@ export default { } }, ], - - } - }, - mounted() { - this.RequestDataSet.forEach(val => { - mixData(val) - }) - intervalFun = setInterval(() => { - this.RequestDataSet.forEach(val => { - mixData(val) - }) - }, 1000 * 10) - }, - methods: { - option(name, val) { - return { - tooltip: { - formatter: "{a}
{b} : {c}%", + RequestDataSet1: [ + { + e: 'zzgx-01', + i: "scada_zz_up_gz_01('CX_02')", + f: (e) => { + this.gz = e[0] || {} + } }, - series: [ - { - name: "进度", - type: "gauge", - center: ['50%', '60%'], - radius: "65%", - splitNumber: 0, - axisLine: { - lineStyle: { - color: [ - [val / 100, "#468EFD"], - [1, "#111F42"], - ], - width: 8, - }, - }, - axisLabel: { - show: false, - }, - axisTick: { - show: false, - }, - splitLine: { - show: false, - }, - itemStyle: { - show: false, - }, - detail: { - formatter: function () { - return `${val}\n${name}`; - }, - offsetCenter: [0, '90%'], - lineHeight: 16, - textStyle: { - padding: [0, 0, 0, 0], - fontSize: 12, - fontWeight: "700", - color: "#fff", - }, - }, - title: { - //标题 - show: true, - offsetCenter: [0, '100%'], // x, y,单位px - textStyle: { - color: "#fff", - fontSize: 14, //表盘上的标题文字大小 - fontWeight: 400, - fontFamily: "PingFangSC", - }, - }, - data: [ - { - name: " ", - value: val, - }, - ], - pointer: { - show: true, - length: "75%", - radius: "70%", - width: 5, //指针粗细 - }, - animationDuration: 4000, - }, - { - name: "外部刻度", - type: "gauge", - center: ['50%', '60%'], - radius: "80%", - min: 0, //最小刻度 - max: 100, //最大刻度 - splitNumber: 6, //刻度数量 - startAngle: 225, - endAngle: -45, - axisLine: { - show: true, - lineStyle: { - width: 1, - color: [[1, "rgba(0,0,0,0)"]], - }, - }, //仪表盘轴线 - axisLabel: { - show: true, - color: "#4d5bd1", - distance: -14, - formatter: function (v) { - return v.toFixed(0) - }, - }, //刻度标签。 - axisTick: { - show: true, - splitNumber: 6, - lineStyle: { - color: "#468EFD", //用颜色渐变函数不起作用 - width: 1, - }, - length: -5, - }, //刻度样式 - splitLine: { - show: true, - length: -10, - lineStyle: { - color: "#468EFD", //用颜色渐变函数不起作用 + { + e: 'zzgx-02', + i: "scada_zz_up_dj_01('CX_02')", + f: (e) => { + this.dj = e[0] || {} + } + }, + { + e: 'zzgx-03', + i: "scada_zz_up_xn_01('CX_02')", + f: (e) => { + this.zl = e[0] || {} + } + }, + { + e: 'zzgx-04', + i: "scada_zz_up_jl_01('CX_02')", + f: (e) => { + this.gdy = e[0] || {} + } + }, + { + e: 'zzgx-05', + i: "scada_zz_up_tj_01('CX_02')", + f: (e) => { + this.scrollTableData = e + } + }, + { + e: 'zzgx-06', + i: "scada_zz_up_fb_01('CX_02')", + f: (e) => { + this.$refs.chart1.setData({ + tooltip: { + trigger: "item", + formatter: "{a}
{b} : {c} ({d}%)", }, - }, //分隔线样式 - detail: { - show: false, - }, - pointer: { - show: false, - }, - }, - ], - } - } - }, - beforeDestroy() { - if (intervalFun) { - clearInterval(intervalFun) - intervalFun = null - } - } -}; - - diff --git a/src/views/report/repairRateReport/index.vue b/src/views/report/repairRateReport/index.vue index 572fc23..60bf1cd 100644 --- a/src/views/report/repairRateReport/index.vue +++ b/src/views/report/repairRateReport/index.vue @@ -37,6 +37,9 @@ 重置 +
+ +
@@ -66,7 +69,11 @@ - + + + @@ -87,10 +94,15 @@ import { } from '@/api/report/reportAPI' import { findProductLineList } from '@//api/base/productLine' import { parseTime } from '@//utils/ruoyi' +import Chart from "@/components/board/Chart"; +const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100 export default { name: 'RepairRateReport', dicts: ['is_flag'], + components: { + Chart + }, data() { return { // 遮罩层 @@ -191,6 +203,135 @@ export default { }) this.total = response.total this.loading = false + + let e= response.data + this.$refs.chart1.setData({ + grid: { + top: "15%", + left: "1%", + right: "1%", + bottom: "2%", + containLabel: true, + }, + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'cross', + crossStyle: { + color: '#000', + }, + }, + }, + legend: { + itemWidth: 3 * vw, + data: ['不良数', '一次不合格率', '目标'], + textStyle: { + color: "#000", + margin: 15, + fontSize: 0.75 * vw + }, + }, + xAxis: [ + { + axisLabel: { + //坐标轴刻度标签的相关设置 + textStyle: { + color: "#000", + margin: 15, + fontSize: 0.75 * vw + }, + }, + type: 'category', + data: e.map(val => val.INSPECTOR_TIME), + axisPointer: { + type: 'shadow' + } + } + ], + yAxis: [ + { + type: 'value', + splitLine: { + lineStyle: { + color: "rgba(255,255,255,0.1)", + }, + }, + axisLabel: { + //坐标轴刻度标签的相关设置 + textStyle: { + color: "#000", + margin: 15, + fontSize: 0.75 * vw + }, + formatter: '{value}' + } + }, + { + type: 'value', + splitLine: { + show: false, + }, + axisLabel: { + //坐标轴刻度标签的相关设置 + textStyle: { + color: "#000", + margin: 15, + fontSize: 0.75 * vw + }, + formatter: '{value}% ' + } + } + ], + series: [ + { + name: '不良数', + type: 'bar', + itemStyle: { + normal: { + color: function (val) { + if (parseFloat(e[val.dataIndex].REPAIR_RATE) < 10) { + return '#30e391' + } else { + return '#FE70A6' + } + // return "#0D81ED" + }, + }, + }, + data: e.map(val => val.QUALITY_SUM), + label: { + show: true, + position: 'top', + textStyle: { + color: "rgba(255,255,255,0.5)", + fontSize: 0.75 * vw + }, + }, + }, + { + name: '返修率', + type: 'line', + yAxisIndex: 1, + data: e.map(val => parseFloat(val.REPAIR_RATE)), + itemStyle: { + normal: { + color: '#F9A25B', + }, + }, + }, + { + name: '目标', + type: 'line', + yAxisIndex: 1, + data: e.map(val => 10), + itemStyle: { + normal: { + color: '#0DB99D', + }, + }, + } + ] + }) }) }, // 取消按钮 @@ -244,3 +385,9 @@ export default { } } +