| | |
| | | |
| | | 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 { columns, querySchema } from './data'; |
| | | import repairReqDrawer from './repair-req-drawer.vue'; |
| | | import { useUserStore } from '@vben/stores'; |
| | | |
| | | |
| | | interface Props { |
| | | filterFlag?: boolean; |
| | | status?: string; |
| | | } |
| | | const props = withDefaults(defineProps<Props>(), { filterFlag: false, status: undefined }); |
| | | |
| | | |
| | | const userStore = useUserStore(); |
| | | const userId = userStore.userInfo?.userId; |
| | | const deptId = userStore.userInfo?.deptId; |
| | | |
| | | defineExpose({ |
| | | tableSelect |
| | | }); |
| | | |
| | | |
| | | const formOptions: VbenFormProps = { |
| | | commonConfig: { |
| | |
| | | // 点击行选中 |
| | | // trigger: 'row' |
| | | }, |
| | | columns, |
| | | columns: columns?.filter((item) => (props.filterFlag ? item.field !== 'action' : item.field !== '-1')), |
| | | height: 'auto', |
| | | keepSource: true, |
| | | pagerConfig: {}, |
| | | toolbarConfig: { |
| | | enabled: !props.filterFlag |
| | | }, |
| | | proxyConfig: { |
| | | ajax: { |
| | | query: async ({ page }, formValues = {}) => { |
| | | // 如果传入了equId则只查询当前id数据 |
| | | if (props.filterFlag && props.status) { |
| | | const params = { status: props.status }; |
| | | Object.assign(formValues, params); |
| | | } |
| | | return await listRepairReq({ |
| | | pageNum: page.currentPage, |
| | | pageSize: page.pageSize, |
| | |
| | | } |
| | | ]); |
| | | } |
| | | // 选中数据 |
| | | function tableSelect() { |
| | | return tableApi.grid.getCheckboxRecords(); |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | <Page :auto-content-height="true"> |
| | | <div class="flex h-full gap-[8px]"> |
| | | <BasicTable class="flex-1 overflow-hidden" table-title="设备盘点列表"> |
| | | <BasicTable class="flex-1 overflow-hidden" table-title="故障报修列表"> |
| | | <template #toolbar-tools> |
| | | <Space> |
| | | <a-button v-access:code="['eims:repairReq:export']" @click="handleDownloadExcel"> |