From 45b5473b72b509f1a8225d8881af09b636e79917 Mon Sep 17 00:00:00 2001 From: break60 <790061044@qq.com> Date: Mon, 2 Dec 2019 20:03:28 +0800 Subject: [PATCH] Ans UI upgrade and component value modification (#1326) --- dolphinscheduler-ui/package.json | 2 +- .../formModel/tasks/_source/commcon.js | 4 +-- .../formModel/tasks/_source/datasource.vue | 14 ++++---- .../formModel/tasks/_source/sqlType.vue | 15 +++++---- .../_source/formModel/tasks/_source/udfs.vue | 2 +- .../pages/dag/_source/formModel/tasks/sql.vue | 14 ++++---- .../definition/pages/list/_source/start.vue | 22 ++++++------- .../definition/pages/list/_source/timing.vue | 16 +++++----- .../udf/pages/function/_source/createUdf.vue | 12 +++---- .../security/pages/queue/_source/list.vue | 2 +- .../pages/tenement/_source/createTenement.vue | 10 +++--- .../pages/users/_source/createUser.vue | 32 +++++++++---------- .../module/components/transfer/resource.vue | 4 +-- .../src/js/module/i18n/locale/en_US.js | 2 +- 14 files changed, 75 insertions(+), 76 deletions(-) diff --git a/dolphinscheduler-ui/package.json b/dolphinscheduler-ui/package.json index 2b08b9e7e6..c61e808956 100644 --- a/dolphinscheduler-ui/package.json +++ b/dolphinscheduler-ui/package.json @@ -14,7 +14,7 @@ "build:combined": "npm run clean && cross-env NODE_ENV=production PUBLIC_PATH=/dolphinscheduler/ui webpack --config ./build/webpack.config.combined.js" }, "dependencies": { - "ans-ui": "0.1.0", + "ans-ui": "1.1.3", "axios": "^0.16.2", "jquery": "1.12.4", "vue": "^2.5.17", diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/commcon.js b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/commcon.js index 1d021572f7..fc8fe654d2 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/commcon.js +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/commcon.js @@ -209,11 +209,11 @@ const typeList = [ */ const sqlTypeList = [ { - id: 0, + id: '0', code: `${i18n.$t('Query')}` }, { - id: 1, + id: '1', code: `${i18n.$t('Non Query')}` } ] diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/datasource.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/datasource.vue index 2528068f49..8bf855b720 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/datasource.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/datasource.vue @@ -35,7 +35,7 @@ @@ -56,7 +56,7 @@ // Data source type(List) typeList: [], // data source - datasource: {}, + datasource: '', // data source(List) datasourceList: [] } @@ -77,7 +77,7 @@ } this.$emit('on-dsData', { type: this.type, - datasource: this.datasource.id + datasource: this.datasource }) return true }, @@ -104,10 +104,10 @@ _handleTypeChanged ({ value }) { this.type = value this._getDatasourceData().then(res => { - this.datasource = this.datasourceList.length && this.datasourceList[0] || {} + this.datasource = this.datasourceList.length && this.datasourceList[0].id || '' this.$emit('on-dsData', { type: this.type, - datasource: this.datasource.id + datasource: this.datasource }) }) } @@ -129,11 +129,11 @@ this._getDatasourceData().then(res => { if (_.isEmpty(this.data)) { this.$nextTick(() => { - this.datasource = this.datasourceList[0] + this.datasource = this.datasourceList[0].id }) } else { this.$nextTick(() => { - this.datasource = _.filter(this.datasourceList, v => v.id === this.data.datasource)[0] + this.datasource = this.data.datasource }) } this.$emit('on-dsData', { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/sqlType.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/sqlType.vue index 118ead3f6f..6cad8f1292 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/sqlType.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/sqlType.vue @@ -24,7 +24,7 @@ @@ -41,29 +41,30 @@ // sql(List) sqlTypeList: sqlTypeList, // sql - sqlTypeId: {} + sqlTypeId: '0' } }, mixins: [disabledState], props: { - sqlType: Number + sqlType: String }, methods: { /** * return sqlType */ _handleSqlTypeChanged (val) { - this.$emit('on-sqlType', val.value.id) + this.$emit('on-sqlType', val.value) } }, watch: { }, created () { this.$nextTick(() => { - if (this.sqlType !== null) { - this.sqlTypeId = _.filter(this.sqlTypeList, v => v.id === this.sqlType)[0] + console.log(this.sqlType) + if (this.sqlType != 0) { + this.sqlTypeId = this.sqlType } else { - this.sqlTypeId = this.sqlTypeList[0] + this.sqlTypeId = this.sqlTypeList[0].id } }) }, diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/udfs.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/udfs.vue index ec8aac193d..cc81593538 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/udfs.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/udfs.vue @@ -23,7 +23,7 @@ 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 42f09ebc00..9cef7bb801 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 @@ -35,7 +35,7 @@ :sql-type="sqlType"> -
+
{{$t('Table')}} {{$t('Attachment')}} @@ -43,7 +43,7 @@
-