feat(app): 应用设置页(107)+ 流程定义/编辑器应用下拉改读白名单显示应用名

- AppSetting.vue:tab1 应用管理(学校池同步说明+开关 i-switch);tab2 科室管理占位(Part E)
- Defs.vue 筛选下拉与表格应用列显示 appName;编辑器归属应用下拉去 allow-create、限启用集合
- flow.ts 增 appList/appEnable(defAppKeys 保留 deprecated)
This commit is contained in:
chenxing
2026-10-10 19:17:39 +08:00
parent acbf601e7a
commit e8f9af534b
5 changed files with 135 additions and 14 deletions
+9 -7
View File
@@ -57,8 +57,8 @@ const sourceStatus = ref(0);
const sourceVersion = ref(0);
/** 归属应用(flw_def.app_key;按应用筛选维度,空=未分配) */
const appKey = ref("");
/** 应用清单下拉(本校已标注 ∪ 已注册回调),拉取失败降级为仅手输 */
const appKeys = ref<string[]>([]);
/** 应用清单下拉(应用设置白名单 flw_app enabled=1,显示应用名),拉取失败降级为仅当前值 */
const appOptions = ref<{ appKey: string; appName: string }[]>([]);
const model = reactive<EditorModel>(createEmptyModel());
/** 科室映射聚合(mapList):仅用于下拉选项与"无启用办理人"提示 */
@@ -177,9 +177,12 @@ async function load(): Promise<void> {
await loadDepts();
await loadRouters();
try {
appKeys.value = ((await flowApi.defAppKeys().send()) as string[]) || [];
const rows: any[] = (await flowApi.appList().send()) || [];
appOptions.value = rows
.filter((r) => r.enabled === 1)
.map((r) => ({ appKey: String(r.appKey), appName: r.appName || String(r.appKey) }));
} catch {
appKeys.value = [];
appOptions.value = [];
}
const queryId = route.query.id ? Number(route.query.id) : null;
@@ -484,9 +487,8 @@ onUnmounted(() => window.removeEventListener("beforeunload", onBeforeUnload));
</label>
<label>
应用
<Select v-model="appKey" placeholder="归属应用,可空" style="width: 150px"
clearable filterable allow-create>
<Option v-for="k in appKeys" :key="k" :value="k">{{ k }}</Option>
<Select v-model="appKey" placeholder="归属应用,可空" style="width: 170px" clearable filterable>
<Option v-for="a in appOptions" :key="a.appKey" :value="a.appKey">{{ a.appName }}</Option>
</Select>
</label>
</div>