feat: 同步bpm设计器审批人配置,表单内部门负责人
parent
b09ff417c3
commit
a9c924a421
|
@ -129,6 +129,26 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-if="userTaskForm.candidateStrategy === CandidateStrategy.FORM_DEPT_LEADER"
|
||||||
|
label="表单内部门字段"
|
||||||
|
prop="formDept"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="userTaskForm.candidateParam"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
@change="updateElementTask"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="(item, idx) in deptFieldOnFormOptions"
|
||||||
|
:key="idx"
|
||||||
|
:label="item.title"
|
||||||
|
:value="item.field"
|
||||||
|
:disabled="!item.required"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="
|
v-if="
|
||||||
userTaskForm.candidateStrategy == CandidateStrategy.MULTI_LEVEL_DEPT_LEADER ||
|
userTaskForm.candidateStrategy == CandidateStrategy.MULTI_LEVEL_DEPT_LEADER ||
|
||||||
|
@ -206,12 +226,15 @@ const postOptions = ref<PostApi.PostVO[]>([]) // 岗位列表
|
||||||
const userOptions = ref<UserApi.UserVO[]>([]) // 用户列表
|
const userOptions = ref<UserApi.UserVO[]>([]) // 用户列表
|
||||||
const userGroupOptions = ref<UserGroupApi.UserGroupVO[]>([]) // 用户组列表
|
const userGroupOptions = ref<UserGroupApi.UserGroupVO[]>([]) // 用户组列表
|
||||||
|
|
||||||
// 表单内用户字段
|
|
||||||
const { formFieldOptions } = useFormFieldsPermission(FieldPermissionType.READ)
|
const { formFieldOptions } = useFormFieldsPermission(FieldPermissionType.READ)
|
||||||
// 表单内用户字段选项, 必须是必填和用户选择器
|
// 表单内用户字段选项, 必须是必填和用户选择器
|
||||||
const userFieldOnFormOptions = computed(() => {
|
const userFieldOnFormOptions = computed(() => {
|
||||||
return formFieldOptions.filter((item) => item.type === 'UserSelect')
|
return formFieldOptions.filter((item) => item.type === 'UserSelect')
|
||||||
})
|
})
|
||||||
|
// 表单内部门字段选项, 必须是必填和部门选择器
|
||||||
|
const deptFieldOnFormOptions = computed(() => {
|
||||||
|
return formFieldOptions.filter((item) => item.type === 'DeptSelect')
|
||||||
|
})
|
||||||
|
|
||||||
const deptLevel = ref(1)
|
const deptLevel = ref(1)
|
||||||
const deptLevelLabel = computed(() => {
|
const deptLevelLabel = computed(() => {
|
||||||
|
@ -264,6 +287,9 @@ const resetTaskForm = () => {
|
||||||
) {
|
) {
|
||||||
userTaskForm.value.candidateParam = +candidateParamStr
|
userTaskForm.value.candidateParam = +candidateParamStr
|
||||||
deptLevel.value = +candidateParamStr
|
deptLevel.value = +candidateParamStr
|
||||||
|
} else if (userTaskForm.value.candidateStrategy == CandidateStrategy.FORM_DEPT_LEADER) {
|
||||||
|
userTaskForm.value.candidateParam = candidateParamStr.split('|')[0]
|
||||||
|
deptLevel.value = +candidateParamStr.split('|')[1]
|
||||||
} else {
|
} else {
|
||||||
userTaskForm.value.candidateParam = candidateParamStr.split(',').map((item) => {
|
userTaskForm.value.candidateParam = candidateParamStr.split(',').map((item) => {
|
||||||
// 如果数字超出了最大安全整数范围,则将其作为字符串处理
|
// 如果数字超出了最大安全整数范围,则将其作为字符串处理
|
||||||
|
@ -322,7 +348,10 @@ const updateElementTask = () => {
|
||||||
: userTaskForm.value.candidateParam
|
: userTaskForm.value.candidateParam
|
||||||
|
|
||||||
// 特殊处理多级部门情况
|
// 特殊处理多级部门情况
|
||||||
if (userTaskForm.value.candidateStrategy == CandidateStrategy.MULTI_LEVEL_DEPT_LEADER) {
|
if (
|
||||||
|
userTaskForm.value.candidateStrategy == CandidateStrategy.MULTI_LEVEL_DEPT_LEADER ||
|
||||||
|
userTaskForm.value.candidateStrategy == CandidateStrategy.FORM_DEPT_LEADER
|
||||||
|
) {
|
||||||
candidateParam += '|' + deptLevel.value
|
candidateParam += '|' + deptLevel.value
|
||||||
}
|
}
|
||||||
// 特殊处理发起人部门负责人、发起人连续部门负责人
|
// 特殊处理发起人部门负责人、发起人连续部门负责人
|
||||||
|
|
Loading…
Reference in New Issue