feat(process) taskreject set businessStatus reject

approve-sys
bob 2 years ago
parent 0f937e0ac6
commit 3460acf401

@ -16,15 +16,5 @@ public class RuoYiApplication
{ {
// System.setProperty("spring.devtools.restart.enabled", "false"); // System.setProperty("spring.devtools.restart.enabled", "false");
SpringApplication.run(RuoYiApplication.class, args); SpringApplication.run(RuoYiApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n" +
" .-------. ____ __ \n" +
" | _ _ \\ \\ \\ / / \n" +
" | ( ' ) | \\ _. / ' \n" +
" |(_ o _) / _( )_ .' \n" +
" | (_,_).' __ ___(_ o _)' \n" +
" | |\\ \\ | || |(_,_)' \n" +
" | | \\ `' /| `-' / \n" +
" | | \\ / \\ / \n" +
" ''-' `'-' `-..-' ");
} }
} }

@ -0,0 +1,43 @@
package com.ruoyi.flowable.common.enums;
/**
*
*
* @author Xuan xuan
* @date 2021/4/19
*/
public enum FlowStatus {
/**
*
*/
REBACK("reback", "退回意见"),
REJECT("reject", "驳回意见"),
DELEGATE("delegate", "委派意见"),
ASSIGN("assign", "转办意见"),
STOP("stop", "终止流程");
/**
*
*/
private final String value;
/**
*
*/
private final String remark;
FlowStatus(String value, String remark) {
this.value = value;
this.remark = remark;
}
public String getValue() {
return value;
}
public String getRemark() {
return remark;
}
}

@ -11,6 +11,7 @@ import com.ruoyi.common.exception.CustomException;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.flowable.common.constant.ProcessConstants; import com.ruoyi.flowable.common.constant.ProcessConstants;
import com.ruoyi.flowable.common.enums.FlowComment; import com.ruoyi.flowable.common.enums.FlowComment;
import com.ruoyi.flowable.common.enums.FlowStatus;
import com.ruoyi.flowable.domain.dto.FlowCommentDto; import com.ruoyi.flowable.domain.dto.FlowCommentDto;
import com.ruoyi.flowable.domain.dto.FlowNextDto; import com.ruoyi.flowable.domain.dto.FlowNextDto;
import com.ruoyi.flowable.domain.dto.FlowTaskDto; import com.ruoyi.flowable.domain.dto.FlowTaskDto;
@ -224,6 +225,8 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
throw new CustomException("无法取消或开始活动"); throw new CustomException("无法取消或开始活动");
} }
runtimeService.updateBusinessStatus(flowTaskVo.getInstanceId(), FlowStatus.REJECT.getValue());
} }
/** /**

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

@ -137,7 +137,7 @@
<el-timeline-item <el-timeline-item
v-for="(item,index ) in flowRecordList" v-for="(item,index ) in flowRecordList"
:key="index" :key="index"
:icon="setIcon(item.finishTime)" :icon="setIcon(item.finishTime, item.comment)"
:color="setColor(item.finishTime)" :color="setColor(item.finishTime)"
> >
<p style="font-weight: 700">{{item.taskName}}</p> <p style="font-weight: 700">{{item.taskName}}</p>
@ -160,7 +160,7 @@
<template slot="label"><i class="el-icon-date"></i>处理时间</template> <template slot="label"><i class="el-icon-date"></i>处理时间</template>
<span v-if="form.submitDate !==undefined && form.submitDate !==''&& form.submitDate !==null">{{form.submitDate}}</span> <span v-if="form.submitDate !==undefined && form.submitDate !==''&& form.submitDate !==null">{{form.submitDate}}</span>
<span v-else>{{item.finishTime}}</span> <span v-else>{{item.finishTime}}</span>
</el-descriptions-item> </el-descriptions-item >
<!-- <el-descriptions-item v-if="item.duration" label-class-name="my-label">--> <!-- <el-descriptions-item v-if="item.duration" label-class-name="my-label">-->
<!-- <template slot="label"><i class="el-icon-time"></i>耗时</template>--> <!-- <template slot="label"><i class="el-icon-time"></i>耗时</template>-->
<!-- {{item.duration}}--> <!-- {{item.duration}}-->
@ -169,6 +169,7 @@
<template slot="label"><i class="el-icon-tickets"></i>处理意见</template> <template slot="label"><i class="el-icon-tickets"></i>处理意见</template>
{{item.comment.comment}} {{item.comment.comment}}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<!-- <p v-if="item.comment">--> <!-- <p v-if="item.comment">-->
@ -176,6 +177,7 @@
<!-- <el-tag type="warning" v-if="item.comment.type === '2'"> {{item.comment.comment}}</el-tag>--> <!-- <el-tag type="warning" v-if="item.comment.type === '2'"> {{item.comment.comment}}</el-tag>-->
<!-- <el-tag type="danger" v-if="item.comment.type === '3'"> {{item.comment.comment}}</el-tag>--> <!-- <el-tag type="danger" v-if="item.comment.type === '3'"> {{item.comment.comment}}</el-tag>-->
<!-- </p>--> <!-- </p>-->
<img v-if="isRefuse(item.comment)" src="@/assets/images/refuse.png" width="50" height="50">
</el-card> </el-card>
</el-timeline-item> </el-timeline-item>
</el-timeline> </el-timeline>
@ -440,8 +442,16 @@ export default {
this.taskList = res.data this.taskList = res.data
}) })
}, },
setIcon(val) { isRefuse(comment) {
if (val) { return comment !== null &&comment !== undefined && comment.type !== null && comment.type !== undefined && comment.type === "3"
},
setIcon(finishTime,comment) {
console.log('setIcon::',comment)
//
if (this.isRefuse(comment)) {
return "el-icon-close";
} else if (finishTime) {
return "el-icon-check"; return "el-icon-check";
} else { } else {
return "el-icon-time"; return "el-icon-time";

Loading…
Cancel
Save