添加会签通过比例

This commit is contained in:
caixiaofeng 2024-06-03 12:49:23 +08:00
parent eda6152345
commit bafb7e9658
5 changed files with 73 additions and 78 deletions

View File

@ -5,85 +5,73 @@
// Generated by unplugin-auto-import // Generated by unplugin-auto-import
export {} export {}
declare global { declare global {
const EffectScope: (typeof import('vue'))['EffectScope'] const EffectScope: typeof import('vue')['EffectScope']
const ElCheckbox: (typeof import('element-plus/es'))['ElCheckbox'] const ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
const ElDivider: (typeof import('element-plus/es'))['ElDivider'] const ElDivider: typeof import('element-plus/es')['ElDivider']
const ElInput: (typeof import('element-plus/es'))['ElInput'] const ElInput: typeof import('element-plus/es')['ElInput']
const ElInputNumber: (typeof import('element-plus/es'))['ElInputNumber'] const ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
const ElRadio: (typeof import('element-plus/es'))['ElRadio'] const ElRadio: typeof import('element-plus/es')['ElRadio']
const ElSelect: (typeof import('element-plus/es'))['ElSelect'] const ElSelect: typeof import('element-plus/es')['ElSelect']
const computed: (typeof import('vue'))['computed'] const computed: typeof import('vue')['computed']
const createApp: (typeof import('vue'))['createApp'] const createApp: typeof import('vue')['createApp']
const customRef: (typeof import('vue'))['customRef'] const customRef: typeof import('vue')['customRef']
const defineAsyncComponent: (typeof import('vue'))['defineAsyncComponent'] const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
const defineComponent: (typeof import('vue'))['defineComponent'] const defineComponent: typeof import('vue')['defineComponent']
const effectScope: (typeof import('vue'))['effectScope'] const effectScope: typeof import('vue')['effectScope']
const getCurrentInstance: (typeof import('vue'))['getCurrentInstance'] const getCurrentInstance: typeof import('vue')['getCurrentInstance']
const getCurrentScope: (typeof import('vue'))['getCurrentScope'] const getCurrentScope: typeof import('vue')['getCurrentScope']
const h: (typeof import('vue'))['h'] const h: typeof import('vue')['h']
const inject: (typeof import('vue'))['inject'] const inject: typeof import('vue')['inject']
const isProxy: (typeof import('vue'))['isProxy'] const isProxy: typeof import('vue')['isProxy']
const isReactive: (typeof import('vue'))['isReactive'] const isReactive: typeof import('vue')['isReactive']
const isReadonly: (typeof import('vue'))['isReadonly'] const isReadonly: typeof import('vue')['isReadonly']
const isRef: (typeof import('vue'))['isRef'] const isRef: typeof import('vue')['isRef']
const markRaw: (typeof import('vue'))['markRaw'] const markRaw: typeof import('vue')['markRaw']
const nextTick: (typeof import('vue'))['nextTick'] const nextTick: typeof import('vue')['nextTick']
const onActivated: (typeof import('vue'))['onActivated'] const onActivated: typeof import('vue')['onActivated']
const onBeforeMount: (typeof import('vue'))['onBeforeMount'] const onBeforeMount: typeof import('vue')['onBeforeMount']
const onBeforeRouteLeave: (typeof import('vue-router'))['onBeforeRouteLeave'] const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
const onBeforeRouteUpdate: (typeof import('vue-router'))['onBeforeRouteUpdate'] const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
const onBeforeUnmount: (typeof import('vue'))['onBeforeUnmount'] const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
const onBeforeUpdate: (typeof import('vue'))['onBeforeUpdate'] const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
const onDeactivated: (typeof import('vue'))['onDeactivated'] const onDeactivated: typeof import('vue')['onDeactivated']
const onErrorCaptured: (typeof import('vue'))['onErrorCaptured'] const onErrorCaptured: typeof import('vue')['onErrorCaptured']
const onMounted: (typeof import('vue'))['onMounted'] const onMounted: typeof import('vue')['onMounted']
const onRenderTracked: (typeof import('vue'))['onRenderTracked'] const onRenderTracked: typeof import('vue')['onRenderTracked']
const onRenderTriggered: (typeof import('vue'))['onRenderTriggered'] const onRenderTriggered: typeof import('vue')['onRenderTriggered']
const onScopeDispose: (typeof import('vue'))['onScopeDispose'] const onScopeDispose: typeof import('vue')['onScopeDispose']
const onServerPrefetch: (typeof import('vue'))['onServerPrefetch'] const onServerPrefetch: typeof import('vue')['onServerPrefetch']
const onUnmounted: (typeof import('vue'))['onUnmounted'] const onUnmounted: typeof import('vue')['onUnmounted']
const onUpdated: (typeof import('vue'))['onUpdated'] const onUpdated: typeof import('vue')['onUpdated']
const provide: (typeof import('vue'))['provide'] const provide: typeof import('vue')['provide']
const reactive: (typeof import('vue'))['reactive'] const reactive: typeof import('vue')['reactive']
const readonly: (typeof import('vue'))['readonly'] const readonly: typeof import('vue')['readonly']
const ref: (typeof import('vue'))['ref'] const ref: typeof import('vue')['ref']
const resolveComponent: (typeof import('vue'))['resolveComponent'] const resolveComponent: typeof import('vue')['resolveComponent']
const shallowReactive: (typeof import('vue'))['shallowReactive'] const shallowReactive: typeof import('vue')['shallowReactive']
const shallowReadonly: (typeof import('vue'))['shallowReadonly'] const shallowReadonly: typeof import('vue')['shallowReadonly']
const shallowRef: (typeof import('vue'))['shallowRef'] const shallowRef: typeof import('vue')['shallowRef']
const toRaw: (typeof import('vue'))['toRaw'] const toRaw: typeof import('vue')['toRaw']
const toRef: (typeof import('vue'))['toRef'] const toRef: typeof import('vue')['toRef']
const toRefs: (typeof import('vue'))['toRefs'] const toRefs: typeof import('vue')['toRefs']
const toValue: (typeof import('vue'))['toValue'] const toValue: typeof import('vue')['toValue']
const triggerRef: (typeof import('vue'))['triggerRef'] const triggerRef: typeof import('vue')['triggerRef']
const unref: (typeof import('vue'))['unref'] const unref: typeof import('vue')['unref']
const useAttrs: (typeof import('vue'))['useAttrs'] const useAttrs: typeof import('vue')['useAttrs']
const useCssModule: (typeof import('vue'))['useCssModule'] const useCssModule: typeof import('vue')['useCssModule']
const useCssVars: (typeof import('vue'))['useCssVars'] const useCssVars: typeof import('vue')['useCssVars']
const useLink: (typeof import('vue-router'))['useLink'] const useLink: typeof import('vue-router')['useLink']
const useRoute: (typeof import('vue-router'))['useRoute'] const useRoute: typeof import('vue-router')['useRoute']
const useRouter: (typeof import('vue-router'))['useRouter'] const useRouter: typeof import('vue-router')['useRouter']
const useSlots: (typeof import('vue'))['useSlots'] const useSlots: typeof import('vue')['useSlots']
const watch: (typeof import('vue'))['watch'] const watch: typeof import('vue')['watch']
const watchEffect: (typeof import('vue'))['watchEffect'] const watchEffect: typeof import('vue')['watchEffect']
const watchPostEffect: (typeof import('vue'))['watchPostEffect'] const watchPostEffect: typeof import('vue')['watchPostEffect']
const watchSyncEffect: (typeof import('vue'))['watchSyncEffect'] const watchSyncEffect: typeof import('vue')['watchSyncEffect']
} }
// for type re-export // for type re-export
declare global { declare global {
// @ts-ignore // @ts-ignore
export type { export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
Component,
ComponentPublicInstance,
ComputedRef,
ExtractDefaultPropTypes,
ExtractPropTypes,
ExtractPublicPropTypes,
InjectionKey,
PropType,
Ref,
VNode,
WritableComputedRef
} from 'vue'
import('vue') import('vue')
} }

View File

@ -26,6 +26,7 @@ declare module 'vue' {
ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElIcon: typeof import('element-plus/es')['ElIcon'] ElIcon: typeof import('element-plus/es')['ElIcon']
ElInput: typeof import('element-plus/es')['ElInput'] ElInput: typeof import('element-plus/es')['ElInput']
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
ElLink: typeof import('element-plus/es')['ElLink'] ElLink: typeof import('element-plus/es')['ElLink']
ElOption: typeof import('element-plus/es')['ElOption'] ElOption: typeof import('element-plus/es')['ElOption']
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm'] ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']

View File

@ -215,6 +215,7 @@ const addApproval = (node: FlowNode) => {
choice: false, choice: false,
self: false, self: false,
multi: 'sequential', multi: 'sequential',
multiPercent: 100,
nobody: 'pass', nobody: 'pass',
nobodyUsers: [], nobodyUsers: [],
formProperties: [], formProperties: [],

View File

@ -69,6 +69,8 @@ export interface ApprovalNode extends AssigneeNode {
multi: 'sequential' | 'joint' | 'single' multi: 'sequential' | 'joint' | 'single'
// 审批人为空时处理方式reject-拒绝pass-通过admin-管理员assign-指定人员 // 审批人为空时处理方式reject-拒绝pass-通过admin-管理员assign-指定人员
nobody: 'refuse' | 'pass' | 'admin' | 'assign' nobody: 'refuse' | 'pass' | 'admin' | 'assign'
// 多人审批通过比例
multiPercent: number
// 审批人为空时,指定人员 // 审批人为空时,指定人员
nobodyUsers: string[] nobodyUsers: string[]
// 表单字段 // 表单字段

View File

@ -102,9 +102,12 @@ watchEffect(() => {
<el-form-item prop="method" label="多人审批方式"> <el-form-item prop="method" label="多人审批方式">
<el-radio-group v-model="activeData.multi" class="flex-col important-items-start"> <el-radio-group v-model="activeData.multi" class="flex-col important-items-start">
<el-radio value="sequential">依次审批按顺序审批</el-radio> <el-radio value="sequential">依次审批按顺序审批</el-radio>
<el-radio value="joint">会签需要所有审批人都通过才可通过</el-radio> <el-radio value="joint">会签需要所有审批人都通过</el-radio>
<el-radio value="single">或签其中一名审批人通过或拒绝即可</el-radio> <el-radio value="single">或签其中一名审批人通过即可</el-radio>
</el-radio-group> </el-radio-group>
<div v-if="activeData.multi === 'joint'">
需要 <el-input-number v-model="activeData.multiPercent" :min="1" :max="100" /> %人员通过
</div>
</el-form-item> </el-form-item>
<el-form-item prop="nobody" label="审批人为空"> <el-form-item prop="nobody" label="审批人为空">
<el-radio-group v-model="activeData.nobody" class="w-full"> <el-radio-group v-model="activeData.nobody" class="w-full">