From 48e205b310f3088d49b0e868e3a80e80d98611d6 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 28 Sep 2026 15:09:00 +0800 Subject: [PATCH] =?utf8?q?=E9=A2=86=E5=9F=9F=E6=96=B9=E6=A1=88=E5=AF=BC?= =?utf8?q?=E5=85=A5=E9=A1=B5=EF=BC=9A=E8=A1=A5=E9=BD=90=E4=B8=8E=E7=BC=96?= =?utf8?q?=E8=BE=91=E9=A1=B5=E4=B8=80=E8=87=B4=E7=9A=84=E5=AD=97=E6=AE=B5?= =?utf8?q?=EF=BC=88=E7=BC=A9=E5=86=99=E5=BF=85=E8=8B=B1=E6=96=87=E5=A4=A7?= =?utf8?q?=E5=86=99=E3=80=81=E6=89=80=E5=B1=9E=E9=A2=86=E5=9F=9F=E3=80=81?= =?utf8?q?=E7=89=88=E6=9C=AC=E5=8F=B7=E3=80=81=E7=8A=B6=E6=80=81=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit - 新增「缩写(英文大写)」必填项,输入自动转大写并校验 /^[A-Z]+$/ - 新增「状态」下拉(可用 / 编辑中) - 字段顺序与标签对齐领域方案编辑页:方案名称、缩写、所属领域、版本号、状态、方案说明 - submit 时一并提交 abbr 与 status --- src-vue/pages/domain/ImportDomainPackage.vue | 22 +++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src-vue/pages/domain/ImportDomainPackage.vue b/src-vue/pages/domain/ImportDomainPackage.vue index c4bdb0c..9ca94a5 100644 --- a/src-vue/pages/domain/ImportDomainPackage.vue +++ b/src-vue/pages/domain/ImportDomainPackage.vue @@ -21,7 +21,9 @@ const props = defineProps({ const file = ref(null); const domainId = ref(0); const name = ref(""); +const abbr = ref(""); const version = ref("1.0"); +const status = ref("available"); const description = ref(""); const busy = ref(false); @@ -54,6 +56,10 @@ async function submit() { props.notify("请填写方案名称和所属领域"); return; } + if (!/^[A-Z]+$/.test((abbr.value || "").trim())) { + props.notify("缩写必须为英文大写字母"); + return; + } busy.value = true; try { const row = await fetchDb("/domain-templates", { @@ -62,8 +68,9 @@ async function submit() { body: JSON.stringify({ domain_id: domainId.value, name: name.value.trim(), + abbr: (abbr.value || "").trim().toUpperCase(), description: description.value.trim() || `由 ${file.value.name} 人工导入的领域方案`, - status: "available", + status: status.value, version: version.value.trim() || "1.0", creator: CURRENT_USER_EMAIL, }), @@ -90,14 +97,23 @@ async function submit() {
+ + + - - + + + + + + + +
-- 2.43.0