Commit e7bf77e8 authored by 田翔's avatar 田翔

fix: 解决防止搜索已选数据失效问题

parent e73864ee
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "6.0.12", "version": "6.0.13",
"description": "6.0.12 删除台账接口增加时限", "description": "6.0.13 解决防止搜索已选数据失效问题",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -79,11 +79,15 @@ const AccountSelector = (props) => { ...@@ -79,11 +79,15 @@ const AccountSelector = (props) => {
const { data, code, msg } = await GetAccountPageList(param); const { data, code, msg } = await GetAccountPageList(param);
if (code === 0) { if (code === 0) {
if (data.jsonData) { if (data.jsonData) {
let dataSource = JSON.parse(data.jsonData); let Data = JSON.parse(data.jsonData);
setDataSource(dataSource); let dataKeys = dataSource.filter(v => keys.includes(v.ID))
let valueArr = value ? value.split(',') : []; let otherData = Data.filter(v => !keys.includes(v.ID))
let rows = dataSource.filter(v => valueArr.includes(v[fieldshine[0].fromField])); setDataSource([...otherData, ...dataKeys]);
setKeys(rows.map(v => v.ID)); if (!keys.length) {
let valueArr = value ? value.split(',') : [];
let rows = Data.filter(v => valueArr.includes(v[fieldshine[0].fromField]));
setKeys(rows.map(v => v.ID));
}
setParams({ ...params, ...outParams, total: data.totalCount }); setParams({ ...params, ...outParams, total: data.totalCount });
} else { } else {
setDataSource([]) setDataSource([])
......
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