2025-07-21 20:41:47 +08:00
|
|
|
<script setup lang="ts">
|
2025-07-22 18:55:04 +08:00
|
|
|
import {Page, useVbenModal, type VbenFormProps} from '@vben/common-ui';
|
|
|
|
import {Space} from 'ant-design-vue';
|
|
|
|
import {
|
|
|
|
useVbenVxeGrid,
|
|
|
|
type VxeGridProps
|
|
|
|
} from '#/adapter/vxe-table';
|
|
|
|
import {
|
|
|
|
workOrdersList,
|
|
|
|
} from '#/api/property/businessManagement/workOrders';
|
|
|
|
import workOrdersDetail from './work-orders-detail.vue';
|
|
|
|
import {columns, querySchema} from './data';
|
2025-07-21 20:41:47 +08:00
|
|
|
|
2025-07-22 18:55:04 +08:00
|
|
|
const formOptions: VbenFormProps = {
|
|
|
|
commonConfig: {
|
|
|
|
labelWidth: 80,
|
|
|
|
componentProps: {
|
|
|
|
allowClear: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
schema: querySchema(),
|
|
|
|
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
|
|
|
};
|
|
|
|
|
|
|
|
const gridOptions: VxeGridProps = {
|
|
|
|
checkboxConfig: {
|
|
|
|
// 高亮
|
|
|
|
highlight: true,
|
|
|
|
// 翻页时保留选中状态
|
|
|
|
reserve: true,
|
|
|
|
// 点击行选中
|
|
|
|
// trigger: 'row',
|
|
|
|
},
|
|
|
|
columns,
|
|
|
|
height: 'auto',
|
|
|
|
keepSource: true,
|
|
|
|
pagerConfig: {},
|
|
|
|
proxyConfig: {
|
|
|
|
ajax: {
|
|
|
|
query: async ({page}, formValues = {}) => {
|
|
|
|
return await workOrdersList({
|
|
|
|
pageNum: page.currentPage,
|
|
|
|
pageSize: page.pageSize,
|
|
|
|
status:'0',
|
|
|
|
...formValues,
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
rowConfig: {
|
|
|
|
keyField: 'id',
|
|
|
|
},
|
|
|
|
// 表格全局唯一表示 保存列配置需要用到
|
|
|
|
id: 'property-workOrders-index'
|
|
|
|
};
|
|
|
|
|
|
|
|
const [BasicTable, tableApi] = useVbenVxeGrid({
|
|
|
|
formOptions,
|
|
|
|
gridOptions,
|
|
|
|
});
|
|
|
|
|
|
|
|
const [WorkOrdersDetail, detailApi] = useVbenModal({
|
|
|
|
connectedComponent: workOrdersDetail,
|
|
|
|
});
|
|
|
|
|
|
|
|
function handleInfo(row:any) {
|
|
|
|
detailApi.setData({id:row.id});
|
|
|
|
detailApi.open();
|
|
|
|
}
|
2025-07-21 20:41:47 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2025-07-22 18:55:04 +08:00
|
|
|
<Page :auto-content-height="true">
|
|
|
|
<BasicTable table-title="工单待办列表" class="order-work-left-radio">
|
|
|
|
<template #action="{ row }">
|
|
|
|
<Space>
|
|
|
|
<ghost-button
|
|
|
|
v-access:code="['property:workOrders:info']"
|
|
|
|
@click.stop="handleInfo(row)"
|
|
|
|
>
|
|
|
|
{{ $t('pages.common.info') }}
|
|
|
|
</ghost-button>
|
|
|
|
</Space>
|
|
|
|
</template>
|
|
|
|
</BasicTable>
|
|
|
|
<WorkOrdersDetail/>
|
|
|
|
</Page>
|
2025-07-21 20:41:47 +08:00
|
|
|
</template>
|
|
|
|
|
2025-07-22 18:55:04 +08:00
|
|
|
<style lang="scss" scoped>
|
2025-07-21 20:41:47 +08:00
|
|
|
</style>
|
2025-07-22 18:55:04 +08:00
|
|
|
|