From f294efb8c01ad8b0704a92d51c14dbd55d898874 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期四, 23 十月 2025 16:49:46 +0800
Subject: [PATCH] 拆分原材料和外购成品的业务流程(报检、下单、检验)
---
src/views/statisticalCharts/inspectionItemWarning/index.vue | 100 +++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 91 insertions(+), 9 deletions(-)
diff --git a/src/views/statisticalCharts/inspectionItemWarning/index.vue b/src/views/statisticalCharts/inspectionItemWarning/index.vue
index 1840d04..22585f5 100644
--- a/src/views/statisticalCharts/inspectionItemWarning/index.vue
+++ b/src/views/statisticalCharts/inspectionItemWarning/index.vue
@@ -10,12 +10,28 @@
<el-row>
<el-col :span="24">
<div class="inspection-card">
- <div class="title">妫�楠岄」鍋忓樊棰勮鏁版嵁璇︽儏</div>
+ <div class="title">妫�楠岄」骞冲潎鍊煎亸宸璀︽暟鎹鎯�</div>
<Echarts ref="chart"
:chartStyle="chartStyle"
:grid="grid"
:options="echartsOptions"
:series="echartsSeries"
+ :tooltip="tooltip"
+ :xAxis="xAxis"
+ :yAxis="yAxis"
+ style="height: 40vh;"></Echarts>
+ </div>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="24">
+ <div class="inspection-card">
+ <div class="title">妫�楠岄」瑕佹眰鍊煎亸宸璀︽暟鎹鎯�</div>
+ <Echarts ref="chart"
+ :chartStyle="chartStyle"
+ :grid="grid"
+ :options="echartsOptions"
+ :series="echartsSeries1"
:tooltip="tooltip"
:xAxis="xAxis"
:yAxis="yAxis"
@@ -50,13 +66,12 @@
tableLoading: false,
column: [
{ label: '鏍峰搧缂栧彿', prop: 'sampleCode',width: 150 },
- { label: '鏍峰搧鍚嶇О', prop: 'sampleName',width: 150 },
- { label: '鍨嬪彿', prop: 'sampleModel' },
+ { label: '鏍峰搧鍚嶇О', prop: 'sampleName'},
+ { label: '鍨嬪彿', prop: 'sampleModel',width: 150 },
{ label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName',width: 150 },
- { label: '妫�楠岄」鍚嶇О', prop: 'inspectionItemName',width: 150 },
- { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName',width: 150 },
+ { label: '妫�楠岄」鍚嶇О', prop: 'inspectionItemName'},
{
- label: "鍋忓樊鍊�",
+ label: "鍋忓樊鍊�%",
prop: "deviationValue",
width: 150,
dataType: "tag",
@@ -89,7 +104,6 @@
column1: [
{ label: '鏍峰搧缂栧彿', prop: 'sampleCode'},
{ label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName'},
- { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName'},
{
label: "妫�娴嬪��",
prop: "testValue",
@@ -119,7 +133,30 @@
echartsOptions: {},
echartsSeries: [
{
- name: '鍋忓樊鍊�',
+ name: '妫�娴嬪��',
+ type: 'line',
+ smooth: true,
+ tooltip: {
+ valueFormatter: function (value) {
+ return value;
+ }
+ },
+ label: {
+ show: true,
+ position: 'top',
+ formatter: function (value) {
+ return value.value;
+ },
+ distance: 14
+ },
+ data: [],
+ markArea: {},
+ markPoint: {}
+ },
+ ],
+ echartsSeries1: [
+ {
+ name: '妫�娴嬪��',
type: 'line',
smooth: true,
tooltip: {
@@ -188,7 +225,6 @@
// 鏌ヨ鎶樼嚎鍥句俊鎭�
rowClick (row) {
selectDeviationWarning({deviationWarningId: row.deviationWarningId}).then(res => {
- console.log('res---', res)
if (res.data === null) {
this.$message.warning('鏆傛棤鏁版嵁')
return
@@ -196,7 +232,9 @@
let lineData = []
let xAxis = []
let markAreas = []; // 瀛樺偍 markArea 鐨勬暟缁�
+ let markAreas1 = [];
let markPoints = [];
+ let markPoints1 = [];
const sampleCodeCount = {};
res.data.forEach((item, index) => {
lineData.push(item.testValue)
@@ -244,6 +282,39 @@
borderRadius: 4
}
});
+ }// 濡傛灉 isIssueAsked 涓� 1锛屽垯鍦ㄦ绱㈠紩澶勬坊鍔犱竴涓� markAreas1
+ if (item.isIssueAsked == 1) {
+ const startColumn = index > 0 ? xAxis[index - 1] : xAxis[index]; // 璧风偣锛氬墠涓�鍒楁垨褰撳墠鍒�
+ const endColumn = xAxis[index]; // 缁堢偣锛氬綋鍓嶅垪
+
+ markAreas.push([
+ {
+ xAxis: startColumn, // 浠庡墠涓�鍒楀紑濮�
+ },
+ {
+ xAxis: endColumn, // 鍒板綋鍓嶅垪缁撴潫
+ }
+ ]);
+ markPoints1.push({
+ name: '闂鐐�',
+ coord: [item.sampleCode, item.testValue],
+ value: item.testValue,
+ itemStyle: {
+ color: 'rgba(255, 173, 177, 0.8)'
+ },
+ label: {
+ show: true,
+ formatter: function(params) {
+ return params.value; // 鑷畾涔夋爣绛惧唴瀹�
+ },
+ color: 'black', // 鏍囩鏂囧瓧棰滆壊
+ fontSize: 12,
+ distance: 5, // 璋冩暣鏍囩涓庢皵娉$殑璺濈
+ padding: [0,0],
+ backgroundColor: 'rgba(255, 173, 177, 0.8)', // 鏍囩鑳屾櫙鑹插強閫忔槑搴�
+ borderRadius: 4
+ }
+ });
}
})
this.xAxis[0].data = xAxis
@@ -258,6 +329,17 @@
this.echartsSeries[0].markPoint = {
data: markPoints
};
+ this.echartsSeries1[0].data = lineData
+ // 鏇存柊 markAreas1 閰嶇疆
+ this.echartsSeries1[0].markAreas1 = {
+ itemStyle: {
+ color: 'rgba(255, 173, 177, 0.4)' // 璁剧疆鑳屾櫙棰滆壊
+ },
+ data: markAreas1 // 鍔ㄦ�佺敓鎴愮殑 markAreas1 鏁版嵁
+ };
+ this.echartsSeries1[0].markPoint = {
+ data: markPoints1
+ };
})
},
// 閲嶇疆
--
Gitblit v1.9.3