king
2021-01-19 f9ba5907ddff56da7c38b1c7d5a9c5ba6aadfa05
src/views/billprint/index.jsx
@@ -21,6 +21,7 @@
const PropCard = asyncComponent(() => import('@/tabviews/custom/components/card/prop-card'))
const TableCard = asyncComponent(() => import('@/tabviews/custom/components/card/table-card'))
const NormalTable = asyncComponent(() => import('@/tabviews/custom/components/table/normal-table'))
const BraftEditor = asyncComponent(() => import('@/tabviews/custom/components/editor/braft-editor'))
class BillPrint extends Component {
  state = {
@@ -153,9 +154,13 @@
          if (component.action) component.action = []
          if (component.search) component.search = []
          component.data = [] // 初始化数据为空
          if ((component.subtype === 'propcard' || component.subtype === 'brafteditor') && component.wrap.datatype === 'static') {
            component.format = ''
          }
    
          if (!component.setting) return component // 不使用系统函数时
          if (!component.format || (component.subtype === 'propcard' && component.wrap.datatype === 'static')) return component // 没有动态数据  数据格式 array 或 object
          if (!component.format) return component  // 没有动态数据  数据格式 array 或 object
          if (component.setting.interType !== 'system') { // 不使用系统函数时
            component.setting.sync = 'false'
            return component
@@ -350,7 +355,7 @@
      let _results = results.filter(Boolean)
      let comps = components.map(item => {
        if (item.subtype === 'propcard' && item.wrap.datatype === 'static') return item
        if (!item.format) return item
        _results.forEach(res => {
          if (res.componentId === item.uuid && res.data) {
@@ -566,6 +571,12 @@
            <NormalTable config={item} initdata={item.data} mainSearch={[]} menuType="" />
          </Col>
        )
      } else if (item.type === 'editor') {
        return (
          <Col span={item.width} key={item.uuid}>
            <BraftEditor config={item} initdata={item.data} mainSearch={[]} menuType="" />
          </Col>
        )
      } else {
        return null
      }