Commit cd141e06 authored by caichuanming's avatar caichuanming

优化

parent 7b4bc017
...@@ -569,14 +569,14 @@ export default class DataView extends React.Component { ...@@ -569,14 +569,14 @@ export default class DataView extends React.Component {
// 渲染搜索栏 // 渲染搜索栏
_renderSearchForm = () => { _renderSearchForm = () => {
const { searchCols, advancedCols } = this.props; const { searchCols, advancedSearchCols } = this.props;
const { searchForm } = this.state; const { searchForm } = this.state;
if (searchCols === null || searchCols.length <= 0) return null; if (searchCols === null || searchCols.length <= 0) return null;
return ( return (
<SearchView <SearchView
searchForm={searchForm} searchForm={searchForm}
searchCols={searchCols} searchCols={searchCols}
advancedCols={advancedCols} advancedSearchCols={advancedSearchCols}
search={this.search} search={this.search}
onChangeParams={this._changeSearchForm} onChangeParams={this._changeSearchForm}
/> />
...@@ -617,8 +617,8 @@ export default class DataView extends React.Component { ...@@ -617,8 +617,8 @@ export default class DataView extends React.Component {
// 渲染查询条件按钮组件 // 渲染查询条件按钮组件
_renderFilterBtn = () => { _renderFilterBtn = () => {
let { searchCols, advancedCols } = this.props; let { searchCols, advancedSearchCols } = this.props;
searchCols = [...searchCols, ...advancedCols]; searchCols = [...searchCols, ...advancedSearchCols];
const { searchForm, siftDataArr, currentSiftNum } = this.state; const { searchForm, siftDataArr, currentSiftNum } = this.state;
if (searchCols === null || searchCols.length <= 0) return null; if (searchCols === null || searchCols.length <= 0) return null;
const chooseItems = formatForm(searchForm, searchCols); const chooseItems = formatForm(searchForm, searchCols);
......
...@@ -353,14 +353,16 @@ class SearchView extends React.Component { ...@@ -353,14 +353,16 @@ class SearchView extends React.Component {
}; };
render() { render() {
const { style, searchCols = [], advancedCols = [] } = this.props; const { style, searchCols = [], advancedSearchCols = [] } = this.props;
return ( return (
<BIForm className={styles.view} style={style}> <BIForm className={styles.view} style={style}>
{/* 基础搜索 */}
{searchCols.map((arr, index) => { {searchCols.map((arr, index) => {
return this._renderRow(arr, index); return this._renderRow(arr, index);
})} })}
{/* 高级搜索 */}
<SearchViewAdvanced> <SearchViewAdvanced>
{advancedCols.map((arr, index) => { {advancedSearchCols.map((arr, index) => {
return this._renderRow(arr, index); return this._renderRow(arr, index);
})} })}
</SearchViewAdvanced> </SearchViewAdvanced>
......
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