fix: code review 修改
This commit is contained in:
@@ -29,12 +29,12 @@ function handleCreate() {
|
||||
}
|
||||
|
||||
/** 编辑流程分类 */
|
||||
function handleEdit(row: BpmCategoryApi.CategoryVO) {
|
||||
function handleEdit(row: BpmCategoryApi.Category) {
|
||||
formModalApi.setData(row).open();
|
||||
}
|
||||
|
||||
/** 删除流程分类 */
|
||||
async function handleDelete(row: BpmCategoryApi.CategoryVO) {
|
||||
async function handleDelete(row: BpmCategoryApi.Category) {
|
||||
const hideLoading = message.loading({
|
||||
content: $t('ui.actionMessage.deleting', [row.code]),
|
||||
key: 'action_key_msg',
|
||||
@@ -77,7 +77,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
refresh: { code: 'query' },
|
||||
search: true,
|
||||
},
|
||||
} as VxeTableGridOptions<BpmCategoryApi.CategoryVO>,
|
||||
} as VxeTableGridOptions<BpmCategoryApi.Category>,
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import { $t } from '#/locales';
|
||||
import { useFormSchema } from '../data';
|
||||
|
||||
const emit = defineEmits(['success']);
|
||||
const formData = ref<BpmCategoryApi.CategoryVO>();
|
||||
const formData = ref<BpmCategoryApi.Category>();
|
||||
const getTitle = computed(() => {
|
||||
return formData.value?.id
|
||||
? $t('ui.actionTitle.edit', ['流程分类'])
|
||||
@@ -39,7 +39,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||
}
|
||||
modalApi.lock();
|
||||
// 提交表单
|
||||
const data = (await formApi.getValues()) as BpmCategoryApi.CategoryVO;
|
||||
const data = (await formApi.getValues()) as BpmCategoryApi.Category;
|
||||
try {
|
||||
await (formData.value?.id ? updateCategory(data) : createCategory(data));
|
||||
// 关闭并提示
|
||||
@@ -56,7 +56,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||
return;
|
||||
}
|
||||
// 加载数据
|
||||
const data = modalApi.getData<BpmCategoryApi.CategoryVO>();
|
||||
const data = modalApi.getData<BpmCategoryApi.Category>();
|
||||
if (!data || !data.id) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import { getCategory, updateCategory } from '#/api/bpm/category';
|
||||
import { $t } from '#/locales';
|
||||
|
||||
const emit = defineEmits(['success']);
|
||||
const formData = ref<BpmCategoryApi.CategoryVO>();
|
||||
const formData = ref<BpmCategoryApi.Category>();
|
||||
|
||||
// 定义表单结构
|
||||
const formSchema = [
|
||||
@@ -53,7 +53,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||
status: formData.value?.status,
|
||||
description: formData.value?.description,
|
||||
sort: formData.value?.sort,
|
||||
} as BpmCategoryApi.CategoryVO;
|
||||
} as BpmCategoryApi.Category;
|
||||
|
||||
try {
|
||||
await updateCategory(data);
|
||||
@@ -74,7 +74,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||
}
|
||||
|
||||
// 加载数据
|
||||
const data = modalApi.getData<BpmCategoryApi.CategoryVO>();
|
||||
const data = modalApi.getData<BpmCategoryApi.Category>();
|
||||
|
||||
if (!data || !data.id) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user