| | |
| | | <div class="tfe-card" :class="{ 'tfe-card--empty': !item.approvers?.length }"> |
| | | <div class="tfe-badge">{{ index + 1 }}</div> |
| | | <div class="tfe-head"> |
| | | <span class="tfe-level">{{ levelText(index) }}</span> |
| | | <el-radio-group |
| | | <span class="tfe-level">{{ levelText(index) }}</span> <el-radio-group |
| | | v-if="!readonly" |
| | | v-model="item.signMode" |
| | | size="small" |
| | |
| | | <script setup> |
| | | import { ArrowLeft, ArrowRight, Delete, Plus, User } from "@element-plus/icons-vue"; |
| | | import { ref, watch } from "vue"; |
| | | import { NODE_SIGN_MODE_OPTIONS, normalizeFlowNodes } from "../approveTemplateConstants.js"; |
| | | import { NODE_SIGN_MODE_OPTIONS, normalizeFlowNodes, nodeDisplayName } from "../approveTemplateConstants.js"; |
| | | |
| | | const props = defineProps({ |
| | | modelValue: { type: Array, default: () => [] }, |
| | | userOptions: { type: Array, default: () => [] }, |
| | | /** 审批类型/模板名称,用于拼节点名(如「发货审批·一级」) */ |
| | | typeName: { type: String, default: "" }, |
| | | /** 选择模板后申请场景:仅展示,不可改审批人/节点 */ |
| | | readonly: { type: Boolean, default: false }, |
| | | }); |
| | |
| | | } |
| | | |
| | | function levelText(i) { |
| | | const t = ["第一级", "第二级", "第三级", "第四级", "第五级", "第六级", "第七级", "第八级"]; |
| | | return t[i] || `第${i + 1}级`; |
| | | // 节点名按审批类型 + 层级显示,如「发货审批·一级」 |
| | | return nodeDisplayName(props.typeName, i); |
| | | } |
| | | |
| | | function optionLabel(u) { |