| | |
| | | |
| | | class VerifyCard extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | config: PropTypes.object, |
| | | card: PropTypes.object, |
| | | } |
| | |
| | | defaultscript: '', // 自定义脚本 |
| | | excelColumns: [ |
| | | { |
| | | title: this.props.dict['model.form.field'], |
| | | title: '字段', |
| | | dataIndex: 'Column', |
| | | inputType: 'input', |
| | | editable: true, |
| | |
| | | width: '17%' |
| | | }, |
| | | { |
| | | title: this.props.dict['model.name'], |
| | | title: '名称', |
| | | dataIndex: 'Text', |
| | | inputType: 'input', |
| | | editable: true, |
| | |
| | | width: '17%' |
| | | }, |
| | | { |
| | | title: this.props.dict['model.form.columnWidth'], |
| | | title: '列宽', |
| | | dataIndex: 'Width', |
| | | inputType: 'number', |
| | | min: 5, |
| | |
| | | dataIndex: 'operation', |
| | | render: (text, record) => |
| | | (<div style={{textAlign: 'center'}}> |
| | | <span className="operation-btn" title={this.props.dict['model.edit']} onClick={() => this.handleEdit(record, 'scripts')} style={{color: '#1890ff'}}><EditOutlined /></span> |
| | | <span className="operation-btn" title={this.props.dict['header.form.status.change']} onClick={() => this.handleStatus(record, 'scripts')} style={{color: '#8E44AD'}}><SwapOutlined /></span> |
| | | <span className="operation-btn" title="编辑" onClick={() => this.handleEdit(record, 'scripts')} style={{color: '#1890ff'}}><EditOutlined /></span> |
| | | <span className="operation-btn" title="状态切换" onClick={() => this.handleStatus(record, 'scripts')} style={{color: '#8E44AD'}}><SwapOutlined /></span> |
| | | <Popconfirm |
| | | overlayClassName="popover-confirm" |
| | | title={this.props.dict['model.query.delete']} |
| | | title="确定删除吗?" |
| | | onConfirm={() => this.handleDelete(record, 'scripts') |
| | | }> |
| | | <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span> |
| | |
| | | {verify.columns.length ? <span className="count-tip">{verify.columns.length}</span> : null} |
| | | </span> |
| | | } key="columns"> |
| | | <ColumnForm dict={this.props.dict} columnChange={this.columnChange}/> |
| | | <ColumnForm columnChange={this.columnChange}/> |
| | | <Button className="excel-col-add mk-green" title="添加显示列字段" onClick={this.columnFieldInput}> |
| | | 同步显示列 |
| | | </Button> |
| | |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.input'] + 'sql!' |
| | | message: '请输入sql!' |
| | | } |
| | | ] |
| | | })(<CodeMirror />)} |