| | |
| | | } from '@vben/constants'; |
| | | import { useTabs } from '@vben/hooks'; |
| | | import { IconifyIcon } from '@vben/icons'; |
| | | import { useUserStore } from '@vben/stores'; |
| | | |
| | | import { Button, Card, message } from 'ant-design-vue'; |
| | | |
| | |
| | | |
| | | const router = useRouter(); |
| | | const route = useRoute(); |
| | | const userStore = useUserStore(); |
| | | const tabs = useTabs(); |
| | | |
| | | const basicInfoRef = ref<InstanceType<typeof BasicInfo>>(); // 基础信息组件引用 |
| | |
| | | } else { |
| | | // 情况三:新增场景 |
| | | formData.value.startUserType = 0; // 全体 |
| | | formData.value.managerUserIds.push(userStore.userInfo?.id); |
| | | } |
| | | |
| | | // 流程管理员固定为超级管理员(admin,系统账号 id=1),不允许选择/修改 |
| | | formData.value.managerUserIds = [1]; |
| | | |
| | | // 获取表单列表 |
| | | formList.value = await getFormSimpleList(); |
| | |
| | | } |
| | | } |
| | | |
| | | /** 步骤切换处理 */ |
| | | async function handleStepClick(index: number) { |
| | | try { |
| | | if (index !== 0) { |
| | | await validateBasic(); |
| | | } |
| | | if (index !== 1) { |
| | | await validateForm(); |
| | | } |
| | | if (index !== 2) { |
| | | await validateProcess(); |
| | | } |
| | | if (index !== 3) { |
| | | await validateExtra(); |
| | | } |
| | | // 切换步骤 |
| | | currentStep.value = index; |
| | | } catch (error) { |
| | | console.error('步骤切换失败:', error); |
| | | if (currentStep.value !== 2) { |
| | | message.warning('请先完善当前步骤必填信息'); |
| | | } |
| | | } |
| | | /** 步骤切换处理:允许自由前进/返回,不做步骤校验(保存/发布时才统一校验) */ |
| | | function handleStepClick(index: number) { |
| | | currentStep.value = index; |
| | | } |
| | | |
| | | /** 返回列表页 */ |