aggragation for pagination and filters
This commit is contained in:
@@ -93,7 +93,7 @@
|
||||
|
||||
<el-table-column label="محل سکونت" width="">
|
||||
<template slot-scope="scope">
|
||||
{{ scope?.row?.userId?.province_name + ', ' + scope?.row?.userId?.city_name }}
|
||||
{{ getLocationText(scope?.row?.userId) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -250,6 +250,19 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getLocationText(user) {
|
||||
if (!user) return ''
|
||||
|
||||
const province = typeof user.province_name === 'string'
|
||||
? user.province_name
|
||||
: user.province_name?.provinceName || ''
|
||||
|
||||
const city = typeof user.city_name === 'string'
|
||||
? user.city_name
|
||||
: user.city_name?.cityName || ''
|
||||
|
||||
return [province, city].filter(Boolean).join(', ') || '-'
|
||||
},
|
||||
async fetchData() {
|
||||
this.loading = true
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user