| | |
| | | const PagemsgComponent = asyncComponent(() => import('@/tabviews/zshare/pageMessage')) |
| | | const CustomChart = asyncComponent(() => import('./components/chart/custom-chart')) |
| | | const TimeLine = asyncComponent(() => import('./components/timeline/normal-timeline')) |
| | | const Voucher = asyncComponent(() => import('./components/module/voucher')) |
| | | |
| | | class CustomPage extends Component { |
| | | static propTpyes = { |
| | |
| | | Sort: index + 1 |
| | | })) |
| | | |
| | | if ((window.GLOB.systemType !== 'production' && options.sysType !== 'cloud') || window.debugger === true) { |
| | | if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { |
| | | let sql = lines.map(item => (` |
| | | ${item.insert} |
| | | ${item.selects.join(` union all |
| | |
| | | tab.blacklist.filter(v => roleId.indexOf(v) > -1).length > 0 |
| | | ) { |
| | | return false |
| | | } else if (tab.hide === 'true') { |
| | | return false |
| | | } |
| | | return true |
| | | }) |
| | |
| | | item.wrap.blacklist.filter(v => roleId.indexOf(v) > -1).length > 0 |
| | | ) { |
| | | return false |
| | | } |
| | | } |
| | | |
| | | if (item.wrap && item.wrap.supType === 'multi') { // 数据卡多上级组件 |
| | | if (item.supNodes && item.supNodes[0]) { |
| | | item.setting.supModule = item.supNodes[0].componentId |
| | | } else { |
| | | item.wrap.supType = 'single' |
| | | item.supNodes = null |
| | | item.setting.supModule = '' |
| | | } |
| | | } else if (item.setting && item.setting.supModule) { |
| | | let pid = item.setting.supModule.pop() |
| | | if (pid && pid !== 'empty') { |
| | | item.setting.supModule = pid |
| | | } else { |
| | | item.setting.supModule = '' |
| | | } |
| | | } |
| | | |
| | |
| | | cell.$tabId = tabId |
| | | cell.$view = 'CustomPage' |
| | | |
| | | if (cell.syncComponentId === item.uuid) { |
| | | cell.syncComponentId = '' |
| | | } |
| | | |
| | | if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 打印机设置 |
| | | cell = this.getPrinter(cell, item.uuid) |
| | | } |
| | |
| | | cell.$tabId = tabId |
| | | cell.$view = 'CustomPage' |
| | | |
| | | if (cell.syncComponentId === item.uuid) { |
| | | cell.syncComponentId = '' |
| | | } |
| | | |
| | | if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 打印机设置 |
| | | cell = this.getPrinter(cell, item.uuid) |
| | | } |
| | |
| | | cell.$MenuID = this.props.MenuID |
| | | cell.$tabId = tabId |
| | | cell.$view = 'CustomPage' |
| | | |
| | | if (cell.syncComponentId === item.uuid) { |
| | | cell.syncComponentId = '' |
| | | } |
| | | |
| | | if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 打印机设置 |
| | | cell = this.getPrinter(cell, item.uuid) |
| | |
| | | cell.$tabId = tabId |
| | | cell.$view = 'CustomPage' |
| | | |
| | | if (cell.syncComponentId === item.uuid) { |
| | | cell.syncComponentId = '' |
| | | } |
| | | |
| | | if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 打印机设置 |
| | | cell = this.getPrinter(cell, item.uuid) |
| | | } |
| | |
| | | cell.$MenuID = this.props.MenuID |
| | | cell.$tabId = tabId |
| | | cell.$view = 'CustomPage' |
| | | |
| | | if (cell.syncComponentId === item.uuid) { |
| | | cell.syncComponentId = '' |
| | | } |
| | | |
| | | if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 打印机设置 |
| | | cell = this.getPrinter(cell, item.uuid) |
| | |
| | | cell.$tabId = tabId |
| | | cell.$view = 'CustomPage' |
| | | |
| | | if (cell.syncComponentId === item.uuid) { |
| | | cell.syncComponentId = '' |
| | | } |
| | | |
| | | if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 打印机设置 |
| | | cell = this.getPrinter(cell, item.uuid) |
| | | } |
| | |
| | | if (item.subtype === 'editable') { |
| | | item.submit.logLabel = item.$menuname + '-提交' |
| | | item.submit.$menuId = item.uuid |
| | | } |
| | | } |
| | | |
| | | if (item.wrap && item.wrap.supType === 'multi') { // 数据卡多上级组件 |
| | | if (item.supNodes && item.supNodes[0]) { |
| | | item.setting.supModule = item.supNodes[0].componentId |
| | | } else { |
| | | item.wrap.supType = 'single' |
| | | item.supNodes = null |
| | | item.setting.supModule = '' |
| | | } |
| | | } else if (item.setting && item.setting.supModule) { |
| | | let pid = item.setting.supModule.pop() |
| | | if (pid && pid !== 'empty') { |
| | | item.setting.supModule = pid |
| | | } else { |
| | | item.setting.supModule = '' |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | // 格式化默认设置 |
| | | formatSetting = (components, params, mainSearch, inherit, regs, balMap) => { |
| | | let delay = 20 |
| | | return components.map(component => { |
| | | if (component.type === 'tabs') { |
| | | component.subtabs = component.subtabs.map(tab => { |
| | |
| | | } else { |
| | | params.push(getStructDefaultParam(component, searchlist, params.length === 0)) |
| | | } |
| | | } else if (component.floor === 1) { |
| | | } else if (params) { |
| | | component.setting.sync = 'false' |
| | | component.setting.delay = delay |
| | | delay += 20 |
| | | } |
| | | |
| | | if (balMap.has(component.uuid)) { |
| | |
| | | } else if (item.type === 'table' && item.subtype === 'editable') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <EditTable config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <EditTable config={item} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'group' && item.subtype === 'normalgroup') { |
| | |
| | | <CustomChart config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'module' && item.subtype === 'voucher') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Voucher config={item} BID={_bid} /> |
| | | </Col> |
| | | ) |
| | | } else { |
| | | return null |
| | | } |
| | |
| | | return ( |
| | | <div className={'custom-page-wrap ' + (loadingview || loading ? 'loading' : '')} id={this.state.ContainerId} style={config ? config.style : null}> |
| | | {(loadingview || loading) ? <Spin className="view-spin" size="large" /> : null} |
| | | <Row>{this.getComponents()}</Row> |
| | | <Row className="component-wrap">{this.getComponents()}</Row> |
| | | {menuType !== 'HS' && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null} |
| | | {menuType !== 'HS' && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null} |
| | | {viewlost ? <NotFount msg={this.state.lostmsg} /> : null} |