Skip to content

Commit d58a223

Browse files
committed
refactor: update user options to use nick_name instead of username
1 parent 5f2bb37 commit d58a223

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

ui/src/views/system-resource-management/KnowledgeResourceIndex.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
clearable
3535
style="width: 220px"
3636
>
37-
<el-option v-for="u in user_options" :key="u.id" :value="u.id" :label="u.username" />
37+
<el-option v-for="u in user_options" :key="u.id" :value="u.id" :label="u.nick_name" />
3838
</el-select>
3939
</div>
4040
</div>
@@ -149,6 +149,7 @@ import { t } from '@/locales'
149149
import useStore from '@/stores'
150150
import { datetimeFormat } from '@/utils/time'
151151
import {loadPermissionApi} from "@/utils/dynamics-api/permission-api.ts";
152+
import UserApi from '@/api/user/user'
152153
153154
const { user } = useStore()
154155
@@ -205,6 +206,10 @@ function getList() {
205206
onMounted(() => {
206207
getWorkspaceList()
207208
getList()
209+
210+
UserApi.getAllMemberList('').then((res: any) => {
211+
user_options.value = res.data
212+
})
208213
})
209214
</script>
210215

ui/src/views/system-resource-management/ToolResourceIndex.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
clearable
3535
style="width: 220px"
3636
>
37-
<el-option v-for="u in user_options" :key="u.id" :value="u.id" :label="u.username" />
37+
<el-option v-for="u in user_options" :key="u.id" :value="u.id" :label="u.nick_name" />
3838
</el-select>
3939
</div>
4040
</div>
@@ -170,6 +170,7 @@ import { ToolType } from '@/enums/tool'
170170
import useStore from '@/stores'
171171
import { datetimeFormat } from '@/utils/time'
172172
import {loadPermissionApi} from "@/utils/dynamics-api/permission-api.ts";
173+
import UserApi from "@/api/user/user.ts";
173174
174175
const { user } = useStore()
175176
@@ -227,6 +228,10 @@ function getList() {
227228
onMounted(() => {
228229
getWorkspaceList()
229230
getList()
231+
232+
UserApi.getAllMemberList('').then((res: any) => {
233+
user_options.value = res.data
234+
})
230235
})
231236
</script>
232237

0 commit comments

Comments
 (0)