king
2022-10-08 9c6795fd3c44e46cf3955fbfd8f8eeca23acb7a9
2022-10-08
32个文件已修改
592 ■■■■■ 已修改文件
public/options.json 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/viewstyle.scss 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/breadview/index.jsx 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/index.jsx 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/index.scss 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tabview/index.jsx 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/index.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/actionform/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/settingform/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/action-type.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/action.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/options.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/reducer.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/basetable/index.jsx 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/calendar/index.jsx 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardItem/index.jsx 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/table-card/index.jsx 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-pie/index.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/simple-form/index.jsx 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/step-form/index.jsx 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/tab-form/index.jsx 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/formtab/index.jsx 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/home/index.jsx 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/index.jsx 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtabtable/index.jsx 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/treepage/index.jsx 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/tabbutton/index.jsx 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/settingcomponent/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/actionform/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/options.json
@@ -1,7 +1,7 @@
{
  "appId": "",
  "appkey": "",
  "mainSystemApi": "",
  "appId": "202108312122504607B107A83F55B40C98CCF",
  "appkey": "20210831212235413F287EC3BF489424496C8",
  "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars",
  "systemType": "",
  "externalDatabase": "false",
  "lineColor": "",
@@ -17,6 +17,6 @@
  "transfer": "false",
  "keepPassword": "true",
  "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"],
  "host": "https://cloud.mk9h.cn",
  "service": ""
  "host": "http://demo.mk9h.cn",
  "service": "erp_new/"
}
src/assets/css/viewstyle.scss
@@ -523,6 +523,12 @@
          }
        }
      }
      .header-menu::-webkit-scrollbar-track {
        box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.07);
        background: rgba(255, 255, 255, 255);
        border-radius: 3px;
      }
    }
  }
}
src/components/breadview/index.jsx
@@ -1,5 +1,4 @@
import React, {Component} from 'react'
import {connect} from 'react-redux'
import { BackTop, Breadcrumb, notification} from 'antd'
import { HomeOutlined, RightOutlined, RedoOutlined } from '@ant-design/icons'
import moment from 'moment'
@@ -9,7 +8,6 @@
import NotFount from '@/components/404'
import options from '@/store/options.js'
import MKEmitter from '@/utils/events.js'
import { initActionPermission } from '@/store/action'
import Api from '@/api'
import './index.scss'
@@ -57,7 +55,7 @@
              })
            }
  
            this.props.initActionPermission(_permAction)
            window.GLOB.mkActions = _permAction
          }
          resolve()
@@ -189,14 +187,4 @@
  }
}
const mapStateToProps = () => {
  return {}
}
const mapDispatchToProps = (dispatch) => {
  return {
    initActionPermission: (permAction) => dispatch(initActionPermission(permAction)),
  }
}
export default connect(mapStateToProps, mapDispatchToProps)(BreadView)
export default BreadView
src/components/header/index.jsx
@@ -10,8 +10,6 @@
import {
  toggleCollapse,
  modifyMainMenu,
  initActionPermission,
  initMenuPermission,
  logout
} from '@/store/action'
import asyncComponent from '@/utils/asyncSpinComponent'
@@ -185,7 +183,8 @@
      }
      this.props.modifyMainMenu(mainMenu)
      this.props.initMenuPermission([...thdMenuList, {MenuID: 'home_page_id', EasyCode: '', MenuName: 'home', type: 'CustomPage'}])
      window.GLOB.mkThdMenus = [...thdMenuList, {MenuID: 'home_page_id', EasyCode: '', MenuName: 'home', type: 'CustomPage'}]
      if (_menu) { // 延时打开,防止标签组未完成加载
        setTimeout(() => {
@@ -196,6 +195,7 @@
          }
        }, 200)
      }
      MKEmitter.emit('mkMenuLoaded')
    })
    
    // 获取角色权限, edition_type 接口版本控制 ''、'Y'、'A'
@@ -207,14 +207,14 @@
      }).then(result => {
        let _permAction = {loaded: true} // 按钮权限
        if (result && result.status) {
        if (result.status) {
          if (result.UserRoles_Menu) {
            result.UserRoles_Menu.forEach(menu => {
              if (!menu.MenuID) return
              _permAction[menu.MenuID] = true
            })
          }
        } else if (result) {
        } else {
          notification.error({
            top: 92,
            message: result.message,
@@ -222,7 +222,8 @@
          })
        }
        this.props.initActionPermission(_permAction)
        MKEmitter.emit('mkActionLoaded')
        window.GLOB.mkActions = _permAction
      })
    }, 50)
  }
@@ -617,9 +618,9 @@
    return (
      <header className="header-container ant-menu-dark" id="main-header-container">
        <div className={'header-logo ' + (collapse && navBar !== 'topmenu' ? 'collapse' : '')} onClick={this.changeToHome}><img src={this.state.logourl} alt=""/></div>
        <div className={'header-collapse ' + (collapse && navBar !== 'topmenu' ? 'collapse' : '')}>
          {navBar !== 'topmenu' ? (collapse ? <MenuUnfoldOutlined onClick={this.handleCollapse}/> : <MenuFoldOutlined onClick={this.handleCollapse}/>) : null}
        </div>
        {navBar !== 'topmenu' ? <div className={'header-collapse ' + (collapse ? 'collapse' : '')}>
          {collapse ? <MenuUnfoldOutlined onClick={this.handleCollapse}/> : <MenuFoldOutlined onClick={this.handleCollapse}/>}
        </div> : <div style={{width: '20px', height: '45px'}}></div>}
        {/* 正常菜单 */}
        {navBar !== 'topmenu' && menulist ?
          <ul className="header-menu">{
@@ -713,15 +714,9 @@
            })}
          </ul> : null
        }
        {/* 头像、用户名 */}
        <Dropdown className="header-setting" overlay={menu}>
          <div>
            <img src={this.state.avatar || avatar} alt=""/>
            <span>
              <span className="username"><span>{this.state.fullName}</span>{this.state.userName ? <span>{this.state.userName}</span> : null}</span> <DownOutlined />
            </span>
          </div>
        </Dropdown>
        {!menulist ?
          <div className="header-menu"></div> : null
        }
        {/* 菜单搜索 */}
        {thdMenuList.length > 0 ?
          <Dropdown overlayClassName="menu-select-dropdown" getPopupContainer={() => document.getElementById('main-header-container')} overlay={
@@ -758,6 +753,15 @@
            <SearchOutlined className="search-menu" />
          </Dropdown> : null
        }
        {/* 头像、用户名 */}
        <Dropdown className="header-setting" overlay={menu}>
          <div>
            <img src={this.state.avatar || avatar} alt=""/>
            <span>
              <span className="username"><span>{this.state.fullName}</span>{this.state.userName ? <span>{this.state.userName}</span> : null}</span> <DownOutlined />
            </span>
          </div>
        </Dropdown>
        {/* 修改密码 */}
        <Modal
          title={this.state.dict['main.password']}
@@ -797,8 +801,6 @@
  return {
    toggleCollapse: (collapse) => dispatch(toggleCollapse(collapse)),
    modifyMainMenu: (mainMenu) => dispatch(modifyMainMenu(mainMenu)),
    initActionPermission: (permAction) => dispatch(initActionPermission(permAction)),
    initMenuPermission: (permMenus) => dispatch(initMenuPermission(permMenus)),
    logout: () => dispatch(logout())
  }
}
src/components/header/index.scss
@@ -6,9 +6,9 @@
  font-weight: bold!important;
  width: 100%;
  height: 48px;
  display: flex;
  .header-logo {
    float: left;
    width: 180px;
    line-height: 48px;
    text-align: center;
@@ -28,7 +28,6 @@
  }
  .header-collapse {
    float: left;
    width: 35px;
    min-height: 48px;
    line-height: 48px;
@@ -48,13 +47,17 @@
    padding-left: 20px;
  }
  .header-menu {
    float: left;
    margin: 0;
    min-height: 20px;
    line-height: 48px;
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    li {
      float: left;
      font-size: 1.3rem;
      cursor: pointer;
      display: inline-block;
      span {
        padding: 0 10px;
        height: 42px;
@@ -83,8 +86,22 @@
    }
  }
  .header-menu::-webkit-scrollbar {
    height: 5px;
  }
  .header-menu::-webkit-scrollbar-thumb {
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13);
    background: rgba(0, 0, 0, 0.13);
    border-radius: 5px;
  }
  .header-menu::-webkit-scrollbar-track {
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.07);
    background: rgba(0, 0, 0, 0);
    border-radius: 3px;
  }
  .header-setting {
    float: right;
    line-height: 48px;
    margin-right: 10px;
    img {
@@ -117,10 +134,10 @@
  }
  .search-menu {
    float: right;
    font-size: 18px;
    margin-top: 17px;
    margin-right: 20px;
    margin-left: 10px;
    cursor: pointer;
  }
  .menu-select-dropdown {
src/components/tabview/index.jsx
@@ -7,7 +7,6 @@
import moment from 'moment'
import 'moment/locale/zh-cn'
import { initActionPermission } from '@/store/action'
import asyncComponent from '@/utils/asyncLoadComponent'
import NotFount from '@/components/404'
import options from '@/store/options.js'
@@ -101,7 +100,7 @@
              })
            }
  
            this.props.initActionPermission(_permAction)
            window.GLOB.mkActions = _permAction
          }
          resolve()
@@ -304,9 +303,7 @@
}
const mapDispatchToProps = (dispatch) => {
  return {
    initActionPermission: (permAction) => dispatch(initActionPermission(permAction))
  }
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(TabViews)
src/index.js
@@ -244,6 +244,8 @@
      }
    }
    GLOB.memberLevel = _level
    GLOB.mkThdMenus = [] // 三级菜单
    GLOB.mkActions = {}  // 按钮权限集
    if (sessionStorage.getItem('breakpoint')) {
      window.debugger = true
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -734,6 +734,11 @@
            { pattern: _patten, message: formRule.func.innerMessage },
            { max: formRule.func.max, message: formRule.func.maxMessage }
          )
        } else if (item.key === 'sql' || item.key === 'sheet') {
          rules.push(
            { pattern: /^[a-zA-Z_]+$/, message: '表名只可使用字母以及_' },
            { max: formRule.func.max, message: formRule.func.maxMessage }
          )
        } else if (item.key === 'outerFunc' || item.key === 'callbackFunc') {
          rules.push(
            { pattern: formRule.func.pattern, message: formRule.func.message },
src/menu/datasource/verifycard/settingform/index.jsx
@@ -198,6 +198,10 @@
                    {
                      max: 50,
                      message: '表名最长为50个字符!'
                    },
                    {
                      pattern: /^[a-zA-Z_]+$/,
                      message: '表名只可使用字母以及_'
                    }
                  ]
                })(<Input placeholder={''} autoComplete="off" />)}
src/store/action-type.js
@@ -13,11 +13,5 @@
// 重置编辑级别
export const RESET_EDITLEVEL = 'RESET_EDITLEVEL'
// 初始化按钮权限
export const INIT_ACTIONPERMISSION = 'INIT_ACTIONPERMISSION'
// 初始化菜单权限
export const INIT_MENUPERMISSION = 'INIT_MENUPERMISSION'
// 退出
export const LOGOUT = 'LOGOUT'
src/store/action.js
@@ -32,22 +32,6 @@
  }
}
// 初始化按钮权限
export const initActionPermission = (permAction) => {
  return {
    type: user.INIT_ACTIONPERMISSION,
    permAction: permAction
  }
}
// 初始化菜单权限
export const initMenuPermission = (permMenus) => {
  return {
    type: user.INIT_MENUPERMISSION,
    permMenus: permMenus
  }
}
// 退出重置
export const logout = () => {
  return {
src/store/options.js
@@ -6,7 +6,7 @@
 * 4、positecgroup ( aHR0cHM6Ly9jbG91ZC5$mkwb3NpdGVjZ3JvdXAuY29t )
 */
export default {
  sysType: 'Y2xv$mkdWQ=',
  sysType: 'bG9j$mkYWw=',
  caId: 'MjAyMDAxMTYxMjMzMzU1MDd$mkGQzkyMzI1Rjk4MDY0QUNGQjQ2Mg==',
  cakey: 'MjAyMDAxMTYxMjQwMDQ2NDM$mk2N0QzODE2MjExNUI0MTc4OTVDMQ==',
  cdomain: 'aHR0cHM6Ly9jbG91$mkZC5tazloLmNu'
src/store/reducer.js
@@ -8,8 +8,6 @@
  mainMenu: _mainMenu,  // 已选主菜单
  collapse: _collapse,  // 是否收起侧边栏导航
  editLevel: null,      // 编辑菜单级别,值为level1、level2、level3、HS
  permAction: {},       // 用户按钮权限
  permMenus: [],        // 用户三级菜单列表
}
// 用户消息
@@ -39,26 +37,12 @@
        ...state,
        editLevel: action.editLevel
      }
    case Type.INIT_ACTIONPERMISSION:
    // 初始化按钮权限
      return {
        ...state,
        permAction: action.permAction
      }
    case Type.INIT_MENUPERMISSION:
    // 初始化三级菜单权限
      return {
        ...state,
        permMenus: action.permMenus
      }
    case Type.LOGOUT:
      return {
        menuTree: null,
        mainMenu: null,
        collapse: localStorage.getItem('collapse') === 'true',
        editLevel: null,
        permAction: {},
        permMenus: [],
        editLevel: null
      }
    default:
      return state
src/tabviews/basetable/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { notification, Spin, Tabs, Switch, Row, Col } from 'antd'
@@ -76,7 +75,7 @@
   * @description 获取页面配置信息
   */
  async loadconfig () {
    const { permAction, permMenus, param, MenuName, MenuID } = this.props
    const { param, MenuName, MenuID } = this.props
    let _param = {
      func: 'sPC_Get_LongParam',
@@ -159,13 +158,13 @@
      // 权限过滤
      if (!window.GLOB.mkHS) {
        config.action = config.action.filter(item => item.hidden !== 'true' && permAction[item.uuid])
        config.action = config.action.filter(item => item.hidden !== 'true' && window.GLOB.mkActions[item.uuid])
        config.tabgroups.forEach(group => {
          group.sublist = group.sublist.filter(tab => {
            if (tab.supMenu === 'mainTable') {
              tab.supMenu = MenuID
            }
            return permAction[tab.linkTab]
            return window.GLOB.mkActions[tab.linkTab]
          })
        })
      } else {
@@ -336,7 +335,7 @@
          if (col.linkmenu && col.linkmenu.length > 0) {
            let menu_id = col.linkmenu.slice(-1)[0]
            col.linkThdMenu = permMenus.filter(m => m.MenuID === menu_id)[0] || ''
            col.linkThdMenu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
          } else {
            col.linkThdMenu = ''
          }
@@ -1266,22 +1265,11 @@
        }
        {!window.GLOB.mkHS && autoMatic ? <AutoMatic autoMatic={autoMatic} config={config} /> : null}
        {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null}
        {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null}
        {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts}/> : null}
        {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
      </div>
    )
  }
}
const mapStateToProps = (state) => {
  return {
    permAction: state.permAction,
    permMenus: state.permMenus
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(NormalTable)
export default NormalTable
src/tabviews/calendar/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { notification, Spin, Modal, Button } from 'antd'
import moment from 'moment'
@@ -22,7 +21,7 @@
const SubTabTable = asyncSpinComponent(() => import('@/tabviews/subtabtable'))
const PagemsgComponent = asyncComponent(() => import('@/tabviews/zshare/pageMessage'))
class NormalTable extends Component {
class MkCalendar extends Component {
  static propTpyes = {
    param: PropTypes.any,        // 其他页面传递的参数
    MenuID: PropTypes.string,    // 菜单Id
@@ -55,7 +54,7 @@
   * @description 获取页面配置信息
   */
  async loadconfig () {
    const { permAction, param } = this.props
    const { param } = this.props
    let _param = {
      func: 'sPC_Get_LongParam',
@@ -107,7 +106,7 @@
      // 权限过滤
      if (!window.GLOB.mkHS) {
        if (config.tab && !permAction[config.tab.linkTab]) {
        if (config.tab && !window.GLOB.mkActions[config.tab.linkTab]) {
          config.tab = null
        }
      }
@@ -574,14 +573,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    permAction: state.permAction
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(NormalTable)
export default MkCalendar
src/tabviews/commontable/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { notification, Spin, Tabs, Switch, Row, Col } from 'antd'
@@ -77,7 +76,7 @@
   * @description 获取页面配置信息
   */
  async loadconfig () {
    const { permAction, permMenus, param, MenuName, MenuID } = this.props
    const { param, MenuName, MenuID } = this.props
    let _param = {
      func: 'sPC_Get_LongParam',
@@ -160,13 +159,13 @@
      // 权限过滤
      if (!window.GLOB.mkHS) {
        config.action = config.action.filter(item => item.hidden !== 'true' && permAction[item.uuid])
        config.action = config.action.filter(item => item.hidden !== 'true' && window.GLOB.mkActions[item.uuid])
        config.tabgroups.forEach(group => {
          group.sublist = group.sublist.filter(tab => {
            if (tab.supMenu === 'mainTable') {
              tab.supMenu = MenuID
            }
            return permAction[tab.linkTab]
            return window.GLOB.mkActions[tab.linkTab]
          })
        })
      } else {
@@ -337,7 +336,7 @@
          if (col.linkmenu && col.linkmenu.length > 0) {
            let menu_id = col.linkmenu.slice(-1)[0]
            col.linkThdMenu = permMenus.filter(m => m.MenuID === menu_id)[0] || ''
            col.linkThdMenu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
          } else {
            col.linkThdMenu = ''
          }
@@ -1277,22 +1276,11 @@
        {setting && window.GLOB.breakpoint ? <DebugTable /> : null}
        {!window.GLOB.mkHS && autoMatic ? <AutoMatic autoMatic={autoMatic} config={config} /> : null}
        {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null}
        {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null}
        {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts}/> : null}
        {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
      </div>
    )
  }
}
const mapStateToProps = (state) => {
  return {
    permAction: state.permAction,
    permMenus: state.permMenus
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(NormalTable)
export default NormalTable
src/tabviews/custom/components/card/cardItem/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { is, fromJS } from 'immutable'
import { notification } from 'antd'
@@ -81,29 +80,26 @@
      } else {
        MKEmitter.emit('modifyTabs', newtab, 'plus', true)
      }
    } else if (card.setting.click === 'menu') {
      let menu = null
    } else if (card.setting.click === 'menu' && card.setting.menu) {
      let menuId = card.setting.MenuID || card.setting.menu.slice(-1)[0]
      let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0]
      if (card.setting.MenuID) {
        let _menu = this.props.permMenus.filter(m => m.MenuID === card.setting.MenuID)[0] || ''
      if (!menu && card.setting.MenuName && card.setting.tabType) {
        menu = {
          MenuID: card.setting.MenuID,
          MenuName: _menu ? _menu.MenuName : card.setting.MenuName,
          MenuNo: card.setting.MenuNo,
          type: _menu ? _menu.type : card.setting.tabType
          MenuID: menuId,
          MenuName: card.setting.MenuName,
          MenuNo: card.setting.MenuNo || '',
          type: card.setting.tabType
        }
      } else if (card.setting.menu && card.setting.menu.length > 0) {
        let menu_id = card.setting.menu.slice(-1)[0]
        menu = this.props.permMenus.filter(m => m.MenuID === menu_id)[0] || ''
      }
        if (!menu) {
          notification.warning({
            top: 92,
            message: '菜单已删除或没有访问权限!',
            duration: 5
          })
          return
        }
      if (!menu) {
        notification.warning({
          top: 92,
          message: '菜单已删除或没有访问权限!',
          duration: 5
        })
        return
      }
      let newtab = {
@@ -175,14 +171,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    permMenus: state.permMenus
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(CardBoxComponent)
export default CardBoxComponent
src/tabviews/custom/components/card/table-card/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { is, fromJS } from 'immutable'
import { Spin, notification, Row, Col, Empty, Pagination } from 'antd'
import { DownOutlined } from '@ant-design/icons'
@@ -348,29 +347,26 @@
  }
  openView = (card, data) => {
    if (card.setting.click === 'menu') {
      let menu = null
    if (card.setting.click === 'menu' && card.setting.menu) {
      let menuId = card.setting.MenuID || card.setting.menu.slice(-1)[0]
      let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0]
      if (card.setting.MenuID) {
        let _menu = this.props.permMenus.filter(m => m.MenuID === card.setting.MenuID)[0] || ''
      if (!menu && card.setting.MenuName && card.setting.tabType) {
        menu = {
          MenuID: card.setting.MenuID,
          MenuName: _menu ? _menu.MenuName : card.setting.MenuName,
          MenuNo: card.setting.MenuNo,
          type: _menu ? _menu.type : card.setting.tabType
          MenuID: menuId,
          MenuName: card.setting.MenuName,
          MenuNo: card.setting.MenuNo || '',
          type: card.setting.tabType
        }
      } else if (card.setting.menu && card.setting.menu.length > 0) {
        let menu_id = card.setting.menu.slice(-1)[0]
        menu = this.props.permMenus.filter(m => m.MenuID === menu_id)[0] || ''
      }
        if (!menu) {
          notification.warning({
            top: 92,
            message: '菜单已删除或没有访问权限!',
            duration: 5
          })
          return
        }
      if (!menu) {
        notification.warning({
          top: 92,
          message: '菜单已删除或没有访问权限!',
          duration: 5
        })
        return
      }
      let newtab = {
@@ -496,14 +492,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    permMenus: state.permMenus,
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(TableCard)
export default TableCard
src/tabviews/custom/components/chart/antv-pie/index.jsx
@@ -2,7 +2,6 @@
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Chart } from '@antv/g2'
import { connect } from 'react-redux'
import DataSet, { DataView } from '@antv/data-set'
import { Spin, Empty, notification } from 'antd'
import { DownloadOutlined } from '@ant-design/icons'
@@ -923,9 +922,10 @@
    
    if (plot.linkmenu && plot.linkmenu.length > 0) {
      let menu_id = plot.linkmenu.slice(-1)[0]
      let menu = this.props.permMenus.filter(m => m.MenuID === menu_id)[0] || ''
      chart.on('element:dblclick', (ev) => {
        let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
        if (!menu) {
          notification.warning({
            top: 92,
@@ -1042,14 +1042,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    permMenus: state.permMenus,
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(PieChart)
export default PieChart
src/tabviews/custom/components/form/simple-form/index.jsx
@@ -1,7 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { connect } from 'react-redux'
import { Spin, notification } from 'antd'
import Api from '@/api'
@@ -196,7 +195,7 @@
  execSuccess = (btn, id) => {
    if (btn.linkmenu && btn.linkmenu.length > 0) {
      let menu_id = btn.linkmenu[btn.linkmenu.length - 1]
      let menu = this.props.permMenus.filter(m => m.MenuID === menu_id)[0] || ''
      let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
      if (!menu) return
@@ -312,14 +311,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    permMenus: state.permMenus,
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(SimpleForm)
export default SimpleForm
src/tabviews/custom/components/form/step-form/index.jsx
@@ -1,7 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { connect } from 'react-redux'
import { Spin, notification, Button } from 'antd'
import Api from '@/api'
@@ -245,7 +244,7 @@
    if (btn.linkmenu && btn.linkmenu.length > 0) {
      let menu_id = btn.linkmenu[btn.linkmenu.length - 1]
      let menu = this.props.permMenus.filter(m => m.MenuID === menu_id)[0] || ''
      let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
      if (!menu) return
@@ -411,14 +410,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    permMenus: state.permMenus,
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(StepForm)
export default StepForm
src/tabviews/custom/components/form/tab-form/index.jsx
@@ -1,7 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { connect } from 'react-redux'
import { Spin, notification } from 'antd'
import Api from '@/api'
@@ -206,7 +205,7 @@
  execSuccess = (btn, id) => {
    if (btn.linkmenu && btn.linkmenu.length > 0) {
      let menu_id = btn.linkmenu[btn.linkmenu.length - 1]
      let menu = this.props.permMenus.filter(m => m.MenuID === menu_id)[0] || ''
      let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
      if (!menu) return
@@ -336,14 +335,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    permMenus: state.permMenus,
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(TabForm)
export default TabForm
src/tabviews/custom/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { is, fromJS } from 'immutable'
import { notification, Spin, Row, Col } from 'antd'
@@ -74,7 +73,7 @@
   * @description 获取页面配置信息
   */
  async loadconfig () {
    const { permAction, MenuID } = this.props
    const { MenuID } = this.props
    let _param = {
      func: 'sPC_Get_LongParam',
@@ -145,7 +144,7 @@
      window.GLOB.CacheData.set(MenuID, param)
      config.components = this.filterComponent(config.components, roleId, permAction, balMap, skip, param, MenuID)
      config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, balMap, skip, param, MenuID)
      
      // 获取主搜索条件
      let mainSearch = []
@@ -618,7 +617,7 @@
      
            if (col.linkmenu && col.linkmenu.length > 0) {
              let menu_id = col.linkmenu.pop()
              col.linkThdMenu = this.props.permMenus.filter(m => m.MenuID === menu_id)[0] || ''
              col.linkThdMenu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
            } else {
              col.linkThdMenu = ''
            }
@@ -1369,23 +1368,11 @@
        <Row className="component-wrap">{this.getComponents()}</Row>
        {config && window.GLOB.breakpoint ? <DebugTable /> : null}
        {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null}
        {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null}
        {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts}/> : null}
        {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
      </div>
    )
  }
}
const mapStateToProps = (state) => {
  return {
    refreshTab: state.refreshTab,
    permAction: state.permAction,
    permMenus: state.permMenus
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(CustomPage)
export default CustomPage
src/tabviews/formtab/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { notification, Spin, Tabs} from 'antd'
import moment from 'moment'
@@ -48,7 +47,7 @@
   * @description 获取页面配置信息
   */
  async loadconfig () {
    const { permAction, MenuID } = this.props
    const { MenuID } = this.props
    let param = {
      func: 'sPC_Get_LongParam',
@@ -104,13 +103,13 @@
      }
      if (!window.GLOB.mkHS) {
        config.action = config.action.filter(item => permAction[item.uuid])
        config.action = config.action.filter(item => window.GLOB.mkActions[item.uuid])
        config.tabgroups.forEach(group => {
          group.sublist = group.sublist.filter(tab => {
            if (tab.supMenu === 'mainTable') {
              tab.supMenu = MenuID
            }
            return permAction[tab.linkTab]
            return window.GLOB.mkActions[tab.linkTab]
          })
        })
      } else {
@@ -669,14 +668,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    permAction: state.permAction
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(NormalTable)
export default NormalTable
src/tabviews/home/index.jsx
@@ -1,10 +1,10 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { notification, Spin } from 'antd'
import Api from '@/api'
import asyncComponent from '@/utils/asyncComponent'
import MKEmitter from '@/utils/events.js'
import './index.scss'
const DefaultHome = asyncComponent(() => import('./defaulthome'))
@@ -18,25 +18,50 @@
  state = {
    loading: true,
    background: sessionStorage.getItem('home_background'),
    waiting: true,
    waitMenu: true,
    waitAction: true,
    view: ''
  }
  componentDidMount () {
    this.loadHomeConfig()
    if (this.props.permMenus.length > 0 && JSON.stringify(this.props.permAction) !== '{}') {
    if (window.GLOB.mkThdMenus.length > 0) {
      this.setState({
        waiting: false
        waitMenu: false
      })
    } else {
      MKEmitter.addListener('mkMenuLoaded', this.mkMenuLoaded)
    }
    if (window.GLOB.mkActions.loaded) {
      this.setState({
        waitAction: false
      })
    } else {
      MKEmitter.addListener('mkActionLoaded', this.mkActionLoaded)
    }
  }
  UNSAFE_componentWillReceiveProps (nextProps) {
    if (nextProps.permMenus.length > 0 && JSON.stringify(nextProps.permAction) !== '{}') {
      this.setState({
        waiting: false
      })
  /**
   * @description 组件销毁,清除state更新
   */
  componentWillUnmount () {
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('mkMenuLoaded', this.mkMenuLoaded)
    MKEmitter.removeListener('mkActionLoaded', this.mkActionLoaded)
  }
  mkMenuLoaded = () => {
    this.setState({
      waitMenu: false
    })
  }
  mkActionLoaded = () => {
    this.setState({
      waitAction: false
    })
  }
  loadHomeConfig = () => {
@@ -54,7 +79,8 @@
        } else {
          this.setState({
            loading: false,
            waiting: false,
            waitMenu: false,
            waitAction: false,
            view: 'default'
          })
        }
@@ -73,9 +99,9 @@
  }
  render() {
    const { loading, waiting, view, background } = this.state
    const { loading, waitAction, waitMenu, view, background } = this.state
    if (loading || waiting) {
    if (loading || waitAction || waitMenu) {
      return (<div className="home-loading-view" style={{background: background}}><Spin className="home-box-spin" size="large" /></div>)
    } else if (view === 'custom') {
      return (<CustomPage MenuID={this.props.MenuID} MenuName="首页"/>)
@@ -85,15 +111,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    permAction: state.permAction,
    permMenus: state.permMenus
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(Home)
export default Home
src/tabviews/subtable/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { notification, Spin, Switch, Row, Col, Tabs} from 'antd'
@@ -84,7 +83,7 @@
   * @description 获取页面配置信息
   */
  async loadconfig () {
    const { permAction, permMenus, Tab } = this.props
    const { Tab } = this.props
    let param = {
      func: 'sPC_Get_LongParam',
@@ -134,7 +133,7 @@
      // 权限过滤
      if (!window.GLOB.mkHS) {
        config.action = config.action.filter(item => item.hidden !== 'true' && permAction[item.uuid])
        config.action = config.action.filter(item => item.hidden !== 'true' && window.GLOB.mkActions[item.uuid])
      } else {
        config.action = config.action.filter(item => item.hidden !== 'true')
      }
@@ -183,7 +182,7 @@
          if (col.linkmenu && col.linkmenu.length > 0) {
            let menu_id = col.linkmenu.slice(-1)[0]
            col.linkThdMenu = permMenus.filter(m => m.MenuID === menu_id)[0] || ''
            col.linkThdMenu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
          } else {
            col.linkThdMenu = ''
          }
@@ -1129,15 +1128,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    permAction: state.permAction,
    permMenus: state.permMenus,
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(SubTabViewTable)
export default SubTabViewTable
src/tabviews/subtabtable/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { notification, Spin} from 'antd'
@@ -61,7 +60,7 @@
   * @description 获取页面配置信息
   */
  async loadconfig () {
    const { permAction, Tab } = this.props
    const { Tab } = this.props
    let param = {
      func: 'sPC_Get_LongParam',
@@ -129,7 +128,7 @@
      // 权限过滤
      if (!window.GLOB.mkHS) {
        config.action = config.action.filter(item => item.hidden !== 'true' && permAction[item.uuid])
        config.action = config.action.filter(item => item.hidden !== 'true' && window.GLOB.mkActions[item.uuid])
      } else {
        config.action = config.action.filter(item => item.hidden !== 'true')
      }
@@ -891,14 +890,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    permAction: state.permAction
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(SubTabModalTable)
export default SubTabModalTable
src/tabviews/treepage/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { notification, Spin, Tabs, Tree, Row, Col, Card, Input, Empty } from 'antd'
import { FolderOpenOutlined, FolderOutlined, FileOutlined } from '@ant-design/icons'
@@ -59,7 +58,7 @@
   * @description 获取页面配置信息
   */
  async loadconfig () {
    const { permAction, param, MenuName, MenuID } = this.props
    const { param, MenuName, MenuID } = this.props
    let _param = {
      func: 'sPC_Get_LongParam',
@@ -123,7 +122,7 @@
          if (tab.supMenu === 'mainTable') {
            tab.supMenu = MenuID
          }
          return permAction[tab.linkTab]}
          return window.GLOB.mkActions[tab.linkTab]}
        )
      })
@@ -632,21 +631,11 @@
          </Col>
        </Row> : null}
        {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null}
        {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null}
        {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts}/> : null}
        {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
      </div>
    )
  }
}
const mapStateToProps = (state) => {
  return {
    permAction: state.permAction
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(TreePage)
export default TreePage
src/tabviews/zshare/actionList/tabbutton/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { Button, notification } from 'antd'
@@ -153,20 +152,17 @@
          primaryId: primaryId
        }
      }
    } else {
      let menu = null
    } else if (btn.MenuID || btn.linkmenu) {
      let menuId = btn.MenuID || btn.linkmenu.slice(-1)[0]
      let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0]
      if (btn.MenuID) {
        let _menu = this.props.permMenus.filter(m => m.MenuID === btn.MenuID)[0] || ''
      if (!menu && btn.MenuName && btn.tabType) {
        menu = {
          MenuID: btn.MenuID,
          MenuName: _menu ? _menu.MenuName : btn.MenuName,
          MenuName: btn.MenuName,
          MenuNo: btn.MenuNo,
          type: _menu ? _menu.type : btn.tabType
          type: btn.tabType
        }
      } else if (btn.linkmenu && btn.linkmenu.length > 0) {
        let menu_id = btn.linkmenu.slice(-1)[0]
        menu = this.props.permMenus.filter(m => m.MenuID === menu_id)[0] || ''
      }
      if (!menu) {
@@ -242,14 +238,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    permMenus: state.permMenus,
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(TabButton)
export default TabButton
src/tabviews/zshare/settingcomponent/index.jsx
@@ -17,7 +17,6 @@
    dict: PropTypes.object,           // 字典表
    config: PropTypes.object,         // 页面配置信息
    shortcuts: PropTypes.any,         // 自定义设置
    permAction: PropTypes.object,     // 按钮权限
  }
  state = {
@@ -183,7 +182,7 @@
  }
  getPageConfig = () => {
    const { shortcuts, permAction } = this.props
    const { shortcuts } = this.props
    let config = fromJS(this.props.config).toJS()
    let userConfig = {}
    let components = []
@@ -262,7 +261,7 @@
          let _comp = {title: res.tab.label, uuid: res.tab.uuid, action: []}
          subconfig.action.forEach(item => {
            if (!permAction[item.uuid]) return
            if (!window.GLOB.mkActions[item.uuid]) return
            item.$expanded = false
            if (item.OpenType === 'funcbutton' && item.funcType === 'print') {
src/templates/sharecomponent/actioncomponent/actionform/index.jsx
@@ -555,6 +555,11 @@
            { pattern: _patten, message: formRule.func.innerMessage },
            { max: formRule.func.max, message: formRule.func.maxMessage }
          )
        } else if (item.key === 'sql' || item.key === 'sheet') {
          rules.push(
            { pattern: /^[a-zA-Z_]+$/, message: '表名只可使用字母以及_' },
            { max: formRule.func.max, message: formRule.func.maxMessage }
          )
        } else if (item.key === 'outerFunc' || item.key === 'callbackFunc') {
          rules.push(
            { pattern: formRule.func.pattern, message: formRule.func.message },
src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx
@@ -220,6 +220,10 @@
                  {
                    max: 50,
                    message: '表名最长为50个字符!'
                  },
                  {
                    pattern: /^[a-zA-Z_]+$/,
                    message: '表名只可使用字母以及_'
                  }
                ]
              })(<Input placeholder={''} autoComplete="off" />)}