From fe84c366d4b85ff990d9137644a212b9841edf07 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Fri, 30 Sep 2022 12:09:56 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E6=9B=B4=E6=96=B0):=20?= =?UTF-8?q?=E3=80=90=E6=95=B0=E6=8D=AE=E9=9B=86=E3=80=91=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E5=A2=9E=E9=87=8F=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E5=90=8E=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E8=AF=AD?= =?UTF-8?q?=E5=8F=A5=E5=B0=B1=E6=B2=A1=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/dataset/data/UpdateInfo.vue | 31 +- .../src/views/system/task/DatasetTaskList.vue | 18 +- frontend/src/views/system/task/form.vue | 381 +++++++++--------- 3 files changed, 217 insertions(+), 213 deletions(-) diff --git a/frontend/src/views/dataset/data/UpdateInfo.vue b/frontend/src/views/dataset/data/UpdateInfo.vue index 36ff3c3348..495a6d8354 100644 --- a/frontend/src/views/dataset/data/UpdateInfo.vue +++ b/frontend/src/views/dataset/data/UpdateInfo.vue @@ -596,6 +596,7 @@ export default { handler() { if (hasDataPermission('manage', this.param.privileges)) { this.listTask() + this.getIncrementalConfig() } this.listTaskLog() }, @@ -792,19 +793,6 @@ export default { return false // !hasDataPermission('manage',task.privileges) }, - deleteTask(task) { - const options = { - title: '确定删除该任务吗?', - type: 'primary', - cb: () => { - post('/dataset/task/delete/' + task.id, null).then((response) => { - this.openMessageSuccess('commons.delete_success') - this.initSearch() - }) - } - } - this.handlerConfirm(options) - }, selectDataset(row) { this.disableForm = this.disableEdit(row) this.addTask(row) @@ -869,6 +857,23 @@ export default { } }) }, + getIncrementalConfig() { + post('/dataset/table/incrementalConfig', { tableId: this.table.id }).then(response => { + this.incrementalConfig = response.data + if (this.incrementalConfig.incrementalAdd.length === 0 && this.incrementalConfig.incrementalDelete.length === 0) { + this.incrementalUpdateType = 'incrementalAdd' + this.sql = '' + return + } + if (this.incrementalConfig.incrementalAdd.length > 0) { + this.incrementalUpdateType = 'incrementalAdd' + this.sql = this.incrementalConfig.incrementalAdd + } else { + this.incrementalUpdateType = 'incrementalDelete' + this.sql = this.incrementalConfig.incrementalDelete + } + }) + }, deleteTask(task) { this.$confirm( this.$t('dataset.confirm_delete'), diff --git a/frontend/src/views/system/task/DatasetTaskList.vue b/frontend/src/views/system/task/DatasetTaskList.vue index 1d49e08350..8f06ec7d61 100644 --- a/frontend/src/views/system/task/DatasetTaskList.vue +++ b/frontend/src/views/system/task/DatasetTaskList.vue @@ -163,10 +163,10 @@ {{ - $t(`dataset.${scope.row.lastExecStatus.toLocaleLowerCase()}`) - }} - + >{{ + $t(`dataset.${scope.row.lastExecStatus.toLocaleLowerCase()}`) + }} + - @@ -202,8 +202,9 @@ :label="$t('dataset.task.task_status')" > @@ -589,12 +590,13 @@ export default { }, selectDataset(row) { if (row) { - const { datasetName, id } = row + const { datasetName, id, tableId } = row this.$router.push({ path: '/task-ds-form', query: { datasetName, - id + id, + tableId } }) } else { diff --git a/frontend/src/views/system/task/form.vue b/frontend/src/views/system/task/form.vue index 4b038d7e76..b04ea26ef1 100644 --- a/frontend/src/views/system/task/form.vue +++ b/frontend/src/views/system/task/form.vue @@ -1,5 +1,5 @@ \ No newline at end of file +