| | |
| | | } |
| | | |
| | | state = { |
| | | openType: null, // 搜索条件显示类型 |
| | | resourceType: null, // 下拉搜索时,选项来源类型 |
| | | formlist: null, // 表单 |
| | | cFields: [], |
| | | textTooltip: '字段名可以使用逗号分隔,进行综合搜索', |
| | | formlist: null |
| | | } |
| | | |
| | | record = {} |
| | |
| | | } 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') { |
| | | shows.push('mark') |
| | | } |
| | | } |
| | | shows.push('linkField') |
| | |
| | | <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 = [ |
| | |
| | | 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 |
| | |
| | | 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 |
| | | }) |
| | | |