mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-30 16:03:50 +00:00
refactor: 重构查询参数实现,替换旧的__init__初始化方式为dataclass+post_init
feat: 新增岗位编码字段与校验 fix: 修复批量删除提示、请求缓存、任务状态等逻辑 perf: 优化表格列展示,移除冗余ID列 build: 降级fastapi版本至0.115.2,更新依赖锁文件 docs: 补充部分代码注释与说明
This commit is contained in:
@@ -485,6 +485,7 @@ const positionDetailItems: import("@/components/others/fa-descriptions/index.vue
|
||||
const formData = ref<PositionForm>({
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
code: undefined,
|
||||
order: 1,
|
||||
status: 0,
|
||||
description: undefined,
|
||||
@@ -494,6 +495,7 @@ const { dialogVisible } = useCrudDialog();
|
||||
|
||||
const rules = reactive({
|
||||
name: [{ required: true, message: "请输入岗位名称", trigger: "blur" }],
|
||||
code: [{ required: true, message: "请输入岗位编码", trigger: "blur" }],
|
||||
order: [{ required: true, message: "请输入岗位排序", trigger: "blur" }],
|
||||
status: [{ required: true, message: "请选择岗位状态", trigger: "blur" }],
|
||||
});
|
||||
@@ -501,6 +503,7 @@ const rules = reactive({
|
||||
const initialFormData: PositionForm = {
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
code: undefined,
|
||||
order: 1,
|
||||
status: 0,
|
||||
description: undefined,
|
||||
@@ -550,6 +553,13 @@ const positionDialogFormItems = computed<FormItem[]>(() => [
|
||||
span: 24,
|
||||
props: { placeholder: "请输入岗位名称", maxlength: 50 },
|
||||
},
|
||||
{
|
||||
label: "岗位编码",
|
||||
key: "code",
|
||||
type: "input",
|
||||
span: 24,
|
||||
props: { placeholder: "请输入岗位编码", maxlength: 64 },
|
||||
},
|
||||
{
|
||||
label: "排序",
|
||||
key: "order",
|
||||
|
||||
@@ -946,7 +946,7 @@ async function handleBatchDelete() {
|
||||
if (userStore.basicInfo.id && ids.includes(userStore.basicInfo.id)) {
|
||||
userStore.clearUserInfo();
|
||||
} else {
|
||||
ElMessage.success("删除成功");
|
||||
console.info(`删除 ${ids.length} 条数据`);
|
||||
}
|
||||
selectedRows.value = [];
|
||||
await refreshRemove();
|
||||
|
||||
Reference in New Issue
Block a user