| | |
| | | |
| | | if (cell.hidden) return |
| | | |
| | | if (supItem.hidden || !item.values.includes(supItem.initval)) { |
| | | if (supItem.hidden) { |
| | | cell.hidden = true |
| | | fieldMap.set(item.field, cell) |
| | | } else if (supItem.type === 'checkbox') { |
| | | let vals = [...supItem.initval, ...item.values] |
| | | if (vals.length === new Set(vals).size) { |
| | | cell.hidden = true |
| | | } |
| | | } else if (!item.values.includes(supItem.initval)) { |
| | | cell.hidden = true |
| | | } |
| | | fieldMap.set(item.field, cell) |
| | | |
| | | fields.push(item) |
| | | }) |
| | |
| | | _fieldval.Ot = 'requiredSgl' |
| | | } else if (value === 'audit') { |
| | | _fieldval.label = '审核' |
| | | _fieldval.class = 'purple' |
| | | _fieldval.class = 'primary' |
| | | _fieldval.Ot = 'requiredSgl' |
| | | } else if (value === 'LogicDelete' || value === 'delete') { |
| | | _fieldval.label = '删除' |
| | |
| | | { value: 'mkBinding', text: '开通扫码登录' }, |
| | | { value: 'mkUnBinding', text: '用户解绑' }, |
| | | { value: 'reAuth', text: '重新授权' }, |
| | | { value: 'goBack', text: '返回' }, |
| | | ] |
| | | pageTemps = [ |
| | | { value: 'linkpage', text: '关联菜单' }, |
| | |
| | | width: card.width || 24, |
| | | name: card.name, |
| | | subtype: card.subtype, |
| | | wrap: { name: card.name, width: card.width || 24, loginWays: ['uname_pwd'] }, |
| | | wrap: { name: card.name, width: card.width || 24, loginWays: ['uname_pwd'], shortcut: 'remember' }, |
| | | style: { background: '#ffffff', width: '330px', borderRadius: '4px', marginLeft: '55vw'}, |
| | | loginWays: [ |
| | | {type: 'uname_pwd', label: '账号密码登录', remember: 'true'}, |
| | | {type: 'uname_pwd', label: '账号密码登录', shortcut: 'remember'}, |
| | | {type: 'sms_vcode', label: '短信验证码'}, |
| | | {type: 'app_scan', label: '扫码登录'}, |
| | | ] |
| | |
| | | } |
| | | |
| | | updateWrap = (res) => { |
| | | this.updateComponent({...this.state.card, wrap: res}) |
| | | let card = fromJS(this.state.card).toJS() |
| | | |
| | | card.wrap = res |
| | | |
| | | if (res.shortcut) { |
| | | card.loginWays[0].shortcut = res.shortcut |
| | | } |
| | | |
| | | this.updateComponent(card) |
| | | } |
| | | |
| | | render() { |
| | |
| | | } |
| | | } |
| | | } |
| | | .no-short.form-item-wrap { |
| | | .btn-login { |
| | | margin-top: 45px; |
| | | } |
| | | } |
| | | } |
| | | .login-edit-box::after { |
| | | display: block; |
| | |
| | | } |
| | | |
| | | UNSAFE_componentWillReceiveProps (nextProps) { |
| | | const { loginWays, wrap } = this.props |
| | | const { wrap } = this.props |
| | | |
| | | if (!is(fromJS(wrap), fromJS(nextProps.wrap))) { |
| | | let _loginWays = [] |
| | | loginWays.forEach(item => { |
| | | nextProps.loginWays.forEach(item => { |
| | | if (!nextProps.wrap.loginWays || nextProps.wrap.loginWays.includes(item.type)) { |
| | | _loginWays.push(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"> |
| | | {activeWay.type === 'uname_pwd' ? <div className={'form-item-wrap ' + (activeWay.shortcut === 'none' ? 'no-short' : '')}> |
| | | <Form.Item> |
| | | <Input |
| | | prefix={<Icon type="user" style={{ color: 'rgba(0,0,0,.25)' }} />} |
| | |
| | | <Form.Item> |
| | | <Input.Password placeholder="密码" prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />} /> |
| | | </Form.Item> |
| | | <Form.Item className="minline"> |
| | | {!activeWay.shortcut || activeWay.shortcut === 'remember' ? <Form.Item className="minline"> |
| | | <Checkbox>记住密码</Checkbox> |
| | | </Form.Item> |
| | | </Form.Item> : null} |
| | | {activeWay.shortcut === 'autologon' ? <Form.Item className="minline"> |
| | | <Checkbox>自动登录</Checkbox> |
| | | </Form.Item> : null} |
| | | <Form.Item className="btn-login"> |
| | | <Button type="primary" onDoubleClick={() => this.changeMenu()} className="login-form-button"> |
| | | 登录 |
| | |
| | | { label: '扫码', value: 'app_scan', disabled: appType === 'mob' }, |
| | | ], |
| | | controlFields: [ |
| | | {field: 'tempId', values: ['sms_vcode']} |
| | | {field: 'tempId', values: ['sms_vcode']}, |
| | | {field: 'shortcut', values: ['uname_pwd']}, |
| | | ] |
| | | }, |
| | | { |
| | |
| | | tooltip: '短信模板可在管理系统 HS-奇云短信模板 处添加。', |
| | | required: true, |
| | | options: msgTemps |
| | | } |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'shortcut', |
| | | label: '快捷方式', |
| | | initval: wrap.shortcut || 'remember', |
| | | tooltip: '账号密码登录时的快捷方式。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'none', label: '无'}, |
| | | {value: 'remember', label: '记住密码'}, |
| | | {value: 'autologon', label: '自动登录'}, |
| | | ] |
| | | }, |
| | | ] |
| | | |
| | | return wrapForm |
| | |
| | | dataName: card.dataName || '', |
| | | name: card.name, |
| | | subtype: card.subtype, |
| | | wrap: { name: card.name, width: card.width || 1200 }, |
| | | wrap: { name: card.name, width: card.width || 1200, height: 50 }, |
| | | logoStyle: { width: '100px' }, |
| | | style: { }, |
| | | links: [], |
| | |
| | | primaryId: primaryId |
| | | } |
| | | } |
| | | } else if (btn.tabTemplate === 'ThdMenu') { |
| | | // } else if (btn.tabTemplate === 'ThdMenu') { |
| | | } else { |
| | | let menu = null |
| | | |
| | | if (btn.linkmenu && btn.linkmenu.length > 0) { |
| | |
| | | 'credit-card', |
| | | 'customer-service', |
| | | 'dashboard', |
| | | 'ellipsis', |
| | | 'more', |
| | | 'database', |
| | | 'dislike', |
| | | 'environment', |
| | |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Row, Col, Input, Radio, Icon, Tooltip, InputNumber } from 'antd' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import './index.scss' |
| | | |
| | | const SourceComponent = asyncComponent(() => import('@/menu/components/share/sourcecomponent')) |
| | | |
| | | class CustomMenuForm extends Component { |
| | | static propTpyes = { |
| | |
| | | this.props.updateConfig({...config, cacheUseful: value}) |
| | | } else if (key === 'timeUnit') { |
| | | this.props.updateConfig({...config, timeUnit: value}) |
| | | } else if (key === 'advertUrl') { |
| | | this.props.updateConfig({...config, advertUrl: value}) |
| | | } else if (key === 'advertTime') { |
| | | this.props.updateConfig({...config, advertTime: value}) |
| | | } |
| | | } |
| | | |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | <Col span={24}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="在明科云APP中有效。"> |
| | | <Icon type="question-circle" /> |
| | | 广告页 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('advertUrl', { |
| | | initialValue: config.advertUrl || '' |
| | | })( |
| | | <SourceComponent type="picture" placement="right" onChange={(val) => {this.selectChange('advertUrl', val)}}/> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | {config.advertUrl ? <Col span={24}> |
| | | <Form.Item label="停留(s)"> |
| | | {getFieldDecorator('advertTime', { |
| | | initialValue: config.advertTime || 3, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: dict['mob.required.input'] + '停留时间!' |
| | | } |
| | | ] |
| | | })( |
| | | <InputNumber min={1} max={10} precision={0} onChange={(val) => {this.selectChange('advertTime', val)}}/> |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | </Row> |
| | | </Form> |
| | | ) |
| | |
| | | font-size: 12px; |
| | | } |
| | | } |
| | | .ant-radio-group { |
| | | white-space: nowrap; |
| | | } |
| | | } |
| | |
| | | targetKeys: [], |
| | | trees: null, |
| | | expandedKeys: [], |
| | | searchkey: '' |
| | | searchkey: '', |
| | | appViewList: [] |
| | | } |
| | | |
| | | oriTrees = null |
| | |
| | | this.setState({app: param}, () => { |
| | | this.getTreeList() |
| | | this.getMenuList() |
| | | this.getAppViewList() |
| | | }) |
| | | } |
| | | |
| | |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | } |
| | | |
| | | getAppViewList = () => { |
| | | const { app } = this.state |
| | | |
| | | Api.getSystemConfig({ |
| | | func: 's_get_keyids', |
| | | bid: app.ID |
| | | }).then(result => { |
| | | if (!result.status) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | this.setState({appViewList: result.data || []}) |
| | | }) |
| | | } |
| | | |
| | | getMenuList = (reset) => { |
| | |
| | | } |
| | | |
| | | deleteMenu = (record) => { |
| | | const { app } = this.state |
| | | const { app, appViewList } = this.state |
| | | const _this = this |
| | | |
| | | let param = { |
| | |
| | | param.MenuID = param.MenuID + ',' + record.nodes.popviews.join(',') |
| | | } |
| | | |
| | | let _param = { |
| | | func: 's_kei_link_keyids_addupt', |
| | | BID: app.ID, |
| | | exec_type: 'y', |
| | | LText: '' |
| | | } |
| | | |
| | | let _appViewList = appViewList.filter(item => item.keys_id !== record.MenuID) |
| | | |
| | | if (appViewList.length !== _appViewList.length) { |
| | | _param.LText = _appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`) |
| | | _param.LText = _param.LText.join(' union all ') |
| | | _param.LText = Utils.formatOptions(_param.LText) |
| | | |
| | | _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | _param.secretkey = Utils.encrypt('', _param.timestamp) |
| | | } else { |
| | | _param = null |
| | | } |
| | | |
| | | confirm({ |
| | | content: '确定删除该菜单吗?', |
| | | onOk() { |
| | |
| | | duration: 3 |
| | | }) |
| | | _this.getMenuList(true) |
| | | |
| | | if (_param) { |
| | | Api.getCloudConfig(_param).then(res => { |
| | | if (!res.status) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: res.message, |
| | | duration: 5 |
| | | }) |
| | | } else { |
| | | _this.setState({appViewList: _appViewList}) |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | notification.warning({ |
| | | top: 92, |