From 9d783b455d6d704281ca2743ae45113e23422aad Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期四, 31 七月 2025 09:23:17 +0800 Subject: [PATCH] 升版导入 --- src/views/eam/base/modules/EamTechnicalStatusEvaluationStandardModal.vue | 139 +++++++++++++++++++++------------------------- 1 files changed, 63 insertions(+), 76 deletions(-) diff --git a/src/views/eam/base/modules/EamTechnicalStatusEvaluationStandardModal.vue b/src/views/eam/base/modules/EamTechnicalStatusEvaluationStandardModal.vue index b7ce926..3e3b54a 100644 --- a/src/views/eam/base/modules/EamTechnicalStatusEvaluationStandardModal.vue +++ b/src/views/eam/base/modules/EamTechnicalStatusEvaluationStandardModal.vue @@ -1,97 +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">--> -<!-- <a-form-model-item label="閴村畾鍛ㄦ湡(骞�)">--> -<!-- <a-input-number v-model="model.evaluationPeriod" :min="1" placeholder="璇疯緭鍏ラ壌瀹氬懆鏈�(骞�)" style="width: 100%"/>--> -<!-- </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="8">--> - <!--<a-form-model-item label="瀹夊叏瑁呯疆妫�鏌�">--> - <!--<j-dict-select-tag @change="handleCheckListChange($event,1)" dict-code="yn " type="radio"--> - <!--:disabled="model.hasPrecisionCheck=='0'&&model.hasOtherCheck=='0'"--> - <!--v-model="model.hasSafetyEquipmentCheck"/>--> - <!--</a-form-model-item>--> - <!--</a-col>--> - - <!--<a-col :span="8">--> - <!--<a-form-model-item label="璁惧绮惧害妫�鏌�">--> - <!--<j-dict-select-tag @change="handleCheckListChange($event,2)" dict-code="yn " type="radio"--> - <!--:disabled="model.hasSafetyEquipmentCheck=='0'&&model.hasOtherCheck=='0'"--> - <!--v-model="model.hasPrecisionCheck"/>--> - <!--</a-form-model-item>--> - <!--</a-col>--> - - <!--<a-col :span="8">--> - <!--<a-form-model-item label="鍏朵粬妫�鏌�">--> - <!--<j-dict-select-tag @change="handleCheckListChange($event,3)" dict-code="yn " type="radio"--> - <!--:disabled="model.hasPrecisionCheck=='0'&&model.hasSafetyEquipmentCheck=='0'"--> - <!--v-model="model.hasOtherCheck"/>--> - <!--</a-form-model-item>--> - <!--</a-col>--> - - <a-col :span="8" v-for="item in checkList"> - <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="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> @@ -127,6 +100,7 @@ }, spinning: false, confirmLoading: false, + disableSubmit: false, editable: true, validatorRules: { standardName: [{ required: true, message: '璇疯緭鍏ヨ鑼冨悕绉�', trigger: 'change' }], @@ -155,6 +129,7 @@ order: 3 } ], + hasCheckedCheckList: [], activeTabKey: 1, upgradeFlag: false, detail: { @@ -213,7 +188,7 @@ width: 150, validateRules: [ { required: true, message: '璇疯緭鍏�${title}' }, - { unique: true, message: '${title}涓嶈兘閲嶅' } + { unique: false, message: '${title}涓嶈兘閲嶅' } ] }, { @@ -230,7 +205,7 @@ placeholder: '璇疯緭鍏�${title}', type: JVXETypes.textarea, align: 'center', - validateRules: [{ required: true, message: '璇疯緭鍏�${title}' }] + validateRules: [{ required: false, message: '璇疯緭鍏�${title}' }] }, { title: '鍏佸樊鍊�', @@ -273,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 = [] @@ -302,6 +276,10 @@ } }, + /** + * 鑾峰彇妫�鏌ユ槑缁� + * @param standardId 瑙勮寖缂栧彿 + */ loadDetail(standardId) { this.spinning = true getAction(this.url.detail, { standardId }) @@ -330,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 @@ -342,7 +329,7 @@ if (tableData.length == 0) { this.$notification.warning({ message: '娑堟伅', - description: hasCheckedCheckList[index].label + '蹇呭~椤逛笉鑳戒负绌�' + description: hasCheckedCheckList[index].label + '涓嶈兘涓虹┖' }) return } -- Gitblit v1.9.3