From e9c48bd7356462ba9257540b130a47a65ad1861d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 26 八月 2021 17:17:11 +0800 Subject: [PATCH] 2021-08-26 --- src/tabviews/zshare/topSearch/index.jsx | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/tabviews/zshare/topSearch/index.jsx b/src/tabviews/zshare/topSearch/index.jsx index c16a881..90209bf 100644 --- a/src/tabviews/zshare/topSearch/index.jsx +++ b/src/tabviews/zshare/topSearch/index.jsx @@ -362,7 +362,8 @@ resetSearch = (result) => { let _searchlist = this.state.searchlist.map(item => { if (['select', 'link', 'multiselect', 'checkcard'].includes(item.type) && result[item.field] && result[item.field].length > 0) { - let options = result[item.field].map(cell => { + let options = [] + result[item.field].forEach(cell => { let _item = { key: Utils.getuuid() } @@ -370,6 +371,9 @@ if (item.type !== 'checkcard') { _item.Value = cell[item.valueField] _item.Text = cell[item.valueText] + if (!_item.Text && _item.Text !== 0) { + return + } } else { _item.$value = cell[item.cardValField] _item = {..._item, ...cell} @@ -379,7 +383,7 @@ _item.ParentID = cell[item.linkField] } - return _item + options.push(_item) }) item.oriOptions = [...item.oriOptions, ...options] @@ -427,7 +431,7 @@ getFields() { const { getFieldDecorator } = this.props.form - const { dict, showButton, showAdvanced, float } = this.state + const { dict, showButton, showAdvanced, float, visible } = this.state const fields = [] this.state.searchlist.forEach((item, index) => { @@ -445,9 +449,9 @@ if (item.type === 'text') { if (item.inputType === 'search') { - content = <Search placeholder={item.labelShow === 'false' ? item.label : ''} autoComplete="off" onSearch={this.handleSubmit} enterButton/> + content = <Search allowClear placeholder={item.labelShow === 'false' ? item.label : ''} autoComplete="off" onSearch={this.handleSubmit} enterButton/> } else { - content = <Input placeholder={item.labelShow === 'false' ? item.label : ''} autoComplete="off" onPressEnter={this.handleSubmit} /> + content = <Input allowClear placeholder={item.labelShow === 'false' ? item.label : ''} autoComplete="off" onPressEnter={this.handleSubmit} /> } } else if (item.type === 'select' || item.type === 'link' || item.type === 'multiselect') { content = (<MKSelect config={item} onChange={(val, defer) => this.recordChange(val, defer, item)} />) @@ -484,7 +488,7 @@ <Button style={{ marginLeft: 8 }} onClick={this.handleReset}> {dict['main.reset']} </Button> - {showAdvanced ? <Button type="link" onClick={this.handleAdvance}> + {showAdvanced && !visible ? <Button type="link" onClick={this.handleAdvance}> 楂樼骇 </Button> : null} </Form.Item> -- Gitblit v1.8.0