king
2022-12-06 91e232bb0b910f3670bdbccd65cc218d55e1eda9
src/utils/utils-custom.js
@@ -872,6 +872,25 @@
}
/**
 * @description 获取图表高度
 */
export function getHeight (val) {
  if (typeof(val) === 'string') {
    if (val.indexOf('px') > -1) {
      val = parseFloat(val)
    } else if (val.indexOf('vw') > -1) {
      val = parseFloat(val)
      val = document.body.clientWidth * val / 100
    } else if (val.indexOf('vh') > -1) {
      val = parseFloat(val)
      val = document.body.clientHeight * val / 100
    }
  }
  return parseInt(val || 400) - 30
}
/**
 * @description 获取表名
 */
export function getTables (config, pops) {
@@ -882,7 +901,7 @@
  if (config.setting && (!config.wrap || !config.wrap.datatype || config.wrap.datatype === 'dynamic')) {
    if (config.setting.interType === 'system') {
      if (config.setting.execute !== 'false') {
      if (config.setting.execute !== 'false' && config.setting.dataresource) {
        let tbs = config.setting.dataresource.match(cutreg)
        tbs && cuts.push(...tbs)
      }