From d77bd5a122ca72a8537bace6b2307bcececac04b Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期四, 24 七月 2025 12:12:44 +0800 Subject: [PATCH] 技术状态鉴定规范增加详情功能 --- src/views/eam/base/modules/EamTechnicalStatusEvaluationStandardModal.vue | 101 ++++++++++++++++++++++++++++++-------------------- 1 files changed, 60 insertions(+), 41 deletions(-) diff --git a/src/views/eam/base/modules/EamTechnicalStatusEvaluationStandardModal.vue b/src/views/eam/base/modules/EamTechnicalStatusEvaluationStandardModal.vue index bc37560..3e3b54a 100644 --- a/src/views/eam/base/modules/EamTechnicalStatusEvaluationStandardModal.vue +++ b/src/views/eam/base/modules/EamTechnicalStatusEvaluationStandardModal.vue @@ -1,65 +1,70 @@ <template> <j-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" switchFullscreen centered - @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴"> + @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"> <a-spin :spinning="spinning"> - <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-row> - <a-col :span="8"> - <a-form-model-item label="瑙勮寖缂栫爜"> - <a-input placeholder="瑙勮寖缂栫爜鑷姩鐢熸垚" v-model="model.standardCode" disabled/> - </a-form-model-item> - </a-col> + <j-form-container :disabled="disableSubmit"> + <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol" + slot="detail"> + <a-row> + <a-col :span="8"> + <a-form-model-item label="瑙勮寖缂栫爜"> + <a-input placeholder="瑙勮寖缂栫爜鑷姩鐢熸垚" v-model="model.standardCode" disabled/> + </a-form-model-item> + </a-col> - <a-col :span="8"> - <a-form-model-item prop="standardName" label="瑙勮寖鍚嶇О"> - <a-input placeholder="璇疯緭鍏ヨ鑼冨悕绉�" v-model="model.standardName"/> - </a-form-model-item> - </a-col> + <a-col :span="8"> + <a-form-model-item prop="standardName" label="瑙勮寖鍚嶇О"> + <a-input placeholder="璇疯緭鍏ヨ鑼冨悕绉�" v-model="model.standardName"/> + </a-form-model-item> + </a-col> - <a-col :span="8"> - <a-form-model-item prop="equipmentId" label="缁熶竴缂栫爜"> - <lx-search-equipment-select placeholder="璇疯緭鍏ョ粺涓�缂栫爜鎴栧悕绉版悳绱�" v-model="model.equipmentId" :disabled="!editable"/> - </a-form-model-item> - </a-col> - </a-row> + <a-col :span="8"> + <a-form-model-item prop="equipmentId" label="缁熶竴缂栫爜"> + <lx-search-equipment-select placeholder="璇疯緭鍏ョ粺涓�缂栫爜鎴栧悕绉版悳绱�" v-model="model.equipmentId" + :disabled="!editable"/> + </a-form-model-item> + </a-col> + </a-row> - <a-row> - <a-col :span="8" v-for="item in checkList" :key="item.key"> - <a-form-model-item :label="item.label"> - <j-dict-select-tag @change="handleCheckListChange($event,item.key)" dict-code="yn" type="radio" - :disabled="checkList.filter(i=>i.key!=item.key).every(i=>i.value=='0')" - v-model="model[item.key]"/> - </a-form-model-item> - </a-col> - </a-row> + <a-row> + <a-col :span="8" v-for="item in checkList" :key="item.key"> + <a-form-model-item :label="item.label"> + <j-dict-select-tag @change="handleCheckListChange($event,item.key)" dict-code="yn" type="radio" + v-model="model[item.key]"/> + </a-form-model-item> + </a-col> + </a-row> - <a-row> - <a-col :span="24"> - <a-form-model-item :labelCol="{span:2}" :wrapperCol="{span:21}" label="澶囨敞"> - <a-textarea placeholder="璇疯緭鍏ュ娉�" v-model="model.remark"/> - </a-form-model-item> - </a-col> - </a-row> - </a-form-model> + <a-row> + <a-col :span="24"> + <a-form-model-item :labelCol="{span:2}" :wrapperCol="{span:21}" label="澶囨敞"> + <a-textarea placeholder="璇疯緭鍏ュ娉�" v-model="model.remark"/> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </j-form-container> <a-tabs :activeKey="activeTabKey" @change="handleTabChange"> <a-tab-pane tab="瀹夊叏瑁呯疆妫�鏌�" :key="1" v-if="+model.hasSafetyEquipmentCheck"> <j-vxe-table ref="editableDetailTable1" rowNumber rowSelection bordered alwaysEdit toolbar - :toolbarConfig="detail.toolbarConfig" keep-source + :toolbarConfig="detail.toolbarConfig" keep-source :disabled="disableSubmit" :height="300" :dataSource="detail.safetyEquipmentCheckList" :columns="detail.columns"> </j-vxe-table> </a-tab-pane> <a-tab-pane tab="璁惧绮惧害妫�鏌�" :key="2" v-if="+model.hasPrecisionCheck" forceRender> <j-vxe-table ref="editableDetailTable2" rowNumber rowSelection bordered alwaysEdit toolbar - :toolbarConfig="detail.toolbarConfig" keep-source - :height="300" :dataSource="detail.precisionCheckList" :columns="detail.precisionCheckColumns"> + :toolbarConfig="detail.toolbarConfig" keep-source :disabled="disableSubmit" + :height="300" :dataSource="detail.precisionCheckList" + :columns="detail.precisionCheckColumns"> </j-vxe-table> </a-tab-pane> <a-tab-pane tab="鍏朵粬妫�鏌�" :key="3" v-if="+model.hasOtherCheck" forceRender> <j-vxe-table ref="editableDetailTable3" rowNumber rowSelection bordered alwaysEdit toolbar - :toolbarConfig="detail.toolbarConfig" keep-source + :toolbarConfig="detail.toolbarConfig" keep-source :disabled="disableSubmit" :height="300" :dataSource="detail.otherCheckList" :columns="detail.columns"> </j-vxe-table> </a-tab-pane> @@ -95,6 +100,7 @@ }, spinning: false, confirmLoading: false, + disableSubmit: false, editable: true, validatorRules: { standardName: [{ required: true, message: '璇疯緭鍏ヨ鑼冨悕绉�', trigger: 'change' }], @@ -123,6 +129,7 @@ order: 3 } ], + hasCheckedCheckList: [], activeTabKey: 1, upgradeFlag: false, detail: { @@ -241,7 +248,6 @@ */ edit(record, upgradeFlag = false) { this.upgradeFlag = upgradeFlag - console.log('upgradeFlag', this.upgradeFlag) this.detail.safetyEquipmentCheckList = this.detail.precisionCheckList = this.detail.otherCheckList = [] this.model = Object.assign({}, record) this.hasCheckedCheckList = [] @@ -270,6 +276,10 @@ } }, + /** + * 鑾峰彇妫�鏌ユ槑缁� + * @param standardId 瑙勮寖缂栧彿 + */ loadDetail(standardId) { this.spinning = true getAction(this.url.detail, { standardId }) @@ -298,6 +308,15 @@ }, async handleOk() { + console.log('tis', this.hasCheckedCheckList) + if (this.hasCheckedCheckList.findIndex(item => item.value === '1') < 0) { + this.$notification.warning({ + message: '娑堟伅', + description: '鑷冲皯閫夋嫨涓�椤规鏌�' + }) + return + } + // 鍏堟牎楠屽綋鍓峵ab涓嬬殑琛ㄦ牸 let errMap = await this.$refs['editableDetailTable' + this.activeTabKey].validateTable() if (errMap) return false -- Gitblit v1.9.3