|
@@ -227,7 +227,11 @@
|
|
|
prop="setup"
|
|
|
label="驳回节点:"
|
|
|
>
|
|
|
- <el-select v-model="auditModal.setup" placeholder="请选择">
|
|
|
+ <el-select
|
|
|
+ v-model="auditModal.setup"
|
|
|
+ placeholder="请选择"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in setups"
|
|
|
:key="item.taskKey"
|
|
@@ -422,7 +426,6 @@ export default {
|
|
|
task: {},
|
|
|
reason: "",
|
|
|
// audit
|
|
|
- TASK_AUDIT_RESULT: { ...TASK_AUDIT_RESULT, EXCHANGE: "转他人审批" },
|
|
|
flows: [],
|
|
|
setups: [],
|
|
|
auditModal: {
|
|
@@ -495,6 +498,14 @@ export default {
|
|
|
? this.editType === "AUDIT"
|
|
|
: this.curTaskApply.setup > 1;
|
|
|
},
|
|
|
+ IS_PRELAST_STEP() {
|
|
|
+ return this.curTaskApply.setup === this.flows.length - 1;
|
|
|
+ },
|
|
|
+ TASK_AUDIT_RESULT() {
|
|
|
+ return this.IS_PRELAST_STEP
|
|
|
+ ? { PASS: "通过" }
|
|
|
+ : { ...TASK_AUDIT_RESULT, EXCHANGE: "转他人审批" };
|
|
|
+ },
|
|
|
cardTodoName() {
|
|
|
let name = "创建答题卡";
|
|
|
if (this.curTaskApply.cardId) {
|
|
@@ -590,6 +601,7 @@ export default {
|
|
|
|
|
|
const flowData = await taskAllFlowSetups(this.curTaskApply.flowId);
|
|
|
const curSetup = this.curTaskApply.setup;
|
|
|
+ const curStepIsLast = curSetup === flowData.length;
|
|
|
this.flows = flowData.map(item => {
|
|
|
item.status =
|
|
|
curSetup > item.setup
|
|
@@ -610,15 +622,16 @@ export default {
|
|
|
|
|
|
const curFlow = this.flows.find(item => item.isCurrent);
|
|
|
if (curFlow) {
|
|
|
- this.setups = this.flows
|
|
|
- .filter(item => item.setup < curFlow.setup)
|
|
|
- .map(item => {
|
|
|
- return {
|
|
|
- taskKey: item.taskKey,
|
|
|
- setup: item.setup,
|
|
|
- taskName: item.taskName
|
|
|
- };
|
|
|
- });
|
|
|
+ const flows = curStepIsLast
|
|
|
+ ? this.flows.slice(-2, -1)
|
|
|
+ : this.flows.filter(item => item.setup < curFlow.setup);
|
|
|
+ this.setups = flows.map(item => {
|
|
|
+ return {
|
|
|
+ taskKey: item.taskKey,
|
|
|
+ setup: item.setup,
|
|
|
+ taskName: `【${item.taskName}】${item.firstUser}`
|
|
|
+ };
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
// 下一节点审批人
|