refactor: update user options to use nick_name instead of username

This commit is contained in:
CaptainB 2025-07-04 10:51:58 +08:00
parent 5f2bb37626
commit d58a2239e3
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>
@ -149,6 +149,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'
const { user } = useStore()
@ -205,6 +206,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>
</div>
</div>
@ -170,6 +170,7 @@ import { ToolType } from '@/enums/tool'
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()
@ -227,6 +228,10 @@ function getList() {
onMounted(() => {
getWorkspaceList()
getList()
UserApi.getAllMemberList('').then((res: any) => {
user_options.value = res.data
})
})
</script>