| | |
| | | value: 'link', |
| | | text: this.state.dict['header.form.link'] |
| | | }, { |
| | | value: 'fileupload', |
| | | text: '文件上传' |
| | | }, { |
| | | value: 'date', |
| | | text: this.state.dict['header.form.dateday'] |
| | | }, { |
| | |
| | | handleSubmit = () => { |
| | | this.formRef.handleConfirm().then(res => { |
| | | let _config = JSON.parse(JSON.stringify(this.state.config)) |
| | | |
| | | if ((res.type === 'multiselect' || res.type === 'select' || res.type === 'link') && res.resourceType === '1') { |
| | | let _datasource = res.dataSource |
| | | |
| | | if (/\s/.test(_datasource)) { |
| | | _datasource = '(' + _datasource + ') tb' |
| | | } |
| | | |
| | | let sql = 'select ' + res.valueField + ',' + res.valueText + ' from ' + _datasource |
| | | if (res.type === 'link') { |
| | | sql = 'select ' + res.valueField + ',' + res.valueText + ',' + res.linkField + ' from ' + _datasource |
| | | } |
| | | if (res.orderBy) { |
| | | sql = sql + ' order by ' + res.orderBy + ' ' + res.orderType |
| | | } |
| | | |
| | | res.dataSourceSql = Utils.formatOptions(sql) |
| | | } |
| | | |
| | | if (_config.groups.length > 0) { |
| | | _config.groups.forEach(group => { |
| | |
| | | orderBy: '', |
| | | orderType: 'asc', |
| | | readonly: 'false', |
| | | required: 'false' |
| | | required: 'true' |
| | | } |
| | | }) |
| | | _config.groups[_config.groups.length - 1].sublist = [..._config.groups[_config.groups.length - 1].sublist, ..._additems] |