king
2024-05-22 3ecc98d6ba3fe31b9694bad348cbbb08c1b0dd81
src/utils/utils.js
@@ -854,24 +854,6 @@
  }
  /**
   * @description 获取云端图片真实路径
   * @return {String}    url 图片路径
   */
  static getcloudurl (url) {
    if (!url) return ''
    let baseurl = ''
    if (window.GLOB.cloudServiceApi) {
      baseurl = window.GLOB.cloudServiceApi.replace(/webapi(.*)$/, '')
    } else {
      baseurl = window.GLOB.baseurl
    }
    return url.match(/^http/) || url.match(/^\/\//) ? url : baseurl + url
  }
  /**
   * @description 获取下拉搜索查询条件
   * @return {String} item   搜索条件信息
   */
@@ -1066,12 +1048,18 @@
          }
        } else if (typeof(val) === 'string') {
          val = val.replace(/(^\s+$)|\t+|\v+/ig, '')
          if (!val && col.required === 'true') {           // 时间必填校验
            errors.push(_position + '内容不可为空')
          } else if (val && !/^[1-9][0-9]{3}/.test(val)) { // 时间正则校验
          if (!val) {
            if (col.required === 'true') {         // 时间必填校验
              errors.push(_position + '内容不可为空')
            } else if (col.type === 'date') {
              val = '1949-10-01'
            } else if (col.type === 'datetime') {
              val = '1949-10-01 00:00:00'
            }
          } else if (!/^[1-9][0-9]{3}/.test(val)) { // 时间正则校验
            errors.push(_position + '时间格式错误')
          }
        } else {                                           // 时间格式错误
        } else {                                    // 时间格式错误
          errors.push(_position + '时间格式错误')
        }
      }
@@ -2485,6 +2473,10 @@
      }
    }
    if (_backCustomScript) {
      _sql += _backCustomScript
    }
    _sql = _sql.replace(/@works_flow_sign@/ig, `'${sign}'`)
    _sql = _sql.replace(/@check_userids@/ig, `'${checkIds.join(',')}'`)
@@ -2509,9 +2501,7 @@
    _sql = _sql.replace(/@statusname@/ig, `'${statusName}'`)
    _sql = _sql.replace(/@work_group@/ig, `'${sessionStorage.getItem('work_group') || ''}'`)
    _sql = _sql.replace(/@work_grade@/ig, `'${work_grade}'`)
  }
  if (_backCustomScript) {
  } else if (_backCustomScript) {
    _sql += _backCustomScript
  }