| | |
| | | const { config } = this.props |
| | | const { appType } = this.state |
| | | |
| | | if (config.type === 'interface') { // 公共数据源不使用搜索 |
| | | this.setState({visible: true}) |
| | | return |
| | | } |
| | | |
| | | let search = [] |
| | | let menu = fromJS(window.GLOB.customMenu).toJS() |
| | | |
| | |
| | | }) |
| | | }) |
| | | } |
| | | } else if (config.type === 'interface') { |
| | | menu.components.forEach(item => { |
| | | if (item.type !== 'search') return |
| | | search = item.search |
| | | }) |
| | | } else { |
| | | let filterComponent = (box, mainSearch) => { |
| | | box.components.forEach(item => { |
| | |
| | | |
| | | if (res.columns) { |
| | | res.columns = res.columns.map(item => { |
| | | |
| | | if (/int/ig.test(item.datatype)) { |
| | | item.type = 'number' |
| | | item.decimal = 0 |
| | | } else if (/Decimal/ig.test(item.datatype)) { |
| | | item.type = 'number' |
| | | item.decimal = +item.datatype.replace(/^Decimal\(18,/ig, '').replace(/\)/ig, '') |
| | | } else if (/^date/ig.test(item.datatype)) { |
| | | item.type = 'text' |
| | | item.fieldlength = 50 |
| | | } else { |
| | | item.type = 'text' |
| | | item.fieldlength = +item.datatype.replace(/^Nvarchar\(/ig, '').replace(/\)/ig, '') |
| | |
| | | return item |
| | | }) |
| | | |
| | | res.columns.reverse() |
| | | if (!config.fixedCol) { |
| | | res.columns.reverse() |
| | | } |
| | | } |
| | | |
| | | let maxScript = 0 |
| | |
| | | |
| | | if (config.subtype !== 'dualdatacard') { |
| | | delete res.subColumns |
| | | if (config.type === 'interface') { |
| | | res.setting.laypage = 'false' |
| | | } |
| | | } else { |
| | | res.subColumns = res.subColumns.map(item => { |
| | | if (/int/ig.test(item.datatype)) { |
| | | item.type = 'number' |
| | | item.decimal = 0 |
| | | } else if (/Decimal/ig.test(item.datatype)) { |
| | | item.type = 'number' |
| | | item.decimal = +item.datatype.replace(/^Decimal\(18,/ig, '').replace(/\)/ig, '') |
| | | } else if (/^date/ig.test(item.datatype)) { |
| | | item.type = 'text' |
| | | item.fieldlength = 50 |
| | | } else { |
| | | item.type = 'text' |
| | | item.fieldlength = +item.datatype.replace(/^Nvarchar\(/ig, '').replace(/\)/ig, '') |
| | | } |
| | | return item |
| | | }) |
| | | |
| | | res.subColumns.reverse() |
| | | } |
| | | |