| | |
| | | {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} |
| | | {/* 头像、用户名 */} |
| | |
| | | <div className="mob-home"> |
| | | <Tabs tabs={tabs2} |
| | | initialPage={1} |
| | | className="home" |
| | | tabBarPosition="bottom" |
| | | renderTab={tab => <span>{tab.title}</span>} |
| | | > |
| | |
| | | .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; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | 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 |
New file |
| | |
| | | .mob-login { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow: hidden; |
| | | |
| | | } |
| | |
| | | /** |
| | | * @description 提交已选的权限 |
| | | */ |
| | | roleSubmit = async () => { |
| | | roleSubmit = () => { |
| | | const { checkedKeys, halfCheckedKeys, selectRoleId, initCheckKeys } = this.state |
| | | |
| | | let _keys = [] |
| | |
| | | }) |
| | | } |
| | | |
| | | 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 () { |
| | |
| | | } else if (values.supMenu && values.supMenu === 'mainTable' && values.level === 0) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '上级标签为主表,且设置显示级别为0时,会造成子表中按钮不可用!', |
| | | message: '显示级别为0时,上级标签不可关联主表!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | resolve(values) |
| | |
| | | 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 |
| | |
| | | // 获取字段键值对 |
| | | 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() |
| | | |
| | |
| | | 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] || ''}`) |
| | | }) |
| | | |
| | |
| | | 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' |
| | |
| | | |
| | | const Header = asyncComponent(() => import('@/mob/header')) |
| | | const Home = asyncComponent(() => import('@/mob/home')) |
| | | // const Login = asyncComponent(() => import('@/mob/login')) |
| | | |
| | | class Mobile extends Component { |
| | | state = { |
| | |
| | | <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> |
| | | ) |
| | |
| | | overflow: hidden; |
| | | position: relative; |
| | | background: #262626; |
| | | padding: 0px 300px 0px 40px; |
| | | |
| | | .mob-tool { |
| | | position: absolute; |
| | |
| | | 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 { |
| | |
| | | } |
| | | } |
| | | |
| | | .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; |
| | | } |