king
2023-11-09 7bc44b8b3e88950fd2ff553f41dd0a01198f27ca
2023-11-09
15个文件已修改
318 ■■■■■ 已修改文件
src/menu/components/card/balcony/index.jsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/prop-card/index.jsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/simple-form/index.jsx 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/simple-form/options.jsx 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/step-form/index.jsx 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/step-form/options.jsx 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/tab-form/index.jsx 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/balcony/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/prop-card/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/simple-form/index.jsx 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/step-form/index.jsx 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/tab-form/index.jsx 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/popview/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/balcony/index.jsx
@@ -249,6 +249,9 @@
      if (d) {
        _card.columns = fromJS(d.columns).toJS()
        _card.setting = { interType: 'system' }
        _card.scripts = []
      }
    }
src/menu/components/card/prop-card/index.jsx
@@ -330,6 +330,9 @@
      if (d) {
        _card.columns = fromJS(d.columns).toJS()
        _card.setting = { interType: 'system' }
        _card.scripts = []
      }
    }
src/menu/components/form/simple-form/index.jsx
@@ -82,6 +82,10 @@
    }
  }
  componentDidMount () {
    MKEmitter.addListener('mkUpdateInter', this.mkUpdateInter)
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState))
  }
@@ -92,6 +96,21 @@
  componentWillUnmount () {
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('mkUpdateInter', this.mkUpdateInter)
  }
  mkUpdateInter = (inter, split) => {
    const { card } = this.state
    if (card.wrap.datatype === 'public' && card.wrap.publicId === inter.uuid) {
      let _card = {...card, columns: fromJS(inter.columns).toJS()}
      split.delay = split.delay + 10
      setTimeout(() => {
        this.updateComponent(_card)
      }, split.delay)
    }
  }
@@ -104,7 +123,7 @@
    card.errors = []
    let idCtrl = false
    if (card.wrap.datatype !== 'static') {
    if (card.wrap.datatype === 'dynamic') {
      let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : ''
      if (supModule === 'empty') {
        supModule = ''
@@ -128,7 +147,10 @@
        })
      })
    } else {
      let supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : ''
      let supModule = ''
      if (card.wrap.datatype === 'static') {
        supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : ''
      }
      card.$tables = getTables(card)
@@ -137,7 +159,7 @@
          if (m.dataSource && /@ID@/ig.test(m.dataSource)) {
            idCtrl = true
          }
          if (m.type === 'linkMain' && !supModule) {
          if (m.type === 'linkMain' && !supModule && card.wrap.datatype === 'static') {
            card.errors.push({ level: 1, detail: `请检查关联主表“${m.label}”是否有效`})
          }
        })
@@ -497,6 +519,17 @@
      } else {
        _card.setting.supModule = ''
      }
    } else if (res.datatype === 'public') {
      let interfaces = window.GLOB.customMenu.interfaces || []
      let d = interfaces.filter(m => m.uuid === res.publicId && m.status === 'true')[0]
      if (d) {
        _card.columns = fromJS(d.columns).toJS()
        _card.setting = { interType: 'system' }
        _card.scripts = []
      }
    }
    _card.subcards[0].setting.focus = _card.wrap.focus
@@ -563,8 +596,7 @@
            <PasteForms config={card.subcards[0]} update={this.pasteForm} />
            <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/>
            <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} />
            {card.wrap.datatype !== 'static' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : null}
            {card.wrap.datatype === 'static' ? <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/> : null}
            {card.wrap.datatype === 'dynamic' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/>}
          </div>
        } trigger="hover">
          <ToolOutlined />
src/menu/components/form/simple-form/options.jsx
@@ -45,6 +45,18 @@
    }
  }
  let interfaces = []
  if (menu.interfaces) {
    menu.interfaces.forEach(item => {
      if (item.status === 'true') {
        interfaces.push({
          value: item.uuid,
          label: item.name
        })
      }
    })
  }
  let buttons = []
  if (!wrap.enable || wrap.enable === 'true') {
@@ -94,14 +106,24 @@
      options: [
        {value: 'dynamic', label: '动态'},
        {value: 'static', label: '静态'},
        {value: 'public', label: '公共数据源'},
      ],
      controlFields: [
        {field: 'empty', values: ['dynamic']},
        {field: 'supModule', values: ['static']},
        {field: 'publicId', values: ['public']},
      ]
    },
    {
      type: 'select',
      field: 'publicId',
      label: '数据源',
      initval: wrap.publicId || '',
      required: true,
      options: interfaces
    },
    {
      type: 'select',
      field: 'focus',
      label: '焦点',
      initval: wrap.focus || '',
src/menu/components/form/step-form/index.jsx
@@ -89,6 +89,10 @@
    }
  }
  componentDidMount () {
    MKEmitter.addListener('mkUpdateInter', this.mkUpdateInter)
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState))
  }
@@ -99,6 +103,21 @@
  componentWillUnmount () {
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('mkUpdateInter', this.mkUpdateInter)
  }
  mkUpdateInter = (inter, split) => {
    const { card } = this.state
    if (card.wrap.datatype === 'public' && card.wrap.publicId === inter.uuid) {
      let _card = {...card, columns: fromJS(inter.columns).toJS()}
      split.delay = split.delay + 10
      setTimeout(() => {
        this.updateComponent(_card)
      }, split.delay)
    }
  }
@@ -111,7 +130,7 @@
    card.errors = []
    let idCtrl = false
    if (card.wrap.datatype !== 'static') {
    if (card.wrap.datatype === 'dynamic') {
      let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : ''
      if (supModule === 'empty') {
        supModule = ''
@@ -135,7 +154,10 @@
        })
      })
    } else {
      let supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : ''
      let supModule = ''
      if (card.wrap.datatype === 'static') {
        supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : ''
      }
      card.$tables = getTables(card)
@@ -144,7 +166,7 @@
          if (m.dataSource && /@ID@/ig.test(m.dataSource)) {
            idCtrl = true
          }
          if (m.type === 'linkMain' && !supModule) {
          if (m.type === 'linkMain' && !supModule && card.wrap.datatype === 'static') {
            card.errors.push({ level: 1, detail: `请检查分组“${item.setting.title}”中关联主表“${m.label}”是否有效`})
          }
        })
@@ -586,6 +608,17 @@
      } else {
        _card.setting.supModule = ''
      }
    } else if (res.datatype === 'public') {
      let interfaces = window.GLOB.customMenu.interfaces || []
      let d = interfaces.filter(m => m.uuid === res.publicId && m.status === 'true')[0]
      if (d) {
        _card.columns = fromJS(d.columns).toJS()
        _card.setting = { interType: 'system' }
        _card.scripts = []
      }
    }
    this.updateComponent(_card)
@@ -670,8 +703,7 @@
            <PasteComponent config={card} options={['formgroup', 'simpleform']} updateConfig={this.pasteForm} />
            <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/>
            <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} />
            {card.wrap.datatype !== 'static' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : null}
            {card.wrap.datatype === 'static' ? <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/> : null}
            {card.wrap.datatype === 'dynamic' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/>}
          </div>
        } trigger="hover">
          <ToolOutlined />
src/menu/components/form/step-form/options.jsx
@@ -29,6 +29,18 @@
    }
  }
  let interfaces = []
  if (menu.interfaces) {
    menu.interfaces.forEach(item => {
      if (item.status === 'true') {
        interfaces.push({
          value: item.uuid,
          label: item.name
        })
      }
    })
  }
  const wrapForm = [
    {
      type: 'text',
@@ -59,14 +71,44 @@
      options: [
        {value: 'dynamic', label: '动态'},
        {value: 'static', label: '静态'},
        {value: 'public', label: '公共数据源'}
      ],
      controlFields: [
        {field: 'empty', values: ['dynamic']},
        {field: 'supModule', values: ['static']},
        {field: 'publicId', values: ['public']},
      ]
    },
    {
      type: 'select',
      field: 'publicId',
      label: '数据源',
      initval: wrap.publicId || '',
      required: true,
      options: interfaces,
      reset_source: config.subtype !== 'tabform',
      callback: (map, record) => {
        if (!record.publicId) return
        let interfaces = window.GLOB.customMenu.interfaces || []
        let d = interfaces.filter(m => m.uuid === record.publicId && m.status === 'true')[0]
        if (!d || !d.columns) return
        let columns = JSON.parse(JSON.stringify(d.columns))
        let _sCtrl = map.get('statusControl')
        if (_sCtrl && !_sCtrl.forbid) {
          _sCtrl.options = columns
          _sCtrl.oriOptions = columns
          map.set('statusControl', _sCtrl)
        }
      }
    },
    {
      type: 'select',
      field: 'statusControl',
      label: '状态控制',
      initval: wrap.statusControl || '',
src/menu/components/form/tab-form/index.jsx
@@ -101,6 +101,10 @@
    }
  }
  componentDidMount () {
    MKEmitter.addListener('mkUpdateInter', this.mkUpdateInter)
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState))
  }
@@ -111,6 +115,21 @@
  componentWillUnmount () {
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('mkUpdateInter', this.mkUpdateInter)
  }
  mkUpdateInter = (inter, split) => {
    const { card } = this.state
    if (card.wrap.datatype === 'public' && card.wrap.publicId === inter.uuid) {
      let _card = {...card, columns: fromJS(inter.columns).toJS()}
      split.delay = split.delay + 10
      setTimeout(() => {
        this.updateComponent(_card)
      }, split.delay)
    }
  }
@@ -123,7 +142,7 @@
    card.errors = []
    let idCtrl = false
    if (card.wrap.datatype !== 'static') {
    if (card.wrap.datatype === 'dynamic') {
      let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : ''
      if (supModule === 'empty') {
        supModule = ''
@@ -147,7 +166,10 @@
        })
      })
    } else {
      let supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : ''
      let supModule = ''
      if (card.wrap.datatype === 'static') {
        supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : ''
      }
      card.$tables = getTables(card)
@@ -156,7 +178,7 @@
          if (m.dataSource && /@ID@/ig.test(m.dataSource)) {
            idCtrl = true
          }
          if (m.type === 'linkMain' && !supModule) {
          if (m.type === 'linkMain' && !supModule && card.wrap.datatype === 'static') {
            card.errors.push({ level: 1, detail: `请检查分组“${item.setting.title}”中关联主表“${m.label}”是否有效`})
          }
        })
@@ -587,6 +609,17 @@
      } else {
        _card.setting.supModule = ''
      }
    } else if (res.datatype === 'public') {
      let interfaces = window.GLOB.customMenu.interfaces || []
      let d = interfaces.filter(m => m.uuid === res.publicId && m.status === 'true')[0]
      if (d) {
        _card.columns = fromJS(d.columns).toJS()
        _card.setting = { interType: 'system' }
        _card.scripts = []
      }
    }
    this.updateComponent(_card)
@@ -671,8 +704,7 @@
            <PasteComponent config={card} options={['formgroup', 'simpleform']} updateConfig={this.pasteForm} />
            <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/>
            <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} />
            {card.wrap.datatype !== 'static' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : null}
            {card.wrap.datatype === 'static' ? <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/> : null}
            {card.wrap.datatype === 'dynamic' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/>}
          </div>
        } trigger="hover">
          <ToolOutlined />
src/tabviews/custom/components/card/balcony/index.jsx
@@ -252,7 +252,6 @@
      _data.$$BID = BID || ''
      _data.$$BData = BData || ''
      _data.$$uuid = _data[config.setting.primaryKey] || ''
      this.setState({data: _data})
    }
src/tabviews/custom/components/card/prop-card/index.jsx
@@ -352,7 +352,6 @@
      _data.$$BID = BID || ''
      _data.$$BData = BData || ''
      _data.$$uuid = _data[config.setting.primaryKey] || ''
      this.loaded = true
src/tabviews/custom/components/form/simple-form/index.jsx
@@ -57,6 +57,13 @@
  
        window.GLOB.SyncData.delete(_config.dataName)
      }
    } else if (_config.wrap.datatype === 'public') {
      if (window.GLOB.CacheData.has(_config.wrap.publicId)) {
        _data = window.GLOB.CacheData.get(_config.wrap.publicId)
        _data = fromJS(_data).toJS()
        _data.$$BID = BID || ''
        _data.$$BData = BData || ''
      }
    } else {
      _data = {$$empty: true}
    }
@@ -93,6 +100,10 @@
      MKEmitter.addListener('transferSyncData', this.transferSyncData)
    }
    if (config.wrap.datatype === 'public') {
      MKEmitter.addListener('mkPublicData', this.mkPublicData)
    }
    this.initExec()
  }
@@ -105,6 +116,7 @@
      return
    }
    MKEmitter.removeListener('reloadData', this.reloadData)
    MKEmitter.removeListener('mkPublicData', this.mkPublicData)
    MKEmitter.removeListener('mkFormSubmit', this.mkFormSubmit)
    MKEmitter.removeListener('searchRefresh', this.searchRefresh)
    MKEmitter.removeListener('resetSelectLine', this.resetParentParam)
@@ -136,6 +148,23 @@
    window.GLOB.SyncData.delete(config.dataName)
    MKEmitter.removeListener('transferSyncData', this.transferSyncData)
  }
  mkPublicData = (publicId, data) => {
    const { config, BID, BData } = this.state
    if (config.wrap.datatype === 'public' && config.wrap.publicId === publicId) {
      let _data = fromJS(data).toJS()
      _data.$$BID = BID || ''
      _data.$$BData = BData || ''
      this.setState({
        data: null
      }, () => {
        this.setState({data: _data})
      })
    }
  }
  searchRefresh = (searchId) => {
@@ -229,7 +258,10 @@
  async loadData () {
    const { config, BID } = this.state
    if (config.wrap.datatype === 'static') {
    if (config.wrap.datatype === 'public') {
      MKEmitter.emit('reloadData', config.wrap.publicId)
      return
    } else if (config.wrap.datatype === 'static') {
      this.setState({
        data: {$$empty: true}
      })
src/tabviews/custom/components/form/step-form/index.jsx
@@ -57,6 +57,13 @@
  
        window.GLOB.SyncData.delete(_config.dataName)
      }
    } else if (_config.wrap.datatype === 'public') {
      if (window.GLOB.CacheData.has(_config.wrap.publicId)) {
        _data = window.GLOB.CacheData.get(_config.wrap.publicId)
        _data = fromJS(_data).toJS()
        _data.$$BID = BID || ''
        _data.$$BData = BData || ''
      }
    } else {
      _data = {$$empty: true}
    }
@@ -134,6 +141,10 @@
      MKEmitter.addListener('transferSyncData', this.transferSyncData)
    }
    if (config.wrap.datatype === 'public') {
      MKEmitter.addListener('mkPublicData', this.mkPublicData)
    }
    this.initExec()
  }
@@ -146,6 +157,7 @@
      return
    }
    MKEmitter.removeListener('reloadData', this.reloadData)
    MKEmitter.removeListener('mkPublicData', this.mkPublicData)
    MKEmitter.removeListener('mkFormSubmit', this.mkFormSubmit)
    MKEmitter.removeListener('searchRefresh', this.searchRefresh)
    MKEmitter.removeListener('resetSelectLine', this.resetParentParam)
@@ -185,6 +197,23 @@
    window.GLOB.SyncData.delete(config.dataName)
    MKEmitter.removeListener('transferSyncData', this.transferSyncData)
  }
  mkPublicData = (publicId, data) => {
    const { config, BID, BData } = this.state
    if (config.wrap.datatype === 'public' && config.wrap.publicId === publicId) {
      let _data = fromJS(data).toJS()
      _data.$$BID = BID || ''
      _data.$$BData = BData || ''
      this.setState({
        data: null
      }, () => {
        this.setState({data: _data})
      })
    }
  }
  searchRefresh = (searchId) => {
@@ -290,7 +319,10 @@
  async loadData (type) {
    const { config, BID } = this.state
    if (config.wrap.datatype === 'static') {
    if (config.wrap.datatype === 'public') {
      MKEmitter.emit('reloadData', config.wrap.publicId)
      return
    } else if (config.wrap.datatype === 'static') {
      this.setState({
        data: {$$empty: true}
      })
src/tabviews/custom/components/form/tab-form/index.jsx
@@ -56,6 +56,13 @@
  
        window.GLOB.SyncData.delete(_config.dataName)
      }
    } else if (_config.wrap.datatype === 'public') {
      if (window.GLOB.CacheData.has(_config.wrap.publicId)) {
        _data = window.GLOB.CacheData.get(_config.wrap.publicId)
        _data = fromJS(_data).toJS()
        _data.$$BID = BID || ''
        _data.$$BData = BData || ''
      }
    } else {
      _data = {$$empty: true}
    }
@@ -108,6 +115,10 @@
      MKEmitter.addListener('transferSyncData', this.transferSyncData)
    }
    if (config.wrap.datatype === 'public') {
      MKEmitter.addListener('mkPublicData', this.mkPublicData)
    }
    this.initExec()
  }
@@ -120,6 +131,7 @@
      return
    }
    MKEmitter.removeListener('reloadData', this.reloadData)
    MKEmitter.removeListener('mkPublicData', this.mkPublicData)
    MKEmitter.removeListener('mkFormSubmit', this.mkFormSubmit)
    MKEmitter.removeListener('searchRefresh', this.searchRefresh)
    MKEmitter.removeListener('resetSelectLine', this.resetParentParam)
@@ -151,6 +163,23 @@
    window.GLOB.SyncData.delete(config.dataName)
    MKEmitter.removeListener('transferSyncData', this.transferSyncData)
  }
  mkPublicData = (publicId, data) => {
    const { config, BID, BData } = this.state
    if (config.wrap.datatype === 'public' && config.wrap.publicId === publicId) {
      let _data = fromJS(data).toJS()
      _data.$$BID = BID || ''
      _data.$$BData = BData || ''
      this.setState({
        data: null
      }, () => {
        this.setState({data: _data})
      })
    }
  }
  searchRefresh = (searchId) => {
@@ -243,7 +272,10 @@
  async loadData () {
    const { config, BID } = this.state
    if (config.wrap.datatype === 'static') {
    if (config.wrap.datatype === 'public') {
      MKEmitter.emit('reloadData', config.wrap.publicId)
      return
    } else if (config.wrap.datatype === 'static') {
      this.setState({
        data: {$$empty: true}
      })
src/tabviews/custom/index.jsx
@@ -802,7 +802,7 @@
          }
          if (group.subButton.verify && group.subButton.verify.invalid === 'true') {
            if (item.wrap.datatype === 'static') {
            if (item.wrap.datatype === 'static' || item.wrap.datatype === 'public') {
              group.subButton.verify.invalid = 'false'
            } else if (group.subButton.sqlType === 'insert') {
              group.subButton.verify.invalid = 'false'
@@ -929,7 +929,7 @@
    }
    if (cell.verify && cell.verify.invalid === 'true') {
      if (item.wrap && item.wrap.datatype === 'static') {
      if (item.wrap && (item.wrap.datatype === 'static' || item.wrap.datatype === 'public')) {
        cell.verify.invalid = 'false'
      } else if (cell.intertype !== 'system' && cell.procMode !== 'system') {
        cell.verify.invalid = 'false'
src/tabviews/custom/popview/index.jsx
@@ -736,12 +736,8 @@
      } else if (component.type === 'group') {
        component.components = this.formatSetting(component.components, params, regs, balMap)
        return component
      } else if (component.wrap && component.wrap.datatype === 'public') {
        component.setting.useMSearch = false
        component.setting.sync = 'false'
        return component
      } else if (component.wrap && component.wrap.datatype === 'static') {
      } else if (component.wrap && (component.wrap.datatype === 'static' || component.wrap.datatype === 'public')) {
        component.wrap.datatype = 'static'
        component.format = ''
        component.setting = component.setting || {}
        component.setting.useMSearch = false
src/templates/zshare/verifycard/index.jsx
@@ -542,7 +542,11 @@
    let _invalid = _verify.invalid || 'true'
    _verify.limitInvalid = false
    if (config.wrap && config.wrap.datatype === 'static') {
    if (config.wrap && config.wrap.datatype === 'public') {
      _verify.limitInvalid = true
      _verify.limitText = '公共数据源,不可使用失效验证'
      _invalid = 'false'
    } else if (config.wrap && config.wrap.datatype === 'static') {
      _verify.limitInvalid = true
      _verify.limitText = '静态数据源,不可使用失效验证'
      _invalid = 'false'