king
2024-07-03 59e44858de3d284749e8f89034cf97d3866e9bac
2024-07-03
4个文件已修改
124 ■■■■ 已修改文件
src/menu/debug/index.jsx 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pay/index.jsx 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pay/index.scss 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/debug/index.jsx
@@ -26,6 +26,7 @@
  sqlList = []
  verSqls = []
  linkMain = null
  trigger = () => {
    let config = fromJS(this.props.config).toJS()
@@ -66,6 +67,7 @@
    }
    this.sqlList = []
    this.linkMain = []
    let regs = [
      { reg: /@userName@/ig, value: `'User_Name'` },
@@ -137,8 +139,80 @@
    this.verSqls = sqls
    let that = this
    let formErrors = []
    if (this.linkMain.length) {
      let map = new Map()
      if (config.interfaces) {
        config.interfaces.forEach(m => {
          if (m.status !== 'true' || !m.columns) return false
          map.set(m.uuid, m.columns)
        })
      }
      let forEachComs = (components) => {
        components.forEach(item => {
          if (item.type === 'tabs') {
            item.subtabs.forEach(tab => {
              forEachComs(tab.components)
            })
          } else if (item.type === 'group') {
            forEachComs(item.components)
          } else if (item.columns && item.columns.length) {
            map.set(item.uuid, item.columns)
          }
        })
      }
      forEachComs(config.components)
      this.linkMain.forEach(item => {
        if (item.config.wrap && item.config.wrap.datatype === 'public') return
        let supModule = ''
        if (item.config.wrap && item.config.wrap.datatype === 'static') {
          supModule = item.config.wrap.supModule ? item.config.wrap.supModule[item.config.wrap.supModule.length - 1] : ''
        } else if (item.config.setting && item.config.setting.supModule) {
          supModule = item.config.setting.supModule[item.config.setting.supModule.length - 1] || ''
          if (supModule === 'empty') {
            supModule = ''
          }
        }
        if (!supModule) return
        let cols = map.get(supModule)
        if (!cols) {
          formErrors.push(<div key={item.forms[0].uuid}>
            组件<span style={{color: '#1890ff', margin: '0 2px 0 2px'}}>{item.config.name}{item.label ? '-' + item.label : ''}</span>中表单<span style={{color: 'orange', margin: '0 2px 0 2px'}}>{item.forms.map(c => c.label + ' (' + c.field + ')').join('、')}</span>无效
          </div>)
        } else {
          let _forms = []
          let _cols = cols.map(col => col.field.toLowerCase())
          item.forms.forEach(m => {
            if (_cols.includes(m.field.toLowerCase())) return
            _forms.push(m.label + ' (' + m.field + ')')
          })
          if (_forms.length) {
            formErrors.push(<div key={item.forms[0].uuid}>
              组件<span style={{color: '#1890ff', margin: '0 2px 0 2px'}}>{item.config.name}{item.label ? '-' + item.label : ''}</span>中表单<span style={{color: 'orange', margin: '0 2px 0 2px'}}>{_forms.join('、')}</span>无效
            </div>)
          }
        }
      })
    }
    formErrors = formErrors.length ? formErrors : ''
    Modal.confirm({
      content: `当前菜单共${this.sqlList.length}个组件,${sqls.length}项脚本需要检验${sqls.length > 20 ? ',时间大概需要' + parseInt(sqls.length / 2) + '秒' : ''}。`,
      content: <div style={{paddingLeft: '38px'}}>
        {`当前菜单共${this.sqlList.length}个组件,${sqls.length}项脚本需要检验${sqls.length > 20 ? ',时间大概需要' + parseInt(sqls.length / 2) + '秒' : ''}。`}
        {formErrors}
      </div>,
      onOk() {
        that.setState({visible: true, status: 'loading', sqlList: fromJS(sqls).toJS(), successIds: [], errorIds: [], errorMsg: {}, execId: ''}, () => {
          that.roopSql()
@@ -354,6 +428,18 @@
            if (!group.subButton.Ot) {
              group.subButton.Ot = item.wrap.datatype === 'static' ? 'notRequired' : 'requiredSgl'
            }
            if (group.fields) {
              let cells = group.fields.filter(cell => cell.type === 'linkMain')
              if (cells.length) {
                this.linkMain.push({
                  config: item,
                  forms: cells
                })
              }
            }
            let res = this.resetButton(item, group.subButton, process, group)
            if (res) {
@@ -380,6 +466,19 @@
  resetButton = (item, cell, process, group, isback) => {
    let sql = ''
    if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) {
      if (cell.modal && cell.modal.fields.length) {
        let cells = cell.modal.fields.filter(n => n.type === 'linkMain')
        if (cells.length) {
          this.linkMain.push({
            config: item,
            forms: cells,
            label: cell.label
          })
        }
      }
    }
    if (['exec', 'prompt', 'pop', 'form', 'formSubmit'].includes(cell.OpenType)) {
      if (cell.intertype === 'system' || cell.procMode === 'system') { // 系统接口
        if (item.subtype === 'dualdatacard' && isback) {
src/tabviews/zshare/actionList/index.jsx
@@ -207,7 +207,6 @@
            selectedData={selectedData}
            />
            )
          }
        } else {
          return (
            <FuncButton
@@ -219,6 +218,7 @@
            />
          )
        }
      }
      return null
    })
  }
src/views/pay/index.jsx
@@ -259,17 +259,8 @@
                {!overdone ? <div className="qrcode-box">
                  {!overdue ? <p>距离二维码过期还剩<span>{second}</span>秒,过期后请刷新页面重新获取二维码。</p> : null}
                  {overdue ? <p className="overdue">二维码已过期,<span onClick={this.resetQrcode}>刷新</span>页面重新获取二维码。</p> : null}
                  <QRCode
                    value={qrcode}
                    size={250}
                    fgColor="#000000"
                    // imageSettings={{
                    //   src: '',
                    //   height: 60,
                    //   width: 60,
                    //   excavate: true
                    // }}
                  />
                  <QRCode value={qrcode} size={250} fgColor="#000000"/>
                  {!overdue && !qrcode ? <div className="qr-mask"></div> : null}
                  {overdue ? <div className="overdue-mask"><p onClick={this.resetQrcode}>获取失败 点击重新获取二维码</p></div> : null}
                  <div className="qrcode-tip">
                    <img src={WeiXinScan} alt=""/>
src/views/pay/index.scss
@@ -101,6 +101,14 @@
            cursor: pointer;
          }
        }
        .qr-mask {
          position: absolute;
          width: 240px;
          height: 240px;
          top: 45px;
          background: rgba(255, 255, 255, 0.95);
          left: calc(50% - 120px);
        }
        .qrcode-tip {
          background: #ff7674;
          width: 250px;