From ec4d16c8a630960a4671a60f4d1957fd3de9def3 Mon Sep 17 00:00:00 2001 From: zhuguifei <zhuguifei@zhuguifeideiMac.local> Date: 星期四, 27 二月 2025 16:53:59 +0800 Subject: [PATCH] 完成维修工单查看维修记录子表 --- eims-ui/apps/web-antd/src/views/eims/repair-res/index.vue | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/eims-ui/apps/web-antd/src/views/eims/repair-res/index.vue b/eims-ui/apps/web-antd/src/views/eims/repair-res/index.vue index d4f5852..3b24afa 100644 --- a/eims-ui/apps/web-antd/src/views/eims/repair-res/index.vue +++ b/eims-ui/apps/web-antd/src/views/eims/repair-res/index.vue @@ -1,10 +1,11 @@ <script setup lang="ts"> import type { Recordable } from '@vben/types'; -import { onMounted } from 'vue'; +import { onMounted, ref } from 'vue'; import { Page, useVbenDrawer, type VbenFormProps } from '@vben/common-ui'; import { $t } from '@vben/locales'; +import { useUserStore } from '@vben/stores'; import { addFullName, getPopupContainer, getVxePopupContainer } from '@vben/utils'; import { Modal, Popconfirm, Space } from 'ant-design-vue'; @@ -14,9 +15,9 @@ import { getDeptTree, userList } from '#/api/system/user'; import { commonDownloadExcel } from '#/utils/file/download'; +import RepairRecord from '../repair-record/index.vue'; import { columns, querySchema } from './data'; import repairResDrawer from './repair-res-drawer.vue'; -import { useUserStore } from '@vben/stores'; const userStore = useUserStore(); const userId = userStore.userInfo?.userId; @@ -74,11 +75,16 @@ id: 'eims-repair-res-index' }; +const resId = ref<string>(); const [BasicTable, tableApi] = useVbenVxeGrid({ formOptions, gridOptions, gridEvents: { - sortChange: (sortParams) => vxeSortEvent(tableApi, sortParams) + sortChange: (sortParams) => vxeSortEvent(tableApi, sortParams), + cellClick: (e: any) => { + const { row } = e; + resId.value = row.id; + } } }); @@ -195,8 +201,8 @@ <template> <Page :auto-content-height="true"> - <div class="flex h-full gap-[8px]"> - <BasicTable class="flex-1 overflow-hidden" table-title="缁翠慨宸ュ崟鍒楄〃"> + <div class="flex h-full gap-[8px] flex-col"> + <BasicTable class="h-2/3" table-title="缁翠慨宸ュ崟鍒楄〃"> <template #toolbar-tools> <Space> <a-button v-access:code="['eims:repairRes:export']" @click="handleDownloadExcel"> @@ -230,6 +236,7 @@ </Space> </template> </BasicTable> + <RepairRecord :res-id="resId" class="h-1/3" table-title="缁翠慨璁板綍" /> </div> <RepairResDrawer @reload="tableApi.query()" /> </Page> -- Gitblit v1.9.3