diff --git a/src/views/approval/room-theme-approval/index.vue b/src/views/approval/room-theme-approval/index.vue index 1679b21..b4b1211 100644 --- a/src/views/approval/room-theme-approval/index.vue +++ b/src/views/approval/room-theme-approval/index.vue @@ -209,6 +209,7 @@ export default { const that = this const querySystem = this.permissionsSysOriginPlatforms[0] if (!querySystem) { + that.listLoading = false return } that.listQuery.sysOrigin = querySystem.value @@ -219,24 +220,40 @@ export default { const that = this that.listLoading = true that.checkList = [] - that.isIndeterminate = true + that.checkAll = false + that.isIndeterminate = false if (isClean === true) { that.list = [] that.listQuery.cursor = 1 } pageRoomThemeApproval(that.listQuery).then(res => { - const { body } = res + const body = res.body || {} that.total = body.total || 0 - that.list = body.records - that.listLoading = false + that.list = (body.records || []).map(that.normalizeThemeApprovalItem) }).catch(er => { - that.listLoading = false console.error(er) + }).then(() => { + that.listLoading = false }) }, handleSearch() { 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) { this.accountHandleVisible = true this.thatSelectedUserId = userId