From 9d2d794448c70fc6b299fdbdacfb05312d2fb326 Mon Sep 17 00:00:00 2001 From: "liu.tao3" Date: Thu, 20 Jul 2023 17:53:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=8C=89=E9=92=AE=E6=B7=BB=E5=8A=A0loadin?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../packages/DataSetManagement/src/index.vue | 15 ++++++++++----- .../packages/DataSourceManagement/src/index.vue | 5 +++++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/data-room-ui/packages/DataSetManagement/src/index.vue b/data-room-ui/packages/DataSetManagement/src/index.vue index 771d0c0a..97706d63 100644 --- a/data-room-ui/packages/DataSetManagement/src/index.vue +++ b/data-room-ui/packages/DataSetManagement/src/index.vue @@ -198,8 +198,9 @@ 删除 @@ -445,9 +446,10 @@ export default { this.curRow = currentRow }, // 删除数据集 - delDataset (id) { - datasetCheck(id).then((res)=>{ - console.log(res) + delDataset (row) { + row.loading=true + datasetCheck(row.id).then((res)=>{ + row.loading=false if(res.canDelete){ this.$confirm('确定删除当前数据集吗?', '提示', { confirmButtonText: '确定', @@ -455,7 +457,7 @@ export default { type: 'warning', customClass: 'bs-el-message-box' }).then(() => { - datasetRemove(id).then(res => { + datasetRemove(row.id).then(res => { this.init(false) this.$message.success('删除成功') }) @@ -575,6 +577,9 @@ export default { datasetType: this.queryForm.datasetType === '' ? [...this.allType] : [this.queryForm.datasetType] }).then((data) => { this.tableData = data.list + this.tableData.forEach(r => { + this.$set(r, 'loading', false) + }) if (this.isDialog) { if (this.multiple && this.multipleSelection.length) { this.toggleRowSelection() diff --git a/data-room-ui/packages/DataSourceManagement/src/index.vue b/data-room-ui/packages/DataSourceManagement/src/index.vue index 5d4db73a..0464843d 100644 --- a/data-room-ui/packages/DataSourceManagement/src/index.vue +++ b/data-room-ui/packages/DataSourceManagement/src/index.vue @@ -96,6 +96,7 @@ @@ -188,6 +189,7 @@ export default { reasonList:[], testBtnLoading: [], loadingText: '', + deling:false, searchLoading: false, dataSourceList: [], searchForm: { @@ -255,6 +257,7 @@ export default { this.dataSourceList = data.list this.dataSourceList.forEach(r => { r.status = 0 + this.$set(r, 'loading', false) if (r.id === this.sourceId) { this.curRow = r } @@ -279,7 +282,9 @@ export default { handleDelete (row) { // eslint-disable-next-line eqeqeq if (row.editable == 1 && !this.appCode) return + row.loading=true dataSourceCheck(row.id).then((res)=>{ + row.loading=false if(res.canDelete){ this.$confirm('确定删除当前数据源吗?', '提示', { confirmButtonText: '确定',