king
2025-03-01 cd138edfe4d479e7689f4a7e466a81471b540d2e
2025-03-01
4个文件已修改
117 ■■■■■ 已修改文件
public/manifest.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/edit-table/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/index.jsx 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/modalform/index.jsx 89 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/manifest.json
@@ -6,5 +6,5 @@
  "display": "standalone",
  "theme_color": "#000000",
  "background_color": "#ffffff",
  "mk_version": "20250205"
  "mk_version": "20250301"
}
src/tabviews/custom/components/table/edit-table/index.jsx
@@ -437,6 +437,7 @@
        total: 0
      })
      reset && MKEmitter.emit('resetTable', config.uuid, 'true') // 列表重置
      MKEmitter.emit('transferData' + setting.tableId, [])
      this.requestId = ''
      return
src/tabviews/zshare/mutilform/index.jsx
@@ -182,12 +182,21 @@
      if (['select', 'link', 'radio', 'checkbox', 'checkcard', 'multiselect', 'cascader'].includes(item.type)) {
        item.options = item.options || []
        item.options = item.options.filter(cell => {
          cell.value = cell.Value
          cell.label = cell.Text
          return !cell.Hide
        })
        item.$select = true
        if (item.type === 'checkcard') {
          item.options = item.options.filter(cell => {
            cell.$value = cell.$value + ''
            return !cell.Hide
          })
        } else {
          item.options = item.options.filter(cell => {
            cell.value = cell.Value + ''
            cell.label = cell.Text
            return !cell.Hide
          })
        }
        if (item.setAll === 'true' && ['select', 'link', 'radio'].includes(item.type)) { // 添加空值
          item.options.unshift({
            key: Utils.getuuid(),
@@ -298,6 +307,8 @@
            newval = ''
          }
        }
      } else if (item.$select && item.resourceType === '0') {
        newval = newval + ''
      }
      if (newval !== '$empty') {
@@ -310,7 +321,7 @@
        if (isNaN(item.initval) || item.initval === '') {
          item.initval = 0
        }
      } else if (['select', 'link', 'radio', 'checkbox', 'checkcard', 'multiselect', 'cascader'].includes(item.type) && item.resourceType === '1') {
      } else if (item.$select && item.resourceType === '1') {
        deForms.push(item)
      } else if (item.type === 'rate') {
        item.rateCount = item.rateCount || 5
src/templates/zshare/modalform/index.jsx
@@ -896,51 +896,51 @@
    return fields
  }
  transfer = (options) => {
    if (options.length === 0) return options
  // transfer = (options) => {
  //   if (options.length === 0) return options
    let isNumber = true
    options.forEach(item => {
      if (!item.Value || isNaN(item.Value)) {
        isNumber = false
      }
    })
  //   let isNumber = true
  //   options.forEach(item => {
  //     if (!item.Value || isNaN(item.Value)) {
  //       isNumber = false
  //     }
  //   })
    if (isNumber) {
      return options.map(item => {
        item.Value = +item.Value
        return item
      })
    } else {
      return options.map(item => {
        item.Value = item.Value + ''
        return item
      })
    }
  }
  //   if (isNumber) {
  //     return options.map(item => {
  //       item.Value = +item.Value
  //       return item
  //     })
  //   } else {
  //     return options.map(item => {
  //       item.Value = item.Value + ''
  //       return item
  //     })
  //   }
  // }
  transferCard = (options) => {
    if (options.length === 0) return options
  // transferCard = (options) => {
  //   if (options.length === 0) return options
    let isNumber = true
    options.forEach(item => {
      if (!/^([0-9]|[1-9]\d{0,2})$/.test(item.$value)) {
        isNumber = false
      }
    })
  //   let isNumber = true
  //   options.forEach(item => {
  //     if (!/^([0-9]|[1-9]\d{0,2})$/.test(item.$value)) {
  //       isNumber = false
  //     }
  //   })
    if (isNumber) {
      return options.map(item => {
        item.$value = +item.$value
        return item
      })
    } else {
      return options.map(item => {
        item.$value = item.$value + ''
        return item
      })
    }
  }
  //   if (isNumber) {
  //     return options.map(item => {
  //       item.$value = +item.$value
  //       return item
  //     })
  //   } else {
  //     return options.map(item => {
  //       item.$value = item.$value + ''
  //       return item
  //     })
  //   }
  // }
  handleConfirm = () => {
    const { card, fields } = this.props
@@ -976,13 +976,17 @@
          if (['multiselect', 'select', 'link', 'radio', 'checkbox'].includes(values.type)) {
            if (values.resourceType === '0') {
              values.options = values.options || []
              values.options = values.options.map(item => {
                item.Value = item.Value + ''
                return item
              })
              values.dataSource = ''
              let type = values.type
              if (values.type === 'radio' && values.linkField) {
                type = 'link'
              }
              values.options = this.transfer(values.options)
              // values.options = this.transfer(values.options)
              if (values.options.filter(op => op.Text === '').length > 0) {
                notification.warning({
@@ -1030,6 +1034,7 @@
              let linkSubFields = values.linkSubField || []
              values.options = values.options.map(m => {
                m.ParentID = m.ParentID || ''
                m.$value = m.$value + ''
                linkSubFields.forEach(n => {
                  m[n] = m[n] || ''
@@ -1037,7 +1042,7 @@
                return m
              })
              values.options = this.transferCard(values.options)
              // values.options = this.transferCard(values.options)
              let type = values.type
              if (values.linkField) {