Просмотр исходного кода

性能验证表单校验问题修复

cfort 1 год назад
Родитель
Сommit
376a2dfe05

+ 14 - 2
src/views/business/performance/components/param-info.vue

@@ -201,9 +201,9 @@
                             <el-select
                                 v-model="pageInfo.standard"
                                 filterable
-                                clearable
                                 :disabled="readonly"
                                 placeholder="请选择"
+                                @change="handleStandardChange"
                             >
                                 <el-option
                                     v-for="(item, index) in standardOption"
@@ -220,7 +220,7 @@
                                 v-model="pageInfo.tea"
                                 type="number"
                                 :min="0"
-                                :step="getAttrs('standard', 'step')"
+                                :step="getAttrs('tea', 'step')"
                                 :precision="2"
                                 :disabled="readonly"
                                 placeholder="请输入"
@@ -477,6 +477,18 @@ export default {
                 this.pageInfo.claimValue.splice(v)
             }
         },
+        handleStandardChange (v) {
+            const temp = {
+                tea: null,
+                batchCVS: null,
+                allowableSDl: [],
+                allowableSDr: []
+            }
+            this.pageInfo = {
+                ...this.pageInfo,
+                ...temp
+            }
+        },
         handleCvsChange () {
             const { batchCVS, dailyCVS, tea } = this.pageInfo
             this.pageInfo.batchCVSValue = parseFloat(tea * batchCVS)

+ 4 - 0
src/views/business/performance/components/reagent-info.vue

@@ -203,6 +203,9 @@ export default {
             } else {
                 indexList = index
             }
+            if (!indexList.length) {
+                return this.$message.warning('请选择要删除的试剂!')
+            }
             indexList.sort((a, b) => b - a)
             this.$confirm('确定要删除选中试剂吗?', '提示', {
                 confirmButtonText: '确定',
@@ -212,6 +215,7 @@ export default {
                 indexList.forEach(i => {
                     this.reagentData.splice(i, 1)
                 })
+                this.selectionIndex = []
             }).catch(() => {})
         },
         updates (params) {

+ 1 - 1
src/views/business/performance/experimental.vue

@@ -152,7 +152,7 @@ export default {
                 // { key: 'generate', icon: 'ibps-icon-cube', label: '生成报告', type: 'success', hidden: this.readonly },
                 { key: 'cancel', icon: 'el-icon-close', label: '关闭', type: 'danger' }
             ],
-            validateList: ['targetValue', 'allowableSDr', 'allowableSDl', 'claimValue']
+            validateList: ['specimensName', 'targetValue', 'allowableSDr', 'allowableSDl', 'claimValue']
         }
     },
     watch: {