| | |
| | | _config.setting.title = editAction.label |
| | | } |
| | | |
| | | if (menu.LongParam.tables && menu.LongParam.tables.length > 0 && _config.tables.length === 0) { |
| | | // 主菜单已有选择的表名,模态框没有表名时,复制主菜单表名 |
| | | _config.tables = menu.LongParam.tables |
| | | } |
| | | |
| | | this.setState({ |
| | | config: _config, |
| | | selectedTables: _config.tables || [], |
| | |
| | | let _config = JSON.parse(JSON.stringify(this.state.config)) |
| | | |
| | | if ((res.type === 'select' || res.type === 'link') && res.resourceType === '1') { |
| | | let sql = 'select ' + res.valueField + ',' + res.valueText + ' from (' + res.dataSource + ')' |
| | | if (res.orderBy) { |
| | | sql = sql + ' ld order by ' + res.orderBy + ' ' + res.orderType |
| | | let sql = 'select ' + res.valueField + ',' + res.valueText + ' from ' + res.dataSource |
| | | if (res.type === 'link') { |
| | | sql = 'select ' + res.valueField + ',' + res.valueText + ',' + res.linkField + ' from ' + res.dataSource |
| | | } |
| | | if (res.orderBy) { |
| | | sql = sql + ' order by ' + res.orderBy + ' ' + res.orderType |
| | | } |
| | | console.log(sql) |
| | | res.dataSourceSql = Utils.formatOptions(sql) |
| | | } |
| | | |