king
2022-10-28 aa41be24e83653077d85860cb70882551912af24
src/tabviews/calendar/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { notification, Spin, Modal, Button } from 'antd'
import moment from 'moment'
@@ -22,7 +21,7 @@
const SubTabTable = asyncSpinComponent(() => import('@/tabviews/subtabtable'))
const PagemsgComponent = asyncComponent(() => import('@/tabviews/zshare/pageMessage'))
class NormalTable extends Component {
class MkCalendar extends Component {
  static propTpyes = {
    param: PropTypes.any,        // 其他页面传递的参数
    MenuID: PropTypes.string,    // 菜单Id
@@ -32,7 +31,6 @@
  state = {
    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    ContainerId: Utils.getuuid(), // 菜单外层html Id
    BID: null,            // 页面跳转时携带ID
    loadingview: true,    // 页面加载中
    viewlost: false,      // 页面丢失:1、未获取到配置-页面丢失;2、页面未启用
@@ -55,7 +53,7 @@
   * @description 获取页面配置信息
   */
  async loadconfig () {
    const { permAction, param } = this.props
    const { param } = this.props
    let _param = {
      func: 'sPC_Get_LongParam',
@@ -107,7 +105,7 @@
      // 权限过滤
      if (!window.GLOB.mkHS) {
        if (config.tab && !permAction[config.tab.linkTab]) {
        if (config.tab && !window.GLOB.mkActions[config.tab.linkTab]) {
          config.tab = null
        }
      }
@@ -271,11 +269,17 @@
      this.setState({
        loading: false
      })
      notification.error({
        top: 92,
        message: result.message,
        duration: 10
      })
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
    }
  }
@@ -301,6 +305,8 @@
      if (window.GLOB.mkHS) {
        if (setting.sysInterface === 'true' && options.cloudServiceApi) {
          param.rduri = options.cloudServiceApi
          param.userid = sessionStorage.getItem('CloudUserID') || ''
          param.LoginUID = sessionStorage.getItem('CloudLoginUID') || ''
        } else if (setting.sysInterface !== 'true') {
          param.rduri = setting.interface
        }
@@ -435,6 +441,10 @@
    param.secretkey = Utils.encrypt(param.LText, param.timestamp)
    param.DateCount = ''
    if (window.GLOB.probation) {
      param.s_debug_type = 'Y'
    }
    if (window.GLOB.mkHS) { // 云端数据验证
      param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp)
    }
@@ -541,7 +551,7 @@
    const { BID, setting, searchlist, loadingview, viewlost, config, loading, data, triggerTime } = this.state
    return (
      <div className="calendar-page" id={this.state.ContainerId}>
      <div className="calendar-page">
        {loadingview && <Spin size="large" />}
        {searchlist && searchlist.length > 0 ?
          <MainSearch BID={BID} searchlist={searchlist} setting={setting} refreshdata={this.refreshbysearch}/> : null
@@ -572,14 +582,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    permAction: state.permAction
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(NormalTable)
export default MkCalendar