king
2020-11-16 3ca91a731665962918a026f521c556f4745ebf35
2020-11-16
37个文件已修改
2个文件已添加
1654 ■■■■■ 已修改文件
src/api/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/index.jsx 178 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sidemenu/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tabview/index.jsx 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/en-US/model.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/zh-CN/model.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/action-type.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/action.js 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/reducer.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/calendar/index.jsx 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx 167 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/secretKeyTable/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardItem/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/prop-card/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/share/tabtransfer/index.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/formtab/index.jsx 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/index.jsx 146 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtabtable/index.jsx 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/treepage/index.jsx 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/popupbutton/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/cardcomponent/index.jsx 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/normalTable/index.jsx 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/actionform/index.jsx 86 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/actionform/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-datamanage.js 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/billprint/index.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/billprint/index.scss 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/main/index.jsx 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/homeform/index.jsx 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/homeform/index.scss 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/index.jsx 96 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/menuform/index.jsx 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/menuform/index.scss 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js
@@ -493,7 +493,7 @@
   * @description 获取或修改本地配置,增加appkey
   */
  getLocalConfig (param) {
    param.userid = sessionStorage.getItem('UserID')
    param.userid = sessionStorage.getItem('UserID') || ''
    param.lang = localStorage.getItem('lang') || ''
    param.SessionUid = localStorage.getItem('SessionUid') || ''
    param.LoginUID = sessionStorage.getItem('LoginUID') || ''
src/components/header/index.jsx
@@ -12,7 +12,6 @@
  modifyMainMenu,
  modifyTabview,
  resetState,
  resetDebug,
  resetEditState,
  resetEditLevel,
  initPermission,
@@ -169,10 +168,6 @@
    if (!result) return
    if (result.status) {
      if (result.debug === 'true') { // 是否为debug模式,即可复制菜单参数
        this.props.resetDebug()
      }
      let MainMenuId = sessionStorage.getItem('MainMenu') // 是否为打开新页面
      if (MainMenuId) {
        // 通过url中menuid筛选出选中的主菜单
@@ -200,10 +195,6 @@
        }),
        systems: result.Systems.filter(sys => sys.LinkUrl1 && sys.AppKey !== window.GLOB.appkey)
      })
      if (result.dataM) {
        this.props.modifyDataManager(true)
      }
    } else {
      notification.error({
        top: 92,
@@ -216,20 +207,66 @@
  async getRolesMenu () {
    // 获取角色权限
    let promiseRole = new Promise(resolve => {
      Api.getSystemConfig({func: 'sPC_Get_RolesMenu'}).then(result => {
        let _permAction = {}
        let _permRoles = []
        if (result && result.status) {
          if (result.UserRoles) {
            result.UserRoles.forEach(role => {
              _permRoles.push(role.RoleID)
      Api.getSystemConfig({func: 's_Get_TrdMenu_Role', edition_type: 'Y'}).then(result => {
        let _permAction = {} // 按钮权限
        let _permMenus = {}  // 菜单权限,字段透视等
        let menulist = []    // 三级菜单列表
              role.RoleMenu.forEach(menu => {
                if (!menu.MenuID) return
                _permAction[menu.MenuID] = true
        if (result && result.status) {
          if (result.UserRoles_Menu) {
            result.UserRoles_Menu.forEach(menu => {
              if (!menu.MenuID) return
              _permAction[menu.MenuID] = true
            })
          }
          if (result.UserRoles) {
            let iframes = ['Main/Index', 'bda/rdt', 'Home/rdt']
            let menukeys = []
            result.UserRoles.forEach(menu => {
              if (!menu.MenuID) return
              if (menukeys.includes(menu.MenuID)) {
                console.warn('s_Get_TrdMenu_Role重复的菜单ID:' + menu.MenuID)
                return
              }
              _permMenus[menu.MenuID] = true
              let _type = ''
              if (menu.LinkUrl === 'CommonTable') {
                _type = 'CommonTable'
              } else if (menu.LinkUrl && iframes.includes(menu.LinkUrl.split('?')[0])) {
                _type = 'iframe'
              }
              if (_type !== 'iframe') {
                let pageParam = {}
                try {
                  pageParam = JSON.parse(menu.PageParam)
                } catch (e) {
                  pageParam = {}
                }
                _type = pageParam.Template || _type
              }
              menukeys.push(menu.MenuID)
              menulist.push({
                MenuID: menu.MenuID,
                MenuName: menu.MenuName,
                MenuNo: menu.MenuNo || '',
                EasyCode: menu.EasyCode || '',
                LinkUrl: menu.LinkUrl,
                type: _type
              })
            })
          }
          this.setState({
            thdMenuList: menulist
          })
          this.props.initMenuPermission(_permMenus)
        } else if (result) {
          notification.error({
            top: 92,
@@ -238,7 +275,7 @@
          })
        }
        resolve({permAction: _permAction, permRoles: _permRoles})
        resolve({permAction: _permAction})
      })
    })
    
@@ -252,10 +289,6 @@
      Api.getSystemConfig(_param).then(result => {
        let mainMenu = null
        if (result && result.status) {
          if (result.debug === 'true') { // 是否为debug模式,即可复制菜单参数
            this.props.resetDebug()
          }
          let MainMenuId = sessionStorage.getItem('MainMenu') // 是否为打开新页面
          if (MainMenuId) {
            // 通过url中menuid筛选出选中的主菜单
@@ -283,10 +316,6 @@
            }),
            systems: result.Systems.filter(sys => sys.LinkUrl1 && sys.AppKey !== window.GLOB.appkey)
          })
          if (result.dataM) {
            this.props.modifyDataManager(true)
          }
        } else if (result) {
          notification.error({
            top: 92,
@@ -306,7 +335,7 @@
    let _role = await promiseRole
    this.props.initActionPermission(_role.permRoles, _role.permAction)
    this.props.initActionPermission(_role.permAction)
  }
  reload = () => {
@@ -337,6 +366,9 @@
      let _userName = sessionStorage.getItem('User_Name')
      let _avatar = avatar
      if (sessionStorage.getItem('cloudDataM') === 'true') {
        this.props.modifyDataManager(true)
      }
      if (!state && sessionStorage.getItem('avatar')) {
        _avatar = Utils.getrealurl(sessionStorage.getItem('avatar')) // 头像
      } else if (state && sessionStorage.getItem('CloudAvatar')) {
@@ -427,10 +459,15 @@
          sessionStorage.setItem('CloudFullName', res.FullName)
          sessionStorage.setItem('CloudAvatar', res.icon)
          sessionStorage.setItem('isEditState', 'true')
          sessionStorage.setItem('cloudDataM', res.dataM ? 'true' : '')
          let _avatar = avatar
          if (res.icon) {
            _avatar = Utils.getrealurl(res.icon) // 头像
          }
          if (res.dataM) {
            this.props.modifyDataManager(true)
          }
          if (window.GLOB.systemType === 'production') {
@@ -564,84 +601,22 @@
      _avatar = Utils.getrealurl(_avatar) // 头像
      this.setState({avatar: _avatar})
    }
    this.getRolesMenu()
  }
  componentDidMount () {
    // 获取角色菜单权限
    Api.getSystemConfig({func: 's_Get_TrdMenu_Role'}).then(result => {
      if (!result) return
      if (result.status) {
        let _permMenus = {}
        let menulist = []
        if (result.UserRoles) {
          let iframes = ['Main/Index', 'bda/rdt', 'Home/rdt']
          let menukeys = []
          result.UserRoles.forEach(role => {
            role.RoleMenu.forEach(menu => {
              if (!menu.MenuID) return
              if (menukeys.includes(menu.MenuID)) {
                console.warn('s_Get_TrdMenu_Role重复的菜单ID:' + menu.MenuID)
                return
              }
              _permMenus[menu.MenuID] = true
              let _type = ''
              if (menu.LinkUrl === 'CommonTable') {
                _type = 'CommonTable'
              } else if (menu.LinkUrl && iframes.includes(menu.LinkUrl.split('?')[0])) {
                _type = 'iframe'
              }
              if (_type !== 'iframe') {
                let pageParam = {}
                try {
                  pageParam = JSON.parse(menu.PageParam)
                } catch (e) {
                  pageParam = {}
                }
                _type = pageParam.Template || _type
              }
              menukeys.push(menu.MenuID)
              menulist.push({
                MenuID: menu.MenuID,
                MenuName: menu.MenuName,
                MenuNo: menu.MenuNo || '',
                EasyCode: menu.EasyCode || '',
                LinkUrl: menu.LinkUrl,
                type: _type
              })
            })
          })
        }
    // 获取系统的版本信息,延时查询
    setTimeout(() => {
      new Promise((resolve, reject) => {
        Api.getAppVersion(resolve, reject)
      }).then(res => {
        this.setState({
          thdMenuList: menulist
          oriVersion: res.oldVersion,
          newVersion: res.newVersion
        })
        this.props.initMenuPermission(_permMenus)
      } else {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
    })
    // 获取系统的版本信息
    new Promise((resolve, reject) => {
      Api.getAppVersion(resolve, reject)
    }).then(res => {
      this.setState({
        oriVersion: res.oldVersion,
        newVersion: res.newVersion
      })
    })
    }, 1000)
  }
  shouldComponentUpdate (nextProps, nextState) {
@@ -845,12 +820,11 @@
    modifyMainMenu: (selectmenu) => dispatch(modifyMainMenu(selectmenu)),
    resetEditState: (state) => dispatch(resetEditState(state)),
    resetEditLevel: (level) => dispatch(resetEditLevel(level)),
    initActionPermission: (permRoles, permAction) => dispatch(initActionPermission(permRoles, permAction)),
    initActionPermission: (permAction) => dispatch(initActionPermission(permAction)),
    initPermission: (sysRoles, permFuncField) => dispatch(initPermission(sysRoles, permFuncField)),
    initMenuPermission: (permMenus) => dispatch(initMenuPermission(permMenus)),
    modifyDataManager: (dataManager) => dispatch(modifyDataManager(dataManager)),
    resetState: () => dispatch(resetState()),
    resetDebug: () => dispatch(resetDebug()),
    logout: () => dispatch(logout())
  }
}
src/components/sidemenu/index.jsx
@@ -76,6 +76,12 @@
        UserID: sessionStorage.getItem('UserID'),
        LoginUID: sessionStorage.getItem('LoginUID'),
        User_Name: sessionStorage.getItem('User_Name'),
        Full_Name: sessionStorage.getItem('Full_Name'),
        Member_Level: sessionStorage.getItem('Member_Level'),
        dataM: sessionStorage.getItem('dataM'),
        avatar: sessionStorage.getItem('avatar'),
        debug: sessionStorage.getItem('debug'),
        role_id: sessionStorage.getItem('role_id'),
        mainlogo: window.GLOB.mainlogo,
        mstyle: window.GLOB.style,
        MainMenu: menu.MenuID
src/components/tabview/index.jsx
@@ -6,12 +6,13 @@
import moment from 'moment'
import 'moment/locale/zh-cn'
import {modifyTabview, toggleIsiframe, refreshTabView} from '@/store/action'
import { modifyTabview, toggleIsiframe } from '@/store/action'
import asyncComponent from '@/utils/asyncLoadComponent'
import NotFount from '@/components/404'
import options from '@/store/options.js'
import mzhCN from '@/locales/zh-CN/main.js'
import menUS from '@/locales/en-US/main.js'
import MKEmitter from '@/utils/events.js'
import './index.scss'
@@ -42,6 +43,7 @@
  }
  state = {
    activeId: '',
    tabviews: null, // 标签集
    iFrameHeight: 0,
    dict: localStorage.getItem('lang') !== 'en-US' ? mzhCN : menUS
@@ -55,8 +57,15 @@
      return tab.MenuID !== menu.MenuID
    })
    
    if (menu.selected) {
      tabs[0] && (tabs[0].selected = true)
    if (menu.selected && tabs[0]) {
      tabs[0].selected = true
      this.setState({
        activeId: tabs[0].MenuID || ''
      })
      if (this.props.isiframe) {
        this.props.toggleIsiframe(false)
      }
    }
    this.props.modifyTabview(tabs)
@@ -66,11 +75,7 @@
    e.stopPropagation()
    window.GLOB.CacheMap = new Map()
    let _menu = {
      MenuID: menu.MenuID,
      position: 'view'
    }
    this.props.refreshTabView(_menu)
    MKEmitter.emit('reloadMenuView', menu.MenuID)
  }
  changeTab = (e, menu) => {
@@ -87,8 +92,26 @@
      return tab
    })
    if (menu) {
      let _isiframe = this.props.isiframe
      if (menu.type === 'iframe') {
        _isiframe = true
      } else {
        _isiframe = false
      }
      if (_isiframe !== this.props.isiframe) {
        this.props.toggleIsiframe(_isiframe)
      }
    }
    this.setState({
      tabviews: tabs
      tabviews: tabs,
      activeId: menu.MenuID || ''
    }, () => {
      if (menu.MenuID) {
        MKEmitter.emit('resetActiveMenu', menu.MenuID)
      }
    })
    this.props.modifyTabview(tabs)
@@ -120,21 +143,6 @@
      return (<Iframe key={view.MenuID} title={view.MenuName} MenuName={view.MenuName} url={service + view.LinkUrl}/>)
    } else {
      return (<NotFount key={view.MenuID} />)
    }
  }
  resetWindow = (view) => {
    // 窗口在iframe与普通页面切换时,修改左侧菜单栏样式
    if (!view) return
    let _isiframe = this.props.isiframe
    if (view && view.type === 'iframe') {
      _isiframe = true
    } else {
      _isiframe = false
    }
    if (_isiframe !== this.props.isiframe) {
      this.props.toggleIsiframe(_isiframe)
    }
  }
@@ -173,9 +181,29 @@
  UNSAFE_componentWillReceiveProps (nextProps) {
    if (nextProps.tabviews && !is(fromJS(this.state.tabviews), fromJS(nextProps.tabviews))) {
      let view = nextProps.tabviews.filter(tab => tab.selected)[0]
      // 窗口在iframe与普通页面切换时,修改左侧菜单栏样式
      let activeId = ''
      if (view) {
        let _isiframe = this.props.isiframe
        if (view.type === 'iframe') {
          _isiframe = true
        } else {
          _isiframe = false
        }
        if (_isiframe !== this.props.isiframe) {
          this.props.toggleIsiframe(_isiframe)
        }
        activeId = view.MenuID
      }
      // 保存修改标签集
      this.setState({
        tabviews: nextProps.tabviews
        tabviews: nextProps.tabviews,
        activeId
      })
      let node = document.getElementById('root').parentNode.parentNode
@@ -196,16 +224,13 @@
  render () {
    const { menuType } = this.props
    const { tabviews } = this.state
    let view = tabviews.filter(tab => tab.selected)[0]
    this.resetWindow(view)
    let selectedTabId = view ? view.MenuID : ''
    const { tabviews, activeId } = this.state
    return (
      <section className={'flex-container content-box' + (this.props.collapse ? ' collapsed' : '')}>
        <div className="content-header">
          {tabviews && tabviews.length > 0 &&
            <Tabs activeKey={selectedTabId}>
            <Tabs activeKey={activeId}>
              {tabviews.map(view => {
                return (
                  <Tabs.TabPane
@@ -264,7 +289,6 @@
const mapDispatchToProps = (dispatch) => {
  return {
    modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews)),
    refreshTabView: (refreshTab) => dispatch(refreshTabView(refreshTab)),
    toggleIsiframe: (isiframe) => dispatch(toggleIsiframe(isiframe))
  }
}
src/locales/en-US/model.js
@@ -94,10 +94,8 @@
  'header.form.errorTime': 'Residence time',
  'header.form.refresh': 'Refresh',
  'header.form.refresh.never': 'Don\'t refresh',
  'header.form.refresh.view': 'Refresh the page',
  'header.form.refresh.grid': 'Refresh the table',
  'header.form.refresh.maingrid': 'Refresh the main table',
  'header.form.refresh.mainline': 'Refresh the main table (rows)',
  'header.form.refresh.equaltab': 'Refresh sibling tag',
  'header.form.refresh.subgrid': 'Refresh the child table',
  'header.form.popClose': 'Label closing',
src/locales/zh-CN/model.js
@@ -94,10 +94,8 @@
  'header.form.errorTime': '停留时间',
  'header.form.refresh': '刷新',
  'header.form.refresh.never': '不刷新',
  'header.form.refresh.view': '刷新页面',
  'header.form.refresh.grid': '刷新表格',
  'header.form.refresh.maingrid': '刷新主表',
  'header.form.refresh.mainline': '刷新主表(行)',
  'header.form.refresh.maingrid': '刷新主表(行)',
  'header.form.refresh.equaltab': '刷新同级标签',
  'header.form.refresh.subgrid': '刷新子表',
  'header.form.popClose': '标签关闭',
src/router/index.js
@@ -40,15 +40,16 @@
        let _param = JSON.parse(window.decodeURIComponent(window.atob(props.match.params.param)))
        if (typeof(_param) === 'object') {
          if (_param.UserID && !sessionStorage.getItem('UserID')) {
            sessionStorage.setItem('UserID', _param.UserID)
          }
          if (_param.LoginUID && !sessionStorage.getItem('LoginUID')) {
            sessionStorage.setItem('LoginUID', _param.LoginUID)
          }
          if (_param.User_Name && !sessionStorage.getItem('User_Name')) {
            sessionStorage.setItem('User_Name', _param.User_Name)
          }
          _param.UserID && sessionStorage.setItem('UserID', _param.UserID)
          _param.LoginUID && sessionStorage.setItem('LoginUID', _param.LoginUID)
          _param.User_Name && sessionStorage.setItem('User_Name', _param.User_Name)
          _param.Full_Name && sessionStorage.setItem('Full_Name', _param.Full_Name)
          _param.debug && sessionStorage.setItem('debug', _param.debug)
          _param.dataM && sessionStorage.setItem('dataM', _param.dataM)
          _param.avatar && sessionStorage.setItem('avatar', _param.avatar)
          _param.role_id && sessionStorage.setItem('role_id', _param.role_id)
          _param.Member_Level && sessionStorage.setItem('Member_Level', _param.Member_Level)
          if (_param.mainlogo) {
            window.GLOB.mainlogo = _param.mainlogo
          }
src/store/action-type.js
@@ -25,6 +25,9 @@
// 重置编辑级别
export const RESET_EDITLEVEL = 'RESET_EDITLEVEL'
// 初始化角色权限
export const INIT_ROLESPERMISSION = 'INIT_ROLESPERMISSION'
// 初始化按钮权限
export const INIT_ACTIONPERMISSION = 'INIT_ACTIONPERMISSION'
src/store/action.js
@@ -46,14 +46,6 @@
  }
}
// 刷新tab页面
export const refreshTabView = (refreshTab) => {
  return {
    type: user.REFRESH_TABVIEW,
    refreshTab
  }
}
// 重置编辑状态
export const resetEditState = (editState) => {
  return {
@@ -71,10 +63,17 @@
}
// 初始化按钮权限
export const initActionPermission = (permRoles, permAction) => {
export const initRolesPermission = (permRoles) => {
  return {
    type: user.INIT_ROLESPERMISSION,
    permRoles: permRoles
  }
}
// 初始化按钮权限
export const initActionPermission = (permAction) => {
  return {
    type: user.INIT_ACTIONPERMISSION,
    permRoles: permRoles,
    permAction: permAction
  }
}
src/store/reducer.js
@@ -24,7 +24,6 @@
  debug: false,         // 知否可以复制菜单参数, 是否可进入编辑模式
  editState: false,     // 是否为编辑状态,值为false、true
  editLevel: null,      // 编辑菜单级别,值为level1、level2、level3、HS
  refreshTab: null,     // 刷新tabview页面信息
  permRoles: [],        // 用户角色列表
  permAction: {},       // 用户按钮权限
  permMenus: {},        // 用户三级菜单权限
@@ -79,12 +78,6 @@
        ...state,
        debug: true
      }
    case Type.REFRESH_TABVIEW:
    // 刷新tab页面
      return {
        ...state,
        refreshTab: action.refreshTab
      }
    case Type.RESET_EDITSTATE:
    // 重置编辑状态
      if (action.editState) {
@@ -108,11 +101,16 @@
        ...state,
        editLevel: action.editLevel
      }
    case Type.INIT_ROLESPERMISSION:
    // 初始化按钮权限
      return {
        ...state,
        permRoles: action.permRoles
      }
    case Type.INIT_ACTIONPERMISSION:
    // 初始化按钮权限
      return {
        ...state,
        permRoles: action.permRoles,
        permAction: action.permAction
      }
    case Type.INIT_PERMISSION:
@@ -155,7 +153,6 @@
        debug: false,
        editState: false,
        editLevel: null,
        refreshTab: null,
        permAction: {},
        permFuncField: [],
        sysRoles: [],
src/tabviews/calendar/index.jsx
@@ -11,7 +11,7 @@
import enUS from '@/locales/en-US/main.js'
import Utils from '@/utils/utils.js'
import asyncSpinComponent from '@/utils/asyncSpinComponent'
import { refreshTabView } from '@/store/action'
import MKEmitter from '@/utils/events.js'
import MainSearch from '@/tabviews/zshare/topSearch'
import NotFount from '@/components/404'
@@ -515,16 +515,21 @@
    })
  }
  reloadMenuView = (menuId) => {
    const { MenuID } = this.props
    if (MenuID !== menuId) return
    this.reloadview()
  }
  UNSAFE_componentWillMount () {
    // 组件加载时,获取菜单数据
    this.loadconfig()
  }
  UNSAFE_componentWillReceiveProps(nextProps) {
    if (nextProps.refreshTab && nextProps.refreshTab.MenuID === this.props.MenuID) {
      this.reloadview()
      this.props.refreshTabView('')
    } else if (nextProps.param && !is(fromJS(this.props.param), fromJS(nextProps.param))) {
    if (nextProps.param && !is(fromJS(this.props.param), fromJS(nextProps.param))) {
      let search = this.state.search.map(item => {
        if (item.type === 'text' && item.key === nextProps.param.searchkey) {
          item.value = nextProps.param.searchval
@@ -539,6 +544,10 @@
    return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
  }
  componentDidMount () {
    MKEmitter.addListener('reloadMenuView', this.reloadMenuView)
  }
  /**
   * @description 组件销毁,清除state更新,清除快捷键设置
   */
@@ -546,6 +555,7 @@
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('reloadMenuView', this.reloadMenuView)
  }
  changeDate = (value) => {
@@ -646,18 +656,14 @@
const mapStateToProps = (state) => {
  return {
    menuType: state.editLevel,
    tabviews: state.tabviews,
    refreshTab: state.refreshTab,
    permAction: state.permAction,
    permRoles: state.permRoles,
    dataManager: state.dataManager
  }
}
const mapDispatchToProps = (dispatch) => {
  return {
    refreshTabView: (refreshTab) => dispatch(refreshTabView(refreshTab))
  }
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(NormalTable)
src/tabviews/commontable/index.jsx
@@ -13,7 +13,6 @@
import UtilsUpdate from '@/utils/utils-update.js'
import asyncComponent from '@/utils/asyncComponent'
import asyncSpinComponent from '@/utils/asyncSpinComponent'
import { refreshTabView } from '@/store/action'
import MKEmitter from '@/utils/events.js'
import MainSearch from '@/tabviews/zshare/topSearch'
@@ -66,7 +65,6 @@
    BIDs: {},             // 上级表id
    pickup: false,        // 主表数据隐藏显示切换
    treevisible: false,   // 菜单结构树弹框显示隐藏控制
    refreshtabs: null,    // 需要刷新的标签集
    tabActive: null,      // 标签页展开控制
    chartId: '',          // 展开图表ID
    statFields: [],       // 合计字段
@@ -545,6 +543,59 @@
  }
  /**
   * @description 获取单行数据
   */
  async loadmainLinedata (id) {
    const { setting, arr_field, search, orderBy, BID, pageIndex, pageSize } = this.state
    this.setState({
      loading: true
    })
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, arr_field, search, _orderBy, pageIndex, pageSize, BID, this.props.menuType, this.props.dataManager, id)
    if (param.func === 'sPC_Get_TableData') {
      param.menuname = this.props.MenuName || ''
    }
    let result = await Api.genericInterface(param)
    if (result.status) {
      let data = fromJS(this.state.data).toJS()
      if (result.data && result.data[0]) {
        let _data = result.data[0]
        try {
          data = data.map(item => {
            if (item[setting.primaryKey] === _data[setting.primaryKey]) {
              _data.key = item.key
              return _data
            } else {
              return item
            }
          })
        } catch {
          console.warn('数据查询错误')
        }
      }
      this.setState({
        data: data,
        loading: false
      })
    } else {
      this.setState({
        loading: false
      })
      notification.error({
        top: 92,
        message: result.message,
        duration: 10
      })
    }
  }
  /**
   * @description 获取合计字段值
   */
  getStatFieldsValue = () => {
@@ -649,21 +700,27 @@
  /**
   * @description 表格刷新
   */
  reloadtable = () => {
    MKEmitter.emit('resetTable', this.props.MenuID + 'mainTable') // 列表重置
    this.setState({
      pageIndex: 1
    }, () => {
  reloadtable = (btn) => {
    if (!btn || btn.resetPageIndex !== 'false') {
      MKEmitter.emit('resetTable', this.props.MenuID + 'mainTable') // 列表重置
      this.setState({
        pageIndex: 1
      }, () => {
        this.loadmaindata()
        this.getStatFieldsValue()
      })
    } else {
      MKEmitter.emit('resetTable', this.props.MenuID + 'mainTable', 'false') // 列表重置
      this.loadmaindata()
      this.getStatFieldsValue()
    })
    }
  }
  /**
   * @description 页面刷新,重新获取配置
   */
  reloadview = () => {
    this.setState({ loadingview: true, viewlost: false, lostmsg: '',
    this.setState({ loadingview: true, viewlost: false, config: {}, setting: null,
      data: null, total: 0, loading: false, pageIndex: 1,
      pageSize: 10, orderBy: '', search: '', BIDs: {}, pickup: false
    }, () => {
@@ -674,38 +731,9 @@
  /**
   * @description 按钮操作完成后(成功或失败),页面刷新,重置页码及选择项
   */
  refreshbyaction = (position) => {
    if (position === 'grid') {
      this.reloadtable()
    } else if (position === 'view') {
      this.reloadview()
    }
  }
  /**
   * @description 子表操作完成后刷新主表
   */
  handleMainTable = (type, tab) => {
    if (type === 'maingrid' && tab.supMenu === 'mainTable') {
      this.reloadtable()
    } else if (type === 'mainline' && tab.supMenu === 'mainTable') {
      this.reloadtable()
    } else if ((type === 'maingrid' || type === 'mainline') && tab.supMenu) {
      this.setState({
        refreshtabs: [type, tab.supMenu]
      }, () => {
        this.setState({
          refreshtabs: null
        })
      })
    } else if (type === 'equaltab' && tab.equalTab && tab.equalTab.length > 0) {
      this.setState({
        refreshtabs: tab.equalTab
      }, () => {
        this.setState({
          refreshtabs: null
        })
      })
  refreshbyaction = (position, btn) => {
    if (position === 'grid' || position === 'view') {
      this.reloadtable(btn)
    }
  }
@@ -822,16 +850,47 @@
    this.setState({chartId: uuid})
  }
  reloadData = (menuId, id, btn) => {
    const { MenuID } = this.props
    if (MenuID !== menuId) return
    if (id === 'empty') return
    if (id === 'formtab') { // 表单标签页刷新
      this.reloadtable(btn)
      return
    }
    if (!id) {
      this.reloadtable()
    } else {
      this.loadmainLinedata(id)
    }
  }
  reloadMenuView = (menuId) => {
    const { MenuID } = this.props
    if (MenuID !== menuId) return
    this.reloadview()
  }
  resetActiveMenu = (menuId) => {
    const { MenuID } = this.props
    if (MenuID !== menuId) return
    this.setShortcut()
  }
  UNSAFE_componentWillMount () {
    // 组件加载时,获取菜单数据
    this.loadconfig()
  }
  UNSAFE_componentWillReceiveProps(nextProps) {
    if (nextProps.refreshTab && nextProps.refreshTab.MenuID === this.props.MenuID) {
      this.reloadview()
      this.props.refreshTabView('')
    } else if (!is(fromJS(this.props.tabviews), fromJS(nextProps.tabviews))) {
     if (!is(fromJS(this.props.tabviews), fromJS(nextProps.tabviews))) {
      let selectTab = nextProps.tabviews.filter(tab => tab.selected)[0]
      if (selectTab && selectTab.MenuID === this.props.MenuID) {
        this.setShortcut()
@@ -851,6 +910,12 @@
    return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
  }
  componentDidMount () {
    MKEmitter.addListener('reloadData', this.reloadData)
    MKEmitter.addListener('reloadMenuView', this.reloadMenuView)
    MKEmitter.addListener('resetActiveMenu', this.resetActiveMenu)
  }
  /**
   * @description 组件销毁,清除state更新,清除快捷键设置
   */
@@ -859,6 +924,9 @@
      return
    }
    document.onkeydown = () => {}
    MKEmitter.removeListener('reloadData', this.reloadData)
    MKEmitter.removeListener('reloadMenuView', this.reloadMenuView)
    MKEmitter.removeListener('resetActiveMenu', this.resetActiveMenu)
  }
  render() {
@@ -1001,12 +1069,10 @@
                      mainSearch={_tab.searchPass === 'true' ? search : null}
                      userConfig={userConfig ? userConfig[_tab.uuid] : null}
                      SupMenuID={this.props.MenuID}
                      refreshtabs={this.state.refreshtabs}
                      ContainerId={this.state.ContainerId}
                      BID={this.state.BIDs[_tab.supMenu] || ''}
                      BData={this.state.BIDs[_tab.supMenu + 'data'] || ''}
                      handleTableId={this.handleTableId}
                      handleMainTable={(type) => this.handleMainTable(type, _tab)}
                    />
                  </TabPane>
                )
@@ -1050,7 +1116,6 @@
  return {
    menuType: state.editLevel,
    tabviews: state.tabviews,
    refreshTab: state.refreshTab,
    permAction: state.permAction,
    permMenus: state.permMenus,
    permRoles: state.permRoles,
@@ -1058,10 +1123,8 @@
  }
}
const mapDispatchToProps = (dispatch) => {
  return {
    refreshTabView: (refreshTab) => dispatch(refreshTabView(refreshTab))
  }
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(NormalTable)
src/tabviews/commontable/secretKeyTable/index.jsx
@@ -8,6 +8,7 @@
import enUS from '@/locales/en-US/main.js'
import options from '@/store/options.js'
import { buttonConfig, tabConfig, refCodes } from './config'
import MKEmitter from '@/utils/events.js'
import asyncSpinComponent from '@/utils/asyncSpinComponent'
import SubAction from './actionList'
@@ -37,7 +38,6 @@
    setting: null,        // 页面全局设置:数据源、按钮及显示列固定、主键等
    data: null,           // 列表数据集
    selectedData: [],     // 已选表格数据
    resetTable: false,    // 表格重置,值在true与false之间切换,切换时表格重置
    loading: false,       // 列表数据加载中
    visible: false,       // 弹框显示隐藏控制
    pickup: false,        // 子表数据隐藏显示切换
@@ -48,10 +48,10 @@
   */
  UNSAFE_componentWillReceiveProps(nextProps) {
    if (this.state.config && this.props.Tab.supMenu && !is(fromJS(this.props.BID), fromJS(nextProps.BID))) {
      MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 列表重置
      this.setState({
        pageIndex: 1,
        selectedData: [],
        resetTable: !this.state.resetTable,
      }, () => {
        this.loadmaindata(nextProps.BID, 'refresh')
      })
@@ -253,10 +253,10 @@
   * @description 表格刷新
   */
  reloadtable = () => {
    MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 列表重置
    this.setState({
      loading: true,
      selectedData: [],
      resetTable: !this.state.resetTable
    }, () => {
      this.loadmaindata()
    })
src/tabviews/custom/components/card/cardItem/index.jsx
@@ -32,7 +32,7 @@
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState))
    return !is(fromJS(this.state), fromJS(nextState)) || !is(fromJS(this.props), fromJS(nextProps))
  }
  /**
src/tabviews/custom/components/card/prop-card/index.jsx
@@ -26,7 +26,7 @@
    loading: false,            // 数据加载状态
    activeKey: '',             // 选中数据
    sync: false,               // 是否统一请求数据
    data: null,                // 数据
    data: {}                   // 数据
  }
  UNSAFE_componentWillMount () {
@@ -34,7 +34,7 @@
    let _config = fromJS(this.props.config).toJS()
    let _cols = new Map()
    let _data = null
    let _data = {}
    let _sync = false
    if (_config.setting && _config.wrap.datatype !== 'static') {
      _sync = _config.setting.sync === 'true'
@@ -219,13 +219,13 @@
            <Spin />
          </div> : null
        }
        {data ? <div className="card-row-list">
        <div className="card-row-list">
          {config.subcards.map((item, index) => (
            <Col className={activeKey === index ? 'active' : ''} key={index} span={item.setting.width || 6} onClick={() => {this.changeCard(index, item)}}>
              <CardItem BID={BID} card={item} cards={config} data={data} updateStatus={this.updateStatus}/>
            </Col>
          ))}
        </div> : null}
        </div>
      </div>
    )
  }
src/tabviews/custom/components/share/tabtransfer/index.jsx
@@ -4,6 +4,7 @@
import { is, fromJS } from 'immutable'
import { Row, Col, Empty, notification } from 'antd'
import moment from 'moment'
import md5 from 'md5'
import Api from '@/api'
import options from '@/store/options.js'
@@ -84,7 +85,10 @@
    })
    this.setState({mainSearch: _mainSearch, self})
    this.loadmaindata(params)
    if (params.length > 0) {
      this.loadmaindata(params)
    }
  }
  UNSAFE_componentWillReceiveProps(nextProps) {
@@ -172,7 +176,7 @@
   * @description 主表数据加载
   */ 
  loadmaindata = (params) => {
    if (!params || params.length === 0) return
    const { config } = this.props
    let LText_field = []
    let LText = params.map((item, index) => {
      let _sql = item.sql
@@ -198,6 +202,16 @@
    param.LText = Utils.formatOptions(param.LText)
    param.LText_field = Utils.formatOptions(param.LText_field)
    if (config.cacheUseful === 'true') {
      param.time_type = config.timeUnit
      param.time_limit = config.cacheTime
      if (config.diffUser) {
        param.userid = sessionStorage.getItem('UserID')
      }
      param.data_md5 = md5(JSON.stringify(param))
    }
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    param.secretkey = Utils.encrypt(param.LText, param.timestamp)
src/tabviews/custom/index.jsx
@@ -4,6 +4,7 @@
import { is, fromJS } from 'immutable'
import { notification, Spin, Row, Col, Button, message } from 'antd'
import moment from 'moment'
import md5 from 'md5'
import Api from '@/api'
import options from '@/store/options.js'
@@ -11,8 +12,7 @@
import enUS from '@/locales/en-US/main.js'
import Utils from '@/utils/utils.js'
import asyncComponent from '@/utils/asyncComponent'
import { refreshTabView } from '@/store/action'
import MKEmitter from '@/utils/events.js'
import NotFount from '@/components/404'
import './index.scss'
@@ -101,6 +101,15 @@
        return
      }
      // 数据缓存设置
      if (config.cacheUseful === 'true') {
        config.diffUser = config.diffUser !== 'false'
        if (!['day', 'hour'].includes(config.timeUnit)) {
          config.timeUnit = 'day'
        }
        config.cacheTime = config.cacheTime || 1
      }
      // 权限过滤
      if (this.props.menuType !== 'HS') {
        config.components = this.filterComponent(config.components)
@@ -141,7 +150,16 @@
      let params = []
      let BID = param && param.BID ? param.BID : ''
      config.components = this.formatSetting(config.components, params, mainSearch, permAction)
      let inherit = {}
      if (config.cacheUseful === 'true') { // 缓存继承
        inherit.cacheUseful = config.cacheUseful
        inherit.timeUnit = config.timeUnit
        inherit.cacheTime = config.cacheTime
        inherit.diffUser = config.diffUser
      }
      config.components = this.formatSetting(config.components, params, mainSearch, permAction, inherit)
      this.setState({
        BID: BID,
@@ -209,11 +227,12 @@
  }
  // 格式化默认设置
  formatSetting = (components, params, mainSearch, permAction) => {
  formatSetting = (components, params, mainSearch, permAction, inherit) => {
    return components.map(component => {
      if (component.type === 'tabs') {
        component.subtabs = component.subtabs.map(tab => {
          tab.components = this.formatSetting(tab.components, [], [], permAction)
          tab.components = this.formatSetting(tab.components, [], [], permAction, inherit)
          tab = {...tab, ...inherit}
          return tab
        })
      }
@@ -354,6 +373,7 @@
   * @description 主表数据加载
   */ 
  loadmaindata = (params) => {
    const { config } = this.state
    let LText_field = []
    let LText = params.map((item, index) => {
      let _sql = item.sql
@@ -380,6 +400,16 @@
    param.LText = Utils.formatOptions(param.LText)
    param.LText_field = Utils.formatOptions(param.LText_field)
    if (config.cacheUseful === 'true') {
      param.time_type = config.timeUnit
      param.time_limit = config.cacheTime
      if (config.diffUser) {
        param.userid = sessionStorage.getItem('UserID')
      }
      param.data_md5 = md5(JSON.stringify(param))
    }
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    param.secretkey = Utils.encrypt(param.LText, param.timestamp)
@@ -431,20 +461,25 @@
    }
  }
  reloadMenuView = (menuId) => {
    const { MenuID } = this.props
    if (MenuID !== menuId) return
    this.reloadview()
  }
  UNSAFE_componentWillMount () {
    // 组件加载时,获取菜单数据
    this.loadconfig()
  }
  UNSAFE_componentWillReceiveProps(nextProps) {
    if (nextProps.refreshTab && nextProps.refreshTab.MenuID === this.props.MenuID) {
      this.reloadview()
      this.props.refreshTabView('')
    }
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
  }
  componentDidMount () {
    MKEmitter.addListener('reloadMenuView', this.reloadMenuView)
  }
  /**
@@ -454,6 +489,7 @@
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('reloadMenuView', this.reloadMenuView)
  }
  reloadview = () => {
@@ -557,10 +593,8 @@
  }
}
const mapDispatchToProps = (dispatch) => {
  return {
    refreshTabView: (refreshTab) => dispatch(refreshTabView(refreshTab))
  }
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(CustomPage)
src/tabviews/custom/index.scss
@@ -28,7 +28,7 @@
  > .ant-spin {
    position: absolute;
    z-index: 10;
    left: calc(50% - 22px);
    left: calc(50% - 16px);
    top: calc(50vh - 70px);
  }
  
src/tabviews/formtab/index.jsx
@@ -11,11 +11,12 @@
import Utils from '@/utils/utils.js'
import options from '@/store/options.js'
import asyncComponent from '@/utils/asyncLoadComponent'
import MKEmitter from '@/utils/events.js'
import FormGroup from './formgroup'
import FormAction from './actionList'
import NotFount from '@/components/404'
import {refreshTabView, modifyTabview} from '@/store/action'
import {modifyTabview} from '@/store/action'
import './index.scss'
const { TabPane } = Tabs
@@ -25,7 +26,6 @@
  static propTpyes = {
    MenuID: PropTypes.string,       // 菜单Id
    param: PropTypes.any,           // 主表传递参数
    refresh: PropTypes.any          // 刷新主表页面
  }
  state = {
@@ -40,14 +40,8 @@
    arr_field: '',        // 使用 sPC_Get_TableData 时的查询字段集
    setting: null,        // 页面全局设置:数据源、按钮及显示列固定、主键等
    data: null,           // 列表数据集
    configMap: {},        // 页面配置信息:下拉、按钮等
    BIDs: {},             // 上级表id
    setsingle: false,     // 主表单选多选切换
    pickup: false,        // 主表数据隐藏显示切换
    popData: false,       // 弹框页面,所选的表格数据
    visible: false,       // 弹框显示隐藏控制
    primaryId: null,
    refreshtabs: null
  }
  /**
@@ -503,7 +497,7 @@
      this.setState({
        primaryId: primaryId
      }, () => {
        if (btn.execSuccess === 'refresh') {
        if (btn.execSuccess === 'refresh' || btn.execSuccess === 'grid') {
          this.loadmaindata()
        } else {
          let data = {}
@@ -524,53 +518,39 @@
        }
      })
    } else if (type === 'success' && btn.afterExecSuccess === 'close') {
      if (this.props.refresh) {
        this.props.refresh(btn.execSuccess)
      } else {
        if (btn.execSuccess !== 'never') {
          let PMenu = {
            MenuID: this.props.param.parentId || ''
          }
          this.props.refreshTabView(PMenu)
      if (btn.execSuccess !== 'never') {
        MKEmitter.emit('reloadData', this.props.param.parentId, 'formtab', btn)
      }
      let tabs = this.props.tabviews.filter(tab => {
        tab.selected = false
        if (tab.MenuID === this.props.param.parentId) {
          tab.selected = true
        }
        let tabs = this.props.tabviews.filter(tab => {
          tab.selected = false
          if (tab.MenuID === this.props.param.parentId) {
            tab.selected = true
          }
        return tab.MenuID !== this.props.MenuID
      })
          return tab.MenuID !== this.props.MenuID
        })
        this.props.modifyTabview(tabs)
      }
      this.props.modifyTabview(tabs)
    } else if (type === 'error' && btn.afterExecError === 'notclose') {
      if (btn.execError === 'refresh') {
        this.loadmaindata()
      }
    } else if (type === 'error' && btn.afterExecError === 'close') {
      if (this.props.refresh) {
        this.props.refresh(btn.execError)
      } else {
        if (btn.execError !== 'never') {
          let PMenu = {
            MenuID: this.props.param.parentId || '',
          }
          this.props.refreshTabView(PMenu)
      if (btn.execError !== 'never') {
        MKEmitter.emit('reloadData', this.props.param.parentId, 'formtab', btn)
      }
      let tabs = this.props.tabviews.filter(tab => {
        tab.selected = false
        if (tab.MenuID === this.props.param.parentId) {
          tab.selected = true
        }
        let tabs = this.props.tabviews.filter(tab => {
          tab.selected = false
          if (tab.MenuID === this.props.param.parentId) {
            tab.selected = true
          }
        return tab.MenuID !== this.props.MenuID
      })
          return tab.MenuID !== this.props.MenuID
        })
        this.props.modifyTabview(tabs)
      }
      this.props.modifyTabview(tabs)
    }
  }
@@ -590,31 +570,6 @@
  }
  /**
   * @description 子表操作完成后刷新主表
   */
  handleMainTable = (type, tab) => {
    if ((type === 'maingrid' || type === 'mainline') && tab.supMenu === 'mainTable') {
      this.loadmaindata()
    } else if ((type === 'maingrid' || type === 'mainline') && tab.supMenu) {
      this.setState({
        refreshtabs: [type, tab.supMenu]
      }, () => {
        this.setState({
          refreshtabs: null
        })
      })
    } else if (type === 'equaltab' && tab.equalTab && tab.equalTab.length > 0) {
      this.setState({
        refreshtabs: tab.equalTab
      }, () => {
        this.setState({
          refreshtabs: null
        })
      })
    }
  }
  /**
   * @description 获取表单参数
   */
  getFormData = () => {
@@ -629,20 +584,29 @@
      config: {},
      groups: null,
      actions: null,
      arr_field: '',
      setting: null,
      data: null,
      configMap: {},
      BIDs: {},
      setsingle: false,
      pickup: false,
      popData: false,
      visible: false,
      primaryId: null,
      refreshtabs: null
    }, () => {
      this.loadconfig()
    })
  }
  reloadMenuView = (menuId) => {
    const { MenuID } = this.props
    if (MenuID !== menuId) return
    this.reloadview()
  }
  reloadData = (menuId) => {
    const { MenuID } = this.props
    if (MenuID !== menuId) return
    this.loadmaindata()
  }
  UNSAFE_componentWillMount () {
@@ -650,15 +614,13 @@
    this.loadconfig()
  }
  UNSAFE_componentWillReceiveProps(nextProps) {
    if (nextProps.refreshTab && nextProps.refreshTab.MenuID === this.props.MenuID) {
      this.reloadview()
      this.props.refreshTabView('')
    }
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
  }
  componentDidMount () {
    MKEmitter.addListener('reloadMenuView', this.reloadMenuView)
    MKEmitter.addListener('reloadData', this.reloadData)
  }
  /**
@@ -668,6 +630,9 @@
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('reloadMenuView', this.reloadMenuView)
    MKEmitter.removeListener('reloadData', this.reloadData)
  }
  render() {
@@ -722,12 +687,10 @@
                          Tab={_tab}
                          MenuID={_tab.linkTab}
                          SupMenuID={this.props.MenuID}
                          refreshtabs={this.state.refreshtabs}
                          ContainerId={this.state.ContainerId}
                          BID={this.state.BIDs[_tab.supMenu] || ''}
                          BData={this.state.BIDs[_tab.supMenu + 'data'] || ''}
                          handleTableId={this.handleTableId}
                          handleMainTable={(type) => this.handleMainTable(type, _tab)}
                        /> : null}
                    </TabPane>
                  )
@@ -746,7 +709,6 @@
  return {
    menuType: state.editLevel,
    tabviews: state.tabviews,
    refreshTab: state.refreshTab,
    permAction: state.permAction,
    dataManager: state.dataManager,
    permRoles: state.permRoles
@@ -755,7 +717,6 @@
const mapDispatchToProps = (dispatch) => {
  return {
    refreshTabView: (refreshTab) => dispatch(refreshTabView(refreshTab)),
    modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews))
  }
}
src/tabviews/subtable/index.jsx
@@ -36,8 +36,6 @@
    mainSearch: PropTypes.any,       // 主表搜索条件
    ContainerId: PropTypes.any,      // 三级菜单Container(html) ID
    handleTableId: PropTypes.func,   // 控制表格数据切换时,更新在主表中的id
    handleMainTable: PropTypes.func, // 刷新主表
    refreshtabs: PropTypes.any,      // 标签刷新控制
    userConfig: PropTypes.any,       // 用户自定义设置
  }
@@ -81,8 +79,6 @@
          this.getStatFieldsValue(nextProps.BID, 'refresh')
        }
      })
    } else if (this.state.config && nextProps.refreshtabs && nextProps.refreshtabs.includes(this.props.Tab.uuid)) {
      this.reloadtable()
    } else if (!this.props.Tab.supMenu && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) {
      if (this.state.setting) {
        this.setState({}, () => {
@@ -464,6 +460,65 @@
  }
  /**
   * @description 获取单行数据
   */
  async loadmainLinedata (id) {
    const { mainSearch, BID } = this.props
    const { setting, arr_field, search, orderBy, pageIndex, pageSize } = this.state
    let searches = fromJS(search).toJS()
    if (mainSearch && mainSearch.length > 0) { // 主表搜索条件
      searches = [...mainSearch, ...searches]
    }
    this.setState({
      loading: true
    })
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, this.props.menuType, this.props.dataManager, id)
    if (param.func === 'sPC_Get_TableData') {
      param.menuname = this.props.Tab.label || ''
    }
    let result = await Api.genericInterface(param)
    if (result.status) {
      let data = fromJS(this.state.data).toJS()
      if (result.data && result.data[0]) {
        let _data = result.data[0]
        try {
          data = data.map(item => {
            if (item[setting.primaryKey] === _data[setting.primaryKey]) {
              _data.key = item.key
              return _data
            } else {
              return item
            }
          })
        } catch {
          console.warn('数据查询错误')
        }
      }
      this.setState({
        data: data,
        loading: false
      })
    } else {
      this.setState({
        loading: false
      })
      notification.error({
        top: 92,
        message: result.message,
        duration: 10
      })
    }
  }
  /**
   * @description 获取合计字段值
   */
  getStatFieldsValue = (bid, type) => {
@@ -573,49 +628,44 @@
  /**
   * @description 表格刷新
   */
  reloadtable = () => {
    MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 列表重置
    this.setState({
      pageIndex: 1
    }, () => {
  reloadtable = (btn) => {
    if (!btn || btn.resetPageIndex !== 'false') {
      MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 列表重置
      this.setState({
        pageIndex: 1
      }, () => {
        this.loadmaindata()
        this.getStatFieldsValue()
      })
    } else {
      MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid, 'false') // 列表重置
      this.loadmaindata()
      this.getStatFieldsValue()
    })
  }
  /**
   * @description 页面刷新,重新获取配置
   */
  reloadview = () => {
    this.setState({ loadingview: true, viewlost: false, lostmsg: '', config: null, searchlist: null, actions: null,
      columns: null, arr_field: '', setting: null, data: null, total: 0, loading: false, pageIndex: 1, pageSize: 10,
      orderBy: '', search: []
    }, () => {
      this.loadconfig()
    })
    }
  }
  /**
   * @description 按钮操作完成后(成功或失败),页面刷新,重置页码及选择项
   */
  refreshbyaction = (position) => {
    const { Tab } = this.props
  refreshbyaction = (position, btn) => {
    const { Tab, SupMenuID, BID } = this.props
    if (position === 'grid') {
      this.reloadtable()
    } else if (position === 'view') {
      this.reloadview()
    } else if (position === 'maingrid') {
      if (Tab.isTreeNode) {
        this.reloadtable()
    if (position === 'grid' || position === 'view') {
      this.reloadtable(btn)
    } else if (position === 'maingrid' || position === 'mainline') {
      this.reloadtable(btn)
      if (Tab.supMenu === 'mainTable') {
        MKEmitter.emit('reloadData', SupMenuID, (BID || 'empty'))   // 主表重置
      } else if (Tab.supMenu) {
        MKEmitter.emit('reloadData', Tab.supMenu, (BID || 'empty')) // 主表重置
      } else if (!Tab.supMenu && Tab.level === 0) {
        MKEmitter.emit('reloadData', SupMenuID, (BID || 'empty'))   // 树形结构,0级标签
      }
      this.props.handleMainTable('maingrid')
    } else if (position === 'equaltab') {
      this.reloadtable()
      this.props.handleMainTable('equaltab')
    } else if (position === 'mainline') {
      this.reloadtable()
      this.props.handleMainTable('mainline')
      this.reloadtable(btn)
      if (Tab.equalTab && Tab.equalTab.length > 0) {
        MKEmitter.emit('reloadData', Tab.equalTab.join(',')) // 同级标签重置
      }
    }
  }
@@ -671,13 +721,30 @@
    this.setState({chartId: uuid})
  }
  reloadData = (menuId, id) => {
    const { MenuID } = this.props
    if (menuId.indexOf(MenuID) === -1) return
    if (id === 'empty') return
    if (!id) {
      this.reloadtable()
    } else {
      this.loadmainLinedata(id)
    }
  }
  UNSAFE_componentWillMount() {
    // 组件加载时,获取菜单数据
    this.loadconfig()
  }
  shouldComponentUpdate (nextProps, nextState) { // handleMainTable 函数判断时不相等
    return !is(fromJS({...this.props, handleMainTable: '', handleTableId: ''}), fromJS({...nextProps, handleMainTable: '', handleTableId: ''})) || !is(fromJS(this.state), fromJS(nextState))
  shouldComponentUpdate (nextProps, nextState) { // handleTableId 函数判断时不相等
    return !is(fromJS({...this.props, handleTableId: ''}), fromJS({...nextProps, handleTableId: ''})) || !is(fromJS(this.state), fromJS(nextState))
  }
  componentDidMount () {
    MKEmitter.addListener('reloadData', this.reloadData)
  }
  /**
@@ -687,6 +754,7 @@
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('reloadData', this.reloadData)
  }
  render() {
src/tabviews/subtabtable/index.jsx
@@ -473,14 +473,21 @@
  /**
   * @description 表格刷新
   */
  reloadtable = () => {
    MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 列表重置
    this.setState({
      pageIndex: 1
    }, () => {
  reloadtable = (btn) => {
    if (!btn || btn.resetPageIndex !== 'false') {
      MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 列表重置
      this.setState({
        pageIndex: 1
      }, () => {
        this.loadmaindata()
        this.getStatFieldsValue()
      })
    } else {
      MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid, 'false') // 列表重置
      this.loadmaindata()
      this.getStatFieldsValue()
    })
    }
  }
  /**
@@ -491,25 +498,11 @@
  }
  /**
   * @description 页面刷新,重新获取配置
   */
  reloadview = () => {
    this.setState({ loadingview: true, viewlost: false, lostmsg: '', config: null, searchlist: null, actions: null, columns: null,
      arr_field: '', setting: null, data: null, total: 0, loading: false, pageIndex: 1, pageSize: 10, orderBy: '', search: ''
    }, () => {
      this.loadconfig()
    })
  }
  /**
   * @description 按钮操作完成后(成功或失败),页面刷新,重置页码及选择项
   */
  refreshbyaction = (position) => {
    if (position === 'grid' || position === 'maingrid') {
      this.reloadtable()
      this.props.refreshSupView()
    } else if (position === 'view') {
      this.reloadview()
  refreshbyaction = (position, btn) => {
    if (position === 'grid' || position === 'view' || position === 'maingrid') {
      this.reloadtable(btn)
      this.props.refreshSupView()
    } else if (position === 'trigger') { // 日历子表触发标签点击事件
      this.props.closeModalView && this.props.closeModalView()
src/tabviews/treepage/index.jsx
@@ -13,8 +13,6 @@
import MKEmitter from '@/utils/events.js'
import asyncComponent from '@/utils/asyncComponent'
import asyncSpinComponent from '@/utils/asyncSpinComponent'
import {refreshTabView, modifyTabview} from '@/store/action'
import NotFount from '@/components/404'
import './index.scss'
@@ -51,7 +49,6 @@
    BIDs: {},             // 上级表id
    visible: false,       // 弹框显示隐藏控制
    treevisible: false,   // 菜单结构树弹框显示隐藏控制
    refreshtabs: null,    // 需要刷新的标签集
    confirmLoading: false,// 自定义设置模态框加载中
    revertLoading: false, // 恢复默认设置
    settingVisible: false,// 自定义设置模态框
@@ -483,33 +480,6 @@
  }
  /**
   * @description 子表操作完成后刷新主表
   */
  handleMainTable = (type, tab) => {
    if (type === 'maingrid' && (tab.supMenu === 'mainTable' || (!tab.supMenu && tab.level === 0))) {
      this.loadmaindata()
    } else if (type === 'mainline' && (tab.supMenu === 'mainTable' || (!tab.supMenu && tab.level === 0))) {
      this.loadmaindata()
    } else if ((type === 'maingrid' || type === 'mainline') && tab.supMenu) {
      this.setState({
        refreshtabs: [type, tab.supMenu]
      }, () => {
        this.setState({
          refreshtabs: null
        })
      })
    } else if (type === 'equaltab' && tab.equalTab && tab.equalTab.length > 0) {
      this.setState({
        refreshtabs: tab.equalTab
      }, () => {
        this.setState({
          refreshtabs: null
        })
      })
    }
  }
  /**
   * @description 表格Id变化
   */
  handleTableId = (type, id, data) => {
@@ -676,25 +646,43 @@
    })
  }
  reloadData = (menuId) => {
    const { MenuID } = this.props
    if (MenuID !== menuId) return
    this.loadmaindata()
  }
  reloadMenuView = (menuId) => {
    const { MenuID } = this.props
    if (MenuID !== menuId) return
    this.reloadview()
  }
  resetActiveMenu = (menuId) => {
    const { MenuID } = this.props
    if (MenuID !== menuId) return
    this.setShortcut()
  }
  UNSAFE_componentWillMount () {
    // 组件加载时,获取菜单数据
    this.loadconfig()
  }
  UNSAFE_componentWillReceiveProps(nextProps) {
    if (nextProps.refreshTab && nextProps.refreshTab.MenuID === this.props.MenuID) {
      this.reloadview()
      this.props.refreshTabView('')
    } else if (!is(fromJS(this.props.tabviews), fromJS(nextProps.tabviews))) {
      let selectTab = nextProps.tabviews.filter(tab => tab.selected)[0]
      if (selectTab && selectTab.MenuID === this.props.MenuID) {
        this.setShortcut()
      }
    }
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
  }
  componentDidMount () {
    MKEmitter.addListener('reloadData', this.reloadData)
    MKEmitter.addListener('reloadMenuView', this.reloadMenuView)
    MKEmitter.addListener('resetActiveMenu', this.resetActiveMenu)
  }
  /**
@@ -705,6 +693,9 @@
      return
    }
    document.onkeydown = () => {}
    MKEmitter.removeListener('reloadData', this.reloadData)
    MKEmitter.removeListener('reloadMenuView', this.reloadMenuView)
    MKEmitter.removeListener('resetActiveMenu', this.resetActiveMenu)
  }
  changeExpandedKeys = (expandedKeys) => {
@@ -791,12 +782,10 @@
                          mainSearch={null}
                          userConfig={userConfig ? userConfig[_tab.uuid] : null}
                          SupMenuID={this.props.MenuID}
                          refreshtabs={this.state.refreshtabs}
                          ContainerId={this.state.ContainerId}
                          BID={this.state.BIDs[_tab.supMenu] || ''}
                          BData={this.state.BIDs[_tab.supMenu + 'data'] || ''}
                          handleTableId={this.handleTableId}
                          handleMainTable={(type) => this.handleMainTable(type, _tab)}
                        /> : null}
                    </TabPane>
                  )
@@ -868,8 +857,6 @@
const mapStateToProps = (state) => {
  return {
    menuType: state.editLevel,
    tabviews: state.tabviews,
    refreshTab: state.refreshTab,
    permAction: state.permAction,
    permRoles: state.permRoles,
    memberLevel: state.memberLevel,
@@ -877,11 +864,8 @@
  }
}
const mapDispatchToProps = (dispatch) => {
  return {
    refreshTabView: (refreshTab) => dispatch(refreshTabView(refreshTab)),
    modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews))
  }
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(TreePage)
src/tabviews/zshare/actionList/index.jsx
@@ -41,9 +41,9 @@
    return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
  }
  updateStatus = (type, positon) => {
  updateStatus = (type, positon, btn) => {
    if (type === 'refresh') {
      this.props.refreshdata(positon)
      this.props.refreshdata(positon, btn)
    } else if (type === 'trigger') { // 日历中的新标签页触发事件
      this.props.refreshdata('trigger')
    }
src/tabviews/zshare/actionList/popupbutton/index.jsx
@@ -115,7 +115,8 @@
  // 操作后刷新主表
  reloadtable = () => {
    this.props.updateStatus('refresh', 'grid')
    const { btn } = this.props
    this.props.updateStatus('refresh', 'grid', btn)
  }
  /**
src/tabviews/zshare/cardcomponent/index.jsx
@@ -147,7 +147,7 @@
            columns={logcolumns}
            selectedData={[data]}
            ContainerId={ContainerId}
            updateStatus={this.updateStatus}
            updateStatus={this.props.refreshdata}
          />
        )
      } else if (item.OpenType === 'popview') {
@@ -161,7 +161,7 @@
            BData={BData}
            setting={setting}
            selectedData={[data]}
            updateStatus={this.updateStatus}
            updateStatus={this.props.refreshdata}
          />
        )
      } else if (item.OpenType === 'tab' || item.OpenType === 'blank') {
@@ -173,7 +173,7 @@
            MenuID={MenuID}
            setting={setting}
            selectedData={[data]}
            updateStatus={this.updateStatus}
            updateStatus={this.props.refreshdata}
          />
        )
      } else if (item.OpenType === 'innerpage' || item.OpenType === 'outerpage') {
@@ -184,7 +184,7 @@
            show={show}
            setting={setting}
            selectedData={[data]}
            updateStatus={this.updateStatus}
            updateStatus={this.props.refreshdata}
          />
        )
      } else if (item.OpenType === 'funcbutton') {
@@ -197,7 +197,7 @@
              show={show}
              setting={setting}
              selectedData={[data]}
              updateStatus={this.updateStatus}
              updateStatus={this.props.refreshdata}
            />
          )
        } else if (item.funcType === 'print') {
@@ -212,7 +212,7 @@
              setting={setting}
              selectedData={[data]}
              ContainerId={ContainerId}
              updateStatus={this.updateStatus}
              updateStatus={this.props.refreshdata}
            />
          )
        }
@@ -220,15 +220,6 @@
      return null
    })
  }
  /**
   * @description 操作完成后,数据刷新
   */
  updateStatus = (type, positon) => {
    if (type === 'refresh') {
      this.props.refreshdata(positon)
    }
  }
  /**
@@ -511,7 +502,7 @@
              columns={this.props.logcolumns}
              selectedData={[]}
              ContainerId={this.props.ContainerId}
              updateStatus={this.updateStatus}
              updateStatus={this.props.refreshdata}
            />
          </div>
        </Card> : null}
@@ -761,6 +752,15 @@
    this.props.handleTableId(this.props.tableId, _id, data)
  }
  /**
   * @description 操作完成后,数据刷新
   */
  updateStatus = (type, positon, btn) => {
    if (type === 'refresh') {
      this.props.refreshdata(positon, btn)
    }
  }
  render() {
    const { plot, data, loading, BID, BData, Tab, MenuID, config, logcolumns, ContainerId, MenuName } = this.props
    const { card, colMap, selectKey, actionList } = this.state
@@ -787,7 +787,7 @@
                    show="icon"
                    MenuName={MenuName}
                    setting={config.setting}
                    updateStatus={() => {}}
                    updateStatus={this.updateStatus}
                  />
                )
              } else {
@@ -801,7 +801,7 @@
                    MenuName={MenuName}
                    setting={config.setting}
                    getexceloutparam={this.props.getexceloutparam}
                    updateStatus={() => {}}
                    updateStatus={this.updateStatus}
                  />
                )
              }
@@ -826,7 +826,7 @@
              setting={config.setting}
              ContainerId={ContainerId}
              switchCard={this.switchCard}
              refreshdata={this.props.refreshdata}
              refreshdata={this.updateStatus}
            />
          ))
        }
@@ -844,7 +844,7 @@
            setting={config.setting}
            ContainerId={ContainerId}
            switchCard={() => {}}
            refreshdata={this.props.refreshdata}
            refreshdata={this.updateStatus}
          /> : null
        }
        {(loading || !card.insertAction) && (!data || data.length === 0) ? <Empty description={false}/> : null}
src/tabviews/zshare/normalTable/index.jsx
@@ -45,7 +45,7 @@
    refreshdata: PropTypes.func,     // 表格中排序列、页码的变化时刷新
    handleTableId: PropTypes.func,   // 数据切换
    chgSelectData: PropTypes.func,   // 数据切换
    refreshbyaction: PropTypes.func, // 数据切换
    refreshbyaction: PropTypes.func, // 按钮执行完成后刷新
  }
  state = {
@@ -200,6 +200,12 @@
      return
    }
    MKEmitter.removeListener('resetTable', this.resetTable)
  }
  updateStatus = (type, positon, btn) => {
    if (type === 'refresh') {
      this.props.refreshbyaction(positon, btn)
    }
  }
  // 字段透视
@@ -604,7 +610,7 @@
                  MenuName={this.props.MenuName}
                  columns={this.props.logcolumns}
                  ContainerId={this.props.ContainerId}
                  updateStatus={this.props.refreshbyaction}
                  updateStatus={this.updateStatus}
                />
              )
            } else if (btn.OpenType === 'popview') {
@@ -616,7 +622,7 @@
                  selectedData={[record]}
                  BData={this.props.BData}
                  setting={this.props.setting}
                  updateStatus={this.props.refreshbyaction}
                  updateStatus={this.updateStatus}
                />
              )
            } else if (btn.OpenType === 'tab' || btn.OpenType === 'blank') {
@@ -627,7 +633,7 @@
                  selectedData={[record]}
                  MenuID={this.props.MenuID}
                  setting={this.props.setting}
                  updateStatus={this.props.refreshbyaction}
                  updateStatus={this.updateStatus}
                />
              )
            } else if (btn.OpenType === 'innerpage' || btn.OpenType === 'outerpage') {
@@ -637,7 +643,7 @@
                  btn={btn}
                  selectedData={[record]}
                  setting={this.props.setting}
                  updateStatus={this.props.refreshbyaction}
                  updateStatus={this.updateStatus}
                />
              )
            }
@@ -988,16 +994,23 @@
    this.props.handleTableId(this.props.tableId, _id, _data)
  }
  resetTable = (id) => {
  resetTable = (id, repage) => {
    const { MenuID, tableId } = this.props
    if (id !== (MenuID + tableId)) return
    this.setState({
      pageIndex: 1,
      selectedRowKeys: [],
      activeIndex: null
    })
    if (repage === 'false') {
      this.setState({
        selectedRowKeys: [],
        activeIndex: null
      })
    } else {
      this.setState({
        pageIndex: 1,
        selectedRowKeys: [],
        activeIndex: null
      })
    }
  }
  render() {
src/templates/formtabconfig/actionform/index.jsx
@@ -38,10 +38,7 @@
      text: this.props.dict['header.form.refresh.never']
    }, {
      value: 'grid',
      text: this.props.dict['header.form.refresh.grid']
    }, {
      value: 'view',
      text: this.props.dict['header.form.refresh.view']
      text: this.props.dict['header.form.refresh']
    }],
    currentoptions: [{ // 不返回时-不刷新、刷新
      value: 'never',
@@ -56,8 +53,6 @@
  UNSAFE_componentWillMount () {
    const { card } = this.props
    let _intertype = ''
    let _success = 'close'
    let _error = 'notclose'
    this.props.formlist.forEach(form => {
      if (form.key === 'intertype') {
@@ -65,10 +60,6 @@
        if (card.btnType !== 'confirm') {
          form.options = form.options.filter(op => op.value !== 'system')
        }
      } else if (form.key === 'afterExecSuccess') {
        _success = form.initVal
      } else if (form.key === 'afterExecError') {
        _error = form.initVal
      }
    })
@@ -80,6 +71,8 @@
          item.options = btnClasses
        } else if (item.key === 'icon') {
          item.options = btnIcons
        } else if (item.key === 'resetPageIndex') {
          item.tooltip = '页面关闭,且执行刷新时生效'
        } else if (item.key === 'sqlType') {
          item.options = this.state.insertUpdateOptions
        } else if (item.key === 'OpenType') {
@@ -97,18 +90,9 @@
          }
        } else if (item.key === 'execSuccess' && card.btnType === 'cancel') {
          item.label = '关闭后'
        } else if (item.key === 'execSuccess' && card.btnType !== 'cancel') {
          if (_success === 'close') {
            item.options = this.state.returnoptions
          } else {
            item.options = this.state.currentoptions
          }
        } else if (item.key === 'execError') {
          if (_error === 'close') {
            item.options = this.state.returnoptions
          } else {
            item.options = this.state.currentoptions
          }
          item.options[1].text = '刷新'
        } else if (item.key === 'execSuccess' || item.key === 'execError') {
          item.options[1].text = '刷新'
        } else if (item.key === 'innerFunc' && card.btnType !== 'confirm' && _intertype === 'inner') {
          item.required = true
        }
@@ -136,62 +120,24 @@
    let _options = []
    if (btnType === 'cancel') {
      _options = ['label', 'OpenType', 'icon', 'class', 'execSuccess']
      _options = ['label', 'OpenType', 'icon', 'class', 'execSuccess', 'resetPageIndex']
    } else if (btnType === 'confirm') {
      if (intertype === 'outer') {
        _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'sysInterface', 'icon', 'class', 'execSuccess', 'execError', 'afterExecSuccess', 'afterExecError']
        _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'sysInterface', 'icon', 'class', 'execSuccess', 'execError', 'afterExecSuccess', 'afterExecError', 'resetPageIndex']
      } else if (intertype === 'system') {
        _options = ['label', 'OpenType', 'intertype', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType', 'afterExecSuccess', 'afterExecError']
        _options = ['label', 'OpenType', 'intertype', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType', 'afterExecSuccess', 'afterExecError', 'resetPageIndex']
      } else {
        _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError', 'afterExecSuccess', 'afterExecError']
        _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError', 'afterExecSuccess', 'afterExecError', 'resetPageIndex']
      }
    } else {
      if (intertype === 'outer') {
        _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'sysInterface', 'icon', 'class', 'execSuccess', 'execError', 'afterExecSuccess', 'afterExecError']
        _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'sysInterface', 'icon', 'class', 'execSuccess', 'execError', 'afterExecSuccess', 'afterExecError', 'resetPageIndex']
      } else {
        _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError', 'afterExecSuccess', 'afterExecError']
        _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError', 'afterExecSuccess', 'afterExecError', 'resetPageIndex']
      }
    }
    return _options
  }
  selectChange = (key, value) => {
    if (key === 'afterExecSuccess') {
      this.setState({
        formlist: this.state.formlist.map(item => {
          if (item.key === 'execSuccess') {
            if (value === 'close') {
              item.options = this.state.returnoptions
            } else {
              item.options = this.state.currentoptions
            }
          }
          return item
        })
      })
      this.props.form.setFieldsValue({
        execSuccess: 'never'
      })
    } else if (key === 'afterExecError') {
      this.setState({
        formlist: this.state.formlist.map(item => {
          if (item.key === 'execError') {
            if (value === 'close') {
              item.options = this.state.returnoptions
            } else {
              item.options = this.state.currentoptions
            }
          }
          return item
        })
      })
      this.props.form.setFieldsValue({
        execError: 'never'
      })
    }
  }
  onChange = (e, key) => {
@@ -339,7 +285,6 @@
                  showSearch
                  filterOption={(input, option) => option.props.children[2].toLowerCase().indexOf(input.toLowerCase()) >= 0}
                  getPopupContainer={() => document.getElementById('winter')}
                  onChange={(val) => this.selectChange(item.key, val)}
                  disabled={!!item.readonly}
                >
                  {item.options.map((option, index) =>
@@ -355,7 +300,12 @@
      } else if (item.type === 'radio') {
        fields.push(
          <Col span={12} key={index}>
            <Form.Item label={item.label}>
            <Form.Item label={item.tooltip ?
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            }>
              {getFieldDecorator(item.key, {
                initialValue: item.initVal,
                rules: [
src/templates/sharecomponent/actioncomponent/actionform/index.jsx
@@ -204,6 +204,10 @@
      }
    }
    if (_options.includes('execSuccess') || _options.includes('popClose')) {
      _options.push('resetPageIndex')
    }
    return _options
  }
src/templates/zshare/formconfig.jsx
@@ -633,6 +633,16 @@
    tabTems = []
  }
  if (card.execSuccess === 'view' || card.execSuccess === 'refresh') { // refresh为表单标签页
    card.execSuccess = 'grid'
  }
  if (card.execError === 'view' || card.execSuccess === 'refresh') {
    card.execError = 'grid'
  }
  if (card.popClose === 'view') {
    card.popClose = 'grid'
  }
  let refresh = []
  if (type === 'subtable') { // 子表页面,可设置刷新主表及同级标签
    refresh.push({
@@ -641,9 +651,6 @@
    }, {
      value: 'equaltab',
      text: Formdict['header.form.refresh.equaltab']
    // }, {
    //   value: 'mainline',
    //   text: Formdict['header.form.refresh.mainline']
    })
  }
@@ -878,7 +885,7 @@
      options: menulist
    },
    {
      type: 'select',
      type: 'radio',
      key: 'afterExecSuccess',
      label: Formdict['header.form.afterExecSuccess'],
      initVal: card.afterExecSuccess || 'close',
@@ -892,7 +899,7 @@
      }]
    },
    {
      type: 'select',
      type: 'radio',
      key: 'afterExecError',
      label: Formdict['header.form.afterExecError'],
      initVal: card.afterExecError || 'notclose',
@@ -906,7 +913,7 @@
      }]
    },
    {
      type: 'select',
      type: refresh.length === 0 ? 'radio' : 'select',
      key: 'execSuccess',
      label: Formdict['model.form.afterSuccess'],
      initVal: card.execSuccess || 'never',
@@ -917,14 +924,11 @@
      }, {
        value: 'grid',
        text: Formdict['header.form.refresh.grid']
      }, {
        value: 'view',
        text: Formdict['header.form.refresh.view']
      },
      ...refresh]
    },
    {
      type: 'select',
      type: refresh.length === 0 ? 'radio' : 'select',
      key: 'execError',
      label: Formdict['model.form.afterError'],
      initVal: card.execError || 'never',
@@ -935,13 +939,11 @@
      }, {
        value: 'grid',
        text: Formdict['header.form.refresh.grid']
      }, {
        value: 'view',
        text: Formdict['header.form.refresh.view']
      }]
      },
      ...refresh]
    },
    {
      type: 'select',
      type: refresh.length === 0 ? 'radio' : 'select',
      key: 'popClose',
      label: Formdict['header.form.popClose'],
      initVal: card.popClose || 'never',
@@ -952,13 +954,24 @@
      }, {
        value: 'grid',
        text: Formdict['header.form.refresh.grid']
      }, {
        value: 'view',
        text: Formdict['header.form.refresh.view']
      },
      ...refresh]
    },
    {
      type: 'radio',
      key: 'resetPageIndex',
      label: '刷新时',
      initVal: card.resetPageIndex || 'true',
      required: false,
      options: [{
        value: 'true',
        text: '重置页码'
      }, {
        value: 'false',
        text: '不重置'
      }]
    },
    {
      type: 'select',
      key: 'icon',
      label: Formdict['model.icon'],
src/utils/utils-datamanage.js
@@ -16,13 +16,13 @@
   * @param {Boolean}  dataManager  数据权限
   * @return {Object}  param
   */
  static getQueryDataParams (setting, arrFields, search = [], orderBy = '', pageIndex = 1, pageSize = 10, BID, menuType, dataManager) {
  static getQueryDataParams (setting, arrFields, search = [], orderBy = '', pageIndex = 1, pageSize = 10, BID, menuType, dataManager, id) {
    let param = null
    if (setting.interType === 'system' || (setting.interType === 'inner' && !setting.innerFunc)) {
      param = this.getDefaultQueryParam(setting, arrFields, search, orderBy, pageIndex, pageSize, menuType)
      param = this.getDefaultQueryParam(setting, arrFields, search, orderBy, pageIndex, pageSize, menuType, id)
    } else {
      param = this.getCustomQueryParam(setting, search, orderBy, pageIndex, pageSize, menuType)
      param = this.getCustomQueryParam(setting, search, orderBy, pageIndex, pageSize, menuType, id)
    }
    if (BID) {
@@ -39,14 +39,16 @@
  /**
   * @description 获取用户自定义存储过程传参
   */
  static getCustomQueryParam (setting, search, orderBy, pageIndex, pageSize, menuType) {
  static getCustomQueryParam (setting, search, orderBy, pageIndex, pageSize, menuType, id) {
    let param = Utils.formatCustomMainSearch(search)
    if (orderBy) {
      param.OrderCol = orderBy
    }
    if (setting.laypage) {
    if (id) {
      param.ID = id
    } else if (setting.laypage) {
      param.PageIndex = pageIndex
      param.PageSize = pageSize
    }
@@ -79,7 +81,7 @@
  /**
   * @description 获取系统存储过程 sPC_Get_TableData 的参数
   */
  static getDefaultQueryParam (setting, arrFields, search, orderBy, pageIndex, pageSize, menuType) {
  static getDefaultQueryParam (setting, arrFields, search, orderBy, pageIndex, pageSize, menuType, id) {
    let param = {
      func: 'sPC_Get_TableData',
      obj_name: 'data',
@@ -137,11 +139,14 @@
      regoptions.forEach(item => {
        _dataresource = _dataresource.replace(item.reg, item.value)
      })
    } else if (_dataresource) {
    } else if (_dataresource && !id) {
      _search = Utils.joinMainSearchkey(search)
      if (_search) {
        _search = 'where ' + _search
      }
    } else if (_dataresource && id) {
      _search = Utils.joinMainSearchkey(search)
      _search = `where ${_search ? _search + ' AND ' : ''} ${setting.primaryKey || 'ID'}='${id}'`
    }
    if (_customScript) {
@@ -153,7 +158,7 @@
    let LText = ''
    let DateCount = ''
    if (_dataresource && setting.laypage && orderBy) {
    if (_dataresource && setting.laypage && orderBy && !id) {
      LText = ` select top ${pageSize} ${arrFields} from (select ${arrFields} ,ROW_NUMBER() over(order by ${orderBy}) as rows from ${_dataresource} ${_search}) tmptable where rows > ${pageSize * (pageIndex - 1)} order by tmptable.rows `
      DateCount = `select count(1) as total from ${_dataresource} ${_search}`
    } else if (_dataresource && orderBy) {
src/views/billprint/index.jsx
@@ -225,6 +225,17 @@
    })
  }
  reload = () => {
    this.setState({
      loadingview: true,
      pages: null,
      data: '',
      config: null
    }, () => {
      this.getMenuParam()
    })
  }
  /**
   * @description 获取系统存储过程 sPC_Get_TableData 的参数
   */
@@ -553,6 +564,7 @@
        </div> : null}
        {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
        {pages && !loadingview && !viewlost ? <div className="print-button"><Button icon="printer" size="large" shape="circle" onClick={this.print}></Button></div> : null}
        {!loadingview && !viewlost ? <div className="refresh-button"><Button icon="reload" size="large" shape="circle" onClick={this.reload}></Button></div> : null}
      </div>
    )
  }
src/views/billprint/index.scss
@@ -14,6 +14,11 @@
  .print-button {
    position: fixed;
    right: 10px;
    top: 45vh;
    top: 40vh;
  }
  .refresh-button {
    position: fixed;
    right: 10px;
    top: calc(40vh + 70px);
  }
}
src/views/login/index.jsx
@@ -70,6 +70,10 @@
    })
  }
  /**
   * @description 账号密码登录
   * @param {Object} param 用户名密码等信息
   */
  async loginsubmit (param) {
    if (options.sysType === 'local' && !window.GLOB.mainSystemApi) { // 业务系统必须设置单点地址
      Modal.warning({
@@ -86,6 +90,9 @@
      sessionStorage.setItem('User_Name', res.UserName)
      sessionStorage.setItem('Full_Name', res.FullName)
      sessionStorage.setItem('avatar', res.icon || '')
      sessionStorage.setItem('dataM', res.dataM ? 'true' : '')
      sessionStorage.setItem('debug', res.debug || '')
      sessionStorage.setItem('role_id', res.role_id || '')
      localStorage.setItem('lang', param.lang || 'zh-CN')
@@ -141,6 +148,9 @@
      sessionStorage.setItem('User_Name', res.UserName)
      sessionStorage.setItem('Full_Name', res.FullName)
      sessionStorage.setItem('avatar', res.icon || '')
      sessionStorage.setItem('dataM', res.dataM ? 'true' : '')
      sessionStorage.setItem('debug', res.debug || '')
      sessionStorage.setItem('role_id', res.role_id || '')
      localStorage.setItem('lang', param.lang || 'zh-CN')
src/views/main/index.jsx
@@ -1,15 +1,33 @@
import React, {Component} from 'react'
import { ConfigProvider } from 'antd'
import { connect } from 'react-redux'
import enUS from 'antd/es/locale/en_US'
import zhCN from 'antd/es/locale/zh_CN'
import Header from '@/components/header'
import Sidemenu from '@/components/sidemenu'
import Tabview from '@/components/tabview'
import { resetDebug, modifyDataManager, initRolesPermission } from '@/store/action'
import './index.scss'
const _locale = localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
class Main extends Component {
  UNSAFE_componentWillMount() {
    if (sessionStorage.getItem('dataM') === 'true') {
      this.props.modifyDataManager(true)
    }
    if (sessionStorage.getItem('debug') === 'true') {
      this.props.resetDebug()
    }
    if (sessionStorage.getItem('role_id')) {
      let roles = sessionStorage.getItem('role_id')
      roles = roles.split(',')
      this.props.initRolesPermission(roles)
    }
  }
  render () {
    return (
      <div className="flex-container">
@@ -23,4 +41,16 @@
  }
}
export default Main
const mapStateToProps = () => {
  return {}
}
const mapDispatchToProps = (dispatch) => {
  return {
    resetDebug: () => dispatch(resetDebug()),
    initRolesPermission: (roles) => dispatch(initRolesPermission(roles)),
    modifyDataManager: (dataManager) => dispatch(modifyDataManager(dataManager))
  }
}
export default connect(mapStateToProps, mapDispatchToProps)(Main)
src/views/menudesign/homeform/index.jsx
New file
@@ -0,0 +1,118 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Radio, Icon, Tooltip, InputNumber } from 'antd'
import './index.scss'
class CustomMenuForm extends Component {
  static propTpyes = {
    dict: PropTypes.object, // 字典项
    config: PropTypes.object,
    updateConfig: PropTypes.func
  }
  // 一二级菜单切换
  selectChange = (key, value) => {
    const { config } = this.props
    if (key === 'cacheUseful') {
      this.props.updateConfig({...config, cacheUseful: value})
    } else if (key === 'diffUser') {
      this.props.updateConfig({...config, diffUser: value})
    } else if (key === 'timeUnit') {
      this.props.updateConfig({...config, timeUnit: value})
    }
  }
  changeCacheDay = (val) => {
    if (typeof(val) !== 'number') {
      val = ''
    }
    this.props.updateConfig({...this.props.config, cacheTime: val})
  }
  render() {
    const { dict, config } = this.props
    const { getFieldDecorator } = this.props.form
    const formItemLayout = {
      labelCol: {
        xs: { span: 24 },
        sm: { span: 8 }
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 }
      }
    }
    return (
      <Form {...formItemLayout} className="custom-menu-form">
        <Row>
          <Col span={24}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="对于不经常性变动的信息,缓存数据有助于提高查询效率。">
                <Icon type="question-circle" />
                缓存数据
              </Tooltip>
            }>
              {getFieldDecorator('cacheUseful', {
                initialValue: config.cacheUseful || 'false'
              })(
                <Radio.Group onChange={(e) => {this.selectChange('cacheUseful', e.target.value)}}>
                  <Radio value="true">使用</Radio>
                  <Radio value="false">不使用</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col>
          {config.cacheUseful === 'true' ? <Col span={24}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="对于不同用户,查询信息是否存在差异。">
                <Icon type="question-circle" />
                区分用户
              </Tooltip>
            }>
              {getFieldDecorator('diffUser', {
                initialValue: config.diffUser || 'true'
              })(
                <Radio.Group onChange={(e) => {this.selectChange('diffUser', e.target.value)}}>
                  <Radio value="true">是</Radio>
                  <Radio value="false">否</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col> : null}
          {config.cacheUseful === 'true' ? <Col span={24}>
            <Form.Item label="单位">
              {getFieldDecorator('timeUnit', {
                initialValue: config.timeUnit || 'day'
              })(
                <Radio.Group onChange={(e) => {this.selectChange('timeUnit', e.target.value)}}>
                  <Radio value="day">天</Radio>
                  <Radio value="hour">小时</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col> : null}
          {config.cacheUseful === 'true' ? <Col span={24}>
            <Form.Item label="时长">
              {getFieldDecorator('cacheTime', {
                initialValue: config.cacheTime,
                rules: [
                  {
                    required: true,
                    message: dict['mob.required.input'] + '时长!'
                  }
                ]
              })(
                <InputNumber min={1} max={config.timeUnit !== 'hour' ? 7 : 23} precision={0} onChange={this.changeCacheDay}/>
              )}
            </Form.Item>
          </Col> : null}
        </Row>
      </Form>
    )
  }
}
export default Form.create()(CustomMenuForm)
src/views/menudesign/homeform/index.scss
New file
@@ -0,0 +1,10 @@
.custom-menu-form {
  .anticon-question-circle {
    color: #c49f47;
    position: relative;
    left: -3px;
  }
  .ant-input-number {
    width: 100%;
  }
}
src/views/menudesign/index.jsx
@@ -23,6 +23,7 @@
const _locale = localStorage.getItem('lang') !== 'en-US' ? antdZhCN : antdEnUS
const MenuForm = asyncComponent(() => import('./menuform'))
const HomeForm = asyncComponent(() => import('./homeform'))
const PrintMenuForm = asyncComponent(() => import('./printmenuform'))
const Header = asyncComponent(() => import('@/menu/header'))
const SourceWrap = asyncComponent(() => import('@/menu/modelsource'))
@@ -187,6 +188,46 @@
    })
  }
  getMenuMessage = () => {
    const { config } = this.state
    let buttons = []
    let _sort = 1
    let traversal = (components) => {
      components.forEach(item => {
        if (item.type === 'tabs') {
          item.subtabs.forEach(tab => {
            traversal(tab.components)
          })
        } else if (item.type === 'card' || (item.type === 'table' && item.subtype === 'tablecard')) {
          item.subcards.forEach(card => {
            card.elements && card.elements.forEach(cell => {
              if (cell.eleType !== 'button') return
              buttons.push(`select '${cell.uuid}' as menuid, '${item.name + '-' + cell.label}' as menuname, '${_sort * 10}' as Sort`)
              _sort++
            })
            card.backElements && card.backElements.forEach(cell => {
              if (cell.eleType !== 'button') return
              buttons.push(`select '${cell.uuid}' as menuid, '${item.name + '-' + cell.label}' as menuname, '${_sort * 10}' as Sort`)
              _sort++
            })
          })
        } else if (item.type === 'line' || item.type === 'bar') {
          item.action && item.action.forEach(btn => {
            buttons.push(`select '${btn.uuid}' as menuid, '${item.name + '-' + btn.label}' as menuname, '${_sort * 10}' as Sort`)
            _sort++
          })
        }
      })
    }
    traversal(config.components)
    return buttons
  }
  submitConfig = () => {
    const { config, openEdition } = this.state
@@ -197,7 +238,14 @@
        duration: 5
      })
      return
    } else if (config.MenuType === 'custom' && (!config.MenuName || !config.MenuNo || !config.fstMenuId || !config.parentId)) {
    } else if (config.MenuType === 'home' && (config.cacheUseful === 'true' && !config.cacheTime)) {
      notification.warning({
        top: 92,
        message: '请完善菜单基本信息!',
        duration: 5
      })
      return
    } else if (config.MenuType === 'custom' && (!config.MenuName || !config.MenuNo || !config.fstMenuId || !config.parentId || (config.cacheUseful === 'true' && !config.cacheTime))) {
      notification.warning({
        top: 92,
        message: '请完善菜单基本信息!',
@@ -216,21 +264,6 @@
    delete _config.sysRoles
    delete _config.tableFields
    let funcs = []
    if (config.MenuType !== 'billPrint') {
      _config.components.forEach(component => {
        if (component.setting && component.setting.innerFunc) {
          funcs.push(`select '${_config.uuid}' as MenuID,'${component.setting.innerFunc}' as ProcName,'${component.setting.name}' as MenuName`)
        }
        if (component.action) {
          component.action.forEach(item => {
            if (!item.innerFunc) return
            funcs.push(`select '${_config.uuid}' as MenuID,'${item.innerFunc}' as ProcName,'${item.label}' as MenuName`)
          })
        }
      })
    }
    let param = {
      func: 'sPC_TrdMenu_AddUpt',
      FstID: _config.fstMenuId || '',
@@ -243,8 +276,8 @@
      MenuName: _config.MenuName || '',
      PageParam: JSON.stringify({Template: 'CustomPage', OpenType: 'newtab'}),
      LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(_config))),
      LText: funcs.join(' union all '),
      LTexttb: '' // 表名
      LText: '',
      LTexttb: ''
    }
    param.LText = Utils.formatOptions(param.LText)
@@ -253,6 +286,28 @@
    if (openEdition) { // 版本管理
      param.open_edition = openEdition
    }
    let btnParam = {             // 添加菜单按钮
      func: 'sPC_Button_AddUpt',
      Type: 40,                  // 添加菜单下的按钮type为40,按钮下的按钮type为60
      ParentID: _config.uuid,
      MenuNo: _config.MenuNo,
      Template: 'CustomPage',
      PageParam: '',
      LongParam: '',
      LText: []
    }
    if (config.MenuType !== 'billPrint') {
      btnParam.LText = this.getMenuMessage()
      btnParam.LText = btnParam.LText.join(' union all ')
      btnParam.LText = Utils.formatOptions(btnParam.LText)
      btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
      btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp)
    } else {
      btnParam.LText = ''
    }
    this.setState({
@@ -468,6 +523,11 @@
                      initMenuList={this.initMenuList}
                      updateConfig={this.updateConfig}
                    /> : null}
                    {config && MenuType === 'home' ? <HomeForm
                      dict={dict}
                      config={config}
                      updateConfig={this.updateConfig}
                    /> : null}
                    {config && MenuType === 'billPrint' ? <PrintMenuForm
                      dict={dict}
                      config={config}
src/views/menudesign/menuform/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { Form, Row, Col, Input, Select, notification } from 'antd'
import { Form, Row, Col, Input, Select, notification, Radio, Icon, Tooltip, InputNumber } from 'antd'
import Api from '@/api'
import './index.scss'
@@ -108,6 +108,12 @@
      })
    } else if (key === 'parentId') {
      this.props.updateConfig({...config, parentId: value})
    } else if (key === 'cacheUseful') {
      this.props.updateConfig({...config, cacheUseful: value})
    } else if (key === 'diffUser') {
      this.props.updateConfig({...config, diffUser: value})
    } else if (key === 'timeUnit') {
      this.props.updateConfig({...config, timeUnit: value})
    }
  }
@@ -126,6 +132,13 @@
    this.props.updateConfig({...this.props.config, easyCode: e.target.value})
  }
  changeCacheDay = (val) => {
    if (typeof(val) !== 'number') {
      val = ''
    }
    this.props.updateConfig({...this.props.config, cacheTime: val})
  }
  render() {
    const { dict, MenuName, MenuNo, config } = this.props
    const { menulist, smenulist } = this.state
@@ -142,7 +155,7 @@
    }
    return (
      <Form {...formItemLayout} className="ant-advanced-search-form">
      <Form {...formItemLayout} className="custom-menu-form">
        <Row>
          <Col span={24}>
            <Form.Item label={dict['mob.menu.first'] + dict['mob.menu']}>
@@ -213,6 +226,67 @@
            </Form.Item>
          </Col>
          <Col span={24}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="对于不经常性变动的信息,缓存数据有助于提高查询效率。">
                <Icon type="question-circle" />
                缓存数据
              </Tooltip>
            }>
              {getFieldDecorator('cacheUseful', {
                initialValue: config.cacheUseful || 'false'
              })(
                <Radio.Group onChange={(e) => {this.selectChange('cacheUseful', e.target.value)}}>
                  <Radio value="true">使用</Radio>
                  <Radio value="false">不使用</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col>
          {config.cacheUseful === 'true' ? <Col span={24}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="对于不同用户,查询信息是否存在差异。">
                <Icon type="question-circle" />
                区分用户
              </Tooltip>
            }>
              {getFieldDecorator('diffUser', {
                initialValue: config.diffUser || 'true'
              })(
                <Radio.Group onChange={(e) => {this.selectChange('diffUser', e.target.value)}}>
                  <Radio value="true">是</Radio>
                  <Radio value="false">否</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col> : null}
          {config.cacheUseful === 'true' ? <Col span={24}>
            <Form.Item label="单位">
              {getFieldDecorator('timeUnit', {
                initialValue: config.timeUnit || 'day'
              })(
                <Radio.Group onChange={(e) => {this.selectChange('timeUnit', e.target.value)}}>
                  <Radio value="day">天</Radio>
                  <Radio value="hour">小时</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col> : null}
          {config.cacheUseful === 'true' ? <Col span={24}>
            <Form.Item label="时长">
              {getFieldDecorator('cacheTime', {
                initialValue: config.cacheTime,
                rules: [
                  {
                    required: true,
                    message: dict['mob.required.input'] + '时长!'
                  }
                ]
              })(
                <InputNumber min={1} max={config.timeUnit !== 'hour' ? 7 : 23} precision={0} onChange={this.changeCacheDay}/>
              )}
            </Form.Item>
          </Col> : null}
          <Col span={24}>
            <Form.Item label={dict['mob.menu.easycode']}>
              {getFieldDecorator('easyCode', {
                initialValue: config.easyCode
src/views/menudesign/menuform/index.scss
@@ -0,0 +1,10 @@
.custom-menu-form {
  .anticon-question-circle {
    color: #c49f47;
    position: relative;
    left: -3px;
  }
  .ant-input-number {
    width: 100%;
  }
}