Commit f7a2949a by YunaiV

【代码评审】BPM:办理人的逻辑

parent f91868b4
...@@ -679,12 +679,12 @@ const { ...@@ -679,12 +679,12 @@ const {
const userTaskListenerRef = ref() const userTaskListenerRef = ref()
// 节点类型名称 /** 节点类型名称 */
const nodeTypeName = computed(() => { const nodeTypeName = computed(() => {
return currentNode.value.type === NodeType.TRANSACTOR_NODE ? '办理' : '审批' return currentNode.value.type === NodeType.TRANSACTOR_NODE ? '办理' : '审批'
}) })
// 保存配置 /** 保存配置 */
const saveConfig = async () => { const saveConfig = async () => {
// activeTabName.value = 'user' // activeTabName.value = 'user'
// 设置审批节点名称 // 设置审批节点名称
...@@ -770,7 +770,7 @@ const saveConfig = async () => { ...@@ -770,7 +770,7 @@ const saveConfig = async () => {
return true return true
} }
// 显示审批节点配置, 由父组件传过来 /** 显示审批节点配置, 由父组件传过来 */
const showUserTaskNodeConfig = (node: SimpleFlowNode) => { const showUserTaskNodeConfig = (node: SimpleFlowNode) => {
nodeName.value = node.name nodeName.value = node.name
// 1 审批类型 // 1 审批类型
...@@ -849,9 +849,7 @@ const showUserTaskNodeConfig = (node: SimpleFlowNode) => { ...@@ -849,9 +849,7 @@ const showUserTaskNodeConfig = (node: SimpleFlowNode) => {
defineExpose({ openDrawer, showUserTaskNodeConfig }) // 暴露方法给父组件 defineExpose({ openDrawer, showUserTaskNodeConfig }) // 暴露方法给父组件
/** /** 操作按钮设置 */
* @description 操作按钮设置
*/
function useButtonsSetting() { function useButtonsSetting() {
const buttonsSetting = ref<ButtonSetting[]>() const buttonsSetting = ref<ButtonSetting[]>()
// 操作按钮显示名称可编辑 // 操作按钮显示名称可编辑
...@@ -872,9 +870,7 @@ function useButtonsSetting() { ...@@ -872,9 +870,7 @@ function useButtonsSetting() {
} }
} }
/** /** 审批人超时未处理配置 */
* @description 审批人超时未处理配置
*/
function useTimeoutHandler() { function useTimeoutHandler() {
// 时间单位 // 时间单位
const timeUnit = ref(TimeUnitType.HOUR) const timeUnit = ref(TimeUnitType.HOUR)
......
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
> >
<span <span
:class="`iconfont ${currentNode.type === NodeType.TRANSACTOR_NODE ? 'icon-transactor' : 'icon-approve'}`" :class="`iconfont ${currentNode.type === NodeType.TRANSACTOR_NODE ? 'icon-transactor' : 'icon-approve'}`"
></span> >
</span>
</div> </div>
<input <input
v-if="!readonly && showInput" v-if="!readonly && showInput"
......
...@@ -36,10 +36,10 @@ ...@@ -36,10 +36,10 @@
:rule="approveForm.rule" :rule="approveForm.rule"
/> />
</el-card> </el-card>
<el-form-item :label="`${taskName}意见`" prop="reason"> <el-form-item :label="`${nodeTypeName}意见`" prop="reason">
<el-input <el-input
v-model="approveReasonForm.reason" v-model="approveReasonForm.reason"
:placeholder="`请输入${taskName}意见`" :placeholder="`请输入${nodeTypeName}意见`"
type="textarea" type="textarea"
:rows="4" :rows="4"
/> />
...@@ -547,6 +547,7 @@ const returnList = ref([] as any) // 退回节点 ...@@ -547,6 +547,7 @@ const returnList = ref([] as any) // 退回节点
const runningTask = ref<any>() // 运行中的任务 const runningTask = ref<any>() // 运行中的任务
const approveForm = ref<any>({}) // 审批通过时,额外的补充信息 const approveForm = ref<any>({}) // 审批通过时,额外的补充信息
const approveFormFApi = ref<any>({}) // approveForms 的 fAPi const approveFormFApi = ref<any>({}) // approveForms 的 fAPi
const nodeTypeName = ref('审批') // 节点类型名称
// 审批通过意见表单 // 审批通过意见表单
const reasonRequire = ref() const reasonRequire = ref()
...@@ -560,7 +561,7 @@ const approveReasonForm = reactive({ ...@@ -560,7 +561,7 @@ const approveReasonForm = reactive({
const approveReasonRule = computed(() => { const approveReasonRule = computed(() => {
return { return {
reason: [ reason: [
{ required: reasonRequire.value, message: taskName + '意见不能为空', trigger: 'blur' } { required: reasonRequire.value, message: nodeTypeName + '意见不能为空', trigger: 'blur' }
], ],
signPicUrl: [{ required: true, message: '签名不能为空', trigger: 'change' }] signPicUrl: [{ required: true, message: '签名不能为空', trigger: 'change' }]
} }
...@@ -970,14 +971,12 @@ const getButtonDisplayName = (btnType: OperationButtonType) => { ...@@ -970,14 +971,12 @@ const getButtonDisplayName = (btnType: OperationButtonType) => {
return displayName return displayName
} }
const taskName = ref('审批')
const loadTodoTask = (task: any) => { const loadTodoTask = (task: any) => {
approveForm.value = {} approveForm.value = {}
approveFormFApi.value = {} approveFormFApi.value = {}
runningTask.value = task runningTask.value = task
reasonRequire.value = task?.reasonRequire ?? false reasonRequire.value = task?.reasonRequire ?? false
taskName.value = task?.nodeType === NodeType.TRANSACTOR_NODE ? '办理' : '审批' nodeTypeName.value = task?.nodeType === NodeType.TRANSACTOR_NODE ? '办理' : '审批'
// 处理 approve 表单. // 处理 approve 表单.
if (task && task.formId && task.formConf) { if (task && task.formId && task.formConf) {
const tempApproveForm = {} const tempApproveForm = {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment