fix: 🐛 档案管理空列表loading状态

This commit is contained in:
tk 2024-12-23 10:33:49 +08:00 committed by nsnail
parent 377c28c570
commit ac4bb50b66
4 changed files with 14 additions and 7 deletions

View File

@ -338,17 +338,18 @@ export default {
},
}
},
mounted() {
async mounted() {
this.pagerCount = document.body.clientWidth < 1000 ? 3 : 11
//
if (this.column) {
this.getCustomColumn()
await this.getCustomColumn()
} else {
this.userColumn = this.column
}
//
if (this.queryApi) {
this.getData()
const res = await this.getData()
this.$emit('dataChange', res, this.tableData)
} else if (this.data) {
this.tableData = this.data
this.total = this.tableData.length
@ -519,7 +520,7 @@ export default {
this.loading = false
}
this.$refs.scTable?.setScrollTop(0)
this.$emit('dataChange', res, this.tableData)
return res
},
//
_clearData() {

View File

@ -163,7 +163,7 @@ export default {
inject: ['reload'],
methods: {
async getStatistics() {
this.statistics.total = this.$refs.table?.total
this.statistics.total = this.$refs.table?.tableData?.length
const res = await Promise.all([
this.$API.sys_dept.countBy.post({
dynamicFilter: {

View File

@ -300,7 +300,13 @@ export default {
}),
this.$API.sys_job.countBy.post({
dynamicFilter: {
filters: this.query.dynamicFilter.filters,
filters: [
...this.query.dynamicFilter.filters,
{
field: 'LastStatusCode',
operator: 'notEqual',
},
],
},
requiredFields: ['LastStatusCode'],
}),

View File

@ -139,7 +139,7 @@
</template>
</el-table-column>
<el-table-column :label="$t('请求服务')" align="center">
<el-table-column :label="$t('路径')" prop="apiPathCrc32" show-overflow-tooltip sortable="custom">
<el-table-column :label="$t('路径')" min-width="300" prop="apiPathCrc32" show-overflow-tooltip sortable="custom">
<template #default="{ row }">
<p>
{{ apis?.find((x) => x.pathCrc32 === row.apiPathCrc32)?.id }}