diff --git a/frontend/src/components/gridTable/index.vue b/frontend/src/components/gridTable/index.vue index 9754c48897..22c40b389e 100644 --- a/frontend/src/components/gridTable/index.vue +++ b/frontend/src/components/gridTable/index.vue @@ -108,6 +108,7 @@ export default { handler() { this.$nextTick(() => { this.$refs.table.doLayout() + this.$emit('columnsChange') }) }, deep: true diff --git a/frontend/src/views/dataset/add/AddSQL.vue b/frontend/src/views/dataset/add/AddSQL.vue index ad99840b4f..d3cef63e5c 100644 --- a/frontend/src/views/dataset/add/AddSQL.vue +++ b/frontend/src/views/dataset/add/AddSQL.vue @@ -138,7 +138,7 @@ - {{ (showTable && fieldData.length) || tableData.length }} + {{ (showTable && fieldDataCopy.length) || tableDataCopy.length }}

diff --git a/frontend/src/views/system/datasource/DsFormContent.vue b/frontend/src/views/system/datasource/DsFormContent.vue index 7af186cf52..bd2744b18f 100644 --- a/frontend/src/views/system/datasource/DsFormContent.vue +++ b/frontend/src/views/system/datasource/DsFormContent.vue @@ -1114,6 +1114,25 @@ export default { } }) }, + reloadStatus(apiConfiguration = []) { + let arr = [] + let arrError = [] + let arrSuccess = [] + if (!Array.isArray(apiConfiguration)) { + arr = JSON.parse(apiConfiguration) + if (!Array.isArray(arr)) return + } + arrError = arr.filter(ele => ele.status === 'Error').map(ele => ele.name) + arrSuccess = arr.filter(ele => ele.status === 'Success').map(ele => ele.name) + this.form.apiConfiguration.forEach(ele => { + if (arrError.includes(ele.name)) { + ele.status = 'Error' + } + if (arrSuccess.includes(ele.name)) { + ele.status = 'Success' + } + }) + }, validaDatasource() { if (!this.form.configuration.schema && this.form.type === 'oracle') { this.openMessageSuccess('datasource.please_choose_schema', 'error') @@ -1167,6 +1186,9 @@ export default { if (res.success) { this.openMessageSuccess('datasource.validate_success') } else { + if (data.type === 'api') { + this.reloadStatus(res.data?.configuration) + } if (res.message.length < 2500) { this.openMessageSuccess(res.message, 'error') } else { diff --git a/frontend/src/views/system/user/index.vue b/frontend/src/views/system/user/index.vue index be0894105c..a45d78fb37 100644 --- a/frontend/src/views/system/user/index.vue +++ b/frontend/src/views/system/user/index.vue @@ -118,13 +118,16 @@ v-loading="$store.getters.loadingMap[$store.getters.currentPath]" :table-data="data" :columns="checkedColumnNames" + current-row-key="email" :pagination="paginationConfig" + @columnsChange="columnsChange" @sort-change="sortChange" @size-change="handleSizeChange" @current-change="handleCurrentChange" > --> @@ -237,6 +241,7 @@ dom.offsetWidth }) }, + columnsChange() { + const arr = this.data + this.data = [] + this.$nextTick(() => { + this.data = arr + }) + }, search() { const param = { orders: formatOrders(this.orderConditions),