king
2020-03-12 1dfd49b103e721f9bb63fd4d472b6fcc225d94a1
2020-03-12
14个文件已修改
597 ■■■■ 已修改文件
src/api/index.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sidemenu/index.jsx 63 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tabview/index.scss 85 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.scss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/formtab/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/managetable/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/rolemanage/index.jsx 288 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/rolemanage/index.scss 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/index.jsx 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/index.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/tableshare/tabdragelement/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/loginform.jsx 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js
@@ -300,6 +300,7 @@
    param.lang = localStorage.getItem('lang') || ''
    param.SessionUid = sessionStorage.getItem('SessionUid') || ''
    param.LoginUID = sessionStorage.getItem('LoginUID') || ''
    param.appkey = window.GLOB.appkey || ''
    if (sessionStorage.getItem('isEditState') === 'true' && param.rduri === options.cloudServiceApi) { // HS下菜单
      param.userid = sessionStorage.getItem('CloudUserID')
@@ -336,6 +337,7 @@
    param.lang = localStorage.getItem('lang') || ''
    param.SessionUid = sessionStorage.getItem('SessionUid') || ''
    param.LoginUID = sessionStorage.getItem('LoginUID') || ''
    param.appkey = window.GLOB.appkey || ''
    
    return new Promise(resolve => {
      axios({
src/components/sidemenu/index.jsx
@@ -185,18 +185,63 @@
        src: '',
        PageParam: {OpenType: 'newtab', Template: 'ManageTable'},
        type: 'ManageTable',
        MenuID: '1578900109100np8aqd0a77q3na46oas',
        MenuNo: 'sPrintTemplateM',
        MenuName: '打印模板',
        text: '打印模板'
      }, {
        src: '',
        PageParam: {OpenType: 'newtab', Template: 'ManageTable'},
        type: 'ManageTable',
        MenuID: '1581734956310scks442ul2d955g9tu5',
        MenuNo: 'sVersionM',
        MenuName: '传输号管理',
        text: '传输号管理'
      }, {
        src: '',
        PageParam: {OpenType: 'newtab', Template: 'ManageTable'},
        type: 'ManageTable',
        MenuID: '1583991994144ndddg0bhh0is6shi0v1',
        MenuNo: 'sVersionQueryM',
        MenuName: '传输号查询',
        text: '传输号查询'
      }, {
        src: '',
        PageParam: {OpenType: 'newtab', Template: 'ManageTable'},
        type: 'ManageTable',
        MenuID: '1583979633842550imkchl4qt4qppsiv',
        MenuNo: 'sVersionMUpgrade',
        MenuName: '版本升级',
        text: '版本升级'
      }, {
        src: '',
        PageParam: {OpenType: 'newtab', Template: 'ManageTable'},
        type: 'ManageTable',
        MenuID: '1578900109100np8aqd0a77q3na46oas',
        MenuNo: 'sPrintTemplateM',
        MenuName: '打印模板',
        text: '打印模板'
      }]
    }, {
      MenuID: Utils.getuuid(),
      text: '接口',
      PageParam: {Icon: 'folder'},
      children: [{
        src: '',
        PageParam: {OpenType: 'newtab', Template: 'ManageTable'},
        type: 'ManageTable',
        MenuID: '1582771068837vsv54a089lgp45migbg',
        MenuNo: 'KUNTitleM',
        MenuName: '接口主数据',
        text: '接口主数据'
      }, {
        src: '',
        PageParam: {OpenType: 'newtab', Template: 'ManageTable'},
        type: 'ManageTable',
        MenuID: '1582777675954ifu05upurs465omoth7',
        MenuNo: 'KUNMainM',
        MenuName: '查询接口',
        text: '查询接口'
      }, {
        src: '',
        PageParam: {OpenType: 'newtab', Template: 'ManageTable'},
        type: 'ManageTable',
        MenuID: '158294809668898cklbv6c5bou8e1fpu',
        MenuNo: 'KUNMainMOut_advanced',
        MenuName: '高阶查询',
        text: '高阶查询'
      }]
    }]
    this.setState({
@@ -233,7 +278,7 @@
  }
  UNSAFE_componentWillReceiveProps (nextProps) {
    if (nextProps.mainMenu && nextProps.mainMenu.MenuID === 'systemManageView') {
    if (!is(fromJS(this.props.mainMenu), fromJS(nextProps.mainMenu)) && nextProps.mainMenu && nextProps.mainMenu.MenuID === 'systemManageView') {
      this.enterManageView()
    } else if (!is(fromJS(this.props.mainMenu), fromJS(nextProps.mainMenu))) {
      // 主菜单切换,请求2、3级菜单数据
src/components/tabview/index.scss
@@ -2,51 +2,54 @@
  padding-top: 48px;
  max-width: calc(100% - 235px);
  transition: max-width 0.2s;
  .content-header {
  >.content-header {
    width: 100%;
    height: 100%;
    > .ant-tabs {
      > .ant-tabs-bar { // 去除标签页header与content之间的间隙
        margin-bottom: 0;
        .ant-tabs-tab {
          padding: 18px 16px 6px 6px;
          margin-right: 20px;
          cursor: default;
          span.tab-control i.anticon-close {
            position: absolute;
            right: -7px;
            top: 10px;
            font-size: 10px;
            margin: 0px;
            padding: 5px;
            cursor: pointer;
          }
          span.tab-control i.anticon-redo {
            position: absolute;
            left: -5px;
            top: 18px;
            font-size: 14px;
            margin: 0px;
            padding: 3px;
            cursor: pointer;
            display: none;
          }
          span.tab-name {
            cursor: pointer;
            padding: 6px 0px 6px 10px;
          }
        }
        .ant-tabs-tab-active.ant-tabs-tab {
          span.tab-name {
            cursor: default;
          }
        }
        .ant-tabs-tab-active.ant-tabs-tab:hover {
          span.tab-control i.anticon-redo {
            display: inline-block;
          }
        }
      }
    }
    .ant-tabs .ant-tabs-top-content.ant-tabs-content-animated {
      transition: margin-left 0s cubic-bezier(0.645, 0.045, 0.355, 1);
    }
    .ant-tabs-bar { // 去除标签页header与content之间的间隙
      margin-bottom: 0;
    }
    .ant-tabs-tab {
      padding: 18px 16px 6px 6px;
      cursor: default;
      span.tab-control i.anticon-close {
        position: absolute;
        right: -7px;
        top: 10px;
        font-size: 10px;
        margin: 0px;
        padding: 5px;
        cursor: pointer;
      }
      span.tab-control i.anticon-redo {
        position: absolute;
        left: -5px;
        top: 18px;
        font-size: 14px;
        margin: 0px;
        padding: 3px;
        cursor: pointer;
        display: none;
      }
      span.tab-name {
        cursor: pointer;
        padding: 6px 0px 6px 10px;
      }
    }
    .ant-tabs-tab-active.ant-tabs-tab {
      span.tab-name {
        cursor: default;
      }
    }
    .ant-tabs-tab-active.ant-tabs-tab:hover {
      span.tab-control i.anticon-redo {
        display: inline-block;
      }
    }
    iframe {
      width: 100%;
src/tabviews/commontable/index.jsx
@@ -119,10 +119,11 @@
      // 权限过滤
      config.action = config.action.filter(item => permAction[item.uuid])
      // config.tabgroups.forEach(group => {
      //   if (!config[group]) return
      //   config[group] = config[group].filter(tab => permAction[tab.uuid])
      // })
      config.tabgroups.forEach(group => {
        if (!config[group]) return
        config[group] = config[group].filter(tab => permAction[tab.linkTab])
      })
      if (userConfig) {
        config.setting = {...config.setting, ...userConfig.setting}
src/tabviews/commontable/index.scss
@@ -72,6 +72,9 @@
    .ant-tabs-tab:not(.ant-tabs-tab-active) {
      cursor: pointer;
    }
    .ant-tabs-tab.ant-tabs-tab-active {
      cursor: default;
    }
  }
  .common-table-copy {
    position: fixed;
src/tabviews/formtab/index.jsx
@@ -104,11 +104,12 @@
      // 权限过滤
      if (this.props.param.menuType !== 'HS') {
        config.action = config.action.filter(item => permAction[item.uuid])
        config.tabgroups.forEach(group => {
          if (!config[group]) return
          config[group] = config[group].filter(tab => permAction[tab.linkTab])
        })
      }
      // config.tabgroups.forEach(group => {
      //   if (!config[group]) return
      //   config[group] = config[group].filter(tab => permAction[tab.uuid])
      // })
      this.setState({
        config: config,
src/tabviews/managetable/index.jsx
@@ -116,12 +116,6 @@
      let colMap = new Map() // 用于字段过滤
      // 权限过滤
      // config.action = config.action.filter(item => permAction[item.uuid])
      // config.tabgroups.forEach(group => {
      //   if (!config[group]) return
      //   config[group] = config[group].filter(tab => permAction[tab.uuid])
      // })
      // 1、筛选字段集,2、过滤隐藏列及合并列中的字段uuid
      config.columns.forEach(col => {
src/tabviews/rolemanage/index.jsx
@@ -1,14 +1,18 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Card, Col, Row, Icon, Menu, notification, Spin, Input } from 'antd'
import { Card, Col, Row, Icon, Menu, notification, Spin, Input, Tabs, Button, Tree } from 'antd'
import Api from '@/api'
import Utils from '@/utils/utils.js'
import zhCN from '@/locales/zh-CN/role.js'
import enUS from '@/locales/en-US/role.js'
import './index.scss'
const { Search } = Input
const { TabPane } = Tabs
const { TreeNode, DirectoryTree } = Tree
let _checkedKeys = null
export default class RoleManage extends Component {
  static propTpyes = {
@@ -18,9 +22,19 @@
  state = {
    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    loadingview: true,
    loading: true,
    roleList: null,
    primarykey: ''
    selectRoleId: '',
    mainMenus: null,
    menuTrees: null,
    checkedKeys: [],
    menuOpenKeys: [],
    selectMenuTrees: null,
    selectMenuOpenKeys: [],
    primarykey: '',
    tabKey: '',
    submitloading: false,
    initCheckKeys: null
  }
  getRoleList = async () => {
@@ -31,11 +45,12 @@
    if (result.status) {
      this.setState({
        roleList: result.data
        roleList: result.data,
        loading: false
      })
    } else {
      this.setState({
        loadingview: false
        loading: false
      })
      notification.warning({
        top: 92,
@@ -45,17 +60,103 @@
    }
  }
  getMenuList = async () => {
  getMainMenuList = async () => {
    let param = {
      func: 's_rolemenu_get_FstMenu'
    }
    let result = await Api.getSystemConfig(param)
    if (result.status) {
      this.setState({
        mainMenus: result.data.map(item => {
          return {
            title: item.MenuName,
            key: item.MenuID,
            children: []
          }
        })
      }, () => {
        this.getAllMenuList()
      })
    } else {
      notification.warning({
        top: 92,
        message: result.message,
        duration: 10
      })
    }
  }
  getAllMenuList = async () => {
    const { selectRoleId, mainMenus, tabKey } = this.state
    let param = {
      func: 's_rolemenu_get_FunMenu',
      RoleID: selectRoleId,
      SelectedType: tabKey
    }
    let result = await Api.getSystemConfig(param)
    if (result.status) {
      let _tree = null
      let _openKeys = []
      let _state = {
        loading: false
      }
      if (tabKey === '') {
        let _mainMenuKeys = mainMenus.map(menu => menu.key)
        _checkedKeys = []
        let _checkMainKeys = [] // 选中的一级菜单,需判断是否含有子菜单
        let _initCheckKeys = [] // 初始选中的菜单id
        result.data.forEach(item => {
          if (item.Selected !== 'true') return
          if (!_mainMenuKeys.includes(item.MenuID)) {
            _checkedKeys.push(item.MenuID)
          } else {
            _checkMainKeys.push(item.MenuID)
          }
          _initCheckKeys.push(item.MenuID)
        })
        _initCheckKeys = Array.from(new Set(_initCheckKeys))
        _tree = this.getTree(JSON.parse(JSON.stringify(mainMenus)), result.data)
        if (_tree[0]) {
          this.getOpenNode(_tree[0], _openKeys)
        }
        _tree.forEach(item => {
          if (_checkMainKeys.includes(item.key) && !item.children) {
            _checkedKeys.push(item.key)
          }
        })
        _state.menuTrees = _tree
        _state.initCheckKeys = _initCheckKeys
        _state.checkedKeys = _checkedKeys
        _state.menuOpenKeys = _openKeys
      } else {
        _tree = this.getTree(JSON.parse(JSON.stringify(mainMenus)), result.data)
        _tree = _tree.filter(node => node.children)
        if (_tree[0]) {
          this.getOpenNode(_tree[0], _openKeys)
        }
        _state.selectMenuTrees = _tree
        _state.selectMenuOpenKeys = _openKeys
      }
      this.setState(_state)
    } else {
      this.setState({
        loadingview: false
        loading: false
      })
      notification.warning({
        top: 92,
@@ -65,13 +166,146 @@
    }
  }
  changeRole = () => {
  getOpenNode = (parentNode, keys) => {
    if (parentNode.children) {
      keys.push(parentNode.key)
      parentNode.children.forEach(node => {
        this.getOpenNode(node, keys)
      })
    }
  }
  getTree = (parents, options) => {
    parents.forEach(parent => {
      parent.children = []
      options.forEach((option, index) => {
        if (option.ParentID === parent.key) {
          parent.children.push({
            title: option.MenuName,
            key: option.MenuID,
            selected: option.Selected === 'true'
          })
        }
      })
      if (parent.children.length === 0) {
        parent.children = null
      } else {
        if (_checkedKeys && parent.selected) {
          _checkedKeys = _checkedKeys.filter(key => key !== parent.key)
        }
        parent.children = this.getTree(parent.children, options)
      }
    })
    return parents
  }
  changeRole = (role) => {
    const { selectRoleId } = this.state
    if (selectRoleId === role.RoleID) return
    this.setState({
      selectRoleId: role.RoleID,
      menuTrees: null,
      checkedKeys: [],
      menuOpenKeys: [],
      selectMenuTrees: null,
      selectMenuOpenKeys: []
    }, () => {
      this.getAllMenuList()
    })
  }
  renderTreeNodes = (data) => {
    return data.map(item => {
      if (item.children) {
        return (
          <TreeNode title={item.title} key={item.key} dataRef={item}>
            {this.renderTreeNodes(item.children)}
          </TreeNode>
        )
      }
      return <TreeNode key={item.key} showIcon={true} {...item} isLeaf />
    })
  }
  onCheck = (checkedKeys, info) => {
    console.log(checkedKeys)
    this.setState({
      checkedKeys: checkedKeys,
      halfCheckedKeys: info.halfCheckedKeys,
      initCheckKeys: null
    })
  }
  changeTab = (key) => {
    const { menuTrees, selectMenuTrees } = this.state
    this.setState({
      tabKey: key === 'selected' ? key : ''
    }, () => {
      if ((key === 'selected' && !selectMenuTrees) || (key === 'all' && !menuTrees)) {
        this.getAllMenuList()
      }
    })
  }
  roleSubmit = async () => {
    const { checkedKeys, halfCheckedKeys, selectRoleId, initCheckKeys } = this.state
    let _keys = []
    if (initCheckKeys) {
      _keys = initCheckKeys
    } else {
      _keys = checkedKeys.concat(halfCheckedKeys)
    }
    let _LText = _keys.map(key => `select '${key}' as MenuID`)
    _LText = _LText.join(' union all ')
    let param = {
      func: 's_rolemenu_sub',
      RoleID: selectRoleId,
      LText: Utils.formatOptions(_LText)
    }
    this.setState({
      submitloading: true
    })
    let result = await Api.getSystemConfig(param)
    if (result.status) {
      notification.success({
        top: 92,
        message: '保存成功',
        duration: 2
      })
      this.setState({
        submitloading: false,
        selectMenuTrees: null,
        selectMenuOpenKeys: []
      })
    } else {
      notification.warning({
        top: 92,
        message: result.message,
        duration: 10
      })
      this.setState({
        submitloading: false
      })
    }
  }
  UNSAFE_componentWillMount () {
    this.getRoleList()
    this.getMenuList()
    this.getMainMenuList()
  }
  shouldComponentUpdate (nextProps, nextState) {
@@ -79,7 +313,7 @@
  }
  render() {
    const { roleList, loadingview, primarykey } = this.state
    const { roleList, loading, primarykey, menuTrees, checkedKeys, menuOpenKeys, selectMenuTrees, tabKey, selectRoleId, selectMenuOpenKeys, submitloading } = this.state
    let _roleList  = []
@@ -89,9 +323,9 @@
    return (
      <div className="rolemanage">
        {loadingview && <Spin size="large" />}
        {loading && <Spin size="large" />}
        <Row gutter={16}>
          <Col span={6}>
          <Col span={5}>
            <Card
              className="role-list"
              title={
@@ -113,10 +347,30 @@
              </Menu>
            </Card>
          </Col>
          <Col span={18}>
            <Card title="Card title" bordered={false}>
              Card content
            </Card>
          <Col span={19}>
            <Tabs defaultActiveKey="all" tabBarExtraContent={!tabKey && selectRoleId ? <Button type="primary" loading={submitloading} onClick={this.roleSubmit}>提交</Button> : null} onChange={this.changeTab}>
              <TabPane tab="菜单列表" key="all">
                {menuTrees && menuTrees.length > 0 ? <Tree
                  checkable
                  selectable={false}
                  defaultExpandedKeys={menuOpenKeys}
                  autoExpandParent={true}
                  onCheck={this.onCheck}
                  checkedKeys={checkedKeys}
                >
                  {this.renderTreeNodes(menuTrees)}
                </Tree> : null}
                {menuTrees && menuTrees.length === 0 ? <p className="nodata">未查询到菜单列表</p> : null}
                {!loading && !menuTrees ? <Spin className="load-tree" /> : null}
              </TabPane>
              <TabPane tab="已授权菜单" key="selected">
                {selectMenuTrees && selectMenuTrees.length > 0 ? <DirectoryTree multiple defaultExpandedKeys={selectMenuOpenKeys}>
                  {this.renderTreeNodes(selectMenuTrees)}
                </DirectoryTree> : null}
                {selectMenuTrees && selectMenuTrees.length === 0 ? <p className="nodata">未查询到已授权菜单</p> : null}
                {!loading && !selectMenuTrees ? <Spin className="load-tree" /> : null}
              </TabPane>
            </Tabs>
          </Col>
        </Row>
      </div>
src/tabviews/rolemanage/index.scss
@@ -2,28 +2,32 @@
  min-height: calc(100vh - 94px);
  height: 100%;
  position: relative;
  background: #fafafa;
  padding: 15px;
  
  .role-list {
    min-height: calc(100vh - 125px);
    box-shadow: 0px 0px 2px #eeeeee;
    .ant-card-head {
      padding: 0 10px;
      .role-title {
        display: inline-block;
        width: 100%;
        color: #36c6d3;
        .anticon-bank {
          margin-right: 5px;
        }
        .ant-input-affix-wrapper {
          width: calc(100% - 140px);
          max-width: 130px;
          margin-top: -2px;
          float: right;
          input {
            border-radius: 20px;
            height: 30px;
      .ant-card-head-title {
        padding: 15px 0 10px;
        .role-title {
          display: inline-block;
          width: 100%;
          // color: #36c6d3;
          color: #1890ff;
          .anticon-bank {
            margin-right: 5px;
          }
          .ant-input-affix-wrapper {
            width: calc(100% - 140px);
            max-width: 130px;
            margin-top: -2px;
            float: right;
            input {
              border-radius: 20px;
              height: 30px;
            }
          }
        }
      }
@@ -41,5 +45,35 @@
    left: calc(50vw - 22px);
    top: calc(50vh - 70px);
    z-index: 1;
  }
  .ant-tabs {
    background: #fff;
    min-height: calc(100vh - 125px);
    box-shadow: 0px 0px 2px #eeeeee;
    .ant-tabs-tab {
      padding: 19px 16px 14px;
    }
    .ant-tabs-tab-active.ant-tabs-tab {
      cursor: default;
    }
    .ant-tabs-extra-content {
      padding: 5px 20px 0px 0px;
    }
    .ant-tabs-content {
      .ant-tree li {
        padding: 4px 0px 0px;
      }
      .ant-tree-child-tree > li:first-child {
        padding-top: 6px;
      }
      .load-tree {
        margin-left: 15px;
      }
      .nodata {
        line-height: 50px;
        text-align: center;
        color: #bcbcbc;
      }
    }
  }
}
src/templates/comtableconfig/index.jsx
@@ -1586,6 +1586,25 @@
        }
      }
      if (config.type === 'user') { // 使用已有菜单时,默认添加关联标签id
        config.action = config.action.map(item => {
          if (item.OpenType === 'popview' && !item.linkTab) {
            item.linkTab = Utils.getuuid()
          }
          return item
        })
        config.tabgroups.forEach(group => {
          config[group] = config[group].map(tab => {
            if (!tab.linkTab) {
              tab.linkTab = Utils.getuuid()
            }
            return tab
          })
        })
      }
      let _LongParam = ''
      let _config = {...config, tables: this.state.selectedTables}
      let _pageParam = {...menu.PageParam, OpenType: res.opentype}
@@ -1740,6 +1759,8 @@
          return
        }
  
        let _sort = 0
        let btnParam = {             // 添加菜单按钮
          func: 'sPC_Button_AddUpt',
          Type: 40,                  // 添加菜单下的按钮type为40,按钮下的按钮type为60
@@ -1748,8 +1769,9 @@
          Template: menu.PageParam.Template || '',
          PageParam: '',
          LongParam: '',
          LText: _config.action.map((item, index) => {
            return `select '${item.uuid}' as menuid, '${item.label}' as menuname, '${(index + 1) * 10}' as Sort`
          LText: _config.action.map(item => {
            _sort++
            return `select '${item.uuid}' as menuid, '${item.label}' as menuname, '${_sort * 10}' as Sort`
          })
        }
  
@@ -1764,12 +1786,11 @@
        }
        let _LText = []
        let _index = 1
        _config.tabgroups.forEach(groupId => {
          _config[groupId].forEach(item => {
            _LText.push(`select '${menu.MenuID}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${_index * 10}' as Sort`)
            _index++
            _sort++
            _LText.push(`select '${menu.MenuID}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${_sort * 10}' as Sort`)
          })
        })
@@ -1780,7 +1801,6 @@
        tabParam.secretkey = Utils.encrypt(tabParam.LText, tabParam.timestamp)
  
        let _vals = this.getFuncNames(_config.funcs, [], [])
        // let _funcs = Array.from(new Set(_vals.func))
        let _tables = Array.from(new Set(_vals.table))
        let param = {
@@ -1792,7 +1812,6 @@
          MenuNo: res.menuNo,
          Template: menu.PageParam.Template || '',
          MenuName: res.menuName,
          // Sort: (this.props.supMenuList.length + 1) * 10,
          PageParam: JSON.stringify(_pageParam),
          LongParam: _LongParam,
          LText: _vals.func.map(item => `select '${menu.MenuID}' as MenuID,'${item.func}' as ProcName,'${item.label}' as MenuName`),
src/templates/formtabconfig/index.jsx
@@ -1472,6 +1472,8 @@
          return
        }
  
        let _sort = 0 // 按钮及标签排序
        let btnParam = { // 添加菜单按钮
          func: 'sPC_Button_AddUpt',
          Type: 60,      // 添加按钮表单页下的按钮
@@ -1481,7 +1483,8 @@
          PageParam: '',
          LongParam: '',
          LText: config.action.map((item, index) => {
            return `select '${item.uuid}' as menuid, '${item.label}' as menuname, '${(index + 1) * 10}' as Sort`
            _sort++
            return `select '${item.uuid}' as menuid, '${item.label}' as menuname, '${_sort * 10}' as Sort`
          })
        }
  
@@ -1496,12 +1499,11 @@
        }
        
        let _LText = []
        let _index = 1
        config.tabgroups.forEach(groupId => {
          config[groupId].forEach(item => {
            _LText.push(`select '${btnTab.uuid}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${_index * 10}' as Sort`)
            _index++
            _sort++
            _LText.push(`select '${btnTab.uuid}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${_sort * 10}' as Sort`)
          })
        })
src/templates/tableshare/tabdragelement/index.jsx
@@ -54,7 +54,7 @@
      newcard.supMenu = 'mainTable'
      newcard.groupId = groupId
      newcard.focus = true
      let targetId = cards.length > 0 ? cards[cards.length - 1].uuid : 0
      if (target) {
        targetId = target.uuid
src/views/login/index.jsx
@@ -118,8 +118,7 @@
        localStorage.setItem('AuthCode', box)
        this.setState({
          auth: true,
          loaded: true
          auth: true
        })
      } else {
        localStorage.removeItem('AuthCode')
@@ -154,6 +153,7 @@
            isDisabled={this.state.isDisabled}
            changelang={(value) => this.changelang(value)}
            handleSubmit={() => this.handleSubmit()}
            loaded={() => this.setState({ loaded: true })}
            wrappedComponentRef={(inst) => this.loginformRef = inst}
          />
        </div>
src/views/login/loginform.jsx
@@ -10,6 +10,7 @@
    isDisabled: PropTypes.bool,
    changelang: PropTypes.func,
    handleSubmit: PropTypes.func,
    loaded: PropTypes.func,
    dict: PropTypes.object,
    auth: PropTypes.bool,
    lang: PropTypes.string,
@@ -51,7 +52,20 @@
      })
      return
    }
    this.props.handleSubmit()
    if (!this.props.form.getFieldValue('username')) {
      const input = document.getElementById('username')
      if (input) {
        input.focus()
      }
    } else if (!this.props.form.getFieldValue('password')) {
      const input = document.getElementById('password')
      if (input) {
        input.focus()
      }
    } else {
      this.props.handleSubmit()
    }
  }
  componentDidMount () {
@@ -83,6 +97,7 @@
        input.focus()
      }
    }
    this.props.loaded()
  }
  render() {