fix:商户下拉
This commit is contained in:
1 parent
4891ac46b2
commit
dbe572a155
3 files changed
+14
-15
No files matched your search
@@ -1,5 +1,13 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function pageJoinSelect(query?: Object) {
|
||||
return request({
|
||||
url: '/wallet/mch-manage/page-join-select',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function pageJoin(query?: Object) {
|
||||
return request({
|
||||
url: '/wallet/mch-manage/page-join',
|
||||
|
||||
@@ -42,8 +42,8 @@ async function getOptions() {
|
||||
const _pa = {
|
||||
...queryForm
|
||||
}
|
||||
const { data } = await deptApi.deptTree()
|
||||
state.options = filterTreeData(data ?? [])
|
||||
const { data } = await deptApi.deptTree(_pa)
|
||||
state.options = data ?? []
|
||||
} finally {
|
||||
setTimeout(() => state.loading = false, 500);
|
||||
}
|
||||
|
||||
@@ -1,16 +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()"
|
||||
>
|
||||
<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()">
|
||||
<el-option v-for="v in state.options" :key="v.id" :label="`${v.name}`" :value="v.id">
|
||||
<div class="flex items-center">
|
||||
<div class="color-primary">{{ v.name }}</div>
|
||||
@@ -65,7 +56,7 @@ async function getOptions() {
|
||||
const _pa = {
|
||||
...queryForm,
|
||||
};
|
||||
const { data } = await mchApi.pageJoin(_pa);
|
||||
const { data } = await mchApi.pageJoinSelect(_pa);
|
||||
state.options = data.records ?? [];
|
||||
} finally {
|
||||
setTimeout(() => (state.loading = false), 500);
|
||||
|
||||
Reference in new issue
Block a user