king
2023-12-01 129170bfe699cfaf7f6143ffba93c33f317fd558
2023-12-01
3个文件已修改
66 ■■■■ 已修改文件
src/components/normalform/modalform/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardcellList/index.jsx 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/normalform/modalform/index.jsx
@@ -72,7 +72,7 @@
          required: item.required,
          message: item.label + '不可为空!'
        }, {
          validator: (rule, value, callback) => this.handleConfirmPassword(rule, value, callback, item)
          validator: (rule, value, callback) => this.checkNumber(rule, value, callback, item)
        }]
      } else if (item.type === 'textarea') {
        item.rules = [
@@ -164,7 +164,7 @@
    this.setState({ formlist })
  }
  handleConfirmPassword = (rule, value, callback, item) => {
  checkNumber = (rule, value, callback, item) => {
    let val = parseFloat(value)
    if (!isNaN(val)) {
src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx
@@ -67,7 +67,7 @@
      tooltip: '栅格布局,每行等分为24列。',
      min: 1,
      max: 24,
      decimal: 0,
      precision: 0,
      required: true
    },
    {
@@ -558,8 +558,8 @@
      label: '柱形宽度',
      tooltip: '空值时,宽度自适应。',
      min: 5,
      max: 100,
      decimal: 0,
      max: 200,
      precision: 0,
      initval: card.barSize,
      forbid: !['bar'].includes(card.chartType),
      required: false
@@ -570,7 +570,7 @@
      tooltip: '柱形图上端圆角。',
      min: 0,
      max: 200,
      decimal: 0,
      precision: 0,
      initval: card.barRadius || 0,
      forbid: !['bar'].includes(card.chartType),
      required: false
@@ -619,7 +619,7 @@
      tooltip: '坐标轴标注文本的旋转角度。',
      min: 0,
      max: 360,
      decimal: 0,
      precision: 0,
      initval: card.rotate,
      forbid: appType !== 'mob',
      required: false
src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -199,9 +199,10 @@
    // }
    
    if (/^http.+(.txt|.doc|.docx|.pdf|.xlsx|.xls|.zip|.rar|.ppt)$/i.test(url)) {
      let name = url.replace(/.+\//g, '').replace(/\.{1}[^.]*$/g, '')
      let d = document.createElement('a')
      d.href = url
      d.setAttribute('download', 'download')
      d.setAttribute('download', name)
      d.setAttribute('target', '_blank')
      document.body.appendChild(d)
      d.click()
@@ -394,6 +395,31 @@
  
        if (val !== '') {
          let orival = val
          if (card.linkType === 'download') {
            let url = ''
            if (card.link === 'static') {
              url = card.linkurl
            } else {
              url = data[card.linkurl]
            }
            if (/^http.+(.txt|.doc|.docx|.pdf|.xlsx|.xls|.zip|.rar)$/i.test(url)) {
              if (/pdf$/i.test(url)) {
                val = <><img src="./media/pdf.png" className="file-image" alt=""/> {val}</>
              } else if (/(.doc|.docx)$/i.test(url)) {
                val = <><img src="./media/word.png" className="file-image" alt=""/> {val}</>
              } else if (/(.xlsx|.xls)$/i.test(url)) {
                val = <><img src="./media/excel.png" className="file-image" alt=""/> {val}</>
              } else if (/(.zip|.rar)$/i.test(url)) {
                val = <><img src="./media/rar.png" className="file-image" alt=""/> {val}</>
              } else {
                val = <><img src="./media/txt.png" className="file-image" alt=""/> {val}</>
              }
            }
          }
          if (card.format === 'encryption') {
            val = <Encrypts value={val} />
          }
@@ -444,30 +470,6 @@
            }
          }
          className = mark.signType
        }
        if (card.linkType === 'download') {
          let url = ''
          if (card.link === 'static') {
            url = card.linkurl
          } else {
            url = data[card.linkurl]
          }
          if (/^http.+(.txt|.doc|.docx|.pdf|.xlsx|.xls|.zip|.rar)$/i.test(url)) {
            if (/pdf$/i.test(url)) {
              val = <><img src="/media/pdf.png" className="file-image" alt=""/> {val}</>
            } else if (/(.doc|.docx)$/i.test(url)) {
              val = <><img src="/media/word.png" className="file-image" alt=""/> {val}</>
            } else if (/(.xlsx|.xls)$/i.test(url)) {
              val = <><img src="/media/excel.png" className="file-image" alt=""/> {val}</>
            } else if (/(.zip|.rar)$/i.test(url)) {
              val = <><img src="/media/rar.png" className="file-image" alt=""/> {val}</>
            } else {
              val = <><img src="/media/txt.png" className="file-image" alt=""/> {val}</>
            }
          }
        }
  
        if (card.link || (card.anchors && card.anchors.length > 0)) {