|
36 | 36 | :rule="approveForm.rule"
|
37 | 37 | />
|
38 | 38 | </el-card>
|
39 |
| - <!-- TODO @lesan:需要分成“审批”和“办理”意见,包括 label、placeholder、rule 校验 --> |
40 |
| - <el-form-item label="审批意见" prop="reason"> |
| 39 | + <el-form-item :label="`${taskName}意见`" prop="reason"> |
41 | 40 | <el-input
|
42 | 41 | v-model="approveReasonForm.reason"
|
43 |
| - placeholder="请输入审批意见" |
| 42 | + :placeholder="`请输入${taskName}意见`" |
44 | 43 | type="textarea"
|
45 | 44 | :rows="4"
|
46 | 45 | />
|
@@ -505,6 +504,7 @@ import * as TaskApi from '@/api/bpm/task'
|
505 | 504 | import * as ProcessInstanceApi from '@/api/bpm/processInstance'
|
506 | 505 | import * as UserApi from '@/api/system/user'
|
507 | 506 | import {
|
| 507 | + NodeType, |
508 | 508 | OPERATION_BUTTON_NAME,
|
509 | 509 | OperationButtonType
|
510 | 510 | } from '@/components/SimpleProcessDesignerV2/src/consts'
|
@@ -559,7 +559,9 @@ const approveReasonForm = reactive({
|
559 | 559 | })
|
560 | 560 | const approveReasonRule = computed(() => {
|
561 | 561 | return {
|
562 |
| - reason: [{ required: reasonRequire.value, message: '审批意见不能为空', trigger: 'blur' }], |
| 562 | + reason: [ |
| 563 | + { required: reasonRequire.value, message: taskName + '意见不能为空', trigger: 'blur' } |
| 564 | + ], |
563 | 565 | signPicUrl: [{ required: true, message: '签名不能为空', trigger: 'change' }]
|
564 | 566 | }
|
565 | 567 | })
|
@@ -968,11 +970,14 @@ const getButtonDisplayName = (btnType: OperationButtonType) => {
|
968 | 970 | return displayName
|
969 | 971 | }
|
970 | 972 |
|
| 973 | +const taskName = ref('审批') |
| 974 | +
|
971 | 975 | const loadTodoTask = (task: any) => {
|
972 | 976 | approveForm.value = {}
|
973 | 977 | approveFormFApi.value = {}
|
974 | 978 | runningTask.value = task
|
975 | 979 | reasonRequire.value = task?.reasonRequire ?? false
|
| 980 | + taskName.value = task?.nodeType === NodeType.TRANSACTOR_NODE ? '办理' : '审批' |
976 | 981 | // 处理 approve 表单.
|
977 | 982 | if (task && task.formId && task.formConf) {
|
978 | 983 | const tempApproveForm = {}
|
|
0 commit comments