| | |
| | | } |
| | | } |
| | | |
| | | .menu-board { |
| | | .menu-wrap { |
| | | .title { |
| | | color: $color6; |
| | | } |
| | | .menu-detail { |
| | | div:hover { |
| | | color: $color5; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | #root > .mk-main-view { |
| | | > .header-container { |
| | | background: $bg1; |
| | |
| | | state = { |
| | | tabview: null, // 标签 |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? mzhCN : menUS, |
| | | hasNavBar: window.GLOB.navBar !== 'linkage' |
| | | hasNavBar: window.GLOB.navBar === 'linkage_navigation' |
| | | } |
| | | |
| | | refreshTabview = () => { |
| | |
| | | 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 = () => { |
| | |
| | | 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])) { |
| | |
| | | |
| | | 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 || '' |
| | |
| | | return trdItem |
| | | }) |
| | | } |
| | | |
| | | sndItem.children = sndItem.children.filter(item => item.hidden !== 'true') |
| | | |
| | | return sndItem |
| | | }) |
| | |
| | | |
| | | 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"> |
| | |
| | | })} |
| | | </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) { |
| | |
| | | })} |
| | | </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> |
| | |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | |
| | | 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) => { |
| | |
| | | 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) => { |
| | |
| | | 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) => { |
| | |
| | | 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) => { |
| | |
| | | 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) { |
| | |
| | | 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`) |
| | |
| | | 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' |
| | | |
| | |
| | | this.setState({}, () => { |
| | | this.props.updatemenu({...config, OpenType: value}) |
| | | }) |
| | | } else if (key === 'hidden') { |
| | | this.setState({}, () => { |
| | | this.props.updatemenu({...config, hidden: value}) |
| | | }) |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | 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']}> |
| | |
| | | })(<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> |
| | | ) |
| | |
| | | .comtable-menu-form { |
| | | .hidden-menu { |
| | | .ant-form-item-control { |
| | | line-height: 25px; |
| | | } |
| | | } |
| | | } |
| | |
| | | </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} |
| | |
| | | syncApp: false, |
| | | loginWays: null, |
| | | touristLogin: false, |
| | | syncing: false, |
| | | ipAddress: '', |
| | | city: '' |
| | | syncing: false |
| | | } |
| | | |
| | | changelang (item) { |
| | |
| | | * @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) |
| | |
| | | } |
| | | |
| | | 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) |
| | |
| | | } |
| | | } |
| | | |
| | | 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' |
| | | |
| | |
| | | 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({ |
| | |
| | | |
| | | 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"> |
| | |
| | | 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: '', |
| | |
| | | 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' |
| | |
| | | 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}) |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | ] |
| | | })( |
| | | <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> |
| | |
| | | })(<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> |
| | | ) |