feat: 办理人映射页一键拉取教师组(预览确认+批量导入)+ 流程编辑器存量
build / build (push) Successful in 2m6s

- Maps.vue:一键拉取教师组按钮 + 预览弹窗(科室/成员明细)+ 确认导入
- flow.ts:mapGroupPreview/mapImportGroups API
- 含流程编辑器(def-editor)、路由 catch-all、示意图入口存量
This commit is contained in:
chenxing
2026-09-16 01:21:10 +08:00
parent 670988816c
commit 842a4cfb14
15 changed files with 2105 additions and 72 deletions
@@ -0,0 +1,136 @@
<script setup lang="ts">
// 审批节点卡片(方案 §3.2):标题 + 审批人摘要 + 会签/时限标签 + 就地校验标注;hover 显示删除
import { computed, inject } from "vue";
import { ApprovalNode, EDITOR_CTX, assigneeText, nodeTags } from "../model";
const props = defineProps<{ node: ApprovalNode }>();
const ctx = inject(EDITOR_CTX)!;
const issues = computed(() => ctx.issueOf(props.node.uid));
const hasError = computed(() => issues.value.some((i) => i.level === "error"));
const summary = computed(() => assigneeText(props.node.assignee, ctx.depts, ctx.userNames));
const tags = computed(() => nodeTags(props.node));
// 删除控件在卡片内,点击不应顺带打开配置抽屉(确认气泡已 transfer 到 body,不受影响)
function onOpen(e: MouseEvent): void {
if ((e.target as HTMLElement).closest(".nc-del")) return;
ctx.openNode(props.node.uid);
}
</script>
<template>
<div class="node-card" :class="{ error: hasError }" @click="onOpen">
<div class="nc-head">
<span class="nc-icon">审</span>
<span class="nc-name">{{ node.name || "未命名节点" }}</span>
<!-- view-ui-plus 无 Popconfirm 组件,二次确认用 Poptip 的 confirm 模式 -->
<Poptip
confirm
title="删除该审批节点?"
ok-text="删除"
cancel-text="取消"
transfer
@on-ok="ctx.removeNode(node.uid)"
>
<span class="nc-del" title="删除节点">×</span>
</Poptip>
</div>
<div class="nc-sub">{{ summary }}</div>
<div class="nc-sub last">
<span v-for="t in tags" :key="t" class="tag">{{ t }}</span>
</div>
<div v-for="(i, k) in issues" :key="k" class="nc-issue" :class="i.level">⚠ {{ i.msg }}</div>
</div>
</template>
<style scoped>
.node-card {
width: 264px;
background: #fff;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
cursor: pointer;
border: 2px solid transparent;
transition: all 0.15s;
}
.node-card:hover {
border-color: #2d8cf0;
}
.node-card.error {
border-color: #ed4014;
}
.nc-head {
display: flex;
align-items: center;
gap: 8px;
padding: 12px 14px 2px;
}
.nc-icon {
flex: none;
width: 26px;
height: 26px;
border-radius: 6px;
background: #e8f3ff;
color: #2d8cf0;
display: flex;
align-items: center;
justify-content: center;
font-size: 13px;
}
.nc-name {
flex: 1;
font-weight: 600;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.nc-del {
flex: none;
width: 20px;
height: 20px;
border-radius: 50%;
display: none;
align-items: center;
justify-content: center;
color: #fff;
background: #c5c9d1;
font-size: 13px;
line-height: 1;
}
.node-card:hover .nc-del {
display: inline-flex;
}
.nc-del:hover {
background: #ed4014;
}
.nc-sub {
padding: 4px 16px 0;
color: #808695;
font-size: 12px;
line-height: 1.6;
word-break: break-all;
}
.nc-sub.last {
padding-bottom: 12px;
}
.tag {
display: inline-block;
padding: 1px 6px;
margin-right: 4px;
border-radius: 4px;
font-size: 11px;
background: #f5f7fa;
color: #808695;
}
.nc-issue {
padding: 4px 16px 8px;
font-size: 12px;
}
.nc-issue.error {
color: #ed4014;
}
.nc-issue.warn {
color: #ff9900;
}
</style>