From be3550cf054dfaa9976a966f0648f24dd17d7347 Mon Sep 17 00:00:00 2001 From: break60 <790061044@qq.com> Date: Mon, 17 Aug 2020 18:22:33 +0800 Subject: [PATCH] [ui]Script input box to modify the delay loading time --- dolphinscheduler-ui/.env | 4 ++-- .../home/pages/dag/_source/formModel/tasks/datax.vue | 6 +++--- .../home/pages/dag/_source/formModel/tasks/python.vue | 9 ++++++--- .../conf/home/pages/dag/_source/formModel/tasks/sql.vue | 9 ++++++--- .../home/pages/dag/_source/formModel/tasks/sqoop.vue | 9 ++++++--- .../conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js | 2 +- 6 files changed, 24 insertions(+), 15 deletions(-) diff --git a/dolphinscheduler-ui/.env b/dolphinscheduler-ui/.env index e676be605..462b026b8 100644 --- a/dolphinscheduler-ui/.env +++ b/dolphinscheduler-ui/.env @@ -14,7 +14,7 @@ # limitations under the License. # back end interface address -API_BASE = http://192.168.xx.xx:12345 +API_BASE = http://192.168.220.189:12345 # If IP access is required for local development, remove the "#" -#DEV_HOST = 192.168.xx.xx +DEV_HOST = http://172.16.99.31 diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/datax.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/datax.vue index 9347b34dd..46c8c1754 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/datax.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/datax.vue @@ -207,7 +207,7 @@ this.customConfig = 0 setTimeout(() => { this._handlerEditor() - }, 200) + }, 350) } }, /** @@ -431,11 +431,11 @@ if(this.customConfig) { setTimeout(() => { this._handlerJsonEditor() - }, 200) + }, 350) } else { setTimeout(() => { this._handlerEditor() - }, 200) + }, 350) } }, destroyed () { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/python.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/python.vue index 117c05059..379de6a0d 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/python.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/python.vue @@ -321,9 +321,12 @@ } }, mounted () { - setTimeout(() => { - this._handlerEditor() - }, 200) + // Added delay loading in script input box + this.$nextTick(() => { + setTimeout(() => { + this._handlerEditor() + }, 350) + }) }, destroyed () { editor.toTextArea() // Uninstall diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sql.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sql.vue index 9217f7145..17a09e68b 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sql.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sql.vue @@ -447,9 +447,12 @@ } }, mounted () { - setTimeout(() => { - this._handlerEditor() - }, 200) + // Added delay loading in script input box + this.$nextTick(() => { + setTimeout(() => { + this._handlerEditor() + }, 350) + }) }, destroyed () { /** diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sqoop.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sqoop.vue index 6594ffcf7..2ff3dbf6f 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sqoop.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sqoop.vue @@ -982,9 +982,12 @@ }, mounted () { - setTimeout(() => { - this._handlerEditor() - }, 200) + // Added delay loading in script input box + this.$nextTick(() => { + setTimeout(() => { + this._handlerEditor() + }, 350) + }) setTimeout(() => { this.srcQueryType = this.sourceMysqlParams.srcQueryType diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js index 07871b2c9..f71f6cf22 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js @@ -677,7 +677,7 @@ JSP.prototype.saveStore = function () { Vue.$message.warning(`${i18n.$t('The workflow canvas is abnormal and cannot be saved, please recreate')}`) return false } - // return false + // Storage node store.commit('dag/setTasks', tasks) // Store coordinate information -- GitLab