Commit 2e057e0a by liuxin

Mgrtsk定时任务(前端实现)

parent 65e9d8e4
...@@ -335,6 +335,7 @@ export default { ...@@ -335,6 +335,7 @@ export default {
data: [], data: [],
}, },
buttonFlag:false, buttonFlag:false,
timer: null
}; };
}, },
methods: { methods: {
...@@ -352,14 +353,24 @@ export default { ...@@ -352,14 +353,24 @@ export default {
} }
}, },
Start() { Start() {
this.buttonFlag = false; this.buttonFlag = true;
let rtnmsg = this.executeRule("wfetsk.tsklist.butstr"); let rtnmsg = this.executeRule("wfetsk.tsklist.butstr");
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
} }
//定时任务
var timeVal = this.model.wfetsk.tsklist.redotime * 1000;
var that = this;
this.timer = setInterval(function(){
let rtnmsg = that.executeRule("wfetsk.tsklist.butstr");
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
}
}, timeVal);
}, },
Stop() { Stop() {
this.buttonFlag = true; this.buttonFlag = false;
clearInterval(this.timer);
let rtnmsg = this.executeRule("wfetsk.tsklist.butstp"); let rtnmsg = this.executeRule("wfetsk.tsklist.butstp");
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
......
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 to comment