From 92a9b175fda139d6608c53af62e4d8b7b1c926cf Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 09 四月 2021 18:08:51 +0800 Subject: [PATCH] 2021-04-09 --- src/pc/components/navbar/normal-navbar/index.jsx | 4 src/assets/css/viewstyle.scss | 7 src/views/login/loginform.jsx | 13 src/templates/menuconfig/editthdmenu/index.jsx | 2 src/tabviews/custom/components/share/normalTable/index.jsx | 2 src/tabviews/subtable/index.jsx | 2 src/pc/components/login/wrapsetting/settingform/index.jsx | 178 ++++++----------- src/tabviews/commontable/index.jsx | 2 src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx | 4 src/menu/sysinterface/settingform/baseform/index.jsx | 4 src/templates/formtabconfig/settingform/index.jsx | 4 src/tabviews/custom/components/share/tabtransfer/index.jsx | 7 src/views/pcdesign/index.jsx | 52 +++++ src/pc/components/login/normal-login/loginform.jsx | 90 ++++---- src/tabviews/custom/components/group/normal-group/index.jsx | 7 src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx | 4 src/menu/datasource/verifycard/settingform/index.jsx | 4 src/pc/menushell/card.jsx | 5 src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx | 4 src/views/design/sidemenu/config.jsx | 20 +- src/pc/components/login/normal-login/index.jsx | 8 src/views/login/index.scss | 96 ++++----- src/pc/components/login/wrapsetting/index.jsx | 6 src/pc/components/login/normal-login/index.scss | 47 ++++ src/views/login/index.jsx | 6 25 files changed, 317 insertions(+), 261 deletions(-) diff --git a/src/assets/css/viewstyle.scss b/src/assets/css/viewstyle.scss index 25b7155..56a1d37 100644 --- a/src/assets/css/viewstyle.scss +++ b/src/assets/css/viewstyle.scss @@ -33,11 +33,8 @@ button.vercode { color: $color6; } - .ant-tabs { - .ant-tabs-tab.ant-tabs-tab-active { - color: $color6; - } - .ant-tabs-tab:hover { + .login-way-wrap { + .login-way.active, .login-way:hover { color: $color6; } } diff --git a/src/menu/datasource/verifycard/settingform/index.jsx b/src/menu/datasource/verifycard/settingform/index.jsx index c114793..92b9ba9 100644 --- a/src/menu/datasource/verifycard/settingform/index.jsx +++ b/src/menu/datasource/verifycard/settingform/index.jsx @@ -182,6 +182,10 @@ required: true, message: this.props.dict['form.required.input'] + '琛ㄥ悕!' }, + { + max: 50, + message: '琛ㄥ悕鏈�闀夸负50涓瓧绗�!' + } ] })(<Input placeholder={''} autoComplete="off" />)} </Form.Item> diff --git a/src/menu/sysinterface/settingform/baseform/index.jsx b/src/menu/sysinterface/settingform/baseform/index.jsx index fbb22d6..431a905 100644 --- a/src/menu/sysinterface/settingform/baseform/index.jsx +++ b/src/menu/sysinterface/settingform/baseform/index.jsx @@ -242,8 +242,8 @@ message: dict['form.required.input'] + '鍥炶皟琛ㄥ悕!' }, { - max: formRule.input.max, - message: formRule.input.message + max: 50, + message: '琛ㄥ悕鏈�闀夸负50涓瓧绗�!' } ] })(<Input placeholder={''} autoComplete="off" />)} diff --git a/src/pc/components/login/normal-login/index.jsx b/src/pc/components/login/normal-login/index.jsx index 0458169..9c364e4 100644 --- a/src/pc/components/login/normal-login/index.jsx +++ b/src/pc/components/login/normal-login/index.jsx @@ -41,11 +41,11 @@ width: card.width || 24, name: card.name, subtype: card.subtype, - wrap: { name: card.name, width: card.width || 24, title: '', switch: 'false', datatype: 'static' }, + wrap: { name: card.name, width: card.width || 24, loginWays: ['uname_pwd', 'sms_vcode'] }, style: { background: '#ffffff', width: '330px', borderRadius: '4px', marginLeft: '55vw' }, loginWays: [ - {type: 'uname_pwd', label: '璐﹀彿瀵嗙爜', remember: 'true', disabled: false, labelStyle: {}, submitStyle: {}, submitLabel: '鐧诲綍'}, - {type: 'sms_vcode', label: '鐭俊楠岃瘉鐮�', disabled: true, labelStyle: {}, submitStyle: {}, submitLabel: '鐧诲綍'} + {type: 'uname_pwd', label: '璐﹀彿瀵嗙爜', remember: 'true', labelStyle: {}, submitStyle: {}, submitLabel: '鐧诲綍'}, + {type: 'sms_vcode', label: '鐭俊楠岃瘉鐮�', labelStyle: {}, submitStyle: {}, submitLabel: '鐧诲綍'} ] } @@ -140,7 +140,7 @@ } trigger="hover"> <Icon type="tool" /> </Popover> - <LoginForm loginWays={card.loginWays} dict={dict} /> + <LoginForm loginWays={card.loginWays} wrap={card.wrap} dict={dict} /> </div> ) } diff --git a/src/pc/components/login/normal-login/index.scss b/src/pc/components/login/normal-login/index.scss index 17eeab1..86f8784 100644 --- a/src/pc/components/login/normal-login/index.scss +++ b/src/pc/components/login/normal-login/index.scss @@ -1,4 +1,5 @@ .login-edit-box { + display: inline-block; position: relative; box-sizing: border-box; background: #ffffff; @@ -28,11 +29,13 @@ background: rgba(255, 255, 255, 0.55); } .login-edit-form { + border-radius: inherit; .ant-form-item { font-size: 16px; margin: 0 15px 15px; .ant-input { height: 35px; + background: transparent; } } button:not(.vercode) { @@ -46,6 +49,50 @@ margin-bottom: 0; } } + .login-way-wrap { + height: 50px; + line-height: 50px; + margin-bottom: 10px; + display: flex; + border-radius: inherit; + .login-way { + flex: 1; + width: 50%; + font-size: 17px; + text-align: center; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + padding: 0 16px; + transition: all 0.3s; + border: 1px solid transparent; + border-top: 0!important; + } + .login-way.active, .login-way:hover { + color: #1890ff; + } + .login-way:not(.active) { + cursor: pointer; + background: #fafafa; + border: 1px solid #e8e8e8; + } + .login-way:first-child { + border-left: 0; + border-top-left-radius: inherit; + } + .login-way:last-child { + border-right: 0; + border-top-right-radius: inherit; + } + } + .login-way-wrap.simple { + .login-way { + font-size: 18px; + text-align: left; + padding: 0 15px; + line-height: 60px; + } + } } .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 5bac83d..5090a1b 100644 --- a/src/pc/components/login/normal-login/loginform.jsx +++ b/src/pc/components/login/normal-login/loginform.jsx @@ -1,71 +1,58 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Form, Icon, Input, Button, Checkbox, Tabs } from 'antd' +import { Form, Icon, Input, Button, Checkbox } from 'antd' import './index.scss' - -const { TabPane } = Tabs class LoginTabForm extends Component { static propTpyes = { dict: PropTypes.object, loginWays: PropTypes.array, + wrap: PropTypes.array, } state = { - activeKey: 'uname_pwd', - username: '', - password: '', + activeWay: null, loginWays: [], - smsId: '', - verdisabled: false } UNSAFE_componentWillMount () { - const { loginWays } = this.props + const { loginWays, wrap } = this.props - let smsId = '' let _loginWays = [] loginWays.forEach(item => { - if (item.type === 'sms_vcode') { - smsId = item.smsId - _loginWays.push(item) - } else if (item.type === 'uname_pwd') { + if (!wrap.loginWays || wrap.loginWays.includes(item.type)) { _loginWays.push(item) } }) this.setState({ - smsId: smsId, loginWays: _loginWays, - activeKey: _loginWays[0].type, + activeWay: _loginWays[0], }) } UNSAFE_componentWillReceiveProps (nextProps) { - if (!is(fromJS(this.props.loginWays), fromJS(nextProps.loginWays))) { - let smsId = '' + const { loginWays, wrap } = this.props + + if (!is(fromJS(wrap), fromJS(nextProps.wrap))) { let _loginWays = [] - nextProps.loginWays.forEach(item => { - if (item.type === 'sms_vcode') { - smsId = item.smsId - _loginWays.push(item) - } else if (item.type === 'uname_pwd') { + loginWays.forEach(item => { + if (!nextProps.wrap.loginWays || nextProps.wrap.loginWays.includes(item.type)) { _loginWays.push(item) } }) this.setState({ - smsId: smsId, loginWays: _loginWays, - activeKey: _loginWays[0].type + activeWay: _loginWays[0], }) } } - onChangeTab = (activeKey) => { - this.setState({activeKey}) + onChangeTab = (activeWay) => { + this.setState({activeWay}) } /** @@ -78,50 +65,59 @@ } render() { - const { activeKey, verdisabled, loginWays } = this.state + const { activeWay, loginWays } = this.state return ( <Form className="login-edit-form"> - <Tabs type="card" activeKey={activeKey} onChange={this.onChangeTab}> - {loginWays.map(item => (<TabPane tab={item.label} key={item.type}></TabPane>))} - </Tabs> - <div className="form-item-wrap"> - {activeKey === 'uname_pwd' ? <Form.Item> + <div className={'login-way-wrap ' + (loginWays.length === 1 ? 'simple' : '')}> + {loginWays.map(item => ( + <div className={'login-way' + (activeWay.type === item.type ? ' active' : '')} onClick={() => this.onChangeTab(item)} key={item.type}>{item.label}</div> + ))} + </div> + {activeWay.type === 'uname_pwd' ? <div className="form-item-wrap"> + <Form.Item> <Input prefix={<Icon type="user" style={{ color: 'rgba(0,0,0,.25)' }} />} placeholder="鐢ㄦ埛鍚�" autoComplete="off" /> - </Form.Item> : null} - {activeKey === 'uname_pwd' ? <Form.Item> + </Form.Item> + <Form.Item> <Input.Password placeholder="瀵嗙爜" prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />} /> - </Form.Item> : null} - {activeKey === 'sms_vcode' ? <Form.Item> + </Form.Item> + <Form.Item className="minline"> + <Checkbox>璁颁綇瀵嗙爜</Checkbox> + </Form.Item> + <Form.Item className="btn-login"> + <Button type="primary" htmlType="submit" className="login-form-button"> + 鐧诲綍 + </Button> + </Form.Item> + </div> : null} + {activeWay.type === 'sms_vcode' ? <div className="form-item-wrap"> + <Form.Item> <Input placeholder="鎵嬫満鍙�" autoComplete="off" /> - </Form.Item> : null} - {activeKey === 'sms_vcode' ? <Form.Item> + </Form.Item> + <Form.Item style={{marginBottom: '35px'}}> <Input addonAfter={ - <Button type="link" className="vercode" size="small" disabled={verdisabled}> + <Button type="link" className="vercode" size="small"> 鑾峰彇楠岃瘉鐮� </Button> } placeholder="楠岃瘉鐮�" autoComplete="off" /> - </Form.Item> : null} - {activeKey === 'uname_pwd' ? <Form.Item className="minline"> - <Checkbox>璁颁綇瀵嗙爜</Checkbox> - </Form.Item> : null} - {['uname_pwd', 'sms_vcode'].includes(activeKey) ? <Form.Item className="btn-login"> + </Form.Item> + <Form.Item className="btn-login"> <Button type="primary" htmlType="submit" className="login-form-button"> 鐧诲綍 </Button> - </Form.Item> : null} - </div> + </Form.Item> + </div> : null} </Form> ) } diff --git a/src/pc/components/login/wrapsetting/index.jsx b/src/pc/components/login/wrapsetting/index.jsx index 81346a6..9c0ac72 100644 --- a/src/pc/components/login/wrapsetting/index.jsx +++ b/src/pc/components/login/wrapsetting/index.jsx @@ -27,7 +27,7 @@ } shouldComponentUpdate (nextProps, nextState) { - return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) + return !is(fromJS(this.state), fromJS(nextState)) } editDataSource = () => { @@ -50,7 +50,6 @@ } render () { - const { config } = this.props const { visible, dict, wrap } = this.state return ( @@ -58,7 +57,7 @@ <Icon type="edit" title="缂栬緫" onClick={() => this.editDataSource()} /> <Modal wrapClassName="popview-modal" - title={config.type === 'table' ? '琛ㄦ牸璁剧疆' : '鍗$墖璁剧疆'} + title="鐧诲綍璁剧疆" visible={visible} width={800} maskClosable={false} @@ -70,7 +69,6 @@ <SettingForm dict={dict} wrap={wrap} - config={config} inputSubmit={this.verifySubmit} wrappedComponentRef={(inst) => this.verifyRef = inst} /> diff --git a/src/pc/components/login/wrapsetting/settingform/index.jsx b/src/pc/components/login/wrapsetting/settingform/index.jsx index 08b58e2..cd0541b 100644 --- a/src/pc/components/login/wrapsetting/settingform/index.jsx +++ b/src/pc/components/login/wrapsetting/settingform/index.jsx @@ -1,23 +1,26 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { Form, Row, Col, Input, Radio, Tooltip, Icon, InputNumber, Select } from 'antd' +import { Form, Row, Col, Input, Tooltip, Icon, InputNumber, Select, Checkbox, notification } from 'antd' +import StyleInput from '@/menu/stylecontroller/styleInput' import './index.scss' class SettingForm extends Component { static propTpyes = { dict: PropTypes.object, // 瀛楀吀椤� - config: PropTypes.object, // 鍗$墖琛屼俊鎭� wrap: PropTypes.object, // 鏁版嵁婧愰厤缃� inputSubmit: PropTypes.func // 鍥炶溅浜嬩欢 } state = { - roleList: [] + roleList: [], + msgTemps: [] } UNSAFE_componentWillMount () { let roleList = sessionStorage.getItem('sysRoles') + let msgTemps = sessionStorage.getItem('msgTemplate') + if (roleList) { try { roleList = JSON.parse(roleList) @@ -28,7 +31,17 @@ roleList = [] } - this.setState({roleList}) + if (msgTemps) { + try { + msgTemps = JSON.parse(msgTemps) + } catch { + msgTemps = [] + } + } else { + msgTemps = [] + } + + this.setState({roleList, msgTemps}) } handleConfirm = () => { @@ -36,6 +49,14 @@ return new Promise((resolve, reject) => { this.props.form.validateFieldsAndScroll((err, values) => { if (!err) { + if (values.loginWays.includes('sms_vcode') && !values.tempId) { + notification.warning({ + top: 92, + message: '浣跨敤鐭俊楠岃瘉鐮佺櫥褰曟椂锛岄渶瑕侀�夋嫨鐭俊妯℃澘锛�', + duration: 5 + }) + return + } resolve(values) } else { reject(err) @@ -53,9 +74,9 @@ } render() { - const { wrap, config } = this.props + const { wrap } = this.props const { getFieldDecorator } = this.props.form - const { roleList } = this.state + const { roleList, msgTemps } = this.state const formItemLayout = { labelCol: { @@ -73,13 +94,6 @@ <Form {...formItemLayout}> <Row gutter={24}> <Col span={12}> - <Form.Item label="鏍囬"> - {getFieldDecorator('title', { - initialValue: wrap.title || '' - })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)} - </Form.Item> - </Col> - <Col span={12}> <Form.Item label={ <Tooltip placement="topLeft" title="鐢ㄤ簬缁勪欢闂寸殑鍖哄垎銆�"> <Icon type="question-circle" /> @@ -95,6 +109,26 @@ } ] })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)} + </Form.Item> + </Col> + <Col span={12}> + <Form.Item label="鐧诲綍鏂瑰紡"> + {getFieldDecorator('loginWays', { + initialValue: wrap.loginWays || [], + rules: [ + { + required: true, + message: this.props.dict['form.required.select'] + '鐧诲綍鏂瑰紡!' + } + ] + })( + <Checkbox.Group + options={[ + { label: '璐﹀彿瀵嗙爜', value: 'uname_pwd' }, + { label: '鐭俊楠岃瘉鐮�', value: 'sms_vcode' }, + ]} + /> + )} </Form.Item> </Col> <Col span={12}> @@ -115,117 +149,35 @@ })(<InputNumber min={1} max={24} precision={0} onPressEnter={this.handleSubmit} />)} </Form.Item> </Col> - {config.subtype === 'propcard' ? <Col span={12}> + <Col span={12}> <Form.Item label={ - <Tooltip placement="topLeft" title="閫夋嫨闈欐�佸�硷紝鏃犻渶閰嶇疆鏁版嵁婧愩��"> - <Icon type="question-circle" /> - 鏁版嵁鏉ユ簮 - </Tooltip> - }> - {getFieldDecorator('datatype', { - initialValue: wrap.datatype || 'dynamic' - })( - <Radio.Group> - <Radio value="dynamic">鍔ㄦ��</Radio> - <Radio value="static">闈欐��</Radio> - </Radio.Group> - )} - </Form.Item> - </Col> : null} - {config.subtype === 'datacard' ? <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="鏁版嵁婧愪腑閫夋嫨鍒嗛〉鏃舵湁鏁堛��"> - <Icon type="question-circle" /> - 鍒嗛〉椋庢牸 - </Tooltip> - }> - {getFieldDecorator('pagestyle', { - initialValue: wrap.pagestyle || 'page' - })( - <Radio.Group> - <Radio value="page">椤电爜</Radio> - <Radio value="switch">宸﹀彸鍒囨崲</Radio> - </Radio.Group> - )} - </Form.Item> - </Col> : null} - {config.subtype !== 'tablecard' ? <Col span={12}> - <Form.Item label="鍗$墖灞炴��"> - {getFieldDecorator('cardType', { - initialValue: wrap.cardType || '' - })( - <Radio.Group style={{whiteSpace: 'nowrap'}}> - <Radio key="" value=""> 涓嶅彲閫� </Radio> - <Radio key="radio" value={'radio'}> 鍗曢�� </Radio> - {config.subtype !== 'propcard' ? <Radio key="checkbox" value={'checkbox'}> 澶氶�� </Radio> : null} - </Radio.Group> - )} - </Form.Item> - </Col> : null} - {config.subtype !== 'tablecard' ? <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="璁剧疆涓哄眳涓榻愭垨鍙冲榻愶紝鍙湪鍗$墖涓�1琛屾椂鏈夋晥銆�"> - <Icon type="question-circle" /> - 鍗$墖鎺掑垪 - </Tooltip> - }> - {getFieldDecorator('cardFloat', { - initialValue: wrap.cardFloat || 'left' - })( - <Radio.Group style={{whiteSpace: 'nowrap'}}> - <Radio key="left" value="left"> 宸﹀榻� </Radio> - <Radio key="center" value="center"> 灞呬腑 </Radio> - <Radio key="right" value="right"> 鍙冲榻� </Radio> - </Radio.Group> - )} - </Form.Item> - </Col> : null} - {config.subtype !== 'tablecard' ? <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="榧犳爣鎮诞浜庡崱鐗囦笂鏂规椂锛屽崱鐗囨斁澶�1.05鍊嶃��"> - <Icon type="question-circle" /> - 鍗$墖鏀惧ぇ - </Tooltip> - }> - {getFieldDecorator('scale', { - initialValue: wrap.scale || 'false' - })( - <Radio.Group> - <Radio key="false" value="false"> 鍚� </Radio> - <Radio key="true" value="true"> 鏄� </Radio> - </Radio.Group> - )} - </Form.Item> - </Col> : null} - {config.subtype === 'tablecard' ? <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="琛ㄦ牸楂樺害锛岃秴鍑烘椂婊氬姩锛岄珮搴︿负绌烘椂鏍规嵁鍐呭鑷�傚簲銆�"> + <Tooltip placement="topLeft" title="缁勪欢鍗犵敤鐨勬渶灏忛珮搴︼紝鐢ㄤ簬椤甸潰甯冨眬銆�"> <Icon type="question-circle" /> 楂樺害 </Tooltip> }> {getFieldDecorator('height', { initialValue: wrap.height - })(<InputNumber min={100} max={2000} precision={0} onPressEnter={this.handleSubmit} />)} + })(<StyleInput options={['px', 'vh', 'vw', '%']}/>)} </Form.Item> - </Col> : null} - {config.subtype === 'propcard' ? <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="閫夋嫨绫诲瀷涓恒�婇〉鐪�/椤佃剼銆嬫椂锛屾墦鍗扮殑姣忛〉閲岄兘浼氬甫鏈夎缁勪欢銆�"> - <Icon type="question-circle" /> - 缁勪欢绫诲瀷 - </Tooltip> - }> - {getFieldDecorator('printType', { - initialValue: wrap.printType || 'content' + </Col> + <Col span={12}> + <Form.Item label="鐭俊妯℃澘"> + {getFieldDecorator('tempId', { + initialValue: wrap.tempId || '' })( - <Radio.Group> - <Radio value="content">鍐呭</Radio> - <Radio value="headerOrfooter">椤电湁/椤佃剼</Radio> - </Radio.Group> + <Select + showSearch + allowClear + filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} + > + {msgTemps.map(option => + <Select.Option key={option.ID} value={option.ID}>{option.SignName + ' - ' + option.TemplateCode}</Select.Option> + )} + </Select> )} </Form.Item> - </Col> : null} + </Col> <Col span={12}> <Form.Item label="榛戝悕鍗�"> {getFieldDecorator('blacklist', { diff --git a/src/pc/components/navbar/normal-navbar/index.jsx b/src/pc/components/navbar/normal-navbar/index.jsx index efa2b56..6978c0b 100644 --- a/src/pc/components/navbar/normal-navbar/index.jsx +++ b/src/pc/components/navbar/normal-navbar/index.jsx @@ -138,6 +138,10 @@ } changeMenu = (menu) => { + if (menu.property === 'link') { + window.open(menu.link) + return + } MKEmitter.emit('changeEditMenu', { fixed: menu.property === 'menu', MenuID: menu.property === 'linkmenu' ? menu.linkMenuId : menu.MenuID, diff --git a/src/pc/menushell/card.jsx b/src/pc/menushell/card.jsx index cd6aa65..6563f2f 100644 --- a/src/pc/menushell/card.jsx +++ b/src/pc/menushell/card.jsx @@ -90,7 +90,10 @@ } else if (card.type === 'code') { return (<CodeSandbox card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) } else if (card.type === 'login') { - return (<NormalLogin card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) + return (<> + <NormalLogin card={card} updateConfig={updateConfig} deletecomponent={delCard}/> + <div style={{float: 'right', height: card.wrap ? card.wrap.height : ''}}></div> + </>) } } return ( diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx index ce0938e..234cbcc 100644 --- a/src/tabviews/commontable/index.jsx +++ b/src/tabviews/commontable/index.jsx @@ -1076,7 +1076,7 @@ </div> <div className="main-table-box"> {(setting.tableType === 'radio' || setting.tableType === 'checkbox') && this.state.data && this.state.data.length > 0 ? - <Switch title="鏀惰捣" className="main-pickup" checkedChildren="寮�" unCheckedChildren="鍏�" defaultChecked={pickup} onChange={this.pickupChange} /> : null + <Switch title="鏀惰捣" className="main-pickup" checkedChildren="寮�" unCheckedChildren="鍏�" checked={pickup} onChange={this.pickupChange} /> : null } <MainTable tableId="mainTable" diff --git a/src/tabviews/custom/components/group/normal-group/index.jsx b/src/tabviews/custom/components/group/normal-group/index.jsx index d814a27..a977b63 100644 --- a/src/tabviews/custom/components/group/normal-group/index.jsx +++ b/src/tabviews/custom/components/group/normal-group/index.jsx @@ -17,6 +17,7 @@ const AntvPie = asyncComponent(() => import('@/tabviews/custom/components/chart/antv-pie')) const DataCard = asyncComponent(() => import('@/tabviews/custom/components/card/data-card')) const TableCard = asyncComponent(() => import('@/tabviews/custom/components/card/table-card')) +const NormalTable = asyncComponent(() => import('@/tabviews/custom/components/table/normal-table')) const PropCard = asyncComponent(() => import('@/tabviews/custom/components/card/prop-card')) const BraftEditor = asyncComponent(() => import('@/tabviews/custom/components/editor/braft-editor')) const SandBox = asyncComponent(() => import('@/tabviews/custom/components/code/sand-box')) @@ -270,6 +271,12 @@ <TableCard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> </Col> ) + } else if (item.type === 'table' && item.subtype === 'normaltable') { + return ( + <Col span={item.width} key={item.uuid}> + <NormalTable config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + </Col> + ) } else if (item.type === 'editor') { return ( <Col span={item.width} key={item.uuid}> diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx index 24682cc..454217a 100644 --- a/src/tabviews/custom/components/share/normalTable/index.jsx +++ b/src/tabviews/custom/components/share/normalTable/index.jsx @@ -805,7 +805,7 @@ return ( <div className={'normal-custom-table ' + setting.tableHeader} id={tableId}> {(setting.tableType === 'radio' || setting.tableType === 'checkbox') && data && data.length > 0 ? - <Switch title="鏀惰捣" className="main-pickup" checkedChildren="寮�" unCheckedChildren="鍏�" defaultChecked={pickup} onChange={this.pickupChange} /> : null + <Switch title="鏀惰捣" className="main-pickup" checkedChildren="寮�" unCheckedChildren="鍏�" checked={pickup} onChange={this.pickupChange} /> : null } <Table components={components} diff --git a/src/tabviews/custom/components/share/tabtransfer/index.jsx b/src/tabviews/custom/components/share/tabtransfer/index.jsx index 03cbe65..2251ea6 100644 --- a/src/tabviews/custom/components/share/tabtransfer/index.jsx +++ b/src/tabviews/custom/components/share/tabtransfer/index.jsx @@ -19,6 +19,7 @@ const AntvTabs = asyncComponent(() => import('@/tabviews/custom/components/tabs/antv-tabs')) const DataCard = asyncComponent(() => import('@/tabviews/custom/components/card/data-card')) const TableCard = asyncComponent(() => import('@/tabviews/custom/components/card/table-card')) +const NormalTable = asyncComponent(() => import('@/tabviews/custom/components/table/normal-table')) const PropCard = asyncComponent(() => import('@/tabviews/custom/components/card/prop-card')) const NormalGroup = asyncComponent(() => import('@/tabviews/custom/components/group/normal-group')) const BraftEditor = asyncComponent(() => import('@/tabviews/custom/components/editor/braft-editor')) @@ -301,6 +302,12 @@ <TableCard config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> </Col> ) + } else if (item.type === 'table' && item.subtype === 'normaltable') { + return ( + <Col span={item.width} key={item.uuid}> + <NormalTable config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> + </Col> + ) } else if (item.type === 'group' && item.subtype === 'normalgroup') { return ( <Col span={item.width} key={item.uuid}> diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx index b31d3b2..67a1b5c 100644 --- a/src/tabviews/subtable/index.jsx +++ b/src/tabviews/subtable/index.jsx @@ -973,7 +973,7 @@ </div> <div className="subtable-box"> {(setting.tableType === 'radio' || setting.tableType === 'checkbox') && this.state.data && this.state.data.length > 0 ? - <Switch title="鏀惰捣" className="subtable-pickup" checkedChildren="寮�" unCheckedChildren="鍏�" defaultChecked={pickup} onChange={this.pickupChange} /> : null + <Switch title="鏀惰捣" className="subtable-pickup" checkedChildren="寮�" unCheckedChildren="鍏�" checked={pickup} onChange={this.pickupChange} /> : null } <SubTable tableId={this.props.Tab.uuid} diff --git a/src/templates/formtabconfig/settingform/index.jsx b/src/templates/formtabconfig/settingform/index.jsx index 9a407ea..54c7b3a 100644 --- a/src/templates/formtabconfig/settingform/index.jsx +++ b/src/templates/formtabconfig/settingform/index.jsx @@ -197,8 +197,8 @@ message: dict['form.required.input'] + '琛ㄥ悕!' }, { - max: formRule.input.max, - message: formRule.input.message + max: 50, + message: '琛ㄥ悕鏈�闀夸负50涓瓧绗�!' } ] })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)} diff --git a/src/templates/menuconfig/editthdmenu/index.jsx b/src/templates/menuconfig/editthdmenu/index.jsx index 72cc5e2..ce31ba8 100644 --- a/src/templates/menuconfig/editthdmenu/index.jsx +++ b/src/templates/menuconfig/editthdmenu/index.jsx @@ -673,6 +673,7 @@ }) this.props.reload() + document.getElementById('root').style.overflowY = 'unset' } else { this.setState({ confirmLoading: false @@ -725,6 +726,7 @@ }) this.props.reload() + document.getElementById('root').style.overflowY = 'unset' } else { this.setState({ confirmLoading: false diff --git a/src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx b/src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx index da7e7b1..0554ea7 100644 --- a/src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx +++ b/src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx @@ -184,6 +184,10 @@ { required: true, message: this.props.dict['form.required.input'] + '琛ㄥ悕!' + }, + { + max: 50, + message: '琛ㄥ悕鏈�闀夸负50涓瓧绗�!' } ] })(<Input placeholder={''} autoComplete="off" />)} diff --git a/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx index 27b3f4d..fc9d30e 100644 --- a/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx +++ b/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx @@ -216,6 +216,10 @@ required: true, message: dict['form.required.input'] + '琛ㄥ悕!' }, + { + max: 50, + message: '琛ㄥ悕鏈�闀夸负50涓瓧绗�!' + } ] })(<Input placeholder={''} autoComplete="off" />)} </Form.Item> diff --git a/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx b/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx index 4d1c6f3..caadc2b 100644 --- a/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx +++ b/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx @@ -201,8 +201,8 @@ message: dict['form.required.input'] + '琛ㄥ悕!' }, { - max: formRule.input.max, - message: formRule.input.message + max: 50, + message: '琛ㄥ悕鏈�闀夸负50涓瓧绗�!' } ] })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit}/>)} diff --git a/src/views/design/sidemenu/config.jsx b/src/views/design/sidemenu/config.jsx index 1ec2bae..9cca512 100644 --- a/src/views/design/sidemenu/config.jsx +++ b/src/views/design/sidemenu/config.jsx @@ -170,20 +170,20 @@ MenuID: '1589788042787ffdt9hle4s45k9r1nvs', MenuNo: 'bd_msn_email_tempM', MenuName: '閭欢妯℃澘', - }, { - src: '', - PageParam: {OpenType: 'newtab', Template: 'ManageTable'}, - type: 'ManageTable', - MenuID: '15900310928174dro07ihfckghpb5h13', - MenuNo: 'bd_msn_sms_tempM', - MenuName: '澶т簬鐭俊妯℃澘', // }, { // src: '', // PageParam: {OpenType: 'newtab', Template: 'ManageTable'}, // type: 'ManageTable', - // MenuID: '1599613340050c8nu6rbst9d4emnnbsq', - // MenuNo: 's_sms_qxM', - // MenuName: '濂囦簯鐭俊妯℃澘', + // MenuID: '15900310928174dro07ihfckghpb5h13', + // MenuNo: 'bd_msn_sms_tempM', + // MenuName: '澶т簬鐭俊妯℃澘', + }, { + src: '', + PageParam: {OpenType: 'newtab', Template: 'ManageTable'}, + type: 'ManageTable', + MenuID: '1599613340050c8nu6rbst9d4emnnbsq', + MenuNo: 's_sms_qxM', + MenuName: '濂囦簯鐭俊妯℃澘', }] }, { MenuID: 'systemPayManage', diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx index ac7a7f9..814683e 100644 --- a/src/views/login/index.jsx +++ b/src/views/login/index.jsx @@ -51,12 +51,6 @@ dict: item === 'zh-CN' ? zhCN : enUS }) } - - md5Password (pwd) { - // md5瀵嗙爜鍔犲瘑 - const salt = 'minkesoft' - return md5(md5(pwd + salt)) - } handleSubmit = () => { this.loginformRef.handleConfirm().then(res => { diff --git a/src/views/login/index.scss b/src/views/login/index.scss index a54f936..ea2976a 100644 --- a/src/views/login/index.scss +++ b/src/views/login/index.scss @@ -26,61 +26,6 @@ } } - .ant-tabs.ant-tabs-card { - .ant-tabs-card-bar { - border-bottom: 0; - .ant-tabs-nav-container { - height: 50px; - line-height: 50px; - } - margin-bottom: 10px; - .ant-tabs-nav-scroll { - .ant-tabs-nav { - display: block; - > div { - display: flex; - > .ant-tabs-tab { - height: 50px; - line-height: 50px; - flex: 1; - } - } - } - } - .ant-tabs-tab { - display: block; - margin-right: 0; - border-radius: 0; - text-align: center; - font-size: 17px; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - border-top: 0; - } - .ant-tabs-tab:first-child { - border-left: 0; - } - .ant-tabs-tab:last-child { - border-right: 0; - } - .ant-tabs-tab.ant-tabs-tab-active { - cursor: default; - } - } - } - .login-form-1 { - .ant-tabs.ant-tabs-card { - .ant-tabs-card-bar { - .ant-tabs-tab { - font-size: 18px; - text-align: left!important; - padding-left: 1.6vw!important; - line-height: 60px!important; - } - } - } - } .login-middle { position: relative; height: calc(100vh - 194px); @@ -100,6 +45,47 @@ overflow: hidden; border: 1px solid #bfbfbf; + .login-way-wrap { + height: 50px; + line-height: 50px; + margin-bottom: 10px; + display: flex; + .login-way { + flex: 1; + width: 50%; + font-size: 17px; + text-align: center; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + padding: 0 16px; + transition: all 0.3s; + border: 1px solid transparent; + border-top: 0!important; + } + .login-way.active, .login-way:hover { + color: #1890ff; + } + .login-way:not(.active) { + cursor: pointer; + background: #fafafa; + border: 1px solid #e8e8e8; + } + .login-way:first-child { + border-left: 0; + } + .login-way:last-child { + border-right: 0; + } + } + .login-way-wrap.simple { + .login-way { + font-size: 18px; + text-align: left!important; + padding-left: 1.6vw!important; + line-height: 60px!important; + } + } .form-item-wrap { padding: 0.6vw 1.6vw 1.6vw; } diff --git a/src/views/login/loginform.jsx b/src/views/login/loginform.jsx index fcf0a71..2c33210 100644 --- a/src/views/login/loginform.jsx +++ b/src/views/login/loginform.jsx @@ -1,7 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Form, Icon, Input, Button, Checkbox, Select, Modal, Tabs, message } from 'antd' +import { Form, Icon, Input, Button, Checkbox, Select, Modal, message } from 'antd' import md5 from 'md5' import moment from 'moment' @@ -10,7 +10,6 @@ import './index.scss' const { warning } = Modal -const { TabPane } = Tabs let LoginVerCodeTimer = null class LoginTabForm extends Component { @@ -278,10 +277,12 @@ const { activeKey, verdisabled, delay, loginWays, remember } = this.state return ( - <Form className={`login-form login-form-${loginWays.length}`} id="login-form" onSubmit={this.handleSubmit}> - <Tabs type="card" activeKey={activeKey} onChange={this.onChangeTab}> - {loginWays.map(item => (<TabPane tab={item.label} key={item.type}></TabPane>))} - </Tabs> + <Form className="login-form" id="login-form" onSubmit={this.handleSubmit}> + <div className={'login-way-wrap ' + (loginWays.length === 1 ? 'simple' : '')}> + {loginWays.map(item => ( + <div className={'login-way' + (activeKey === item.type ? ' active' : '')} onClick={() => this.onChangeTab(item.type)} key={item.type}>{item.label}</div> + ))} + </div> <div className="form-item-wrap"> {activeKey === 'uname_pwd' ? <Form.Item> {getFieldDecorator('username', { diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx index 35afa95..ab58d77 100644 --- a/src/views/pcdesign/index.jsx +++ b/src/views/pcdesign/index.jsx @@ -127,6 +127,7 @@ setTimeout(() => { this.updateCustomComponent() this.getAppPictures() + this.getSmStemp() }, 1000) } @@ -249,6 +250,37 @@ }) } + getSmStemp = () => { + let _sql = `select ID,TemplateCode,SignName from bd_msn_sms_temp where deleted=0 and appkey='${window.GLOB.appkey}'` + + _sql = Utils.formatOptions(_sql) + + let param = { + func: 'sPC_Get_SelectedList', + LText: _sql, + obj_name: 'data', + arr_field: 'ID,TemplateCode,SignName' + } + + param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + param.secretkey = Utils.encrypt(param.LText, param.timestamp) + param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 浜戠鏁版嵁楠岃瘉 + + Api.getSystemConfig(param).then(res => { + let msgs = [] + if (!res.status) { + notification.warning({ + top: 92, + message: res.message, + duration: 5 + }) + } else if (res.data) { + msgs = res.data + } + sessionStorage.setItem('msgTemplate', JSON.stringify(msgs)) + }) + } + getAppPictures = () => { if (sessionStorage.getItem('app_videos') || sessionStorage.getItem('app_pictures')) return @@ -261,6 +293,12 @@ }).then(res => { if (res.status) { sessionStorage.setItem('app_pictures', JSON.stringify(res.data || [])) + } else if (!res.status) { + notification.warning({ + top: 92, + message: res.message, + duration: 5 + }) } Api.getSystemConfig({ @@ -272,6 +310,12 @@ }).then(res => { if (res.status) { sessionStorage.setItem('app_videos', JSON.stringify(res.data || [])) + } else if (!res.status) { + notification.warning({ + top: 92, + message: res.message, + duration: 5 + }) } }) }) @@ -283,7 +327,13 @@ typecharone: '' }).then(res => { let coms = [] - if (res.cus_list && res.cus_list.length > 0) { + if (!res.status) { + notification.warning({ + top: 92, + message: res.message, + duration: 5 + }) + } else if (res.cus_list && res.cus_list.length > 0) { res.cus_list.forEach(item => { let config = '' -- Gitblit v1.8.0