aggragation for pagination and filters

This commit is contained in:
2025-12-24 19:04:30 +03:30
parent 285ee03ae5
commit a1f099a936
2 changed files with 96 additions and 34 deletions
+14 -1
View File
@@ -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 {