| | |
| | | class VerifyCard extends Component { |
| | | static propTpyes = { |
| | | columns: PropTypes.array, // 显示列 |
| | | dict: PropTypes.object, // 字典项 |
| | | card: PropTypes.object, |
| | | } |
| | | |
| | |
| | | activeKey: 'basemsg', |
| | | excelColumns: [ |
| | | { |
| | | title: this.props.dict['model.form.field'], |
| | | title: '字段', |
| | | dataIndex: 'Column', |
| | | width: '14%', |
| | | inputType: 'input', |
| | |
| | | editable: true |
| | | }, |
| | | { |
| | | title: this.props.dict['model.name'], |
| | | title: '名称', |
| | | dataIndex: 'Text', |
| | | width: '14%', |
| | | inputType: 'input', |
| | | editable: true |
| | | }, |
| | | { |
| | | title: this.props.dict['model.form.type'], |
| | | title: '类型', |
| | | dataIndex: 'type', |
| | | width: '15%', |
| | | editable: true, |
| | |
| | | ] |
| | | }, |
| | | { |
| | | title: this.props.dict['model.required'], |
| | | title: '必填', |
| | | dataIndex: 'required', |
| | | width: '10%', |
| | | editable: true, |
| | | inputType: 'switch', |
| | | render: (text, record) => record.required === 'true' ? this.props.dict['model.true'] : this.props.dict['model.false'] |
| | | render: (text, record) => record.required === 'true' ? '是' : '否' |
| | | }, |
| | | { |
| | | title: this.props.dict['model.import'], |
| | | title: '导入', |
| | | dataIndex: 'import', |
| | | width: '10%', |
| | | editable: true, |
| | | inputType: 'switch', |
| | | render: (text, record) => record.import !== 'false' ? this.props.dict['model.true'] : this.props.dict['model.false'] |
| | | render: (text, record) => record.import !== 'false' ? '是' : '否' |
| | | }, |
| | | { |
| | | title: '最小值', |
| | |
| | | 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> |
| | |
| | | <Form {...formItemLayout}> |
| | | <Row gutter={24}> |
| | | <Col span={8}> |
| | | <Form.Item label={this.props.dict['model.form.tablename']}> |
| | | <Form.Item label="表名"> |
| | | {getFieldDecorator('sheet', { |
| | | initialValue: verify.sheet || '', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.input'] + this.props.dict['model.form.tablename'] + '!' |
| | | message: '请输入表名!' |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" />)} |
| | |
| | | {verify.columns.length ? <span className="count-tip">{verify.columns.length}</span> : null} |
| | | </span> |
| | | } key="excelcolumn"> |
| | | <ColumnForm dict={this.props.dict} columnChange={this.columnChange}/> |
| | | <ColumnForm columnChange={this.columnChange}/> |
| | | <Button className="excel-col-add mk-green" title="添加显示列字段" onClick={this.columnFieldInput}> |
| | | 同步显示列 |
| | | </Button> |
| | |
| | | {verify.uniques.length ? <span className="count-tip">{verify.uniques.length}</span> : null} |
| | | </span> |
| | | } key="unique"> |
| | | <UniqueForm fields={verify.columns} dict={this.props.dict} uniqueChange={this.uniqueChange}/> |
| | | <UniqueForm fields={verify.columns} uniqueChange={this.uniqueChange}/> |
| | | <EditTable actions={['edit', 'move', 'del', 'status']} data={verify.uniques} columns={uniqueColumns} onChange={this.changeUniques}/> |
| | | </TabPane> : null} |
| | | {card.intertype === 'system' ? <TabPane tab={ |