From 955c1e55f61d8756ba67f7f7210ab6ecf9e597d1 Mon Sep 17 00:00:00 2001 From: chenxing Date: Mon, 12 Oct 2026 10:44:17 +0800 Subject: [PATCH] =?UTF-8?q?feat(def):=20=E5=BD=92=E5=B1=9E=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E5=BF=85=E5=A1=AB=E5=8C=96=E2=80=94=E2=80=94=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=99=A8=E4=BF=9D=E5=AD=98=E6=A0=A1=E9=AA=8C+?= =?UTF-8?q?=E5=BF=85=E9=80=89=E6=A0=87=E8=AE=B0=EF=BC=8C=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=9C=AA=E5=BD=92=E5=B1=9E=E6=A0=87=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 配合后端 save 必填化(2026-10-12 拍板): - def-editor:保存前校验归属应用非空(新建必选;升版本/存量草稿继承源行, 源行未归属必须补选),头部 Select 改必选样式 - Defs.vue:应用列存量 NULL 行显示「未归属」橙色 Tag;「编辑信息」弹窗 归属应用改必填(原地补填通道) --- src/views/flow/admin/Defs.vue | 17 ++++++++++++++--- src/views/flow/admin/def-editor/index.vue | 10 ++++++++-- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/views/flow/admin/Defs.vue b/src/views/flow/admin/Defs.vue index 717571d..55b2f31 100644 --- a/src/views/flow/admin/Defs.vue +++ b/src/views/flow/admin/Defs.vue @@ -34,7 +34,13 @@ const columns = [ { title: "序号", type: "index", width: 70, align: "center" }, { title: "流程", key: "name", minWidth: 180 }, { title: "编码", key: "code", width: 160 }, - { title: "应用", key: "appKey", width: 130, align: "center", render: (h: any, p: any) => h("span", p.row.appKey ? (appMap.value[p.row.appKey] || p.row.appKey) : "-") }, + { title: "应用", key: "appKey", width: 130, align: "center", render: (h: any, p: any) => { + // 未归属标记(2026-10-12 appKey 必填化):存量 NULL 线在此醒目,随编辑/升版本收敛 + if (!p.row.appKey) { + return h(Tag, { color: "warning" }, () => "未归属"); + } + return h("span", appMap.value[p.row.appKey] || p.row.appKey); + } }, { title: "版本", key: "version", width: 70, align: "center" }, { title: "状态", width: 90, align: "center", render: (h: any, p: any) => { const c = p.row.status === 1 ? "green" : p.row.status === 0 ? "orange" : "gray"; @@ -197,12 +203,17 @@ async function onMetaSave() { Message.warning("流程名称不能为空"); return; } + // 归属应用必填(2026-10-12 拍板):存量未归属行在此原地补填 + if (!metaForm.value.appKey) { + Message.warning("请选择归属应用(应用需先在 流程管理 > 应用设置 中开启)"); + return; + } metaSaving.value = true; try { await flowApi.defUpdateMeta({ id: metaForm.value.id, name: metaForm.value.name.trim(), - appKey: metaForm.value.appKey || undefined, + appKey: metaForm.value.appKey, }).send(); Message.success("已更新(版本不变)"); metaVisible.value = false; @@ -259,7 +270,7 @@ onMounted(() => { - diff --git a/src/views/flow/admin/def-editor/index.vue b/src/views/flow/admin/def-editor/index.vue index 476c848..3f322a7 100644 --- a/src/views/flow/admin/def-editor/index.vue +++ b/src/views/flow/admin/def-editor/index.vue @@ -369,6 +369,12 @@ async function onSave(): Promise { Message.warning("请填写流程编码"); return; } + // 归属应用必填(2026-10-12 拍板):新建必须选;升版本继承源线(baseGuid 载入时已带回), + // 源线未归属(存量 NULL)时必须在此补选 + if (!(appKey.value || "").trim()) { + Message.warning("请选择归属应用(应用需先在 流程管理 > 应用设置 中开启)"); + return; + } const errors = countErrors(issues.value); if (errors.length) { Message.error(`校验未通过:${errors[0].text}`); @@ -487,8 +493,8 @@ onUnmounted(() => window.removeEventListener("beforeunload", onBeforeUnload)); />