| | |
| | | if (this.record.selectStyle === 'custom') { |
| | | shows.push('backgroundColor') |
| | | } |
| | | if (this.record.multiple === 'dropdown' && this.record.resourceType === '1') { |
| | | shows.push('mark', 'parentField') |
| | | if (this.record.multiple === 'dropdown') { |
| | | shows.push('mark') |
| | | if (this.record.resourceType === '1') { |
| | | shows.push('parentField') |
| | | } |
| | | } |
| | | } |
| | | shows.push('linkField') |
| | |
| | | } else if (type === 'dateweek' || type === 'daterange' || type === 'range') { |
| | | reOptions.match = matchReg.class5 |
| | | } else if (type === 'checkcard') { |
| | | if (this.record.multiple === 'false') { |
| | | if (this.record.multiple === 'false' || this.record.multiple === 'dropdown') { |
| | | reOptions.match = matchReg.class1 |
| | | } else if (this.record.multiple === 'true') { |
| | | reOptions.match = matchReg.class3 |
| | |
| | | { required: item.required, message: '请输入' + item.label + '!' } |
| | | ] |
| | | span = 24 |
| | | className = 'text-area' |
| | | |
| | | if (this.record.type === 'select' || this.record.type === 'link') { |
| | | extra = <span className="add-resource-empty" onClick={this.handleEmpty}>全部</span> |
| | | } |
| | | if (item.placeholder) { |
| | | className = 'show-public-var' |
| | | extra = <><span className="resource-public-var">{item.placeholder}</span>{extra}</> |
| | | } |
| | | |
| | | content = <CodeMirror /> |
| | | } else if (item.type === 'options') { |
| | | span = 24 |
| | | className = 'text-area' |
| | | |
| | | let type = this.record.type |
| | | |
| | |
| | | } |
| | | } else if (item.type === 'fields') { |
| | | span = 24 |
| | | className = 'text-area' |
| | | |
| | | rules = [ |
| | | { required: item.required, message: '请添加' + item.label + '!' } |
| | |
| | | ] |
| | | |
| | | content = <Checkbox.Group style={{width: '105%'}} options={item.options} onChange={(values) => this.optionChange(item.key, values)}/> |
| | | } else if (item.type === 'multiselect') { // 多选 |
| | | } else if (item.type === 'multiselect') { |
| | | content = <Select |
| | | showSearch |
| | | mode="multiple" |
| | |
| | | <Select.Option id={i} key={i} value={option.value}>{option.text}</Select.Option> |
| | | )} |
| | | </Select> |
| | | } else if (item.type === 'cascader') { // 多选 |
| | | content = <Cascader options={item.options} placeholder="" /> |
| | | } else if (item.type === 'cascader') { |
| | | content = <Cascader options={item.options} /> |
| | | } else if (item.type === 'color') { |
| | | className = 'color-form-item' |
| | | rules = [ |
| | |
| | | fields.push( |
| | | <Col span={span} key={index}> |
| | | <Form.Item className={className} extra={extra} label={item.tooltip ? |
| | | <Tooltip placement="topLeft" title={item.tooltip}> |
| | | <Tooltip placement="topLeft" title={<div onClick={(e) => e.stopPropagation()}>{item.tooltip}</div>}> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | {item.label} |
| | | </Tooltip> : item.label |