king
2021-08-13 f09b1de478595fe1ff1a46aa224acc3ec6fae402
2021-08-13
17个文件已修改
255 ■■■■ 已修改文件
src/assets/css/viewstyle.scss 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/breadview/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/index.jsx 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/index.scss 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/data-card/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/prop-card/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/carousel/data-card/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/carousel/prop-card/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/tabbutton/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/menuform/index.jsx 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/menuform/index.scss 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/dragelement/card.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.jsx 72 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/main/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/menuform/index.jsx 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/viewstyle.scss
@@ -50,6 +50,19 @@
    }
  }
  .menu-board {
    .menu-wrap {
      .title {
        color: $color6;
      }
      .menu-detail {
        div:hover {
          color: $color5;
        }
      }
    }
  }
  #root > .mk-main-view {
    > .header-container {
      background: $bg1;
src/components/breadview/index.jsx
@@ -34,7 +34,7 @@
  state = {
    tabview: null, // 标签
    dict: sessionStorage.getItem('lang') !== 'en-US' ? mzhCN : menUS,
    hasNavBar: window.GLOB.navBar !== 'linkage'
    hasNavBar: window.GLOB.navBar === 'linkage_navigation'
  }
  refreshTabview = () => {
src/components/header/index.jsx
@@ -49,7 +49,8 @@
    oriVersion: '',
    newVersion: '',
    debug: sessionStorage.getItem('debug') === 'true',
    navBar: ['linkage_navigation', 'linkage'].includes(window.GLOB.navBar) ? 'topmenu' : ''
    navBar: ['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar) ? 'topmenu' : '',
    menuType: window.GLOB.navBar
  }
  handleCollapse = () => {
@@ -308,8 +309,9 @@
                ParentNames: [fst.MenuName, snd.MenuName],
                MenuNo: trd.MenuNo,
                EasyCode: trd.EasyCode,
                type: 'CommonTable',            // 默认值为常用表
                OpenType: 'newtab'              // 打开方式
                type: 'CommonTable',
                OpenType: 'newtab',
                hidden: 'false'
              }
  
              if (trd.LinkUrl && iframes.includes(trd.LinkUrl.split('?')[0])) {
@@ -324,6 +326,7 @@
                trdItem.type = trdItem.PageParam.Template || trdItem.type
                trdItem.OpenType = trdItem.PageParam.OpenType || trdItem.OpenType
                trdItem.hidden = trdItem.PageParam.hidden || trdItem.hidden
                if (trdItem.type === 'NewPage') {
                  trdItem.src = trdItem.PageParam.url || ''
@@ -356,6 +359,8 @@
              return trdItem
            })
          }
          sndItem.children = sndItem.children.filter(item => item.hidden !== 'true')
          return sndItem
        })
@@ -697,7 +702,7 @@
  render () {
    const { mainMenu, collapse } = this.props
    const { thdMenuList, searchkey, oriVersion, newVersion, debug, menulist, navBar } = this.state
    const { thdMenuList, searchkey, oriVersion, newVersion, debug, menulist, navBar, menuType } = this.state
    const menu = (
      <Menu className="header-dropdown">
@@ -737,8 +742,7 @@
            })}
          </ul> : null
        }
        {/* 正常菜单 */}
        {navBar === 'topmenu' && menulist ?
        {navBar === 'topmenu' && menuType !== 'menu_board' && menulist ?
          <ul className="header-menu vertical-menu">{
            menulist.map(item => {
              if (item.children && item.children.length > 0) {
@@ -781,6 +785,60 @@
            })}
          </ul> : null
        }
        {navBar === 'topmenu' && menuType === 'menu_board' && menulist ?
          <ul className="header-menu vertical-menu">{
            menulist.map(item => {
              if (item.children && item.children.length > 0) {
                return (
                  <Dropdown key={item.MenuID} placement="bottomCenter" overlayClassName="vertical-dropdown-menu" overlay={
                    <div className="menu-board">
                      {item.children.map(cell => {
                        return (
                          <div className="menu-wrap" key={cell.MenuID}>
                            <div className="title" onClick={e => e.stopPropagation()}>{cell.MenuName}</div>
                            <div className="menu-detail">
                              {cell.children && cell.children.map(m => (
                                <div key={m.MenuID} title={m.MenuName} onClick={() => {this.changeVerMenu(m)}}>
                                  {m.MenuName}
                                </div>
                              ))}
                            </div>
                          </div>
                        )
                      })}
                    </div>
                    // <Menu mode="horizontal">
                    //   {item.children.map(cell => {
                    //     return (
                    //       <Menu.Item key={cell.MenuID}>
                    //         <div>{cell.MenuName}</div>
                    //         <div>
                    //           {cell.children && cell.children.map(m => (
                    //             <Menu.Item key={m.MenuID} onClick={() => {this.changeVerMenu(m)}}>
                    //               {m.MenuName}
                    //             </Menu.Item>
                    //           ))}
                    //         </div>
                    //       </Menu.Item>
                    //     )
                    //   })}
                    // </Menu>
                  }>
                    <li>
                      <span>{item.MenuName}</span>
                    </li>
                  </Dropdown>
                )
              } else {
                return (
                  <li key={item.MenuID} onClick={() => {this.changeVerMenu(item, 'first')}}>
                    <span>{item.MenuName}</span>
                  </li>
                )
              }
            })}
          </ul> : null
        }
        {/* 头像、用户名 */}
        <Dropdown className="header-setting" overlay={menu}>
          <div>
src/components/header/index.scss
@@ -178,3 +178,42 @@
    padding-right: 30px;
  }
}
.menu-board {
  background: #ffffff;
  padding: 20px 50px;
  border-radius: 4px;
  box-shadow: 0 0 3px #959595;
  position: relative;
  left: 11.8%;
  .menu-wrap {
    .title {
      color: #1890ff;
      font-size: 15px;
      font-weight: 600;
    }
    .menu-detail {
      max-width: 60vw;
      padding: 5px 0 10px 15px;
      div {
        float: left;
        margin-bottom: 5px;
        width: 120px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        cursor: pointer;
      }
      div:hover {
        color: #40a9ff;
      }
      div:not(:last-child) {
        margin-right: 20px;
      }
    }
    .menu-detail::after {
      content: ' ';
      display: block;
      clear: both;
    }
  }
}
src/tabviews/custom/components/card/data-card/index.jsx
@@ -566,7 +566,7 @@
        newtab.param.$BID = item.$$uuid
      }
      if (['linkage_navigation', 'linkage'].includes(window.GLOB.navBar)) {
      if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
        this.props.modifyTabview([newtab])
      } else {
        let tabs = this.props.tabviews.filter((tab, i) => {
src/tabviews/custom/components/card/prop-card/index.jsx
@@ -356,7 +356,7 @@
        newtab.param.$BID = item.setting.primaryId || ''
      }
      if (['linkage_navigation', 'linkage'].includes(window.GLOB.navBar)) {
      if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
        this.props.modifyTabview([newtab])
      } else {
        let tabs = this.props.tabviews.filter((tab, i) => {
src/tabviews/custom/components/carousel/data-card/index.jsx
@@ -266,7 +266,7 @@
        newtab.param.$BID = item.$$uuid
      }
      if (['linkage_navigation', 'linkage'].includes(window.GLOB.navBar)) {
      if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
        this.props.modifyTabview([newtab])
      } else {
        let tabs = this.props.tabviews.filter((tab, i) => {
src/tabviews/custom/components/carousel/prop-card/index.jsx
@@ -263,7 +263,7 @@
        newtab.param.$BID = item.setting.primaryId
      }
      if (['linkage_navigation', 'linkage'].includes(window.GLOB.navBar)) {
      if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
        this.props.modifyTabview([newtab])
      } else {
        let tabs = this.props.tabviews.filter((tab, i) => {
src/tabviews/zshare/actionList/tabbutton/index.jsx
@@ -157,7 +157,7 @@
      return tab.MenuID !== newtab.MenuID
    })
    if (['linkage_navigation', 'linkage'].includes(window.GLOB.navBar)) {
    if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
      this.props.modifyTabview([newtab])
    } else {
      if (tabviews.length !== tabs.length) {
src/templates/comtableconfig/index.jsx
@@ -402,7 +402,7 @@
      EasyCode: _config.easyCode || '',
      Template: _config.Template || '',
      MenuName: _config.MenuName,
      PageParam: JSON.stringify({...menu.PageParam, Template: _config.Template, OpenType: _config.OpenType}),
      PageParam: JSON.stringify({...menu.PageParam, Template: _config.Template, OpenType: _config.OpenType, hidden: _config.hidden || 'false'}),
      LongParam: _LongParam,
      LText: _vals.func.map(item => `select '${menu.MenuID}' as MenuID,'${item.func}' as ProcName,'${item.label}' as MenuName`),
      LTexttb: _vals.table.map(item => `select '${menu.MenuID}' as MenuID,'${item}' as tbName`)
src/templates/comtableconfig/menuform/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Form, Row, Col, Input, Select } from 'antd'
import { Form, Row, Col, Input, Select, Switch } from 'antd'
import { formRule } from '@/utils/option.js'
import './index.scss'
@@ -50,6 +50,10 @@
      this.setState({}, () => {
        this.props.updatemenu({...config, OpenType: value})
      })
    } else if (key === 'hidden') {
      this.setState({}, () => {
        this.props.updatemenu({...config, hidden: value})
      })
    }
  }
@@ -96,7 +100,7 @@
    }
    return (
      <Form {...formItemLayout} className="ant-advanced-search-form" id="subqazxcvbn">
      <Form {...formItemLayout} className="comtable-menu-form" id="subqazxcvbn">
        <Row gutter={24}>
          <Col span={24}>
            <Form.Item label={dict['model.menu.level1']}>
@@ -206,6 +210,13 @@
              })(<Input placeholder="" autoComplete="off" onChange={this.changeEasyCode}/>)}
            </Form.Item>
          </Col>
          <Col span={24}>
            <Form.Item className="hidden-menu" labelCol={{span: 8}} wrapperCol={{span: 16}} label={'隐藏菜单'}>
              <Switch checkedChildren={'是'} defaultChecked={menu.PageParam ? (menu.PageParam.hidden === 'true') : false} unCheckedChildren={'否'} onChange={(value) => {
                this.selectChange('hidden', value + '')
              }} />
            </Form.Item>
          </Col>
        </Row>
      </Form>
    )
src/templates/comtableconfig/menuform/index.scss
@@ -0,0 +1,7 @@
.comtable-menu-form {
  .hidden-menu {
    .ant-form-item-control {
      line-height: 25px;
    }
  }
}
src/templates/modalconfig/dragelement/card.jsx
@@ -134,7 +134,7 @@
      </div>
    } trigger="hover">
      <div className="page-card" style={{ opacity: opacity}}>
        <div ref={node => drag(drop(node))}>
        <div ref={node => drag(drop(node))} onDoubleClick={edit}>
          {card.type === 'split' ? formItem : <Form.Item
            className="ant-form-item"
            colon={!!_label}
src/views/login/index.jsx
@@ -41,9 +41,7 @@
    syncApp: false,
    loginWays: null,
    touristLogin: false,
    syncing: false,
    ipAddress: '',
    city: ''
    syncing: false
  }
  changelang (item) {
@@ -72,13 +70,15 @@
   * @param {Object} param 用户名密码等信息
   */
  async loginsubmit (param) {
    const { ipAddress, city } = this.state
    if (options.sysType === 'local' && !window.GLOB.mainSystemApi) { // 业务系统必须设置单点地址
      Modal.warning({
        title: '未设置单点服务器地址,请联系管理员!'
      })
      return
    }
    let city = sessionStorage.getItem('city') || ''
    let ipAddress = sessionStorage.getItem('ipAddress') || ''
    // 登录提交
    let res = await Api.getusermsg(param.username, param.password, false, ipAddress, city)
@@ -143,13 +143,15 @@
  }
  async phoneloginsubmit (param) {
    const { ipAddress, city } = this.state
    if (options.sysType === 'local' && !window.GLOB.mainSystemApi) { // 业务系统必须设置单点地址
      Modal.warning({
        title: '未设置单点服务器地址,请联系管理员!'
      })
      return
    }
    let city = sessionStorage.getItem('city') || ''
    let ipAddress = sessionStorage.getItem('ipAddress') || ''
    // 登录提交
    let res = await Api.getphoneusermsg(param.phone, param.vercode, false, ipAddress, city)
@@ -196,19 +198,57 @@
    }
  }
  jsonp(url) {
    return new Promise((resolve, reject) => {
      window.jsonCallBack = (result) => {
        resolve(result)
      }
      const JSONP = document.createElement('script')
      JSONP.type = 'text/javascript'
      JSONP.src = url
      document.getElementsByTagName('head')[0].appendChild(JSONP)
      setTimeout(() => {
        document.getElementsByTagName('head')[0].removeChild(JSONP)
      },500)
    })
}
  componentDidMount () {
    // md5("/ws/location/v1/ip?callback=callbackFunction&key=key&output=jsonp secret key")
    // md5("/ws/location/v1/ip?callback=callbackFunction&key=BA7BZ-4QB65-LFCIA-QPDA6-4G6O7-MJB4Q&output=jsonpuThL4ZM3XOj642ksEQh76tyHFjh4")
    // 获取ip及城市信息
    // 获取地理位置:谷歌无效,谷歌定位需要将附近的无线信息发送到谷歌的服务器,查询定位信息,国内无法连接到谷歌服务器,火狐可以获取经纬度
    // let ipurl = window.atob('aHR0cHM6Ly9lcGMubWs5a$mkC5jbi93ZWJhcGkvaXBsb2M='.replace(/\$mk/ig, ''))
    // Api.directRequest(ipurl, 'get', null, 'true').then(res => {
    //   if (!res || !res.location) return
    //   sessionStorage.setItem('city', res.location)
    //   this.setState({
    //     ipAddress: res.ip || '',
    //     city: res.location
    //   })
    //   if (!res || !res.ip) return
    //   sessionStorage.setItem('ipAddress', res.ip)
    // })
    sessionStorage.setItem('city', '') // ip地址定位暂停使用
    const _addressUrl = window.location.href.split('#')[0] + 'queryAddress'
    if (_addressUrl === 'false') {
      sessionStorage.setItem('city', '')
      sessionStorage.setItem('ipAddress', '')
    } else {
      window.callbackFunction = (res) => {
        if (res.result && res.result.ad_info) {
          sessionStorage.setItem('city', res.result.ad_info.city)
          sessionStorage.setItem('ipAddress', res.result.ip)
        }
      }
      const JSONP = document.createElement('script')
      JSONP.type = 'text/javascript'
      JSONP.src = 'https://apis.map.qq.com/ws/location/v1/ip?callback=callbackFunction&key=BA7BZ-4QB65-LFCIA-QPDA6-4G6O7-MJB4Q&output=jsonp&sig=3e5ebecb324ba266bf80014dcc8380db'
      document.getElementsByTagName('head')[0].appendChild(JSONP)
      setTimeout(() => {
        document.getElementsByTagName('head')[0].removeChild(JSONP)
      },500)
    }
    const timeStamp = new Date().getTime()
    const _authUrl = window.location.href.split('#')[0] + 'AuthCode'
@@ -284,6 +324,12 @@
              auth: false
            })
          }
          if (res.query_address === 'false') {
            localStorage.setItem(_addressUrl, 'false')
          } else {
            localStorage.setItem(_addressUrl, 'true')
          }
        } else if (res.ErrCode === 'N') {
          localStorage.removeItem(_authUrl)
          this.setState({
src/views/main/index.jsx
@@ -22,7 +22,7 @@
  render () {
    const { navBar } = this.state
    const isSideMenu = !['linkage_navigation', 'linkage'].includes(navBar)
    const isSideMenu = !['linkage_navigation', 'linkage', 'menu_board'].includes(navBar)
    return (
      <div className="mk-main-view">
src/views/menudesign/index.jsx
@@ -516,7 +516,7 @@
        EasyCode: config.easyCode || '',
        Template: 'CustomPage',
        MenuName: config.MenuName || '',
        PageParam: JSON.stringify({Template: 'CustomPage', OpenType: config.OpenType || 'newtab'}),
        PageParam: JSON.stringify({Template: 'CustomPage', OpenType: config.OpenType || 'newtab', hidden: config.hidden || 'false'}),
        LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))),
        open_edition: config.open_edition,
        LText: '',
src/views/menudesign/menuform/index.jsx
@@ -1,6 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Input, Select, notification, Radio, Icon, Tooltip, InputNumber } from 'antd'
import { Form, Row, Col, Input, Select, notification, Radio, Icon, Tooltip, InputNumber, Switch } from 'antd'
import Api from '@/api'
import options from '@/store/options.js'
@@ -135,6 +135,8 @@
      this.props.updateConfig({...config, timeUnit: value})
    } else if (key === 'OpenType') {
      this.props.updateConfig({...config, OpenType: value})
    } else if (key === 'hidden') {
      this.props.updateConfig({...config, hidden: value})
    }
  }
@@ -257,10 +259,10 @@
                  }
                ]
              })(
                <Select onChange={(value) => {this.selectChange('OpenType', value)}}>
                  <Select.Option value="newtab">标签页</Select.Option>
                  <Select.Option value="newpage">新页面</Select.Option>
                </Select>
                <Radio.Group onChange={(e) => {this.selectChange('OpenType', e.target.value)}}>
                  <Radio value="newtab">标签页</Radio>
                  <Radio value="newpage">新页面</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col>
@@ -315,6 +317,13 @@
              })(<Input placeholder="" autoComplete="off" onChange={this.changeEasyCode}/>)}
            </Form.Item>
          </Col>
          <Col span={24}>
            <Form.Item label={'隐藏菜单'}>
              <Switch checkedChildren={'是'} checked={config.hidden === 'true'} unCheckedChildren={'否'} onChange={(value) => {
                this.selectChange('hidden', value + '')
              }} />
            </Form.Item>
          </Col>
        </Row>
      </Form>
    )