fix(房间主题审批): 处理搜索栏切换到“等待审核”时一直显示加载动画的问题

This commit is contained in:
hzj 2026-06-01 16:24:38 +08:00
parent 89b748a69c
commit c8ea35e51c

View File

@ -209,6 +209,7 @@ export default {
const that = this const that = this
const querySystem = this.permissionsSysOriginPlatforms[0] const querySystem = this.permissionsSysOriginPlatforms[0]
if (!querySystem) { if (!querySystem) {
that.listLoading = false
return return
} }
that.listQuery.sysOrigin = querySystem.value that.listQuery.sysOrigin = querySystem.value
@ -219,24 +220,40 @@ export default {
const that = this const that = this
that.listLoading = true that.listLoading = true
that.checkList = [] that.checkList = []
that.isIndeterminate = true that.checkAll = false
that.isIndeterminate = false
if (isClean === true) { if (isClean === true) {
that.list = [] that.list = []
that.listQuery.cursor = 1 that.listQuery.cursor = 1
} }
pageRoomThemeApproval(that.listQuery).then(res => { pageRoomThemeApproval(that.listQuery).then(res => {
const { body } = res const body = res.body || {}
that.total = body.total || 0 that.total = body.total || 0
that.list = body.records that.list = (body.records || []).map(that.normalizeThemeApprovalItem)
that.listLoading = false
}).catch(er => { }).catch(er => {
that.listLoading = false
console.error(er) console.error(er)
}).then(() => {
that.listLoading = false
}) })
}, },
handleSearch() { handleSearch() {
this.renderData(true) this.renderData(true)
}, },
normalizeThemeApprovalItem(row) {
const customize = Object.assign({}, row.customize || {
id: row.id,
themeBack: row.themeBack,
themeMoney: row.themeMoney
})
const userProfile = Object.assign({}, row.userProfile || row.userBaseInfo || {})
if (!userProfile.id) {
userProfile.id = row.userId
}
return Object.assign({}, row, {
customize,
userProfile
})
},
accountHanle(userId) { accountHanle(userId) {
this.accountHandleVisible = true this.accountHandleVisible = true
this.thatSelectedUserId = userId this.thatSelectedUserId = userId