From 051981a2211bb86f88a6d68f2e29816f8caeac20 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 04 八月 2023 09:18:10 +0800 Subject: [PATCH] 2023-08-04 --- src/templates/sharecomponent/searchcomponent/searchform/index.jsx | 25 ++++++++++++++++--------- 1 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx index 9cb4ffc..8bac6a7 100644 --- a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx +++ b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx @@ -84,9 +84,12 @@ {value: '[3, 0]', label: '杩戜笁澶�'}, {value: '[7, 0]', label: '杩戜竷澶�'}, {value: '[30, 0]', label: '杩�30澶�'}, + {value: '[90, 0]', label: '杩�90澶�'}, {value: '[7, -7]', label: '鍓嶅悗涓冨ぉ'}, {value: '[30, -30]', label: '鍓嶅悗30澶�'}, {value: '[90, -90]', label: '鍓嶅悗90澶�'}, + {value: '[180, -180]', label: '鍓嶅悗180澶�'}, + {value: '[365, -365]', label: '鍓嶅悗365澶�'}, {value: '[-1, -1]', label: '鏄庡ぉ'}, {value: '[-2, -2]', label: '鍚庡ぉ'} ] @@ -117,11 +120,7 @@ } state = { - openType: null, // 鎼滅储鏉′欢鏄剧ず绫诲瀷 - resourceType: null, // 涓嬫媺鎼滅储鏃讹紝閫夐」鏉ユ簮绫诲瀷 - formlist: null, // 琛ㄥ崟 - cFields: [], - textTooltip: '瀛楁鍚嶅彲浠ヤ娇鐢ㄩ�楀彿鍒嗛殧锛岃繘琛岀患鍚堟悳绱�', + formlist: null } record = {} @@ -205,12 +204,15 @@ } else { reRequired.fields = true if (this.record.resourceType === '0') { // 鑷畾涔夎祫婧� - shows.push('options', 'fields', 'selectStyle') + shows.push('options', 'fields', 'selectStyle', 'border') } else if (this.record.resourceType === '1') { // 鏁版嵁婧� - shows.push('dataSource', 'cardValField', 'fields', 'orderBy', 'orderType', 'database', 'selectStyle') + shows.push('dataSource', 'cardValField', 'fields', 'orderBy', 'orderType', 'database', 'selectStyle', 'border') } if (this.record.selectStyle === 'custom') { shows.push('backgroundColor') + } + if (this.record.multiple === 'dropdown' && this.record.resourceType === '1') { + shows.push('mark', 'parentField') } } shows.push('linkField') @@ -485,7 +487,7 @@ <Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} /> </AutoComplete> } else { - content = <Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} /> + content = <Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} onChange={(e) => {this.optionChange(item.key, e.target.value)}}/> } } else if (item.type === 'number') { rules = [ @@ -552,7 +554,7 @@ if (this.record.linkField) { type = 'link' } - content = <DataTable type={type} display={this.record.display} linkSubFields={[]} transfield={{}} fields={this.record.fields || []} onChange={this.changeOptions}/> + content = <DataTable type={type} multiple={this.record.multiple} display={this.record.display} linkSubFields={[]} transfield={{}} fields={this.record.fields || []} onChange={this.changeOptions}/> } } else if (item.type === 'fields') { span = 24 @@ -663,10 +665,15 @@ values.options = [] } } else if (values.type === 'checkcard') { + if (values.multiple === 'dropdown' && values.display !== 'text') { + values.multiple = 'false' + } + if (values.resourceType === '0') { values.options = values.options || [] values.options = values.options.map(m => { m.ParentID = m.ParentID || '' + m.pid = m.pid || '' return m }) -- Gitblit v1.8.0