| | |
| | | let mainMenu = menulist[0] || '' |
| | | let _menu = null |
| | | |
| | | if (mainMenu === '') { // 是否显示侧边栏控制 |
| | | let _url = window.location.href.split('#')[0] |
| | | localStorage.setItem(_url + '-sideHidden', 'true') |
| | | } else { |
| | | let _url = window.location.href.split('#')[0] |
| | | localStorage.removeItem(_url + '-sideHidden') |
| | | } |
| | | |
| | | if (sessionStorage.getItem('ThirdMenu')) { // 是否为打开新页面 |
| | | let ThirdMenuId = sessionStorage.getItem('ThirdMenu') |
| | | _menu = thdMenuList.filter(item => item.MenuID === ThirdMenuId)[0] // 通过url中menuid筛选出选中的主菜单 |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Modal, Popover, Icon, Switch } from 'antd' |
| | | import { Modal, Popover, Icon, Switch, Col } from 'antd' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | |
| | | |
| | | class CardBoxComponent extends Component { |
| | | static propTpyes = { |
| | | offset: PropTypes.any, // 偏移量 |
| | | MenuType: PropTypes.any, // 菜单类型 |
| | | cards: PropTypes.object, // 卡片行配置信息 |
| | | card: PropTypes.object, // 卡片配置信息 |
| | |
| | | const { card, side } = this.state |
| | | |
| | | let _style = null |
| | | let options = ['height', 'background', 'border', 'padding', 'margin'] |
| | | let options = ['height', 'background', 'border', 'padding', 'margin', 'shadow'] |
| | | if (side === 'front') { |
| | | _style = card.style ? fromJS(card.style).toJS() : {} |
| | | } else if (side === 'back') { |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { cards, MenuType } = this.props |
| | | const { cards, MenuType, offset } = this.props |
| | | const { card, elements, side, settingVisible, dict } = this.state |
| | | |
| | | let _style = card.style |
| | | let _style = {...card.style} |
| | | |
| | | if (_style.shadow) { |
| | | _style.boxShadow = '0 0 4px ' + _style.shadow |
| | | } |
| | | |
| | | if (side === 'back') { |
| | | _style = {...card.backStyle, height: card.style.height} |
| | | } |
| | | |
| | | return ( |
| | | <div className={'ant-col ant-col-' + (card.setting.width || 6)}> |
| | | <Col span={card.setting.width || 6} offset={offset || 0}> |
| | | <div className="card-item" style={_style}> |
| | | <CardCellComponent cards={cards} cardCell={card} side={side} elements={elements} updateElement={this.updateCard}/> |
| | | <div className="card-control"> |
| | |
| | | wrappedComponentRef={(inst) => this.settingRef = inst} |
| | | /> |
| | | </Modal> |
| | | </div> |
| | | </Col> |
| | | ) |
| | | } |
| | | } |
| | |
| | | const { menu } = this.props |
| | | const { card } = this.state |
| | | |
| | | let offset = 0 |
| | | if (card.wrap.cardFloat && card.wrap.cardFloat !== 'left') { |
| | | let _width = 0 |
| | | card.subcards.forEach(card => { |
| | | _width += card.setting.width |
| | | }) |
| | | offset = _width < 24 ? 24 - _width : 0 |
| | | if (card.wrap.cardFloat === 'center') { |
| | | offset = Math.floor(offset / 2) |
| | | } |
| | | } |
| | | |
| | | return ( |
| | | <div className="menu-data-card-edit-box" style={{...card.style, minHeight: card.wrap.minHeight}}> |
| | | <NormalHeader defaultshow="hidden" config={card} updateComponent={this.updateComponent}/> |
| | |
| | | <Icon type="tool" /> |
| | | </Popover> |
| | | <ActionComponent config={card} setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/> |
| | | {card.subcards.map(subcard => (<CardComponent key={subcard.uuid} MenuType={menu ? menu.MenuType : ''} cards={card} card={subcard} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))} |
| | | {card.subcards.map((subcard, index) => (<CardComponent key={subcard.uuid} offset={!index ? offset : 0} MenuType={menu ? menu.MenuType : ''} cards={card} card={subcard} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))} |
| | | <div style={{clear: 'both'}}></div> |
| | | {card.wrap.pagestyle !== 'switch' && card.setting.laypage === 'true' ? <Pagination total={85} showTotal={total => `共 ${total} 条`} pageSize={20} defaultCurrent={1}/> : null} |
| | | </div> |
| | |
| | | wrapClassName="popview-modal" |
| | | title={config.type === 'table' ? '表格设置' : '卡片设置'} |
| | | visible={visible} |
| | | width={700} |
| | | width={800} |
| | | maskClosable={false} |
| | | okText={dict['model.submit']} |
| | | onOk={this.verifySubmit} |
| | |
| | | </Col> : null} |
| | | {config.subtype !== 'tablecard' ? <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="设置为居中对齐或右对齐,只在卡片为1行时有效。"> |
| | | <Icon type="question-circle" /> |
| | | 卡片排列 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('cardFloat', { |
| | | initialValue: wrap.cardFloat || 'left' |
| | | })( |
| | | <Radio.Group style={{whiteSpace: 'nowrap'}}> |
| | | <Radio key="left" value="left"> 左对齐 </Radio> |
| | | <Radio key="center" value="center"> 居中 </Radio> |
| | | <Radio key="right" value="right"> 右对齐 </Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {config.subtype !== 'tablecard' ? <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="鼠标悬浮于卡片上方时,卡片放大1.1倍。"> |
| | | <Icon type="question-circle" /> |
| | | 卡片放大 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('scale', { |
| | | initialValue: wrap.scale || 'false' |
| | | })( |
| | | <Radio.Group> |
| | | <Radio key="false" value="false"> 否 </Radio> |
| | | <Radio key="true" value="true"> 是 </Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {config.subtype !== 'tablecard' ? <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="卡片外边框的最小高度,控制数据加载时组件的占位。"> |
| | | <Icon type="question-circle" /> |
| | | 最小高度 |
| | |
| | | name: card.name, |
| | | subtype: card.subtype, |
| | | setting: { interType: 'system' }, |
| | | wrap: { name: card.name, width: 24, title: '', addable: 'false', switch: 'false', datatype: 'dynamic' }, |
| | | wrap: { name: card.name, width: 24, title: '', addable: 'false', switch: 'false', datatype: 'static' }, |
| | | style: { marginLeft: '0px', marginRight: '0px', marginTop: '8px', marginBottom: '8px' }, |
| | | headerStyle: { fontSize: '16px', borderBottomWidth: '1px', borderBottomColor: '#e8e8e8' }, |
| | | columns: [], |
| | |
| | | const { menu } = this.props |
| | | const { card } = this.state |
| | | |
| | | let offset = 0 |
| | | if (card.wrap.cardFloat && card.wrap.cardFloat !== 'left') { |
| | | let _width = 0 |
| | | card.subcards.forEach(card => { |
| | | _width += card.setting.width |
| | | }) |
| | | offset = _width < 24 ? 24 - _width : 0 |
| | | if (card.wrap.cardFloat === 'center') { |
| | | offset = Math.floor(offset / 2) |
| | | } |
| | | } |
| | | |
| | | return ( |
| | | <div className="menu-prop-card-edit-box" style={{...card.style, minHeight: card.wrap.minHeight}}> |
| | | <NormalHeader defaultshow="hidden" config={card} updateComponent={this.updateComponent}/> |
| | |
| | | } trigger="hover"> |
| | | <Icon type="tool" /> |
| | | </Popover> |
| | | {card.subcards.map(subcard => (<CardComponent key={subcard.uuid} MenuType={menu ? menu.MenuType : ''} cards={card} card={subcard} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))} |
| | | {card.subcards.map((subcard, index) => (<CardComponent key={subcard.uuid} offset={!index ? offset : 0} MenuType={menu ? menu.MenuType : ''} cards={card} card={subcard} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))} |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | _formfields = config.fields |
| | | } |
| | | |
| | | _inputfields = _formfields.filter(item => item.type === 'text' || item.type === 'number') |
| | | _inputfields = _formfields.filter(item => item.type === 'text' || item.type === 'number' || item.type === 'color') |
| | | _tabfields = _formfields.filter(item => card.field !== item.field && item.hidden !== 'true' && ['text', 'number', 'select', 'link'].includes(item.type)) |
| | | _tabfields.unshift({field: '', text: '原表单'}) |
| | | |
| | |
| | | this.updateStyle({backgroundColor: val}) |
| | | } |
| | | |
| | | /** |
| | | * @description 修改阴影颜色 ,颜色控件 |
| | | */ |
| | | changeShadowColor = (val) => { |
| | | this.updateStyle({shadow: val}) |
| | | } |
| | | |
| | | imgChange = (list) => { |
| | | if (list[0] && list[0].response) { |
| | | this.setState({ |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | </Panel> : null} |
| | | {options.includes('shadow') ? <Panel header="阴影" key="shadow"> |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="阴影颜色" type="bg-colors" />} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <ColorSketch value={card.shadow || 'transparent'} onChange={this.changeShadowColor} /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Panel> : null} |
| | | {options.includes('margin') ? <Panel header="外边距" key="margin"> |
| | | <Col span={24}> |
| | | <Form.Item |
| | |
| | | width: 100%; |
| | | |
| | | .color-sketch-block-box { |
| | | // border-radius: 4px; |
| | | display: inline-block; |
| | | width: calc(100% - 160px); |
| | | height: 100%; |
| | |
| | | .color-sketch-block-inner { |
| | | display: inline-block; |
| | | cursor: pointer; |
| | | border-radius: 2px; |
| | | border-radius: 4px; |
| | | box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .color-sketch-value { |
| | | display: inline-block; |
| | | font-size: 13px; |
| | | width: 160px; |
| | | padding-left: 10px; |
| | | height: 25px; |
| | |
| | | import moment from 'moment' |
| | | import * as Type from './action-type' |
| | | |
| | | let _mainMenu = null |
| | | let _url = window.location.href.split('#')[0] |
| | | let _collapse = localStorage.getItem('collapse') === 'true' |
| | | let _level = 10 |
| | | let _Mlevel = sessionStorage.getItem('Member_Level') |
| | |
| | | _level = 30 |
| | | } |
| | | } |
| | | if (localStorage.getItem(_url + '-sideHidden') === 'true') { |
| | | _mainMenu = '' |
| | | } |
| | | |
| | | let defaultState = { |
| | | menuTree: null, // 菜单结构树 |
| | | mainMenu: null, // 已选主菜单 |
| | | mainMenu: _mainMenu, // 已选主菜单 |
| | | tabviews: [], // 导航栏 |
| | | collapse: _collapse, // 是否收起侧边栏导航 |
| | | isiframe: false, // 是否为iframe窗口 |
| | |
| | | _total = config.setting.pageSize * pageIndex |
| | | switchable = true |
| | | } |
| | | let offset = 0 |
| | | if (config.wrap.cardFloat && config.wrap.cardFloat !== 'left') { |
| | | if (data && card.setting.width * data.length < 24) { |
| | | offset = 24 - card.setting.width * data.length |
| | | if (config.wrap.cardFloat === 'center') { |
| | | offset = Math.floor(offset / 2) |
| | | } |
| | | } |
| | | } |
| | | |
| | | return ( |
| | | <div className="custom-data-card-box" style={{...config.style, minHeight: config.wrap.minHeight}}> |
| | | {loading ? |
| | | <div className="loading-mask"> |
| | | <div className="ant-spin-blur"></div> |
| | | {data ? <div className="ant-spin-blur"></div> : null} |
| | | <Spin /> |
| | | </div> : null |
| | | } |
| | |
| | | getexceloutparam={this.getexceloutparam} |
| | | /> : null |
| | | } |
| | | <div className="data-zoom"> |
| | | <div className={`data-zoom ${config.wrap.cardType} ${config.wrap.scale}`}> |
| | | {switchable ? <div className={'prev-page ' + (pageIndex === 1 ? 'disabled' : '')} onClick={this.prevPage}><div><div><img src={preImg} alt=""/></div></div></div> : null} |
| | | {data && data.length > 0 ? <div className="card-row-list"> |
| | | {data.map((item, index) => ( |
| | | <Col className={activeKey === index ? 'active' : (selectKeys.indexOf(index) > -1 ? 'selected' : '')} key={index} span={card.setting.width} onClick={() => {this.changeCard(index, item)}}> |
| | | <Col className={activeKey === index ? 'active' : (selectKeys.indexOf(index) > -1 ? 'selected' : '')} key={index} span={card.setting.width} offset={!index ? offset : 0} onClick={() => {this.changeCard(index, item)}}> |
| | | <CardItem card={card} cards={config} data={item} updateStatus={this.updateStatus}/> |
| | | </Col> |
| | | ))} |
| | |
| | | display: flex; |
| | | position: relative; |
| | | } |
| | | .data-zoom.radio, .data-zoom.checkbox { |
| | | .card-row-list { |
| | | >.ant-col:not(.active):not(.selected):hover { |
| | | >.card-item-box { |
| | | border-color: #69c0ff!important; |
| | | box-shadow: 0 0 4px #69c0ff!important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .data-zoom.true { |
| | | .card-row-list { |
| | | >.ant-col:hover { |
| | | >.card-item-box { |
| | | z-index: 1; |
| | | transform: scale(1.1); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .prev-page { |
| | | width: 20px; |
| | | div { |
| | |
| | | flex: 10; |
| | | |
| | | .card-item-box { |
| | | position: relative; |
| | | background-color: #ffffff; |
| | | transition: all 0.3s; |
| | | } |
| | | >.active >.card-item-box { |
| | | border-color: #1890ff!important; |
| | | box-shadow: 0 0 3px #1890ff; |
| | | box-shadow: 0 0 4px #1890ff; |
| | | } |
| | | >.selected >.card-item-box { |
| | | border-color: #69c0ff!important; |
| | | box-shadow: 0 0 1px #69c0ff; |
| | | box-shadow: 0 0 4px #69c0ff; |
| | | } |
| | | } |
| | | .card-item-box { |
| | |
| | | _cols.set(item.field, item) |
| | | }) |
| | | |
| | | let _width = 0 |
| | | _config.subcards.forEach(card => { |
| | | _width += card.setting.width |
| | | card.elements = card.elements.map(item => { |
| | | if (item.field && _cols.has(item.field)) { |
| | | item.col = _cols.get(item.field) |
| | |
| | | return item |
| | | }) |
| | | }) |
| | | |
| | | let offset = 0 |
| | | if (_config.wrap.cardFloat && _config.wrap.cardFloat !== 'left' && _config.subcards[0] && _width < 24) { |
| | | offset = 24 - _width |
| | | if (_config.wrap.cardFloat === 'center') { |
| | | offset = Math.floor(offset / 2) |
| | | } |
| | | _config.subcards[0].offset = offset |
| | | } |
| | | |
| | | this.setState({ |
| | | sync: _sync, |
| | |
| | | <Spin /> |
| | | </div> : null |
| | | } |
| | | <div className="card-row-list"> |
| | | <div className={`card-row-list ${config.wrap.cardType} ${config.wrap.scale}`}> |
| | | {config.subcards.map((item, index) => ( |
| | | <Col className={activeKey === index ? 'active' : ''} key={index} span={item.setting.width || 6} onClick={() => {this.changeCard(index, item)}}> |
| | | <Col className={activeKey === index ? 'active' : ''} key={index} span={item.setting.width || 6} offset={item.offset || 0} onClick={() => {this.changeCard(index, item)}}> |
| | | <CardItem card={item} cards={config} data={data} updateStatus={this.updateStatus}/> |
| | | </Col> |
| | | ))} |
| | |
| | | } |
| | | >.active >.card-item-box { |
| | | border-color: #1890ff!important; |
| | | box-shadow: 0 0 3px #1890ff; |
| | | box-shadow: 0 0 4px #1890ff; |
| | | } |
| | | } |
| | | .card-row-list.radio, .card-row-list.checkbox { |
| | | >.ant-col:not(.active):not(.selected):hover { |
| | | >.card-item-box { |
| | | border-color: #69c0ff!important; |
| | | box-shadow: 0 0 4px #69c0ff!important; |
| | | } |
| | | } |
| | | } |
| | | .card-row-list.true { |
| | | >.ant-col:hover { |
| | | >.card-item-box { |
| | | z-index: 1; |
| | | transform: scale(1.1); |
| | | } |
| | | } |
| | | } |
| | | |
| | | .card-item-box { |
| | | position: relative; |
| | | background-position: center center; |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | transition: all 0.3s; |
| | | } |
| | | |
| | | .loading-mask { |
| | |
| | | <div className="custom-table-card-box" style={{...config.style, height: config.wrap.height}}> |
| | | {loading ? |
| | | <div className="loading-mask"> |
| | | <div className="ant-spin-blur"></div> |
| | | {data ? <div className="ant-spin-blur"></div> : null} |
| | | <Spin /> |
| | | </div> : null |
| | | } |
| | |
| | | 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 |
| | | } |
| | | |
| | | card.elements = card.elements.filter(cell => { |
| | | if (cell.eleType === 'button') { |
| | | cell.logLabel = item.name + '-' + cell.label |
| | |
| | | const { debug, loadingview, viewlost, config, loading } = this.state |
| | | |
| | | return ( |
| | | <div className="custom-page-wrap" id={this.state.ContainerId} style={config ? config.style : null}> |
| | | {(loadingview || loading) ? <Spin size="large" /> : null} |
| | | <div className={'custom-page-wrap ' + (loadingview || loading ? 'loading' : '')} id={this.state.ContainerId} style={config ? config.style : null}> |
| | | {(loadingview || loading) ? <Spin className="view-spin" size="large" /> : null} |
| | | <Row>{this.getComponents()}</Row> |
| | | {debug && MenuNo && options.sysType !== 'cloud' && menuType !== 'HS' ? <Button |
| | | icon="copy" |
| | |
| | | opacity: 0.8; |
| | | } |
| | | } |
| | | |
| | | .custom-page-wrap.loading { |
| | | .ant-spin-spinning:not(.view-spin) { |
| | | display: none; |
| | | } |
| | | } |
| | |
| | | |
| | | state = { |
| | | loading: true, |
| | | background: sessionStorage.getItem('home_background'), |
| | | view: '' |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { loading, view } = this.state |
| | | const { loading, view, background } = this.state |
| | | |
| | | if (loading) { |
| | | return (<Spin className="home-box-spin" size="large" />) |
| | | return (<div className="home-loading-view" style={{background: background}}><Spin className="home-box-spin" size="large" /></div>) |
| | | } else if (view === 'custom') { |
| | | return (<CustomPage MenuID={this.props.MenuID}/>) |
| | | } else { |
| | |
| | | .home-box-spin { |
| | | .home-loading-view { |
| | | position: relative; |
| | | left: 50%; |
| | | top: 30vh; |
| | | height: 100%; |
| | | .home-box-spin { |
| | | position: relative; |
| | | left: 50%; |
| | | top: 30vh; |
| | | } |
| | | } |
| | |
| | | const { calendar } = this.props |
| | | |
| | | let datalist = [] |
| | | let levels = { red: 1, orange: 2, yellow: 3, green: 4, cyan: 5, blue: 6, purple: 7, gray: 8 } |
| | | let colors = { red: '#d0021b', orange: '#f5a623', yellow: '#f8e71c', green: '#7ed321', cyan: '#50e3c2', blue: '#1890ff', purple: '#bd10e0', gray: '#9b9b9b' } |
| | | let colors = { |
| | | transparent: 'rgba(0, 0, 0, 0)', |
| | | red: 'rgba(208, 2, 27, 1)', |
| | | orange: 'rgba(245, 166, 35, 1)', |
| | | yellow: 'rgba(248, 231, 28, 1)', |
| | | green: 'rgba(126, 211, 33, 1)', |
| | | cyan: 'rgba(80, 227, 194, 1)', |
| | | blue: 'rgba(24, 144, 255, 1)', |
| | | purple: 'rgba(189, 16, 224, 1)', |
| | | gray: 'rgba(155, 155, 155, 1)' |
| | | } |
| | | |
| | | data && data.forEach(item => { |
| | | let startTime = item[calendar.startfield] |
| | |
| | | let equal = endTime.substr(0, 4) === startTime.substr(0, 4) |
| | | |
| | | datalist.push({ |
| | | color: colors[color] || '', |
| | | level: color && levels[color] ? levels[color] : 100, |
| | | color: colors[color] || color, |
| | | remark: item[calendar.remarkfield], |
| | | startMonth: startTime.substr(0, 4) + startTime.substr(5, 2), |
| | | endMonth: endTime.substr(0, 4) + endTime.substr(5, 2), |
| | |
| | | }) |
| | | }) |
| | | |
| | | if (datalist.length > 0) { |
| | | datalist.sort((a, b) => a.level - b.level) |
| | | } |
| | | |
| | | let styles = [ |
| | | {background: '#d0021b', color: '#ffffff'}, |
| | | {background: '#f5a623', color: '#ffffff'}, |
| | | {background: '#f8e71c', color: '#ffffff'}, |
| | | {background: '#7ed321', color: '#ffffff'}, |
| | | {background: '#50e3c2', color: '#ffffff'}, |
| | | {background: '#1890ff', color: '#ffffff'}, |
| | | {background: '#bd10e0', color: '#ffffff'}, |
| | | {background: '#9b9b9b', color: '#ffffff'}, |
| | | ] |
| | | |
| | | return datelist.map(month => { |
| | | month.subData = [] |
| | | datalist.forEach(item => { |
| | |
| | | month.subData.push(item) |
| | | } |
| | | }) |
| | | if (month.subData[0]) { |
| | | month.style = styles[month.subData[0].level - 1] || null |
| | | } |
| | | month.style = this.getStyle(month.subData[0]) |
| | | month.sublist = month.sublist.map(week => { |
| | | week.sublist = week.sublist.map(day => { |
| | | if (!day) return null |
| | |
| | | day.subData.push(item) |
| | | } |
| | | }) |
| | | |
| | | if (day.subData[0]) { |
| | | day.style = styles[day.subData[0].level - 1] || null |
| | | } |
| | | day.style = this.getStyle(day.subData[0]) |
| | | return day |
| | | }) |
| | | return week |
| | | }) |
| | | return month |
| | | }) |
| | | } |
| | | |
| | | getStyle = (item ) => { |
| | | if (!item || !item.color) return null |
| | | let style = {background: item.color} |
| | | |
| | | if (/rgb/ig.test(item.color)) { |
| | | try { |
| | | let colors = item.color.match(/\d+/g) |
| | | if ((colors[0] * 0.299 + colors[1] * 0.578 + colors[2] * 0.114) * colors[3] < 192) { |
| | | style.color = '#ffffff' |
| | | } |
| | | } catch {} |
| | | } |
| | | |
| | | return style |
| | | } |
| | | |
| | | getDateList = (selectYear) => { |
| | |
| | | <tr key={cell.week}> |
| | | {cell.sublist.map((d, i) => ( |
| | | <td key={i}> |
| | | {d ? <div className={'day-wrap ' + d.class} style={d.style || null} onClick={() => this.triggerDay(d)}> |
| | | {d ? <div className="day-wrap" style={d.style || null} onClick={() => this.triggerDay(d)}> |
| | | {d.subData.length > 0 ? <Popover mouseEnterDelay={0.3} overlayClassName="calendar-day-pop" content={ |
| | | <div> |
| | | {d.subData.map((data, index) => ( |
| | |
| | | |
| | | import Api from '@/api' |
| | | import options from '@/store/options.js' |
| | | import { formRule, calendarColors } from '@/utils/option.js' |
| | | import { formRule } from '@/utils/option.js' |
| | | import Utils from '@/utils/utils.js' |
| | | import FileUpload from '../fileupload' |
| | | import CustomSwitch from './customSwitch' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import CheckCard from './checkCard' |
| | | import './index.scss' |
| | | |
| | | const {MonthPicker} = DatePicker |
| | | const { TextArea } = Input |
| | | const FileUpload = asyncComponent(() => import('../fileupload')) |
| | | const ColorSketch = asyncComponent(() => import('@/mob/colorsketch')) |
| | | |
| | | class MainSearch extends Component { |
| | | static propTpyes = { |
| | |
| | | </Tooltip> : item.label |
| | | }> |
| | | {getFieldDecorator(item.field, { |
| | | initialValue: item.initval, |
| | | initialValue: item.initval || 'transparent', |
| | | rules: [ |
| | | { |
| | | required: item.required === 'true', |
| | |
| | | } |
| | | ] |
| | | })( |
| | | <Select disabled={item.readonly === 'true'}> |
| | | {calendarColors.map(option => |
| | | <Select.Option key={option.name} style={{background: option.value, color: '#ffffff'}} value={option.name}>{option.name}</Select.Option> |
| | | )} |
| | | </Select> |
| | | <ColorSketch /> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | |
| | | text-overflow:ellipsis; |
| | | white-space:nowrap; |
| | | } |
| | | .color-sketch-block { |
| | | margin-top: 7px; |
| | | overflow: hidden; |
| | | .color-sketch-block-box { |
| | | min-width: 100px; |
| | | } |
| | | } |
| | | p { |
| | | color: #1890ff; |
| | | border-bottom: 1px solid #d9d9d9; |
| | |
| | | height: 100%; |
| | | overflow-y: hidden; |
| | | padding-bottom: 30px; |
| | | .ant-collapse-borderless { |
| | | background-color: #ffffff; |
| | | } |
| | | .ant-collapse-item { |
| | | position: relative; |
| | | border: 0; |
| | |
| | | height: 100%; |
| | | overflow-y: hidden; |
| | | padding-bottom: 30px; |
| | | .ant-collapse-borderless { |
| | | background-color: #ffffff; |
| | | } |
| | | .ant-collapse-item { |
| | | position: relative; |
| | | border: 0; |
| | |
| | | _formfields = [..._formfields, ...group.sublist] |
| | | }) |
| | | |
| | | _inputfields = _formfields.filter(item => item.type === 'text' || item.type === 'number') |
| | | _inputfields = _formfields.filter(item => item.type === 'text' || item.type === 'number' || item.type === 'color') |
| | | _tabfields = _formfields.filter(item => card.field !== item.field && item.hidden !== 'true' && ['text', 'number', 'select', 'link'].includes(item.type)) |
| | | _tabfields.unshift({field: '', text: '原表单'}) |
| | | |
| | |
| | | height: 100%; |
| | | overflow-y: auto; |
| | | padding-bottom: 30px; |
| | | .ant-collapse-borderless { |
| | | background-color: #ffffff; |
| | | } |
| | | .ant-collapse-item { |
| | | position: relative; |
| | | border: 0; |
| | |
| | | import moment from 'moment' |
| | | |
| | | import CheckCard from '../checkCard' |
| | | import ColorSketch from '@/mob/colorsketch' |
| | | import './index.scss' |
| | | |
| | | const { MonthPicker } = DatePicker |
| | |
| | | formItem = (<Input style={{marginTop: '4px'}} value={card.initval} />) |
| | | } else if (card.type === 'number') { |
| | | formItem = (<InputNumber value={card.initval} precision={card.decimal} />) |
| | | } else if (card.type === 'multiselect' || card.type === 'select' || card.type === 'link' || card.type === 'color') { |
| | | } else if (card.type === 'multiselect' || card.type === 'select' || card.type === 'link') { |
| | | formItem = (<Select value={selectval}></Select>) |
| | | } else if (card.type === 'color') { |
| | | formItem = (<ColorSketch value={card.initval || 'transparent'}/>) |
| | | } else if (card.type === 'date') { |
| | | formItem = (<DatePicker value={card.initval ? moment().subtract(card.initval, 'days') : null} />) |
| | | } else if (card.type === 'datemonth') { |
| | |
| | | _formfields = config.fields |
| | | } |
| | | |
| | | _inputfields = _formfields.filter(item => item.type === 'text' || item.type === 'number') |
| | | _inputfields = _formfields.filter(item => item.type === 'text' || item.type === 'number' || item.type === 'color') |
| | | _tabfields = _formfields.filter(item => card.field !== item.field && item.hidden !== 'true' && ['text', 'number', 'select', 'link'].includes(item.type)) |
| | | _tabfields.unshift({field: '', text: '原表单'}) |
| | | |
| | |
| | | height: 100%; |
| | | overflow-y: auto; |
| | | padding-bottom: 30px; |
| | | .ant-collapse-borderless { |
| | | background-color: #ffffff; |
| | | } |
| | | .ant-collapse-item { |
| | | border: 0; |
| | | } |
| | |
| | | width: 100%; |
| | | margin-top: 4px; |
| | | } |
| | | .color-sketch-block { |
| | | margin-top: 7px; |
| | | overflow: hidden; |
| | | .color-sketch-block-box { |
| | | min-width: 100px; |
| | | } |
| | | } |
| | | } |
| | | .ant-form-item-control-wrapper::after { |
| | | content: ''; |
| | |
| | | height: 100%; |
| | | overflow-y: hidden; |
| | | padding-bottom: 30px; |
| | | .ant-collapse-borderless { |
| | | background-color: #ffffff; |
| | | } |
| | | .ant-collapse-item { |
| | | position: relative; |
| | | border: 0; |
| | |
| | | height: 100%; |
| | | overflow-y: hidden; |
| | | padding-bottom: 30px; |
| | | .ant-collapse-borderless { |
| | | background-color: #ffffff; |
| | | } |
| | | .ant-collapse-item { |
| | | position: relative; |
| | | border: 0; |
| | |
| | | datemonth: ['initval', 'readonly', 'required', 'hidden', 'readin', 'entireLine', 'tooltip'], |
| | | datetime: ['initval', 'readonly', 'required', 'hidden', 'readin', 'entireLine', 'tooltip'], |
| | | textarea: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'maxRows', 'encryption', 'interception', 'tooltip'], |
| | | color: ['readonly', 'required', 'hidden', 'readin', 'entireLine', 'tooltip'], |
| | | color: ['initval', 'readonly', 'required', 'hidden', 'readin', 'entireLine', 'tooltip'], |
| | | hint: ['label', 'type', 'blacklist', 'message'], |
| | | funcvar: [], |
| | | linkMain: ['readonly', 'required', 'hidden', 'fieldlength', 'entireLine', 'tooltip'] |
| | |
| | | webSite: res.WebSite || '' |
| | | } |
| | | |
| | | sessionStorage.setItem('home_background', res.index_background_color) |
| | | |
| | | // url标题 |
| | | document.title = systemMsg.platTitle |
| | | |