diff --git a/web/src/components/tableSelector/index.vue b/web/src/components/tableSelector/index.vue index d98cff446e27fa134f441f6a6dbec82c24f29ac9..a2a0bdf0f5ae443a87043c38fdf0d70d9e13b1c0 100644 --- a/web/src/components/tableSelector/index.vue +++ b/web/src/components/tableSelector/index.vue @@ -43,6 +43,7 @@ import {defineProps, onMounted, reactive, ref, toRaw, watch} from 'vue' import {dict} from '@fast-crud/fast-crud' import XEUtils from 'xe-utils' +import { request } from '/@/utils/service'; const props = defineProps({ modelValue: {}, @@ -119,16 +120,18 @@ const handleCurrentChange = (val: any) => { * 获取字典值 */ const getDict = async () => { - const url = props.tableConfig.url - const params = { - page: pageConfig.page, - limit: pageConfig.limit, - search: search - } - const dicts = dict({url: url, params: params}) - await dicts.reloadDict() - const dictData: any = dicts.data - const {data, page, limit, total} = dictData + const url = props.tableConfig.url; + const params = { + page: pageConfig.page, + limit: pageConfig.limit, + search: search.value, + }; + const dicts = await request({ + url: url, + method: 'get', + params: params, + }); + const { data, page, limit, total } = dicts; pageConfig.page = page pageConfig.limit = limit pageConfig.total = total