Commit 00d6a951 authored by 田翔's avatar 田翔

fix: 台账增加SQL语句过滤

parent 39623860
{
"name": "panda-xform",
"version": "5.9.17",
"description": "5.9.17 配置整体布局优化",
"version": "5.9.18",
"description": "5.9.18 台账增加SQL语句过滤",
"keywords": [
"panda-xform"
],
......
......@@ -99,8 +99,8 @@ const Account = (props, ref) => {
if (type === '重置') {
tablePackRef.current.setFilteredInfo({});
tablePackRef.current.setSortedInfo({});
setParams(initParams);
getDataSource(initParams);
setParams({ ...initParams, accountName: treeData?.[0]?.accountName || accountName });
getDataSource({ ...initParams, accountName: treeData?.[0]?.accountName || accountName });
}
if (type === '编辑' || type === '详情') {
setOperation({ type, id: row.ID });
......@@ -302,7 +302,13 @@ const Account = (props, ref) => {
if (code === 0) {
setConfig({ ...data, formJson: isJson(data.formJson) ? JSON.parse(data.formJson) : {} });
setParams({ ...params, pageSize: data.pageSize || 20 });
getDataSource({ siteFilter: Boolean(data.enableSiteFilter), accountName, pageSize: data.pageSize || 20 });
let param = {
condition: data?.sqlFilter ? window.btoa(encodeURIComponent(data?.sqlFilter)) : '',
siteFilter: Boolean(data.enableSiteFilter),
accountName,
pageSize: data.pageSize || 20
}
getDataSource(param);
} else {
message.error(msg);
}
......
......@@ -63,7 +63,7 @@ const AccountSelector = (props) => {
const { code, data } = await GetAccountConfigInfo(accountName);
if (code == 0) {
setConfig({ ...data, formJson: isJson(data.formJson) ? JSON.parse(data.formJson) : {} })
getDataSource()
getDataSource({ condition: data?.sqlFilter ? window.btoa(encodeURIComponent(data?.sqlFilter)) : '', })
}
}
......@@ -73,8 +73,8 @@ const AccountSelector = (props) => {
...params,
user: userID,
accountName: accountName,
condition: sql ? window.btoa(encodeURIComponent(sql)) : '',
...outParams,
condition: sql ? window.btoa(encodeURIComponent(sql)) : (outParams.condition || params.condition || ''),
};
const { data, code, msg } = await GetAccountPageList(param);
if (code === 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment