From a261a43492fa9c4bdf054e1bdd503069dadac2d4 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期四, 24 七月 2025 15:12:40 +0800 Subject: [PATCH] 设备台账详情增加各工单标签页以及跳转对应页面功能 --- src/views/eam/equipment/modules/EamEquipmentModal.vue | 82 ++++++++++++++++++++++++++++++++--------- 1 files changed, 64 insertions(+), 18 deletions(-) diff --git a/src/views/eam/equipment/modules/EamEquipmentModal.vue b/src/views/eam/equipment/modules/EamEquipmentModal.vue index 6609f5a..456c389 100644 --- a/src/views/eam/equipment/modules/EamEquipmentModal.vue +++ b/src/views/eam/equipment/modules/EamEquipmentModal.vue @@ -1,15 +1,8 @@ <template> - <j-modal - :title="title" - fullscreen - :visible="visible" - centered - :confirmLoading="confirmLoading" - :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" - @ok="handleOk" - @cancel="handleCancel" - cancelText="鍏抽棴"> - <a-tabs tab-position="left"> + <j-modal :title="title" fullscreen :visible="visible" centered :confirmLoading="confirmLoading" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" @ok="handleOk" @cancel="handleCancel" + cancelText="鍏抽棴"> + <a-tabs tab-position="left" @change="handleTabChange"> <a-tab-pane tab="鍩虹淇℃伅" :key="1"> <a-spin :spinning="confirmLoading"> <j-form-container :disabled="disableSubmit"> @@ -277,22 +270,46 @@ </a-tab-pane> <template v-if="disableSubmit"> - <a-tab-pane tab="璁惧鏂囨。" :key="2"> + <a-tab-pane tab="鐐规宸ュ崟" :key="2" forceRender> + <a-button type="primary" @click="navigateToPage('/eam/maintenance/EamInspectionOrderList')" icon="right" + style="margin-left: 24px">璺宠浆鑷冲搴旈〉闈� + </a-button> + <eam-inspection-order-list ref="tabPane2" :isDisplayOperation="false"/> </a-tab-pane> - <a-tab-pane tab="鐐规宸ュ崟" :key="3"> + <a-tab-pane tab="浜屼繚宸ュ崟" :key="3" forceRender> + <a-button type="primary" @click="navigateToPage('/eam/maintenance/EamSecondMaintenanceOrderList')" icon="right" + style="margin-left: 24px">璺宠浆鑷冲搴旈〉闈� + </a-button> + <eam-second-maintenance-order-list ref="tabPane3" :isDisplayOperation="false"/> </a-tab-pane> - <a-tab-pane tab="浜屼繚宸ュ崟" :key="4"> + <a-tab-pane tab="涓変繚宸ュ崟" :key="4" forceRender> + <a-button type="primary" @click="navigateToPage('/eam/maintenance/EamThirdMaintenanceOrderList')" icon="right" + style="margin-left: 24px">璺宠浆鑷冲搴旈〉闈� + </a-button> + <eam-third-maintenance-order-list ref="tabPane4" :isDisplayOperation="false"/> </a-tab-pane> - <a-tab-pane tab="涓変繚宸ュ崟" :key="5"> + <a-tab-pane tab="缁翠慨宸ュ崟" :key="5" forceRender> + <a-button type="primary" @click="navigateToPage('/eam/repair/EamRepairOrderList')" icon="right" + style="margin-left: 24px">璺宠浆鑷冲搴旈〉闈� + </a-button> + <eam-repair-order-list ref="tabPane5" :isDisplayOperation="false"/> </a-tab-pane> - <a-tab-pane tab="缁翠慨宸ュ崟" :key="6"> + <a-tab-pane tab="淇濆吇瑙勮寖" :key="6" forceRender> + <a-button type="primary" @click="navigateToPage('/eam/base/EamMaintenanceStandardList')" icon="right" + style="margin-left: 24px">璺宠浆鑷冲搴旈〉闈� + </a-button> + <eam-maintenance-standard-list ref="tabPane6" :isDisplayOperation="false"/> </a-tab-pane> - <a-tab-pane tab="淇濆吇鏍囧噯" :key="7"> + <a-tab-pane tab="鎶�鏈姸鎬侀壌瀹氬伐鍗�" :key="7" forceRender> + <a-button type="primary" @click="navigateToPage('/eam/technical/order')" icon="right" + style="margin-left: 24px">璺宠浆鑷冲搴旈〉闈� + </a-button> + <eam-technical-status-evaluation-order-list ref="tabPane7" :isDisplayOperation="false"/> </a-tab-pane> </template> </a-tabs> @@ -302,9 +319,23 @@ <script> import { getAction, httpAction } from '@/api/manage' import { validateDuplicateValueInDelFlag } from '@/utils/util' + import EamInspectionOrderList from '../../maintenance/EamInspectionOrderList' + import EamSecondMaintenanceOrderList from '../../maintenance/EamSecondMaintenanceOrderList' + import EamThirdMaintenanceOrderList from '../../maintenance/EamThirdMaintenanceOrderList' + import EamRepairOrderList from '../../repair/EamRepairOrderList' + import EamMaintenanceStandardList from '../../base/EamMaintenanceStandardList' + import EamTechnicalStatusEvaluationOrderList from '../../technical/EamTechnicalStatusEvaluationOrderList' export default { name: 'EamEquipmentModal', + components: { + EamTechnicalStatusEvaluationOrderList, + EamMaintenanceStandardList, + EamRepairOrderList, + EamThirdMaintenanceOrderList, + EamSecondMaintenanceOrderList, + EamInspectionOrderList + }, props: { productionTreeData: { type: Array @@ -388,7 +419,18 @@ * @param key 鍗曢�夋鍏宠仈瀛楁 */ handleRadioChange(value, key) { - if (value == '0') delete this.model[key] + if (value === '0') delete this.model[key] + }, + + /** + * 鏍囩鏍忓彂鐢熸敼鍙樻椂瑙﹀彂 + * @param tabKey 鍒囨崲鍚庣殑tabKey + */ + handleTabChange(tabKey) { + if (tabKey !== 1 && this.$refs['tabPane' + tabKey]) { + this.$refs['tabPane' + tabKey].queryParam.equipmentId = this.model.id + this.$refs['tabPane' + tabKey].loadData(1) + } }, handleOk() { @@ -431,6 +473,10 @@ }) }, + navigateToPage(href) { + this.$router.push(href) + }, + handleCancel() { this.close() }, -- Gitblit v1.9.3