| | |
| | | const TableCard = asyncComponent(() => import('@/menu/components/card/table-card')) |
| | | const NormalTable = asyncComponent(() => import('@/menu/components/table/normal-table')) |
| | | const BraftEditor = asyncComponent(() => import('@/menu/components/editor/braft-editor')) |
| | | const AntvScatter = asyncComponent(() => import('@/menu/components/chart/antv-scatter')) |
| | | const AntvDashboard = asyncComponent(() => import('@/menu/components/chart/antv-dashboard')) |
| | | const CarouselDataCard = asyncComponent(() => import('@/menu/components/carousel/data-card')) |
| | | const CarouselPropCard = asyncComponent(() => import('@/menu/components/carousel/prop-card')) |
| | | |
| | | const Card = ({ id, card, moveCard, findCard, delCard, updateConfig }) => { |
| | | const originalIndex = findCard(id).index |
| | |
| | | return (<AntvPie card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) |
| | | } else if (card.type === 'dashboard') { |
| | | return (<AntvDashboard card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) |
| | | } else if (card.type === 'scatter') { |
| | | return (<AntvScatter card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) |
| | | } else if (card.type === 'card' && card.subtype === 'datacard') { |
| | | return (<DataCard card={card} updateConfig={updateConfig} deletecomponent={delCard} />) |
| | | } else if (card.type === 'card' && card.subtype === 'propcard') { |
| | |
| | | return (<TableCard card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) |
| | | } else if (card.type === 'table' && card.subtype === 'normaltable') { |
| | | return (<NormalTable card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) |
| | | } else if (card.type === 'carousel' && card.subtype === 'datacard') { |
| | | return (<CarouselDataCard card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) |
| | | } else if (card.type === 'carousel' && card.subtype === 'propcard') { |
| | | return (<CarouselPropCard card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) |
| | | } else if (card.type === 'editor') { |
| | | return (<BraftEditor card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) |
| | | } |
| | |
| | | |
| | | state = { |
| | | roleList: [], |
| | | appType: sessionStorage.getItem('appType'), |
| | | print: this.props.setting.print || 'false' |
| | | } |
| | | |
| | |
| | | render() { |
| | | const { setting, dict } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const { roleList, print } = this.state |
| | | const { roleList, print, appType } = this.state |
| | | |
| | | const formItemLayout = { |
| | | labelCol: { |
| | |
| | | })(<InputNumber min={1} max={24} precision={0} onPressEnter={this.handleSubmit}/>)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | {appType !== 'mob' ? <Col span={12}> |
| | | <Form.Item label="打印按钮"> |
| | | {getFieldDecorator('print', { |
| | | initialValue: print |
| | |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | {print === 'true' ? <Col span={12}> |
| | | </Col> : null} |
| | | {print === 'true' && appType !== 'mob' ? <Col span={12}> |
| | | <Form.Item label="打印尺寸"> |
| | | {getFieldDecorator('pageSize', { |
| | | initialValue: setting.pageSize || 'A4', |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {print === 'true' ? <Col span={12}> |
| | | {print === 'true' && appType !== 'mob' ? <Col span={12}> |
| | | <Form.Item label="打印布局"> |
| | | {getFieldDecorator('pageLayout', { |
| | | initialValue: setting.pageLayout || 'vertical', |
| | |
| | | const MainSearch = asyncComponent(() => import('@/menu/components/search/main-search')) |
| | | const AntvPie = asyncComponent(() => import('@/menu/components/chart/antv-pie')) |
| | | const AntvDashboard = asyncComponent(() => import('@/menu/components/chart/antv-dashboard')) |
| | | const AntvScatter = asyncComponent(() => import('@/menu/components/chart/antv-scatter')) |
| | | const AntvTabs = asyncComponent(() => import('@/menu/components/tabs/antv-tabs')) |
| | | const DataCard = asyncComponent(() => import('@/menu/components/card/data-card')) |
| | | const PropCard = asyncComponent(() => import('@/menu/components/card/prop-card')) |
| | |
| | | return (<AntvPie card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) |
| | | } else if (card.type === 'dashboard') { |
| | | return (<AntvDashboard card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) |
| | | } else if (card.type === 'scatter') { |
| | | return (<AntvScatter card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) |
| | | } else if (card.type === 'tabs') { |
| | | return (<AntvTabs tabs={card} updateConfig={updateConfig} deletecomponent={delCard} />) |
| | | } else if (card.type === 'card' && card.subtype === 'datacard') { |
| | |
| | | } |
| | | |
| | | state = { |
| | | appType: sessionStorage.getItem('appType'), |
| | | roleList: [] |
| | | } |
| | | |
| | |
| | | render() { |
| | | const { setting } = 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={ |
| | | <Tooltip placement="topLeft" title="标签位置为top时有效,默认值为line。"> |
| | | <Icon type="question-circle" /> |
| | |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | </Col> : null} |
| | | <Col span={12}> |
| | | <Form.Item label="黑名单"> |
| | | {getFieldDecorator('blacklist', { |
| | |
| | | floor: card.floor, |
| | | width: card.width || 24, |
| | | subtype: card.subtype, |
| | | wrap: { height: 50, title: 'NavBar' }, |
| | | wrap: { height: 50, title: 'NavBar', back: 'true', logout: 'false' }, |
| | | style: {borderBottomColor: '#bcbcbc', borderBottomWidth: '1px', paddingLeft: '10px', paddingRight: '10px', lineHeight: '2.8', fontSize: '18px' }, |
| | | } |
| | | |
| | |
| | | </Popover> |
| | | <div className="am-navbar"> |
| | | <div className="am-navbar-left"> |
| | | <Icon type="left" /> |
| | | {card.wrap.back !== 'false' ? <Icon type="left" /> : null} |
| | | </div> |
| | | <div className="am-navbar-title">{card.wrap.title || ''}</div> |
| | | <div className="am-navbar-right"></div> |
| | | <div className="am-navbar-right"> |
| | | {card.wrap.logout === 'true' ? <span>退出</span> : null} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | ) |
| | |
| | | .am-navbar-left { |
| | | flex: 1; |
| | | text-align: left; |
| | | color: #1890ff; |
| | | } |
| | | .am-navbar-title { |
| | | text-align: center; |
| | |
| | | } |
| | | .am-navbar-right { |
| | | flex: 1; |
| | | text-align: right; |
| | | color: #1890ff; |
| | | } |
| | | } |
| | | } |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Row, Col, Input, InputNumber } from 'antd' |
| | | import { Form, Row, Col, Input, InputNumber, Radio, Tooltip, Icon } from 'antd' |
| | | |
| | | import './index.scss' |
| | | |
| | |
| | | })(<InputNumber min={30} max={200} precision={0} onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item label="返回"> |
| | | {getFieldDecorator('back', { |
| | | initialValue: wrap.back || 'true' |
| | | })( |
| | | <Radio.Group> |
| | | <Radio value="true">显示</Radio> |
| | | <Radio value="false">不显示</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <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> |
| | |
| | | const NormalForm = asyncComponent(() => import('@/menu/components/form/normal-form')) |
| | | const NormalGroup = asyncComponent(() => import('@/menu/components/group/normal-group')) |
| | | const CodeSandbox = asyncComponent(() => import('@/menu/components/code/sandbox')) |
| | | const BraftEditor = asyncComponent(() => import('@/menu/components/editor/braft-editor')) |
| | | const NormalLogin = asyncComponent(() => import('@/pc/components/login/normal-login')) |
| | | const NormalNavbar = asyncComponent(() => import('@/mob/components/navbar/normal-navbar')) |
| | | const NormalTopbar = asyncComponent(() => import('@/mob/components/topbar/normal-navbar')) |
| | |
| | | return (<NormalGroup group={card} updateConfig={updateConfig} deletecomponent={delCard}/>) |
| | | } else if (card.type === 'code') { |
| | | return (<CodeSandbox card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) |
| | | } else if (card.type === 'editor') { |
| | | return (<BraftEditor card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) |
| | | } else if (card.type === 'login') { |
| | | return (<NormalLogin card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) |
| | | } else if (card.type === 'navbar') { |
| | |
| | | import TableCard from '@/assets/mobimg/table-card.png' |
| | | import NormalTable from '@/assets/mobimg/normal-table.png' |
| | | import Pie from '@/assets/mobimg/pie.png' |
| | | import Editor from '@/assets/mobimg/editor.png' |
| | | import SandBox from '@/assets/mobimg/sandbox.png' |
| | | import Pie1 from '@/assets/mobimg/ring.png' |
| | | import Pie2 from '@/assets/mobimg/nightingale.png' |
| | |
| | | { type: 'menu', url: Pie2, component: 'pie', subtype: 'nightingale', title: '南丁格尔图', width: 24 }, |
| | | { type: 'menu', url: dashboard, component: 'dashboard', subtype: 'dashboard', title: '仪表盘', width: 12 }, |
| | | { type: 'menu', url: scatter, component: 'scatter', subtype: 'scatter', title: '散点图', width: 24 }, |
| | | { type: 'menu', url: Editor, component: 'editor', subtype: 'brafteditor', title: '富文本', width: 24 }, |
| | | { type: 'menu', url: SandBox, component: 'code', subtype: 'sandbox', title: '自定义', width: 24 }, |
| | | { type: 'menu', url: group, component: 'group', subtype: 'normalgroup', title: '分组', width: 24 }, |
| | | { type: 'menu', url: Login, component: 'login', subtype: 'normallogin', title: '登录', width: 24 }, |
| | |
| | | const NormalGroup = asyncComponent(() => import('@/tabviews/custom/components/group/normal-group')) |
| | | const BraftEditor = asyncComponent(() => import('@/tabviews/custom/components/editor/braft-editor')) |
| | | const SandBox = asyncComponent(() => import('@/tabviews/custom/components/code/sand-box')) |
| | | const CarouselDataCard = asyncComponent(() => import('@/tabviews/custom/components/carousel/data-card')) |
| | | const CarouselPropCard = asyncComponent(() => import('@/tabviews/custom/components/carousel/prop-card')) |
| | | |
| | | class TabTransfer extends Component { |
| | | static propTpyes = { |
| | |
| | | <PropCard config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'carousel' && item.subtype === 'datacard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <CarouselDataCard config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'carousel' && item.subtype === 'propcard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <CarouselPropCard config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'tablecard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | |
| | | const TabTransfer = asyncComponent(() => import('../../share/tabtransfer')) |
| | | const { TabPane } = Tabs |
| | | |
| | | class antvBarLineChart extends Component { |
| | | class antvTabs extends Component { |
| | | static propTpyes = { |
| | | bids: PropTypes.any, // 父级Id集 |
| | | config: PropTypes.object, // 组件配置信息 |
| | |
| | | } |
| | | } |
| | | |
| | | export default antvBarLineChart |
| | | export default antvTabs |