Skip to content

Commit

Permalink
!673 BPM-更多设置-自动去重
Browse files Browse the repository at this point in the history
Merge pull request !673 from Lesan/feature/bpm-自动去重
  • Loading branch information
YunaiV authored and gitee-org committed Jan 21, 2025
2 parents 187fa08 + 0215e8d commit 051fc13
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -457,3 +457,9 @@ export const BpmProcessInstanceStatus = {
REJECT: 3, // 审批不通过
CANCEL: 4 // 已取消
}

export const BpmAutoApproveType = {
NONE: 1, // 不自动通过
APPROVE_ALL: 2, // 仅审批一次,后续重复的审批节点均自动通过
APPROVE_SEQUENT: 3, // 仅针对连续审批的节点自动通过
}
21 changes: 21 additions & 0 deletions src/views/bpm/model/form/ExtraSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,29 @@
</div>
</div>
</el-form-item>
<el-form-item class="mb-20px">
<template #label>
<el-text size="large" tag="b">自动去重</el-text>
</template>
<div class="flex flex-col">
<div>
<el-text> 同一审批人在流程中重复出现时: </el-text>
</div>
<el-radio-group v-model="modelData.autoApprovalType">
<div class="flex flex-col">
<el-radio :value="1">不自动通过</el-radio>
<el-radio :value="2">仅审批一次,后续重复的审批节点均自动通过</el-radio>
<el-radio :value="3">仅针对连续审批的节点自动通过</el-radio>
</div>
</el-radio-group>
</div>
</el-form-item>
</el-form>
</template>

<script setup lang="ts">
import dayjs from 'dayjs'
import { BpmAutoApproveType } from '@/utils/constants'
const modelData = defineModel<any>()
Expand Down Expand Up @@ -130,6 +148,9 @@ const initData = () => {
length: 5
}
}
if (!modelData.value.autoApprovalType) {
modelData.value.autoApprovalType = BpmAutoApproveType.NONE
}
}
defineExpose({ initData })
</script>
5 changes: 3 additions & 2 deletions src/views/bpm/model/form/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ import * as FormApi from '@/api/bpm/form'
import { CategoryApi, CategoryVO } from '@/api/bpm/category'
import * as UserApi from '@/api/system/user'
import { useUserStoreWithOut } from '@/store/modules/user'
import { BpmModelFormType, BpmModelType } from '@/utils/constants'
import { BpmModelFormType, BpmModelType, BpmAutoApproveType } from '@/utils/constants'
import BasicInfo from './BasicInfo.vue'
import FormDesign from './FormDesign.vue'
import ProcessDesign from './ProcessDesign.vue'
Expand Down Expand Up @@ -153,7 +153,8 @@ const formData: any = ref({
infix: '',
postfix: '',
length: 5
}
},
autoApprovalType: BpmAutoApproveType.NONE
})
//流程数据
Expand Down

0 comments on commit 051fc13

Please sign in to comment.