king
2023-11-13 a5f41b5d98f23d618dc7519c605ce943b114dfd5
2023-11-13
11个文件已修改
162 ■■■■■ 已修改文件
src/menu/components/form/formaction/actionform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/formaction/formconfig.jsx 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/formaction/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/share/normalTable/index.scss 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/base-table/index.jsx 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/base-table/index.scss 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/normal-table/index.jsx 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/normal-table/index.scss 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/mkInput/index.jsx 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/mkNumberInput/index.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/formaction/actionform/index.jsx
@@ -57,7 +57,7 @@
    } else if (this.record.type === 'close' || this.record.type === 'reset') {
      shows = ['typeName', 'label']
    } else {
      shows = ['typeName', 'label', 'intertype', 'Ot', 'execSuccess', 'syncComponent', 'anchors', 'linkmenu', 'output', 'reload', 'preButton'] // 选项列表
      shows = ['typeName', 'label', 'intertype', 'Ot', 'execSuccess', 'syncComponent', 'anchors', 'linkmenu', 'output', 'reload', 'preButton', 'resetForm'] // 选项列表
      
      if (this.record.intertype === 'custom') {
        shows.pop()
src/menu/components/form/formaction/formconfig.jsx
@@ -4,7 +4,7 @@
 * @param {*} type           按钮类型,用于区分可选的打开方式
 */
export function getActionForm (card, functip, tableName, usefulFields, modules, anchors, uuid) {
export function getActionForm (card, functip, tableName, usefulFields, modules, anchors, uuid, fields) {
  const appType = sessionStorage.getItem('appType')
  let viewType = sessionStorage.getItem('editMenuType') // 弹窗 popview
  let _type = '提交'
@@ -121,6 +121,21 @@
      value: 'popclose',  // 执行弹窗关闭时的刷新
      text: '刷新源组件'
    })
  }
  let resets = []
  fields.forEach(item => {
    if (item.hidden === 'true') return
    if (item.type !== 'text' && item.type !== 'number') return
    resets.push({
      value: item.uuid,
      text: item.label
    })
  })
  if (card.resetForm && resets.findIndex(item => item.value === card.resetForm) === -1) {
    card.resetForm = ''
  }
  return [
@@ -476,6 +491,16 @@
      options: linkButtons
    },
    {
      type: 'select',
      key: 'resetForm',
      label: '重置表单',
      tooltip: '按钮执行成功后需要重置的表单,表单会恢复默认值并聚焦。',
      initVal: card.resetForm || '',
      required: false,
      allowClear: true,
      options: resets
    },
    {
      type: 'radio',
      key: 'reload',
      label: '上一页',
src/menu/components/form/formaction/index.jsx
@@ -110,7 +110,7 @@
    this.setState({
      visible: true,
      card: card,
      formlist: getActionForm(card, functip, config.setting.tableName, usefulFields, modules, anchors, group.uuid)
      formlist: getActionForm(card, functip, config.setting.tableName, usefulFields, modules, anchors, group.uuid, group.fields)
    })
  }
src/tabviews/custom/components/share/normalTable/index.scss
@@ -1,11 +1,19 @@
.normal-custom-table {
  position: relative;
  padding: 0px;
  min-height: 40px;
  --mk-table-border-color: #e8e8e8;
  --mk-table-color: rgba(0, 0, 0, 0.65);
  --mk-table-font-size: 14px;
  --mk-table-font-weight: normal;
  .main-pickup {
    position: absolute;
    right: 5px;
    top: -22px;
    z-index: 2;
  }
  .normal-table-footer {
    padding: 10px 0px;
    color: rgba(0, 0, 0, 0.65);
src/tabviews/custom/components/table/base-table/index.jsx
@@ -653,22 +653,20 @@
          columns={config.columns}
          selectedData={selectedData}
        /> : <div style={{height: '25px'}}></div>}
        <div className="main-table-box">
          <MainTable
            data={data}
            setting={setting}
            columns={columns}
            MenuID={config.uuid}
            fields={config.columns}
            total={this.state.total}
            autoMatic={config.autoMatic}
            lineMarks={config.lineMarks}
            loading={this.state.loading}
            refreshdata={this.refreshbytable}
            statFValue={this.state.statFValue}
            chgSelectData={(selects) => this.setState({selectedData: selects})}
          />
        </div>
        <MainTable
          data={data}
          setting={setting}
          columns={columns}
          MenuID={config.uuid}
          fields={config.columns}
          total={this.state.total}
          autoMatic={config.autoMatic}
          lineMarks={config.lineMarks}
          loading={this.state.loading}
          refreshdata={this.refreshbytable}
          statFValue={this.state.statFValue}
          chgSelectData={(selects) => this.setState({selectedData: selects})}
        />
      </div>
    )
  }
src/tabviews/custom/components/table/base-table/index.scss
@@ -12,17 +12,4 @@
  .button-list.toolbar-button {
    padding-right: 60px;
  }
  .main-table-box {
    position: relative;
    min-height: 40px;
    .main-pickup {
      position: absolute;
      right: 5px;
      top: -22px;
      z-index: 2;
    }
    >.async-spin {
      line-height: 150px!important;
    }
  }
}
src/tabviews/custom/components/table/normal-table/index.jsx
@@ -835,7 +835,7 @@
    }
    let content = <>
      {config.search && config.search.length ?
      {config.search.length ?
        <MainSearch BID={BID} config={config} refreshdata={this.refreshbysearch}/> : null
      }
      {actions.length > 0 ? <MainAction
@@ -845,24 +845,22 @@
        BData={BData}
        columns={config.columns}
        selectedData={selectedData}
      /> : <div className="mk-action-space" style={{height: '25px'}}></div>}
      <div className={'main-table-box ' + (!actions || actions.length === 0 ? 'no-action' : '')}>
        <MainTable
          setting={setting}
          columns={columns}
          MenuID={config.uuid}
          allSearch={allSearch}
          data={this.state.data}
          fields={config.columns}
          total={this.state.total}
          colsCtrls={config.colsCtrls}
          lineMarks={config.lineMarks}
          loading={this.state.loading}
          refreshdata={this.refreshbytable}
          statFValue={this.state.statFValue}
          chgSelectData={(selects) => this.setState({selectedData: selects})}
        />
      </div>
      /> : (setting.tableType || config.search.length > 0 ? <div className="mk-action-space" style={{height: '25px'}}></div> : null)}
      <MainTable
        setting={setting}
        columns={columns}
        MenuID={config.uuid}
        allSearch={allSearch}
        data={this.state.data}
        fields={config.columns}
        total={this.state.total}
        colsCtrls={config.colsCtrls}
        lineMarks={config.lineMarks}
        loading={this.state.loading}
        refreshdata={this.refreshbytable}
        statFValue={this.state.statFValue}
        chgSelectData={(selects) => this.setState({selectedData: selects})}
      />
    </>
    return (
src/tabviews/custom/components/table/normal-table/index.scss
@@ -12,19 +12,6 @@
  .button-list.toolbar-button {
    padding-right: 60px;
  }
  .main-table-box {
    position: relative;
    min-height: 40px;
    .main-pickup {
      position: absolute;
      right: 5px;
      top: -22px;
      z-index: 2;
    }
    >.async-spin {
      line-height: 150px!important;
    }
  }
  .ant-collapse {
    background-color: transparent;
    border-radius: 0px;
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -2176,6 +2176,10 @@
    const { btn } = this.props
    const { autoMatic } = this.state
    if (btn.resetForm) {
      MKEmitter.emit('mkFC', 'reset', btn.resetForm)
    }
    if (this.preCallback) {
      this.setState({
        loading: false,
src/tabviews/zshare/mutilform/mkInput/index.jsx
@@ -78,6 +78,22 @@
      } else {
        this.props.onChange(_val, true)
      }
    } else if (type === 'reset') {
      let _val = this.props.config.initval
      if (this.state.encryption === 'true' && _val) {
        try {
          _val = window.decodeURIComponent(window.atob(_val))
        } catch (e) {
          _val = this.props.config.initval
        }
      }
      this.setState({value: _val}, () => {
        this.inputRef.current.select()
      })
      this.props.onChange(this.props.config.initval)
    }
  }
src/tabviews/zshare/mutilform/mkNumberInput/index.jsx
@@ -40,10 +40,19 @@
    if (type === 'focus') {
      let node = document.getElementById(uuid)
      node.select()
      node && node.select()
    } else if (type === 'input') {
      this.setState({value})
      this.props.onChange(value, true)
    } else if (type === 'reset') {
      let _val = this.props.config.initval
      this.setState({value: _val}, () => {
        let node = document.getElementById(this.props.config.uuid)
        node && node.select()
      })
      this.props.onChange(_val)
    }
  }