| | |
| | | * 2、根据配置信息中已使用表获取相关字段信息 |
| | | */ |
| | | componentDidMount () { |
| | | let _text = "select TbName ,Remark from sDataDictionary where IsKey!='' and Deleted =0" |
| | | let _text = "select TbName ,Remark from sDataDictionary where IsKey!='' and Deleted =0 and Remark != '公司'" |
| | | // let _text = "select TbName ,Remark from sDataDictionary where IsKey!='' and Deleted =0" |
| | | _text = Utils.formatOptions(_text) |
| | | |
| | | Api.getSystemConfig({func: 'sPC_Get_SelectedList', LText: _text, obj_name: 'data', arr_field: 'TbName,Remark'}).then(res => { |
| | |
| | | this.formRef.handleConfirm().then(res => { |
| | | let _config = this.state.config |
| | | |
| | | if (res.type === 'search') { |
| | | if ((res.values.type === 'select' || res.values.type === 'link') && res.values.resourceType === '1') { |
| | | let sql = 'select ' + res.values.valueField + ',' + res.values.valueText + ' from (' + res.values.dataSource + ')' |
| | | if (res.values.orderBy) { |
| | | sql = sql + ' ld order by ' + res.values.orderBy + ' ' + res.values.orderType |
| | | } |
| | | res.values.dataSourceSql = Utils.formatOptions(sql) |
| | | } |
| | | } |
| | | |
| | | if (this.state.operaType === 'add') { |
| | | _config[res.type] = _config[res.type].map(item => { |
| | | if (item.uuid === res.values.uuid) { |
| | |
| | | return item |
| | | } |
| | | }) |
| | | // _config[res.type] = _config[res.type].filter(item => !item.origin) |
| | | } |
| | | |
| | | this.setState({ |