| | |
| | | const SettingComponent = asyncIconComponent(() => import('@/menu/datasource')) |
| | | const WrapComponent = asyncIconComponent(() => import('./wrapsetting')) |
| | | const CardComponent = asyncComponent(() => import('../cardcomponent')) |
| | | const MobPagination = asyncIconComponent(() => import('@/menu/components/share/mobPagination')) |
| | | const LogComponent = asyncIconComponent(() => import('@/menu/components/share/logcomponent')) |
| | | const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent')) |
| | | const UserComponent = asyncIconComponent(() => import('@/menu/components/share/usercomponent')) |
| | |
| | | <ActionComponent config={card} setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/> |
| | | {card.subcards.map((subcard, index) => (<CardComponent key={subcard.uuid} offset={!index ? offset : 0} cards={card} card={subcard} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))} |
| | | <div style={{clear: 'both'}}></div> |
| | | {card.wrap.pagestyle === 'page' && card.setting.laypage === 'true' ? <Pagination total={85} size="small" showTotal={total => `共 ${total} 条`} pageSize={20} defaultCurrent={1}/> : null} |
| | | {card.wrap.pagestyle === 'page' && card.setting.laypage === 'true' && appType !== 'mob' ? <Pagination total={85} size="small" showTotal={total => `共 ${total} 条`} pageSize={20} defaultCurrent={1}/> : null} |
| | | {card.wrap.pagestyle === 'page' && card.setting.laypage === 'true' && appType === 'mob' ? <MobPagination /> : null} |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | line-height: 55px; |
| | | } |
| | | } |
| | | .normal-pagination { |
| | | .am-button::before { |
| | | display: none; |
| | | } |
| | | .am-button { |
| | | border: none; |
| | | font-size: 16px; |
| | | } |
| | | } |
| | | } |
| | | .menu-data-card-edit-box::after { |
| | | display: block; |
| | |
| | | const SettingComponent = asyncIconComponent(() => import('@/menu/datasource')) |
| | | const WrapComponent = asyncIconComponent(() => import('../data-card/wrapsetting')) |
| | | const CardComponent = asyncComponent(() => import('./cardcomponent')) |
| | | const MobPagination = asyncIconComponent(() => import('@/menu/components/share/mobPagination')) |
| | | const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent')) |
| | | const PasteComponent = asyncIconComponent(() => import('@/menu/components/share/pastecomponent')) |
| | | const LogComponent = asyncIconComponent(() => import('@/menu/components/share/logcomponent')) |
| | |
| | | state = { |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | card: null, |
| | | ismob: sessionStorage.getItem('appType') === 'mob', |
| | | appType: sessionStorage.getItem('appType'), |
| | | back: false |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { card, ismob } = this.state |
| | | const { card, appType } = this.state |
| | | let _style = resetStyle(card.style) |
| | | |
| | | return ( |
| | |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <Icon className="plus" title="添加卡片" onClick={this.addCard} type="plus" /> |
| | | {!ismob ? <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" /> : null} |
| | | {appType !== 'mob' ? <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" /> : null} |
| | | <WrapComponent config={card} updateConfig={this.updateComponent} /> |
| | | <CopyComponent type="tablecard" card={card}/> |
| | | <PasteComponent config={card} options={['cardcell', 'search', 'form']} updateConfig={this.updateComponent} /> |
| | |
| | | <div style={{minHeight: 'calc(100% - 90px)'}}> |
| | | {card.subcards.map(subcard => (<CardComponent key={subcard.uuid} cards={card} card={subcard} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))} |
| | | </div> |
| | | {card.setting.laypage === 'true' && card.wrap.pagestyle !== 'slide' ? <Pagination size="small" total={50} /> : null} |
| | | {card.setting.laypage === 'true' && card.wrap.pagestyle !== 'slide' && appType !== 'mob' ? <Pagination size="small" total={50} /> : null} |
| | | {card.setting.laypage === 'true' && card.wrap.pagestyle !== 'slide' && appType === 'mob' ? <MobPagination /> : null} |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | } |
| | | |
| | | state = { |
| | | appType: sessionStorage.getItem('appType'), |
| | | roleList: [] |
| | | } |
| | | |
| | |
| | | render() { |
| | | const { wrap, config } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const { roleList } = this.state |
| | | const { roleList, appType } = this.state |
| | | |
| | | const formItemLayout = { |
| | | labelCol: { |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | {appType === 'mob' ? <Col span={12}> |
| | | <Form.Item label="垂直显示"> |
| | | {getFieldDecorator('vertical', { |
| | | initialValue: wrap.vertical || 'false' |
| | | })( |
| | | <Radio.Group> |
| | | <Radio value="true">是</Radio> |
| | | <Radio value="false">否</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {appType !== 'mob' ? <Col span={12}> |
| | | <Form.Item label="指示点位置"> |
| | | {getFieldDecorator('dotPosition', { |
| | | initialValue: wrap.dotPosition || 'bottom' |
| | |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | </Col> : null} |
| | | {appType !== 'mob' ? <Col span={12}> |
| | | <Form.Item label="动画效果"> |
| | | {getFieldDecorator('effect', { |
| | | initialValue: wrap.effect || 'scrollx' |
| | |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | </Col> : null} |
| | | <Col span={12}> |
| | | <Form.Item label="黑名单"> |
| | | {getFieldDecorator('blacklist', { |
| | |
| | | let appType = sessionStorage.getItem('appType') |
| | | let menulist = null |
| | | |
| | | if (appType === 'pc' || appType === 'mob') { |
| | | if (appType === 'pc') { |
| | | menulist = sessionStorage.getItem('appMenus') |
| | | if (Array.isArray(card.linkmenu)) { |
| | | card.linkmenu = '' |
| | |
| | | if (menulist) { |
| | | try { |
| | | menulist = JSON.parse(menulist) |
| | | if (appType === 'pc' || appType === 'mob') { |
| | | if (appType === 'pc') { |
| | | menulist = menulist.map(item => { |
| | | item.value = item.MenuID |
| | | item.text = item.MenuName |
| | |
| | | key: 'linkmenu', |
| | | label: '关联菜单', |
| | | initVal: card.linkmenu || '', |
| | | tooltip: '双击饼图,会打开关联的菜单。', |
| | | tooltip: '双击柱状图,会打开关联的菜单。', |
| | | required: false, |
| | | forbid: !(appType === 'pc' || appType === 'mob'), |
| | | forbid: appType !== 'pc', |
| | | options: menulist |
| | | }, |
| | | { |
| | |
| | | label: '打开方式', |
| | | initVal: card.open || 'blank', |
| | | required: false, |
| | | forbid: !(appType === 'pc' || appType === 'mob'), |
| | | forbid: appType !== 'pc', |
| | | options: [ |
| | | { value: 'blank', text: '新窗口' }, |
| | | { value: 'self', text: '当前窗口' } |
New file |
| | |
| | | import React, {Component} from 'react' |
| | | import { Icon, Pagination } from 'antd-mobile' |
| | | |
| | | import './index.scss' |
| | | |
| | | class MobPagination extends Component { |
| | | render () { |
| | | return ( |
| | | <Pagination className="mob-pagination" total={5} |
| | | current={1} |
| | | locale={{ |
| | | prevText: (<span><Icon type="left" />上一页</span>), |
| | | nextText: (<span>下一页<Icon type="right" /></span>), |
| | | }} |
| | | /> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | export default MobPagination |
New file |
| | |
| | | .mob-pagination { |
| | | .am-button::before { |
| | | display: none; |
| | | } |
| | | .am-button { |
| | | border: none; |
| | | font-size: 16px; |
| | | background: transparent; |
| | | .am-icon { |
| | | position: relative; |
| | | top: 5px; |
| | | } |
| | | } |
| | | } |
| | |
| | | * @param {Array} menulist // 菜单列表-用于字段透视 |
| | | */ |
| | | export function getColumnForm (card, menulist = [], fields = []) { |
| | | let appType = sessionStorage.getItem('appType') |
| | | let roleList = sessionStorage.getItem('sysRoles') |
| | | if (roleList) { |
| | | try { |
| | |
| | | }, { |
| | | value: 'linkurl', |
| | | text: '链接' |
| | | }] |
| | | }], |
| | | forbidden: appType === 'mob' |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | |
| | | label: Formdict['model.menu'], |
| | | initVal: card.linkmenu || [], |
| | | required: true, |
| | | options: menulist |
| | | options: menulist, |
| | | forbidden: appType === 'mob' |
| | | }, |
| | | { |
| | | type: 'textarea', |
| | | key: 'linkurl', |
| | | label: '链接地址', |
| | | initVal: card.linkurl || '', |
| | | required: true |
| | | required: true, |
| | | forbidden: appType === 'mob' |
| | | }, |
| | | { |
| | | type: 'multiselect', |
| | |
| | | label: '关联字段', |
| | | initVal: card.linkfields || [], |
| | | required: false, |
| | | options: fields |
| | | options: fields, |
| | | forbidden: appType === 'mob' |
| | | }, |
| | | { |
| | | type: 'multiselect', |
| | |
| | | updateConfig={updateConfig} |
| | | /> |
| | | ))} |
| | | {cards.length === 0 ? |
| | | <Empty description="请添加组件" /> : null |
| | | } |
| | | </div> |
| | | {cards.length === 0 ? |
| | | <Empty description="请添加组件" /> : null |
| | | } |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | .mk-component-card { |
| | | position: relative; |
| | | } |
| | | >.ant-empty { |
| | | padding-top: 150px; |
| | | >.ant-row { |
| | | min-height: 100%; |
| | | >.ant-empty { |
| | | padding-top: 150px; |
| | | } |
| | | } |
| | | } |
| | | .mob-shell-inner::-webkit-scrollbar { |
| | |
| | | Api.getSystemConfig({ |
| | | func: 'sPC_Get_LongParam', |
| | | TypeCharOne: sessionStorage.getItem('kei_no'), |
| | | typename: 'pc', |
| | | typename: sessionStorage.getItem('appType') || 'pc', |
| | | MenuID: res.keys_id |
| | | }).then(result => { |
| | | if (!result.status) { |
| | |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | min-height: 30px; |
| | | overflow: hidden; |
| | | |
| | | .card-item-box { |
| | | background-position: center center; |
| | |
| | | background-size: cover; |
| | | min-height: 30px; |
| | | position: relative; |
| | | overflow: hidden; |
| | | |
| | | .card-item-box { |
| | | position: relative; |