From 274c4c5bff973a26b6bcf9d0c6708cb0518b1b12 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 14 五月 2021 17:54:28 +0800 Subject: [PATCH] 2021-05-14 --- src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx | 13 ++++-- src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx | 10 ++-- src/menu/components/card/table-card/index.jsx | 10 +++-- src/mob/mobshell/index.jsx | 6 +- src/tabviews/custom/components/carousel/data-card/index.scss | 1 src/menu/components/card/data-card/index.jsx | 4 + src/pc/quotecomponent/index.jsx | 2 src/menu/components/share/mobPagination/index.jsx | 20 ++++++++++ src/menu/components/share/mobPagination/index.scss | 14 +++++++ src/tabviews/custom/components/carousel/prop-card/index.scss | 1 src/menu/components/carousel/data-card/wrapsetting/settingform/index.jsx | 23 +++++++++-- src/menu/components/card/data-card/index.scss | 9 ++++ src/mob/mobshell/index.scss | 7 ++- 13 files changed, 95 insertions(+), 25 deletions(-) diff --git a/src/menu/components/card/data-card/index.jsx b/src/menu/components/card/data-card/index.jsx index 2bd98ab..30d870d 100644 --- a/src/menu/components/card/data-card/index.jsx +++ b/src/menu/components/card/data-card/index.jsx @@ -15,6 +15,7 @@ const SettingComponent = asyncIconComponent(() => import('@/menu/datasource')) const WrapComponent = asyncIconComponent(() => import('./wrapsetting')) const CardComponent = asyncComponent(() => import('../cardcomponent')) +const MobPagination = asyncIconComponent(() => import('@/menu/components/share/mobPagination')) const LogComponent = asyncIconComponent(() => import('@/menu/components/share/logcomponent')) const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent')) const UserComponent = asyncIconComponent(() => import('@/menu/components/share/usercomponent')) @@ -420,7 +421,8 @@ <ActionComponent config={card} setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/> {card.subcards.map((subcard, index) => (<CardComponent key={subcard.uuid} offset={!index ? offset : 0} cards={card} card={subcard} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))} <div style={{clear: 'both'}}></div> - {card.wrap.pagestyle === 'page' && card.setting.laypage === 'true' ? <Pagination total={85} size="small" showTotal={total => `鍏� ${total} 鏉} pageSize={20} defaultCurrent={1}/> : null} + {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> ) } diff --git a/src/menu/components/card/data-card/index.scss b/src/menu/components/card/data-card/index.scss index 6346310..3006311 100644 --- a/src/menu/components/card/data-card/index.scss +++ b/src/menu/components/card/data-card/index.scss @@ -75,6 +75,15 @@ line-height: 55px; } } + .normal-pagination { + .am-button::before { + display: none; + } + .am-button { + border: none; + font-size: 16px; + } + } } .menu-data-card-edit-box::after { display: block; diff --git a/src/menu/components/card/table-card/index.jsx b/src/menu/components/card/table-card/index.jsx index 4d5b011..9a848be 100644 --- a/src/menu/components/card/table-card/index.jsx +++ b/src/menu/components/card/table-card/index.jsx @@ -15,6 +15,7 @@ const SettingComponent = asyncIconComponent(() => import('@/menu/datasource')) const WrapComponent = asyncIconComponent(() => import('../data-card/wrapsetting')) const CardComponent = asyncComponent(() => import('./cardcomponent')) +const MobPagination = asyncIconComponent(() => import('@/menu/components/share/mobPagination')) const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent')) const PasteComponent = asyncIconComponent(() => import('@/menu/components/share/pastecomponent')) const LogComponent = asyncIconComponent(() => import('@/menu/components/share/logcomponent')) @@ -33,7 +34,7 @@ state = { dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, card: null, - ismob: sessionStorage.getItem('appType') === 'mob', + appType: sessionStorage.getItem('appType'), back: false } @@ -323,7 +324,7 @@ } render() { - const { card, ismob } = this.state + const { card, appType } = this.state let _style = resetStyle(card.style) return ( @@ -332,7 +333,7 @@ <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" /> - {!ismob ? <Icon className="plus" title="娣诲姞鎼滅储" onClick={this.addSearch} type="plus-circle" /> : null} + {appType !== 'mob' ? <Icon className="plus" title="娣诲姞鎼滅储" onClick={this.addSearch} type="plus-circle" /> : null} <WrapComponent config={card} updateConfig={this.updateComponent} /> <CopyComponent type="tablecard" card={card}/> <PasteComponent config={card} options={['cardcell', 'search', 'form']} updateConfig={this.updateComponent} /> @@ -348,7 +349,8 @@ <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' && card.wrap.pagestyle !== 'slide' ? <Pagination size="small" total={50} /> : null} + {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> ) } diff --git a/src/menu/components/carousel/data-card/wrapsetting/settingform/index.jsx b/src/menu/components/carousel/data-card/wrapsetting/settingform/index.jsx index 0007143..21fec41 100644 --- a/src/menu/components/carousel/data-card/wrapsetting/settingform/index.jsx +++ b/src/menu/components/carousel/data-card/wrapsetting/settingform/index.jsx @@ -13,6 +13,7 @@ } state = { + appType: sessionStorage.getItem('appType'), roleList: [] } @@ -55,7 +56,7 @@ render() { const { wrap, config } = this.props const { getFieldDecorator } = this.props.form - const { roleList } = this.state + const { roleList, appType } = this.state const formItemLayout = { labelCol: { @@ -161,7 +162,19 @@ )} </Form.Item> </Col> - <Col span={12}> + {appType === 'mob' ? <Col span={12}> + <Form.Item label="鍨傜洿鏄剧ず"> + {getFieldDecorator('vertical', { + initialValue: wrap.vertical || 'false' + })( + <Radio.Group> + <Radio value="true">鏄�</Radio> + <Radio value="false">鍚�</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> : null} + {appType !== 'mob' ? <Col span={12}> <Form.Item label="鎸囩ず鐐逛綅缃�"> {getFieldDecorator('dotPosition', { initialValue: wrap.dotPosition || 'bottom' @@ -174,8 +187,8 @@ </Radio.Group> )} </Form.Item> - </Col> - <Col span={12}> + </Col> : null} + {appType !== 'mob' ? <Col span={12}> <Form.Item label="鍔ㄧ敾鏁堟灉"> {getFieldDecorator('effect', { initialValue: wrap.effect || 'scrollx' @@ -186,7 +199,7 @@ </Radio.Group> )} </Form.Item> - </Col> + </Col> : null} <Col span={12}> <Form.Item label="榛戝悕鍗�"> {getFieldDecorator('blacklist', { diff --git a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx index 21c83bb..fcfeb2f 100644 --- a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx @@ -11,7 +11,7 @@ let appType = sessionStorage.getItem('appType') let menulist = null - if (appType === 'pc' || appType === 'mob') { + if (appType === 'pc') { menulist = sessionStorage.getItem('appMenus') if (Array.isArray(card.linkmenu)) { card.linkmenu = '' @@ -23,7 +23,7 @@ if (menulist) { try { menulist = JSON.parse(menulist) - if (appType === 'pc' || appType === 'mob') { + if (appType === 'pc') { menulist = menulist.map(item => { item.value = item.MenuID item.text = item.MenuName @@ -109,9 +109,9 @@ key: 'linkmenu', label: '鍏宠仈鑿滃崟', initVal: card.linkmenu || '', - tooltip: '鍙屽嚮楗煎浘锛屼細鎵撳紑鍏宠仈鐨勮彍鍗曘��', + tooltip: '鍙屽嚮鏌辩姸鍥撅紝浼氭墦寮�鍏宠仈鐨勮彍鍗曘��', required: false, - forbid: !(appType === 'pc' || appType === 'mob'), + forbid: appType !== 'pc', options: menulist }, { @@ -120,7 +120,7 @@ label: '鎵撳紑鏂瑰紡', initVal: card.open || 'blank', required: false, - forbid: !(appType === 'pc' || appType === 'mob'), + forbid: appType !== 'pc', options: [ { value: 'blank', text: '鏂扮獥鍙�' }, { value: 'self', text: '褰撳墠绐楀彛' } diff --git a/src/menu/components/share/mobPagination/index.jsx b/src/menu/components/share/mobPagination/index.jsx new file mode 100644 index 0000000..d46c722 --- /dev/null +++ b/src/menu/components/share/mobPagination/index.jsx @@ -0,0 +1,20 @@ +import React, {Component} from 'react' +import { Icon, Pagination } from 'antd-mobile' + +import './index.scss' + +class MobPagination extends Component { + render () { + return ( + <Pagination className="mob-pagination" total={5} + current={1} + locale={{ + prevText: (<span><Icon type="left" />涓婁竴椤�</span>), + nextText: (<span>涓嬩竴椤�<Icon type="right" /></span>), + }} + /> + ) + } +} + +export default MobPagination \ No newline at end of file diff --git a/src/menu/components/share/mobPagination/index.scss b/src/menu/components/share/mobPagination/index.scss new file mode 100644 index 0000000..2537123 --- /dev/null +++ b/src/menu/components/share/mobPagination/index.scss @@ -0,0 +1,14 @@ +.mob-pagination { + .am-button::before { + display: none; + } + .am-button { + border: none; + font-size: 16px; + background: transparent; + .am-icon { + position: relative; + top: 5px; + } + } +} \ No newline at end of file diff --git a/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx b/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx index 0b1f3a0..d745175 100644 --- a/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx +++ b/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx @@ -9,6 +9,7 @@ * @param {Array} menulist // 鑿滃崟鍒楄〃-鐢ㄤ簬瀛楁閫忚 */ export function getColumnForm (card, menulist = [], fields = []) { + let appType = sessionStorage.getItem('appType') let roleList = sessionStorage.getItem('sysRoles') if (roleList) { try { @@ -324,7 +325,8 @@ }, { value: 'linkurl', text: '閾炬帴' - }] + }], + forbidden: appType === 'mob' }, { type: 'cascader', @@ -332,14 +334,16 @@ label: Formdict['model.menu'], initVal: card.linkmenu || [], required: true, - options: menulist + options: menulist, + forbidden: appType === 'mob' }, { type: 'textarea', key: 'linkurl', label: '閾炬帴鍦板潃', initVal: card.linkurl || '', - required: true + required: true, + forbidden: appType === 'mob' }, { type: 'multiselect', @@ -347,7 +351,8 @@ label: '鍏宠仈瀛楁', initVal: card.linkfields || [], required: false, - options: fields + options: fields, + forbidden: appType === 'mob' }, { type: 'multiselect', diff --git a/src/mob/mobshell/index.jsx b/src/mob/mobshell/index.jsx index 1b95799..3b3b89a 100644 --- a/src/mob/mobshell/index.jsx +++ b/src/mob/mobshell/index.jsx @@ -191,10 +191,10 @@ updateConfig={updateConfig} /> ))} + {cards.length === 0 ? + <Empty description="璇锋坊鍔犵粍浠�" /> : null + } </div> - {cards.length === 0 ? - <Empty description="璇锋坊鍔犵粍浠�" /> : null - } </div> ) } diff --git a/src/mob/mobshell/index.scss b/src/mob/mobshell/index.scss index 0836526..cd21f50 100644 --- a/src/mob/mobshell/index.scss +++ b/src/mob/mobshell/index.scss @@ -11,8 +11,11 @@ .mk-component-card { position: relative; } - >.ant-empty { - padding-top: 150px; + >.ant-row { + min-height: 100%; + >.ant-empty { + padding-top: 150px; + } } } .mob-shell-inner::-webkit-scrollbar { diff --git a/src/pc/quotecomponent/index.jsx b/src/pc/quotecomponent/index.jsx index 11426ac..36d5469 100644 --- a/src/pc/quotecomponent/index.jsx +++ b/src/pc/quotecomponent/index.jsx @@ -51,7 +51,7 @@ Api.getSystemConfig({ func: 'sPC_Get_LongParam', TypeCharOne: sessionStorage.getItem('kei_no'), - typename: 'pc', + typename: sessionStorage.getItem('appType') || 'pc', MenuID: res.keys_id }).then(result => { if (!result.status) { diff --git a/src/tabviews/custom/components/carousel/data-card/index.scss b/src/tabviews/custom/components/carousel/data-card/index.scss index 15319b2..eabde18 100644 --- a/src/tabviews/custom/components/carousel/data-card/index.scss +++ b/src/tabviews/custom/components/carousel/data-card/index.scss @@ -4,6 +4,7 @@ background-repeat: no-repeat; background-size: cover; min-height: 30px; + overflow: hidden; .card-item-box { background-position: center center; diff --git a/src/tabviews/custom/components/carousel/prop-card/index.scss b/src/tabviews/custom/components/carousel/prop-card/index.scss index b5e46e6..68b6eb3 100644 --- a/src/tabviews/custom/components/carousel/prop-card/index.scss +++ b/src/tabviews/custom/components/carousel/prop-card/index.scss @@ -5,6 +5,7 @@ background-size: cover; min-height: 30px; position: relative; + overflow: hidden; .card-item-box { position: relative; -- Gitblit v1.8.0