diff --git a/ElectronJS/server.js b/ElectronJS/server.js index ee324b5..645443c 100644 --- a/ElectronJS/server.js +++ b/ElectronJS/server.js @@ -362,6 +362,9 @@ exports.start = function(port = 8074) { if (file_names.length != 0) { eid = Math.max(...file_names) + 1; } + if(body["EID"]!="" && body["EID"] != undefined){ //覆盖原有的执行实例 + eid = parseInt(body["EID"]); + } task["id"] = eid; task = JSON.stringify(task); fs.writeFile(path.join(getDir(), `execution_instances/${eid}.json`), task, (err) => {}); diff --git a/ElectronJS/src/img/animation_en.gif b/ElectronJS/src/img/animation_en.gif index cea4d06..612de85 100644 Binary files a/ElectronJS/src/img/animation_en.gif and b/ElectronJS/src/img/animation_en.gif differ diff --git a/ElectronJS/src/img/animation_zh.gif b/ElectronJS/src/img/animation_zh.gif index 12e0aa8..dee57a0 100644 Binary files a/ElectronJS/src/img/animation_zh.gif and b/ElectronJS/src/img/animation_zh.gif differ diff --git a/ElectronJS/src/taskGrid/executeTask.html b/ElectronJS/src/taskGrid/executeTask.html index a45ba1e..c50ab55 100644 --- a/ElectronJS/src/taskGrid/executeTask.html +++ b/ElectronJS/src/taskGrid/executeTask.html @@ -31,21 +31,36 @@ .ID { width: 10%; } - .excel th,.excel td{ + .excel th,.excel td { text-align: center; font-size: 13px; padding: 10px; max-width: 200px!important; } + .tip { + position: fixed; + width:100%; + display: none; + z-index: 1000; + top:0; + }
- - +
+ 提示:请先获得任务ID! +
+
+ Hint: Please get EID first! +
+
+ 提示:任务执行ID对应配置文件已更新,您可使用任务ID:来执行加载了新配置的任务。 +
+
+ Hint: The task execution ID corresponds to the configuration file has been updated, you can use the task ID to execute the task with the new configuration.
+
@@ -250,7 +265,7 @@
- +

{{"Hint: Click the \"Get Execution ID\" button at the bottom to get the task ID, and click the \"Execute task by commandline\" button at the back to get the prompt command on how to run this task using the command line.~提示:点击下方“获得任务执行ID”按钮得到任务ID,点击后面的“使用命令行执行任务”按钮获得如何使用命令行运行任务的提示命令。" | lang}}

@@ -309,6 +324,13 @@ //TODO 翻译 写清楚readme有关浏览器版本的问题 logo更换 提示看文档来运行 }, methods: { + LANG: function (zh, en) { + if (this.lang == "zh") { + return zh; + } else { + return en; + } + }, gotoHome: function () { let url = ""; if (getUrlParam("lang") == "zh") { @@ -406,9 +428,25 @@ }); let message = { id: this.task.id, //这里写任务ID号,如1 + EID: this.ID, params: JSON.stringify(param) } $.post(app.$data.backEndAddressServiceWrapper + "/invokeTask", message, function (result) { + if(app.$data.ID == result){ + if (getUrlParam("lang") == "en" || getUrlParam("lang") == "") { + $("#tipID_EN").slideDown(); //提示框 + $("#newID_EN").text(result); + setTimeout(function() { + $("#tipID_EN").slideUp(); + }, 5000); + } else { + $("#tipID").slideDown(); //提示框 + $("#newID_ZH").text(result); + setTimeout(function() { + $("#tipID").slideUp(); + }, 5000); + } + } app.$data.ID = result; //得到返回的ID }); // } @@ -470,6 +508,7 @@ }); $.post(app.$data.backEndAddressServiceWrapper + "/invokeTask", { id: this.task.id, + EID: this.ID, params: JSON.stringify(param) }, function (result) { let message = { //显示flowchart