| | |
| | | inputType: 'input', |
| | | editable: true, |
| | | unique: true, |
| | | width: '20%' |
| | | width: '17%' |
| | | }, |
| | | { |
| | | title: this.props.dict['model.name'], |
| | | dataIndex: 'Text', |
| | | inputType: 'input', |
| | | editable: true, |
| | | width: '20%' |
| | | unique: true, |
| | | width: '17%' |
| | | }, |
| | | { |
| | | title: this.props.dict['model.form.columnWidth'], |
| | |
| | | min: 5, |
| | | max: 200, |
| | | editable: true, |
| | | width: '14%', |
| | | width: '12%', |
| | | render: (text) => text || 20 |
| | | }, |
| | | { |
| | | title: '类型', |
| | | dataIndex: 'type', |
| | | inputType: 'radio', |
| | | inputType: 'select', |
| | | editable: true, |
| | | required: false, |
| | | width: '18%', |
| | | width: '14%', |
| | | render: (text) => { |
| | | if (text === 'image') { |
| | | return '图片' |
| | | } else if (text === 'number') { |
| | | return '数值' |
| | | } else { |
| | | return '文本' |
| | | } |
| | | }, |
| | | options: [ |
| | | {value: 'text', text: '文本'}, |
| | | {value: 'number', text: '数值'}, |
| | | {value: 'image', text: '图片'} |
| | | ] |
| | | }, |
| | |
| | | {value: 'true', text: '是'}, |
| | | {value: 'false', text: '否'} |
| | | ] |
| | | }, |
| | | { |
| | | title: '小数位', |
| | | dataIndex: 'decimal', |
| | | inputType: 'number', |
| | | min: 0, |
| | | max: 18, |
| | | editable: true, |
| | | required: false, |
| | | width: '12%' |
| | | }, |
| | | { |
| | | title: '导出', |
| | |
| | | if (fields.includes(item.field) || !item.field) return |
| | | fields.push(item.field) |
| | | |
| | | columns.push({ |
| | | let cell = { |
| | | Column: item.field, |
| | | Text: item.label, |
| | | Width: 20, |
| | |
| | | output: 'true', |
| | | type: 'text', |
| | | uuid: Utils.getuuid() |
| | | }) |
| | | } |
| | | |
| | | if (item.type === 'number') { |
| | | cell.type = 'number' |
| | | cell.decimal = item.decimal |
| | | } |
| | | |
| | | columns.push(cell) |
| | | }) |
| | | |
| | | this.setState({ |
| | |
| | | changeColumns = (columns) => { |
| | | const { verify } = this.state |
| | | |
| | | if (columns[0] && (columns[0].type !== 'image' && columns[0].type !== 'text')) { |
| | | if (columns[0] && (columns[0].type !== 'image' && columns[0].type !== 'text' && columns[0].type !== 'number')) { |
| | | columns = columns.map(col => { |
| | | let _cell = { |
| | | uuid: Utils.getuuid(), |
| | |
| | | <Button className="excel-col-add mk-red" title="清空Excel列" onClick={this.clearField}> |
| | | 清空Excel列 |
| | | </Button> |
| | | <div style={{color: '#959595', fontSize: '13px', paddingLeft: '10px'}}>如需导出序号,请使用字段 $Index。</div> |
| | | <div style={{color: '#959595', fontSize: '13px', paddingLeft: '10px'}}>如需导出序号,请使用字段 $Index;数值类型导出时可进行数据处理(取绝对值、保留小数位)。</div> |
| | | <EditTable actions={['edit', 'move', 'copy', 'del']} type="excelcolumn" wrappedComponentRef={(inst) => this.columnRef = inst} data={verify.columns} columns={excelColumns} onChange={this.changeColumns}/> |
| | | </TabPane> |
| | | {card.intertype === 'system' ? <TabPane tab={ |