| | |
| | | this.props.updateConfig(component) |
| | | } |
| | | |
| | | checkComponent = (component) => { |
| | | this.updateComponent(component) |
| | | // checkComponent = (component) => { |
| | | // this.updateComponent(component) |
| | | |
| | | let _item = null |
| | | component.search.forEach(item => { |
| | | if (!_item && item.focus) { |
| | | _item = item |
| | | } |
| | | }) |
| | | if (_item) { |
| | | this.handleSearch(_item) |
| | | } |
| | | } |
| | | // let _item = null |
| | | // component.search.forEach(item => { |
| | | // if (!_item && item.focus) { |
| | | // _item = item |
| | | // } |
| | | // }) |
| | | // if (_item) { |
| | | // this.handleSearch(_item) |
| | | // } |
| | | // } |
| | | |
| | | /** |
| | | * @description 搜索条件顺序调整,或拖拽添加 |
| | |
| | | _card.search.push(item) |
| | | |
| | | this.updateComponent(_card) |
| | | this.handleSearch(item) |
| | | } else if (type === 'multil') { |
| | | _card.search.push(...item) |
| | | |
| | |
| | | <EditOutlined style={{color: '#1890ff'}} title="编辑"/> |
| | | </NormalForm> |
| | | <CopyComponent type="mainsearch" card={card}/> |
| | | <PasteComponent config={card} options={['search', 'form']} updateConfig={this.checkComponent} /> |
| | | {/* <PasteComponent config={card} options={['search', 'form']} updateConfig={this.checkComponent} /> */} |
| | | <PasteComponent config={card} options={['search', 'form']} /> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/> |
| | | <DeleteOutlined className="close" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | </div> |
| | |
| | | val = Math.round(val * col.round) / col.round |
| | | // val = val.toFixed(col.decimal) |
| | | } |
| | | if (col.noValue === 'false' && val === 0) { |
| | | val = '' |
| | | } |
| | | } |
| | | |
| | | _row[col.Column] = val |
| | |
| | | val = Math.round(val * col.round) / col.round |
| | | // val = val.toFixed(col.decimal) |
| | | } |
| | | if (col.noValue === 'false' && val === 0) { |
| | | val = '' |
| | | } |
| | | } |
| | | |
| | | _row[col.Column] = val |
| | |
| | | editable: true, |
| | | required: false, |
| | | keyCol: true, |
| | | width: '12%', |
| | | width: '8%', |
| | | render: (text) => { |
| | | if (text === 'image') { |
| | | return '图片' |
| | |
| | | inputType: 'radio', |
| | | editable: true, |
| | | required: false, |
| | | width: '12%', |
| | | width: '10%', |
| | | render: (text) => { |
| | | if (text !== 'false') { |
| | | return '是' |
| | |
| | | editable: true, |
| | | required: false, |
| | | keyVals: ['number'], |
| | | width: '12%', |
| | | width: '10%', |
| | | render: (text, record) => { |
| | | if (record.type !== 'number') return '' |
| | | |
| | | if (text === 'true') { |
| | | return '是' |
| | | } else { |
| | | return '否' |
| | | } |
| | | }, |
| | | options: [ |
| | | {value: 'true', text: '是'}, |
| | | {value: 'false', text: '否'} |
| | | ] |
| | | }, |
| | | { |
| | | title: '0值导出', |
| | | dataIndex: 'noValue', |
| | | inputType: 'radio', |
| | | editable: true, |
| | | required: false, |
| | | keyVals: ['number'], |
| | | width: '10%', |
| | | render: (text, record) => { |
| | | if (record.type !== 'number') return '' |
| | | |
| | | if (text !== 'false') { |
| | | return '是' |
| | | } else { |
| | | return '否' |
| | |
| | | col.type = col.type || 'text' |
| | | col.output = col.output || 'true' |
| | | col.required = col.required || 'false' |
| | | col.noValue = col.noValue || 'true' |
| | | |
| | | if (!['text', 'image', 'number'].includes(col.type)) { |
| | | if (/^Decimal/ig.test(col.type)) { |
| | |
| | | col.type = col.type || 'text' |
| | | col.output = col.output || 'true' |
| | | col.required = col.required || 'false' |
| | | col.noValue = col.noValue || 'true' |
| | | col.Width = col.Width || 20 |
| | | |
| | | if (!['text', 'image', 'number'].includes(col.type)) { |