feat:角色 role 的实现 50%(crud + export 功能)
This commit is contained in:
@@ -118,7 +118,7 @@ export function useGridColumns<T = SystemPostApi.SystemPost>(
|
||||
props: { type: DICT_TYPE.COMMON_STATUS },
|
||||
},
|
||||
field: 'status',
|
||||
title: '状态',
|
||||
title: '岗位状态',
|
||||
minWidth: 100,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ import { Plus, Download } from '@vben/icons';
|
||||
|
||||
import { useGridColumns, useGridFormSchema } from './data';
|
||||
import Form from './modules/form.vue';
|
||||
import {downloadByData} from '#/utils/download';
|
||||
import { downloadByData } from '#/utils/download';
|
||||
|
||||
const [FormModal, formModalApi] = useVbenModal({
|
||||
connectedComponent: Form,
|
||||
@@ -45,7 +45,7 @@ async function onDelete(row: SystemPostApi.SystemPost) {
|
||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
||||
key: 'action_process_msg',
|
||||
});
|
||||
refreshGrid();
|
||||
onRefresh();
|
||||
} catch (error) {
|
||||
hideLoading();
|
||||
}
|
||||
@@ -98,19 +98,19 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
});
|
||||
|
||||
/** 刷新表格 */
|
||||
function refreshGrid() {
|
||||
function onRefresh() {
|
||||
gridApi.query();
|
||||
}
|
||||
|
||||
/** 导出表格 */
|
||||
async function onExport() {
|
||||
const data = await exportPost(await gridApi.formApi.getValues());
|
||||
downloadByData(data, '导出岗位.xls');
|
||||
downloadByData(data, '岗位.xls');
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<Page auto-content-height>
|
||||
<FormModal @success="refreshGrid" />
|
||||
<FormModal @success="onRefresh" />
|
||||
<Grid table-title="岗位列表">
|
||||
<template #toolbar-tools>
|
||||
<Button type="primary" @click="onCreate">
|
||||
|
||||
Reference in New Issue
Block a user