From 6d40892cb8f829f90d1bcae271092a7bfcc40836 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期一, 14 七月 2025 14:16:41 +0800 Subject: [PATCH] 取消鉴定工单审批提交代码注释 --- src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApprovalModal.vue | 689 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 689 insertions(+), 0 deletions(-) diff --git a/src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApprovalModal.vue b/src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApprovalModal.vue new file mode 100644 index 0000000..963c6bf --- /dev/null +++ b/src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApprovalModal.vue @@ -0,0 +1,689 @@ +<template> + <j-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" fullscreen @ok="handleOk" + @cancel="handleCancel" centered cancelText="鍏抽棴"> + <a-spin :spinning="spinning"> + <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-row :gutter="24"> + <a-col :span="8"> + <a-tabs> + <a-tab-pane tab="鍩虹淇℃伅"> + <a-row> + <a-col :span="12"> + <a-form-model-item label="宸ュ崟鍙�"> + <a-input v-model="model.orderNum" readOnly/> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="缁熶竴缂栫爜"> + <technical-status-equipment-select v-model="model.equipmentId" + @autocompleteForm="autocompleteForm" disabled/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="12"> + <a-form-model-item label="璁″垝閴村畾鏃ユ湡"> + <a-input v-model="model.evaluationDate" readOnly/> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="棰嗗彇浜�"> + <a-input v-model="model.evaluator_dictText" readOnly/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" label="澶囨敞"> + <a-textarea v-model="model.remark" readOnly/> + </a-form-model-item> + </a-row> + </a-tab-pane> + </a-tabs> + </a-col> + + <a-col :span="model.evaluationStatus&&model.evaluationStatus!='UNDER_EVALUATION'?10:16"> + + <a-tabs :active-key="activeTabKey" @change="handleTabChange"> + <a-tab-pane :key="1" tab="瀹夊叏瑁呯疆妫�鏌�" forceRender + v-if="selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey=='safety_equipment_check'||!Boolean(selectShenpiData.taskDefKey)"> + <j-vxe-table ref="editableDetailTable1" rowNumber bordered alwaysEdit keep-source :height="300" + :dataSource="detail.safetyEquipmentCheckList" + :columns="detail.safetyEquipmentCheckColumns"> + <template v-slot:safetyEquipmentCheckResult="props"> + <j-dict-select-tag v-model="props.row.safetyEquipmentCheckResult" :disabled="disableSubmit" + placeholder="璇烽�夋嫨妫�鏌ョ粨鏋�" + @change="$refs['editableDetailTable'+activeTabKey].validateTable()" + dictCode="yes_no_none" style="width: 100%"/> + </template> + </j-vxe-table> + + <a-tabs v-if="model.safetyCheckCompleted"> + <a-tab-pane tab="缁翠慨瀹や富浠荤‘璁�"> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="safetyCheckConfirmResult" :labelCol="labelColLong" + :wrapperCol="wrapperColLong" label="纭绫诲瀷"> + <j-dict-select-tag type='radio' v-model='model.safetyCheckConfirmResult' + dictCode='approved_rejected' + placeholder="璇烽�夋嫨纭绫诲瀷"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item prop="safetyCheckConfirmComment" :labelCol="labelColLong" + :wrapperCol="wrapperColLong" label="纭鎰忚"> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.safetyCheckConfirmComment"/> + </a-form-model-item> + </a-col> + </a-row> + </a-tab-pane> + </a-tabs> + </a-tab-pane> + + <a-tab-pane :key="2" tab="璁惧绮惧害妫�鏌�" forceRender + v-if="selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey=='equipment_precision_check'||!Boolean(selectShenpiData.taskDefKey)"> + <j-vxe-table ref="editableDetailTable2" rowNumber bordered + alwaysEdit keep-source :height="300" + :dataSource="detail.precisionCheckList" :columns="detail.precisionCheckColumns"> + <template v-slot:precisionCheckResult="props"> + <a-input-number v-model="props.row.precisionCheckResult" :disabled="disableSubmit" + @blur="$refs['editableDetailTable'+activeTabKey].validateTable()" + placeholder="璇疯緭鍏ユ鏌ョ粨鏋�" style="width: 100%"/> + </template> + </j-vxe-table> + + <a-tabs v-if="model.precisionCheckCompleted"> + <a-tab-pane tab="缁翠慨瀹や富浠荤‘璁�"> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="precisionCheckConfirmResult" :labelCol="labelColLong" + :wrapperCol="wrapperColLong" label="纭绫诲瀷"> + <j-dict-select-tag type='radio' v-model='model.precisionCheckConfirmResult' + dictCode='approved_rejected' + placeholder="璇烽�夋嫨纭绫诲瀷"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item prop="precisionCheckConfirmComment" :labelCol="labelColLong" + :wrapperCol="wrapperColLong" label="纭鎰忚"> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.precisionCheckConfirmComment"/> + </a-form-model-item> + </a-col> + </a-row> + </a-tab-pane> + </a-tabs> + </a-tab-pane> + + <a-tab-pane :key="3" tab="鍏朵粬妫�鏌�" forceRender + v-if="selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey=='other_check'||!Boolean(selectShenpiData.taskDefKey)"> + <j-vxe-table ref="editableDetailTable3" rowNumber bordered + alwaysEdit keep-source :height="300" + :dataSource="detail.otherCheckList" :columns="detail.otherCheckColumns"> + <template v-slot:otherCheckResult="props"> + <a-textarea v-model="props.row.otherCheckResult" :rows="1" :disabled="disableSubmit" + @blur="$refs['editableDetailTable'+activeTabKey].validateTable()" + placeholder="璇疯緭鍏ユ鏌ョ粨鏋�" + :autoSize="false"/> + </template> + </j-vxe-table> + + <a-tabs v-if="model.otherCheckCompleted"> + <a-tab-pane tab="缁翠慨瀹や富浠荤‘璁�"> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="otherCheckConfirmResult" :labelCol="labelColLong" + :wrapperCol="wrapperColLong" label="纭绫诲瀷"> + <j-dict-select-tag type='radio' v-model='model.otherCheckConfirmResult' + dictCode='approved_rejected' + placeholder="璇烽�夋嫨纭绫诲瀷"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item prop="otherCheckConfirmComment" :labelCol="labelColLong" + :wrapperCol="wrapperColLong" label="纭鎰忚"> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.otherCheckConfirmComment"/> + </a-form-model-item> + </a-col> + </a-row> + </a-tab-pane> + </a-tabs> + </a-tab-pane> + + <template v-if="selectShenpiData.procInstId"> + <a-tab-pane key='4' tab='娴佺▼鍥�'> + <img :src="imageSrc" alt="Fetched Image"/> + </a-tab-pane> + </template> + </a-tabs> + </a-col> + + <a-col :span="6" v-if="model.evaluationStatus&&model.evaluationStatus!='UNDER_EVALUATION'"> + <a-tabs> + <a-tab-pane tab="缁翠慨宸ョ‘璁�"> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="confirmDealType" label="瀹夊叏瑁呯疆鏄惁榻愬叏" :labelCol="rightColLabelCol" + :wrapperCol="rightColWrapperCol"> + <j-dict-select-tag type='radio' v-model='model.safetyEquipmentCheckResult' dictCode='yn' + :disabled="disableSubmit || inspectorConfirmDisable"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item prop="confirmDealType" label="璁惧鍔熻兘鏄惁榻愬叏" :labelCol="rightColLabelCol" + :wrapperCol="rightColWrapperCol"> + <j-dict-select-tag type='radio' v-model='model.precisionCheckResult' dictCode='yn' + placeholder="璇烽�夋嫨纭绫诲瀷" :disabled="disableSubmit || inspectorConfirmDisable"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item prop="confirmDealType" label="绮惧害鏄惁杈惧埌瑕佹眰" :labelCol="rightColLabelCol" + :wrapperCol="rightColWrapperCol"> + <j-dict-select-tag type='radio' v-model='model.functionalCheckResult' dictCode='yes_no_none' + placeholder="璇烽�夋嫨纭绫诲瀷" :disabled="disableSubmit || inspectorConfirmDisable"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item prop="confirmDealType" label="妫�鏌ユ槸鍚﹀悎鏍�" :labelCol="rightColLabelCol" + :wrapperCol="rightColWrapperCol"> + <j-dict-select-tag type='radio' v-model='model.otherCheckResult' dictCode='yes_no_none' + placeholder="璇烽�夋嫨纭绫诲瀷" :disabled="disableSubmit || inspectorConfirmDisable"/> + </a-form-model-item> + </a-col> + </a-row> + </a-tab-pane> + </a-tabs> + + <a-tabs> + <a-tab-pane tab="缁翠慨瀹や富浠荤‘璁�"> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="repairManagerSignatureResult" label="纭绫诲瀷" :labelCol="rightColLabelCol" + :wrapperCol="rightColWrapperCol"> + <j-dict-select-tag type='radio' v-model='model.repairManagerSignatureResult' + dictCode='approved_rejected' + placeholder="璇烽�夋嫨纭绫诲瀷" :disabled="disableSubmit || inspectorConfirmDisable"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item prop="repairManagerComment" label="纭鎰忚" :labelCol="rightColLabelCol" + :wrapperCol="rightColWrapperCol"> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.repairManagerComment" + :disabled="disableSubmit || completionDisable"/> + </a-form-model-item> + </a-col> + </a-row> + </a-tab-pane> + </a-tabs> + + <a-tabs> + <a-tab-pane tab="宸ヨ壓鍛樼‘璁�"> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="sampleCheckResult" label="璇曚欢妫�鏌ョ粨鏋�" :labelCol="rightColLabelCol" + :wrapperCol="rightColWrapperCol"> + <j-dict-select-tag type='radio' v-model='model.sampleCheckResult' dictCode='yn' + :disabled="disableSubmit || inspectorConfirmDisable"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item prop="processTechnicianComment" label="纭鎰忚" :labelCol="rightColLabelCol" + :wrapperCol="rightColWrapperCol"> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.processTechnicianComment" + :disabled="disableSubmit || completionDisable"/> + </a-form-model-item> + </a-col> + </a-row> + </a-tab-pane> + </a-tabs> + + <a-tabs> + <a-tab-pane tab="浣跨敤鍗曚綅鎶�鏈富绠$‘璁�"> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="departTechnicalLeaderSignatureResult" label="纭绫诲瀷" + :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol"> + <j-dict-select-tag type='radio' v-model='model.departTechnicalLeaderSignatureResult' + dictCode='approved_rejected' + :disabled="disableSubmit || inspectorConfirmDisable"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item prop="departTechnicalLeaderComment" label="纭鎰忚" :labelCol="rightColLabelCol" + :wrapperCol="rightColWrapperCol"> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.departTechnicalLeaderComment" + :disabled="disableSubmit || completionDisable"/> + </a-form-model-item> + </a-col> + </a-row> + </a-tab-pane> + </a-tabs> + + <a-tabs> + <a-tab-pane tab="璁惧妫�楠屽憳纭"> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="evaluationResult" label="閴村畾缁撴灉" :labelCol="rightColLabelCol" + :wrapperCol="rightColWrapperCol"> + <j-dict-select-tag type='radio' v-model='model.evaluationResult' + dictCode='equipment_technology_status' + placeholder="璇烽�夋嫨纭绫诲瀷" :disabled="disableSubmit || inspectorConfirmDisable"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item prop="evaluationReason" label="闄�/绂佺敤鍘熷洜" :labelCol="rightColLabelCol" + :wrapperCol="rightColWrapperCol"> + <j-select-multiple v-model='model.evaluationReason' + dictCode='technical_status_evaluation_result_reason' + placeholder="璇烽�夋嫨闄�/绂佺敤鍘熷洜"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item prop="inspectorComment" label="纭鎰忚" :labelCol="rightColLabelCol" + :wrapperCol="rightColWrapperCol"> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.inspectorComment" + :disabled="disableSubmit || completionDisable"/> + </a-form-model-item> + </a-col> + </a-row> + </a-tab-pane> + </a-tabs> + </a-col> + </a-row> + </a-form-model> + </a-spin> + </j-modal> +</template> + +<script> + import { downFile, getAction, httpAction } from '@/api/manage' + import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' + import { JVXETypes } from '@comp/jeecg/JVxeTable' + import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect' + import TechnicalStatusEquipmentSelect from '../../../eam/equipment/modules/TechnicalStatusEquipmentSelect' + + export default { + name: 'TechnicalStatusEvaluationApprovalModal', + mixins: [JVxeTableModelMixin], + components: { + TechnicalStatusEquipmentSelect, + MaintenanceEquipmentSelect + }, + props: { + selectShenpiData: { + type: Object + } + }, + data() { + return { + title: '鎿嶄綔', + visible: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 8 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 16 } + }, + labelColLong: { + xs: { span: 24 }, + sm: { span: 4 } + }, + wrapperColLong: { + xs: { span: 24 }, + sm: { span: 20 } + }, + rightColLabelCol: { + xs: { span: 24 }, + sm: { span: 9 } + }, + rightColWrapperCol: { + xs: { span: 24 }, + sm: { span: 15 } + }, + confirmLoading: false, + spinning: false, + imageSrc: null, + activeTabKey: 1, + validatorRules: { + confirmDealType: [ + { required: true, message: '璇烽�夋嫨閫氳繃鎴栭┏鍥�!' } + ], + confirmComment: [ + { required: true, message: '璇疯緭鍏ョ‘璁ゆ剰瑙�!' } + ], + leaderConfirmComment: [ + { required: true, message: '璇疯緭鍏ュ垵楠屾敹鎰忚!' } + ] + }, + url: { + queryById: '/eam/eamTechnicalStatusEvaluationOrder/queryById', + detail: '/eam/eamTechnicalStatusEvaluationOrderDetail/queryList', + approval: '/eam/eamTechnicalStatusEvaluationOrder/approval', + diagramView: '/assign/flow/diagramView' + }, + disableSubmit: false, + selectedRowKeys: [], + detail: { + safetyEquipmentCheckList: [], + precisionCheckList: [], + otherCheckList: [], + safetyEquipmentCheckColumns: [ + { + title: 'ID', + key: 'id', + type: JVXETypes.hidden + }, + { + title: 'standardId', + key: 'standardId', + type: JVXETypes.hidden + }, + { + title: '搴忓彿', + key: 'itemCode', + type: JVXETypes.normal, + align: 'center', + width: 60 + }, + { + title: '妫�鏌ラ」鐩�', + key: 'itemName', + type: JVXETypes.normal, + align: 'center' + }, + { + title: '妫�鏌ョ粨鏋�', + key: 'safetyEquipmentCheckResult', + type: JVXETypes.slot, + slotName: 'safetyEquipmentCheckResult', + validateRules: [{ handler: this.customValidate }], + align: 'center' + } + ], + precisionCheckColumns: [ + { + title: 'ID', + key: 'id', + type: JVXETypes.hidden + }, + { + title: 'standardId', + key: 'standardId', + type: JVXETypes.hidden + }, + { + title: '搴忓彿', + key: 'itemCode', + type: JVXETypes.normal, + align: 'center', + width: 60 + }, + { + title: '妫�鏌ラ」鐩�', + key: 'itemName', + type: JVXETypes.normal, + align: 'center' + }, + { + title: '妫�鏌ュ瓙椤圭洰', + key: 'subItemName', + type: JVXETypes.normal, + align: 'center' + }, + { + title: '鍏佸樊鍊�', + key: 'toleranceValue', + type: JVXETypes.normal, + align: 'center' + }, + { + title: '妫�鏌ョ粨鏋�', + key: 'precisionCheckResult', + type: JVXETypes.slot, + slotName: 'precisionCheckResult', + align: 'center', + validateRules: [{ handler: this.customValidate }] + } + ], + otherCheckColumns: [ + { + title: 'ID', + key: 'id', + type: JVXETypes.hidden + }, + { + title: 'standardId', + key: 'standardId', + type: JVXETypes.hidden + }, + { + title: '搴忓彿', + key: 'itemCode', + type: JVXETypes.normal, + align: 'center', + width: 60 + }, + { + title: '妫�鏌ラ」鐩�', + key: 'itemName', + type: JVXETypes.normal, + align: 'center' + }, + { + title: '妫�鏌ョ粨鏋�', + key: 'otherCheckResult', + type: JVXETypes.slot, + slotName: 'otherCheckResult', + align: 'center', + validateRules: [{ handler: this.customValidate }] + } + ] + } + } + }, + computed: { + confirmDisable: function() { + return ['WAIT_ADMIN_CONFIRM', 'WAIT_INSPECTOR_CONFIRM', 'COMPLETE'].includes(this.model.maintenanceStatus) + }, + inspectorConfirmDisable: function() { + return ['WAIT_INSPECTOR_CONFIRM', 'COMPLETE'].includes(this.model.maintenanceStatus) + }, + completionDisable: function() { + return ['COMPLETE'].includes(this.model.maintenanceStatus) + } + }, + methods: { + /** + * 涓婚〉闈㈢偣鍑绘墽琛屽鎵规椂瑙﹀彂 + * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 + */ + async handleDetail(record) { + this.initParams() + this.getFlowChartImageByApi(record) + let res = await getAction(this.url.queryById, { id: record.dataId }) + this.model = Object.assign({}, res.result) + this.model.dataId = record.dataId + this.model.taskId = record.id + this.model.userId = record.assignee + this.model.instanceId = record.procInstId + this.loadDetail(record.dataId) + }, + + /** + * 涓婚〉闈㈢偣鍑昏鎯呮椂瑙﹀彂 + * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 + */ + recordDetail(record) { + this.initParams() + this.model = Object.assign({}, record) + this.loadDetail(record.id) + }, + + /** + * 鑾峰彇娴佺▼鍥� + * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 + */ + getFlowChartImageByApi(record) { + const { processDefinitionId, processInstanceId, processDefinitionKey } = record + + downFile(this.url.diagramView, { + processDefinitionId, + processInstanceId, + TaskDefinitionKey: processDefinitionKey + }, 'get') + .then((res => { + this.imageSrc = window.URL.createObjectURL(new Blob([res])) + })) + .catch(err => { + this.$notification.error({ + message: '娑堟伅', + description: res.message + }) + }) + }, + + async handleOk() { + const that = this + + let errMap + if (that.$refs['editableDetailTable' + this.activeTabKey]) { + // 鏍¢獙褰撳墠tab琛ㄦ牸 + errMap = await that.$refs['editableDetailTable' + this.activeTabKey].validateTable() + } else { + // 褰撳墠tab涓嶆槸琛ㄦ牸鏃跺垯鏍¢獙鏈夎〃鏍肩殑 + for (let index = 1; index <= 3; index++) { + if (that.$refs['editableDetailTable' + index]) { + errMap = await that.$refs['editableDetailTable' + index].validateTable() + if (errMap) { + that.activeTabKey = index + that.$refs['editableDetailTable' + this.activeTabKey].clearValidate() + that.$notification.warning({ + message: '娑堟伅', + description: '妫�鏌ョ粨鏋滀笉鑳戒负绌�' + }) + break + } + } + } + } + if (errMap) return + + + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = that.spinning = true + for (let index = 1; index <= 3; index++) { + if (that.$refs['editableDetailTable' + index]) { + this.model.tableDetailList = that.$refs['editableDetailTable' + index].getTableData() + break + } + } + console.log('model', this.model.tableDetailList) + + httpAction(this.url.approval, this.model, 'put') + .then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.$emit('modalFormOk') + that.close() + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + .finally(() => { + that.confirmLoading = that.spinning = false + }) + } else { + return false + } + }) + }, + + autocompleteForm(selectObj) { + this.$set(this.model, 'standardName', selectObj.standardName) + this.$set(this.model, 'standardId', selectObj.id) + this.$set(this.model, 'equipmentId', selectObj.equipmentId) + }, + + //瑙勮寖閫夋嫨鍙樺寲 + loadDetail(orderId) { + getAction(this.url.detail, { orderId }) + .then(res => { + if (res.success) { + this.detail.safetyEquipmentCheckList = res.result.filter(item => item.checkCategory == 'SAFETY_EQUIPMENT_CHECK') + this.detail.precisionCheckList = res.result.filter(item => item.checkCategory == 'PRECISION_CHECK') + this.detail.otherCheckList = res.result.filter(item => item.checkCategory == 'OTHER_CHECK') + } + }) + .finally(() => { + this.spinning = false + }) + }, + + // 鍒濆鍖栨暟鎹� + initParams() { + this.model = {} + this.detail.safetyEquipmentCheckList = this.detail.precisionCheckList = this.detail.otherCheckList = [] + this.visible = true + this.spinning = true + this.$nextTick(() => { + for (let index = 1; index <= 3; index++) { + if (this.$refs['editableDetailTable' + index]) { + this.activeTabKey = index + return + } + } + }) + }, + + /** + * 妫�鏌ユ槑缁嗘爣绛惧垏鎹㈡椂瑙﹀彂 + * @param tabKey 鍒囨崲鍚庣殑tabKey + */ + handleTabChange(tabKey) { + if (this.$refs['editableDetailTable' + this.activeTabKey]) this.$refs['editableDetailTable' + this.activeTabKey].clearValidate() + this.activeTabKey = tabKey + }, + + /** + * 鑷畾涔夎〃鏍煎崟鍏冩牸鏍¢獙 + * @param cellValue 鍗曞厓鏍煎�� + * @param callback 缁撴灉鍥炶皟鍑芥暟 + */ + customValidate({ cellValue }, callback) { + if (cellValue) { + callback(true) + } else { + callback(false, '${title}涓嶈兘涓虹┖') + } + }, + + handleCancel() { + this.close() + }, + + close() { + this.$emit('close') + this.visible = false + this.$refs.form.clearValidate() + } + } + } +</script> + +<style scoped> + /deep/ .ant-select-dropdown-menu { + text-align: left; + } +</style> \ No newline at end of file -- Gitblit v1.9.3