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

fix: 台账增加SQL语句过滤

parent 39623860
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "5.9.17", "version": "5.9.18",
"description": "5.9.17 配置整体布局优化", "description": "5.9.18 台账增加SQL语句过滤",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -99,8 +99,8 @@ const Account = (props, ref) => { ...@@ -99,8 +99,8 @@ const Account = (props, ref) => {
if (type === '重置') { if (type === '重置') {
tablePackRef.current.setFilteredInfo({}); tablePackRef.current.setFilteredInfo({});
tablePackRef.current.setSortedInfo({}); tablePackRef.current.setSortedInfo({});
setParams(initParams); setParams({ ...initParams, accountName: treeData?.[0]?.accountName || accountName });
getDataSource(initParams); getDataSource({ ...initParams, accountName: treeData?.[0]?.accountName || accountName });
} }
if (type === '编辑' || type === '详情') { if (type === '编辑' || type === '详情') {
setOperation({ type, id: row.ID }); setOperation({ type, id: row.ID });
...@@ -302,7 +302,13 @@ const Account = (props, ref) => { ...@@ -302,7 +302,13 @@ const Account = (props, ref) => {
if (code === 0) { if (code === 0) {
setConfig({ ...data, formJson: isJson(data.formJson) ? JSON.parse(data.formJson) : {} }); setConfig({ ...data, formJson: isJson(data.formJson) ? JSON.parse(data.formJson) : {} });
setParams({ ...params, pageSize: data.pageSize || 20 }); 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 { } else {
message.error(msg); message.error(msg);
} }
......
...@@ -63,7 +63,7 @@ const AccountSelector = (props) => { ...@@ -63,7 +63,7 @@ const AccountSelector = (props) => {
const { code, data } = await GetAccountConfigInfo(accountName); const { code, data } = await GetAccountConfigInfo(accountName);
if (code == 0) { if (code == 0) {
setConfig({ ...data, formJson: isJson(data.formJson) ? JSON.parse(data.formJson) : {} }) 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) => { ...@@ -73,8 +73,8 @@ const AccountSelector = (props) => {
...params, ...params,
user: userID, user: userID,
accountName: accountName, accountName: accountName,
condition: sql ? window.btoa(encodeURIComponent(sql)) : '',
...outParams, ...outParams,
condition: sql ? window.btoa(encodeURIComponent(sql)) : (outParams.condition || params.condition || ''),
}; };
const { data, code, msg } = await GetAccountPageList(param); const { data, code, msg } = await GetAccountPageList(param);
if (code === 0) { 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