Skip to content

Commit

Permalink
任务自动流转增加状态修改
Browse files Browse the repository at this point in the history
  • Loading branch information
a54552239 committed Jul 18, 2019
1 parent e4dae52 commit 2415dad
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/assets/js/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ $http.interceptors.response.use(
}, 'notice', 'error', 5);
$router.replace(HOME_PAGE);
return Promise.resolve(response);
case 404:
case 4041:
//资源不存在
notice({
title: response.msg !== '' ? response.msg : '资源不存在',
Expand Down
58 changes: 55 additions & 3 deletions src/components/project/projectConfig.vue
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,18 @@
</a-select>
</div>
</template>
<template>
<div class="workflow-rule-item">
<p>修改任务状态</p>
<a-select size="large" v-model="currentTaskWorkflowRule.state.value"
@change="(value)=>workflowRuleChange(value,'state.value')">
<a-select-option v-for="(state, index) in taskStates"
:value="state.id" :key="state.id">
{{state.name}}
</a-select-option>
</a-select>
</div>
</template>
</template>
<template v-if="currentTaskWorkflowRule.firstResult.action === 3">
<div class="workflow-rule-item">
Expand All @@ -293,6 +305,18 @@
</a-select>
</div>
</template>
<template>
<div class="workflow-rule-item">
<p>修改任务状态</p>
<a-select size="large" v-model="currentTaskWorkflowRule.state.value"
@change="(value)=>workflowRuleChange(value,'state.value')">
<a-select-option v-for="(state, index) in taskStates"
:value="state.id" :key="state.id">
{{state.name}}
</a-select-option>
</a-select>
</div>
</template>
</template>
</template>

Expand Down Expand Up @@ -384,6 +408,10 @@
action: -1,
value: ''
},
state: {//任务状态
action: -1,
value: -1
},
},
taskWorkflowRuleActions: [
{id: -1, name: "请选择"},
Expand All @@ -399,6 +427,11 @@
{id: 0, name: "自动流转到"},
{id: 3, name: "默认指派给"},
],
taskStates: [
{id: -1, name: "不做修改"},
{id: 1, name: "已完成"},
{id: 2, name: "未完成"},
],
projectMembers: [],
taskStages: [],
uploadLoading: false,
Expand Down Expand Up @@ -582,6 +615,11 @@
action: -1,
value: ''
},
taskStates: [
{id: -1, name: "不做修改"},
{id: 1, name: "已完成"},
{id: 2, name: "未完成"},
],
};
}
this.doTaskWorkflowView = true;
Expand Down Expand Up @@ -639,9 +677,23 @@
this.currentTaskWorkflowRule.firstResult.action = rules[2].action;
this.currentTaskWorkflowRule.firstResult.value = rules[2].object_code;
if (rules.length == 4) {
this.currentTaskWorkflowRule.lastResult.action = rules[3].action;
this.currentTaskWorkflowRule.lastResult.value = rules[3].object_code;
if (rules.length >= 4) {
if (!rules[3].object_code) {
this.currentTaskWorkflowRule.state.action = rules[3].action;
this.currentTaskWorkflowRule.state.value = rules[3].action;
}else{
this.currentTaskWorkflowRule.lastResult.action = rules[3].action;
this.currentTaskWorkflowRule.lastResult.value = rules[3].object_code;
}
if (rules.length >= 5) {
if (!rules[4].object_code) {
this.currentTaskWorkflowRule.state.action = rules[4].action;
this.currentTaskWorkflowRule.state.value = rules[4].action;
}else{
this.currentTaskWorkflowRule.lastResult.action = rules[4].action;
this.currentTaskWorkflowRule.lastResult.value = rules[4].object_code;
}
}
}
}
})
Expand Down

0 comments on commit 2415dad

Please sign in to comment.