king
2023-03-11 34e7681fd12b1c4e4994d3bea1a553870e10bc50
src/tabviews/custom/popview/index.jsx
@@ -20,6 +20,7 @@
const AntvScatter = asyncComponent(() => import('../components/chart/antv-scatter'))
const DataCard = asyncComponent(() => import('../components/card/data-card'))
const PropCard = asyncComponent(() => import('../components/card/prop-card'))
const DoubleDataCard = asyncComponent(() => import('../components/card/double-data-card'))
const SimpleForm = asyncComponent(() => import('../components/form/simple-form'))
const StepForm = asyncComponent(() => import('../components/form/step-form'))
const TabForm = asyncComponent(() => import('../components/form/tab-form'))
@@ -362,7 +363,7 @@
      if (item.wrap && item.wrap.supType === 'multi') { // 数据卡多上级组件
        mutil = true
        item.setting.supModule = item.supNodes[0].componentId
      } else if (item.setting && item.setting.supModule) {
      } else if (item.setting && item.setting.supModule && typeof(item.setting.supModule) !== 'string') {
        let pid = item.setting.supModule.pop()
        if (pid && pid !== 'empty') {
          item.setting.supModule = pid
@@ -384,11 +385,22 @@
          if (!mutil && cell.syncComponentId === item.setting.supModule) {
            cell.syncComponentId = ''
            if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
              cell.execSuccess = 'mainline'
            }
          }
          if (cell.btnstyle) { // 兼容
            cell.style = cell.style || {}
            cell.style = {...cell.style, ...cell.btnstyle}
          }
          if (cell.controlField) {
            if (/,/ig.test(cell.controlVal)) {
              cell.controlVals = cell.controlVal.split(',')
            } else {
              cell.controlVals = [(cell.controlVal || '')]
            }
          }
          return true
@@ -416,10 +428,16 @@
              if (!mutil && cell.syncComponentId === item.setting.supModule) {
                cell.syncComponentId = ''
                if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
                  cell.execSuccess = 'mainline'
                }
              }
              if (card.btnstyle) { // 兼容
                card.style = card.style || {}
                card.style = {...card.style, ...card.btnstyle}
              if (cell.controlField) {
                if (/,/ig.test(cell.controlVal)) {
                  cell.controlVals = cell.controlVal.split(',')
                } else {
                  cell.controlVals = [(cell.controlVal || '')]
                }
              }
            } else if (['text', 'number', 'formula'].includes(cell.eleType)) {
              if (!cell.height) {
@@ -450,11 +468,17 @@
              if (!mutil && cell.syncComponentId === item.setting.supModule) {
                cell.syncComponentId = ''
                if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
                  cell.execSuccess = 'mainline'
                }
              }
              if (card.btnstyle) { // 兼容
                card.style = card.style || {}
                card.style = {...card.style, ...card.btnstyle}
              if (cell.controlField) {
                if (/,/ig.test(cell.controlVal)) {
                  cell.controlVals = cell.controlVal.split(',')
                } else {
                  cell.controlVals = [(cell.controlVal || '')]
                }
              }
            } else if (['text', 'number', 'formula'].includes(cell.eleType)) {
              if (!cell.height) {
@@ -490,6 +514,16 @@
            if (cell.syncComponentId === item.wrap.supModule) {
              cell.syncComponentId = ''
              if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
                cell.execSuccess = 'mainline'
              }
            }
            if (cell.controlField) {
              if (/,/ig.test(cell.controlVal)) {
                cell.controlVals = cell.controlVal.split(',')
              } else {
                cell.controlVals = [(cell.controlVal || '')]
              }
            }
          } else if (['text', 'number', 'formula'].includes(cell.eleType)) {
            if (!cell.height) {
@@ -519,11 +553,22 @@
            if (cell.syncComponentId === item.setting.supModule) {
              cell.syncComponentId = ''
              if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
                cell.execSuccess = 'mainline'
              }
            }
            if (cell.btnstyle) { // 兼容
              cell.style = cell.style || {}
              cell.style = {...cell.style, ...cell.btnstyle}
            }
            if (cell.controlField) {
              if (/,/ig.test(cell.controlVal)) {
                cell.controlVals = cell.controlVal.split(',')
              } else {
                cell.controlVals = [(cell.controlVal || '')]
              }
            }
            return true
@@ -552,6 +597,9 @@
          if (group.subButton.syncComponentId === item.setting.supModule) {
            group.subButton.syncComponentId = ''
            if (group.subButton.execSuccess === 'grid') {
              group.subButton.execSuccess = 'mainline'
            }
          }
          group.fields = group.fields.map(cell => {
@@ -712,7 +760,7 @@
      // dataName 系统生成的数据源名称
      if (component.setting.sync === 'true') {
        component.dataName = Utils.getdataName()
        component.dataName = 'mk' + component.uuid.slice(-18)
      }
      // floor    组件的层级
@@ -864,6 +912,12 @@
            <PropCard config={item} data={data} mainSearch={mainSearch}/>
          </Col>
        )
      } else if (item.type === 'card' && item.subtype === 'dualdatacard') {
        return (
          <Col span={item.width} style={style} key={item.uuid}>
            <DoubleDataCard config={item} mainSearch={mainSearch}/>
          </Col>
        )
      } else if (item.type === 'table' && item.subtype === 'basetable') {
        return (
          <Col span={item.width} style={style} key={item.uuid}>