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

View File

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

View File

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

View File

@ -139,7 +139,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('请求服务')" align="center"> <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 }"> <template #default="{ row }">
<p> <p>
{{ apis?.find((x) => x.pathCrc32 === row.apiPathCrc32)?.id }} {{ apis?.find((x) => x.pathCrc32 === row.apiPathCrc32)?.id }}