king
2023-06-01 44adf318fc85408dc1678390956c87d96a0fb104
2-23-06-01
9个文件已修改
165 ■■■■ 已修改文件
src/components/normalform/modalform/index.jsx 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/normalform/modalform/mkSelect/index.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/balcony/options.jsx 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/options.jsx 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/prop-card/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/editor/braft-editor/options.jsx 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/sysinterface/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/prop-card/index.jsx 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/editTable/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/normalform/modalform/index.jsx
@@ -239,6 +239,24 @@
          return item || cell
        })
      })
    } else if (item.reset_source) {
      let map = new Map()
      this.state.formlist.forEach(cell => {
        if (!cell.field) return
        map.set(cell.field, cell)
      })
      item.callback(map, this.record)
      this.setState({
        formlist: this.state.formlist.map(cell => {
          if (!cell.field) return cell
          let item = map.get(cell.field)
          return item || cell
        })
      })
    }
  }
src/components/normalform/modalform/mkSelect/index.jsx
@@ -31,6 +31,17 @@
    MKEmitter.addListener('mkFC', this.mkFormControl)
  }
  UNSAFE_componentWillReceiveProps (nextProps) {
    const { config } = this.state
    if (!is(fromJS(config.oriOptions), fromJS(nextProps.config.oriOptions))) {
      this.setState({
        config: fromJS(nextProps.config).toJS(),
        options: fromJS(nextProps.config.options).toJS()
      })
    }
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState))
  }
src/menu/components/card/balcony/options.jsx
@@ -78,7 +78,27 @@
      label: '数据源',
      initval: wrap.publicId || '',
      required: true,
      options: interfaces
      options: interfaces,
      reset_source: true,
      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 _bgField = map.get('bgField')
        if (_bgField && !_bgField.forbid) {
          _bgField.options = columns
          _bgField.oriOptions = columns
          map.set('bgField', _bgField)
        }
      }
    },
    {
      type: 'radio',
src/menu/components/card/data-card/options.jsx
@@ -103,10 +103,11 @@
      ],
      linkFields: ['priKeyType'],
      controlFields: [
        {field: 'goback', values: ['dynamic']},
        {field: 'goback', values: ['dynamic', 'public']},
        {field: 'empty', values: ['dynamic', 'public']},
        {field: 'jump', values: ['dynamic']},
        {field: 'autoExec', values: ['dynamic']},
        {field: 'jump', values: ['dynamic', 'public']},
        {field: 'broadcast', values: ['dynamic', 'public']},
        {field: 'autoExec', values: ['dynamic', 'public']},
        {field: 'supModule', values: ['static']},
        {field: 'publicId', values: ['public']},
      ],
@@ -119,7 +120,42 @@
      initval: wrap.publicId || '',
      required: true,
      options: interfaces,
      forbid: subtype !== 'propcard'
      reset_source: true,
      forbid: subtype !== 'propcard',
      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 _broadcast = map.get('broadcast')
        if (_broadcast && !_broadcast.forbid) {
          _broadcast.options = columns
          _broadcast.oriOptions = columns
          map.set('broadcast', _broadcast)
        }
        let _jumpField = map.get('jumpField')
        if (_jumpField && !_jumpField.forbid) {
          _jumpField.options = columns
          _jumpField.oriOptions = columns
          map.set('jumpField', _jumpField)
        }
        let _link = map.get('link')
        if (_link && !_link.forbid) {
          _link.options = columns
          _link.oriOptions = columns
          map.set('link', _link)
        }
      }
    },
    {
      type: 'radio',
@@ -326,7 +362,7 @@
      field: 'broadcast',
      label: '语音播报',
      initval: wrap.broadcast || '',
      tooltip: '语音播报在移动端app中有效。注:使用语音播报时,数据源不要使用同步查询,添加定时器时,可循环播报',
      tooltip: '语音播报在移动端有效。注:在H5中请使用音频链接,添加定时器时,可循环播报',
      required: false,
      options: columns,
      forbid: !columns || appType !== 'mob' || subtype !== 'propcard'
@@ -349,6 +385,7 @@
      field: 'display',
      label: '显示控制',
      initval: wrap.display || 'normal',
      tooltip: '当使用属性卡进行某些业务操作,且不需要展示卡片信息时,可设置为不可见。',
      required: false,
      options: [
        {value: 'normal', label: '正常显示'},
src/menu/components/card/prop-card/index.jsx
@@ -123,7 +123,7 @@
  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()}
src/menu/components/editor/braft-editor/options.jsx
@@ -80,14 +80,33 @@
      label: '数据源',
      initval: wrap.publicId || '',
      required: true,
      options: interfaces
      options: interfaces,
      reset_source: true,
      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 _field = map.get('field')
        if (_field) {
          _field.options = columns
          _field.oriOptions = columns
          map.set('field', _field)
        }
      }
    },
    {
      type: 'select',
      field: 'field',
      label: '文本字段',
      initval: wrap.field || '',
      tooltip: '选择动态值时,需设置文本字段才可生效,使用公共数据源时,需先保存数据源后再选取文本字段。',
      required: false,
      options: columns
    },
src/menu/sysinterface/index.jsx
@@ -221,6 +221,7 @@
    this.setState({ interfaces })
    this.props.updateConfig({...config, interfaces})
    MKEmitter.emit('editLineId', record.uuid)
    setTimeout(() => {
      MKEmitter.emit('mkUpdateInter', record, {delay: 0})
    }, 10)
src/tabviews/custom/components/card/prop-card/index.jsx
@@ -135,9 +135,15 @@
      }
      if (_config.wrap.datatype === 'dynamic' && this.loaded) {
        this.autoExec()
        if (_config.wrap.goback === 'true' && _data.$$empty) {
          this.timer && this.timer.stop()
          MKEmitter.emit('closeTabView', _config.$pageId)
        } else {
          this.autoExec()
        }
      }
      if (!_config.wrap.cardType && _data.$$uuid) {
      if (_data.$$uuid) {
        setTimeout(() => {
          this.transferLine()
        }, 200)
@@ -213,12 +219,18 @@
      this.loaded = true
      this.setState({sync: false, data: _data}, () => {
        if (selected !== 'false') {
          this.checkTopLine()
        } else if (!config.wrap.cardType && _data.$$uuid) {
          this.transferLine()
        if (config.wrap.goback === 'true' && _data.$$empty) {
          this.timer && this.timer.stop()
          MKEmitter.emit('closeTabView', config.$pageId)
        } else {
          if (selected !== 'false') {
            this.checkTopLine()
          } else if (_data.$$uuid) {
            this.transferLine()
          }
          this.autoExec()
        }
        this.autoExec()
      })
    } else if (config.setting.useMSearch && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) {
      this.setState({}, () => {
@@ -240,10 +252,17 @@
      this.loaded = true
      this.setState({data: _data}, () => {
        if (selected !== 'false') {
          this.checkTopLine()
        if (config.wrap.goback === 'true' && _data.$$empty) {
          this.timer && this.timer.stop()
          MKEmitter.emit('closeTabView', config.$pageId)
        } else {
          this.transferLine()
          if (selected !== 'false') {
            this.checkTopLine()
          } else {
            this.transferLine()
          }
          this.autoExec()
        }
      })
    }
src/templates/zshare/editTable/index.jsx
@@ -427,7 +427,7 @@
        if (!unique) return
        data.unshift(res.data)
        this.setState({ data, editingKey: '', visible: false }, () => {
        this.setState({ data, editingKey: '', editLineId: res.data.uuid || '', visible: false }, () => {
          this.props.onChange(data)
        })
      } else if (res.type === 'array') {