| | |
| | | import React, {Component} from 'react' |
| | | import {connect} from 'react-redux' |
| | | import { BackTop, Breadcrumb, Icon, notification} from 'antd' |
| | | import { BackTop, Breadcrumb, notification} from 'antd' |
| | | import { HomeOutlined, RightOutlined, RedoOutlined } from '@ant-design/icons' |
| | | import moment from 'moment' |
| | | import 'moment/locale/zh-cn' |
| | | |
| | |
| | | <section id="mk-breadview-wrap" className="mk-breadview-wrap"> |
| | | {hasNavBar && tabview ? <Breadcrumb separator=""> |
| | | <Breadcrumb.Item> |
| | | <Icon type="home" onClick={this.gotoHome} /> |
| | | <HomeOutlined onClick={this.gotoHome} /> |
| | | </Breadcrumb.Item> |
| | | {tabview.ParentNames && tabview.ParentNames[0] ? |
| | | <Breadcrumb.Item>{tabview.ParentNames[0]}</Breadcrumb.Item> : null} |
| | | {tabview.ParentNames && tabview.ParentNames[0] ? |
| | | <Breadcrumb.Separator children={<Icon type="right" />} /> : null} |
| | | <Breadcrumb.Separator children={<RightOutlined />} /> : null} |
| | | {tabview.ParentNames && tabview.ParentNames[1] ? |
| | | <Breadcrumb.Item>{tabview.ParentNames[1]}</Breadcrumb.Item> : null} |
| | | {tabview.ParentNames && tabview.ParentNames[1] ? |
| | | <Breadcrumb.Separator children={<Icon type="right" />} /> : null} |
| | | <Breadcrumb.Item><Icon type="redo" onClick={this.refreshTabview}/>{tabview.MenuName}</Breadcrumb.Item> |
| | | <Breadcrumb.Separator children={<RightOutlined />} /> : null} |
| | | <Breadcrumb.Item><RedoOutlined onClick={this.refreshTabview}/>{tabview.MenuName}</Breadcrumb.Item> |
| | | </Breadcrumb> : null} |
| | | {tabview ? this.selectcomponent(tabview) : null} |
| | | <BackTop> |
| | |
| | | border: 0; |
| | | margin-top: 16px; |
| | | } |
| | | .main-copy { |
| | | position: fixed; |
| | | z-index: 20; |
| | | bottom: 65px; |
| | | right: 30px; |
| | | width: 40px; |
| | | height: 40px; |
| | | i { |
| | | font-size: 18px; |
| | | } |
| | | } |
| | | .main-copy.ifr-copy { |
| | | bottom: 65px; |
| | | right: 40px; |
| | | width: 30px; |
| | | height: 32px; |
| | | border: 2px solid #687991; |
| | | opacity: 0.6; |
| | | i { |
| | | font-size: 14px; |
| | | color: #687991; |
| | | } |
| | | } |
| | | .main-copy.ifr-copy:hover { |
| | | opacity: 1; |
| | | } |
| | | .ant-back-top { |
| | | bottom: 10px; |
| | | right: 20px; |
| | |
| | | import {connect} from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import moment from 'moment' |
| | | import { Dropdown, Menu, Icon, Modal, Form, notification, Switch, Input } from 'antd' |
| | | import { Dropdown, Menu, Modal, Form, notification, Switch, Input } from 'antd' |
| | | import { SearchOutlined, DownOutlined, MenuFoldOutlined, MenuUnfoldOutlined } from '@ant-design/icons' |
| | | |
| | | import { |
| | | toggleCollapse, |
| | |
| | | <header className="header-container ant-menu-dark" id="main-header-container"> |
| | | <div className={'header-logo ' + (collapse && navBar !== 'topmenu' ? 'collapse' : '')}><img src={this.state.logourl} alt=""/></div> |
| | | <div className={'header-collapse ' + (collapse && navBar !== 'topmenu' ? 'collapse' : '')}> |
| | | {navBar !== 'topmenu' ? <Icon type={collapse ? 'menu-unfold' : 'menu-fold'} onClick={this.handleCollapse}/> : null} |
| | | {navBar !== 'topmenu' ? (collapse ? <MenuUnfoldOutlined onClick={this.handleCollapse}/> : <MenuFoldOutlined onClick={this.handleCollapse}/>) : null} |
| | | </div> |
| | | {/* 正常菜单 */} |
| | | {navBar !== 'topmenu' && menulist ? |
| | |
| | | <div> |
| | | <img src={this.state.avatar || avatar} alt=""/> |
| | | <span> |
| | | <span className="username">{this.state.userName}</span> <Icon type="down" /> |
| | | <span className="username">{this.state.userName}</span> <DownOutlined /> |
| | | </span> |
| | | </div> |
| | | </Dropdown> |
| | |
| | | </div> |
| | | </div> |
| | | } trigger={['click']} className="search-menu" placement="bottomRight" onVisibleChange={this.dropdownMenuChange}> |
| | | <Icon className="search-menu" type="search" /> |
| | | <SearchOutlined className="search-menu" /> |
| | | </Dropdown> : null |
| | | } |
| | | {/* 修改密码 */} |
| | |
| | | padding-left: 10px; |
| | | margin: 0 10px; |
| | | transition: padding-left 0.15s; |
| | | i { |
| | | .anticon { |
| | | cursor: pointer; |
| | | position: relative; |
| | | top: 3px; |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Icon, Input, Checkbox } from 'antd' |
| | | import { Form, Input, Checkbox } from 'antd' |
| | | import { UserOutlined, LockOutlined } from '@ant-design/icons' |
| | | |
| | | import zhCN from '@/locales/zh-CN/login.js' |
| | | import enUS from '@/locales/en-US/login.js' |
| | | import './index.scss' |
| | |
| | | initialValue: username, |
| | | })( |
| | | <Input |
| | | prefix={<Icon type="user" style={{ color: 'rgba(0,0,0,.25)' }} />} |
| | | prefix={<UserOutlined style={{ color: 'rgba(0,0,0,.25)' }}/>} |
| | | placeholder={this.state.dict['login.username']} |
| | | autoComplete="off" |
| | | onPressEnter={(e) => {this.handleSubmit(e, 'password')}} |
| | |
| | | message: this.state.dict['login.password.empty'], |
| | | } |
| | | ] |
| | | })(<Input.Password onPressEnter={(e) => {this.handleSubmit(e, 'username')}} placeholder={this.state.dict['login.password']} prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />} />)} |
| | | })(<Input.Password onPressEnter={(e) => {this.handleSubmit(e, 'username')}} placeholder={this.state.dict['login.password']} prefix={<LockOutlined style={{ color: 'rgba(0,0,0,.25)' }} />} />)} |
| | | </Form.Item> |
| | | <Form.Item style={{marginBottom: '10px'}}> |
| | | {getFieldDecorator('remember', { |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Icon, Modal, notification } from 'antd' |
| | | import { Modal, notification } from 'antd' |
| | | import { SnippetsOutlined } from '@ant-design/icons' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | |
| | |
| | | |
| | | return ( |
| | | <div style={{display: 'inline-block'}}> |
| | | <Icon type="snippets" style={{color: 'purple'}} onClick={() => {this.setState({visible: true})}} /> |
| | | <SnippetsOutlined style={{color: 'purple'}} onClick={() => {this.setState({visible: true})}} /> |
| | | <Modal |
| | | title="粘贴" |
| | | visible={visible} |
| | |
| | | import PropTypes from 'prop-types' |
| | | import { connect } from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Menu, Icon } from 'antd' |
| | | import { Menu } from 'antd' |
| | | |
| | | import MKEmitter from '@/utils/events.js' |
| | | import MkIcon from '@/components/mk-icon' |
| | | import './index.scss' |
| | | |
| | | const { SubMenu } = Menu |
| | |
| | | key={item.MenuID} |
| | | title={ |
| | | <span> |
| | | <Icon type={item.PageParam.Icon} /> |
| | | <MkIcon type={item.PageParam.Icon} /> |
| | | <span>{item.MenuName}</span> |
| | | </span> |
| | | } |
| | |
| | | import PropTypes from 'prop-types' |
| | | import {connect} from 'react-redux' |
| | | import { fromJS } from 'immutable' |
| | | import {Tabs, Icon, BackTop, notification} from 'antd' |
| | | import {Tabs, BackTop, notification} from 'antd' |
| | | import { RedoOutlined, CloseOutlined } from '@ant-design/icons' |
| | | import moment from 'moment' |
| | | import 'moment/locale/zh-cn' |
| | | |
| | |
| | | <Tabs.TabPane |
| | | tab={ |
| | | <span className="tab-control"> |
| | | <Icon type="redo" onClick={(e) => {this.refreshTabview(e, view)}}/> |
| | | <RedoOutlined onClick={(e) => {this.refreshTabview(e, view)}}/> |
| | | <span className="tab-name" onClick={(e) => {this.changeTab(e, view)}}> |
| | | {view.MenuName} |
| | | </span> |
| | | {view.type !== 'Home' ? |
| | | <Icon type="close" onClick={(e) => {e.stopPropagation();this.closeTabView(view.MenuID)}}/> : null |
| | | <CloseOutlined onClick={(e) => {e.stopPropagation();this.closeTabView(view.MenuID)}}/> : null |
| | | } |
| | | </span> |
| | | } |
| | |
| | | padding: 18px 16px 6px 6px; |
| | | margin-right: 20px; |
| | | cursor: default; |
| | | span.tab-control i.anticon-close { |
| | | span.tab-control .anticon-close { |
| | | position: absolute; |
| | | right: -7px; |
| | | top: 10px; |
| | |
| | | cursor: pointer; |
| | | display: none; |
| | | } |
| | | span.tab-control i.anticon-redo { |
| | | span.tab-control .anticon-redo { |
| | | position: absolute; |
| | | left: -2px; |
| | | top: 18px; |
| | |
| | | } |
| | | } |
| | | .ant-tabs-tab:hover { |
| | | span.tab-control i.anticon-close { |
| | | span.tab-control .anticon-close { |
| | | display: inline-block; |
| | | } |
| | | } |
| | | .ant-tabs-tab-active.ant-tabs-tab:hover { |
| | | span.tab-control i.anticon-redo { |
| | | span.tab-control .anticon-redo { |
| | | display: inline-block; |
| | | } |
| | | } |
| | |
| | | border: 0; |
| | | margin-top: 16px; |
| | | } |
| | | } |
| | | .main-copy { |
| | | position: fixed; |
| | | z-index: 20; |
| | | bottom: 65px; |
| | | right: 30px; |
| | | width: 40px; |
| | | height: 40px; |
| | | i { |
| | | font-size: 18px; |
| | | } |
| | | } |
| | | .main-copy.ifr-copy { |
| | | bottom: 65px; |
| | | right: 40px; |
| | | width: 30px; |
| | | height: 32px; |
| | | border: 2px solid #687991; |
| | | opacity: 0.6; |
| | | i { |
| | | font-size: 14px; |
| | | color: #687991; |
| | | } |
| | | } |
| | | .main-copy.ifr-copy:hover { |
| | | opacity: 1; |
| | | } |
| | | .ant-back-top { |
| | | bottom: 10px; |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Icon, Popover, Checkbox } from 'antd' |
| | | import { Popover, Checkbox } from 'antd' |
| | | import { PlusOutlined, PlusSquareOutlined, EditOutlined, FontColorsOutlined, DeleteOutlined, SettingOutlined, ToolOutlined } from '@ant-design/icons' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import asyncIconComponent from '@/utils/asyncIconComponent' |
| | |
| | | <div className="menu-balcony-edit-box" style={_style} id={card.uuid}> |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <Icon className="plus" title="添加元素" onClick={this.addElement} type="plus" /> |
| | | <Icon className="plus" title="添加按钮" onClick={this.addButton} type="plus-square" /> |
| | | <PlusOutlined className="plus" title="添加元素" onClick={this.addElement} /> |
| | | <PlusSquareOutlined className="plus" title="添加按钮" onClick={this.addButton} /> |
| | | <NormalForm title="浮动卡设置" width={800} update={this.updateWrap} getForms={this.getWrapForms}> |
| | | <Icon type="edit" style={{color: '#1890ff'}} title="编辑"/> |
| | | <EditOutlined style={{color: '#1890ff'}} title="编辑"/> |
| | | </NormalForm> |
| | | <CopyComponent type="balcony" card={card}/> |
| | | <PasteComponent options={['action', 'customCardElement']} updateConfig={this.pasteComponent} /> |
| | | <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" /> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle} /> |
| | | <ClockComponent config={card} updateConfig={this.updateComponent}/> |
| | | <UserComponent config={card}/> |
| | | <Icon className="close" title="删除组件" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | {card.wrap.datatype !== 'static' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : null} |
| | | {card.wrap.datatype === 'static' ? <Icon style={{color: '#eeeeee', cursor: 'not-allowed'}} type="setting"/> : null} |
| | | {card.wrap.datatype === 'static' ? <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/> : null} |
| | | </div> |
| | | } trigger="hover"> |
| | | <Icon type="tool" /> |
| | | <ToolOutlined /> |
| | | </Popover> |
| | | {card.wrap.checkAll === 'show' ? <div className="check-all"><Checkbox>全选</Checkbox></div> : null} |
| | | <CardCellComponent cards={card} cardCell={card} elements={card.elements} updateElement={this.updateCard}/> |
| | |
| | | import React from 'react' |
| | | import { useDrag, useDrop } from 'react-dnd' |
| | | import { Icon, Popover, Button } from 'antd' |
| | | import { Popover, Button } from 'antd' |
| | | import { EditOutlined, CopyOutlined, CloseOutlined, FontColorsOutlined, ProfileOutlined } from '@ant-design/icons' |
| | | |
| | | import { resetStyle } from '@/utils/utils-custom.js' |
| | | import MkIcon from '@/components/mk-icon' |
| | | import './index.scss' |
| | | |
| | | const Card = ({ id, card, moveCard, findCard, editCard, copyCard, delCard, profileCard, changeStyle, doubleClickCard }) => { |
| | |
| | | let btnElement = null |
| | | let _style = resetStyle(card.style) |
| | | if (card.show === 'icon') { |
| | | btnElement = (<Button style={_style} type="link"><Icon type={card.icon}/></Button>) |
| | | btnElement = (<Button style={_style} type="link"><MkIcon type={card.icon}/></Button>) |
| | | } else if (card.show === 'link') { |
| | | btnElement = (<Button style={_style} type="link">{card.label}{card.icon ? <Icon type={card.icon}/> : null}</Button>) |
| | | btnElement = (<Button style={_style} type="link">{card.label}{card.icon ? <MkIcon type={card.icon}/> : null}</Button>) |
| | | } else { |
| | | btnElement = (<Button style={_style}> {card.icon ? <Icon type={card.icon}/> : null}{card.label} </Button>) |
| | | btnElement = (<Button style={_style}> {card.icon ? <MkIcon type={card.icon}/> : null}{card.label} </Button>) |
| | | } |
| | | |
| | | return ( |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control" onDoubleClick={(e) => e.stopPropagation()}> |
| | | <Icon className="edit" title="编辑" type="edit" onClick={() => editCard(id)} /> |
| | | <Icon className="copy" title="复制" type="copy" onClick={() => copyCard(id)} /> |
| | | <Icon className="close" title="删除" type="close" onClick={() => delCard(id)} /> |
| | | <Icon className="style" title="调整样式" onClick={() => changeStyle(id)} type="font-colors" /> |
| | | {hasProfile ? <Icon className="profile" title="setting" type="profile" onClick={() => profileCard(id)} /> : null} |
| | | <EditOutlined className="edit" title="编辑" onClick={() => editCard(id)} /> |
| | | <CopyOutlined className="copy" title="复制" onClick={() => copyCard(id)} /> |
| | | <CloseOutlined className="close" title="删除" onClick={() => delCard(id)} /> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={() => changeStyle(id)} /> |
| | | {hasProfile ? <ProfileOutlined className="profile" title="setting" onClick={() => profileCard(id)} /> : null} |
| | | </div> |
| | | } trigger="hover"> |
| | | <div ref={node => drag(drop(node))} className={'ant-col card-button-cell ant-col-' + card.width} onDoubleClick={(e) => {e.stopPropagation(); doubleClickCard(id)}}> |
| | |
| | | import React from 'react' |
| | | import { useDrag, useDrop } from 'react-dnd' |
| | | import { Icon, Popover } from 'antd' |
| | | import { Popover } from 'antd' |
| | | import { EditOutlined, CopyOutlined, CloseOutlined, FontColorsOutlined } from '@ant-design/icons' |
| | | |
| | | import MkIcon from '@/components/mk-icon' |
| | | import moment from 'moment' |
| | | |
| | | import demo1 from '@/assets/img/demo1.jpg' |
| | |
| | | <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight || 'auto'}}>{val}</div> |
| | | ) |
| | | } else if (card.eleType === 'icon') { |
| | | return (<Icon type={card.icon}/>) |
| | | return (<MkIcon type={card.icon}/>) |
| | | } else if (card.eleType === 'slider') { |
| | | let val = card.value ? (card.value / card.maxValue) * 100 : 30 |
| | | return <MkProgress value={val} config={card}/> |
| | |
| | | return ( |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control" onDoubleClick={(e) => e.stopPropagation()}> |
| | | <Icon className="edit" title="编辑" type="edit" onClick={() => editCard(id)} /> |
| | | <Icon className="copy" title="复制" type="copy" onClick={() => copyCard(id)} /> |
| | | <Icon className="close" title="删除" type="close" onClick={() => delCard(id)} /> |
| | | <Icon className="style" title="调整样式" onClick={() => changeStyle(id)} type="font-colors" /> |
| | | <EditOutlined className="edit" title="编辑" onClick={() => editCard(id)} /> |
| | | <CopyOutlined className="copy" title="复制" onClick={() => copyCard(id)} /> |
| | | <CloseOutlined className="close" title="删除" onClick={() => delCard(id)} /> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={() => changeStyle(id)}/> |
| | | {['text', 'number', 'slider', 'sequence', 'formula'].includes(card.eleType) ? <MarkColumn columns={fields} type={card.eleType} marks={card.marks} onSubmit={(vals) => updateMarks({...card, marks: vals})} /> : null } |
| | | </div> |
| | | } trigger="hover"> |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { fromJS } from 'immutable' |
| | | import { Form, Row, Col, Input, Select, Icon, Radio, Tooltip, InputNumber } from 'antd' |
| | | import { Form, Row, Col, Input, Select, Radio, Tooltip, InputNumber } from 'antd' |
| | | import { QuestionCircleOutlined } from '@ant-design/icons' |
| | | |
| | | import { formRule } from '@/utils/option.js' |
| | |
| | | > |
| | | {item.options.map((option, index) => |
| | | <Select.Option id={`${index}`} title={option.text} key={`${index}`} value={option.value}> |
| | | {item.key === 'icon' && option.value && <Icon type={option.value} />} {option.text} |
| | | {option.text} |
| | | </Select.Option> |
| | | )} |
| | | </Select> |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Popover, Icon, Switch, Col, Modal, Button } from 'antd' |
| | | import { Popover, Switch, Col, Modal, Button } from 'antd' |
| | | import { PlusOutlined, PlusSquareOutlined, EditOutlined, ArrowLeftOutlined, ArrowRightOutlined, SwapOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import asyncIconComponent from '@/utils/asyncIconComponent' |
| | |
| | | <div className="card-control" onDoubleClick={(e) => e.stopPropagation()}> |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <Icon className="plus" title="添加元素" onClick={this.addElement} type="plus" /> |
| | | <Icon className="plus" title="添加按钮" onClick={this.addButton} type="plus-square" /> |
| | | <PlusOutlined className="plus" title="添加元素" onClick={this.addElement} /> |
| | | <PlusSquareOutlined className="plus" title="添加按钮" onClick={this.addButton} /> |
| | | <NormalForm title="卡片设置" width={800} update={this.updateSetting} getForms={this.getSettingForms}> |
| | | <Icon type="edit" className="edit" title="编辑"/> |
| | | <EditOutlined className="edit" title="编辑"/> |
| | | </NormalForm> |
| | | {cards.subtype === 'datacard' && card.$cardType !== 'extendCard' && card.setting.click === 'menus' ? |
| | | <CardMenus card={card} updateMenus={this.updateMenus}/> : null} |
| | | <CopyComponent type="cardcell" card={card}/> |
| | | <PasteController options={['action', 'customCardElement']} updateConfig={this.paste} /> |
| | | <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" /> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle} /> |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <Icon className="plus" title="前移" type="arrow-left" onClick={() => this.props.move(card, 'left')} /> |
| | | <Icon className="close" title="后移" type="arrow-right" onClick={() => this.props.move(card, 'right')} /> |
| | | <ArrowLeftOutlined className="plus" title="前移" onClick={() => this.props.move(card, 'left')} /> |
| | | <ArrowRightOutlined className="close" title="后移" onClick={() => this.props.move(card, 'right')} /> |
| | | </div> |
| | | } trigger="hover" getPopupContainer={() => document.getElementById(card.uuid + 'swap')}> |
| | | <Icon type="swap" id={card.uuid + 'swap'}/> |
| | | <SwapOutlined id={card.uuid + 'swap'}/> |
| | | </Popover> |
| | | {cards.subtype === 'propcard' || card.$cardType === 'extendCard' ? <Icon className="close" title="删除卡片" type="delete" onClick={() => this.props.deleteElement(card)} /> : null} |
| | | {cards.subtype === 'propcard' || card.$cardType === 'extendCard' ? <DeleteOutlined className="close" title="删除卡片" onClick={() => this.props.deleteElement(card)} /> : null} |
| | | {card.setting.type === 'multi' ? <Switch size="small" onClick={this.changeSide} defaultChecked /> : null} |
| | | </div> |
| | | } trigger="hover"> |
| | | <Icon type="tool" /> |
| | | <ToolOutlined /> |
| | | </Popover> |
| | | </div> |
| | | </div> |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Modal, Icon } from 'antd' |
| | | import { Modal } from 'antd' |
| | | import { MenuOutlined } from '@ant-design/icons' |
| | | |
| | | import MenusForm from './menus' |
| | | import './index.scss' |
| | |
| | | |
| | | return ( |
| | | <> |
| | | <Icon type="menu" title="菜单组" onClick={this.trigger}/> |
| | | <MenuOutlined title="菜单组" onClick={this.trigger}/> |
| | | <Modal |
| | | title="菜单组" |
| | | wrapClassName="menus-field-modal" |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Popover, Icon } from 'antd' |
| | | import { Popover } from 'antd' |
| | | import { PlusOutlined, PlusSquareOutlined, EditOutlined, ArrowLeftOutlined, ArrowRightOutlined, SwapOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import asyncIconComponent from '@/utils/asyncIconComponent' |
| | |
| | | <div className="card-control"> |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <Icon className="plus" title="添加元素" onClick={this.addElement} type="plus" /> |
| | | <Icon className="plus" title="添加按钮" onClick={this.addButton} type="plus-square" /> |
| | | <PlusOutlined className="plus" title="添加元素" onClick={this.addElement}/> |
| | | <PlusSquareOutlined className="plus" title="添加按钮" onClick={this.addButton}/> |
| | | {cards.type !== 'timeline' ? <NormalForm title="卡片设置" width={800} update={this.updateSetting} getForms={this.getSettingForms}> |
| | | <Icon type="edit" style={{color: '#1890ff'}} title="编辑"/> |
| | | <EditOutlined style={{color: '#1890ff'}} title="编辑"/> |
| | | </NormalForm> : <NodesWrap card={card} updateMenus={this.updateNodes}/>} |
| | | {cards.type !== 'timeline' ? <CopyComponent type="cardcell" card={card}/> : null} |
| | | <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" /> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/> |
| | | {control ? <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <Icon className="plus" title="前移" type="arrow-left" onClick={() => this.props.move(card, 'left')} /> |
| | | <Icon className="close" title="后移" type="arrow-right" onClick={() => this.props.move(card, 'right')} /> |
| | | <ArrowLeftOutlined className="plus" title="前移" onClick={() => this.props.move(card, 'left')} /> |
| | | <ArrowRightOutlined className="close" title="后移" onClick={() => this.props.move(card, 'right')} /> |
| | | </div> |
| | | } trigger="hover" getPopupContainer={() => document.getElementById(card.uuid + 'swap')}> |
| | | <Icon type="swap" id={card.uuid + 'swap'}/> |
| | | <SwapOutlined id={card.uuid + 'swap'}/> |
| | | </Popover> : null} |
| | | {control ? <Icon className="close" title="删除卡片" type="delete" onClick={() => this.props.deleteElement(card)} /> : null} |
| | | {control ? <DeleteOutlined className="close" title="删除卡片" onClick={() => this.props.deleteElement(card)} /> : null} |
| | | </div> |
| | | } trigger="hover"> |
| | | <Icon type="tool" /> |
| | | <ToolOutlined/> |
| | | </Popover> |
| | | </div> |
| | | </div> |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Modal, Icon } from 'antd' |
| | | import { Modal } from 'antd' |
| | | import { MoreOutlined } from '@ant-design/icons' |
| | | |
| | | |
| | | import MenusForm from './menus' |
| | | import './index.scss' |
| | |
| | | |
| | | return ( |
| | | <> |
| | | <Icon type="more" style={{color: '#1890ff'}} title="节点组" onClick={this.trigger}/> |
| | | <MoreOutlined style={{color: '#1890ff'}} title="节点组" onClick={this.trigger}/> |
| | | <Modal |
| | | title="节点组" |
| | | wrapClassName="nodes-field-modal" |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { fromJS } from 'immutable' |
| | | import { Icon } from 'antd' |
| | | |
| | | import MkIcon from '@/components/mk-icon' |
| | | import Utils from '@/utils/utils.js' |
| | | import ColumnForm from './columnform' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | |
| | | editable: true, |
| | | required: false, |
| | | width: '35%', |
| | | render: (text, record) => record.icon ? <Icon type={record.icon}/> : '' |
| | | render: (text, record) => record.icon ? <MkIcon type={record.icon}/> : '' |
| | | } |
| | | ] |
| | | } |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Icon, Popover, Modal, Pagination, notification } from 'antd' |
| | | import { Popover, Modal, Pagination, notification } from 'antd' |
| | | import { PlusOutlined, PlusCircleOutlined, PlusSquareOutlined, EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import asyncIconComponent from '@/utils/asyncIconComponent' |
| | |
| | | <NormalHeader config={card} updateComponent={this.updateComponent}/> |
| | | <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" /> |
| | | {appType !== 'mob' ? <Icon className="plus" title="添加搜索" onClick={() => this.addSearch()} type="plus-circle" /> : null} |
| | | <Icon className="plus" title="添加按钮" onClick={() => this.addButton()} type="plus-square" /> |
| | | <PlusOutlined className="plus" title="添加卡片" onClick={() => this.addCard()}/> |
| | | {appType !== 'mob' ? <PlusCircleOutlined className="plus" title="添加搜索" onClick={() => this.addSearch()}/> : null} |
| | | <PlusSquareOutlined className="plus" title="添加按钮" onClick={() => this.addButton()}/> |
| | | <NormalForm title="数据卡设置" width={800} update={this.updateWrap} getForms={this.getWrapForms}> |
| | | <Icon type="edit" style={{color: '#1890ff'}} title="编辑"/> |
| | | <EditOutlined style={{color: '#1890ff'}} title="编辑"/> |
| | | </NormalForm> |
| | | {card.wrap.supType === 'multi' && appType !== 'mob' ? <Nodes card={card} updateMenus={this.updateSupNodes}/> : null} |
| | | <CopyComponent type="datacard" card={card}/> |
| | | <PasteComponent options={['action', 'search', 'form', 'cardcell']} updateConfig={this.pasteComponent} /> |
| | | <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" /> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/> |
| | | <LogComponent btnlog={card.btnlog || []} handlelog={this.handleLog} /> |
| | | <UserComponent config={card}/> |
| | | <Icon className="close" title="删除组件" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | <SettingComponent config={card} updateConfig={this.updateComponent} /> |
| | | </div> |
| | | } trigger="hover"> |
| | | <Icon type="tool" /> |
| | | <ToolOutlined /> |
| | | </Popover> |
| | | <ActionComponent config={card} type="datacard" setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/> |
| | | {card.subcards.map((subcard, index) => (<CardComponent key={subcard.uuid} offset={!index ? offset : 0} cards={card} card={subcard} move={this.move} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))} |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Modal, Icon } from 'antd' |
| | | import { Modal } from 'antd' |
| | | import { ForkOutlined } from '@ant-design/icons' |
| | | |
| | | import MenusForm from './menus' |
| | | import './index.scss' |
| | |
| | | |
| | | return ( |
| | | <> |
| | | <Icon type="fork" title="上级组件" style={{color: 'orange'}} onClick={this.trigger}/> |
| | | <ForkOutlined title="上级组件" style={{color: 'orange'}} onClick={this.trigger}/> |
| | | <Modal |
| | | title="上级组件" |
| | | wrapClassName="menus-field-modal" |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Icon, Popover, Modal, notification } from 'antd' |
| | | import { Popover, Modal, notification } from 'antd' |
| | | import { PlusOutlined, SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import asyncIconComponent from '@/utils/asyncIconComponent' |
| | |
| | | <NormalHeader config={card} updateComponent={this.updateComponent}/> |
| | | <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" /> |
| | | <PlusOutlined className="plus" title="添加卡片" onClick={() => this.addCard()} /> |
| | | <NormalForm title="属性卡设置" width={800} update={this.updateWrap} getForms={this.getWrapForms}> |
| | | <Icon type="edit" style={{color: '#1890ff'}} title="编辑"/> |
| | | <EditOutlined style={{color: '#1890ff'}} title="编辑"/> |
| | | </NormalForm> |
| | | <CopyComponent type="propcard" card={card}/> |
| | | <PasteComponent options={['cardcell']} updateConfig={this.pasteComponent} /> |
| | | <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" /> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/> |
| | | <LogComponent btnlog={card.btnlog || []} handlelog={this.handleLog} /> |
| | | <ClockComponent config={card} updateConfig={this.updateComponent}/> |
| | | <UserComponent config={card}/> |
| | | <Icon className="close" title="删除组件" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | {card.wrap.datatype !== 'static' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : null} |
| | | {card.wrap.datatype === 'static' ? <Icon style={{color: '#eeeeee', cursor: 'not-allowed'}} type="setting"/> : null} |
| | | {card.wrap.datatype === 'static' ? <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/> : null} |
| | | </div> |
| | | } trigger="hover"> |
| | | <Icon type="tool" /> |
| | | <ToolOutlined /> |
| | | </Popover> |
| | | {card.subcards.map((subcard, index) => (<CardComponent key={subcard.uuid} offset={!index ? offset : 0} cards={card} card={subcard} move={this.move} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))} |
| | | </div> |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Icon, Popover, Modal, Pagination, notification } from 'antd' |
| | | import { Popover, Modal, Pagination, notification } from 'antd' |
| | | import { PlusOutlined, PlusCircleOutlined, PlusSquareOutlined, EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import asyncIconComponent from '@/utils/asyncIconComponent' |
| | |
| | | <NormalHeader config={card} updateComponent={this.updateComponent}/> |
| | | <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" /> |
| | | {appType !== 'mob' ? <Icon className="plus" title="添加搜索" onClick={() => this.addSearch()} type="plus-circle" /> : null} |
| | | <Icon className="plus" title="添加按钮" onClick={() => this.addButton()} type="plus-square" /> |
| | | <PlusOutlined className="plus" title="添加卡片" onClick={() => this.addCard()}/> |
| | | {appType !== 'mob' ? <PlusCircleOutlined className="plus" title="添加搜索" onClick={() => this.addSearch()}/> : null} |
| | | <PlusSquareOutlined className="plus" title="添加按钮" onClick={() => this.addButton()} /> |
| | | <NormalForm title="表格设置" width={800} update={this.updateWrap} getForms={this.getWrapForms}> |
| | | <Icon type="edit" style={{color: '#1890ff'}} title="编辑"/> |
| | | <EditOutlined style={{color: '#1890ff'}} title="编辑"/> |
| | | </NormalForm> |
| | | <CopyComponent type="tablecard" card={card}/> |
| | | <PasteComponent options={['cardcell', 'search', 'form']} updateConfig={this.pasteComponent} /> |
| | | <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" /> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/> |
| | | <LogComponent btnlog={card.btnlog || []} handlelog={this.handleLog} /> |
| | | <UserComponent config={card}/> |
| | | <Icon className="close" title="删除组件" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | {card.wrap.datatype !== 'static' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : null} |
| | | </div> |
| | | } trigger="hover"> |
| | | <Icon type="tool" /> |
| | | <ToolOutlined /> |
| | | </Popover> |
| | | <ActionComponent config={card} type="datacard" setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/> |
| | | <div style={{minHeight: 'calc(100% - 90px)'}}> |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Icon, Popover, Modal, notification } from 'antd' |
| | | import { Popover, Modal, notification } from 'antd' |
| | | import { EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import asyncIconComponent from '@/utils/asyncIconComponent' |
| | |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <NormalForm title="轮播-动态数据" width={800} update={this.updateWrap} getForms={this.getWrapForms}> |
| | | <Icon type="edit" style={{color: '#1890ff'}} title="编辑"/> |
| | | <EditOutlined style={{color: '#1890ff'}} title="编辑"/> |
| | | </NormalForm> |
| | | <CopyComponent type="datacard" card={card}/> |
| | | <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors"/> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/> |
| | | <LogComponent btnlog={card.btnlog || []} handlelog={this.handleLog}/> |
| | | <UserComponent config={card}/> |
| | | <Icon className="close" title="删除组件" type="delete" onClick={() => this.props.deletecomponent(card.uuid)}/> |
| | | <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)}/> |
| | | <SettingComponent config={card} updateConfig={this.updateComponent}/> |
| | | </div> |
| | | } trigger="hover"> |
| | | <Icon type="tool"/> |
| | | <ToolOutlined/> |
| | | </Popover> |
| | | <CardSimpleComponent cards={card} card={card.subcards[0]} updateElement={this.updateCard} deleteElement={this.deleteCard}/> |
| | | </div> |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Icon, Popover, Modal, notification, Carousel } from 'antd' |
| | | import { Popover, Modal, notification, Carousel } from 'antd' |
| | | import { PlusOutlined, SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import asyncIconComponent from '@/utils/asyncIconComponent' |
| | |
| | | <div className="menu-prop-carousel-edit-box" style={_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"> |
| | | <Icon className="plus" title="添加卡片" onClick={this.addCard} type="plus" /> |
| | | <PlusOutlined className="plus" title="添加卡片" onClick={this.addCard}/> |
| | | <NormalForm title="轮播-静态数据" width={800} update={this.updateWrap} getForms={this.getWrapForms}> |
| | | <Icon type="edit" style={{color: '#1890ff'}} title="编辑"/> |
| | | <EditOutlined style={{color: '#1890ff'}} title="编辑"/> |
| | | </NormalForm> |
| | | <CopyComponent type="propcard" card={card}/> |
| | | <PasteComponent config={card} options={['cardcell']} updateConfig={this.updateComponent} /> |
| | | <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" /> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/> |
| | | <LogComponent btnlog={card.btnlog || []} handlelog={this.handleLog} /> |
| | | <UserComponent config={card}/> |
| | | <Icon className="close" title="删除组件" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | {card.wrap.datatype !== 'static' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : null} |
| | | {card.wrap.datatype === 'static' ? <Icon style={{color: '#eeeeee', cursor: 'not-allowed'}} type="setting"/> : null} |
| | | {card.wrap.datatype === 'static' ? <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/> : null} |
| | | </div> |
| | | } trigger="hover"> |
| | | <Icon type="tool" /> |
| | | <ToolOutlined/> |
| | | </Popover> |
| | | {card.subcards.length > 0 ? <Carousel dotPosition={card.wrap.dotPosition || 'bottom'} effect={card.wrap.effect || 'scrollx'}> |
| | | {card.subcards.map((subcard) => (<CardSimpleComponent key={subcard.uuid} cards={card} card={subcard} move={this.move} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))} |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Icon, Popover, notification } from 'antd' |
| | | import { Popover, notification } from 'antd' |
| | | import { PlusCircleOutlined, PlusSquareOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons' |
| | | import { Chart } from '@antv/g2' |
| | | import DataSet from '@antv/data-set' |
| | | |
| | |
| | | <div className="menu-line-chart-edit-box" style={{..._style, height: card.plot.height || 400}} onClick={this.clickComponent} id={card.uuid}> |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | {appType !== 'mob' ? <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" /> : null} |
| | | {appType !== 'mob' ? <Icon className="plus" title="添加按钮" onClick={this.addButton} type="plus-square" /> : null} |
| | | {appType !== 'mob' ? <PlusCircleOutlined className="plus" title="添加搜索" onClick={this.addSearch}/> : null} |
| | | {appType !== 'mob' ? <PlusSquareOutlined className="plus" title="添加按钮" onClick={this.addButton}/> : null} |
| | | <ChartCompileForm config={card} dict={this.state.dict} plotchange={this.updateComponent}/> |
| | | <CopyComponent type="line" card={card}/> |
| | | <PasteComponent config={card} options={['action']} updateConfig={this.updateComponent} /> |
| | | <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" /> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/> |
| | | <LogComponent btnlog={card.btnlog || []} handlelog={this.handleLog} /> |
| | | <ClockComponent config={card} updateConfig={this.updateComponent}/> |
| | | <UserComponent config={card}/> |
| | | <Icon className="close" title="delete" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | <DeleteOutlined className="close" title="delete" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | <SettingComponent config={card} updateConfig={this.updateComponent}/> |
| | | </div> |
| | | } trigger="hover"> |
| | | <Icon type="tool" /> |
| | | <ToolOutlined/> |
| | | </Popover> |
| | | <NormalHeader config={card} updateComponent={this.updateComponent}/> |
| | | <div className="canvas" id={card.uuid + 'canvas'} ref={ref => this.wrap = ref}></div> |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Icon, Popover } from 'antd' |
| | | import { Popover } from 'antd' |
| | | import { ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons' |
| | | import { Chart, registerShape } from '@antv/g2' |
| | | |
| | | import MKEmitter from '@/utils/events.js' |
| | |
| | | <div className="mk-popover-control"> |
| | | <ChartCompileForm config={card} dict={this.state.dict} plotchange={this.updateComponent}/> |
| | | <CopyComponent type="dashboard" card={card}/> |
| | | <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" /> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/> |
| | | <ClockComponent config={card} updateConfig={this.updateComponent}/> |
| | | <UserComponent config={card}/> |
| | | <Icon className="close" title="delete" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | <DeleteOutlined className="close" title="delete" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | <SettingComponent config={card} updateConfig={this.updateComponent}/> |
| | | </div> |
| | | } trigger="hover"> |
| | | <Icon type="tool" /> |
| | | <ToolOutlined/> |
| | | </Popover> |
| | | <NormalHeader hideSearch="true" config={card} updateComponent={this.updateComponent}/> |
| | | <div className="canvas" id={card.uuid + 'dashboard'} ref={ref => this.wrap = ref}></div> |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Icon, Popover } from 'antd' |
| | | import { Popover } from 'antd' |
| | | import { ToolOutlined, DeleteOutlined, FontColorsOutlined, PlusCircleOutlined } from '@ant-design/icons' |
| | | import { Chart } from '@antv/g2' |
| | | import DataSet, { DataView } from '@antv/data-set' |
| | | |
| | |
| | | <div className="menu-pie-chart-edit-box" style={{..._style, height: card.plot.height || 400}} onClick={this.clickComponent} id={card.uuid}> |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | {!ismob ? <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" /> : null} |
| | | {!ismob ? <PlusCircleOutlined className="plus" title="添加搜索" onClick={this.addSearch}/> : null} |
| | | <ChartCompileForm config={card} dict={this.state.dict} plotchange={this.updateComponent}/> |
| | | <CopyComponent type="pie" card={card}/> |
| | | <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" /> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/> |
| | | <ClockComponent config={card} updateConfig={this.updateComponent}/> |
| | | <UserComponent config={card}/> |
| | | <Icon className="close" title="delete" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | <DeleteOutlined className="close" title="delete" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | <SettingComponent config={card} updateConfig={this.updateComponent}/> |
| | | </div> |
| | | } trigger="hover"> |
| | | <Icon type="tool" /> |
| | | <ToolOutlined /> |
| | | </Popover> |
| | | <NormalHeader config={card} updateComponent={this.updateComponent}/> |
| | | <div className="canvas" id={card.uuid + 'canvas'} ref={ref => this.wrap = ref}></div> |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Icon, Popover, notification } from 'antd' |
| | | import { Popover, notification } from 'antd' |
| | | import { ToolOutlined, DeleteOutlined, FontColorsOutlined, PlusCircleOutlined, PlusSquareOutlined } from '@ant-design/icons' |
| | | import { Chart } from '@antv/g2' |
| | | |
| | | import MKEmitter from '@/utils/events.js' |
| | |
| | | <div className="menu-scatter-chart-edit-box" style={{..._style, height: card.plot.height || 400}} onClick={this.clickComponent} id={card.uuid}> |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | {appType !== 'mob' ? <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle"/> : null} |
| | | {appType !== 'mob' ? <Icon className="plus" title="添加按钮" onClick={this.addButton} type="plus-square" /> : null} |
| | | {appType !== 'mob' ? <PlusCircleOutlined className="plus" title="添加搜索" onClick={this.addSearch}/> : null} |
| | | {appType !== 'mob' ? <PlusSquareOutlined className="plus" title="添加按钮" onClick={this.addButton}/> : null} |
| | | <ChartCompileForm config={card} dict={this.state.dict} plotchange={this.updateComponent}/> |
| | | <CopyComponent type="line" card={card}/> |
| | | <PasteComponent config={card} options={['action']} updateConfig={this.updateComponent}/> |
| | | <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors"/> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/> |
| | | <LogComponent btnlog={card.btnlog || []} handlelog={this.handleLog}/> |
| | | <ClockComponent config={card} updateConfig={this.updateComponent}/> |
| | | <UserComponent config={card}/> |
| | | <Icon className="close" title="delete" type="delete" onClick={() => this.props.deletecomponent(card.uuid)}/> |
| | | <DeleteOutlined className="close" title="delete" onClick={() => this.props.deletecomponent(card.uuid)}/> |
| | | <SettingComponent config={card} updateConfig={this.updateComponent}/> |
| | | </div> |
| | | } trigger="hover"> |
| | | <Icon type="tool" /> |
| | | <ToolOutlined/> |
| | | </Popover> |
| | | <NormalHeader config={card} updateComponent={this.updateComponent}/> |
| | | <div className="canvas" id={card.uuid + 'canvas'} ref={ref => this.wrap = ref}></div> |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { fromJS } from 'immutable' |
| | | import { Modal, Form, Icon, Tabs } from 'antd' |
| | | import { Modal, Form, Tabs } from 'antd' |
| | | import { EditOutlined } from '@ant-design/icons' |
| | | |
| | | import { getBaseForm } from './formconfig' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | |
| | | |
| | | return ( |
| | | <> |
| | | <Icon type="edit" style={{color: '#1890ff'}} title="编辑" onClick={this.showDrawer} /> |
| | | <EditOutlined style={{color: '#1890ff'}} title="编辑" onClick={this.showDrawer} /> |
| | | <Modal |
| | | wrapClassName="popview-modal custom-chart-edit-modal" |
| | | title="自定义图表编辑" |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Icon, Popover, notification } from 'antd' |
| | | import { Popover, notification } from 'antd' |
| | | import { ToolOutlined, DeleteOutlined, FontColorsOutlined, PlusCircleOutlined } from '@ant-design/icons' |
| | | import { Chart } from '@antv/g2' |
| | | import DataSet from '@antv/data-set' |
| | | import * as echarts from 'echarts' |
| | |
| | | <div className="menu-custom-chart-edit-box" style={{..._style, height: card.plot.height || 400}} onClick={this.clickComponent} id={card.uuid}> |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | {appType !== 'mob' ? <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" /> : null} |
| | | {appType !== 'mob' ? <PlusCircleOutlined className="plus" title="添加搜索" onClick={this.addSearch}/> : null} |
| | | <ChartCompileForm config={card} dict={this.state.dict} plotchange={this.updateComponent}/> |
| | | <CopyComponent type="line" card={card}/> |
| | | <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" /> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/> |
| | | <ClockComponent config={card} updateConfig={this.updateComponent}/> |
| | | <Icon className="close" title="delete" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | <DeleteOutlined className="close" title="delete" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | <SettingComponent config={card} updateConfig={this.updateComponent}/> |
| | | </div> |
| | | } trigger="hover"> |
| | | <Icon type="tool" /> |
| | | <ToolOutlined /> |
| | | </Popover> |
| | | <NormalHeader config={card} updateComponent={this.updateComponent}/> |
| | | <div className="canvas" id={card.uuid + 'canvas'} ref={ref => this.wrap = ref}></div> |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Icon, Popover } from 'antd' |
| | | import { Popover } from 'antd' |
| | | import { SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import asyncIconComponent from '@/utils/asyncIconComponent' |
| | |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <NormalForm title="自定义组件设置" width={700} update={this.updateWrap} getForms={this.getWrapForms}> |
| | | <Icon type="edit" style={{color: '#1890ff'}} title="编辑"/> |
| | | <EditOutlined style={{color: '#1890ff'}} title="编辑"/> |
| | | </NormalForm> |
| | | <CopyComponent type="normaltable" card={card}/> |
| | | <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" /> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/> |
| | | <UserComponent config={card}/> |
| | | <Icon className="close" title="删除组件" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | <EditorCode config={card} updateConfig={this.updateComponent}/> |
| | | {card.wrap.datatype !== 'static' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : null} |
| | | {card.wrap.datatype === 'static' ? <Icon style={{color: '#eeeeee', cursor: 'not-allowed'}} type="setting"/> : null} |
| | | {card.wrap.datatype === 'static' ? <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/> : null} |
| | | </div> |
| | | } trigger="hover"> |
| | | <Icon type="tool" /> |
| | | <ToolOutlined /> |
| | | </Popover> |
| | | <CodeContent name={card.name} html={card.html} css={card.css} js={card.js}/> |
| | | </div> |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Button, message } from 'antd' |
| | | import MKEmitter from '@/utils/events.js' |
| | | |
| | | class Iframe extends Component { |
| | |
| | | } |
| | | |
| | | state = { |
| | | visible: true, |
| | | debug: sessionStorage.getItem('debug') === 'true' |
| | | visible: true |
| | | } |
| | | |
| | | componentDidMount () { |
| | |
| | | }) |
| | | } |
| | | |
| | | copyMenuNo = (e) => { |
| | | const { MenuNo } = this.props |
| | | |
| | | e.stopPropagation() |
| | | let oInput = document.createElement('input') |
| | | oInput.value = MenuNo || '' |
| | | document.body.appendChild(oInput) |
| | | oInput.select() |
| | | document.execCommand('Copy') |
| | | oInput.className = 'oInput' |
| | | oInput.style.display = 'none' |
| | | message.success('复制成功') |
| | | } |
| | | |
| | | render () { |
| | | const { visible, debug } = this.state |
| | | const { visible } = this.state |
| | | |
| | | return (<div> |
| | | {visible ? <iframe title={this.props.title} src={this.props.url} /> : null} |
| | | {debug ? <Button |
| | | icon="copy" |
| | | shape="circle" |
| | | className={'main-copy ifr-copy'} |
| | | onClick={this.copyMenuNo} |
| | | /> : null} |
| | | </div>) |
| | | } |
| | | } |