From e0aff8f4c0e9c8f16d1ba07863cf600638067514 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 13 四月 2021 15:08:47 +0800 Subject: [PATCH] 2021-04-13 --- src/views/login/loginform.jsx | 2 src/menu/components/card/table-card/index.jsx | 9 src/tabviews/zshare/actionList/popupbutton/index.jsx | 8 src/menu/components/share/actioncomponent/dragaction/card.jsx | 8 src/mob/mobshell/index.jsx | 3 src/utils/utils-custom.js | 21 +++ src/menu/components/card/cardcellcomponent/dragaction/action.jsx | 10 + src/mob/modulesource/option.jsx | 2 src/menu/components/card/cardcellcomponent/dragaction/card.jsx | 3 src/menu/components/chart/antv-bar/index.jsx | 5 src/menu/components/code/sandbox/index.jsx | 6 src/menu/components/card/table-card/cardcomponent/index.jsx | 5 src/views/mobdesign/index.scss | 2 src/pc/components/login/wrapsetting/settingform/index.jsx | 55 +++++++ src/menu/components/carousel/cardcomponent/index.jsx | 3 src/mob/mobshell/card.jsx | 15 ++ src/menu/components/carousel/data-card/index.jsx | 5 src/views/menudesign/index.jsx | 8 src/tabviews/custom/components/card/table-card/index.jsx | 6 src/tabviews/custom/components/card/cardcellList/index.jsx | 9 + src/menu/components/card/cardcellcomponent/index.jsx | 2 src/menu/components/share/normalheader/index.jsx | 4 src/menu/components/share/actioncomponent/formconfig.jsx | 23 +++ src/pc/components/login/normal-login/loginform.jsx | 18 ++ src/menu/components/carousel/prop-card/index.jsx | 5 src/menu/components/card/cardcomponent/index.jsx | 3 src/menu/components/card/data-card/index.jsx | 7 src/menu/components/chart/antv-pie/index.jsx | 5 src/menu/components/search/main-search/index.jsx | 5 src/pc/components/login/normal-login/index.jsx | 19 ++ src/menu/components/share/actioncomponent/actionform/index.jsx | 22 +- src/pc/components/navbar/normal-navbar/wrapsetting/settingform/index.jsx | 17 ++ src/tabviews/custom/index.jsx | 10 src/menu/components/card/data-card/wrapsetting/settingform/index.jsx | 12 - src/menu/components/card/prop-card/index.jsx | 6 src/menu/components/table/normal-table/index.jsx | 5 src/menu/components/table/normal-table/columns/index.jsx | 8 src/menu/components/tabs/antv-tabs/index.jsx | 6 src/menu/components/group/normal-group/index.jsx | 5 src/pc/components/login/normal-login/index.scss | 13 + 40 files changed, 283 insertions(+), 97 deletions(-) diff --git a/src/menu/components/card/cardcellcomponent/dragaction/action.jsx b/src/menu/components/card/cardcellcomponent/dragaction/action.jsx index 7bdc28b..28b01c1 100644 --- a/src/menu/components/card/cardcellcomponent/dragaction/action.jsx +++ b/src/menu/components/card/cardcellcomponent/dragaction/action.jsx @@ -1,6 +1,8 @@ import React from 'react' import { useDrag, useDrop } from 'react-dnd' import { Icon, Popover, Button } from 'antd' + +import { resetStyle } from '@/utils/utils-custom.js' import './index.scss' const Card = ({ id, card, moveCard, findCard, editCard, delCard, profileCard, changeStyle, doubleClickCard }) => { @@ -29,6 +31,7 @@ if (card.style) { _style = {...card.style, opacity: isDragging ? 0 : 1} + _style = resetStyle(_style) } let hasProfile = false @@ -41,12 +44,13 @@ } let btnElement = null + let btnstyle = resetStyle(card.btnstyle) if (card.show === 'icon') { - btnElement = (<Button style={card.btnstyle} type="link"><Icon type={card.icon}/></Button>) + btnElement = (<Button style={btnstyle} type="link"><Icon type={card.icon}/></Button>) } else if (card.show === 'link') { - btnElement = (<Button style={card.btnstyle} type="link">{card.label}{card.icon ? <Icon type={card.icon}/> : null}</Button>) + btnElement = (<Button style={btnstyle} type="link">{card.label}{card.icon ? <Icon type={card.icon}/> : null}</Button>) } else { - btnElement = (<Button icon={card.icon} style={card.btnstyle}> {card.label} </Button>) + btnElement = (<Button icon={card.icon} style={btnstyle}> {card.label} </Button>) } return ( diff --git a/src/menu/components/card/cardcellcomponent/dragaction/card.jsx b/src/menu/components/card/cardcellcomponent/dragaction/card.jsx index 126104c..448cb6a 100644 --- a/src/menu/components/card/cardcellcomponent/dragaction/card.jsx +++ b/src/menu/components/card/cardcellcomponent/dragaction/card.jsx @@ -11,7 +11,7 @@ import MKEmitter from '@/utils/events.js' import asyncComponent from '@/utils/asyncComponent' import asyncIconComponent from '@/utils/asyncIconComponent' - +import { resetStyle } from '@/utils/utils-custom.js' import './index.scss' const BarCode = asyncComponent(() => import('@/components/barcode')) @@ -50,6 +50,7 @@ if (card.style) { _style = {...card.style, opacity: isDragging ? 0 : 1} + _style = resetStyle(_style) } const getContent = () => { diff --git a/src/menu/components/card/cardcellcomponent/index.jsx b/src/menu/components/card/cardcellcomponent/index.jsx index 58deb61..1dc901b 100644 --- a/src/menu/components/card/cardcellcomponent/index.jsx +++ b/src/menu/components/card/cardcellcomponent/index.jsx @@ -310,7 +310,7 @@ this.setState({ actvisible: true, card: card, - formlist: getActionForm(card, functip, cards.setting, usefulFields, 'card', menulist, modules) + formlist: getActionForm(card, functip, cards.setting, usefulFields, 'card', menulist, modules, cards.columns) }) } diff --git a/src/menu/components/card/cardcomponent/index.jsx b/src/menu/components/card/cardcomponent/index.jsx index f32968a..515c67b 100644 --- a/src/menu/components/card/cardcomponent/index.jsx +++ b/src/menu/components/card/cardcomponent/index.jsx @@ -8,7 +8,7 @@ import zhCN from '@/locales/zh-CN/model.js' import enUS from '@/locales/en-US/model.js' import SettingForm from './settingform' - +import { resetStyle } from '@/utils/utils-custom.js' import Utils from '@/utils/utils.js' import MKEmitter from '@/utils/events.js' import './index.scss' @@ -233,6 +233,7 @@ marginTop: card.style.marginTop } } + _style = resetStyle(_style) return ( <Col span={card.setting.width || 6} offset={offset || 0}> diff --git a/src/menu/components/card/data-card/index.jsx b/src/menu/components/card/data-card/index.jsx index 7b12967..2775b8d 100644 --- a/src/menu/components/card/data-card/index.jsx +++ b/src/menu/components/card/data-card/index.jsx @@ -5,7 +5,7 @@ import asyncComponent from '@/utils/asyncComponent' import asyncIconComponent from '@/utils/asyncIconComponent' - +import { resetStyle } from '@/utils/utils-custom.js' import MKEmitter from '@/utils/events.js' import Utils from '@/utils/utils.js' import zhCN from '@/locales/zh-CN/model.js' @@ -56,7 +56,7 @@ name: card.name, subtype: card.subtype, setting: { interType: 'system' }, - wrap: { name: card.name, width: card.width || 24, title: '', pagestyle: 'page', switch: 'false' }, + wrap: { name: card.name, width: card.width || 24, title: '', pagestyle: 'page', switch: 'false', cardType: '' }, style: { marginLeft: '0px', marginRight: '0px', marginTop: '8px', marginBottom: '8px' }, headerStyle: { fontSize: '16px', borderBottomWidth: '1px', borderBottomColor: '#e8e8e8' }, columns: [], @@ -395,9 +395,10 @@ offset = Math.floor(offset / 2) } } + let _style = resetStyle(card.style) return ( - <div className="menu-data-card-edit-box" style={{...card.style}} onClick={this.clickComponent} id={card.uuid}> + <div className="menu-data-card-edit-box" style={_style} onClick={this.clickComponent} id={card.uuid}> <NormalHeader defaultshow="hidden" config={card} updateComponent={this.updateComponent}/> <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> diff --git a/src/menu/components/card/data-card/wrapsetting/settingform/index.jsx b/src/menu/components/card/data-card/wrapsetting/settingform/index.jsx index 08b58e2..752d545 100644 --- a/src/menu/components/card/data-card/wrapsetting/settingform/index.jsx +++ b/src/menu/components/card/data-card/wrapsetting/settingform/index.jsx @@ -197,18 +197,6 @@ )} </Form.Item> </Col> : null} - {config.subtype === 'tablecard' ? <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="琛ㄦ牸楂樺害锛岃秴鍑烘椂婊氬姩锛岄珮搴︿负绌烘椂鏍规嵁鍐呭鑷�傚簲銆�"> - <Icon type="question-circle" /> - 楂樺害 - </Tooltip> - }> - {getFieldDecorator('height', { - initialValue: wrap.height - })(<InputNumber min={100} max={2000} precision={0} onPressEnter={this.handleSubmit} />)} - </Form.Item> - </Col> : null} {config.subtype === 'propcard' ? <Col span={12}> <Form.Item label={ <Tooltip placement="topLeft" title="閫夋嫨绫诲瀷涓恒�婇〉鐪�/椤佃剼銆嬫椂锛屾墦鍗扮殑姣忛〉閲岄兘浼氬甫鏈夎缁勪欢銆�"> diff --git a/src/menu/components/card/prop-card/index.jsx b/src/menu/components/card/prop-card/index.jsx index 8cac50c..e9bff6e 100644 --- a/src/menu/components/card/prop-card/index.jsx +++ b/src/menu/components/card/prop-card/index.jsx @@ -5,7 +5,7 @@ import asyncComponent from '@/utils/asyncComponent' import asyncIconComponent from '@/utils/asyncIconComponent' - +import { resetStyle } from '@/utils/utils-custom.js' import MKEmitter from '@/utils/events.js' import Utils from '@/utils/utils.js' import zhCN from '@/locales/zh-CN/model.js' @@ -373,8 +373,10 @@ } } + let _style = resetStyle(card.style) + return ( - <div className="menu-prop-card-edit-box" style={{...card.style}} onClick={this.clickComponent} id={card.uuid}> + <div className="menu-prop-card-edit-box" style={_style} onClick={this.clickComponent} id={card.uuid}> <NormalHeader defaultshow="hidden" config={card} updateComponent={this.updateComponent}/> <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> diff --git a/src/menu/components/card/table-card/cardcomponent/index.jsx b/src/menu/components/card/table-card/cardcomponent/index.jsx index e3d9ac7..2fe0400 100644 --- a/src/menu/components/card/table-card/cardcomponent/index.jsx +++ b/src/menu/components/card/table-card/cardcomponent/index.jsx @@ -8,7 +8,7 @@ import zhCN from '@/locales/zh-CN/model.js' import enUS from '@/locales/en-US/model.js' import SettingForm from './settingform' - +import { resetStyle } from '@/utils/utils-custom.js' import Utils from '@/utils/utils.js' import MKEmitter from '@/utils/events.js' import './index.scss' @@ -163,10 +163,11 @@ render() { const { cards } = this.props const { card, elements, settingVisible, dict } = this.state + let _style = resetStyle(card.style) return ( <div className="ant-col ant-col-24"> - <div className="card-item" style={card.style}> + <div className="card-item" style={_style}> <CardCellComponent cards={cards} cardCell={card} elements={elements} updateElement={this.updateCard}/> <div className="card-control"> <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ diff --git a/src/menu/components/card/table-card/index.jsx b/src/menu/components/card/table-card/index.jsx index cc8ddff..3d0d5c7 100644 --- a/src/menu/components/card/table-card/index.jsx +++ b/src/menu/components/card/table-card/index.jsx @@ -5,7 +5,7 @@ import asyncComponent from '@/utils/asyncComponent' import asyncIconComponent from '@/utils/asyncIconComponent' - +import { resetStyle } from '@/utils/utils-custom.js' import MKEmitter from '@/utils/events.js' import Utils from '@/utils/utils.js' import zhCN from '@/locales/zh-CN/model.js' @@ -202,7 +202,7 @@ changeStyle = () => { const { card } = this.state - MKEmitter.emit('changeStyle', [card.uuid], ['background', 'border', 'padding', 'margin'], card.style) + MKEmitter.emit('changeStyle', [card.uuid], ['height', 'background', 'border', 'padding', 'margin'], card.style) } getStyle = (comIds, style) => { @@ -323,9 +323,10 @@ render() { const { card } = this.state + let _style = resetStyle(card.style) return ( - <div className="menu-table-card-edit-box" style={{...card.style, height: card.wrap.height}} onClick={this.clickComponent} id={card.uuid}> + <div className="menu-table-card-edit-box" style={_style} onClick={this.clickComponent} id={card.uuid}> <NormalHeader config={card} updateComponent={this.updateComponent}/> <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> @@ -343,7 +344,7 @@ } trigger="hover"> <Icon type="tool" /> </Popover> - <div style={{minHeight: card.wrap.height - 90}}> + <div style={{minHeight: 'calc(100% - 90px)'}}> {card.subcards.map(subcard => (<CardComponent key={subcard.uuid} cards={card} card={subcard} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))} </div> {card.setting.laypage === 'true' ? <Pagination size="small" total={50} /> : null} diff --git a/src/menu/components/carousel/cardcomponent/index.jsx b/src/menu/components/carousel/cardcomponent/index.jsx index 5a3909e..1519f58 100644 --- a/src/menu/components/carousel/cardcomponent/index.jsx +++ b/src/menu/components/carousel/cardcomponent/index.jsx @@ -8,7 +8,7 @@ import zhCN from '@/locales/zh-CN/model.js' import enUS from '@/locales/en-US/model.js' import SettingForm from './settingform' - +import { resetStyle } from '@/utils/utils-custom.js' import Utils from '@/utils/utils.js' import MKEmitter from '@/utils/events.js' import './index.scss' @@ -176,6 +176,7 @@ _style.boxShadow = '0 0 4px ' + _style.shadow } _style.height = cards.style.height + _style = resetStyle(_style) return ( <div className="card-item" style={_style} onClick={this.clickComponent} id={card.uuid}> diff --git a/src/menu/components/carousel/data-card/index.jsx b/src/menu/components/carousel/data-card/index.jsx index df2cf25..e69ebc9 100644 --- a/src/menu/components/carousel/data-card/index.jsx +++ b/src/menu/components/carousel/data-card/index.jsx @@ -5,7 +5,7 @@ import asyncComponent from '@/utils/asyncComponent' import asyncIconComponent from '@/utils/asyncIconComponent' - +import { resetStyle } from '@/utils/utils-custom.js' import MKEmitter from '@/utils/events.js' import Utils from '@/utils/utils.js' import zhCN from '@/locales/zh-CN/model.js' @@ -251,9 +251,10 @@ render() { const { card } = this.state + let _style = resetStyle(card.style) return ( - <div className="menu-data-carousel-edit-box" style={{...card.style}} onClick={this.clickComponent} id={card.uuid}> + <div className="menu-data-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"> <WrapComponent config={card} updateConfig={this.updateComponent}/> diff --git a/src/menu/components/carousel/prop-card/index.jsx b/src/menu/components/carousel/prop-card/index.jsx index b1f7abf..c3f565b 100644 --- a/src/menu/components/carousel/prop-card/index.jsx +++ b/src/menu/components/carousel/prop-card/index.jsx @@ -5,7 +5,7 @@ import asyncComponent from '@/utils/asyncComponent' import asyncIconComponent from '@/utils/asyncIconComponent' - +import { resetStyle } from '@/utils/utils-custom.js' import MKEmitter from '@/utils/events.js' import Utils from '@/utils/utils.js' import zhCN from '@/locales/zh-CN/model.js' @@ -328,9 +328,10 @@ render() { const { card } = this.state + let _style = resetStyle(card.style) return ( - <div className="menu-prop-carousel-edit-box" style={{...card.style}} onClick={this.clickComponent} id={card.uuid}> + <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" /> diff --git a/src/menu/components/chart/antv-bar/index.jsx b/src/menu/components/chart/antv-bar/index.jsx index 40cfcf1..1ad2bbf 100644 --- a/src/menu/components/chart/antv-bar/index.jsx +++ b/src/menu/components/chart/antv-bar/index.jsx @@ -8,7 +8,7 @@ import MKEmitter from '@/utils/events.js' import asyncComponent from '@/utils/asyncComponent' import asyncIconComponent from '@/utils/asyncIconComponent' - +import { resetStyle } from '@/utils/utils-custom.js' import Utils from '@/utils/utils.js' import { chartColors } from '@/utils/option.js' import zhCN from '@/locales/zh-CN/model.js' @@ -876,9 +876,10 @@ render() { const { card } = this.state + let _style = resetStyle(card.style) return ( - <div className="menu-line-chart-edit-box" style={{...card.style, height: card.plot.height || 400}} onClick={this.clickComponent} id={card.uuid}> + <div className="menu-line-chart-edit-box" style={{..._style, height: card.plot.height || 400}} onClick={this.clickComponent} id={card.uuid}> <NormalHeader config={card} updateComponent={this.updateComponent}/> <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> diff --git a/src/menu/components/chart/antv-pie/index.jsx b/src/menu/components/chart/antv-pie/index.jsx index 374720a..7207459 100644 --- a/src/menu/components/chart/antv-pie/index.jsx +++ b/src/menu/components/chart/antv-pie/index.jsx @@ -8,7 +8,7 @@ import MKEmitter from '@/utils/events.js' import asyncComponent from '@/utils/asyncComponent' import asyncIconComponent from '@/utils/asyncIconComponent' - +import { resetStyle } from '@/utils/utils-custom.js' import Utils from '@/utils/utils.js' import zhCN from '@/locales/zh-CN/model.js' import enUS from '@/locales/en-US/model.js' @@ -445,9 +445,10 @@ render() { const { card } = this.state + let _style = resetStyle(card.style) return ( - <div className="menu-pie-chart-edit-box" style={{...card.style, height: card.plot.height || 400}} onClick={this.clickComponent} id={card.uuid}> + <div className="menu-pie-chart-edit-box" style={{..._style, height: card.plot.height || 400}} onClick={this.clickComponent} id={card.uuid}> <NormalHeader config={card} updateComponent={this.updateComponent}/> <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> diff --git a/src/menu/components/code/sandbox/index.jsx b/src/menu/components/code/sandbox/index.jsx index 7e1fb66..e125817 100644 --- a/src/menu/components/code/sandbox/index.jsx +++ b/src/menu/components/code/sandbox/index.jsx @@ -5,7 +5,7 @@ import asyncComponent from '@/utils/asyncComponent' import asyncIconComponent from '@/utils/asyncIconComponent' - +import { resetStyle } from '@/utils/utils-custom.js' import MKEmitter from '@/utils/events.js' import zhCN from '@/locales/zh-CN/model.js' import enUS from '@/locales/en-US/model.js' @@ -152,8 +152,10 @@ render() { const { card } = this.state + let _style = resetStyle(card.style) + return ( - <div className="menu-editor-sand-box" style={{...card.style}} onClick={this.clickComponent} id={card.uuid}> + <div className="menu-editor-sand-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"> <WrapComponent config={card} updateConfig={this.updateComponent} /> diff --git a/src/menu/components/group/normal-group/index.jsx b/src/menu/components/group/normal-group/index.jsx index c6021fa..aeb5715 100644 --- a/src/menu/components/group/normal-group/index.jsx +++ b/src/menu/components/group/normal-group/index.jsx @@ -6,7 +6,7 @@ import MKEmitter from '@/utils/events.js' import asyncComponent from '@/utils/asyncComponent' import asyncIconComponent from '@/utils/asyncIconComponent' - +import { resetStyle } from '@/utils/utils-custom.js' import zhCN from '@/locales/zh-CN/model.js' import enUS from '@/locales/en-US/model.js' import './index.scss' @@ -161,9 +161,10 @@ render() { const { group } = this.state + let _style = resetStyle(group.style) return ( - <div className="menu-group-edit-box" style={group.style} onClick={this.clickComponent} id={group.uuid}> + <div className="menu-group-edit-box" style={_style} onClick={this.clickComponent} id={group.uuid}> <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> <SettingComponent config={group} updateConfig={this.updateComponent} /> diff --git a/src/menu/components/search/main-search/index.jsx b/src/menu/components/search/main-search/index.jsx index 0ab9015..ae2e5b9 100644 --- a/src/menu/components/search/main-search/index.jsx +++ b/src/menu/components/search/main-search/index.jsx @@ -9,7 +9,7 @@ import zhCN from '@/locales/zh-CN/model.js' import enUS from '@/locales/en-US/model.js' import { getSearchForm } from '@/templates/zshare/formconfig' - +import { resetStyle } from '@/utils/utils-custom.js' import asyncIconComponent from '@/utils/asyncIconComponent' import SearchForm from '@/templates/sharecomponent/searchcomponent/searchform' import DragElement from './dragsearch' @@ -348,9 +348,10 @@ render() { const { dict, card, visible, sqlVerifing } = this.state + let _style = resetStyle(card.style) return ( - <div className={`main-search-edit-list ${card.wrap.float} ${card.wrap.show || ''}`} onClick={this.clickComponent} id={card.uuid} style={card.style}> + <div className={`main-search-edit-list ${card.wrap.float} ${card.wrap.show || ''}`} onClick={this.clickComponent} id={card.uuid} style={_style}> <DragElement list={card.search} handleList={this.handleList} diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx index f7494bf..674fafa 100644 --- a/src/menu/components/share/actioncomponent/actionform/index.jsx +++ b/src/menu/components/share/actioncomponent/actionform/index.jsx @@ -8,15 +8,15 @@ const { TextArea } = Input const actionTypeOptions = { - pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width'], - prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width'], - exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width'], - excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'sheet', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width'], - excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'execSuccess', 'execError', 'syncComponent', 'resetPageIndex', 'pagination', 'search', 'width'], - popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'popClose', 'resetPageIndex', 'width'], - tab: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'linkmenu', 'width'], - innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'icon', 'class', 'width', 'open'], - funcbutton: ['label', 'OpenType', 'funcType', 'show', 'icon', 'class', 'width'] + pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width', 'controlField', 'controlVal'], + prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width', 'controlField', 'controlVal'], + exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width', 'controlField', 'controlVal'], + excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'sheet', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width', 'controlField', 'controlVal'], + excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'execSuccess', 'execError', 'syncComponent', 'resetPageIndex', 'pagination', 'search', 'width', 'controlField', 'controlVal'], + popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'popClose', 'resetPageIndex', 'width', 'controlField', 'controlVal'], + tab: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'linkmenu', 'width', 'controlField', 'controlVal'], + innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'icon', 'class', 'width', 'open', 'controlField', 'controlVal'], + funcbutton: ['label', 'OpenType', 'funcType', 'show', 'icon', 'class', 'width', 'controlField', 'controlVal'] } class ActionForm extends Component { @@ -528,8 +528,8 @@ getPopupContainer={() => document.getElementById('winter')} > {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} + <Select.Option id={index} key={index} value={option.value || option.field}> + {item.key === 'icon' && option.value ? <Icon type={option.value} /> : ''} {option.text || option.label} </Select.Option> )} </Select> diff --git a/src/menu/components/share/actioncomponent/dragaction/card.jsx b/src/menu/components/share/actioncomponent/dragaction/card.jsx index 8bdf734..e3952e1 100644 --- a/src/menu/components/share/actioncomponent/dragaction/card.jsx +++ b/src/menu/components/share/actioncomponent/dragaction/card.jsx @@ -1,6 +1,7 @@ import React from 'react' import { useDrag, useDrop } from 'react-dnd' import { Icon, Button, Popover } from 'antd' +import { resetStyle } from '@/utils/utils-custom.js' import './index.scss' const Card = ({ id, card, moveCard, findCard, editCard, delCard, copyCard, changeStyle, profileCard, doubleClickCard }) => { @@ -36,12 +37,13 @@ } let btnElement = null + let _style = resetStyle(card.btnstyle) if (card.show === 'icon') { btnElement = ( <Button type="link" icon={card.icon} - style={card.btnstyle} + style={_style} onDoubleClick={() => doubleClickCard(id)} >{card.icon ? '' : card.label}</Button> ) @@ -49,7 +51,7 @@ btnElement = ( <Button type="link" - style={card.btnstyle} + style={_style} onDoubleClick={() => doubleClickCard(id)} >{card.label}{card.icon ? <Icon type={card.icon}/> : null}</Button> ) @@ -57,7 +59,7 @@ btnElement = ( <Button icon={card.icon} - style={card.btnstyle} + style={_style} onDoubleClick={() => doubleClickCard(id)} > {card.label} diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index 6d9fab1..fbf2524 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -11,7 +11,7 @@ * @param {*} usefulFields 瀛樺偍杩囩▼鍙敤鐨勫紑濮嬪瓧娈� * @param {*} type 鎸夐挳绫诲瀷锛岀敤浜庡尯鍒嗗彲閫夌殑鎵撳紑鏂瑰紡 */ -export function getActionForm (card, functip, setting, usefulFields, type, menulist = [], modules = []) { +export function getActionForm (card, functip, setting, usefulFields, type, menulist = [], modules = [], columns = []) { let appMenus = [] let opentypes = [ { @@ -430,7 +430,7 @@ type: 'radio', key: 'show', label: "鏄剧ず涓�", - initVal: card.show || 'icon', + initVal: card.show || 'button', required: true, options: [{ value: 'icon', @@ -515,6 +515,25 @@ initVal: card.syncComponent || [], required: false, options: modules + }, + { + type: 'select', + key: 'controlField', + label: '鎺у埗瀛楁', + tooltip: '鏄剧ず鎺у埗瀛楁锛屽彲鏍规嵁琛屾暟鎹帶鍒舵寜閽槸鍚︽樉绀恒��', + initVal: card.controlField || '', + required: false, + forbid: card.$type !== 'tableButton', + options: [{label: '鏃�', field: ''}, ...columns] + }, + { + type: 'text', + key: 'controlVal', + label: '鎺у埗鍊�', + tooltip: '褰撻�夋嫨鎺у埗瀛楁锛屼笖瀛楁鍊间笌鎺у埗鍊肩浉绛夋椂锛屾寜閽細闅愯棌锛屽涓�肩敤閫楀彿鍒嗛殧銆�', + initVal: card.controlVal || '', + forbid: card.$type !== 'tableButton', + required: false } ] diff --git a/src/menu/components/share/normalheader/index.jsx b/src/menu/components/share/normalheader/index.jsx index d5bc448..adac673 100644 --- a/src/menu/components/share/normalheader/index.jsx +++ b/src/menu/components/share/normalheader/index.jsx @@ -5,6 +5,7 @@ import asyncComponent from '@/utils/asyncComponent' import MKEmitter from '@/utils/events.js' +import { resetStyle } from '@/utils/utils-custom.js' import './index.scss' const SearchComponent = asyncComponent(() => import('@/menu/components/share/searchcomponent')) @@ -61,9 +62,10 @@ show = false } } + let _style = resetStyle(config.headerStyle) return ( - <div className={'normal-header' + (!show ? ' hidden' : '')} style={config.headerStyle}> + <div className={'normal-header' + (!show ? ' hidden' : '')} style={_style}> <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle} type="font-colors" /> diff --git a/src/menu/components/table/normal-table/columns/index.jsx b/src/menu/components/table/normal-table/columns/index.jsx index 2e38088..06139cc 100644 --- a/src/menu/components/table/normal-table/columns/index.jsx +++ b/src/menu/components/table/normal-table/columns/index.jsx @@ -37,13 +37,15 @@ shouldComponentUpdate (nextProps, nextState) { + if (this.props.rowSpan !== nextProps.rowSpan || this.props.colSpan !== nextProps.colSpan) { + return true + } + if (!nextProps.column) return false return !is(fromJS(this.props.column), fromJS(nextProps.column)) || !is(fromJS(this.props.fields), fromJS(nextProps.fields)) || - this.props.index !== nextProps.index || - this.props.rowSpan !== nextProps.rowSpan || - this.props.colSpan !== nextProps.colSpan + this.props.index !== nextProps.index } render() { diff --git a/src/menu/components/table/normal-table/index.jsx b/src/menu/components/table/normal-table/index.jsx index cd1a336..adc9766 100644 --- a/src/menu/components/table/normal-table/index.jsx +++ b/src/menu/components/table/normal-table/index.jsx @@ -5,7 +5,7 @@ import asyncComponent from '@/utils/asyncComponent' import asyncIconComponent from '@/utils/asyncIconComponent' - +import { resetStyle } from '@/utils/utils-custom.js' import MKEmitter from '@/utils/events.js' import Utils from '@/utils/utils.js' import zhCN from '@/locales/zh-CN/model.js' @@ -379,9 +379,10 @@ render() { const { card } = this.state + let _style = resetStyle(card.style) return ( - <div className="menu-normal-table-edit-box" style={{...card.style, height: card.wrap.height}} onClick={this.clickComponent} id={card.uuid}> + <div className="menu-normal-table-edit-box" style={_style} onClick={this.clickComponent} id={card.uuid}> <NormalHeader defaultshow="hidden" hideSearch="true" config={card} updateComponent={this.updateComponent}/> <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> diff --git a/src/menu/components/tabs/antv-tabs/index.jsx b/src/menu/components/tabs/antv-tabs/index.jsx index 3879bea..8ad03f7 100644 --- a/src/menu/components/tabs/antv-tabs/index.jsx +++ b/src/menu/components/tabs/antv-tabs/index.jsx @@ -7,7 +7,7 @@ import asyncComponent from '@/utils/asyncComponent' import asyncIconComponent from '@/utils/asyncIconComponent' import DraggableTabs from './dragabletabs' - +import { resetStyle } from '@/utils/utils-custom.js' import Utils from '@/utils/utils.js' import zhCN from '@/locales/zh-CN/model.js' import enUS from '@/locales/en-US/model.js' @@ -297,8 +297,10 @@ render() { const { tabs, dict, labelvisible, editab } = this.state + let _style = resetStyle(tabs.style) + return ( - <div className="menu-tabs-edit-box" style={tabs.style} onClick={this.clickComponent} id={tabs.uuid}> + <div className="menu-tabs-edit-box" 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={ diff --git a/src/mob/mobshell/card.jsx b/src/mob/mobshell/card.jsx index 30225a7..a034fe3 100644 --- a/src/mob/mobshell/card.jsx +++ b/src/mob/mobshell/card.jsx @@ -17,6 +17,7 @@ const NormalForm = asyncComponent(() => import('@/menu/components/form/normal-form')) const NormalGroup = asyncComponent(() => import('@/menu/components/group/normal-group')) const CodeSandbox = asyncComponent(() => import('@/menu/components/code/sandbox')) +const NormalLogin = asyncComponent(() => import('@/pc/components/login/normal-login')) const Card = ({ id, card, moveCard, findCard, delCard, updateConfig }) => { const originalIndex = findCard(id).index @@ -78,6 +79,20 @@ return (<NormalGroup group={card} updateConfig={updateConfig} deletecomponent={delCard}/>) } else if (card.type === 'code') { return (<CodeSandbox card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) + } else if (card.type === 'login') { + let height = '' + if (card.wrap && card.wrap.height) { + height = card.wrap.height.replace(/\d+vw/ig, (word) => { + return parseFloat(word) * 350 / 100 + 'px' + }).replace(/\d+vh/ig, (word) => { + return parseFloat(word) * 615 / 100 + 'px' + }) + } + + return (<> + <NormalLogin card={card} updateConfig={updateConfig} deletecomponent={delCard}/> + <div style={{float: 'right', height}}></div> + </>) } } return ( diff --git a/src/mob/mobshell/index.jsx b/src/mob/mobshell/index.jsx index ee23621..7a0dc49 100644 --- a/src/mob/mobshell/index.jsx +++ b/src/mob/mobshell/index.jsx @@ -93,7 +93,8 @@ code: '鑷畾涔�', carousel: '杞挱', form: '琛ㄥ崟', - card: '鍗$墖' + card: '鍗$墖', + login: '鐧诲綍' } let i = 1 diff --git a/src/mob/modulesource/option.jsx b/src/mob/modulesource/option.jsx index 6260773..cf25dae 100644 --- a/src/mob/modulesource/option.jsx +++ b/src/mob/modulesource/option.jsx @@ -17,6 +17,7 @@ import Carousel from '@/assets/mobimg/carousel.png' import Carousel1 from '@/assets/mobimg/carousel1.png' import form from '@/assets/mobimg/form.png' +import Login from '@/assets/mobimg/login.png' // 缁勪欢閰嶇疆淇℃伅 export const menuOptions = [ @@ -39,4 +40,5 @@ { type: 'menu', url: SandBox, component: 'code', subtype: 'sandbox', title: '鑷畾涔�', width: 24 }, { type: 'menu', url: Pie2, component: 'pie', subtype: 'nightingale', title: '鍗椾竵鏍煎皵鍥�', width: 24 }, { type: 'menu', url: group, component: 'group', subtype: 'normalgroup', title: '鍒嗙粍', width: 24 }, + { type: 'menu', url: Login, component: 'login', subtype: 'normallogin', title: '鐧诲綍', width: 24 }, ] diff --git a/src/pc/components/login/normal-login/index.jsx b/src/pc/components/login/normal-login/index.jsx index 9c364e4..3fe8cea 100644 --- a/src/pc/components/login/normal-login/index.jsx +++ b/src/pc/components/login/normal-login/index.jsx @@ -9,6 +9,7 @@ import MKEmitter from '@/utils/events.js' import zhCN from '@/locales/zh-CN/model.js' import enUS from '@/locales/en-US/model.js' +import { resetStyle } from '@/utils/utils-custom.js' import './index.scss' const LoginForm = asyncComponent(() => import('./loginform')) @@ -31,6 +32,7 @@ const { card } = this.props if (card.isNew) { + let ismob = sessionStorage.getItem('appType') === 'mob' let _card = { uuid: card.uuid, type: card.type, @@ -41,12 +43,20 @@ width: card.width || 24, name: card.name, subtype: card.subtype, - wrap: { name: card.name, width: card.width || 24, loginWays: ['uname_pwd', 'sms_vcode'] }, - style: { background: '#ffffff', width: '330px', borderRadius: '4px', marginLeft: '55vw' }, + wrap: { name: card.name, width: card.width || 24, loginWays: ['uname_pwd'] }, + style: { background: '#ffffff', width: '330px', borderRadius: '4px', marginLeft: '55vw'}, loginWays: [ {type: 'uname_pwd', label: '璐﹀彿瀵嗙爜', remember: 'true', labelStyle: {}, submitStyle: {}, submitLabel: '鐧诲綍'}, {type: 'sms_vcode', label: '鐭俊楠岃瘉鐮�', labelStyle: {}, submitStyle: {}, submitLabel: '鐧诲綍'} ] + } + + if (ismob) { + delete _card.style.width + delete _card.style.borderRadius + delete _card.style.marginLeft + + _card.style.paddingTop = '20px' } if (card.config) { @@ -128,9 +138,10 @@ render() { const { card, dict } = this.state + let style = resetStyle(card.style) return ( - <div className="login-edit-box" style={{...card.style}} onClick={this.clickComponent} id={card.uuid}> + <div className="login-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"> <WrapComponent config={card} updateConfig={this.updateComponent} /> @@ -140,7 +151,7 @@ } trigger="hover"> <Icon type="tool" /> </Popover> - <LoginForm loginWays={card.loginWays} wrap={card.wrap} dict={dict} /> + <LoginForm loginWays={card.loginWays} wrap={card.wrap} menuId={card.uuid} dict={dict} /> </div> ) } diff --git a/src/pc/components/login/normal-login/index.scss b/src/pc/components/login/normal-login/index.scss index 86f8784..85ad49e 100644 --- a/src/pc/components/login/normal-login/index.scss +++ b/src/pc/components/login/normal-login/index.scss @@ -103,3 +103,16 @@ z-index: 1; box-shadow: 0px 0px 4px #1890ff; } + +.mk-mob-view .login-edit-box { + display: block; + .login-way-wrap.simple { + display: none; + } + .ant-input { + border: 0; + border-radius: 0; + border-bottom: 1px solid #d9d9d9; + box-shadow: none!important; + } +} diff --git a/src/pc/components/login/normal-login/loginform.jsx b/src/pc/components/login/normal-login/loginform.jsx index 5090a1b..ddfe4a1 100644 --- a/src/pc/components/login/normal-login/loginform.jsx +++ b/src/pc/components/login/normal-login/loginform.jsx @@ -3,11 +3,13 @@ import { is, fromJS } from 'immutable' import { Form, Icon, Input, Button, Checkbox } from 'antd' +import MKEmitter from '@/utils/events.js' import './index.scss' class LoginTabForm extends Component { static propTpyes = { dict: PropTypes.object, + menuId: PropTypes.string, loginWays: PropTypes.array, wrap: PropTypes.array, } @@ -55,6 +57,18 @@ this.setState({activeWay}) } + changeMenu = () => { + const { wrap, menuId } = this.props + + MKEmitter.emit('changeEditMenu', { + fixed: false, + MenuID: wrap.link === 'linkmenu' ? wrap.linkmenu : menuId, + copyMenuId: '', + MenuNo: '', + MenuName: '' + }) + } + /** * @description 缁勪欢閿�姣侊紝娓呴櫎state鏇存柊 */ @@ -89,7 +103,7 @@ <Checkbox>璁颁綇瀵嗙爜</Checkbox> </Form.Item> <Form.Item className="btn-login"> - <Button type="primary" htmlType="submit" className="login-form-button"> + <Button type="primary" onDoubleClick={() => this.changeMenu()} className="login-form-button"> 鐧诲綍 </Button> </Form.Item> @@ -113,7 +127,7 @@ /> </Form.Item> <Form.Item className="btn-login"> - <Button type="primary" htmlType="submit" className="login-form-button"> + <Button type="primary" onDoubleClick={() => this.changeMenu()} className="login-form-button"> 鐧诲綍 </Button> </Form.Item> diff --git a/src/pc/components/login/wrapsetting/settingform/index.jsx b/src/pc/components/login/wrapsetting/settingform/index.jsx index 8b3269c..ca13442 100644 --- a/src/pc/components/login/wrapsetting/settingform/index.jsx +++ b/src/pc/components/login/wrapsetting/settingform/index.jsx @@ -1,6 +1,6 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { Form, Row, Col, Input, Tooltip, Icon, InputNumber, Select, Checkbox, notification } from 'antd' +import { Form, Row, Col, Input, Tooltip, Icon, InputNumber, Select, Checkbox, notification, Radio } from 'antd' import StyleInput from '@/menu/stylecontroller/styleInput' import './index.scss' @@ -14,7 +14,9 @@ state = { roleList: [], - msgTemps: [] + msgTemps: [], + appMenus: [], + link: this.props.wrap.link || 'menu' } UNSAFE_componentWillMount () { @@ -41,7 +43,18 @@ msgTemps = [] } - this.setState({roleList, msgTemps}) + let appMenus = sessionStorage.getItem('appMenus') + if (appMenus) { + try { + appMenus = JSON.parse(appMenus) + } catch { + appMenus = [] + } + } else { + appMenus = [] + } + + this.setState({roleList, msgTemps, appMenus}) } handleConfirm = () => { @@ -76,7 +89,7 @@ render() { const { wrap } = this.props const { getFieldDecorator } = this.props.form - const { roleList, msgTemps } = this.state + const { roleList, msgTemps, appMenus, link } = this.state const formItemLayout = { labelCol: { @@ -161,6 +174,40 @@ })(<StyleInput options={['px', 'vh', 'vw', '%']}/>)} </Form.Item> </Col> + <Col span={12}> + <Form.Item label="閾炬帴"> + {getFieldDecorator('link', { + initialValue: wrap.link || 'menu' + })( + <Radio.Group onChange={(e) => this.setState({link: e.target.value})}> + <Radio key="menu" value="menu"> 鑿滃崟 </Radio> + <Radio key="linkmenu" value="linkmenu"> 鍏宠仈鑿滃崟 </Radio> + </Radio.Group> + )} + </Form.Item> + </Col> + {link === 'linkmenu' ? <Col span={12}> + <Form.Item label="鍏宠仈鑿滃崟"> + {getFieldDecorator('linkmenu', { + initialValue: wrap.linkmenu || '', + rules: [ + { + required: true, + message: this.props.dict['form.required.select'] + '鑿滃崟!' + } + ] + })( + <Select + showSearch + filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} + > + {appMenus.map(option => + <Select.Option key={option.MenuID} value={option.MenuID}>{option.MenuName}</Select.Option> + )} + </Select> + )} + </Form.Item> + </Col> : null} {/* $楠岃瘉鐮�$ $mob$ $send_type$ */} <Col span={12}> <Form.Item label={ diff --git a/src/pc/components/navbar/normal-navbar/wrapsetting/settingform/index.jsx b/src/pc/components/navbar/normal-navbar/wrapsetting/settingform/index.jsx index b5d097d..eef3aa1 100644 --- a/src/pc/components/navbar/normal-navbar/wrapsetting/settingform/index.jsx +++ b/src/pc/components/navbar/normal-navbar/wrapsetting/settingform/index.jsx @@ -174,6 +174,23 @@ )} </Form.Item> </Col> + <Col span={12}> + <Form.Item label={ + <Tooltip placement="topLeft" title="榛樿闅愯棌鑿滃崟鏍忥紝榧犳爣鍦ㄩ潬杩戦《閮ㄦ椂鏄剧ず銆�"> + <Icon type="question-circle" /> + 鎮诞鏄剧ず + </Tooltip> + }> + {getFieldDecorator('hover', { + initialValue: wrap.hover || 'false' + })( + <Radio.Group> + <Radio value="true">鍚敤</Radio> + <Radio value="false">涓嶅惎鐢�</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> </Row> </Form> </div> diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx index 62deb90..def201a 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.jsx +++ b/src/tabviews/custom/components/card/cardcellList/index.jsx @@ -535,6 +535,13 @@ </Col> ) } else if (card.eleType === 'button') { + if (card.$type === 'tableButton' && card.controlField) { // 琛ㄦ牸涓寜閽殣钘忔帶鍒� + if (data[card.controlField] === card.controlVal) { + return null + } else if (card.controlVal && card.controlVal.split(',').includes(data[card.controlField])) { + return null + } + } if (['exec', 'prompt', 'pop'].includes(card.OpenType)) { return ( <Col key={card.uuid} span={card.width}> @@ -657,6 +664,8 @@ } } } + + return null } render() { diff --git a/src/tabviews/custom/components/card/table-card/index.jsx b/src/tabviews/custom/components/card/table-card/index.jsx index a557611..45ee4dc 100644 --- a/src/tabviews/custom/components/card/table-card/index.jsx +++ b/src/tabviews/custom/components/card/table-card/index.jsx @@ -69,9 +69,9 @@ } if (_config.setting.laypage) { - _config.wrap.contentHeight = _config.wrap.height - (showHeader ? 85 : 40) + _config.wrap.contentHeight = showHeader ? 'calc(100% - 85px)' : 'calc(100% - 40px)' } else { - _config.wrap.contentHeight = _config.wrap.height - (showHeader ? 45 : 0) + _config.wrap.contentHeight = showHeader ? 'calc(100% - 45px)' : '100%' } _config.columns.forEach(item => { @@ -343,7 +343,7 @@ const { config, loading, data, BID, pageIndex, preIndex, total } = this.state return ( - <div className="custom-table-card-box" style={{...config.style, height: config.wrap.height}}> + <div className="custom-table-card-box" style={{...config.style}}> {loading ? <div className="loading-mask"> {data ? <div className="ant-spin-blur"></div> : null} diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx index 355f5e4..6fb6711 100644 --- a/src/tabviews/custom/index.jsx +++ b/src/tabviews/custom/index.jsx @@ -519,7 +519,7 @@ cell.syncComponentId = cell.syncComponent ? cell.syncComponent.pop() : '' cell.$menuId = item.uuid cell.$tabId = tabId - cell.$type = 'CustomPage' + cell.$view = 'CustomPage' if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 鎵撳嵃鏈鸿缃� cell = this.getPrinter(cell, item.uuid) @@ -545,7 +545,7 @@ cell.syncComponentId = cell.syncComponent ? cell.syncComponent.pop() : '' cell.$menuId = item.uuid cell.$tabId = tabId - cell.$type = 'CustomPage' + cell.$view = 'CustomPage' if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 鎵撳嵃鏈鸿缃� cell = this.getPrinter(cell, item.uuid) @@ -564,7 +564,7 @@ cell.syncComponentId = cell.syncComponent ? cell.syncComponent.pop() : '' cell.$menuId = item.uuid cell.$tabId = tabId - cell.$type = 'CustomPage' + cell.$view = 'CustomPage' if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 鎵撳嵃鏈鸿缃� cell = this.getPrinter(cell, item.uuid) @@ -586,7 +586,7 @@ cell.syncComponentId = cell.syncComponent ? cell.syncComponent.pop() : '' cell.$menuId = item.uuid cell.$tabId = tabId - cell.$type = 'CustomPage' + cell.$view = 'CustomPage' if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 鎵撳嵃鏈鸿缃� cell = this.getPrinter(cell, item.uuid) @@ -607,7 +607,7 @@ cell.syncComponentId = cell.syncComponent ? cell.syncComponent.pop() : '' cell.$menuId = item.uuid cell.$tabId = tabId - cell.$type = 'CustomPage' + cell.$view = 'CustomPage' if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 鎵撳嵃鏈鸿缃� cell = this.getPrinter(cell, item.uuid) diff --git a/src/tabviews/zshare/actionList/popupbutton/index.jsx b/src/tabviews/zshare/actionList/popupbutton/index.jsx index 539e70c..186f741 100644 --- a/src/tabviews/zshare/actionList/popupbutton/index.jsx +++ b/src/tabviews/zshare/actionList/popupbutton/index.jsx @@ -75,7 +75,7 @@ if (btn.uuid !== tabId) return - if (btn.$type === 'CustomPage') { + if (btn.$view === 'CustomPage') { if (btn.popClose !== 'never') { MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.popClose, btn) } @@ -187,7 +187,7 @@ onClick={() => {this.actionTrigger()}} >{show === 'icon' && btn.icon ? '' : btn.label}</Button> : null} <Modal - className={'popview-modal ' + (btn.$type === 'CustomPage' ? 'custom-popview' : '')} + className={'popview-modal ' + (btn.$view === 'CustomPage' ? 'custom-popview' : '')} title={btn.label} width={'85vw'} maskClosable={false} @@ -198,14 +198,14 @@ ]} destroyOnClose > - {btn.$type !== 'CustomPage' ? <SubTabTable + {btn.$view !== 'CustomPage' ? <SubTabTable Tab={btn} MenuID={btn.linkTab} SupMenuID={this.props.MenuID} BID={popData ? primaryId : this.props.BID} BData={popData || this.props.BData} /> : null} - {btn.$type === 'CustomPage' ? <CustomPage Tab={btn} MenuID={btn.uuid} param={{BID: (popData ? primaryId : this.props.BID), data: (popData || this.props.BData)}} /> : null} + {btn.$view === 'CustomPage' ? <CustomPage Tab={btn} MenuID={btn.uuid} param={{BID: (popData ? primaryId : this.props.BID), data: (popData || this.props.BData)}} /> : null} </Modal> </div> ) diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js index e991da4..bb79085 100644 --- a/src/utils/utils-custom.js +++ b/src/utils/utils-custom.js @@ -366,4 +366,25 @@ return item }) } +} + +/** + * @description 閲嶇疆绉诲姩绔痵tyle + * @return {Object} style + */ +export function resetStyle (style) { + if (sessionStorage.getItem('appType') === 'mob' && style) { + let _style = JSON.stringify(style) + + _style = _style.replace(/\d+vw/ig, (word) => { + return parseFloat(word) * 350 / 100 + 'px' + }).replace(/\d+vh/ig, (word) => { + return parseFloat(word) * 615 / 100 + 'px' + }) + + return JSON.parse(_style) + } else { + return style + } + } \ No newline at end of file diff --git a/src/views/login/loginform.jsx b/src/views/login/loginform.jsx index 9b90d19..db3e842 100644 --- a/src/views/login/loginform.jsx +++ b/src/views/login/loginform.jsx @@ -364,7 +364,7 @@ {this.props.dict['login.submit']} </Button> </Form.Item> : null} - {options.sysType === 'cloud' ? <Form.Item className="register-line"> + {options.sysType === 'cloud' && options.cdomain.indexOf('mk9h') > -1 ? <Form.Item className="register-line"> <a href="http://minkesoft.com/#/signup" target="_blank" rel="noopener noreferrer" className="register">娉ㄥ唽</a> <a href="http://minkesoft.com/#/forgotPwd" target="_blank" rel="noopener noreferrer" className="forgot">蹇樿瀵嗙爜锛�</a> </Form.Item> : null} diff --git a/src/views/menudesign/index.jsx b/src/views/menudesign/index.jsx index d474522..199ef51 100644 --- a/src/views/menudesign/index.jsx +++ b/src/views/menudesign/index.jsx @@ -914,10 +914,6 @@ MenuNo={MenuNo} updateConfig={this.updateConfig} /> : null} - {config && MenuType === 'custom' ? <UrlFieldComponent - config={config} - updateConfig={this.updateConfig} - /> : null} {config && MenuType === 'home' ? <HomeForm dict={dict} config={config} @@ -928,6 +924,10 @@ config={config} updateConfig={this.updateConfig} /> : null} + {config ? <UrlFieldComponent + config={config} + updateConfig={this.updateConfig} + /> : null} {/* 琛ㄥ悕娣诲姞 */} {config ? <TableComponent config={config} updatetable={this.updateConfig}/> : null} </Panel> diff --git a/src/views/mobdesign/index.scss b/src/views/mobdesign/index.scss index 7699f0b..ebf2ae3 100644 --- a/src/views/mobdesign/index.scss +++ b/src/views/mobdesign/index.scss @@ -103,7 +103,7 @@ } } .mob-shell { - width: 375px; + width: 376px; height: 680px; margin: 0 auto; background: #000000; -- Gitblit v1.8.0