king
2023-06-16 e4666c46c685ec7eabff25af9890d54c0ff2952b
2023-06-16
13个文件已修改
239 ■■■■■ 已修改文件
src/menu/components/card/cardcellcomponent/dragaction/action.jsx 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/actionform/index.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/formconfig.jsx 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/balcony/index.jsx 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/data-card/index.jsx 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/double-data-card/index.jsx 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/prop-card/index.jsx 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/table-card/index.jsx 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/edit-table/index.jsx 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/normal-table/index.jsx 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/timeline/normal-timeline/index.jsx 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/mkcounter/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/dragaction/action.jsx
@@ -39,6 +39,9 @@
  let warning = null
  if (['pop', 'prompt', 'exec', 'form'].includes(card.OpenType)) {
    hasProfile = true
    if (card.formType === 'count_line') {
      hasProfile = false
    }
  } else if (card.OpenType === 'excelIn' || card.OpenType === 'excelOut') {
    hasProfile = true
  } else if (card.funcType === 'print') {
@@ -53,7 +56,7 @@
  if (card.OpenType === 'form') {
    if (card.formType === 'switch') {
      btnElement = (<Switch style={_style} className={card.size === 'large' ? 'ant-switch-large' : ''} size={card.size} checkedChildren={card.openText || ''} unCheckedChildren={card.closeText || ''}/>)
    } else if (card.formType === 'counter') {
    } else if (card.formType === 'counter' || card.formType === 'count_line') {
      btnElement = (<div style={_style} className={'mk-counter ' + card.size}><span><MinusOutlined /></span><span>1</span><span><PlusOutlined /></span></div>)
    } else if (card.formType === 'radio') {
      btnElement = (<Checkbox style={_style}></Checkbox>)
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -249,7 +249,7 @@
      if (this.record.formType === 'switch') {
        shows.push('field', 'size', 'openVal', 'closeVal', 'openText', 'closeText')
      } else if (this.record.formType === 'counter') {
      } else if (this.record.formType === 'counter' || this.record.formType === 'count_line') {
        shows.push('field', 'size', 'min', 'max', 'decimal')
      } else if (this.record.formType === 'radio') {
        shows.push('field', 'checkType', 'openVal', 'closeVal')
@@ -308,6 +308,11 @@
        value: 'custom',
        text: '自定义'
      }]
      if (this.record.formType === 'count_line') {
        reOptions.Ot = requireOptions.filter(op => ['requiredSgl'].includes(op.value))
        shows = shows.filter(op => ['label', 'OpenType', 'formType', 'Ot', 'width', 'title', 'hidden', 'field', 'size', 'min', 'max', 'decimal'].includes(op))
      }
    } else if (openType === 'excelIn') {
      reOptions.intertype = this.state.interTypeOptions.filter(op => op.value !== 'custom')
      reOptions.Ot = requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value))
@@ -618,6 +623,11 @@
      }
      this.props.updRecord && this.props.updRecord(this.record)
    } else if (key === 'formType') {
      if (value === 'count_line') {
        _fieldval.Ot = 'requiredSgl'
        this.record.Ot = 'requiredSgl'
      }
    } else if (key === 'funcType') {
      if (value === 'print') {
        _fieldval.label = '打印'
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -276,7 +276,7 @@
      ]
    },
    {
      type: 'radio',
      type: formTypes.length ? 'select' : 'radio',
      key: 'formType',
      label: '表单类型',
      initVal: card.formType || 'switch',
@@ -290,6 +290,9 @@
      }, {
        value: 'counter',
        text: '计数器'
      }, {
        value: 'count_line',
        text: '计数器(本地)'
      }, 
      ...formTypes]
    },
src/tabviews/custom/components/card/balcony/index.jsx
@@ -140,6 +140,7 @@
    MKEmitter.addListener('syncBalconyData', this.syncBalconyData)
    MKEmitter.addListener('resetSelectLine', this.resetParentParam)
    MKEmitter.addListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.addListener('refreshLineData', this.refreshLineData)
    MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult)
    if (config.wrap.datatype === 'public') {
@@ -176,6 +177,7 @@
    MKEmitter.removeListener('syncBalconyData', this.syncBalconyData)
    MKEmitter.removeListener('resetSelectLine', this.resetParentParam)
    MKEmitter.removeListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.removeListener('refreshLineData', this.refreshLineData)
    MKEmitter.removeListener('refreshByButtonResult', this.refreshByButtonResult)
    this.timer && this.timer.stop()
@@ -250,6 +252,19 @@
    }
  }
  refreshLineData = (menuId, btn, uuid, count) => {
    const { config, data } = this.state
    if (config.uuid !== menuId) return
    let _data = fromJS(data).toJS()
    _data[btn.field] = count
    this.setState({
      data: _data
    })
  }
  syncBalconyData = (menuId, data, checked) => {
    const { syncConfig } = this.state
src/tabviews/custom/components/card/data-card/index.jsx
@@ -215,6 +215,7 @@
    MKEmitter.addListener('mkCheckAll', this.mkCheckAll)
    MKEmitter.addListener('resetSelectLine', this.resetParentParam)
    MKEmitter.addListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.addListener('refreshLineData', this.refreshLineData)
    MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult)
    
    if (config.timer) {
@@ -305,6 +306,7 @@
    MKEmitter.removeListener('mkCheckAll', this.mkCheckAll)
    MKEmitter.removeListener('resetSelectLine', this.resetParentParam)
    MKEmitter.removeListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.removeListener('refreshLineData', this.refreshLineData)
    MKEmitter.removeListener('refreshByButtonResult', this.refreshByButtonResult)
    this.timer && this.timer.stop()
@@ -377,6 +379,22 @@
    }
  }
  refreshLineData = (menuId, btn, uuid, count) => {
    const { config, data } = this.state
    if (config.uuid !== menuId) return
    let _data = fromJS(data).toJS().forEach(item => {
      if (item.$$uuid === uuid) {
        item[btn.field] = count
      }
    })
    this.setState({
      data: _data
    })
  }
  checkTopLine = (id) => {
    const { config, data, selected } = this.state
src/tabviews/custom/components/card/double-data-card/index.jsx
@@ -205,6 +205,7 @@
    MKEmitter.addListener('reloadData', this.reloadData)
    MKEmitter.addListener('resetSelectLine', this.resetParentParam)
    MKEmitter.addListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.addListener('refreshLineData', this.refreshLineData)
    MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult)
    
    if (config.timer) {
@@ -284,6 +285,7 @@
    MKEmitter.removeListener('reloadData', this.reloadData)
    MKEmitter.removeListener('resetSelectLine', this.resetParentParam)
    MKEmitter.removeListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.removeListener('refreshLineData', this.refreshLineData)
    MKEmitter.removeListener('refreshByButtonResult', this.refreshByButtonResult)
    this.timer && this.timer.stop()
@@ -325,6 +327,27 @@
    }
  }
  refreshLineData = (menuId, btn, uuid, count) => {
    const { config, data } = this.state
    if (config.uuid !== menuId) return
    let _data = fromJS(data).toJS().forEach(item => {
      if (item.$$uuid === uuid) {
        item[btn.field] = count
      }
      item.children.forEach(cell => {
        if (cell.$$uuid === uuid) {
          cell[btn.field] = count
        }
      })
    })
    this.setState({
      data: _data
    })
  }
  checkTopLine = (id) => {
    const { config, data, selected, card } = this.state
    let _opens = [...this.state.opens]
src/tabviews/custom/components/card/prop-card/index.jsx
@@ -157,6 +157,7 @@
    MKEmitter.addListener('reloadData', this.reloadData)
    MKEmitter.addListener('resetSelectLine', this.resetParentParam)
    MKEmitter.addListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.addListener('refreshLineData', this.refreshLineData)
    MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult)
    if (config.wrap.datatype === 'public') {
@@ -192,6 +193,7 @@
    MKEmitter.removeListener('mkPublicData', this.mkPublicData)
    MKEmitter.removeListener('resetSelectLine', this.resetParentParam)
    MKEmitter.removeListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.removeListener('refreshLineData', this.refreshLineData)
    MKEmitter.removeListener('refreshByButtonResult', this.refreshByButtonResult)
    this.timer && this.timer.stop()
@@ -326,6 +328,19 @@
    }
  }
  refreshLineData = (menuId, btn, uuid, count) => {
    const { config, data } = this.state
    if (config.uuid !== menuId) return
    let _data = fromJS(data).toJS()
    _data[btn.field] = count
    this.setState({
      data: _data
    })
  }
  resetParentParam = (MenuID, id, data) => {
    const { config } = this.state
src/tabviews/custom/components/card/table-card/index.jsx
@@ -117,6 +117,7 @@
    MKEmitter.addListener('reloadData', this.reloadData)
    MKEmitter.addListener('resetSelectLine', this.resetParentParam)
    MKEmitter.addListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.addListener('refreshLineData', this.refreshLineData)
    MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult)
    if (config.timer) {
@@ -157,6 +158,7 @@
    MKEmitter.removeListener('reloadData', this.reloadData)
    MKEmitter.removeListener('resetSelectLine', this.resetParentParam)
    MKEmitter.removeListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.removeListener('refreshLineData', this.refreshLineData)
    MKEmitter.removeListener('refreshByButtonResult', this.refreshByButtonResult)
    this.timer && this.timer.stop()
@@ -215,6 +217,22 @@
    }
  }
  refreshLineData = (menuId, btn, uuid, count) => {
    const { config, data } = this.state
    if (config.uuid !== menuId) return
    let _data = fromJS(data).toJS().forEach(item => {
      if (item.$$uuid === uuid) {
        item[btn.field] = count
      }
    })
    this.setState({
      data: _data
    })
  }
  resetParentParam = (MenuID, id, data) => {
    const { config } = this.state
src/tabviews/custom/components/table/edit-table/index.jsx
@@ -502,6 +502,28 @@
    }
  }
  refreshLineData = (menuId, btn, uuid, count) => {
    const { config } = this.state
    if (config.uuid !== menuId) return
    let _data = fromJS(this.state.data).toJS().forEach(item => {
      if (item.$$uuid === uuid) {
        item[btn.field] = count
      }
    })
    let _selectedData = fromJS(this.state.selectedData).toJS().forEach(item => {
      if (item.$$uuid === uuid) {
        item[btn.field] = count
      }
    })
    this.setState({
      data: _data,
      selectedData: _selectedData
    })
  }
  UNSAFE_componentWillReceiveProps(nextProps) {
    const { config } = this.state
@@ -520,6 +542,7 @@
    MKEmitter.addListener('reloadData', this.reloadData)
    MKEmitter.addListener('resetSelectLine', this.resetParentParam)
    MKEmitter.addListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.addListener('refreshLineData', this.refreshLineData)
    MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult)
  }
@@ -533,6 +556,7 @@
    MKEmitter.removeListener('reloadData', this.reloadData)
    MKEmitter.removeListener('resetSelectLine', this.resetParentParam)
    MKEmitter.removeListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.removeListener('refreshLineData', this.refreshLineData)
    MKEmitter.removeListener('refreshByButtonResult', this.refreshByButtonResult)
  }
src/tabviews/custom/components/table/normal-table/index.jsx
@@ -606,6 +606,28 @@
    }
  }
  refreshLineData = (menuId, btn, uuid, count) => {
    const { config } = this.state
    if (config.uuid !== menuId) return
    let _data = fromJS(this.state.data).toJS().forEach(item => {
      if (item.$$uuid === uuid) {
        item[btn.field] = count
      }
    })
    let _selectedData = fromJS(this.state.selectedData).toJS().forEach(item => {
      if (item.$$uuid === uuid) {
        item[btn.field] = count
      }
    })
    this.setState({
      data: _data,
      selectedData: _selectedData
    })
  }
  UNSAFE_componentWillReceiveProps(nextProps) {
    const { sync, config, setting, BID, BData } = this.state
@@ -668,6 +690,7 @@
    MKEmitter.addListener('reloadData', this.reloadData)
    MKEmitter.addListener('resetSelectLine', this.resetParentParam)
    MKEmitter.addListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.addListener('refreshLineData', this.refreshLineData)
    MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult)
    if (config.timer) {
@@ -722,6 +745,7 @@
    MKEmitter.removeListener('reloadData', this.reloadData)
    MKEmitter.removeListener('resetSelectLine', this.resetParentParam)
    MKEmitter.removeListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.removeListener('refreshLineData', this.refreshLineData)
    MKEmitter.removeListener('refreshByButtonResult', this.refreshByButtonResult)
    this.timer && this.timer.stop()
src/tabviews/custom/components/timeline/normal-timeline/index.jsx
@@ -115,6 +115,7 @@
    MKEmitter.addListener('reloadData', this.reloadData)
    MKEmitter.addListener('resetSelectLine', this.resetParentParam)
    MKEmitter.addListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.addListener('refreshLineData', this.refreshLineData)
    MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult)
    if (config.timer) {
@@ -150,6 +151,7 @@
    MKEmitter.removeListener('reloadData', this.reloadData)
    MKEmitter.removeListener('resetSelectLine', this.resetParentParam)
    MKEmitter.removeListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.removeListener('refreshLineData', this.refreshLineData)
    MKEmitter.removeListener('refreshByButtonResult', this.refreshByButtonResult)
    this.timer && this.timer.stop()
@@ -208,6 +210,22 @@
    }
  }
  refreshLineData = (menuId, btn, uuid, count) => {
    const { config, data } = this.state
    if (config.uuid !== menuId) return
    let _data = fromJS(data).toJS().forEach(item => {
      if (item.$$uuid === uuid) {
        item[btn.field] = count
      }
    })
    this.setState({
      data: _data
    })
  }
  resetParentParam = (MenuID, id, data) => {
    const { config } = this.state
@@ -219,6 +237,22 @@
    }
  }
  refreshLineData = (menuId, btn, uuid, count) => {
    const { config, data } = this.state
    if (config.uuid !== menuId) return
    let _data = fromJS(data).toJS().forEach(item => {
      if (item.$$uuid === uuid) {
        item[btn.field] = count
      }
    })
    this.setState({
      data: _data
    })
  }
  reloadData = (menuId) => {
    const { config } = this.state
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -62,7 +62,7 @@
    
    if (btn.OpenType === 'form') {
      let data = selectedData && selectedData[0] ? selectedData[0] : null
      if (btn.formType === 'counter') {
      if (btn.formType === 'counter' || btn.formType === 'count_line') {
        let count = 0
        if (data && data[btn.field]) {
          count = +data[btn.field]
@@ -109,7 +109,7 @@
    if (btn.OpenType === 'form') {
      let data = nextProps.selectedData && nextProps.selectedData[0] ? nextProps.selectedData[0] : null
      if (btn.formType === 'counter') {
      if (btn.formType === 'counter' || btn.formType === 'count_line') {
        let count = 0
        if (data && data[btn.field]) {
          count = +data[btn.field]
@@ -330,6 +330,9 @@
        return
      }
    } else if (!['inner', 'outer', 'system', 'custom'].includes(btn.intertype)) {
      if (btn.OpenType === 'form' && btn.formType === 'count_line') {
        return
      }
      // 接口类型错误
      notification.warning({
        top: 92,
@@ -3010,6 +3013,37 @@
    })
  }
  changeLineCount = (count) => {
    const { btn, selectedData } = this.props
    const { disabled } = this.state
    if (disabled) return
    let data = selectedData || []
    if (data.length === 0) {
      // 需要选择行时,校验数据
      notification.warning({
        top: 92,
        message: this.state.dict['main.action.confirm.selectline'],
        duration: 5
      })
      return
    } else if (data.length !== 1) {
      // 需要选择单行时,校验数据
      notification.warning({
        top: 92,
        message: this.state.dict['main.action.confirm.selectSingleLine'],
        duration: 5
      })
      return
    }
    this.setState({count}, () => {
      MKEmitter.emit('refreshLineData', btn.$menuId, btn, data[0].$$uuid, count)
    })
  }
  render() {
    const { btn } = this.props
    const { loadingNumber, loadingTotal, loading, disabled, hidden, check, count } = this.state
@@ -3020,6 +3054,8 @@
        return <Switch loading={loading} checked={check} disabled={disabled || loading} title={disabled ? (btn.reason || '') : ''} onChange={(val,e) => {e.stopPropagation();this.actionTrigger()}} style={btn.style} className={btn.size === 'large' ? 'ant-switch-large' : ''} size={btn.size} checkedChildren={btn.openText || ''} unCheckedChildren={btn.closeText || ''}/>
      } else if (btn.formType === 'counter') {
        return <MkCounter count={count} disabled={disabled} btn={btn} onChange={this.changeCount}/>
      } else if (btn.formType === 'count_line') {
        return <MkCounter count={count} disabled={disabled} btn={btn} onChange={this.changeLineCount}/>
      } else if (btn.formType === 'radio') {
        return <Checkbox className={btn.checkType || ''} disabled={disabled || loading} title={disabled ? (btn.reason || '') : ''} checked={check} onChange={(e) => {e.stopPropagation();this.actionTrigger()}} style={btn.style}></Checkbox>
      } else {
src/tabviews/zshare/actionList/normalbutton/mkcounter/index.jsx
@@ -48,7 +48,7 @@
    this.timer = setTimeout(() => {
      this.props.onChange(val)
    }, 1000)
    }, btn.formType === 'count_line' ? 100 : 1000)
  }
  plus = () => {
@@ -71,7 +71,7 @@
    this.timer = setTimeout(() => {
      this.props.onChange(val)
    }, 1000)
    }, btn.formType === 'count_line' ? 100 : 1000)
  }
  submit = () => {
@@ -96,7 +96,7 @@
    this.timer = setTimeout(() => {
      this.props.onChange(count)
    }, 1000)
    }, btn.formType === 'count_line' ? 100 : 1000)
  }
  render() {