From 94abe0f16f730110b1418f8b473fe52c4506514d Mon Sep 17 00:00:00 2001 From: wangyu <823267011@qq.com> Date: Mon, 29 Jun 2026 17:00:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B4=A8=E4=BF=9D=E4=B9=A6=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8=E5=A4=9A=E6=A0=B7=E5=8C=96(=E6=9F=B1/=E6=8A=98?= =?UTF-8?q?=E7=BA=BF/=E9=9D=A2=E7=A7=AF)=20+=20=E8=B4=A8=E9=87=8F=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=8E=BB=E6=8E=89=E6=A3=80=E9=AA=8C=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 质保书过程图表按单位分配柱状/折线/面积图,不再只有柱状 - 质量管理删除「检验任务」Tab与相关代码 - 左侧钢卷列表改为来自实际生产实绩(production records),钢卷信息映射实绩字段 - 异常记录不再默认预置6行,进入加载已有缺陷,点「新增行」逐条添加 Co-Authored-By: Claude Opus 4.8 --- frontend/src/views/Production.vue | 44 +++-- frontend/src/views/Quality.vue | 279 ++++-------------------------- 2 files changed, 63 insertions(+), 260 deletions(-) diff --git a/frontend/src/views/Production.vue b/frontend/src/views/Production.vue index bcbb211..4c89e4f 100644 --- a/frontend/src/views/Production.vue +++ b/frontend/src/views/Production.vue @@ -339,21 +339,37 @@ export default { const u = it.unit || '其他' ;(groups[u] = groups[u] || []).push({ label: it.label, value: v }) }) - return Object.entries(groups).map(([unit, items], gi) => ({ - unit, - option: { - tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } }, - grid: { left: 44, right: 12, top: 16, bottom: 78 }, - xAxis: { - type: 'category', - data: items.map(i => i.label.replace(/(开卷机|九辊矫直机|切头剪|酸洗槽|漂洗槽|三辊张力|平整机|静电涂油机|卷取机|夹送辊|挤干辊)\s?/g, '')), - axisLabel: { rotate: 40, fontSize: 9, color: '#666' }, - axisLine: { lineStyle: { color: '#ddd' } }, + const KIND = { 'm/min': 'area', 'kN': 'line', '°C': 'bar', 'A': 'bar', 'Hz': 'line', 'kN·m': 'bar', 'g/L': 'area' } + return Object.entries(groups).map(([unit, items], gi) => { + const color = CHART_COLORS[gi % CHART_COLORS.length] + const data = items.map(i => i.value) + const kind = KIND[unit] || (gi % 2 ? 'line' : 'bar') + let series + if (kind === 'bar') { + series = { type: 'bar', data, itemStyle: { color, borderRadius: [3, 3, 0, 0] }, barMaxWidth: 18 } + } else { + series = { + type: 'line', data, smooth: true, symbol: 'circle', symbolSize: 6, + itemStyle: { color }, lineStyle: { color, width: 2 }, + areaStyle: kind === 'area' ? { color, opacity: 0.12 } : undefined, + } + } + return { + unit, + option: { + tooltip: { trigger: 'axis', axisPointer: { type: kind === 'bar' ? 'shadow' : 'line' } }, + grid: { left: 44, right: 12, top: 16, bottom: 78 }, + xAxis: { + type: 'category', boundaryGap: kind === 'bar', + data: items.map(i => i.label.replace(/(开卷机|九辊矫直机|切头剪|酸洗槽|漂洗槽|三辊张力|平整机|静电涂油机|卷取机|夹送辊|挤干辊)\s?/g, '')), + axisLabel: { rotate: 40, fontSize: 9, color: '#666' }, + axisLine: { lineStyle: { color: '#ddd' } }, + }, + yAxis: { type: 'value', name: unit, nameTextStyle: { color: '#999', fontSize: 10 }, axisLabel: { color: '#666', fontSize: 9 }, splitLine: { lineStyle: { color: '#eee' } } }, + series: [series], }, - yAxis: { type: 'value', name: unit, nameTextStyle: { color: '#999', fontSize: 10 }, axisLabel: { color: '#666', fontSize: 9 }, splitLine: { lineStyle: { color: '#eee' } } }, - series: [{ type: 'bar', data: items.map(i => i.value), itemStyle: { color: CHART_COLORS[gi % CHART_COLORS.length] }, barMaxWidth: 18 }], - }, - })) + } + }) }, }, created() { this.fetchData() }, diff --git a/frontend/src/views/Quality.vue b/frontend/src/views/Quality.vue index bdbee22..086c68f 100644 --- a/frontend/src/views/Quality.vue +++ b/frontend/src/views/Quality.vue @@ -1,93 +1,5 @@