| | |
| | | { |
| | | type: 'radio', |
| | | key: 'show', |
| | | label: "显示为", |
| | | label: '显示为', |
| | | initVal: card.show || 'button', |
| | | required: true, |
| | | options: [{ |
| | |
| | | cell.uuid = Utils.getuuid() |
| | | return cell |
| | | }) |
| | | } else if (item.type === 'balcony') { |
| | | item.elements = item.elements.map(cell => { |
| | | cell.uuid = Utils.getuuid() |
| | | return cell |
| | | }) |
| | | } else if (item.type === 'card' || (item.type === 'table' && item.subtype === 'tablecard')) { |
| | | item.subcards && item.subcards.forEach(card => { |
| | | card.uuid = Utils.getuuid() |
| | |
| | | const { Tab } = this.props |
| | | |
| | | let isgroup = Tab && Tab.type === 'group' ? true : false |
| | | let options = ['tabs', 'datacard', 'propcard', 'mainsearch', 'group', 'normaltable', 'tablecard', 'line', 'bar', 'pie', 'dashboard', 'scatter'] |
| | | let options = ['tabs', 'datacard', 'propcard', 'mainsearch', 'balcony', 'group', 'normaltable', 'tablecard', 'line', 'bar', 'pie', 'dashboard', 'scatter'] |
| | | |
| | | if (sessionStorage.getItem('appType') === 'mob') { |
| | | options.push('menubar') |
| | | } |
| | | |
| | | if (isgroup) { |
| | | options = options.filter(item => !['tabs', 'mainsearch', 'group'].includes(item)) |
| | | } |
| | | |
| | | this.pasteFormRef.handleConfirm().then(res => { |
| | | if (!isgroup && !options.includes(res.copyType)) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '配置信息格式错误!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } else if (isgroup && !['datacard', 'propcard', 'normaltable', 'tablecard', 'line', 'bar', 'pie', 'dashboard', 'scatter'].includes(res.copyType)) { |
| | | if (!options.includes(res.copyType)) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '配置信息格式错误!', |
| | |
| | | <div className="mk-popover-control"> |
| | | <Icon className="plus" title="添加菜单" onClick={this.addMenu} type="plus" /> |
| | | <WrapComponent config={card} updateConfig={this.updateComponent} /> |
| | | <CopyComponent type="normalmenu" card={card}/> |
| | | <CopyComponent type="menubar" card={card}/> |
| | | <PasteComponent config={card} options={['menucell']} updateConfig={this.updateComponent} /> |
| | | <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" /> |
| | | <UserComponent config={card}/> |
| | |
| | | let _style = resetStyle(tabs.style) |
| | | |
| | | return ( |
| | | <div className={'menu-tabs-edit-box ' + tabs.setting.display} style={_style} onClick={this.clickComponent} id={tabs.uuid}> |
| | | <div className={'mob-tabs-edit-box ' + tabs.setting.display} style={_style} onClick={this.clickComponent} id={tabs.uuid}> |
| | | <DraggableTabs tabPosition={tabs.setting.position} type={tabs.setting.tabStyle} tabsMove={this.moveSwitch}> |
| | | {tabs.subtabs.map(tab => ( |
| | | <TabPane tab={ |
| | |
| | | .menu-tabs-edit-box { |
| | | .mob-tabs-edit-box { |
| | | position: relative; |
| | | box-sizing: border-box; |
| | | background: #ffffff; |
| | |
| | | background: rgba(255, 255, 255, 0.55); |
| | | } |
| | | |
| | | .ant-tabs-bar.ant-tabs-top-bar { |
| | | margin-bottom: 0; |
| | | } |
| | | .ant-tabs.ant-tabs-left, .ant-tabs.ant-tabs-bottom { |
| | | .tab-shell-inner { |
| | | padding-top: 25px; |
| | |
| | | padding: 3px; |
| | | } |
| | | } |
| | | .menu-tabs-edit-box:hover { |
| | | .mob-tabs-edit-box:hover { |
| | | z-index: 1; |
| | | box-shadow: 0px 0px 4px #1890ff; |
| | | } |
| | | |
| | | .mob-shell { |
| | | .menu-tabs-edit-box.flex { |
| | | .mob-tabs-edit-box.flex { |
| | | >.ant-tabs.ant-tabs-top, >.ant-tabs.ant-tabs-bottom { |
| | | >.ant-tabs-bar { |
| | | >.ant-tabs-nav-container { |
| | |
| | | |
| | | filterComponent = (components, roleId, permAction, permMenus) => { |
| | | return components.filter(item => { |
| | | |
| | | if (item.style && item.style.boxShadow) { |
| | | delete item.style.hShadow |
| | | delete item.style.vShadow |
| | | delete item.style.shadowBlur |
| | | delete item.style.shadowColor |
| | | } |
| | | |
| | | if (item.type === 'tabs') { |
| | | if ( |
| | | item.setting.blacklist && item.setting.blacklist.length > 0 && |
| | |
| | | item.subcards && item.subcards.forEach(card => { |
| | | let _hasheight = card.style.height && card.style.height !== 'auto' |
| | | |
| | | if (card.style.shadow) { // 卡片阴影 |
| | | card.style.boxShadow = '0 0 4px ' + card.style.shadow |
| | | delete card.style.shadow |
| | | if (card.style.boxShadow) { |
| | | delete card.style.hShadow |
| | | delete card.style.vShadow |
| | | delete card.style.shadowBlur |
| | | delete card.style.shadowColor |
| | | } |
| | | |
| | | card.elements = card.elements.filter(cell => { |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Button, notification, Modal } from 'antd' |
| | | import { Button, notification, Modal, Icon } from 'antd' |
| | | |
| | | import Api from '@/api' |
| | | import zhCN from '@/locales/zh-CN/main.js' |
| | |
| | | >{btn.label}</Button> |
| | | ) |
| | | } else { // icon、text、 all 卡片 |
| | | let label = '' |
| | | let icon = '' |
| | | |
| | | if (show === 'button') { |
| | | label = btn.label |
| | | icon = btn.icon || '' |
| | | } else if (show === 'link') { |
| | | label = <span>{btn.label}{btn.icon ? <Icon type={btn.icon}/> : ''}</span> |
| | | icon = '' |
| | | } else if (show === 'icon') { |
| | | icon = btn.icon || '' |
| | | } else if (show === 'text') { |
| | | label = btn.label |
| | | } |
| | | |
| | | return ( |
| | | <Button |
| | | type="link" |
| | |
| | | loading={loading} |
| | | disabled={disabled} |
| | | style={btn.style} |
| | | icon={show === 'text' ? '' : (btn.icon || '')} |
| | | icon={icon} |
| | | onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} |
| | | >{show === 'icon' && btn.icon ? '' : btn.label}</Button> |
| | | >{label}</Button> |
| | | ) |
| | | } |
| | | } |
| | |
| | | import moment from 'moment' |
| | | import {connect} from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Button, Modal, notification, message } from 'antd' |
| | | import { Button, Modal, notification, message, Icon } from 'antd' |
| | | |
| | | import ExcelIn from './excelin' |
| | | import Utils, { getExcelInSql } from '@/utils/utils.js' |
| | |
| | | <ExcelIn btn={btn} triggerExcelIn={() => this.updateStatus('start')} returndata={this.getexceldata} ref="excelIn" /> |
| | | </div> |
| | | } else { // icon、text、 all 卡片 |
| | | let label = '' |
| | | let icon = '' |
| | | |
| | | if (show === 'button') { |
| | | label = btn.label |
| | | icon = btn.icon || '' |
| | | } else if (show === 'link') { |
| | | label = <span>{btn.label}{btn.icon ? <Icon type={btn.icon}/> : ''}</span> |
| | | icon = '' |
| | | } else if (show === 'icon') { |
| | | icon = btn.icon || 'upload' |
| | | } else if (show === 'text') { |
| | | label = btn.label |
| | | } |
| | | |
| | | return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}> |
| | | <Button |
| | | type="link" |
| | |
| | | loading={loading} |
| | | disabled={disabled} |
| | | style={btn.style} |
| | | icon={show === 'text' ? '' : (show === 'icon' ? (btn.icon || 'upload') : (btn.icon || ''))} |
| | | icon={icon} |
| | | onClick={() => {this.actionTrigger()}} |
| | | >{show === 'icon' ? '' : btn.label}</Button> |
| | | >{label}</Button> |
| | | <ExcelIn btn={btn} triggerExcelIn={() => this.updateStatus('start')} returndata={this.getexceldata} ref="excelIn" /> |
| | | </div> |
| | | } |
| | |
| | | import moment from 'moment' |
| | | import {connect} from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Button, Modal, notification, message } from 'antd' |
| | | import { Button, Modal, notification, message, Icon } from 'antd' |
| | | import * as XLSX from 'xlsx' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | |
| | | >{btn.label}</Button> |
| | | ) |
| | | } else { // icon、text、 all 卡片 |
| | | let label = '' |
| | | let icon = '' |
| | | |
| | | if (show === 'button') { |
| | | label = btn.label |
| | | icon = btn.icon || '' |
| | | } else if (show === 'link') { |
| | | label = <span>{btn.label}{btn.icon ? <Icon type={btn.icon}/> : ''}</span> |
| | | icon = '' |
| | | } else if (show === 'icon') { |
| | | icon = btn.icon || 'download' |
| | | } else if (show === 'text') { |
| | | label = btn.label |
| | | } |
| | | |
| | | return ( |
| | | <Button |
| | | type="link" |
| | | title={show === 'icon' ? btn.label : ''} |
| | | loading={loading} |
| | | style={btn.style} |
| | | icon={show === 'text' ? '' : (show === 'icon' ? (btn.icon || 'download') : (btn.icon || ''))} |
| | | icon={icon} |
| | | onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} |
| | | >{show === 'icon' ? '' : btn.label}</Button> |
| | | >{label}</Button> |
| | | ) |
| | | } |
| | | } |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Button, notification, Modal } from 'antd' |
| | | import { Button, notification, Modal, Icon } from 'antd' |
| | | |
| | | import zhCN from '@/locales/zh-CN/main.js' |
| | | import enUS from '@/locales/en-US/main.js' |
| | |
| | | >{btn.label}</Button> |
| | | ) |
| | | } else { // icon、text、 all 卡片 |
| | | let label = '' |
| | | let icon = '' |
| | | |
| | | if (show === 'button') { |
| | | label = btn.label |
| | | icon = btn.icon || '' |
| | | } else if (show === 'link') { |
| | | label = <span>{btn.label}{btn.icon ? <Icon type={btn.icon}/> : ''}</span> |
| | | icon = '' |
| | | } else if (show === 'icon') { |
| | | icon = btn.icon || '' |
| | | } else if (show === 'text') { |
| | | label = btn.label |
| | | } |
| | | |
| | | return ( |
| | | <Button |
| | | type="link" |
| | | title={show === 'icon' ? btn.label : ''} |
| | | style={btn.style} |
| | | disabled={disabled} |
| | | icon={show === 'text' ? '' : (btn.icon || '')} |
| | | icon={icon} |
| | | onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} |
| | | >{show === 'icon' && btn.icon ? '' : btn.label}</Button> |
| | | >{label}</Button> |
| | | ) |
| | | } |
| | | } |
| | |
| | | import moment from 'moment' |
| | | import {connect} from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Button, Modal, notification, message, Drawer } from 'antd' |
| | | import { Button, Modal, notification, message, Drawer, Icon } from 'antd' |
| | | |
| | | import Api from '@/api' |
| | | import Utils, { getSysDefaultSql } from '@/utils/utils.js' |
| | |
| | | {this.getModels()} |
| | | </div> |
| | | } else { // icon、text、 all 卡片 |
| | | let label = '' |
| | | let icon = '' |
| | | |
| | | if (show === 'button') { |
| | | label = btn.label |
| | | icon = btn.icon || '' |
| | | } else if (show === 'link') { |
| | | label = <span>{btn.label}{btn.icon ? <Icon type={btn.icon}/> : ''}</span> |
| | | icon = '' |
| | | } else if (show === 'icon') { |
| | | icon = btn.icon || '' |
| | | } else if (show === 'text') { |
| | | label = btn.label |
| | | } |
| | | |
| | | return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}> |
| | | <Button |
| | | type="link" |
| | |
| | | loading={loading} |
| | | disabled={disabled} |
| | | style={btn.style || style} |
| | | icon={show === 'text' ? '' : (btn.icon || '')} |
| | | icon={icon} |
| | | onClick={() => {this.actionTrigger()}} |
| | | >{show === 'icon' && btn.icon ? '' : btn.label}</Button> |
| | | >{label}</Button> |
| | | {this.getModels()} |
| | | </div> |
| | | } |
| | |
| | | import PropTypes from 'prop-types' |
| | | import {connect} from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Button, Modal, notification } from 'antd' |
| | | import { Button, Modal, notification, Icon } from 'antd' |
| | | |
| | | import asyncSpinComponent from '@/utils/asyncSpinComponent' |
| | | import zhCN from '@/locales/zh-CN/main.js' |
| | |
| | | const { btn, show } = this.props |
| | | const { loading, popData, primaryId, disabled } = this.state |
| | | |
| | | let label = '' |
| | | let icon = '' |
| | | |
| | | if (show === 'button') { |
| | | label = btn.label |
| | | icon = btn.icon || '' |
| | | } else if (show === 'link') { |
| | | label = <span>{btn.label}{btn.icon ? <Icon type={btn.icon}/> : ''}</span> |
| | | icon = '' |
| | | } else if (show === 'icon') { |
| | | icon = btn.icon || '' |
| | | } else if (show === 'text') { |
| | | label = btn.label |
| | | } |
| | | |
| | | return ( |
| | | <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}> |
| | | {show === 'actionList' ? <Button |
| | |
| | | loading={loading} |
| | | disabled={disabled} |
| | | style={btn.style} |
| | | icon={show === 'text' ? '' : (btn.icon || '')} |
| | | icon={icon} |
| | | onClick={() => {this.actionTrigger()}} |
| | | >{show === 'icon' && btn.icon ? '' : btn.label}</Button> : null} |
| | | >{label}</Button> : null} |
| | | <Modal |
| | | className={'popview-modal ' + (btn.$view === 'CustomPage' ? 'custom-popview' : '')} |
| | | title={btn.label} |
| | |
| | | import moment from 'moment' |
| | | import {connect} from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Button, Modal, notification, message } from 'antd' |
| | | import { Button, Modal, notification, message, Icon } from 'antd' |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | |
| | | {this.getModels()} |
| | | </div> |
| | | } else { // icon、text、 all 卡片 |
| | | let label = '' |
| | | let icon = '' |
| | | |
| | | if (show === 'button') { |
| | | label = btn.label |
| | | icon = btn.icon || '' |
| | | } else if (show === 'link') { |
| | | label = <span>{btn.label}{btn.icon ? <Icon type={btn.icon}/> : ''}</span> |
| | | icon = '' |
| | | } else if (show === 'icon') { |
| | | icon = btn.icon || '' |
| | | } else if (show === 'text') { |
| | | label = btn.label |
| | | } |
| | | |
| | | return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}> |
| | | <Button |
| | | type="link" |
| | |
| | | loading={loading} |
| | | disabled={disabled} |
| | | style={btn.style} |
| | | icon={show === 'text' ? '' : (btn.icon || '')} |
| | | icon={icon} |
| | | onClick={() => {this.actionTrigger()}} |
| | | >{show === 'icon' && btn.icon ? '' : btn.label}</Button> |
| | | >{label}</Button> |
| | | {this.getModels()} |
| | | </div> |
| | | } |
| | |
| | | import PropTypes from 'prop-types' |
| | | import {connect} from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Button, notification } from 'antd' |
| | | import { Button, notification, Icon } from 'antd' |
| | | |
| | | import { modifyTabview } from '@/store/action' |
| | | import zhCN from '@/locales/zh-CN/main.js' |
| | |
| | | >{btn.label}</Button> |
| | | ) |
| | | } else { // icon、text、 all 卡片 |
| | | let label = '' |
| | | let icon = '' |
| | | |
| | | if (show === 'button') { |
| | | label = btn.label |
| | | icon = btn.icon || '' |
| | | } else if (show === 'link') { |
| | | label = <span>{btn.label}{btn.icon ? <Icon type={btn.icon}/> : ''}</span> |
| | | icon = '' |
| | | } else if (show === 'icon') { |
| | | icon = btn.icon || '' |
| | | } else if (show === 'text') { |
| | | label = btn.label |
| | | } |
| | | |
| | | return ( |
| | | <Button |
| | | type="link" |
| | | title={show === 'icon' ? btn.label : ''} |
| | | style={btn.style} |
| | | disabled={disabled} |
| | | icon={show === 'text' ? '' : (btn.icon || '')} |
| | | icon={icon} |
| | | onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} |
| | | >{show === 'icon' && btn.icon ? '' : btn.label}</Button> |
| | | >{label}</Button> |
| | | ) |
| | | } |
| | | } |