feat(app): 编辑应用回传 appCode/appNature 必填配套(C5)——AppForm 编辑态技术标识必填规则(后端 Create/Update 组同口径);EditAppContainer 学校分支补回传 categoryId/appCode/appNature 原值满足平台校验(后端学校覆盖只读名称/描述/图标,语义不变)
build / build (push) Successful in 2m24s
build / build (push) Successful in 2m24s
This commit is contained in:
@@ -250,8 +250,8 @@ const rules = computed(() => ({
|
||||
...(props.schoolMode ? {} : {
|
||||
categoryId: [{ required: true, type: 'number' as const, message: '请选择应用类型', trigger: 'change' }],
|
||||
}),
|
||||
// 技术标识仅新增必填(后端 Create 组同口径);编辑留空 = 保持原值(存量孤儿行允许继续观察)
|
||||
...((props.schoolMode || props.isEdit) ? {} : {
|
||||
// 技术标识新增与编辑均必填(2026-09-28 拍板,后端 Create/Update 组同口径);学校模式不展示该字段
|
||||
...(props.schoolMode ? {} : {
|
||||
appCode: [{ required: true, message: '请输入技术标识', trigger: 'blur' }],
|
||||
}),
|
||||
}));
|
||||
|
||||
@@ -67,11 +67,15 @@ function open(id: number, row: any, categories: any[], onSuccess?: () => void) {
|
||||
async function handleSubmit(formData: Record<string, any>) {
|
||||
if (!currentId.value) return;
|
||||
if (isSchoolMode) {
|
||||
// 学校模式:仅 名称/描述/Pc图标 三字段写学校覆盖表,其余字段一律不提交
|
||||
// 学校模式:仅 名称/描述/Pc图标 三字段写学校覆盖表(后端 editAppForSchool 只读这三个);
|
||||
// categoryId/appCode/appNature 原样回传仅为满足平台级 Update 校验(后端不落平台表),缺失会 400
|
||||
form.value = {
|
||||
id: currentId.value,
|
||||
name: formData.name,
|
||||
categoryId: formData.categoryId,
|
||||
desc: formData.desc,
|
||||
appCode: formData.appCode,
|
||||
appNature: formData.appNature,
|
||||
pcIcon: formData.pcIcon,
|
||||
};
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user