king
2021-10-20 d6270296f0f5c816fdc36557043e9d7c8d15d2f7
2021-10-20
8个文件已修改
74 ■■■■ 已修改文件
src/mob/components/topbar/normal-navbar/index.scss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-bar-line/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-dashboard/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-pie/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-scatter/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/custom-chart/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/automatic/index.jsx 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/unattended/settingform/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/topbar/normal-navbar/index.scss
@@ -67,6 +67,7 @@
      min-width: 10px;
      font-size: 20px;
      line-height: 50px;
      margin-right: 10px;
      .anticon-search {
        margin-right: 5px;
        padding: 5px;
src/tabviews/custom/components/chart/antv-bar-line/index.jsx
@@ -529,10 +529,17 @@
    let result = await Api.genericInterface(param)
    if (result.status) {
      let reset = true
      if (hastimer && is(fromJS(result.data), fromJS(this.state.data))) {
        reset = false
      }
      this.setState({
        data: result.data,
        loading: false
      }, () => {
        if (!reset) return
        this.handleData()
      })
    } else {
src/tabviews/custom/components/chart/antv-dashboard/index.jsx
@@ -289,11 +289,17 @@
          data.value = result.data[0][config.plot.valueField]
        }
      }
      let reset = true
      if (hastimer && is(fromJS(data), fromJS(this.state.data))) {
        reset = false
      }
      this.setState({
        data,
        loading: false
      }, () => {
        if (!reset) return
        this.handleData()
      })
    } else {
src/tabviews/custom/components/chart/antv-pie/index.jsx
@@ -248,10 +248,17 @@
    let result = await Api.genericInterface(param)
    if (result.status) {
      let reset = true
      if (hastimer && is(fromJS(result.data), fromJS(this.state.data))) {
        reset = false
      }
      this.setState({
        data: result.data,
        loading: false
      }, () => {
        if (!reset) return
        this.handleData()
      })
    } else {
src/tabviews/custom/components/chart/antv-scatter/index.jsx
@@ -282,11 +282,18 @@
    let result = await Api.genericInterface(param)
    if (result.status) {
      let reset = true
      if (hastimer && is(fromJS(result.data), fromJS(this.state.data))) {
        reset = false
      }
      this.setState({
        data: result.data,
        empty: false,
        loading: false
      }, () => {
        if (!reset) return
        this.handleData()
      })
    } else {
src/tabviews/custom/components/chart/custom-chart/index.jsx
@@ -279,11 +279,18 @@
    let result = await Api.genericInterface(param)
    if (result.status) {
      let reset = true
      if (hastimer && is(fromJS(result.data), fromJS(this.state.data))) {
        reset = false
      }
      this.setState({
        data: result.data,
        loading: false,
        empty: result.data.length === 0
      }, () => {
        if (!reset) return
        this.handleData()
      })
    } else {
src/tabviews/zshare/automatic/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Button } from 'antd'
import { Button, message } from 'antd'
import MKEmitter from '@/utils/events.js'
import './index.scss'
@@ -21,7 +21,9 @@
  timer = null
  componentDidMount () {
    MKEmitter.addListener('modifyTabs', this.breakOff)
    MKEmitter.addListener('autoGetData', this.autoGetData)
    MKEmitter.addListener('resetActiveMenu', this.breakOff)
    MKEmitter.addListener('autoExecOver', this.autoExecOver)
    MKEmitter.addListener('autoMaticOver', this.autoMaticOver)
    MKEmitter.addListener('autoMaticError', this.autoMaticError)
@@ -40,11 +42,20 @@
      return
    }
    clearTimeout(this.timer)
    MKEmitter.removeListener('modifyTabs', this.breakOff)
    MKEmitter.removeListener('autoGetData', this.autoGetData)
    MKEmitter.removeListener('resetActiveMenu', this.breakOff)
    MKEmitter.removeListener('autoExecOver', this.autoExecOver)
    MKEmitter.removeListener('autoMaticOver', this.autoMaticOver)
    MKEmitter.removeListener('autoMaticError', this.autoMaticError)
    MKEmitter.removeListener('autoTransSelectData', this.autoTransSelectData)
  }
  breakOff = () => {
    if (this.state.running) {
      this.setState({running: false})
      clearTimeout(this.timer)
    }
  }
  autoExecOver = (btnId, type) => {
@@ -52,17 +63,19 @@
    if (!this.state.running || btnId !== autoMatic.action) return
    if (type === 'error') {
    if (this.state.line >= 1000) {
      this.breakOff()
    } else if (type === 'error') {
      if (autoMatic.onFail === 'next') {
        this.setState({line: this.state.line + 1}, () => {
          setTimeout(() => {
            MKEmitter.emit('autoQueryData', config.MenuID, this.state.line)
          }, 1000)
          }, 2000)
        })
      } else if (autoMatic.onFail === 'stay') {
        setTimeout(() => {
          MKEmitter.emit('autoQueryData', config.MenuID, this.state.line)
        }, 1000)
        }, 2000)
      } else {
        this.setState({running: false})
      }
@@ -71,12 +84,12 @@
        this.setState({line: this.state.line + 1}, () => {
          setTimeout(() => {
            MKEmitter.emit('autoQueryData', config.MenuID, this.state.line)
          }, 1000)
          }, 2000)
        })
      } else if (autoMatic.onSuccess === 'stay') {
        setTimeout(() => {
          MKEmitter.emit('autoQueryData', config.MenuID, this.state.line)
        }, 1000)
        }, 2000)
      } else {
        this.setState({running: false})
      }
@@ -130,6 +143,16 @@
    this.setState({running: running, line: 1})
    clearTimeout(this.timer)
    message.info('按Esc键终止运行。')
    document.onkeydown = (event) => {
      let e = event || window.event
      if (e.key === 'Escape') {
        this.breakOff()
      }
    }
  }
  autoMaticOver = (MenuID) => {
src/templates/zshare/unattended/settingform/index.jsx
@@ -92,8 +92,8 @@
                initialValue: autoMatic.onSuccess || 'stay',
              })(
                <Radio.Group>
                  <Radio value="stay">当前行</Radio>
                  <Radio value="next">下一行</Radio>
                  <Radio value="stay">当前行</Radio>
                </Radio.Group>
              )}
            </Form.Item>
@@ -109,9 +109,9 @@
                initialValue: autoMatic.onFail || 'stop',
              })(
                <Radio.Group>
                  <Radio value="stop">停止</Radio>
                  <Radio value="next">下一行</Radio>
                  <Radio value="stay">当前行</Radio>
                  <Radio value="stop">停止</Radio>
                </Radio.Group>
              )}
            </Form.Item>