123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- import { defineStore } from 'pinia'
- // 审核条目
- export const useFlowStore = defineStore({
- id: 'flow',
- state: () => {
- return {
- storeInfoName: '',
- processId: '',
- processKey: '', // 唯一标识
- processName: '', // 流程定义名称
- processIcon: 'approval', // 流程图标
- categoryId: '', // 流程组分类ID
- remark: '', // 备注说明
- createTime: '', // 创建时间
- useScope: 0, // 使用范围 0,全员 1,指定人员(业务关联) 2,均不可提交
- formId: undefined, //业务审批 表单Id
- // processActorList: [
- // {
- // actorId: 0, // 参与者ID
- // actorName: '', // 参与者
- // actorType: 0 // 参与者类型 0,用户 1,部门 2,用户组
- // }
- // ], // 流程参与者,当使用范围为指定人员时候设置
- processPermissionList: [], // 流程定义权限
- cacheSwitch: false, // 缓存开关
- modelContent: '', // 流程模型定义JSON内容
- processForm: {}, // 流程定义表单
- processSetting: {
- allowRevocation: true, // 允许撤销审批中的申请
- allowRevocationDay: true, // 允许撤销指定天内通过的审批
- allowUpdateDay: true, // 允许修改指定天内通过的审批
- allowDelegate: true, // 允许代他人提交
- allowBatchOperate: true, // 允许审批人批量处理
- secondOperatePrompt: true, // 开启秒批提示
- repeatOperateSkip: true // 重复审批跳过
- } //流程定义配置
- }
- },
- getters: {},
- actions: {
- initState(title: string) {
- console.log('init materialInfoStore')
- this.storeInfoName = title || '流程审核'
- },
- // 表单信息
- setProcessForm(value: any) {
- this.processForm = value
- },
- // 流程设计
- setModelContent(value: any) {
- this.modelContent = value
- },
- // 流程设置
- setProcessSetting(value: any) {
- this.processSetting = value
- }
- },
- persist: true
- })
- export default useFlowStore
|