feat : 节点参数设置

This commit is contained in:
clay
2024-07-23 19:18:29 +08:00
parent e5452741e9
commit c7866f2e5e
3 changed files with 33 additions and 6 deletions

View File

@@ -10,6 +10,9 @@ export const APPROVAL_PROPS = {
},
matrixApproval: true,
dstiMatrix: false,
generalManager: true,
president: true,
duplicateApproval: false,
skipSelf: true,
timeLimit: { //边界事件
timeout: { //超时提醒时间

View File

@@ -102,17 +102,31 @@
<!-- <i class="el-icon-question" style="margin-left: 10px; font-size: medium; color: #b0b0b1"></i>-->
<!-- </el-tooltip>-->
<!-- </el-form-item>-->
<el-form-item label="是否使用矩阵审批" prop="text">
<span v-if="nodeProps.assignedType !== 'SUB_LEADER'">
<el-form-item label="是否使用矩阵审批" prop="matrixApproval">
<el-switch inactive-text="不用" active-text="使用" v-model="nodeProps.matrixApproval"></el-switch>
</el-form-item>
<el-form-item label="科创部矩阵" prop="text">
<el-switch inactive-text="审批" active-text="跳过" v-if="nodeProps.assignedType === 'SELF'"
v-model="nodeProps.dstiMatrix"></el-switch>
</el-form-item>
<el-form-item v-if="nodeProps.matrixApproval && nodeProps.assignedType === 'SELF'" label="是否跳过自己" prop="text">
<el-form-item v-if="nodeProps.matrixApproval && (nodeProps.assignedType === 'SELF' || nodeProps.assignedType === 'ASSIGN_USER')" label="是否跳过自己" prop="skipSelf">
<!-- {{nodeProps.skipSelf}}-->
<el-switch inactive-text="不跳过" active-text="跳过" v-model="nodeProps.skipSelf"></el-switch>
</el-form-item>
</span>
<el-form-item label="科创部矩阵" prop="dstiMatrix">
<el-switch inactive-text="审批" active-text="跳过"
v-model="nodeProps.dstiMatrix"></el-switch>
</el-form-item>
<span v-if="nodeProps.assignedType === 'SUB_LEADER'">
<el-form-item label="总经理" prop="generalManager">
<el-switch inactive-text="不审批" active-text="审批" v-model="nodeProps.generalManager"></el-switch>
</el-form-item>
<el-form-item label="董事长" prop="president">
<el-switch inactive-text="不审批" active-text="审批" v-model="nodeProps.president"></el-switch>
</el-form-item>
</span>
<el-form-item label="重复审批" prop="duplicateApproval">
<el-switch inactive-text="" active-text=""
v-model="nodeProps.duplicateApproval"></el-switch>
</el-form-item>
<!-- <el-form-item label="审批期限(为 0 则不生效)" prop="timeLimit">-->
<!-- <el-input style="width: 180px;" placeholder="时长" type="number"-->
<!-- v-model="nodeProps.timeLimit.timeout.value">-->
@@ -254,6 +268,8 @@ const approvalTypes = reactive([
// {name: "主管", type: "LEADER"},
// {name: "角色", type: "ROLE"},
{name: "发起人自己", type: "SELF"},
{name: "下属企业领导", type: "SUB_LEADER"},
{name: "下属企业科创部对接人", type: "DSTI_CONTACT_PERSON"},
// {name: "表单内联系人", type: "FORM_USER"},
// {name: "矩阵审批", type: "MATRIX_APPROVAL"},
])

View File

@@ -69,6 +69,12 @@ const content = computed(() => {
return '发起人自己'
case "DSTI_MATRIX":
return '科创部用户跳过'
case "NO_USER_SKIP":
return '无用户审批,跳过'
case "DSTI_CONTACT_PERSON":
return '下属企业科创部对接人'
case "SUB_LEADER":
return '下属企业领导'
case "SELF_SELECT":
return config.selfSelect.multiple ? '发起人自选多人' : '发起人自选一人'
case "LEADER_TOP":
@@ -115,6 +121,8 @@ const validate = (err) => {
case "SELF_SELECT":
showError.value = !validate_SELF_SELECT(err);
break;
case "DSTI_CONTACT_PERSON":
case "SUB_LEADER":
case "LEADER_TOP":
showError.value = !validate_LEADER_TOP(err);
break;