| | |
| | | width: '14%', |
| | | inputType: 'input', |
| | | unique: true, |
| | | strict: true, |
| | | editable: true |
| | | }, |
| | | { |
| | |
| | | ] |
| | | }, |
| | | { |
| | | title: '导入', |
| | | dataIndex: 'import', |
| | | width: '10%', |
| | | editable: true, |
| | | inputType: 'radio', |
| | | render: (text, record) => { |
| | | if (record.import === 'init') { |
| | | return '初始化' |
| | | } else if (record.import === 'false') { |
| | | return '否' |
| | | } |
| | | return '是' |
| | | }, |
| | | options: [ |
| | | { value: 'true', text: '是' }, |
| | | { value: 'false', text: '否' }, |
| | | { value: 'init', text: '初始化' } |
| | | ] |
| | | }, |
| | | { |
| | | title: '必填', |
| | | dataIndex: 'required', |
| | | width: '10%', |
| | | editable: true, |
| | | inputType: 'switch', |
| | | render: (text, record) => record.required === 'true' ? '是' : '否' |
| | | }, |
| | | { |
| | | title: '导入', |
| | | dataIndex: 'import', |
| | | width: '10%', |
| | | editable: true, |
| | | inputType: 'switch', |
| | | render: (text, record) => record.import !== 'false' ? '是' : '否' |
| | | }, |
| | | { |
| | | title: '最小值', |
| | |
| | | let _verify = fromJS(card.verify || {}).toJS() |
| | | let _columns = _verify.columns || [] |
| | | |
| | | delete _verify.dataresource |
| | | |
| | | // 旧数据兼容 |
| | | _columns = _columns.map(col => { |
| | | col.required = col.required || 'true' |
| | |
| | | _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp) |
| | | _sParam.open_key = Utils.encryptOpenKey(_sParam.secretkey, _sParam.timestamp) // 云端数据验证 |
| | | |
| | | Api.getSystemConfig(_sParam).then(res => { |
| | | Api.getCloudConfig(_sParam).then(res => { |
| | | if (res.status) { |
| | | let _scripts = res.data.map(item => { |
| | | return { |
| | |
| | | if (!err) { |
| | | let _verify = {...verify, ...values} |
| | | |
| | | let cols = _verify.columns.map(col => col.Column) |
| | | let cols = _verify.columns.map(col => col.Column.toLowerCase()) |
| | | cols = Array.from(new Set(cols)) |
| | | |
| | | if (_verify.columns.length === 0) { |
| | |
| | | return |
| | | } |
| | | } |
| | | |
| | | _verify.columns.sort((a, b) => { |
| | | if (a.import === 'init' && b.import !== 'init') { |
| | | return 1 |
| | | } else if (a.import !== 'init' && b.import === 'init') { |
| | | return -1 |
| | | } |
| | | return 0 |
| | | }) |
| | | |
| | | let _loading = false |
| | | if (this.scriptsForm && this.scriptsForm.state.editItem) { |
| | |
| | | <Button className="excel-col-add mk-red" title="清空Excel列" onClick={this.clearField}> |
| | | 清空Excel列 |
| | | </Button> |
| | | <Col style={{fontSize: '12px', color: '#757575', paddingLeft: '10px'}} span={24}>注:数值类型(int 或 decimal),内容为必填;最大值和最小值在类型为数值时有效。</Col> |
| | | <EditTable actions={['edit', 'move', 'copy', 'del']} type="excelcolumn" data={verify.columns} columns={excelColumns} onChange={this.changeColumns}/> |
| | | <Col style={{fontSize: '12px', color: '#757575', paddingLeft: '10px'}} span={24}>注:数值类型(int 或 decimal),内容为必填;最大值和最小值在类型为数值时有效。导入-初始化:用于excel中不存在,导入时需要初始化的字段</Col> |
| | | <EditTable actions={['edit', 'move', 'copy', 'del', 'extra:required:是否必填']} type="excelcolumn" data={verify.columns} columns={excelColumns} onChange={this.changeColumns}/> |
| | | </TabPane> |
| | | {card.intertype === 'system' ? <TabPane tab={ |
| | | <span> |