| | |
| | | <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'; |
| | |
| | | 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; |
| | |
| | | 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; |
| | | } |
| | | } |
| | | }); |
| | | |
| | |
| | | |
| | | <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"> |
| | |
| | | </Space> |
| | | </template> |
| | | </BasicTable> |
| | | <RepairRecord :res-id="resId" class="h-1/3" table-title="维修记录" /> |
| | | </div> |
| | | <RepairResDrawer @reload="tableApi.query()" /> |
| | | </Page> |