| | |
| | | appkey: window.GLOB.appkey |
| | | } |
| | | |
| | | let url = window.GLOB.mainSystemApi |
| | | let url = window.GLOB.mainSystemApi || '/webapi/dostars' |
| | | param = this.encryptParam(param) |
| | | |
| | | return axios({ |
| | |
| | | render() { |
| | | const { value, card } = this.props |
| | | let color = card.color |
| | | let size = card.qrWidth || 50 |
| | | |
| | | if (/rgb/ig.test(color)) { |
| | | color = this.hexify(color) |
| | |
| | | <div className="qrcode-box"> |
| | | <QrCode |
| | | value={value} |
| | | size={card.qrWidth || 50} |
| | | size={size} |
| | | fgColor={color} |
| | | imageSettings={card.url ? { |
| | | src: card.url, |
| | | height: (card.qrWidth || 50) / 4, |
| | | width: (card.qrWidth || 50) / 4, |
| | | height: size / 5, |
| | | width: size / 5, |
| | | excavate: true |
| | | } : null}/> |
| | | </div> |
| | |
| | | |
| | | if (comIds.length !== 3 || comIds[0] !== cards.uuid || comIds[1] !== cardCell.uuid || !card) return |
| | | |
| | | if (card.eleType === 'button') { |
| | | if ((style.paddingLeft || style.paddingRight) && !style.width) { |
| | | style.width = 'auto' |
| | | } |
| | | } |
| | | |
| | | let _card = this.resetCardStyle(card, style) |
| | | |
| | | let _elements = elements.map(cell => { |
| | |
| | | MKEmitter.emit('changeStyle', [tabs.uuid], ['background', 'border', 'padding', 'margin', 'shadow'], tabs.style) |
| | | } |
| | | |
| | | changeTabStyle = () => { |
| | | const { tabs } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', [tabs.uuid, 'tab'], ['font', 'padding'], tabs.tabStyle || {}) |
| | | } |
| | | |
| | | getStyle = (comIds, style) => { |
| | | const { tabs } = this.state |
| | | |
| | | if (comIds.length !== 1 || comIds[0] !== tabs.uuid) return |
| | | if (comIds[0] !== tabs.uuid) return |
| | | |
| | | let _card = {...tabs, style} |
| | | if (comIds.length === 1) { |
| | | let _card = {...tabs, style} |
| | | |
| | | this.setState({ |
| | | tabs: _card |
| | | }) |
| | | |
| | | this.props.updateConfig(_card) |
| | | this.setState({ |
| | | tabs: _card |
| | | }) |
| | | |
| | | this.props.updateConfig(_card) |
| | | } else if (comIds[1] === 'tab') { |
| | | let _card = {...tabs, tabStyle: style} |
| | | |
| | | this.setState({ |
| | | tabs: _card |
| | | }) |
| | | |
| | | this.props.updateConfig(_card) |
| | | } |
| | | } |
| | | |
| | | handleTabsChange = (parentId) => { |
| | |
| | | render() { |
| | | const { tabs, dict, labelvisible, editab, appType } = this.state |
| | | let _style = resetStyle(tabs.style) |
| | | let _tabStyle = resetStyle(tabs.tabStyle) |
| | | |
| | | return ( |
| | | <div className={'mob-tabs-edit-box ' + tabs.setting.display} style={_style} onClick={this.clickComponent} id={tabs.uuid}> |
| | |
| | | <div className="mk-popover-control"> |
| | | <Icon className="edit" title="edit" type="edit" onClick={() => this.editTab(tab)} /> |
| | | <PasteController type="tab" Tab={tab} insert={this.insert} /> |
| | | <Icon className="style" title="调整样式" onClick={this.changeTabStyle} type="font-colors" /> |
| | | <Icon className="close" title="delete" type="close" onClick={() => this.delTab(tab)} /> |
| | | </div> |
| | | } trigger="hover"> |
| | | <span>{tab.icon ? <Icon type={tab.icon} /> : null}{tab.label}</span> |
| | | <span style={_tabStyle}>{tab.icon ? <Icon type={tab.icon} /> : null}{tab.label}</span> |
| | | </Popover> |
| | | } key={tab.uuid}> |
| | | {appType === 'mob' && tabs.setting.position === 'top' && tabs.setting.display === 'inline-block' && tab.hasSearch === 'icon' ? |
| | |
| | | padding: 12px 16px; |
| | | } |
| | | } |
| | | .ant-tabs-tab.ant-tabs-tab-active { |
| | | > span { |
| | | color: #1890ff!important; |
| | | } |
| | | } |
| | | .ant-tabs-bottom .ant-tabs-bottom-bar .ant-tabs-ink-bar { |
| | | top: 0px; |
| | | } |
| | |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Icon, Popover } from 'antd' |
| | | import { ExpandOutlined, ReloadOutlined } from '@ant-design/icons' |
| | | |
| | | import asyncIconComponent from '@/utils/asyncIconComponent' |
| | | |
| | | import getWrapForm from './options' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | | import './index.scss' |
| | | |
| | | const WrapComponent = asyncIconComponent(() => import('./wrapsetting')) |
| | | const NormalForm = asyncIconComponent(() => import('@/components/normalform')) |
| | | |
| | | class NormalNavbar extends Component { |
| | | static propTpyes = { |
| | |
| | | MKEmitter.emit('changeSearch', card) |
| | | } |
| | | |
| | | getWrapForms = () => { |
| | | const { wrap } = this.state.card |
| | | |
| | | return getWrapForm(wrap) |
| | | } |
| | | |
| | | updateWrap = (res) => { |
| | | this.updateComponent({...this.state.card, wrap: res}) |
| | | } |
| | | |
| | | render() { |
| | | const { card } = this.state |
| | | |
| | | let right = null |
| | | if (card.wrap.logout === 'true') { |
| | | right = <Icon type="logout" /> |
| | | } |
| | | if (card.wrap.scan === 'true') { |
| | | right = !right ? <ExpandOutlined /> : <Icon type="ellipsis" /> |
| | | } |
| | | if (card.wrap.refresh === 'true') { |
| | | right = !right ? <ReloadOutlined /> : <Icon type="ellipsis" /> |
| | | } |
| | | |
| | | return ( |
| | | <div className="normal-topbar-edit-box" style={card.style} onClick={this.clickComponent} id={card.uuid}> |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <WrapComponent config={card} updateConfig={this.updateComponent} /> |
| | | <NormalForm title="导航栏设置" width={750} update={this.updateWrap} getForms={this.getWrapForms}> |
| | | <Icon type="edit" style={{color: '#1890ff'}} title="编辑"/> |
| | | </NormalForm> |
| | | <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" /> |
| | | <Icon className="close" title="删除组件" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | </div> |
| | |
| | | } |
| | | <div className="am-navbar-right"> |
| | | {card.wrap.search === 'true' ? <Icon type="search" onDoubleClick={this.setSearch}/> : null} |
| | | {card.wrap.logout === 'true' ? <Icon type="ellipsis" /> : null} |
| | | {right} |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | font-style: inherit; |
| | | font-weight: inherit; |
| | | .am-navbar-left { |
| | | width: 30px; |
| | | min-width: 10px; |
| | | text-align: left; |
| | | color: #1890ff; |
| | | font-size: 20px; |
| | | line-height: 50px; |
| | | .anticon-left { |
| | | margin: 0 8px 0 5px; |
| | | } |
| | | } |
| | | .am-navbar-title { |
| | | text-align: center; |
| | |
| | | .am-navbar-right { |
| | | text-align: right; |
| | | color: #1890ff; |
| | | min-width: 30px; |
| | | min-width: 10px; |
| | | font-size: 20px; |
| | | line-height: 50px; |
| | | .anticon-search { |
| | |
| | | padding: 5px; |
| | | cursor: pointer; |
| | | } |
| | | >.anticon:not(.anticon-search) { |
| | | margin: 0px 5px; |
| | | } |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | /** |
| | | * @description Wrap表单配置信息 |
| | | */ |
| | | export default function (wrap) { |
| | | let menulist = sessionStorage.getItem('appMenus') |
| | | |
| | | if (menulist) { |
| | | try { |
| | | menulist = JSON.parse(menulist) |
| | | } catch { |
| | | menulist = [] |
| | | } |
| | | } else { |
| | | menulist = [] |
| | | } |
| | | |
| | | const topbarWrapForm = [ |
| | | { |
| | | type: 'radio', |
| | | field: 'type', |
| | | label: '类型', |
| | | initval: wrap.type || 'navbar', |
| | | required: false, |
| | | options: [ |
| | | {value: 'navbar', label: '导航栏'}, |
| | | {value: 'search', label: '搜索栏'}, |
| | | ], |
| | | controlFields: [ |
| | | {field: 'search', values: ['navbar']}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | field: 'title', |
| | | label: '标题', |
| | | initval: wrap.title || '', |
| | | tooltip: '使用搜索栏时,标题用于搜索条件隐藏时显示。', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'back', |
| | | label: '返回', |
| | | initval: wrap.back || 'true', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', label: '显示'}, |
| | | {value: 'false', label: '隐藏'}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'search', |
| | | label: '搜索', |
| | | initval: wrap.search || 'false', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', label: '显示'}, |
| | | {value: 'false', label: '隐藏'}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'logout', |
| | | label: '退出', |
| | | initval: wrap.logout || 'false', |
| | | tooltip: '点击退出时,返回第一个页面。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', label: '显示'}, |
| | | {value: 'false', label: '隐藏'}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'scan', |
| | | label: '扫一扫', |
| | | initval: wrap.scan || 'false', |
| | | tooltip: '系统功能:1、扫码登录,二维码信息以“login”开头,2、页面跳转,二维码信息以“url”开头', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', label: '显示'}, |
| | | {value: 'false', label: '隐藏'}, |
| | | ], |
| | | controlFields: [ |
| | | {field: 'linkmenu', values: ['true']}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'refresh', |
| | | label: '刷新', |
| | | initval: wrap.refresh || 'false', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', label: '显示'}, |
| | | {value: 'false', label: '隐藏'}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | field: 'linkmenu', |
| | | label: '关联菜单', |
| | | initval: wrap.linkmenu || '', |
| | | tooltip: '使用扫码登录功能时的跳转页面,不使用扫码登录可忽略。', |
| | | required: false, |
| | | options: menulist |
| | | }, |
| | | ] |
| | | |
| | | return topbarWrapForm |
| | | } |
| | |
| | | wrap: { name: card.name, width: card.width || 24, loginWays: ['uname_pwd'] }, |
| | | style: { background: '#ffffff', width: '330px', borderRadius: '4px', marginLeft: '55vw'}, |
| | | loginWays: [ |
| | | {type: 'uname_pwd', label: '账号密码', remember: 'true', labelStyle: {}, submitStyle: {}, submitLabel: '登录'}, |
| | | {type: 'sms_vcode', label: '短信验证码', labelStyle: {}, submitStyle: {}, submitLabel: '登录'} |
| | | {type: 'uname_pwd', label: '账号密码', remember: 'true'}, |
| | | {type: 'sms_vcode', label: '短信验证码'}, |
| | | {type: 'app_scan', label: '扫码登录'}, |
| | | ] |
| | | } |
| | | |
| | |
| | | }) |
| | | this.props.updateConfig(_card) |
| | | } else { |
| | | let _card = fromJS(card).toJS() |
| | | if (_card.loginWays.length === 2) { |
| | | _card.loginWays.push({type: 'app_scan', label: '扫码登录'}) |
| | | } |
| | | this.setState({ |
| | | card: fromJS(card).toJS() |
| | | card: _card |
| | | }) |
| | | } |
| | | } |
| | |
| | | line-height: 60px; |
| | | } |
| | | } |
| | | .form-scan-wrap { |
| | | padding: 30px; |
| | | text-align: center; |
| | | font-size: 12px; |
| | | line-height: 35px; |
| | | .qr-wrap { |
| | | position: relative; |
| | | width: 60%; |
| | | padding-top: 60%; |
| | | margin: 0 auto; |
| | | |
| | | .qrcode-box { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | canvas { |
| | | width: 100%!important; |
| | | height: 100%!important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .login-edit-box::after { |
| | | display: block; |
| | |
| | | import { is, fromJS } from 'immutable' |
| | | import { Form, Icon, Input, Button, Checkbox } from 'antd' |
| | | |
| | | import asyncElementComponent from '@/utils/asyncComponent' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import './index.scss' |
| | | |
| | | const QrCode = asyncElementComponent(() => import('@/components/qrcode')) |
| | | |
| | | class LoginTabForm extends Component { |
| | | static propTpyes = { |
| | |
| | | _loginWays.push(item) |
| | | } |
| | | }) |
| | | |
| | | console.log(nextProps.wrap) |
| | | console.log(loginWays) |
| | | console.log(_loginWays) |
| | | this.setState({ |
| | | loginWays: _loginWays, |
| | | activeWay: _loginWays[0], |
| | |
| | | </Button> |
| | | </Form.Item> |
| | | </div> : null} |
| | | {activeWay.type === 'app_scan' ? <div className="form-scan-wrap"> |
| | | <div className="qr-wrap"> |
| | | <QrCode card={{qrWidth: 500, color: '#000000'}} value={'minkesoft'}/> |
| | | </div> |
| | | 请使用客户端扫一扫登录 |
| | | </div> : null} |
| | | </Form> |
| | | ) |
| | | } |
| | |
| | | })( |
| | | <Checkbox.Group |
| | | options={[ |
| | | { label: '账号密码', value: 'uname_pwd' }, |
| | | { label: '短信验证码', value: 'sms_vcode' }, |
| | | { label: '账号', value: 'uname_pwd' }, |
| | | { label: '短信', value: 'sms_vcode' }, |
| | | { label: '扫码', value: 'app_scan' }, |
| | | ]} |
| | | /> |
| | | )} |
| | |
| | | -webkit-line-clamp: 10; |
| | | } |
| | | .mk-cell-btn { |
| | | > div {width: 100%;} |
| | | > div {width: 100%;max-width: 100%;} |
| | | button { |
| | | width: 100%; |
| | | max-width: 100%; |
| | | height: auto; |
| | | min-height: 32px; |
| | | } |
| | |
| | | import md5 from 'md5' |
| | | |
| | | import Api from '@/api' |
| | | import options from '@/store/options.js' |
| | | import Utils from '@/utils/utils.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import zhCN from '@/locales/zh-CN/main.js' |
| | |
| | | } |
| | | |
| | | getAppList = () => { |
| | | if (options.sysType !== 'local') return |
| | | |
| | | let param = { |
| | | func: 's_get_kei' |
| | | } |
| | |
| | | render() { |
| | | const { activeKey, filterRoleList, applist, selectApp, selectSubApp, loading, loadingTree, loadingAppTree, primarykey, menuTrees, appTrees, checkedKeys, appCheckedKeys, menuOpenKeys, selectMenuTrees, selectAppTrees, selectRoleId, selectMenuOpenKeys, selectAppOpenKeys, submitloading, appOpenKeys } = this.state |
| | | |
| | | let ismanage = options.sysType !== 'local' |
| | | |
| | | return ( |
| | | <div className="rolemanage"> |
| | | <div className={'rolemanage' + (ismanage ? ' manager' : '')}> |
| | | {loading && <Spin size="large" />} |
| | | <Tabs activeKey={activeKey} type="card" onChange={this.changeType}> |
| | | <TabPane tab="管理系统" key="manage"> |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .rolemanage.manager { |
| | | .ant-tabs-bar.ant-tabs-card-bar { |
| | | display: none; |
| | | } |
| | | } |
| | |
| | | nonc: Utils.getuuid() |
| | | } |
| | | |
| | | // param = { |
| | | // func: _func, |
| | | // VerificationCode: '授权码', |
| | | // TimeStamp: timeStamp, |
| | | // userid: _id, |
| | | // LoginUID: _id, |
| | | // nonc: Utils.getuuid() |
| | | // } |
| | | |
| | | let keys = Object.keys(param).sort() |
| | | let values = '' |
| | | keys.forEach(key => { |
| | |
| | | param.sign = md5(values) |
| | | param.t = new Date().getTime() |
| | | |
| | | Api.directRequest(_rduri + '/sEmpowerCloud_Get_LinkUrl', 'post', param, 'true').then(res => { |
| | | Api.directRequest(_rduri + '/' + _func, 'post', param, 'true').then(res => { |
| | | if (res.status) { |
| | | if (res.EPC === str) { |
| | | let box = [] |