This commit is contained in:
dzc committed 2026-06-11 14:18:27 +08:00
1 parent e03487a56e
commit 3dfd3f6400
2 files changed
+20 -18

No files matched your search

+16 -4
View File
@@ -1,4 +1,4 @@
import request, {CommonHeaderEnum} from "/@/utils/request"
import request, { CommonHeaderEnum } from "/@/utils/request"
/**
* 同步用户食堂信息
@@ -17,6 +17,18 @@ export const list = () => {
})
}
export const pageSelect = (query: any) => {
return request({
url: "/admin/user/select",
method: "post",
params: {
current: query.current,
size: query.size,
},
data: query,
})
}
export const pageList = (query: any) => {
return request({
url: "/admin/user/page",
@@ -41,9 +53,9 @@ export const getObj = (id: String) => {
return request({
url: "/admin/user/details/" + id,
method: "get",
headers: {
[CommonHeaderEnum.ENC_FLAG]: true,
},
headers: {
[CommonHeaderEnum.ENC_FLAG]: true,
},
})
}
+4 -14
View File
@@ -1,17 +1,7 @@
<template>
<el-select
style="width: 100%"
v-model="state.selectId"
:placeholder="props.placeholder"
clearable
remote-show-suffix
filterable
remote
:remote-method="remoteSearch"
:loading="state.loading"
@visible-change="(e: boolean) => e && getOptions()"
@change="change"
>
<el-select style="width: 100%" v-model="state.selectId" :placeholder="props.placeholder" clearable
remote-show-suffix filterable remote :remote-method="remoteSearch" :loading="state.loading"
@visible-change="(e: boolean) => e && getOptions()" @change="change">
<el-option v-for="v in state.options" :key="v.userId" :label="`${v.name}-${v.phone}`" :value="v.userId">
<div class="flex items-center">
<div class="color-primary">{{ v.name }}</div>
@@ -64,7 +54,7 @@ async function getOptions() {
userId: selectId.value,
...queryForm,
}
const { data } = await userApi.pageList(_pa)
const { data } = await userApi.pageSelect(_pa)
state.options = data.records ?? []
} finally {
setTimeout(() => (state.loading = false), 500)