feat: 添加节点类型以区分不同节点
This commit is contained in:
@@ -36,11 +36,10 @@
|
||||
:rule="approveForm.rule"
|
||||
/>
|
||||
</el-card>
|
||||
<!-- TODO @lesan:需要分成“审批”和“办理”意见,包括 label、placeholder、rule 校验 -->
|
||||
<el-form-item label="审批意见" prop="reason">
|
||||
<el-form-item :label="`${taskName}意见`" prop="reason">
|
||||
<el-input
|
||||
v-model="approveReasonForm.reason"
|
||||
placeholder="请输入审批意见"
|
||||
:placeholder="`请输入${taskName}意见`"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
/>
|
||||
@@ -505,6 +504,7 @@ import * as TaskApi from '@/api/bpm/task'
|
||||
import * as ProcessInstanceApi from '@/api/bpm/processInstance'
|
||||
import * as UserApi from '@/api/system/user'
|
||||
import {
|
||||
NodeType,
|
||||
OPERATION_BUTTON_NAME,
|
||||
OperationButtonType
|
||||
} from '@/components/SimpleProcessDesignerV2/src/consts'
|
||||
@@ -559,7 +559,9 @@ const approveReasonForm = reactive({
|
||||
})
|
||||
const approveReasonRule = computed(() => {
|
||||
return {
|
||||
reason: [{ required: reasonRequire.value, message: '审批意见不能为空', trigger: 'blur' }],
|
||||
reason: [
|
||||
{ required: reasonRequire.value, message: taskName + '意见不能为空', trigger: 'blur' }
|
||||
],
|
||||
signPicUrl: [{ required: true, message: '签名不能为空', trigger: 'change' }]
|
||||
}
|
||||
})
|
||||
@@ -968,11 +970,14 @@ const getButtonDisplayName = (btnType: OperationButtonType) => {
|
||||
return displayName
|
||||
}
|
||||
|
||||
const taskName = ref('审批')
|
||||
|
||||
const loadTodoTask = (task: any) => {
|
||||
approveForm.value = {}
|
||||
approveFormFApi.value = {}
|
||||
runningTask.value = task
|
||||
reasonRequire.value = task?.reasonRequire ?? false
|
||||
taskName.value = task?.nodeType === NodeType.TRANSACTOR_NODE ? '办理' : '审批'
|
||||
// 处理 approve 表单.
|
||||
if (task && task.formId && task.formConf) {
|
||||
const tempApproveForm = {}
|
||||
|
||||
@@ -180,6 +180,7 @@ import copySvg from '@/assets/svgs/bpm/copy.svg'
|
||||
import conditionSvg from '@/assets/svgs/bpm/condition.svg'
|
||||
import parallelSvg from '@/assets/svgs/bpm/parallel.svg'
|
||||
import finishSvg from '@/assets/svgs/bpm/finish.svg'
|
||||
import handleSvg from '@/assets/svgs/bpm/handle.svg'
|
||||
|
||||
defineOptions({ name: 'BpmProcessInstanceTimeline' })
|
||||
withDefaults(
|
||||
@@ -241,8 +242,8 @@ const nodeTypeSvgMap = {
|
||||
[NodeType.START_USER_NODE]: { color: '#909398', svg: starterSvg },
|
||||
// 审批人节点
|
||||
[NodeType.USER_TASK_NODE]: { color: '#ff943e', svg: auditorSvg },
|
||||
// 办理人节点 TODO @lesan:
|
||||
[NodeType.TRANSACTOR_NODE]: { color: '#ff943e', svg: auditorSvg },
|
||||
// 办理人节点
|
||||
[NodeType.TRANSACTOR_NODE]: { color: '#ff943e', svg: handleSvg },
|
||||
// 抄送人节点
|
||||
[NodeType.COPY_TASK_NODE]: { color: '#3296fb', svg: copySvg },
|
||||
// 条件分支节点
|
||||
|
||||
Reference in New Issue
Block a user