king
2021-05-24 f267d04e0561a0a20d1f2a9f558a273558ece90d
src/tabviews/custom/components/chart/antv-scatter/index.jsx
@@ -2,21 +2,20 @@
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Chart } from '@antv/g2'
import { connect } from 'react-redux'
import { Spin, Empty, notification } from 'antd'
import moment from 'moment'
import Api from '@/api'
import Utils from '@/utils/utils.js'
import asyncComponent from './asyncButtonComponent'
import asyncComponent from '@/utils/asyncComponent'
import asyncBtnComponent from './asyncButtonComponent'
import UtilsDM from '@/utils/utils-datamanage.js'
import { modifyTabview } from '@/store/action'
import MKEmitter from '@/utils/events.js'
import './index.scss'
const NormalHeader = asyncComponent(() => import('@/tabviews/custom/components/share/normalheader'))
const ExcelOutButton = asyncComponent(() => import('@/tabviews/zshare/actionList/exceloutbutton'))
const ExcelInButton = asyncComponent(() => import('@/tabviews/zshare/actionList/excelInbutton'))
const ExcelOutButton = asyncBtnComponent(() => import('@/tabviews/zshare/actionList/exceloutbutton'))
const ExcelInButton = asyncBtnComponent(() => import('@/tabviews/zshare/actionList/excelInbutton'))
class ScatterChart extends Component {
  static propTpyes = {
@@ -59,7 +58,7 @@
      _config.plot.height = _config.plot.height - 30
    }
    _config.style = {..._config.style, minHeight: config.plot.height}
    _config.style.height = config.plot.height
    this.setState({
      config: _config,
@@ -134,16 +133,7 @@
    if (!config.timer) return
    const _change = {
      '15s': 15000,
      '30s': 30000,
      '1min': 60000,
      '5min': 300000,
      '10min': 600000,
      '15min': 900000,
      '30min': 1800000,
      '1hour': 3600000
    }
    const _change = { '15s': 15000, '30s': 30000, '1min': 60000, '5min': 300000, '10min': 600000, '15min': 900000, '30min': 1800000, '1hour': 3600000 }
    let timer = _change[config.timer]
@@ -281,6 +271,14 @@
          searches.push(item)
        }
      })
    }
    let requireFields = searches.filter(item => item.required && (!item.value || item.value.length === 0))
    if (requireFields.length > 0) {
      this.setState({
        loading: false
      })
      return
    }
    if (!hastimer) {
@@ -426,17 +424,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    tabviews: state.tabviews,
    permMenus: state.permMenus,
  }
}
const mapDispatchToProps = (dispatch) => {
  return {
    modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews))
  }
}
export default connect(mapStateToProps, mapDispatchToProps)(ScatterChart)
export default ScatterChart