From 41cad2434411b2eac1b9814d47d06e34c291f285 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期五, 29 三月 2024 16:29:40 +0800
Subject: [PATCH] 完成首页等问题修改

---
 src/views/quality/teststandard/standard-form.vue |   39 +++++++++++++++++++++++++--------------
 1 files changed, 25 insertions(+), 14 deletions(-)

diff --git a/src/views/quality/teststandard/standard-form.vue b/src/views/quality/teststandard/standard-form.vue
index 6e9dfa2..45b2db6 100644
--- a/src/views/quality/teststandard/standard-form.vue
+++ b/src/views/quality/teststandard/standard-form.vue
@@ -32,7 +32,7 @@
           </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="宸ュ簭" prop="operationName">
+      <!-- <el-form-item label="宸ュ簭" prop="operationName">
         <el-input v-model="dataForm.operationName" placeholder="璇烽�夋嫨宸ュ簭">
           <el-button
             slot="append"
@@ -40,7 +40,7 @@
             @click="openOperationDialog()"
           ></el-button>
         </el-input>
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item label="澶囨敞" prop="remark">
         <el-input v-model="dataForm.remark" placeholder=""></el-input>
       </el-form-item>
@@ -155,6 +155,23 @@
     ZttMonacoEditor,
     operationDialog
   },
+  watch:{
+    visible(newVal){
+      if(!newVal){
+        this.dataForm = {
+          id: 0,
+          standardName: '',
+          standardNo: '',
+          remark: '',
+          judgeFormula: '',
+          inspectionType: null,
+          operationId: null,
+          operationNo: null,
+          operationName: null,
+        }
+      }
+    }
+  },
   created() {
     this.funcs = funcForStandard()
     this.constants = constantForStandard()
@@ -194,20 +211,8 @@
       this.visible = true
       this.$nextTick(() => {
         this.$refs.dataForm.resetFields()
-        this.dataForm = {
-          id: 0,
-          standardName: '',
-          standardNo: '',
-          remark: '',
-          judgeFormula: '',
-          inspectionType: null,
-          operationId: null,
-          operationNo: null,
-          operationName: null,
-        }
         if (this.dataForm.id) {
           getTestStandard(this.dataForm.id).then((response) => {
-            console.log(response.data.data)
             this.dataForm = response.data.data
             // this.$refs.templateJudgmentCondition.setVal(
             //   this.dataForm.judgeFormula == null
@@ -257,6 +262,9 @@
               this.visible = false
               this.isSubmit = false
               this.$emit('refreshDataList')
+            }).catch(error=>{
+              console.error(error);
+              this.isSubmit = false
             })
           } else {
             addTestStandard(this.dataForm).then((data) => {
@@ -264,6 +272,9 @@
               this.visible = false
               this.isSubmit = false
               this.$emit('refreshDataList')
+            }).catch(error=>{
+              console.error(error);
+              this.isSubmit = false
             })
           }
         } else {

--
Gitblit v1.9.3