From f3746720925e6a1598042eb3180ad2f46ecd5dc3 Mon Sep 17 00:00:00 2001 From: shaoyong Date: Tue, 21 May 2024 11:20:33 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=9D=A5=E6=96=99=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=EF=BC=8C=E6=B5=8B=E9=87=8F=E5=80=BC=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/quality/income.js | 6 +++++ .../quality/qcIncome/checkProjectType.vue | 26 ++++++++++++------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/api/quality/income.js b/src/api/quality/income.js index 61c2c37..4311aa1 100644 --- a/src/api/quality/income.js +++ b/src/api/quality/income.js @@ -174,3 +174,9 @@ export function getCkeckProjectXJList(query) { params: query }); } + export function getWeightValue(recordId) { + return request({ + url: '/quality/qcIncome/getWeightValue/' + recordId, + method: 'get' + }) + } diff --git a/src/views/quality/qcIncome/checkProjectType.vue b/src/views/quality/qcIncome/checkProjectType.vue index f5a7c8a..a747779 100644 --- a/src/views/quality/qcIncome/checkProjectType.vue +++ b/src/views/quality/qcIncome/checkProjectType.vue @@ -139,7 +139,7 @@ - + 提交 新增测量值 自动获取 - 重置 + 重置 @@ -192,7 +192,8 @@ export default { data() { return { viewStatus : '0', - showFlag : false, + showFlag: false, + dyloading: false, // 选中数组 selectedRows: {}, // 非单个禁用 @@ -389,6 +390,12 @@ export default { this.showFlag = false; this.reset(); }, + // 使用nextTick解决循环引用问题 + handleResetForm() { + this.$nextTick(() => { + this.dynamicValidateForm.domains = [{ value: ''}]; + }); + }, // 数据状态修改/Y合格N不合格 /* handleStatusChange(row) { @@ -409,12 +416,13 @@ export default { this.recordId = row.recordId; this.weight = row.weight; const actualValue = row.actualValue; - if(actualValue !== null || actualValue !== ''){ + console.log(actualValue); + if(actualValue !== null && actualValue !== '') { this.dynamicValidateForm.domains = []; let values = actualValue.split(","); values.forEach((item,index) => { this.dynamicValidateForm.domains.push({ - value: item, + value: item.toString(), key: Date.now() + index }); }); @@ -523,13 +531,14 @@ export default { this.defectForm.defectItems.forEach(item => (item.noOkQuality = 0)); }, handleWeightValue() { + this.dyloading = true; const recordId = this.recordId; getWeightValue(recordId).then(response => { if(response.code === 200) { let value = response.msg; - if(value !== null || value !== ''){ + if(value !== null && value !== ''){ let arr = value.split(","); - console.log(arr); + this.dynamicValidateForm.domains = []; arr.forEach((item,index)=> { this.dynamicValidateForm.domains.push({ value: item, @@ -537,8 +546,7 @@ export default { }); }); } - - console.log(this.dynamicValidateForm.domains); + this.dyloading = false; }else { this.$modal.msgError(response.msg); } From 7a093feafbd24bb96eb1b2429848af092423d7d2 Mon Sep 17 00:00:00 2001 From: shaoyong Date: Tue, 21 May 2024 11:33:45 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=A3=80=E6=B5=8B=E5=80=BC=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/quality/qcIncome/checkProjectType.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/views/quality/qcIncome/checkProjectType.vue b/src/views/quality/qcIncome/checkProjectType.vue index a747779..4c30e48 100644 --- a/src/views/quality/qcIncome/checkProjectType.vue +++ b/src/views/quality/qcIncome/checkProjectType.vue @@ -392,9 +392,7 @@ export default { }, // 使用nextTick解决循环引用问题 handleResetForm() { - this.$nextTick(() => { - this.dynamicValidateForm.domains = [{ value: ''}]; - }); + this.dynamicValidateForm.domains = [{ value: ''}]; }, // 数据状态修改/Y合格N不合格 @@ -412,11 +410,11 @@ export default { //动态测量值 /** 检测结果钮操作 */ handleShowValue(row) { + this.handleResetForm(); this.valueOpen = true; this.recordId = row.recordId; this.weight = row.weight; const actualValue = row.actualValue; - console.log(actualValue); if(actualValue !== null && actualValue !== '') { this.dynamicValidateForm.domains = []; let values = actualValue.split(","); From a4ee26c908d7a1ae0d3f93b68e544a47cb634abc Mon Sep 17 00:00:00 2001 From: shaoyong Date: Wed, 22 May 2024 11:39:58 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=9D=A5=E6=96=99=E6=A3=80=E9=AA=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../quality/qcIncome/checkProjectType.vue | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/views/quality/qcIncome/checkProjectType.vue b/src/views/quality/qcIncome/checkProjectType.vue index 4c30e48..9dfc5a9 100644 --- a/src/views/quality/qcIncome/checkProjectType.vue +++ b/src/views/quality/qcIncome/checkProjectType.vue @@ -13,22 +13,22 @@ - 合格 - 不合格 + 合格 + 不合格 - - + + - - + + - - + + - + @@ -223,8 +223,8 @@ export default { }, data:{}, form:{ - checkResult: '1', - startOA: 'N', + checkResult: 'Y', + startOA: '0', }, dynamicValidateForm: { domains: [{ @@ -334,8 +334,8 @@ export default { projectType: null, }; this.resetForm("form"); - this.form.checkResult = '1'; - this.form.startOA = 'N'; + this.form.checkResult = 'Y'; + this.form.startOA = '0'; }, /** 重置按钮操作 */