From 3a8223b71d18205d40b894fd0b4c0fa1ca773e86 Mon Sep 17 00:00:00 2001 From: Lius <Lius2225@163.com> Date: 星期一, 13 十一月 2023 10:44:11 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/mdc-test' into mdc-test --- src/views/eam/modules/inspectionProject/InspectionProjectModel.vue | 105 +++++++++++++++++++++++++++++----------------------- 1 files changed, 59 insertions(+), 46 deletions(-) diff --git a/src/views/eam/modules/inspectionProject/InspectionProjectModel.vue b/src/views/eam/modules/inspectionProject/InspectionProjectModel.vue index 1f3d2c8..b78c688 100644 --- a/src/views/eam/modules/inspectionProject/InspectionProjectModel.vue +++ b/src/views/eam/modules/inspectionProject/InspectionProjectModel.vue @@ -29,7 +29,7 @@ /> </a-form-item> </a-col> - </a-row> + <!-- </a-row> <a-row :gutter="24"> <a-col :span="12"> <a-form-item @@ -39,12 +39,12 @@ > <a-input allow-clear - :disabled="codeDisable" + :disabled="disableSubmit" :placeholder="disableSubmit?'':'璇疯緭鍏ョ偣妫�椤圭洰缂栧彿'" v-decorator="['num', validatorRules.num ]" /> </a-form-item> - </a-col> + </a-col> --> <a-col :span="12"> <a-form-item label="鐐规椤圭洰鍚嶇О" @@ -61,22 +61,7 @@ </a-col> </a-row> <a-row :gutter="24"> - <a-col :span="12"> - <a-form-item - label="璁¢噺鍗曚綅" - :labelCol="labelCol" - :wrapperCol="wrapperCol" - > - <j-dict-select-tag - allow-clear - :disabled="disableSubmit" - :placeholder="disableSubmit?'':'璇烽�夋嫨璁¢噺鍗曚綅'" - :triggerChange="true" - dictCode="mom_base_unit,name,id,status!='0' and del_flag!='1'" - v-decorator="['unitId', validatorRules.unitId]" - /> - </a-form-item> - </a-col> + <a-col :span="12"> <a-form-item label="妫�楠屽�肩被鍨�" @@ -91,6 +76,23 @@ dictCode="test_value_type" v-decorator="['testValueType', validatorRules.testValueType]" @change="(e)=>handleChange(e)" + /> + </a-form-item> + </a-col> + <a-col + v-if="testValueType == '2'" + :span="12" + > + <a-form-item + label="妫�娴嬫爣鍑�" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + > + <a-input + allow-clear + :disabled="disableSubmit" + :placeholder="disableSubmit?'':'璇疯緭鍏ユ娴嬫爣鍑�'" + v-decorator="['detectionStandard', validatorRules.detectionStandard ]" /> </a-form-item> </a-col> @@ -113,25 +115,9 @@ /> </a-form-item> </a-col> --> + <a-col - v-if="analysisMethod == '2'" - :span="12" - > - <a-form-item - label="寰呭畾" - :labelCol="labelCol" - :wrapperCol="wrapperCol" - > - <a-input - allow-clear - :disabled="disableSubmit" - :placeholder="disableSubmit?'':'璇疯緭鍏ュ緟瀹氬��'" - v-decorator="['surfaceValue1', validatorRules.surfaceValue1 ]" - /> - </a-form-item> - </a-col> - <a-col - v-if="analysisMethod == '1'" + v-if="testValueType == '1'" :span="12" > <a-form-item @@ -150,7 +136,7 @@ </a-col> </a-row> <a-row - v-if="analysisMethod == '1'" + v-if="testValueType == '1'" :gutter="24" > <a-col :span="12"> @@ -203,6 +189,22 @@ </a-col> <a-col :span="12"> <a-form-item + label="璁¢噺鍗曚綅" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + > + <j-dict-select-tag + allow-clear + :disabled="disableSubmit" + :placeholder="disableSubmit?'':'璇烽�夋嫨璁¢噺鍗曚綅'" + :triggerChange="true" + dictCode="mom_base_unit,name,id,status!='0' and del_flag!='1'" + v-decorator="['unitId', validatorRules.unitId]" + /> + </a-form-item> + </a-col> + <!-- <a-col :span="12"> + <a-form-item label="鐐规宸ュ叿" :labelCol="labelCol" :wrapperCol="wrapperCol" @@ -214,7 +216,7 @@ v-decorator="['inspectionTool', validatorRules.inspectionTool ]" /> </a-form-item> - </a-col> + </a-col> --> </a-row> <a-row :gutter="24"> @@ -277,7 +279,7 @@ codeDisable: true, disableSubmit: false, inspectionProjectCategoryId: '', - analysisMethod: null, + testValueType: null, model: {}, labelCol: { xs: { span: 24 }, @@ -304,9 +306,15 @@ { validator: this.validateName }, ] }, - analysisMethod: { + // analysisMethod: { + // rules: [ + // { required: true, message: '璇烽�夋嫨鍒嗘瀽鏂规硶!' }, + // ] + // }, + detectionStandard: { rules: [ - { required: true, message: '璇烽�夋嫨鍒嗘瀽鏂规硶!' }, + { required: true, message: '璇疯緭鍏ユ娴嬫爣鍑�!' }, + // { validator: this.validateSurfaceValue }, ] }, surfaceValue: { @@ -353,12 +361,12 @@ this.model = Object.assign({}, record); this.visible = true; this.disableSubmit = false; - this.analysisMethod = record.analysisMethod + this.testValueType = record.testValueType this.$nextTick(() => { this.form.setFieldsValue(pick(this.model, 'inspectionProjectCategoryNumName', - 'num', 'name', 'unitId', 'testValueType', 'analysisMethod', 'inspectionMethod', 'inspectionTool', 'remark')) + 'num', 'name', 'unitId', 'detectionStandard', 'testValueType', 'inspectionMethod', 'inspectionTool', 'remark')) }); - if (record.analysisMethod == '1') { + if (record.testValueType == '1') { this.$nextTick(() => { this.form.setFieldsValue(pick(this.model, 'surfaceValue', 'upValue', 'downValue')) }); @@ -366,7 +374,12 @@ if (record.id) { this.codeDisable = true; } else { + debugger this.codeDisable = false; + this.$nextTick(() => { + this.form.setFieldsValue({ "testValueType": '2' }) + this.testValueType = '2' + }); } }, @@ -440,7 +453,7 @@ }, handleChange(val) { - this.analysisMethod = val + this.testValueType = val }, validateDownValue(rule, value, callback) { -- Gitblit v1.9.3