king
2020-06-08 1ed3cfb3778e13904839e9729cb5b4ce9f5c905d
2020-06-08
8个文件已修改
2个文件已添加
281 ■■■■■ 已修改文件
src/components/header/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/home/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/home/index.scss 71 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/login/index.jsx 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/login/index.scss 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/rolemanage/index.jsx 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/tabscomponent/tabform/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobile/index.jsx 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobile/index.scss 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/index.jsx
@@ -678,7 +678,7 @@
        {this.props.editLevel === 'level4' ? <Button className="level4-close" type="primary" onClick={this.exitManage}>退出</Button> : null}
        {/* 进入编辑按钮 */}
        {this.props.editState && !this.props.editLevel ? <Icon onClick={this.enterEdit} className="edit-check" type="edit" /> : null}
        {this.props.editState && !this.props.editLevel ? <a href="#/mobile" target="blank" className="mobile" type="edit"> 移动端 <Icon type="arrow-right" /></a> : null}
        {/* {this.props.editState && !this.props.editLevel ? <a href="#/mobile" target="blank" className="mobile" type="edit"> 移动端 <Icon type="arrow-right" /></a> : null} */}
        {/* 编辑菜单 */}
        {this.props.editLevel === 'level1' ? <EditMenu menulist={this.state.menulist} reload={this.reload} exitEdit={this.exitEdit}/> : null}
        {/* 头像、用户名 */}
src/mob/home/index.jsx
@@ -35,7 +35,6 @@
      <div className="mob-home">
        <Tabs tabs={tabs2}
          initialPage={1}
          className="home"
          tabBarPosition="bottom"
          renderTab={tab => <span>{tab.title}</span>}
        >
src/mob/home/index.scss
@@ -1,44 +1,37 @@
.mob-header-container {
.mob-home {
  width: 100%;
  height: 48px;
  color: rgba(255, 255, 255, 0.65);
  background: #001529;
  border-bottom: 1px solid #000;
  .header-logo {
    float: left;
    width: 180px;
    line-height: 48px;
    text-align: center;
    padding-left: 5px;
    box-sizing: border-box;
    opacity: 1;
    img {
      max-width: 100%;
      max-height: 40px;
  height: 100%;
  overflow: hidden;
  > .am-tabs {
    > .am-tabs-tab-bar-wrap {
      .am-tabs-default-bar-underline {
        display: none;
      }
      .am-tabs-default-bar-tab {
        cursor: pointer;
      }
    }
  }
  .header-setting {
    float: right;
    line-height: 48px;
    margin-right: 10px;
    img {
      width: 29px;
      height: 29px;
      border-radius: 30px;
      margin-right: 7px;
    }
    span {
      color: #ffffff;
      font-size: 0.95rem;
      .username {
        display: inline-block;
        height: 30px;
        max-width: 95px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    > .am-tabs-content-wrap {
      > .am-tabs-pane-wrap {
        .home-tab {
          display: flex;
          align-items: center;
          justify-content: center;
        }
      }
      > .am-tabs-pane-wrap::-webkit-scrollbar {
        width: 4px;
      }
      > .am-tabs-pane-wrap::-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;
      }
      > .am-tabs-pane-wrap::-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;
      }
    }
  }
src/mob/login/index.jsx
New file
@@ -0,0 +1,32 @@
import React, {Component} from 'react'
// import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
// import { Flex, WhiteSpace, Tabs } from 'antd-mobile'
import zhCN from '@/locales/zh-CN/mob.js'
import enUS from '@/locales/en-US/mob.js'
import './index.scss'
class MobLogin extends Component {
  // static propTpyes = {
  //   collapse: PropTypes.bool,
  // }
  state = {
    dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
  }
  render () {
    return (
      <div className="mob-login">
      </div>
    )
  }
}
export default MobLogin
src/mob/login/index.scss
New file
@@ -0,0 +1,6 @@
.mob-login {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
src/tabviews/rolemanage/index.jsx
@@ -373,7 +373,7 @@
  /**
   * @description 提交已选的权限
   */
  roleSubmit = async () => {
  roleSubmit = () => {
    const { checkedKeys, halfCheckedKeys, selectRoleId, initCheckKeys } = this.state
    let _keys = []
@@ -401,34 +401,64 @@
      })
    }
    let localParam = fromJS(param).toJS()
    localParam.func = 's_rolemenu_sub_local'
    this.setState({
      submitloading: true
    })
    let result = await Api.getSystemConfig(param)
    if (result.status) {
      notification.success({
        top: 92,
        message: '保存成功',
        duration: 2
      })
      this.setState({
        submitloading: false,
        loadingTree: true
      }, () => {
        this.getSelectMenuList()
      })
    } else {
      this.setState({
        submitloading: false
      })
      notification.warning({
        top: 92,
        message: result.message,
        duration: 5
      })
    }
    Api.getSystemConfig(param).then(result => {
      if (result.status) {
        if (!window.GLOB.mainSystemApi) {
          notification.success({
            top: 92,
            message: '保存成功',
            duration: 2
          })
          this.setState({
            submitloading: false,
            loadingTree: true
          }, () => {
            this.getSelectMenuList()
          })
        } else {
          Api.getLocalConfig(localParam).then(res => {
            if (res.status) {
              notification.success({
                top: 92,
                message: '保存成功',
                duration: 2
              })
              this.setState({
                submitloading: false,
                loadingTree: true
              }, () => {
                this.getSelectMenuList()
              })
            } else {
              this.setState({
                submitloading: false
              })
              notification.warning({
                top: 92,
                message: res.message,
                duration: 5
              })
            }
          })
        }
      } else {
        this.setState({
          submitloading: false
        })
        notification.warning({
          top: 92,
          message: result.message,
          duration: 5
        })
      }
    })
  }
  UNSAFE_componentWillMount () {
src/templates/sharecomponent/tabscomponent/tabform/index.jsx
@@ -275,9 +275,10 @@
          } else if (values.supMenu && values.supMenu === 'mainTable' && values.level === 0) {
            notification.warning({
              top: 92,
              message: '上级标签为主表,且设置显示级别为0时,会造成子表中按钮不可用!',
              message: '显示级别为0时,上级标签不可关联主表!',
              duration: 5
            })
            return
          }
          resolve(values)
src/utils/utils.js
@@ -847,6 +847,8 @@
    let verify = btn.verify || {}
    let _formFieldValue = {}
    let _actionType = null
    let appkey = window.GLOB.appkey || ''
    let sessionUid = sessionStorage.getItem('SessionUid') || ''
    if (verify.default !== 'false') { // 判断是否使用默认sql
      _actionType = btn.sqlType
@@ -897,6 +899,12 @@
    // 获取字段键值对
    if (formdata) {
      formdata.forEach(form => {
        if (form.type === 'text') { // 特殊字段替换
          form.value = form.value.replace(/^(\s*)@appkey@(\s*)$/ig, appkey)
          form.value = form.value.replace(/^(\s*)@SessionUid@(\s*)$/ig, sessionUid)
          form.value = form.value.replace(/^(\s*)@bid@(\s*)$/ig, BID)
        }
        _formFieldValue[form.key] = form.value
        let _key = form.key.toLowerCase()
@@ -1100,9 +1108,14 @@
          if (_field.toLowerCase() === 'bid' && !hasBid) { // 表单中没有bid则使用系统bid变量
            _fval = '@BID@'
          }
          arr.push(_field.toLowerCase())
          _fieldValue.push(`${_field}=${_fval}`)
          if (_field.toLowerCase() === 'bid' && tab && tab.foreignKey) {
            arr.push(tab.foreignKey.toLowerCase())
            _fieldValue.push(`${tab.foreignKey}=${_fval}`)
          } else {
            arr.push(_field.toLowerCase())
            _fieldValue.push(`${_field}=${_fval}`)
          }
          _value.push(`${_labels[index] || ''}:${_formFieldValue[_field] || ''}`)
        })
src/views/mobile/index.jsx
@@ -1,6 +1,6 @@
import React, {Component} from 'react'
import {connect} from 'react-redux'
// import { message, Modal } from 'antd'
import { Icon } from 'antd'
// import Api from '@/api'
import zhCN from '@/locales/zh-CN/login.js'
@@ -11,6 +11,7 @@
const Header = asyncComponent(() => import('@/mob/header'))
const Home = asyncComponent(() => import('@/mob/home'))
// const Login = asyncComponent(() => import('@/mob/login'))
class Mobile extends Component {
  state = {
@@ -32,13 +33,15 @@
        <Header />
        <div className="mob-body">
          <div className="mob-tool">
            <div className="mob-tool-item"><Icon type="plus-circle" />添 加 内 容</div>
          </div>
          <div className="mob-shell">
            <div className="mob-shell-inner">
              <Home />
            </div>
          </div>
          <div className="mob-setting">
          </div>
        </div>
      </div>
    )
src/views/mobile/index.scss
@@ -6,6 +6,7 @@
    overflow: hidden;
    position: relative;
    background: #262626;
    padding: 0px 300px 0px 40px;
    .mob-tool {
      position: absolute;
@@ -15,6 +16,30 @@
      width: 40px;
      background: #262626;
      box-shadow: 2px 0px 2px #000;
      .mob-tool-item {
        color: #ffffff;
        width: 100%;
        display: flex;
        align-items: center;
        writing-mode: tb-rl;
        padding: 16px 0;
        border-bottom: 1px solid #000;
        cursor: pointer;
        i {
          margin-bottom: 5px;
          margin-left: 2px;
        }
      }
    }
    .mob-setting {
      position: absolute;
      right: 0;
      top: 0;
      height: 100%;
      width: 300px;
      background: #262626;
      box-shadow: 0px 2px 2px #000;
    }
    .mob-shell {
@@ -50,41 +75,6 @@
    }
  }
  .mob-home {
    width: 100%;
    height: 100%;
    overflow: hidden;
    > .am-tabs {
      > .am-tabs-tab-bar-wrap {
        .am-tabs-default-bar-underline {
          display: none;
        }
      }
      > .am-tabs-content-wrap {
        > .am-tabs-pane-wrap {
          .home-tab {
            display: flex;
            align-items: center;
            justify-content: center;
          }
        }
        > .am-tabs-pane-wrap::-webkit-scrollbar {
          width: 4px;
        }
        > .am-tabs-pane-wrap::-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;
        }
        > .am-tabs-pane-wrap::-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;
        }
      }
    }
  }
  .flex-container {
    margin: 0 15px;
  }