king
2024-03-29 deb2536eaaa559d6c8ec94f81afb94b6c7806b4d
2024-03-29
43个文件已修改
1148 ■■■■■ 已修改文件
src/api/index.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/breadview/index.jsx 110 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/breadview/index.scss 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tabview/index.jsx 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tabview/index.scss 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/calendar/index.jsx 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/balcony/index.jsx 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/data-card/index.jsx 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/double-data-card/index.jsx 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/prop-card/index.jsx 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/table-card/index.jsx 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/carousel/data-card/index.jsx 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/carousel/prop-card/index.jsx 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-G6/index.jsx 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-bar-line/index.jsx 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-dashboard/index.jsx 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-pie/index.jsx 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-scatter/index.jsx 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/custom-chart/index.jsx 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/code/sand-box/index.jsx 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/editor/braft-editor/index.jsx 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/simple-form/index.jsx 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/step-form/index.jsx 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/tab-form/index.jsx 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/iframe/index.jsx 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/interfaces/interItem/index.jsx 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/account/index.scss 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/voucher/index.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/share/normalTable/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/base-table/index.jsx 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/edit-table/index.jsx 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/edit-table/normalTable/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/normal-table/index.jsx 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/timeline/normal-timeline/index.jsx 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/tree/antd-tree/index.jsx 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/debugtable/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtabtable/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/treepage/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-datamanage.js 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/billprint/index.jsx 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mkiframe/index.jsx 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js
@@ -401,7 +401,7 @@
        this.getSystemConfig(param).then(res => {
          if (!res.status) {
            reject()
            reject(res.message)
            return
          }
@@ -441,7 +441,7 @@
          CacheUtils.updateIndexDBversion({version: res.app_version || '1.00', createDate: curTime})
          resolve()
          resolve(list)
        })
      }, () => {
        reject()
src/components/breadview/index.jsx
@@ -1,6 +1,6 @@
import React, {Component} from 'react'
import { BackTop, Breadcrumb, notification} from 'antd'
import { HomeOutlined, RightOutlined, RedoOutlined } from '@ant-design/icons'
import { BackTop, Breadcrumb, notification, Modal } from 'antd'
import { HomeOutlined, RightOutlined, RedoOutlined, LoadingOutlined } from '@ant-design/icons'
import moment from 'moment'
import 'moment/locale/zh-cn'
@@ -22,8 +22,38 @@
class BreadView extends Component {
  state = {
    tabview: null, // 标签
    hasNavBar: window.GLOB.navBar === 'linkage_navigation'
    tabview: null,
    hasNavBar: window.GLOB.navBar === 'linkage_navigation',
    visible: false
  }
  reloading = false
  UNSAFE_componentWillMount () {
    let home = {
      MenuID: 'home_page_id',
      MenuName: '首页',
      type: 'Home'
    }
    this.setState({tabview: home})
  }
  componentDidMount () {
    MKEmitter.addListener('modifyTabs', this.modifyTabs)
    if (window.GLOB.forcedUpdate) {
      MKEmitter.addListener('reloadTabs', this.reloadTabs)
    }
  }
  /**
   * @description 组件销毁,清除state更新
   */
  componentWillUnmount () {
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('reloadTabs', this.reloadTabs)
    MKEmitter.removeListener('modifyTabs', this.modifyTabs)
  }
  refreshTabview = () => {
@@ -105,15 +135,6 @@
    }
  }
  UNSAFE_componentWillMount () {
    let home = {
      MenuID: 'home_page_id',
      MenuName: '首页',
      type: 'Home'
    }
    this.setState({tabview: home})
  }
  gotoHome = () => {
    let home = {
      MenuID: 'home_page_id',
@@ -134,22 +155,48 @@
    }
  }
  componentDidMount () {
    MKEmitter.addListener('modifyTabs', this.modifyTabs)
  }
  reloadTabs = () => {
    if (this.reloading) return
  /**
   * @description 组件销毁,清除state更新
   */
  componentWillUnmount () {
    this.setState = () => {
      return
    this.reloading = true
    let time = new Date().getTime()
    this.setState({visible: true})
    Api.getAppVersion(true).then((list) => {
      let _time = new Date().getTime()
      let delay = _time - time
      delay = delay < 3000 ? 3000 - delay : 0
      setTimeout(() => {
        this.setState({visible: false})
        this.reloading = false
        Modal.success({
          title: '更新成功。',
        })
        if (list && list.length && list.includes(this.state.tabview.MenuID)) {
          MKEmitter.emit('reloadMenuView', this.state.tabview.MenuID)
    }
    MKEmitter.removeListener('modifyTabs', this.modifyTabs)
      }, delay)
    }, (message) => {
      let _time = new Date().getTime()
      let delay = _time - time
      delay = delay < 3000 ? 3000 - delay : 0
      setTimeout(() => {
        this.setState({visible: false})
        this.reloading = false
        Modal.error({
          title: message || '系统配置更新失败!',
        })
      }, delay)
    })
  }
  render () {
    const { tabview, hasNavBar } = this.state
    const { tabview, hasNavBar, visible } = this.state
    return (
      <section id="mk-tabgroup-wrap" className="mk-breadview-wrap">
@@ -175,6 +222,21 @@
            </div>
          </div>
        </BackTop>
        <Modal
          visible={visible}
          width={400}
          closable={false}
          centered={true}
          footer={null}
          destroyOnClose
        >
          <div className="mk-menus-update">
            <div className="tip">
              系统更新中,请稍后
            </div>
            <LoadingOutlined />
          </div>
        </Modal>
      </section>
    )
  }
src/components/breadview/index.scss
@@ -47,3 +47,15 @@
  top: 50px;
  z-index: 1080;
}
.mk-menus-update {
  text-align: center;
  font-size: 20px;
  color: #131313;
  .tip {
    margin-bottom: 10px;
  }
  .anticon {
    color: var(--mk-sys-color);
  }
}
src/components/tabview/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import { fromJS } from 'immutable'
import {Tabs, BackTop, notification} from 'antd'
import { RedoOutlined, CloseOutlined } from '@ant-design/icons'
import { Tabs, BackTop, notification, Modal } from 'antd'
import { RedoOutlined, CloseOutlined, LoadingOutlined } from '@ant-design/icons'
import moment from 'moment'
import 'moment/locale/zh-cn'
@@ -25,8 +25,10 @@
  state = {
    activeId: '',
    tabviews: [],
    iFrameHeight: 0,
    visible: false
  }
  reloading = false
  UNSAFE_componentWillMount () {
    if (!window.GLOB.mkHS) {
@@ -44,6 +46,10 @@
  componentDidMount () {
    MKEmitter.addListener('modifyTabs', this.modifyTabs)
    MKEmitter.addListener('closeTabView', this.closeTabView)
    if (window.GLOB.forcedUpdate) {
      MKEmitter.addListener('reloadTabs', this.reloadTabs)
    }
  }
  /**
@@ -54,6 +60,7 @@
      return
    }
    MKEmitter.removeListener('modifyTabs', this.modifyTabs)
    MKEmitter.removeListener('reloadTabs', this.reloadTabs)
    MKEmitter.removeListener('closeTabView', this.closeTabView)
  }
@@ -143,6 +150,53 @@
    } else {
      MKEmitter.emit('reloadMenuView', menu.MenuID)
    }
  }
  reloadTabs = () => {
    if (this.reloading) return
    this.reloading = true
    let time = new Date().getTime()
    this.setState({visible: true})
    Api.getAppVersion(true).then((list) => {
      let _time = new Date().getTime()
      let delay = _time - time
      delay = delay < 3000 ? 3000 - delay : 0
      setTimeout(() => {
        this.setState({visible: false})
        this.reloading = false
        Modal.success({
          title: '更新成功。',
        })
        if (list && list.length) {
          let _tabIds = this.state.tabviews.map(item => item.MenuID)
          list.forEach((m, i) => {
            if (_tabIds.includes(m)) {
              setTimeout(() => {
                MKEmitter.emit('reloadMenuView', m)
              }, i * 20)
            }
          })
        }
      }, delay)
    }, (message) => {
      let _time = new Date().getTime()
      let delay = _time - time
      delay = delay < 3000 ? 3000 - delay : 0
      setTimeout(() => {
        this.setState({visible: false})
        this.reloading = false
        Modal.error({
          title: message || '系统配置更新失败!',
        })
      }, delay)
    })
  }
  modifyTabs = (tab, fixed) => {
@@ -236,7 +290,7 @@
  }
  render () {
    const { tabviews, activeId } = this.state
    const { tabviews, activeId, visible } = this.state
    return (
      <section id="mk-tabgroup-wrap" className="mk-tabview-wrap">
@@ -273,6 +327,21 @@
            </Tabs>
          }
        </div>
        <Modal
          visible={visible}
          width={400}
          closable={false}
          centered={true}
          footer={null}
          destroyOnClose
        >
          <div className="mk-menus-update">
            <div className="tip">
              系统更新中,请稍后
            </div>
            <LoadingOutlined />
          </div>
        </Modal>
      </section>
    )
  }
src/components/tabview/index.scss
@@ -111,3 +111,15 @@
  top: 50px;
  z-index: 1080;
}
.mk-menus-update {
  text-align: center;
  font-size: 20px;
  color: #131313;
  .tip {
    margin-bottom: 10px;
  }
  .anticon {
    color: var(--mk-sys-color);
  }
}
src/tabviews/commontable/index.jsx
@@ -603,6 +603,8 @@
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, search, _orderBy, pageIndex, pageSize, BID)
    delete param.s_version_up
    let result = await Api.genericInterface(param)
    this.getStatFieldsValue()
@@ -694,6 +696,8 @@
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, search, _orderBy, pageIndex, pageSize, BID, id)
    delete param.s_version_up
    let result = await Api.genericInterface(param)
    if (result.status) {
      let data = fromJS(this.state.data).toJS()
src/tabviews/custom/components/calendar/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Spin, notification, Modal } from 'antd'
import { Spin } from 'antd'
import Api from '@/api'
import asyncComponent from '@/utils/asyncComponent'
@@ -264,36 +264,13 @@
        loading: false
      })
      
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false
      })
      
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/card/balcony/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Spin, notification, Checkbox, Modal } from 'antd'
import { Spin, Checkbox } from 'antd'
import Api from '@/api'
import UtilsDM from '@/utils/utils-datamanage.js'
@@ -413,37 +413,14 @@
        }
      }
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false
      })
      this.timer && this.timer.stop()
      
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/card/data-card/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Spin, Empty, notification, message, Row, Col, Pagination, Modal, Switch } from 'antd'
import { Spin, Empty, message, Row, Col, Pagination, Switch } from 'antd'
import { DownOutlined } from '@ant-design/icons'
import Api from '@/api'
@@ -871,37 +871,15 @@
          this.timer && this.timer.stop()
        }
      }
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false
      })
      this.timer && this.timer.stop()
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
@@ -1043,11 +1021,8 @@
      this.setState({
        loading: false
      })
      notification.error({
        top: 92,
        message: result.message,
        duration: 10
      })
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/card/double-data-card/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Spin, Empty, notification, Row, Col, Pagination, Modal, Switch } from 'antd'
import { Spin, Empty, Row, Col, Pagination, Switch } from 'antd'
import { DownOutlined, UpOutlined, PlusSquareOutlined, MinusSquareOutlined } from '@ant-design/icons'
import Api from '@/api'
@@ -771,37 +771,15 @@
          this.timer && this.timer.stop()
        }
      }
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false
      })
      this.timer && this.timer.stop()
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
@@ -959,11 +937,8 @@
      this.setState({
        loading: false
      })
      notification.error({
        top: 92,
        message: result.message,
        duration: 10
      })
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/card/prop-card/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Spin, notification, Col, Row, Modal } from 'antd'
import { Spin, Col, Row } from 'antd'
import Api from '@/api'
import UtilsDM from '@/utils/utils-datamanage.js'
@@ -573,37 +573,15 @@
          this.timer && this.timer.stop()
        }
      }
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false
      })
      this.timer && this.timer.stop()
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/card/table-card/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Spin, notification, Row, Col, Empty, Pagination, Modal } from 'antd'
import { Spin, Row, Col, Empty, Pagination } from 'antd'
import { DownOutlined } from '@ant-design/icons'
import Api from '@/api'
@@ -429,37 +429,15 @@
          this.timer && this.timer.stop()
        }
      }
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false
      })
      this.timer && this.timer.stop()
      
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/carousel/data-card/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Spin, Empty, notification, Carousel, Modal, Checkbox, Button } from 'antd'
import { Spin, Empty, Carousel, Modal, Checkbox, Button } from 'antd'
import { LeftOutlined, RightOutlined } from '@ant-design/icons'
import Api from '@/api'
@@ -379,37 +379,15 @@
          this.timer && this.timer.stop()
        }
      }
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false
      })
      this.timer && this.timer.stop()
      
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/carousel/prop-card/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Spin, notification, Carousel, Modal, Checkbox, Button } from 'antd'
import { Spin, Carousel, Modal, Checkbox, Button } from 'antd'
import { LeftOutlined, RightOutlined } from '@ant-design/icons'
import asyncComponent from '@/utils/asyncComponent'
@@ -382,37 +382,15 @@
          this.timer && this.timer.stop()
        }
      }
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false
      })
      this.timer && this.timer.stop()
      
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/chart/antv-G6/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Modal, notification, Spin, Empty } from 'antd'
import { Spin, Empty } from 'antd'
import G6 from '@antv/g6'
import Api from '@/api'
@@ -1167,36 +1167,14 @@
        this.data = result.data || []
        this.handleData()
      }
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false
      })
      
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/chart/antv-bar-line/index.jsx
@@ -3,7 +3,7 @@
import { is, fromJS } from 'immutable'
import { Chart } from '@antv/g2'
import DataSet from '@antv/data-set'
import { Spin, Empty, notification, Modal } from 'antd'
import { Spin, Empty } from 'antd'
import { DownloadOutlined } from '@ant-design/icons'
import moment from 'moment'
@@ -662,37 +662,15 @@
          this.timer && this.timer.stop()
        }
      }
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false
      })
      this.timer && this.timer.stop()
      
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/chart/antv-dashboard/index.jsx
@@ -2,7 +2,7 @@
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Chart, registerShape } from '@antv/g2'
import { Spin, notification, Modal } from 'antd'
import { Spin } from 'antd'
// import { DownloadOutlined } from '@ant-design/icons'
import moment from 'moment'
@@ -368,37 +368,15 @@
          this.timer && this.timer.stop()
        }
      }
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false
      })
      this.timer && this.timer.stop()
      
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/chart/antv-pie/index.jsx
@@ -3,7 +3,7 @@
import { is, fromJS } from 'immutable'
import { Chart } from '@antv/g2'
import DataSet, { DataView } from '@antv/data-set'
import { Spin, Empty, notification, Modal } from 'antd'
import { Spin, Empty } from 'antd'
// import { DownloadOutlined } from '@ant-design/icons'
import moment from 'moment'
@@ -316,37 +316,15 @@
          this.timer && this.timer.stop()
        }
      }
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false
      })
      this.timer && this.timer.stop()
      
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/chart/antv-scatter/index.jsx
@@ -2,7 +2,7 @@
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Chart } from '@antv/g2'
import { Spin, Empty, notification, Modal } from 'antd'
import { Spin, Empty } from 'antd'
import { DownloadOutlined } from '@ant-design/icons'
import moment from 'moment'
@@ -347,37 +347,15 @@
          this.timer && this.timer.stop()
        }
      }
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false
      })
      this.timer && this.timer.stop()
      
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/chart/custom-chart/index.jsx
@@ -4,7 +4,7 @@
import { Chart } from '@antv/g2'
import DataSet from '@antv/data-set'
import * as echarts from 'echarts'
import { Spin, Empty, notification, Modal } from 'antd'
import { Spin, Empty, notification } from 'antd'
import Api from '@/api'
import Utils from '@/utils/utils.js'
@@ -340,37 +340,15 @@
          this.timer && this.timer.stop()
        }
      }
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false
      })
      this.timer && this.timer.stop()
      
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/code/sand-box/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Spin, notification, Modal } from 'antd'
import { Spin, notification } from 'antd'
import Api from '@/api'
import UtilsDM from '@/utils/utils-datamanage.js'
@@ -261,36 +261,14 @@
        loading: false
      })
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false
      })
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/editor/braft-editor/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Spin, notification, Modal } from 'antd'
import { Spin } from 'antd'
import asyncComponent from '@/utils/asyncComponent'
import Api from '@/api'
@@ -212,36 +212,13 @@
        loading: false
      })
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false
      })
      
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/form/simple-form/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Spin, notification, Modal, Button } from 'antd'
import { Spin, Button } from 'antd'
import Api from '@/api'
import UtilsDM from '@/utils/utils-datamanage.js'
@@ -387,36 +387,13 @@
      MKEmitter.emit('resetSelectLine', config.uuid, _data.$$uuid, _data)
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false,
      })
      
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/form/step-form/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Spin, notification, Button, Modal } from 'antd'
import { Spin, Button } from 'antd'
import Api from '@/api'
import UtilsDM from '@/utils/utils-datamanage.js'
@@ -405,36 +405,13 @@
      MKEmitter.emit('resetSelectLine', config.uuid, _data.$$uuid, _data)
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false,
      })
      
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/form/tab-form/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Spin, notification, Modal } from 'antd'
import { Spin } from 'antd'
import Api from '@/api'
import UtilsDM from '@/utils/utils-datamanage.js'
@@ -339,36 +339,13 @@
      MKEmitter.emit('resetSelectLine', config.uuid, _data.$$uuid, _data)
      
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false,
      })
      
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/iframe/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Input, Modal, notification, Empty, Spin } from 'antd'
import { Input, Empty, Spin } from 'antd'
import Api from '@/api'
import UtilsDM from '@/utils/utils-datamanage.js'
@@ -212,32 +212,9 @@
        data: _data
      })
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/interfaces/interItem/index.jsx
@@ -1,6 +1,5 @@
import {Component} from 'react'
import PropTypes from 'prop-types'
import { notification, Modal } from 'antd'
import Api from '@/api'
import UtilsDM from '@/utils/utils-datamanage.js'
@@ -153,39 +152,16 @@
        MKEmitter.emit('interFinish', config.MenuID, config.uuid)
      }
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.loading = false
      this.timer && this.timer.stop()
      
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      if (config.setting.loadlevel === 'init') {
        MKEmitter.emit('interFinish', config.MenuID, config.uuid)
      }
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/module/account/index.scss
@@ -8,8 +8,7 @@
  color: #000000;
  .ant-select {
    min-width: 250px;
    max-width: 300px;
    width: 270px;
    color: #000000;
  }
src/tabviews/custom/components/module/voucher/index.jsx
@@ -1189,8 +1189,10 @@
            return
          }
    
          Modal.success({
            title: '已经通过审核'
          notification.success({
            top: 92,
            message: '已经通过审核',
            duration: 2
          })
          that.getVoucher()
@@ -1237,8 +1239,10 @@
            return
          }
    
          Modal.success({
            title: '审核已取消'
          notification.success({
            top: 92,
            message: '审核已取消',
            duration: 2
          })
          that.getVoucher()
src/tabviews/custom/components/share/normalTable/index.jsx
@@ -256,6 +256,7 @@
        }
  
        if (col.format === 'thdSeparator') {
          content = content + ''
          content = content.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
        }
  
src/tabviews/custom/components/table/base-table/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { notification, Modal } from 'antd'
import { notification } from 'antd'
import Api from '@/api'
import UtilsDM from '@/utils/utils-datamanage.js'
@@ -143,6 +143,7 @@
    this.requestId = config.uuid + new Date().getTime()
    let result = await Api.genericInterface(param, setting.js_script, '', this.requestId)
    if (result.status) {
      if (result.$requestId && this.requestId !== result.$requestId) return
@@ -228,19 +229,7 @@
        }
      }
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false
@@ -250,18 +239,7 @@
        MKEmitter.emit('autoMaticError', config.MenuID)
      }
      
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
@@ -383,11 +361,8 @@
      this.setState({
        loading: false
      })
      notification.error({
        top: 92,
        message: result.message,
        duration: 10
      })
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/table/edit-table/index.jsx
@@ -1,7 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { notification, Modal } from 'antd'
import Api from '@/api'
import Utils from '@/utils/utils.js'
@@ -355,36 +354,13 @@
      MKEmitter.emit('transferData' + setting.tableId, data)
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false
      })
      
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
@@ -487,11 +463,8 @@
      this.setState({
        loading: false
      })
      notification.error({
        top: 92,
        message: result.message,
        duration: 10
      })
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/table/edit-table/normalTable/index.jsx
@@ -866,6 +866,7 @@
        }
  
        if (col.format === 'thdSeparator') {
          content = content + ''
          content = content.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
        }
  
@@ -1190,6 +1191,7 @@
          }
    
          if (col.format === 'thdSeparator') {
            content = content + ''
            content = content.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
          }
    
src/tabviews/custom/components/table/normal-table/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { notification, Collapse, Modal } from 'antd'
import { Collapse } from 'antd'
import Api from '@/api'
import UtilsDM from '@/utils/utils-datamanage.js'
@@ -529,37 +529,14 @@
        }
      }
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false
      })
      this.timer && this.timer.stop()
      
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
@@ -685,11 +662,8 @@
      this.setState({
        loading: false
      })
      notification.error({
        top: 92,
        message: result.message,
        duration: 10
      })
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/timeline/normal-timeline/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Spin, notification, Timeline, Empty, Modal } from 'antd'
import { Spin, notification, Timeline, Empty } from 'antd'
import Api from '@/api'
import MkIcon from '@/components/mk-icon'
@@ -377,37 +377,14 @@
        }
      }
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false
      })
      this.timer && this.timer.stop()
      
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/custom/components/tree/antd-tree/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Spin, Empty, notification, Input, Tree, Modal, Dropdown } from 'antd'
import { Spin, Empty, Input, Tree, Dropdown } from 'antd'
import { FolderOpenOutlined, FolderOutlined, FileOutlined, MoreOutlined } from '@ant-design/icons'
import Api from '@/api'
@@ -321,37 +321,14 @@
        }
      }
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false
      })
      this.timer && this.timer.stop()
      
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
src/tabviews/debugtable/index.jsx
@@ -44,6 +44,8 @@
    let param = UtilsDM.getQueryDataParams(setting, [], 'sort', 1, 50, '')
    delete param.s_version_up
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/subtable/index.jsx
@@ -480,6 +480,8 @@
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, searches, _orderBy, pageIndex, pageSize, BID)
    delete param.s_version_up
    let result = await Api.genericInterface(param)
    this.getStatFieldsValue(searches)
@@ -566,6 +568,8 @@
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, searches, _orderBy, pageIndex, pageSize, BID, id)
    delete param.s_version_up
    let result = await Api.genericInterface(param)
    if (result.status) {
      let data = fromJS(this.state.data).toJS()
src/tabviews/subtabtable/index.jsx
@@ -414,6 +414,8 @@
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, searches, _orderBy, pageIndex, pageSize, BID)
    delete param.s_version_up
    let result = await Api.genericInterface(param)
    this.getStatFieldsValue(searches)
@@ -539,6 +541,8 @@
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, searches, _orderBy, pageIndex, pageSize, BID, id)
    delete param.s_version_up
    let result = await Api.genericInterface(param)
    if (result.status) {
      let data = fromJS(this.state.data).toJS()
src/tabviews/treepage/index.jsx
@@ -265,6 +265,8 @@
    let param = UtilsDM.getQueryDataParams(setting, [], setting.order, '', '', BID)
    delete param.s_version_up
    let result = await Api.genericInterface(param)
    if (result.status) {
      let parentNodes = []
src/utils/utils-datamanage.js
@@ -1,16 +1,13 @@
import md5 from 'md5'
import moment from 'moment'
import { notification, Modal } from 'antd'
import MKEmitter from '@/utils/events.js'
import Utils from './utils.js'
export default class DataUtils {
  /**
   * @description 数据源名称,用于统一查询
   * @param {Object}   setting      数据源设置
   * @param {Array}    search       搜索条件
   * @param {String}   orderBy      排序方式
   * @param {Number}   pageIndex    页码
   * @param {Number}   pageSize     每页数量
   * @param {String}   BID          上级ID
   * @description 数据源统一查询
   */
  static getQueryDataParams (setting, search = [], orderBy = '', pageIndex = 1, pageSize = 10, BID, id, year) {
    let param = null
@@ -442,6 +439,46 @@
    return param
  }
  /**
   * @description 数据获取成功
   */
  static querySuccess (result) {
    if (!result.message) return
    if (result.ErrCode === 'Y') {
      Modal.success({
        title: result.message
      })
    } else if (result.ErrCode === 'S') {
      notification.success({
        top: 92,
        message: result.message,
        duration: 2
      })
    }
  }
  /**
   * @description 数据获取失败
   */
  static queryFail (result) {
    if (!result.message && result.ErrCode !== 'version_up') return
    if (result.ErrCode === 'N') {
      Modal.error({
        title: result.message,
      })
    } else if (result.ErrCode === 'version_up') {
      MKEmitter.emit('reloadTabs')
    } else if (result.ErrCode !== '-2') {
      notification.error({
        top: 92,
        message: result.message,
        duration: 10
      })
    }
  }
}
/**
src/views/billprint/index.jsx
@@ -1,6 +1,6 @@
import React, { Component } from 'react'
import { is, fromJS } from 'immutable'
import { Col, Row, Spin, notification, Button } from 'antd'
import { Col, Row, Spin, notification, Button, Modal } from 'antd'
import moment from 'moment'
import Api from '@/api'
@@ -47,6 +47,8 @@
    auto: true,
    ismob: /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(navigator.userAgent)
  }
  reloading = false
  UNSAFE_componentWillMount() {
    const { params } = this.props.match
@@ -917,11 +919,15 @@
            if (item.func === 'sPC_Get_structured_data' && /将截断字符串或二进制数据/ig.test(res.message)) {
              res.message = res.message + '请检查字段集'
            }
            if (res.ErrCode === 'version_up') {
              this.reloadTabs()
            } else {
            notification.warning({
              top: 92,
              message: res.message,
              duration: 5
            })
            }
            resolve(false)
          } else {
            res.componentId = componentId
@@ -1081,6 +1087,20 @@
    })
  }
  reloadTabs = () => {
    if (this.reloading) return
    this.reloading = true
    Api.getAppVersion(true).then(() => {
      window.location.reload()
    }, (message) => {
      Modal.error({
        title: message || '系统配置更新失败!',
      })
    })
  }
  canvasToImage(canvas) {
    let image = new Image()
    image.src = canvas.toDataURL('image/jpg')
src/views/mkiframe/index.jsx
@@ -19,6 +19,8 @@
    type: 'CustomPage'
  }
  reloading = false
  UNSAFE_componentWillMount() {
    const { params, path } = this.props.match
    const { menuId, loginUid, bid } = params
@@ -112,6 +114,10 @@
    MKEmitter.addListener('modifyTabs', this.modifyTabs)
    MKEmitter.addListener('closeTabView', this.closeTabView)
    if (window.GLOB.forcedUpdate) {
      MKEmitter.addListener('reloadTabs', this.reloadTabs)
    }
    if (window.GLOB.sysType !== 'cloud') {
      Object.defineProperty(window, 'debugger', {
        configurable: true,
@@ -152,9 +158,26 @@
      return
    }
    MKEmitter.removeListener('modifyTabs', this.modifyTabs)
    MKEmitter.removeListener('reloadTabs', this.reloadTabs)
    MKEmitter.removeListener('closeTabView', this.closeTabView)
  }
  reloadTabs = () => {
    if (this.reloading) return
    this.reloading = true
    Api.getAppVersion(true).then(() => {
      window.location.reload()
    }, (message) => {
      notification.error({
        top: 92,
        message: message || '系统配置更新失败!',
        duration: 10
      })
    })
  }
  modifyTabs = (tab) => {
    const { MenuId, BID } = this.state