| | |
| | | </Popover> |
| | | {card.wrap.checkAll === 'show' ? <div className="check-all"><Checkbox>全选</Checkbox></div> : null} |
| | | <CardCellComponent cards={card} cardCell={card} elements={card.elements} updateElement={this.updateCard}/> |
| | | <div className="component-name"><div className="center">{card.name}</div></div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | <div style={{clear: 'both'}}></div> |
| | | {card.wrap.pagestyle === 'page' && card.setting.laypage === 'true' && appType !== 'mob' ? <Pagination total={85} size="small" showTotal={total => `共 ${total} 条`} pageSize={20} defaultCurrent={1}/> : null} |
| | | {card.wrap.pagestyle === 'page' && card.setting.laypage === 'true' && appType === 'mob' ? <MobPagination /> : null} |
| | | {/* <div className="component-name"><div className="center">{card.name}</div></div> */} |
| | | <div className="component-name"><div className="center">{card.name}</div></div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | <div className={(card.wrap.layout || 'grid') + '-layout float-' + (card.wrap.cardFloat || 'left')}> |
| | | {card.subcards.map(subcard => (<CardComponent key={subcard.uuid} cards={card} card={subcard} move={this.move} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))} |
| | | </div> |
| | | {/* <div className="component-name"><div className="center">{card.name}</div></div> */} |
| | | <div className="component-name"><div className="center">{card.name}</div></div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | </div> |
| | | {card.setting.laypage === 'true' && card.wrap.pagestyle !== 'slide' && appType !== 'mob' ? <Pagination size="small" total={50} /> : null} |
| | | {card.setting.laypage === 'true' && card.wrap.pagestyle !== 'slide' && appType === 'mob' ? <MobPagination /> : null} |
| | | <div className="component-name"><div className="center">{card.name}</div></div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | <ToolOutlined/> |
| | | </Popover> |
| | | <CardSimpleComponent cards={card} card={card.subcards[0]} updateElement={this.updateCard} deleteElement={this.deleteCard}/> |
| | | <div className="component-name"><div className="center">{card.name}</div></div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | {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}/>))} |
| | | </Carousel> : null} |
| | | <div className="component-name"><div className="center">{card.name}</div></div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | config={card} |
| | | updateaction={this.updateComponent} |
| | | /> : null} |
| | | <div className="component-name"><div className="center">{card.name}</div></div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | </Popover> |
| | | <NormalHeader hideSearch="true" config={card} updateComponent={this.updateComponent}/> |
| | | <div className="canvas" id={card.uuid + 'dashboard'} ref={ref => this.wrap = ref}></div> |
| | | <div className="component-name"><div className="center">{card.name}</div></div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | </Popover> |
| | | <NormalHeader config={card} updateComponent={this.updateComponent}/> |
| | | <div className="canvas" id={card.uuid + 'canvas'} ref={ref => this.wrap = ref}></div> |
| | | <div className="component-name"><div className="center">{card.name}</div></div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | <NormalHeader config={card} updateComponent={this.updateComponent}/> |
| | | <div className="canvas" id={card.uuid + 'canvas'} ref={ref => this.wrap = ref}></div> |
| | | {appType !== 'mob' ? <ActionComponent type="chart" config={card} updateaction={this.updateComponent}/> : null} |
| | | <div className="component-name"><div className="center">{card.name}</div></div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | </Popover> |
| | | <NormalHeader config={card} updateComponent={this.updateComponent}/> |
| | | <div className="canvas" id={card.uuid + 'canvas'} ref={ref => this.wrap = ref}></div> |
| | | <div className="component-name"><div className="center">{card.name}</div></div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | <ToolOutlined /> |
| | | </Popover> |
| | | <CodeContent name={card.name} html={card.html} css={card.css} js={card.js}/> |
| | | <div className="component-name"><div className="center">{card.name}</div></div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | value={card.wrap.datatype !== 'static' ? '<p class="empty-content">富文本</p>' : card.html} |
| | | encryption="false" |
| | | /> |
| | | <div className="component-name"><div className="center">{card.name}</div></div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | />} |
| | | <FormAction config={card} group={group} updateconfig={this.updateGroup}/> |
| | | </div> : null} |
| | | <div className="component-name"><div className="center">{card.name}</div></div> |
| | | <Modal |
| | | title={this.state.dict['model.edit']} |
| | | visible={this.state.visible} |
| | |
| | | />} |
| | | <FormAction config={card} group={group} updateconfig={this.updateGroup}/> |
| | | </div> : null} |
| | | <div className="component-name"><div className="center">{card.name}</div></div> |
| | | <Modal |
| | | title={this.state.dict['model.edit']} |
| | | visible={this.state.visible} |
| | |
| | | } trigger="hover"> |
| | | <ToolOutlined /> |
| | | </Popover> |
| | | <div className="component-name"><div className="center">{card.name}</div></div> |
| | | {/* 编辑搜索条件 */} |
| | | <Modal |
| | | title="搜索条件-编辑" |
| | |
| | | const { visible, loading } = this.state |
| | | |
| | | return ( |
| | | <div className="clock-component-wrap"> |
| | | <div className={'clock-component-wrap' + (config.timer ? ' tip-sign' : '')}> |
| | | <ClockCircleOutlined title="定时器" onClick={this.trigger} /> |
| | | <Modal |
| | | title="定时器设置" |
| | |
| | | .clock-component-wrap { |
| | | position: relative; |
| | | display: inline-block; |
| | | |
| | | >.anticon-clock-circle { |
| | | color: rgb(38, 194, 129); |
| | | } |
| | | } |
| | | |
| | | .clock-component-wrap.tip-sign::after { |
| | | content: ' '; |
| | | position: absolute; |
| | | top: -2px; |
| | | right: 2px; |
| | | height: 8px; |
| | | width: 8px; |
| | | border-radius: 100%; |
| | | background: #ff5b05; |
| | | z-index: 1; |
| | | } |
| | |
| | | } |
| | | |
| | | render () { |
| | | const { btnlog } = this.props |
| | | const { visible, dict, data, columns } = this.state |
| | | |
| | | return ( |
| | | <div className="btn-log-wrap"> |
| | | <div className={'btn-log-wrap' + (btnlog && btnlog.length > 0 ? ' tip-sign' : '')}> |
| | | <RollbackOutlined title="解除冻结" onClick={this.trigger} /> |
| | | <Modal |
| | | wrapClassName="popview-modal" |
| | |
| | | .btn-log-wrap { |
| | | position: relative; |
| | | display: inline-block; |
| | | |
| | | >.anticon-rollback { |
| | |
| | | padding: 5px; |
| | | } |
| | | } |
| | | } |
| | | .btn-log-wrap.tip-sign::after { |
| | | content: ' '; |
| | | position: absolute; |
| | | top: -2px; |
| | | right: 2px; |
| | | height: 8px; |
| | | width: 8px; |
| | | border-radius: 100%; |
| | | background: #ff5b05; |
| | | z-index: 1; |
| | | } |
| | |
| | | val = column.formula |
| | | if (column.eval === 'false') { |
| | | val = val.replace(/\n/ig, '<br/>').replace(/\s/ig, ' ') |
| | | val = <span dangerouslySetInnerHTML={{__html: val}}></span> |
| | | val = <span style={{fontWeight: 'inherit'}} dangerouslySetInnerHTML={{__html: val}}></span> |
| | | } |
| | | } |
| | | return ( |
| | |
| | | return uuid.join('') |
| | | }) () |
| | | |
| | | if (config.wrap && config.wrap.borderColor) { // 边框颜色 |
| | | let style = `#${tableId} table, #${tableId} tr, #${tableId} th, #${tableId} td {border-color: ${config.wrap.borderColor}}` |
| | | let ele = document.createElement('style') |
| | | ele.innerHTML = style |
| | | document.getElementsByTagName('head')[0].appendChild(ele) |
| | | } |
| | | |
| | | this.setState({ |
| | | tableId, |
| | | columns: fromJS(config.cols).toJS(), |
| | | fields: fromJS(config.columns).toJS(), |
| | | lineMarks: config.lineMarks ? fromJS(config.lineMarks).toJS() : [] |
| | | }, () => { |
| | | const element = document.getElementById(tableId) |
| | | element && element.style.setProperty('--mk-table-border-color', config.wrap.borderColor || '#e8e8e8') |
| | | element && element.style.setProperty('--mk-table-color', config.wrap.color || 'rgba(0, 0, 0, 0.65)') |
| | | element && element.style.setProperty('--mk-table-font-size', config.wrap.fontSize || '14px') |
| | | element && element.style.setProperty('--mk-table-font-weight', config.wrap.fontWeight || 'normal') |
| | | }) |
| | | } |
| | | |
| | |
| | | } |
| | | } else if (!is(fromJS(this.state.fields), fromJS(nextProps.config.columns))) { |
| | | this.setState({fields: fromJS(nextProps.config.columns).toJS()}) |
| | | } else if (this.props.config.wrap.borderColor !== nextProps.config.wrap.borderColor) { |
| | | let style = `#${this.state.tableId} table, #${this.state.tableId} tr, #${this.state.tableId} th, #${this.state.tableId} td {border-color: ${nextProps.config.wrap.borderColor}}` |
| | | let ele = document.createElement('style') |
| | | ele.innerHTML = style |
| | | document.getElementsByTagName('head')[0].appendChild(ele) |
| | | } else if (!is(fromJS(this.props.config.wrap), fromJS(nextProps.config.wrap))) { |
| | | const element = document.getElementById(this.state.tableId) |
| | | element && element.style.setProperty('--mk-table-border-color', nextProps.config.wrap.borderColor || '#e8e8e8') |
| | | element && element.style.setProperty('--mk-table-color', nextProps.config.wrap.color || 'rgba(0, 0, 0, 0.65)') |
| | | element && element.style.setProperty('--mk-table-font-size', nextProps.config.wrap.fontSize || '14px') |
| | | element && element.style.setProperty('--mk-table-font-weight', nextProps.config.wrap.fontWeight || 'normal') |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | }) |
| | | |
| | | let style = {} |
| | | if (config.wrap.color) { |
| | | style.color = config.wrap.color |
| | | } |
| | | if (config.wrap.fontSize) { |
| | | style.fontSize = config.wrap.fontSize |
| | | } |
| | | |
| | | return ( |
| | | <div className={`edit-table-columns ${config.setting.laypage} ${config.wrap.mode || ''}`} id={tableId}> |
| | | <div className="col-control"> |
| | |
| | | rowKey="uuid" |
| | | size={config.wrap.size || 'middle'} |
| | | rowClassName="editable-row" |
| | | style={style} |
| | | bordered={config.wrap.bordered !== 'false'} |
| | | rowSelection={rowSelection} |
| | | components={components} |
| | |
| | | .edit-table-columns { |
| | | position: relative; |
| | | --mk-table-border-color: #e8e8e8; |
| | | --mk-table-color: rgba(0, 0, 0, 0.65); |
| | | --mk-table-font-size: 14px; |
| | | --mk-table-font-weight: normal; |
| | | |
| | | .ant-table { |
| | | color: inherit; |
| | | font-size: inherit; |
| | |
| | | .ant-table-small > .ant-table-content > .ant-table-body { |
| | | margin: 0; |
| | | } |
| | | |
| | | table, tr, th, td { |
| | | border-color: var(--mk-table-border-color)!important; |
| | | } |
| | | table tr { |
| | | th .ant-table-column-title, th .ant-table-column-title > span { |
| | | // color: var(--mk-table-color)!important; |
| | | font-size: var(--mk-table-font-size)!important; |
| | | font-weight: var(--mk-table-font-weight)!important; |
| | | } |
| | | td { |
| | | color: var(--mk-table-color)!important; |
| | | font-size: var(--mk-table-font-size)!important; |
| | | font-weight: var(--mk-table-font-weight)!important; |
| | | } |
| | | } |
| | | } |
| | | .edit-table-columns.false { |
| | | .ant-pagination { |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', [card.uuid], ['background', 'border', 'padding', 'margin', 'shadow'], card.style) |
| | | let style = {...card.style} |
| | | style.color = card.wrap.color || 'rgba(0, 0, 0, 0.65)' |
| | | style.fontSize = card.wrap.fontSize || 14 |
| | | style.fontWeight = card.wrap.fontWeight || 'normal' |
| | | |
| | | MKEmitter.emit('changeStyle', [card.uuid], ['font1', 'background', 'border', 'padding', 'margin', 'shadow'], style) |
| | | } |
| | | |
| | | getStyle = (comIds, style) => { |
| | |
| | | |
| | | if (comIds[0] !== card.uuid || comIds.length !== 1) return |
| | | |
| | | let _card = {...card, style} |
| | | let _card = fromJS(card).toJS() |
| | | let _style = fromJS(style).toJS() |
| | | |
| | | let color = style.color |
| | | let fontSize = style.fontSize |
| | | let fontWeight = style.fontWeight |
| | | |
| | | delete _style.color |
| | | delete _style.fontSize |
| | | delete _style.fontWeight |
| | | |
| | | _card.style = _style |
| | | _card.wrap.color = color |
| | | _card.wrap.fontSize = fontSize |
| | | _card.wrap.fontWeight = fontWeight |
| | | |
| | | this.setState({ |
| | | card: _card |
| | |
| | | } |
| | | |
| | | updateWrap = (res) => { |
| | | let card = {...this.state.card, wrap: res} |
| | | const { card } = this.state |
| | | |
| | | res.color = card.wrap.color |
| | | res.fontSize = card.wrap.fontSize |
| | | res.fontWeight = card.wrap.fontWeight |
| | | |
| | | let _card = {...card, wrap: res} |
| | | |
| | | if (res.tableType) { |
| | | card.switchable = true |
| | | _card.switchable = true |
| | | } |
| | | |
| | | this.updateComponent(card) |
| | | this.updateComponent(_card) |
| | | } |
| | | |
| | | clickComponent = (e) => { |
| | |
| | | <SearchComponent config={card} updatesearch={this.updateconfig}/> |
| | | <ActionComponent type="editable" config={card} setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/> |
| | | <ColumnComponent config={card} updatecolumn={this.updateconfig}/> |
| | | <div className="component-name"><div className="center">{card.name}</div></div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | tooltip: '默认值 #e8e8e8。', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'color', |
| | | field: 'color', |
| | | label: '字体颜色', |
| | | initval: wrap.color || 'rgba(0, 0, 0, 0.65)', |
| | | tooltip: '默认值 rgba(0, 0, 0, 0.65)。', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'number', |
| | | field: 'fontSize', |
| | | label: '字体大小', |
| | | initval: wrap.fontSize || 14, |
| | | min: 12, |
| | | max: 30, |
| | | precision: 0, |
| | | required: false |
| | | }, |
| | | // { |
| | | // type: 'color', |
| | | // field: 'color', |
| | | // label: '字体颜色', |
| | | // initval: wrap.color || 'rgba(0, 0, 0, 0.65)', |
| | | // tooltip: '默认值 rgba(0, 0, 0, 0.65)。', |
| | | // required: false |
| | | // }, |
| | | // { |
| | | // type: 'number', |
| | | // field: 'fontSize', |
| | | // label: '字体大小', |
| | | // initval: wrap.fontSize || 14, |
| | | // min: 12, |
| | | // max: 30, |
| | | // precision: 0, |
| | | // required: false |
| | | // }, |
| | | { |
| | | type: 'number', |
| | | field: 'advanceWidth', |
| | |
| | | val = column.formula |
| | | if (column.eval === 'false') { |
| | | val = val.replace(/\n/ig, '<br/>').replace(/\s/ig, ' ') |
| | | val = <span dangerouslySetInnerHTML={{__html: val}}></span> |
| | | val = <span style={{fontWeight: 'inherit'}} dangerouslySetInnerHTML={{__html: val}}></span> |
| | | } |
| | | } |
| | | return ( |
| | |
| | | return uuid.join('') |
| | | }) () |
| | | |
| | | if (config.wrap && config.wrap.borderColor) { // 边框颜色 |
| | | let style = `#${tableId} table, #${tableId} tr, #${tableId} th, #${tableId} td {border-color: ${config.wrap.borderColor}}` |
| | | let ele = document.createElement('style') |
| | | ele.innerHTML = style |
| | | document.getElementsByTagName('head')[0].appendChild(ele) |
| | | } |
| | | |
| | | this.setState({ |
| | | tableId, |
| | | columns: fromJS(config.cols).toJS(), |
| | | fields: fromJS(config.columns).toJS(), |
| | | lineMarks: config.lineMarks ? fromJS(config.lineMarks).toJS() : [] |
| | | }, () => { |
| | | const element = document.getElementById(tableId) |
| | | element && element.style.setProperty('--mk-table-border-color', config.wrap.borderColor || '#e8e8e8') |
| | | element && element.style.setProperty('--mk-table-color', config.wrap.color || 'rgba(0, 0, 0, 0.65)') |
| | | element && element.style.setProperty('--mk-table-font-size', config.wrap.fontSize || '14px') |
| | | element && element.style.setProperty('--mk-table-font-weight', config.wrap.fontWeight || 'normal') |
| | | }) |
| | | } |
| | | |
| | |
| | | } |
| | | } else if (!is(fromJS(this.state.fields), fromJS(nextProps.config.columns))) { |
| | | this.setState({fields: fromJS(nextProps.config.columns).toJS()}) |
| | | } else if (this.props.config.wrap.borderColor !== nextProps.config.wrap.borderColor) { |
| | | let style = `#${this.state.tableId} table, #${this.state.tableId} tr, #${this.state.tableId} th, #${this.state.tableId} td {border-color: ${nextProps.config.wrap.borderColor}}` |
| | | let ele = document.createElement('style') |
| | | ele.innerHTML = style |
| | | document.getElementsByTagName('head')[0].appendChild(ele) |
| | | } else if (!is(fromJS(this.props.config.wrap), fromJS(nextProps.config.wrap))) { |
| | | const element = document.getElementById(this.state.tableId) |
| | | element && element.style.setProperty('--mk-table-border-color', nextProps.config.wrap.borderColor || '#e8e8e8') |
| | | element && element.style.setProperty('--mk-table-color', nextProps.config.wrap.color || 'rgba(0, 0, 0, 0.65)') |
| | | element && element.style.setProperty('--mk-table-font-size', nextProps.config.wrap.fontSize || '14px') |
| | | element && element.style.setProperty('--mk-table-font-weight', nextProps.config.wrap.fontWeight || 'normal') |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | const columns = this.handlecolumns(this.state.columns, fields, config) |
| | | |
| | | let style = {} |
| | | if (config.wrap.color) { |
| | | style.color = config.wrap.color |
| | | } |
| | | if (config.wrap.fontSize) { |
| | | style.fontSize = config.wrap.fontSize |
| | | } |
| | | |
| | | return ( |
| | | <div className={`normal-table-columns ${config.setting.laypage} ${config.wrap.tableType} ${config.wrap.mode || ''}`} id={tableId}> |
| | | <div className="col-control"> |
| | |
| | | rowKey="uuid" |
| | | size={config.wrap.size || 'middle'} |
| | | rowClassName="editable-row" |
| | | style={style} |
| | | bordered={config.wrap.bordered !== 'false'} |
| | | components={components} |
| | | dataSource={this.state.data} |
| | |
| | | .normal-table-columns { |
| | | position: relative; |
| | | --mk-table-border-color: #e8e8e8; |
| | | --mk-table-color: rgba(0, 0, 0, 0.65); |
| | | --mk-table-font-size: 14px; |
| | | --mk-table-font-weight: normal; |
| | | |
| | | .ant-table { |
| | | color: inherit; |
| | | font-size: inherit; |
| | | font-weight: inherit; |
| | | } |
| | | .ant-table-body { |
| | | overflow-x: auto; |
| | |
| | | .ant-table-small > .ant-table-content > .ant-table-body { |
| | | margin: 0; |
| | | } |
| | | |
| | | table, tr, th, td { |
| | | border-color: var(--mk-table-border-color)!important; |
| | | } |
| | | table tr { |
| | | th .ant-table-column-title { |
| | | // color: var(--mk-table-color)!important; |
| | | font-size: var(--mk-table-font-size)!important; |
| | | font-weight: var(--mk-table-font-weight)!important; |
| | | } |
| | | td { |
| | | color: var(--mk-table-color)!important; |
| | | font-size: var(--mk-table-font-size)!important; |
| | | font-weight: var(--mk-table-font-weight)!important; |
| | | } |
| | | } |
| | | } |
| | | .normal-table-columns.false { |
| | | .ant-pagination { |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', [card.uuid], ['background', 'border', 'padding', 'margin', 'shadow'], card.style) |
| | | let style = {...card.style} |
| | | style.color = card.wrap.color || 'rgba(0, 0, 0, 0.65)' |
| | | style.fontSize = card.wrap.fontSize || 14 |
| | | style.fontWeight = card.wrap.fontWeight || 'normal' |
| | | |
| | | MKEmitter.emit('changeStyle', [card.uuid], ['font1', 'background', 'border', 'padding', 'margin', 'shadow'], style) |
| | | } |
| | | |
| | | getStyle = (comIds, style) => { |
| | | const { card } = this.state |
| | | |
| | | if (comIds[0] !== card.uuid) return |
| | | if (comIds[0] !== card.uuid || comIds.length !== 1) return |
| | | |
| | | let _card = {} |
| | | if (comIds.length === 1) { |
| | | _card = {...card, style} |
| | | } else { |
| | | return |
| | | } |
| | | let _card = fromJS(card).toJS() |
| | | let _style = fromJS(style).toJS() |
| | | |
| | | let color = style.color |
| | | let fontSize = style.fontSize |
| | | let fontWeight = style.fontWeight |
| | | |
| | | delete _style.color |
| | | delete _style.fontSize |
| | | delete _style.fontWeight |
| | | |
| | | _card.style = _style |
| | | _card.wrap.color = color |
| | | _card.wrap.fontSize = fontSize |
| | | _card.wrap.fontWeight = fontWeight |
| | | |
| | | this.setState({ |
| | | card: _card |
| | |
| | | } |
| | | |
| | | updateWrap = (res) => { |
| | | this.updateComponent({...this.state.card, wrap: res}) |
| | | const { card } = this.state |
| | | |
| | | res.color = card.wrap.color |
| | | res.fontSize = card.wrap.fontSize |
| | | res.fontWeight = card.wrap.fontWeight |
| | | |
| | | this.updateComponent({...card, wrap: res}) |
| | | } |
| | | |
| | | clickComponent = (e) => { |
| | |
| | | <SearchComponent config={card} updatesearch={this.updateconfig}/> |
| | | <ActionComponent config={card} setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/> |
| | | <ColumnComponent config={card} updatecolumn={this.updateconfig}/> |
| | | <div className="component-name"><div className="center">{card.name}</div></div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | tooltip: '默认值 #e8e8e8。', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'color', |
| | | field: 'color', |
| | | label: '字体颜色', |
| | | initval: wrap.color || 'rgba(0, 0, 0, 0.65)', |
| | | tooltip: '默认值 rgba(0, 0, 0, 0.65)。', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'number', |
| | | field: 'fontSize', |
| | | label: '字体大小', |
| | | initval: wrap.fontSize || 14, |
| | | min: 12, |
| | | max: 30, |
| | | precision: 0, |
| | | required: false |
| | | }, |
| | | // { |
| | | // type: 'color', |
| | | // field: 'color', |
| | | // label: '字体颜色', |
| | | // initval: wrap.color || 'rgba(0, 0, 0, 0.65)', |
| | | // tooltip: '默认值 rgba(0, 0, 0, 0.65)。', |
| | | // required: false |
| | | // }, |
| | | // { |
| | | // type: 'number', |
| | | // field: 'fontSize', |
| | | // label: '字体大小', |
| | | // initval: wrap.fontSize || 14, |
| | | // min: 12, |
| | | // max: 30, |
| | | // precision: 0, |
| | | // required: false |
| | | // }, |
| | | { |
| | | type: 'number', |
| | | field: 'advanceWidth', |
| | |
| | | </Popover> |
| | | <NormalHeader hideSearch="true" config={card} updateComponent={this.updateComponent}/> |
| | | {card.subcards.map(subcard => (<CardSimpleComponent key={subcard.uuid} cards={card} card={subcard} updateElement={this.updateCard}/>))} |
| | | <div className="component-name"><div className="center">{card.name}</div></div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | </TreeNode> |
| | | </Tree> |
| | | </div> |
| | | <div className="component-name"><div className="center">{card.name}</div></div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | import moment from 'moment' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | | import { notification, Modal, Collapse, Card, Switch, Button } from 'antd' |
| | | import { EyeOutlined, EyeInvisibleOutlined } from '@ant-design/icons' |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | |
| | | oriConfig: null, |
| | | config: null, |
| | | customComponents: [], |
| | | comloading: false |
| | | comloading: false, |
| | | eyeopen: false |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | |
| | | |
| | | render () { |
| | | const { btn } = this.props |
| | | const { activeKey, comloading, dict, config, menuloading, customComponents, MenuId } = this.state |
| | | const { activeKey, comloading, dict, config, menuloading, customComponents, MenuId, eyeopen } = this.state |
| | | |
| | | return ( |
| | | <div className="pc-poper-view"> |
| | |
| | | </Panel> |
| | | </Collapse> |
| | | </div> |
| | | <div className={'menu-view ' + (menuloading ? 'saving' : '')}> |
| | | <div className={'menu-view' + (menuloading ? ' saving' : '') + (eyeopen ? ' eye-open' : '')}> |
| | | <Card title={ |
| | | <div> {config && config.MenuName} </div> |
| | | } bordered={false} extra={ |
| | | <div> |
| | | <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 组件名</Button> |
| | | <Versions MenuId={MenuId} open_edition={config ? config.open_edition : ''} updateConfig={this.refreshConfig}/> |
| | | <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/> |
| | | <StyleCombControlButton menu={config} /> |
| | |
| | | .pc-poper-view { |
| | | background: #000; |
| | | min-height: 100vh; |
| | | |
| | | .eye-open { |
| | | .component-name { |
| | | display: block; |
| | | } |
| | | .anticon-tool { |
| | | display: none; |
| | | } |
| | | } |
| | | |
| | | >.menu-body { |
| | | width: 100vw; |
| | | height: 100vh; |
| | |
| | | changeFontSize = (val) => { |
| | | let value = parseInt(val) |
| | | |
| | | if (isNaN(value) || value < 12 || value > 100) return |
| | | if (isNaN(value)) return |
| | | |
| | | if (value < 12) { |
| | | value = 12 |
| | | } else if (value > 300) { |
| | | value = 300 |
| | | } |
| | | |
| | | this.updateStyle({fontSize: `${value}px`}) |
| | | } |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | </Panel> : null} |
| | | {options.includes('font1') ? <Panel header="字体" key="font1"> |
| | | <Col span={12}> |
| | | <Form.Item colon={false} label={<FontSizeOutlined title="字体大小"/>}> |
| | | <InputNumber defaultValue={card.fontSize || 14} min={12} max={300} precision={0} onChange={this.changeFontSize} /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item colon={false} label={<BoldOutlined title="字体粗细"/>}> |
| | | <Select defaultValue={card.fontWeight || 'normal'} onChange={this.boldChange}> |
| | | <Option value="normal">normal</Option> |
| | | <Option value="bold">bold</Option> |
| | | <Option value="bolder">bolder</Option> |
| | | <Option value="lighter">lighter</Option> |
| | | <Option value="100">100</Option> |
| | | <Option value="200">200</Option> |
| | | <Option value="300">300</Option> |
| | | <Option value="400">400</Option> |
| | | <Option value="500">500</Option> |
| | | <Option value="600">600</Option> |
| | | <Option value="700">700</Option> |
| | | <Option value="800">800</Option> |
| | | <Option value="900">900</Option> |
| | | </Select> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<FontColorsOutlined title="字体颜色"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <ColorSketch value={card.color || 'rgba(0, 0, 0, 0.85)'} onChange={this.changeFontColor} /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Panel> : null} |
| | | {options.includes('background') || options.includes('backgroundColor') ? <Panel header="背景" key="background"> |
| | | <Col span={24}> |
| | | <Form.Item |
| | |
| | | </div> |
| | | </Col> |
| | | </div> |
| | | <div className="component-name"><div className="center">{card.name}</div></div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | <div className={(card.wrap.layout || 'grid') + '-layout'}> |
| | | {card.subMenus.map((menu, index) => (<MenuComponent key={menu.uuid} cards={card} card={menu} move={this.move} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))} |
| | | </div> |
| | | <div className="component-name"><div className="center">{card.name}</div></div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | } trigger="hover"> |
| | | <ToolOutlined /> |
| | | </Popover> |
| | | <div className="component-name"><div className="center">{card.name}</div></div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | <ToolOutlined /> |
| | | </Popover> |
| | | <LoginForm loginWays={card.loginWays} wrap={card.wrap} /> |
| | | <div className="component-name"><div className="center">{card.name}</div></div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | _style.cursor = 'pointer' |
| | | } |
| | | |
| | | if (!card.link) |
| | | |
| | | if (card.bgImage && data[card.bgImage]) { |
| | | _style.backgroundImage = `url('${data[card.bgImage]}')` |
| | | } |
| | |
| | | return uuid.join('') |
| | | }) () |
| | | |
| | | if (setting.borderColor) { // 边框颜色 |
| | | let style = `#${tableId} table, #${tableId} tr, #${tableId} th, #${tableId} td {border-color: ${setting.borderColor}}` |
| | | let ele = document.createElement('style') |
| | | ele.innerHTML = style |
| | | document.getElementsByTagName('head')[0].appendChild(ele) |
| | | } |
| | | // if (setting.borderColor) { // 边框颜色 |
| | | // let style = `#${tableId} table, #${tableId} tr, #${tableId} th, #${tableId} td {border-color: ${setting.borderColor}}` |
| | | // let ele = document.createElement('style') |
| | | // ele.innerHTML = style |
| | | // document.getElementsByTagName('head')[0].appendChild(ele) |
| | | // } |
| | | |
| | | let size = (setting.pageSize || 10) + '' |
| | | let pageOptions = ['10', '25', '50', '100', '500', '1000'] |
| | |
| | | rowspans, |
| | | tableId, |
| | | orderfields |
| | | }, () => { |
| | | const element = document.getElementById(tableId) |
| | | element && element.style.setProperty('--mk-table-border-color', setting.borderColor || '#e8e8e8') |
| | | element && element.style.setProperty('--mk-table-color', setting.color || 'rgba(0, 0, 0, 0.65)') |
| | | element && element.style.setProperty('--mk-table-font-size', setting.fontSize || '14px') |
| | | element && element.style.setProperty('--mk-table-font-weight', setting.fontWeight || 'normal') |
| | | }) |
| | | } |
| | | |
| | |
| | | } |
| | | <Table |
| | | components={components} |
| | | style={setting.style} |
| | | // style={setting.style} |
| | | size={setting.size || 'middle'} |
| | | bordered={setting.bordered !== 'false'} |
| | | rowSelection={rowSelection} |
| | |
| | | .normal-custom-table { |
| | | position: relative; |
| | | padding: 0px; |
| | | --mk-table-border-color: #e8e8e8; |
| | | --mk-table-color: rgba(0, 0, 0, 0.65); |
| | | --mk-table-font-size: 14px; |
| | | --mk-table-font-weight: normal; |
| | | |
| | | .normal-table-footer { |
| | | padding: 10px 0px; |
| | |
| | | display: block; |
| | | } |
| | | } |
| | | |
| | | table, tr, th, td { |
| | | border-color: var(--mk-table-border-color)!important; |
| | | } |
| | | table tr { |
| | | th .ant-table-column-title { |
| | | // color: var(--mk-table-color)!important; |
| | | font-size: var(--mk-table-font-size)!important; |
| | | font-weight: var(--mk-table-font-weight)!important; |
| | | } |
| | | td { |
| | | color: var(--mk-table-color)!important; |
| | | font-size: var(--mk-table-font-size)!important; |
| | | font-weight: var(--mk-table-font-weight)!important; |
| | | |
| | | >span, div:not(.card-cell-list), div:not(.card-cell-list) div, div:not(.card-cell-list) span { |
| | | font-weight: var(--mk-table-font-weight)!important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .normal-custom-table:not(.fixed-height) { |
| | | .ant-table-body::-webkit-scrollbar { |
| | |
| | | const { BID, BData } = this.props |
| | | let _config = fromJS(this.props.config).toJS() |
| | | let _cols = new Map() |
| | | let setting = {..._config.setting, ..._config.wrap, style: {}} |
| | | let setting = {..._config.setting, ..._config.wrap} |
| | | setting.tableId = Utils.getuuid() |
| | | |
| | | _config.submit.style = _config.submit.style || {} |
| | |
| | | } |
| | | } |
| | | |
| | | if (setting.color) { |
| | | setting.style.color = setting.color |
| | | } |
| | | if (setting.fontSize) { |
| | | setting.style.fontSize = setting.fontSize |
| | | } |
| | | // if (setting.color) { |
| | | // setting.style.color = setting.color |
| | | // } |
| | | // if (setting.fontSize) { |
| | | // setting.style.fontSize = setting.fontSize |
| | | // } |
| | | |
| | | if (!_config.lineMarks || _config.lineMarks.length === 0) { |
| | | _config.lineMarks = null |
| | |
| | | }) |
| | | } |
| | | |
| | | if (setting.borderColor) { // 边框颜色 |
| | | let style = `#${setting.tableId} table, #${setting.tableId} tr, #${setting.tableId} th, #${setting.tableId} td {border-color: ${setting.borderColor}}` |
| | | let ele = document.createElement('style') |
| | | ele.innerHTML = style |
| | | document.getElementsByTagName('head')[0].appendChild(ele) |
| | | } |
| | | // if (setting.borderColor) { // 边框颜色 |
| | | // let style = `#${setting.tableId} table, #${setting.tableId} tr, #${setting.tableId} th, #${setting.tableId} td {border-color: ${setting.borderColor}}` |
| | | // let ele = document.createElement('style') |
| | | // ele.innerHTML = style |
| | | // document.getElementsByTagName('head')[0].appendChild(ele) |
| | | // } |
| | | |
| | | let size = (setting.pageSize || 10) + '' |
| | | let pageOptions = ['10', '25', '50', '100', '500', '1000'] |
| | |
| | | if (deForms.length > 0) { |
| | | this.improveActionForm(deForms) |
| | | } |
| | | |
| | | const element = document.getElementById(setting.tableId) |
| | | element && element.style.setProperty('--mk-table-border-color', setting.borderColor || '#e8e8e8') |
| | | element && element.style.setProperty('--mk-table-color', setting.color || 'rgba(0, 0, 0, 0.65)') |
| | | element && element.style.setProperty('--mk-table-font-size', setting.fontSize || '14px') |
| | | element && element.style.setProperty('--mk-table-font-weight', setting.fontWeight || 'normal') |
| | | }) |
| | | } |
| | | |
| | |
| | | <Table |
| | | rowKey="$$uuid" |
| | | components={components} |
| | | style={setting.style} |
| | | // style={setting.style} |
| | | size={setting.size || 'middle'} |
| | | bordered={setting.bordered !== 'false'} |
| | | rowSelection={rowSelection} |
| | |
| | | position: relative; |
| | | min-height: 150px; |
| | | padding: 0px; |
| | | --mk-table-border-color: #e8e8e8; |
| | | --mk-table-color: rgba(0, 0, 0, 0.65); |
| | | --mk-table-font-size: 14px; |
| | | --mk-table-font-weight: normal; |
| | | |
| | | .normal-table-footer { |
| | | padding: 10px 0px; |
| | |
| | | bottom: 2px; |
| | | right: 5px; |
| | | opacity: 0.7; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | table { |
| | |
| | | margin-top: 10px!important; |
| | | margin-right: 10px!important; |
| | | } |
| | | |
| | | table, tr, th, td { |
| | | border-color: var(--mk-table-border-color)!important; |
| | | } |
| | | table tr { |
| | | th .ant-table-column-title, th .ant-table-column-title span:not(.anticon) { |
| | | // color: var(--mk-table-color)!important; |
| | | font-size: var(--mk-table-font-size)!important; |
| | | font-weight: var(--mk-table-font-weight)!important; |
| | | } |
| | | td { |
| | | color: var(--mk-table-color)!important; |
| | | font-size: var(--mk-table-font-size)!important; |
| | | font-weight: var(--mk-table-font-weight)!important; |
| | | |
| | | >span, div:not(.card-cell-list), div:not(.card-cell-list) div, div:not(.card-cell-list) span { |
| | | font-weight: var(--mk-table-font-weight)!important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .edit-custom-table.buoyMode { |
| | | .ant-table-scroll { |
| | |
| | | } |
| | | } |
| | | |
| | | let setting = {..._config.setting, ..._config.wrap, style: {}} |
| | | let setting = {..._config.setting, ..._config.wrap} |
| | | |
| | | if (setting.selected !== 'always' && setting.selected !== 'init') { |
| | | setting.selected = 'false' |
| | |
| | | } |
| | | }) |
| | | |
| | | if (setting.color) { |
| | | setting.style.color = setting.color |
| | | } |
| | | if (setting.fontSize) { |
| | | setting.style.fontSize = setting.fontSize |
| | | } |
| | | // if (setting.color) { |
| | | // setting.style.color = setting.color |
| | | // } |
| | | // if (setting.fontSize) { |
| | | // setting.style.fontSize = setting.fontSize |
| | | // } |
| | | |
| | | if (_config.wrap.collapse === 'true') { |
| | | _config.wrap.title = _config.wrap.title || ' ' |
| | |
| | | import moment from 'moment' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | | import { ConfigProvider, notification, Modal, Collapse, Card, Switch, Button, Typography } from 'antd' |
| | | import { DoubleLeftOutlined, DoubleRightOutlined } from '@ant-design/icons' |
| | | import { DoubleLeftOutlined, DoubleRightOutlined, EyeOutlined, EyeInvisibleOutlined } from '@ant-design/icons' |
| | | import html2canvas from 'html2canvas' |
| | | |
| | | import Api from '@/api' |
| | |
| | | visible: false, |
| | | customComponents: [], |
| | | comloading: false, |
| | | settingshow: !['linkage_navigation', 'linkage', 'menu_board', 'menu_board_navigation'].includes(window.GLOB.navBar) |
| | | settingshow: true, |
| | | eyeopen: false |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | |
| | | config = null |
| | | } |
| | | |
| | | let _settingshow = this.state.settingshow |
| | | if (!config) { |
| | | _settingshow = true |
| | | config = { |
| | | version: 1.0, |
| | | uuid: MenuId, |
| | |
| | | window.GLOB.urlFields = config.urlFields || [] |
| | | |
| | | this.setState({ |
| | | settingshow: _settingshow, |
| | | oriConfig: config, |
| | | config: fromJS(config).toJS() |
| | | }) |
| | |
| | | } |
| | | |
| | | render () { |
| | | const { activeKey, comloading, MenuType, popBtn, visible, dict, MenuId, config, settingshow, ParentId, MenuName, MenuNo, menuloading, customComponents } = this.state |
| | | const { activeKey, comloading, MenuType, popBtn, visible, dict, MenuId, config, settingshow, ParentId, MenuName, MenuNo, menuloading, customComponents, eyeopen } = this.state |
| | | |
| | | return ( |
| | | <ConfigProvider locale={_locale}> |
| | |
| | | </Panel> |
| | | </Collapse> |
| | | </div> |
| | | <div className={'menu-view ' + (menuloading ? 'saving' : '')}> |
| | | <div className={'menu-view' + (menuloading ? ' saving' : '') + (eyeopen ? ' eye-open' : '')}> |
| | | <Card title={ |
| | | <div style={{paddingLeft: '15px'}}> {config && config.MenuName} </div> |
| | | } bordered={false} extra={ |
| | | <div> |
| | | <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 组件名</Button> |
| | | <Versions MenuId={MenuId} open_edition={config ? config.open_edition : ''}/> |
| | | <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/> |
| | | <SysInterface config={config} updateConfig={this.updateConfig}/> |
| | |
| | | text-decoration: line-through!important; |
| | | } |
| | | } |
| | | // .component-name { |
| | | // position: absolute; |
| | | // z-index: 10; |
| | | // left: 0; |
| | | // right: 0; |
| | | // top: 0; |
| | | // bottom: 0; |
| | | // background: rgba(255, 255, 255, 0.8); |
| | | // .center { |
| | | // position: absolute; |
| | | // left: 50%; |
| | | // top: 50%; |
| | | // transform: translate(-50%, -50%); |
| | | // } |
| | | // } |
| | | .eye-open { |
| | | .component-name { |
| | | display: block; |
| | | } |
| | | .anticon-tool { |
| | | display: none; |
| | | } |
| | | } |
| | | .component-name { |
| | | position: absolute; |
| | | z-index: 9; |
| | | display: none; |
| | | left: 0; |
| | | right: 0; |
| | | top: 0; |
| | | bottom: 0; |
| | | background: rgba(255, 255, 255, 0.8); |
| | | border: 1px solid #1890ff; |
| | | .center { |
| | | position: absolute; |
| | | font-size: 16px; |
| | | left: 50%; |
| | | top: 50%; |
| | | color: #1890ff; |
| | | transform: translate(-50%, -50%); |
| | | } |
| | | } |
| | | >.menu-body { |
| | | width: 100vw; |
| | | height: 100vh; |
| | |
| | | import moment from 'moment' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | | import { ConfigProvider, notification, Modal, Collapse, Switch, Button, message, Spin, Typography } from 'antd' |
| | | import { DoubleLeftOutlined, DoubleRightOutlined, HomeOutlined, LoginOutlined, RedoOutlined, ArrowLeftOutlined } from '@ant-design/icons' |
| | | import { DoubleLeftOutlined, DoubleRightOutlined, HomeOutlined, LoginOutlined, RedoOutlined, ArrowLeftOutlined, EyeOutlined, EyeInvisibleOutlined } from '@ant-design/icons' |
| | | |
| | | import Api from '@/api' |
| | | import Utils, { setGLOBFuncs } from '@/utils/utils.js' |
| | |
| | | controlshow: true, |
| | | comloading: false, |
| | | adapters: [], |
| | | viewType: 'menu' |
| | | viewType: 'menu', |
| | | eyeopen: false |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | |
| | | |
| | | |
| | | render () { |
| | | const { viewType, localedict, comloading, loading, settingshow, controlshow, activeKey, dict, MenuId, config, menuloading, customComponents, adapters } = this.state |
| | | const { viewType, localedict, comloading, loading, settingshow, controlshow, activeKey, dict, MenuId, config, menuloading, customComponents, adapters, eyeopen } = this.state |
| | | |
| | | return ( |
| | | <ConfigProvider locale={localedict}> |
| | |
| | | </Collapse> |
| | | </div> |
| | | </div> |
| | | <div className={'menu-control ' + (!controlshow ? 'hidden' : '')}> |
| | | <div className={'menu-control' + (!controlshow ? ' hidden' : '')}> |
| | | <div className="draw"> |
| | | {controlshow ? <DoubleRightOutlined onClick={() => {this.setState({controlshow: false})}}/> : null} |
| | | {!controlshow ? <DoubleLeftOutlined onClick={() => {this.setState({controlshow: true})}}/> : null} |
| | |
| | | <Button type="primary" onClick={this.submitConfig} id="save-config" loading={menuloading}>{dict['mob.save']}</Button> |
| | | <Switch className="big" checkedChildren={dict['mob.enable']} unCheckedChildren={dict['mob.disable']} checked={config && config.enabled} onChange={this.onEnabledChange} /> |
| | | <ArrowLeftOutlined title="后退" className="back-view" onClick={this.backView}/> |
| | | <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 组件名</Button> |
| | | <CreateView resetmenu={this.getAppMenus} /> |
| | | <PasteController insert={this.insert} /> |
| | | <ViewNodes config={config} MenuId={MenuId}/> |
| | |
| | | <Button type="default" onClick={this.closeView}>关闭</Button> |
| | | </div> |
| | | </div> |
| | | <div className={'menu-body menu-view' + (menuloading ? 'saving' : '')}> |
| | | <div className={'menu-body menu-view' + (menuloading ? ' saving' : '') + (eyeopen ? ' eye-open' : '')}> |
| | | {config && !comloading ? <div className="mob-shell" style={{width: window.GLOB.shellWidth, height: window.GLOB.shellHeight}}> |
| | | <MobShell menu={config} handleList={this.updateConfig} /> |
| | | </div> : null} |
| | |
| | | .mk-mob-view { |
| | | min-height: 100vh; |
| | | |
| | | .eye-open { |
| | | .component-name { |
| | | display: block; |
| | | } |
| | | .anticon-tool { |
| | | display: none; |
| | | } |
| | | } |
| | | .component-name { |
| | | position: absolute; |
| | | z-index: 9; |
| | | display: none; |
| | | left: 0; |
| | | right: 0; |
| | | top: 0; |
| | | bottom: 0; |
| | | background: rgba(255, 255, 255, 0.8); |
| | | border: 1px solid #1890ff; |
| | | .center { |
| | | position: absolute; |
| | | font-size: 16px; |
| | | left: 50%; |
| | | top: 50%; |
| | | color: #1890ff; |
| | | transform: translate(-50%, -50%); |
| | | } |
| | | } |
| | | |
| | | .mk-hidden { |
| | | text-decoration: line-through!important; |
| | | span { |
| | |
| | | import moment from 'moment' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | | import { ConfigProvider, notification, Modal, Collapse, Switch, Button, message, Spin, Typography } from 'antd' |
| | | import { DoubleLeftOutlined, DoubleRightOutlined, HomeOutlined, LoginOutlined, RedoOutlined, ArrowLeftOutlined } from '@ant-design/icons' |
| | | import { DoubleLeftOutlined, DoubleRightOutlined, HomeOutlined, LoginOutlined, RedoOutlined, ArrowLeftOutlined, EyeOutlined, EyeInvisibleOutlined } from '@ant-design/icons' |
| | | |
| | | import Api from '@/api' |
| | | import Utils, { setGLOBFuncs } from '@/utils/utils.js' |
| | |
| | | customComponents: [], |
| | | settingshow: sessionStorage.getItem('settingshow') !== 'false', |
| | | controlshow: sessionStorage.getItem('controlshow') !== 'false', |
| | | comloading: false |
| | | comloading: false, |
| | | eyeopen: false |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | |
| | | } |
| | | |
| | | render () { |
| | | const { localedict, loading, visible, popBtn, comloading, activeKey, settingshow, controlshow, dict, MenuId, config, menuloading, customComponents } = this.state |
| | | const { localedict, loading, visible, popBtn, comloading, activeKey, settingshow, controlshow, dict, MenuId, config, menuloading, customComponents, eyeopen } = this.state |
| | | |
| | | return ( |
| | | <ConfigProvider locale={localedict}> |
| | |
| | | <Button type="primary" id="save-config" onClick={this.submitConfig} loading={menuloading}>{dict['mob.save']}</Button> |
| | | <Switch className="big" checkedChildren={dict['mob.enable']} unCheckedChildren={dict['mob.disable']} checked={config && config.enabled} onChange={this.onEnabledChange} /> |
| | | <ArrowLeftOutlined title="后退" className="back-view" onClick={this.backView}/> |
| | | <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 组件名</Button> |
| | | <CreateView resetmenu={this.getAppMenus} /> |
| | | <PasteController insert={this.insert} /> |
| | | <ViewNodes config={config} MenuId={MenuId}/> |
| | |
| | | <Button type="default" onClick={this.closeView}>关闭</Button> |
| | | </div> |
| | | </div> |
| | | <div className={'menu-body menu-view' + (menuloading ? 'saving' : '')}> |
| | | <div className={'menu-body menu-view' + (menuloading ? ' saving' : '') + (eyeopen ? ' eye-open' : '')}> |
| | | {config && !comloading ? <MenuShell menu={config} handleList={this.updateConfig} /> : null} |
| | | </div> |
| | | </DndProvider> : null} |
| | |
| | | background: #000; |
| | | min-height: 100vh; |
| | | |
| | | .eye-open { |
| | | .component-name { |
| | | display: block; |
| | | } |
| | | .anticon-tool { |
| | | display: none; |
| | | } |
| | | } |
| | | .component-name { |
| | | position: absolute; |
| | | z-index: 9; |
| | | display: none; |
| | | left: 0; |
| | | right: 0; |
| | | top: 0; |
| | | bottom: 0; |
| | | background: rgba(255, 255, 255, 0.8); |
| | | border: 1px solid #1890ff; |
| | | .center { |
| | | position: absolute; |
| | | font-size: 16px; |
| | | left: 50%; |
| | | top: 50%; |
| | | color: #1890ff; |
| | | transform: translate(-50%, -50%); |
| | | } |
| | | } |
| | | |
| | | .mk-hidden { |
| | | text-decoration: line-through!important; |
| | | span { |