From d6130b685de076b8f6514fec4739ed5d5d6e0bcb Mon Sep 17 00:00:00 2001 From: zhangdaiscott Date: Thu, 29 Sep 2022 17:11:27 +0800 Subject: [PATCH] =?UTF-8?q?online=E6=8A=A5=E8=A1=A8=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E5=8F=82=E6=95=B0=EF=BC=8C=E4=B8=8D=E7=94=9F=E6=95=88=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/jeecg/OnLine/hooks/usePopBiz.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/jeecg/OnLine/hooks/usePopBiz.ts b/src/components/jeecg/OnLine/hooks/usePopBiz.ts index e3a5cc4..6d2268c 100644 --- a/src/components/jeecg/OnLine/hooks/usePopBiz.ts +++ b/src/components/jeecg/OnLine/hooks/usePopBiz.ts @@ -512,6 +512,8 @@ export function usePopBiz(props, tableRef?) { //查询条件加载后再请求数据 if (data) { setDataSource(data); + //传递路由参数和动态参数,不生效, + loadData(1); } else { //没有传递data时查询数据 loadData(1); @@ -531,6 +533,7 @@ export function usePopBiz(props, tableRef?) { pagination.current = 1; } let params = getQueryParams(); //查询条件 + console.log('params', params); loading.value = true; let url = `${configUrl.getData}${unref(cgRpConfigId)}`; //缓存key @@ -597,6 +600,11 @@ export function usePopBiz(props, tableRef?) { } queryParam.value = { ...queryTemp }; } + // 合并路由参数 + if (props.routeQuery) { + queryParam.value = Object.assign(queryParam.value, props.routeQuery); + } + let dynamicTemp = {}; if (props.param) { Object.keys(props.param).map((key) => {