forked from github/dataease
fix: APi数据源校验完成后状态没有刷新 用户管理页面只读权限查看修改列表项显示数据异常
This commit is contained in:
parent
930c57ad2d
commit
ff6b477586
@ -108,6 +108,7 @@ export default {
|
|||||||
handler() {
|
handler() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.table.doLayout()
|
this.$refs.table.doLayout()
|
||||||
|
this.$emit('columnsChange')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
|
@ -138,7 +138,7 @@
|
|||||||
<svg-icon
|
<svg-icon
|
||||||
:icon-class="showTable ? 'reference-table' : 'reference-field'"
|
:icon-class="showTable ? 'reference-table' : 'reference-field'"
|
||||||
/>
|
/>
|
||||||
{{ (showTable && fieldData.length) || tableData.length }}
|
{{ (showTable && fieldDataCopy.length) || tableDataCopy.length }}
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -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() {
|
validaDatasource() {
|
||||||
if (!this.form.configuration.schema && this.form.type === 'oracle') {
|
if (!this.form.configuration.schema && this.form.type === 'oracle') {
|
||||||
this.openMessageSuccess('datasource.please_choose_schema', 'error')
|
this.openMessageSuccess('datasource.please_choose_schema', 'error')
|
||||||
@ -1167,6 +1186,9 @@ export default {
|
|||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.openMessageSuccess('datasource.validate_success')
|
this.openMessageSuccess('datasource.validate_success')
|
||||||
} else {
|
} else {
|
||||||
|
if (data.type === 'api') {
|
||||||
|
this.reloadStatus(res.data?.configuration)
|
||||||
|
}
|
||||||
if (res.message.length < 2500) {
|
if (res.message.length < 2500) {
|
||||||
this.openMessageSuccess(res.message, 'error')
|
this.openMessageSuccess(res.message, 'error')
|
||||||
} else {
|
} else {
|
||||||
|
@ -118,13 +118,16 @@
|
|||||||
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
|
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
|
||||||
:table-data="data"
|
:table-data="data"
|
||||||
:columns="checkedColumnNames"
|
:columns="checkedColumnNames"
|
||||||
|
current-row-key="email"
|
||||||
:pagination="paginationConfig"
|
:pagination="paginationConfig"
|
||||||
|
@columnsChange="columnsChange"
|
||||||
@sort-change="sortChange"
|
@sort-change="sortChange"
|
||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="username"
|
prop="username"
|
||||||
|
key="username"
|
||||||
label="ID"
|
label="ID"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@ -137,6 +140,7 @@
|
|||||||
<!-- <el-table-column prop="gender" :label="$t('commons.gender')" width="60" /> -->
|
<!-- <el-table-column prop="gender" :label="$t('commons.gender')" width="60" /> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="from"
|
prop="from"
|
||||||
|
key="from"
|
||||||
:label="$t('user.source')"
|
:label="$t('user.source')"
|
||||||
width="80"
|
width="80"
|
||||||
>
|
>
|
||||||
@ -237,6 +241,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
key="__operation"
|
||||||
slot="__operation"
|
slot="__operation"
|
||||||
:label="$t('commons.operating')"
|
:label="$t('commons.operating')"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
@ -554,6 +559,13 @@ export default {
|
|||||||
this.showScroll = dom && dom.scrollWidth > dom.offsetWidth
|
this.showScroll = dom && dom.scrollWidth > dom.offsetWidth
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
columnsChange() {
|
||||||
|
const arr = this.data
|
||||||
|
this.data = []
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.data = arr
|
||||||
|
})
|
||||||
|
},
|
||||||
search() {
|
search() {
|
||||||
const param = {
|
const param = {
|
||||||
orders: formatOrders(this.orderConditions),
|
orders: formatOrders(this.orderConditions),
|
||||||
|
Loading…
Reference in New Issue
Block a user