Commit 2b70cd9c authored by 皮倩雯's avatar 皮倩雯

fix: '修改台账管理搜索功能'

parent 9f0738a3
Pipeline #48443 skipped with stages
......@@ -180,7 +180,7 @@ const StandingBook = props => {
setShowSearchStyle(false);
// 第一次进入展示第一页 不是第一次进入根据当前选择的来进行展示
flag === 0 ? setPickItem(newArr[0]) : setPickItem(pickItem);
pickItem ? setPickItem(pickItem) : setPickItem(newArr[0]);
// pickItem ? setPickItem(pickItem) : setPickItem(newArr[0]);
console.log(newArr, 'newArr');
setTableData(newArr);
}
......@@ -271,8 +271,8 @@ const StandingBook = props => {
console.log(arr);
setShowSearchStyle(true);
setAllData(arr);
setSearchData(res.data.root);
setPickItem('');
setSearchData(res.data.root[pickItem]);
// setPickItem('');
// 第一次进入展示第一页 不是第一次进入根据当前选择的来进行展示
// flag === 0 ? setPickItem(newArr[0]) : setPickItem(pickItem);
console.log(newArr, 'newArr');
......@@ -282,7 +282,11 @@ const StandingBook = props => {
};
const handleSearch = e => {
console.log(e.target.value);
setSearchWord(e.target.value);
if (e.target.value == '') {
handleReset();
}
};
// 模糊查询匹配的样式
......@@ -359,7 +363,7 @@ const StandingBook = props => {
}}
key={index}
>
{item}{allData[item] ? allData[item].length : ''}
{item}{allData[item] ? allData[item].length : 0}
</div>
);
})}
......@@ -398,10 +402,11 @@ const StandingBook = props => {
onSearch={onSearch}
onChange={e => handleSearch(e)}
value={searchWord}
allowClear
/>
<Button icon={<SyncOutlined />} onClick={handleReset}>
{/* <Button icon={<SyncOutlined />} onClick={handleReset}>
重置
</Button>
</Button> */}
</div>
<div style={{ marginTop: '10px' }}>
<Table
......
......@@ -2,7 +2,7 @@
* @Description:
* @Author: leizhe
* @Date: 2022-01-13 10:47:32
* @LastEditTime: 2022-03-25 10:28:02
* @LastEditTime: 2022-04-22 11:45:53
* @LastEditors: leizhe
*/
/* eslint-disable indent */
......@@ -63,7 +63,7 @@ const VectorData = props => {
</Button>
</div>
<Spin tip="loading..." spinning={treeLoading}>
<div style={{ height: 'calc(100vh - 230px)', overflow: 'scroll', width: '100%' }}>
<div style={{ height: 'calc(100vh - 230px)', width: '100%' }}>
<div className={styles.cardsList}>
{tileData && tileData.length
? tileData.map((item, index) => {
......
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