king
2022-04-26 5046d0d13dc6a8563b8e54e31913bc44cfa1072f
src/tabviews/custom/index.jsx
@@ -40,6 +40,7 @@
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 = {
@@ -423,7 +424,7 @@
        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
@@ -475,6 +476,8 @@
            tab.blacklist.filter(v => roleId.indexOf(v) > -1).length > 0
          ) {
            return false
          } else if (tab.hide === 'true') {
            return false
          }
          return true
        })
@@ -517,6 +520,23 @@
          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 = ''
        }
      }
@@ -581,6 +601,10 @@
          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)
          }
@@ -616,6 +640,10 @@
              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)
              }
@@ -639,6 +667,10 @@
              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)
@@ -668,6 +700,10 @@
            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)
            }
@@ -690,6 +726,10 @@
              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)
@@ -717,6 +757,10 @@
            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)
            }
@@ -734,23 +778,6 @@
        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 = ''
        }
      }
@@ -823,6 +850,7 @@
  // 格式化默认设置
  formatSetting = (components, params, mainSearch, inherit, regs, balMap) => {
    let delay = 20
    return components.map(component => {
      if (component.type === 'tabs') {
        component.subtabs = component.subtabs.map(tab => {
@@ -916,8 +944,10 @@
        } 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)) {
@@ -1134,7 +1164,7 @@
      } 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') {
@@ -1167,6 +1197,12 @@
            <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
      }
@@ -1180,7 +1216,7 @@
    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}