|
@@ -88,6 +88,7 @@ export default {
|
|
|
allApplyFlag: false, //全量执行flag
|
|
|
force: false, //默认增量执行 ----- false - 增量 true - 全量执行
|
|
|
isPending: false, //是否执行中:执行中禁用所有功能 true即为执行中
|
|
|
+ missionID: '', //任务id
|
|
|
};
|
|
|
},
|
|
|
components: {
|
|
@@ -109,8 +110,29 @@ export default {
|
|
|
let param = { Related: true };
|
|
|
//对象类型
|
|
|
this.getTypeNames();
|
|
|
- //获取 执行反馈
|
|
|
- this.getPrompt();
|
|
|
+ //获取 任务列表
|
|
|
+ this.getMissionList();
|
|
|
+ },
|
|
|
+ //查询任务列表
|
|
|
+ getMissionList() {
|
|
|
+ dynamicExecuteFeedback({ Id: null }, res => {
|
|
|
+ let missionList = res.Content
|
|
|
+ missionList.map(mission => {
|
|
|
+ if ('Success/Fail'.indexOf(mission.Completed) > -1) {
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.missionID = mission.Id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (this.missionID) {
|
|
|
+ this.isPending = true;
|
|
|
+ this.tipsType = 0;
|
|
|
+ this.getExecuteFeedback(this.missionID)
|
|
|
+ } else {
|
|
|
+ this.isPending = false;
|
|
|
+ this.getPrompt()
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
//获取提示消息
|
|
|
getPrompt() {
|
|
@@ -198,16 +220,16 @@ export default {
|
|
|
dynamicExecuteFeedback(param, res => {
|
|
|
this.allApplyClose()
|
|
|
let response = res.Content[0]
|
|
|
- if (response.Completed == 'Waiting' || response.Completed == 'Pending') {
|
|
|
- this.isPending = true;
|
|
|
- this.tipsType = 0;
|
|
|
+ if ('Success/Fail'.indexOf(response.Completed) > -1) {
|
|
|
setTimeout(() => {
|
|
|
- this.getExecuteFeedback(missionID)
|
|
|
+ this.isPending = false;
|
|
|
+ this.getPrompt()
|
|
|
}, 2000)
|
|
|
} else {
|
|
|
+ this.isPending = true;
|
|
|
+ this.tipsType = 0;
|
|
|
setTimeout(() => {
|
|
|
- this.isPending = false;
|
|
|
- this.getPrompt()
|
|
|
+ this.getExecuteFeedback(missionID)
|
|
|
}, 2000)
|
|
|
}
|
|
|
})
|