From a757b75163d77acc5111637fbe20ec61d895a72b Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 11 八月 2021 23:15:29 +0800 Subject: [PATCH] 2021-08-11 --- src/mob/components/tabs/antv-tabs/index.scss | 5 + src/mob/components/topbar/normal-navbar/index.scss | 10 + src/menu/components/card/cardcellcomponent/index.jsx | 6 + src/mob/components/tabs/antv-tabs/index.jsx | 34 +++++- src/tabviews/rolemanage/index.jsx | 7 + src/pc/components/login/normal-login/loginform.jsx | 13 ++ src/components/qrcode/index.jsx | 7 src/mob/components/topbar/normal-navbar/options.jsx | 112 ++++++++++++++++++++++ src/pc/components/login/normal-login/index.jsx | 11 + /dev/null | 11 -- src/tabviews/rolemanage/index.scss | 5 + src/mob/components/topbar/normal-navbar/index.jsx | 32 +++++ src/api/index.js | 2 src/tabviews/custom/components/card/cardcellList/index.scss | 3 src/pc/components/login/wrapsetting/settingform/index.jsx | 5 src/pc/components/login/normal-login/index.scss | 24 ++++ src/views/login/index.jsx | 11 ++ 17 files changed, 260 insertions(+), 38 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index f9a4af4..0f07f1e 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -459,7 +459,7 @@ appkey: window.GLOB.appkey } - let url = window.GLOB.mainSystemApi + let url = window.GLOB.mainSystemApi || '/webapi/dostars' param = this.encryptParam(param) return axios({ diff --git a/src/components/qrcode/index.jsx b/src/components/qrcode/index.jsx index da630b7..122a9b1 100644 --- a/src/components/qrcode/index.jsx +++ b/src/components/qrcode/index.jsx @@ -28,6 +28,7 @@ render() { const { value, card } = this.props let color = card.color + let size = card.qrWidth || 50 if (/rgb/ig.test(color)) { color = this.hexify(color) @@ -37,12 +38,12 @@ <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> diff --git a/src/menu/components/card/cardcellcomponent/index.jsx b/src/menu/components/card/cardcellcomponent/index.jsx index 170df16..8dce9dd 100644 --- a/src/menu/components/card/cardcellcomponent/index.jsx +++ b/src/menu/components/card/cardcellcomponent/index.jsx @@ -161,6 +161,12 @@ 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 => { diff --git a/src/mob/components/tabs/antv-tabs/index.jsx b/src/mob/components/tabs/antv-tabs/index.jsx index 5ecb338..ee9041d 100644 --- a/src/mob/components/tabs/antv-tabs/index.jsx +++ b/src/mob/components/tabs/antv-tabs/index.jsx @@ -138,18 +138,34 @@ 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) => { @@ -353,6 +369,7 @@ 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}> @@ -363,10 +380,11 @@ <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' ? diff --git a/src/mob/components/tabs/antv-tabs/index.scss b/src/mob/components/tabs/antv-tabs/index.scss index 2157466..b38d227 100644 --- a/src/mob/components/tabs/antv-tabs/index.scss +++ b/src/mob/components/tabs/antv-tabs/index.scss @@ -61,6 +61,11 @@ 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; } diff --git a/src/mob/components/topbar/normal-navbar/index.jsx b/src/mob/components/topbar/normal-navbar/index.jsx index 74b39ac..f92afda 100644 --- a/src/mob/components/topbar/normal-navbar/index.jsx +++ b/src/mob/components/topbar/normal-navbar/index.jsx @@ -2,15 +2,16 @@ 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 = { @@ -155,14 +156,37 @@ 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> @@ -179,7 +203,7 @@ } <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> diff --git a/src/mob/components/topbar/normal-navbar/index.scss b/src/mob/components/topbar/normal-navbar/index.scss index c7cd342..fc14075 100644 --- a/src/mob/components/topbar/normal-navbar/index.scss +++ b/src/mob/components/topbar/normal-navbar/index.scss @@ -28,11 +28,14 @@ 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; @@ -61,7 +64,7 @@ .am-navbar-right { text-align: right; color: #1890ff; - min-width: 30px; + min-width: 10px; font-size: 20px; line-height: 50px; .anticon-search { @@ -69,6 +72,9 @@ padding: 5px; cursor: pointer; } + >.anticon:not(.anticon-search) { + margin: 0px 5px; + } } } } diff --git a/src/mob/components/topbar/normal-navbar/options.jsx b/src/mob/components/topbar/normal-navbar/options.jsx new file mode 100644 index 0000000..d32a47c --- /dev/null +++ b/src/mob/components/topbar/normal-navbar/options.jsx @@ -0,0 +1,112 @@ +/** + * @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銆佹壂鐮佺櫥褰曪紝浜岀淮鐮佷俊鎭互鈥渓ogin鈥濆紑澶达紝2銆侀〉闈㈣烦杞紝浜岀淮鐮佷俊鎭互鈥渦rl鈥濆紑澶�', + 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 +} \ No newline at end of file diff --git a/src/mob/components/topbar/normal-navbar/wrapsetting/index.jsx b/src/mob/components/topbar/normal-navbar/wrapsetting/index.jsx deleted file mode 100644 index 77c0894..0000000 --- a/src/mob/components/topbar/normal-navbar/wrapsetting/index.jsx +++ /dev/null @@ -1,81 +0,0 @@ -import React, {Component} from 'react' -import PropTypes from 'prop-types' -import { is, fromJS } from 'immutable' -import { Icon, Modal } from 'antd' - -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' -import SettingForm from './settingform' -import './index.scss' - -class DataSource extends Component { - static propTpyes = { - config: PropTypes.any, - updateConfig: PropTypes.func - } - - state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, - visible: false, - wrap: null - } - - UNSAFE_componentWillMount () { - const { config } = this.props - - this.setState({wrap: fromJS(config.wrap).toJS()}) - } - - shouldComponentUpdate (nextProps, nextState) { - return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) - } - - editDataSource = () => { - this.setState({ - visible: true - }) - } - - verifySubmit = () => { - const { config } = this.props - - this.verifyRef.handleConfirm().then(res => { - - this.setState({ - wrap: res, - visible: false - }) - this.props.updateConfig({...config, wrap: res}) - }) - } - - render () { - const { visible, dict, wrap } = this.state - - return ( - <div className="model-menu-setting-wrap"> - <Icon type="edit" title="缂栬緫" onClick={() => this.editDataSource()} /> - <Modal - wrapClassName="popview-modal" - title="瀵艰埅鏍忚缃�" - visible={visible} - width={750} - maskClosable={false} - okText={dict['model.submit']} - onOk={this.verifySubmit} - onCancel={() => { this.setState({ visible: false }) }} - destroyOnClose - > - <SettingForm - dict={dict} - wrap={wrap} - inputSubmit={this.verifySubmit} - wrappedComponentRef={(inst) => this.verifyRef = inst} - /> - </Modal> - </div> - ) - } -} - -export default DataSource \ No newline at end of file diff --git a/src/mob/components/topbar/normal-navbar/wrapsetting/index.scss b/src/mob/components/topbar/normal-navbar/wrapsetting/index.scss deleted file mode 100644 index 04372e6..0000000 --- a/src/mob/components/topbar/normal-navbar/wrapsetting/index.scss +++ /dev/null @@ -1,7 +0,0 @@ -.model-menu-setting-wrap { - display: inline-block; - - >.anticon-edit { - color: #1890ff; - } -} \ No newline at end of file diff --git a/src/mob/components/topbar/normal-navbar/wrapsetting/settingform/index.jsx b/src/mob/components/topbar/normal-navbar/wrapsetting/settingform/index.jsx deleted file mode 100644 index 7656c0e..0000000 --- a/src/mob/components/topbar/normal-navbar/wrapsetting/settingform/index.jsx +++ /dev/null @@ -1,130 +0,0 @@ -import React, {Component} from 'react' -import PropTypes from 'prop-types' -import { Form, Row, Col, Input, Radio, Tooltip, Icon } from 'antd' - -import './index.scss' - -class SettingForm extends Component { - static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� - wrap: PropTypes.object, // 鏁版嵁婧愰厤缃� - inputSubmit: PropTypes.func // 鍥炶溅浜嬩欢 - } - - state = { - type: this.props.wrap.type || 'navbar' - } - - handleConfirm = () => { - // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭� - return new Promise((resolve, reject) => { - this.props.form.validateFieldsAndScroll((err, values) => { - if (!err) { - resolve(values) - } else { - reject(err) - } - }) - }) - } - - handleSubmit = (e) => { - e.preventDefault() - - if (this.props.inputSubmit) { - this.props.inputSubmit() - } - } - - render() { - const { wrap } = this.props - const { getFieldDecorator } = this.props.form - const { type } = this.state - const formItemLayout = { - labelCol: { - xs: { span: 24 }, - sm: { span: 8 } - }, - wrapperCol: { - xs: { span: 24 }, - sm: { span: 16 } - } - } - - return ( - <div className="model-menu-setting-form"> - <Form {...formItemLayout}> - <Row gutter={24}> - <Col span={12}> - <Form.Item label="绫诲瀷"> - {getFieldDecorator('type', { - initialValue: wrap.type || 'navbar' - })( - <Radio.Group onChange={(e) => this.setState({type: e.target.value})}> - <Radio value="navbar">瀵艰埅鏍�</Radio> - <Radio value="search">鎼滅储鏍�</Radio> - </Radio.Group> - )} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="浣跨敤鎼滅储鏍忔椂锛屾爣棰樼敤浜庢悳绱㈡潯浠堕殣钘忔椂鏄剧ず銆�"> - <Icon type="question-circle" /> - 鏍囬 - </Tooltip> - }> - {getFieldDecorator('title', { - initialValue: wrap.title || '' - })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label="杩斿洖"> - {getFieldDecorator('back', { - initialValue: wrap.back || 'true' - })( - <Radio.Group> - <Radio value="true">鏄剧ず</Radio> - <Radio value="false">闅愯棌</Radio> - </Radio.Group> - )} - </Form.Item> - </Col> - {type === 'navbar' ? <Col span={12}> - <Form.Item label="鎼滅储"> - {getFieldDecorator('search', { - initialValue: wrap.search || 'false' - })( - <Radio.Group> - <Radio value="true">鏄剧ず</Radio> - <Radio value="false">闅愯棌</Radio> - </Radio.Group> - )} - </Form.Item> - </Col> : null} - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="鐐瑰嚮閫�鍑烘椂锛岃繑鍥炵涓�涓〉闈€��"> - <Icon type="question-circle" /> - 閫�鍑� - </Tooltip> - }> - {getFieldDecorator('logout', { - initialValue: wrap.logout || 'false' - })( - <Radio.Group> - <Radio value="true">鏄剧ず</Radio> - <Radio value="false">闅愯棌</Radio> - </Radio.Group> - )} - </Form.Item> - </Col> - </Row> - </Form> - </div> - ) - } -} - -export default Form.create()(SettingForm) \ No newline at end of file diff --git a/src/mob/components/topbar/normal-navbar/wrapsetting/settingform/index.scss b/src/mob/components/topbar/normal-navbar/wrapsetting/settingform/index.scss deleted file mode 100644 index 159130b..0000000 --- a/src/mob/components/topbar/normal-navbar/wrapsetting/settingform/index.scss +++ /dev/null @@ -1,11 +0,0 @@ -.model-menu-setting-form { - position: relative; - - .anticon-question-circle { - color: #c49f47; - margin-right: 3px; - } - .ant-input-number { - width: 100%; - } -} \ No newline at end of file diff --git a/src/pc/components/login/normal-login/index.jsx b/src/pc/components/login/normal-login/index.jsx index 028d757..9f0d75e 100644 --- a/src/pc/components/login/normal-login/index.jsx +++ b/src/pc/components/login/normal-login/index.jsx @@ -46,8 +46,9 @@ 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: '鎵爜鐧诲綍'}, ] } @@ -71,8 +72,12 @@ }) 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 }) } } diff --git a/src/pc/components/login/normal-login/index.scss b/src/pc/components/login/normal-login/index.scss index f87a9a8..3112f0b 100644 --- a/src/pc/components/login/normal-login/index.scss +++ b/src/pc/components/login/normal-login/index.scss @@ -93,6 +93,30 @@ 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; diff --git a/src/pc/components/login/normal-login/loginform.jsx b/src/pc/components/login/normal-login/loginform.jsx index 20b96a4..2bfe6a0 100644 --- a/src/pc/components/login/normal-login/loginform.jsx +++ b/src/pc/components/login/normal-login/loginform.jsx @@ -3,8 +3,11 @@ 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 = { @@ -45,7 +48,9 @@ _loginWays.push(item) } }) - + console.log(nextProps.wrap) + console.log(loginWays) + console.log(_loginWays) this.setState({ loginWays: _loginWays, activeWay: _loginWays[0], @@ -131,6 +136,12 @@ </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> ) } diff --git a/src/pc/components/login/wrapsetting/settingform/index.jsx b/src/pc/components/login/wrapsetting/settingform/index.jsx index 97042c8..0c32e57 100644 --- a/src/pc/components/login/wrapsetting/settingform/index.jsx +++ b/src/pc/components/login/wrapsetting/settingform/index.jsx @@ -137,8 +137,9 @@ })( <Checkbox.Group options={[ - { label: '璐﹀彿瀵嗙爜', value: 'uname_pwd' }, - { label: '鐭俊楠岃瘉鐮�', value: 'sms_vcode' }, + { label: '璐﹀彿', value: 'uname_pwd' }, + { label: '鐭俊', value: 'sms_vcode' }, + { label: '鎵爜', value: 'app_scan' }, ]} /> )} diff --git a/src/tabviews/custom/components/card/cardcellList/index.scss b/src/tabviews/custom/components/card/cardcellList/index.scss index f8e195f..4cadef8 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.scss +++ b/src/tabviews/custom/components/card/cardcellList/index.scss @@ -58,9 +58,10 @@ -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; } diff --git a/src/tabviews/rolemanage/index.jsx b/src/tabviews/rolemanage/index.jsx index fc1a5b4..9b138ec 100644 --- a/src/tabviews/rolemanage/index.jsx +++ b/src/tabviews/rolemanage/index.jsx @@ -5,6 +5,7 @@ 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' @@ -76,6 +77,8 @@ } getAppList = () => { + if (options.sysType !== 'local') return + let param = { func: 's_get_kei' } @@ -843,8 +846,10 @@ 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"> diff --git a/src/tabviews/rolemanage/index.scss b/src/tabviews/rolemanage/index.scss index 80704e7..32a7261 100644 --- a/src/tabviews/rolemanage/index.scss +++ b/src/tabviews/rolemanage/index.scss @@ -106,4 +106,9 @@ } } } +} +.rolemanage.manager { + .ant-tabs-bar.ant-tabs-card-bar { + display: none; + } } \ No newline at end of file diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx index ace4c55..3ef55be 100644 --- a/src/views/login/index.jsx +++ b/src/views/login/index.jsx @@ -243,6 +243,15 @@ 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 => { @@ -251,7 +260,7 @@ 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 = [] -- Gitblit v1.8.0