refactor: update user option label to use nick_name in Application and Model Resource Index

This commit is contained in:
CaptainB 2025-07-04 10:55:35 +08:00
parent d58a2239e3
commit cb28cfd427
2 changed files with 12 additions and 2 deletions

View File

@ -34,7 +34,7 @@
clearable
style="width: 220px"
>
<el-option v-for="u in user_options" :key="u.id" :value="u.id" :label="u.username" />
<el-option v-for="u in user_options" :key="u.id" :value="u.id" :label="u.nick_name" />
</el-select>
</div>
</div>
@ -161,6 +161,7 @@ import { isAppIcon } from '@/utils/common'
import useStore from '@/stores'
import { datetimeFormat } from '@/utils/time'
import {loadPermissionApi} from "@/utils/dynamics-api/permission-api.ts";
import UserApi from '@/api/user/user.ts'
const { user } = useStore()
@ -215,6 +216,10 @@ function getList() {
onMounted(() => {
getWorkspaceList()
getList()
UserApi.getAllMemberList('').then((res: any) => {
user_options.value = res.data
})
})
</script>

View File

@ -34,7 +34,7 @@
clearable
style="width: 220px"
>
<el-option v-for="u in user_options" :key="u.id" :value="u.id" :label="u.username"/>
<el-option v-for="u in user_options" :key="u.id" :value="u.id" :label="u.nick_name"/>
</el-select>
<el-select
v-else-if="search_type === 'model_type'"
@ -174,6 +174,7 @@ import {t} from '@/locales'
import useStore from '@/stores'
import {datetimeFormat} from '@/utils/time'
import {loadPermissionApi} from "@/utils/dynamics-api/permission-api.ts";
import UserApi from '@/api/user/user.ts'
const {user, model} = useStore()
@ -263,6 +264,10 @@ function getProvider() {
onMounted(() => {
getWorkspaceList()
getProvider()
UserApi.getAllMemberList('').then((res: any) => {
user_options.value = res.data
})
})
</script>