| | |
| | | |
| | | config.components = config.components.map(component => { |
| | | if (component.action) component.action = [] |
| | | if (component.search) component.search = [] |
| | | if (component.search) { |
| | | component.search = [] |
| | | component.$searches = [] |
| | | } |
| | | component.data = [] // 初始化数据为空 |
| | | |
| | | if (component.subtype === 'tablecard') { // 兼容 |
| | |
| | | } |
| | | |
| | | if (sessionStorage.getItem('dataM') === 'true') { // 数据权限 |
| | | component.setting.dataresource = component.setting.dataresource.replace(/\$@/ig, '/*') |
| | | component.setting.dataresource = component.setting.dataresource.replace(/@\$/ig, '*/') |
| | | _customScript = _customScript.replace(/\$@/ig, '/*') |
| | | _customScript = _customScript.replace(/@\$/ig, '*/') |
| | | component.setting.dataresource = component.setting.dataresource.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'') |
| | | _customScript = _customScript.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'') |
| | | } else { |
| | | component.setting.dataresource = component.setting.dataresource.replace(/@\$|\$@/ig, '') |
| | | _customScript = _customScript.replace(/@\$|\$@/ig, '') |
| | | component.setting.dataresource = component.setting.dataresource.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'') |
| | | _customScript = _customScript.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'') |
| | | } |
| | | |
| | | regs.forEach(cell => { |
| | |
| | | setTimeout(() => { |
| | | this.getMenuParam() |
| | | }, 50) |
| | | // Api.getAppVersion(tempId).then(() => { |
| | | // this.getMenuParam() |
| | | // }, () => { |
| | | // this.getMenuParam() |
| | | // }) |
| | | }) |
| | | } |
| | | |
| | |
| | | this.setState({loadingview: false, pages}) |
| | | } |
| | | |
| | | let setData = (item) => { |
| | | if (item.setting && item.setting.sync === 'true' && item.data) { |
| | | item.dataName = Utils.getuuid() |
| | | window.GLOB.SyncData.set(item.dataName, item.data) |
| | | } |
| | | } |
| | | |
| | | while (!over) { |
| | | let page = [] |
| | | let count = 0 |
| | |
| | | } |
| | | |
| | | if (item.wrap && item.wrap.printType === 'headerOrfooter') { // 页眉页脚 |
| | | setData(item) |
| | | page.push(item) |
| | | } else if (_pageover) { |
| | | return |
| | |
| | | } |
| | | if (count <= limit) { |
| | | _item.added = true |
| | | setData(item) |
| | | page.push(item) |
| | | } |
| | | } else if (!item.added) { |
| | | _item.added = true |
| | | setData(item) |
| | | page.push(item) |
| | | } |
| | | } else { |
| | |
| | | |
| | | } |
| | | |
| | | setData(item) |
| | | page.push(item) |
| | | } |
| | | _item.added = true |
| | | } else if (!item.added) { |
| | | _item.added = true |
| | | setData(item) |
| | | page.push(item) |
| | | } |
| | | } else if (!item.added && item.wrap && item.wrap.printHeight) { |
| | |
| | | } |
| | | if (count <= limit) { |
| | | _item.added = true |
| | | setData(item) |
| | | page.push(item) |
| | | } |
| | | } else if (!item.added) { |
| | | _item.added = true |
| | | setData(item) |
| | | page.push(item) |
| | | } |
| | | |
| | |
| | | if (item.type === 'bar' || item.type === 'line') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvBarAndLine config={item} initdata={item.data} mainSearch={[]} /> |
| | | <AntvBarAndLine config={item}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'pie') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvPie config={item} initdata={item.data} mainSearch={[]} /> |
| | | <AntvPie config={item} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'scatter') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvScatter config={item} initdata={item.data} mainSearch={[]}/> |
| | | <AntvScatter config={item}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'dashboard') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvDashboard config={item} initdata={item.data} mainSearch={[]}/> |
| | | <AntvDashboard config={item}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'datacard') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <DataCard config={item} initdata={item.data} mainSearch={[]} /> |
| | | <DataCard config={item} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'propcard') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <PropCard config={item} initdata={item.data} mainSearch={[]} /> |
| | | <PropCard config={item} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'dualdatacard') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <DoubleDataCard config={item} mainSearch={[]}/> |
| | | <DoubleDataCard config={item}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'tablecard') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <TableCard config={item} initdata={item.data} mainSearch={[]}/> |
| | | <TableCard config={item}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'normaltable') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <NormalTable config={item} initdata={item.data} mainSearch={[]}/> |
| | | <NormalTable config={item}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'code') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <SandBox config={item} initdata={item.data} mainSearch={[]}/> |
| | | <SandBox config={item}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'balcony') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <Balcony config={item} initdata={item.data}/> |
| | | <Balcony config={item}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'timeline') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <TimeLine config={item} initdata={item.data} mainSearch={[]}/> |
| | | <TimeLine config={item}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'editor') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <BraftEditor config={item} initdata={item.data} mainSearch={[]}/> |
| | | <BraftEditor config={item}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'antvG6') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvG6 config={item} initdata={item.data} mainSearch={[]}/> |
| | | <AntvG6 config={item}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'antvX6') { |