From 7adf0212cd71a8ec604f65ba2c2e9bdfc5dec22d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 13 一月 2023 10:31:38 +0800 Subject: [PATCH] 2023-01-13 --- src/templates/zshare/modalform/index.jsx | 2 src/views/mobdesign/popview/index.scss | 4 src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx | 2 src/menu/components/tree/antd-tree/options.jsx | 2 src/mob/components/sharecode/options.jsx | 2 src/menu/components/share/markcomponent/index.jsx | 1 src/mob/components/tabs/antv-tabs/options.jsx | 3 src/menu/components/card/cardcellcomponent/index.scss | 8 src/menu/components/card/cardcellcomponent/dragaction/action.jsx | 10 src/menu/components/card/balcony/options.jsx | 2 src/tabviews/custom/components/module/voucher/assistTable/index.jsx | 8 src/menu/components/table/edit-table/options.jsx | 2 src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx | 3 src/menu/components/chart/antv-dashboard/chartcompile/formconfig.jsx | 2 src/components/mk-icon/index.jsx | 15 src/menu/datasource/verifycard/index.jsx | 6 src/views/menudesign/popview/menuform/index.jsx | 21 src/tabviews/custom/components/card/cardcellList/index.jsx | 16 src/menu/components/carousel/data-card/options.jsx | 2 src/menu/components/card/data-card/options.jsx | 25 src/tabviews/custom/components/table/normal-table/index.jsx | 8 src/mob/modulesource/index.jsx | 6 src/menu/components/tabs/antv-tabs/options.jsx | 2 src/menu/components/card/cardcomponent/index.jsx | 4 src/templates/modalconfig/dragelement/index.scss | 3 src/tabviews/custom/components/table/edit-table/normalTable/index.jsx | 1 src/components/header/resetpwd/index.jsx | 2 src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx | 3 src/menu/components/share/actioncomponent/actionform/index.jsx | 8 src/views/appmanage/submutilform/index.jsx | 1 src/menu/components/timeline/normal-timeline/options.jsx | 2 src/menu/datasource/verifycard/utils.jsx | 2 src/assets/css/viewstyle.scss | 30 + src/tabviews/zshare/topSearch/index.jsx | 11 src/tabviews/custom/components/chart/antv-G6/index.jsx | 3 src/menu/components/form/simple-form/options.jsx | 2 src/menu/components/chart/antv-scatter/chartcompile/formconfig.jsx | 2 src/tabviews/zshare/actionList/index.jsx | 4 src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx | 3 src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx | 2 src/views/pcdesign/index.jsx | 2 src/templates/modalconfig/settingform/index.jsx | 2 src/pc/components/login/normal-login/loginform.jsx | 2 src/views/mobdesign/popview/index.jsx | 306 ++++++++++++ src/tabviews/custom/components/module/voucher/voucherTable/index.jsx | 1 src/components/keyInterface/index.scss | 2 src/views/systemfunc/sidemenu/config.jsx | 14 src/pc/components/login/normal-login/index.scss | 4 src/views/login/index.jsx | 8 src/components/keyInterface/index.jsx | 19 src/mob/components/navbar/normal-navbar/index.jsx | 2 src/menu/components/editor/braft-editor/options.jsx | 2 src/tabviews/custom/components/share/normalTable/index.scss | 5 src/views/menudesign/homeform/index.jsx | 21 src/views/menudesign/menuform/index.jsx | 21 public/options.json | 10 src/pc/components/login/normal-login/options.jsx | 11 src/templates/sharecomponent/settingcomponent/settingform/index.jsx | 3 src/menu/components/code/sandbox/options.jsx | 2 src/menu/components/iframe/options.jsx | 2 src/tabviews/zshare/actionList/normalbutton/index.jsx | 4 src/views/mobdesign/index.jsx | 130 +++++ src/tabviews/custom/components/card/data-card/index.jsx | 49 + src/views/mobdesign/popview/menuform/index.scss | 0 src/mob/colorsketch/index.jsx | 2 src/tabviews/custom/components/module/voucher/index.jsx | 25 src/menu/components/share/actioncomponent/formconfig.jsx | 74 ++ src/menu/components/group/normal-group/options.jsx | 2 src/menu/pastecontroller/index.jsx | 6 src/menu/components/card/data-card/index.jsx | 7 src/mob/components/menubar/normal-menubar/options.jsx | 3 src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx | 6 src/templates/zshare/createinterface/index.jsx | 2 src/views/appmanage/index.jsx | 3 src/menu/components/search/main-search/options.jsx | 4 src/menu/components/card/cardcomponent/options.jsx | 9 src/tabviews/zshare/normalTable/index.scss | 5 src/components/tabview/index.jsx | 3 src/tabviews/zshare/actionList/index.scss | 2 src/tabviews/custom/components/table/base-table/index.jsx | 4 src/components/normalform/modalform/styleInput/index.jsx | 2 src/menu/components/chart/antv-G6/index.jsx | 3 src/menu/components/table/normal-table/options.jsx | 24 src/views/appcheck/index.jsx | 3 src/views/mobdesign/menuform/index.jsx | 19 src/views/pcdesign/menuform/index.jsx | 21 src/tabviews/custom/components/card/cardItem/index.jsx | 7 src/views/mobdesign/popview/menuform/index.jsx | 117 ++++ src/tabviews/zshare/mutilform/mkColor/index.jsx | 2 src/views/mobdesign/index.scss | 6 src/tabviews/custom/components/share/normalTable/index.jsx | 38 + src/menu/components/form/step-form/options.jsx | 2 src/tabviews/custom/components/card/data-card/index.scss | 2 src/utils/utils.js | 18 src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx | 3 src/views/sso/index.jsx | 2 src/components/normalform/modalform/index.jsx | 1 src/templates/zshare/formconfig.jsx | 17 src/menu/components/table/base-table/options.jsx | 22 src/templates/zshare/verifycard/index.jsx | 4 src/mob/components/navbar/normal-navbar/index.scss | 56 + src/menu/components/chart/chart-custom/chartcompile/formconfig.jsx | 2 src/store/options.js | 2 src/menu/components/module/voucher/voucherTable/index.jsx | 1 src/templates/sharecomponent/searchcomponent/settingform/index.jsx | 2 src/mob/components/navbar/normal-navbar/options.jsx | 58 ++ src/tabviews/custom/components/card/cardcellList/index.scss | 9 src/components/normalform/modalform/styleInput/index.scss | 3 108 files changed, 1,237 insertions(+), 223 deletions(-) diff --git a/public/options.json b/public/options.json index 955db91..dd29f4f 100644 --- a/public/options.json +++ b/public/options.json @@ -1,9 +1,9 @@ { - "appId": "201912101635586033882D350DED94BC08AB8", - "appkey": "2019120316231227060CDBAFCB3BF4582BBF8", + "appId": "202011020835217933120E25C41C54A8988AA", + "appkey": "20201102081641237BDDE0D5F2E98420BA7EC", "mainSystemApi": "https://cloud.positecgroup.com/webapi/dostars", "systemType": "", - "externalDatabase": "", + "externalDatabase": "mkdata_oms_test", "lineColor": "", "filter": "false", "defaultApp": "", @@ -17,6 +17,6 @@ "transfer": "false", "keepPassword": "true", "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"], - "host": "https://css-test.positecgroup.com", - "service": "" + "host": "http://oms-test.positecgroup.com", + "service": "oms_new/" } \ No newline at end of file diff --git a/src/assets/css/viewstyle.scss b/src/assets/css/viewstyle.scss index e3460e3..d18d02f 100644 --- a/src/assets/css/viewstyle.scss +++ b/src/assets/css/viewstyle.scss @@ -74,7 +74,7 @@ > .card-item-box { border-color: $color6!important; background-color: $color1!important; - .ant-mk-text, .ant-mk-date { + .ant-mk-text:not(.sign-font) { color: $color6; } } @@ -84,7 +84,7 @@ .mk-card:hover, .mk-card.active, .mk-card.selected { > .card-item-box { border-color: $color6!important; - .ant-mk-text, .ant-mk-date { + .ant-mk-text:not(.sign-font) { color: $color6; } } @@ -104,7 +104,7 @@ } .mk-card:hover { > .card-item-box { - .ant-mk-text, .ant-mk-date { + .ant-mk-text:not(.sign-font) { color: $color6; } } @@ -112,7 +112,7 @@ .mk-card.active, .mk-card.selected { > .card-item-box { border-bottom-color: $color6!important; - .ant-mk-text, .ant-mk-date { + .ant-mk-text:not(.sign-font) { color: $color6; } } @@ -387,86 +387,108 @@ --mk-sys-font-color: rgba(0, 0, 0, 0.85); --mk-sys-light-font-color: rgba(0, 0, 0, 0.65); } + body[class*='mk-blue-'] { --mk-sys-color: #1890ff; + --mk-sys-color1: #e6f7ff; --mk-sys-color5: #40a9ff; @include viewstyle(#e6f7ff, #bae7ff, #91d5ff, #69c0ff, #40a9ff, #1890ff, #096dd9); } body[class*='mk-red-'] { --mk-sys-color: #f5222d; + --mk-sys-color1: #fff1f0; --mk-sys-color5: #ff4d4f; @include viewstyle(#fff1f0, #ffccc7, #ffa39e, #ff7875, #ff4d4f, #f5222d, #cf1322); } body[class*='mk-orange-red-'] { --mk-sys-color: #fa541c; + --mk-sys-color1: #fff2e8; --mk-sys-color5: #ff7a45; @include viewstyle(#fff2e8, #ffd8bf, #ffbb96, #ff9c6e, #ff7a45, #fa541c, #d4380d); } body[class*='mk-orange-'] { --mk-sys-color: #fa8c16; + --mk-sys-color1: #fff7e6; --mk-sys-color5: #ffa940; @include viewstyle(#fff7e6, #ffe7ba, #ffd591, #ffc069, #ffa940, #fa8c16, #d46b08); } body[class*='mk-orange-yellow-'] { --mk-sys-color: #faad14; + --mk-sys-color1: #fffbe6; --mk-sys-color5: #ffc53d; @include viewstyle(#fffbe6, #fff1b8, #ffe58f, #ffd666, #ffc53d, #faad14, #d48806); } body[class*='mk-yellow-'] { --mk-sys-color: #fadb14; + --mk-sys-color1: #feffe6; --mk-sys-color5: #ffec3d; @include viewstyle(#feffe6, #ffffb8, #fffb8f, #fff566, #ffec3d, #fadb14, #d4b106); } body[class*='mk-yellow-green-'] { --mk-sys-color: #a0d911; + --mk-sys-color1: #fcffe6; --mk-sys-color5: #bae637; @include viewstyle(#fcffe6, #f4ffb8, #eaff8f, #d3f261, #bae637, #a0d911, #7cb305); } body[class*='mk-green-'] { --mk-sys-color: #52c41a; + --mk-sys-color1: #f6ffed; --mk-sys-color5: #73d13d; @include viewstyle(#f6ffed, #d9f7be, #b7eb8f, #95de64, #73d13d, #52c41a, #389e0d); } body[class*='mk-cyan-'] { --mk-sys-color: #13c2c2; + --mk-sys-color1: #e6fffb; --mk-sys-color5: #36cfc9; @include viewstyle(#e6fffb, #b5f5ec, #87e8de, #5cdbd3, #36cfc9, #13c2c2, #08979c); } body[class*='mk-blue-purple-'] { --mk-sys-color: #2f54eb; + --mk-sys-color1: #f0f5ff; --mk-sys-color5: #597ef7; @include viewstyle(#f0f5ff, #d6e4ff, #adc6ff, #85a5ff, #597ef7, #2f54eb, #1d39c4); } body[class*='mk-purple-'] { --mk-sys-color: #722ed1; + --mk-sys-color1: #f9f0ff; --mk-sys-color5: #9254de; @include viewstyle(#f9f0ff, #efdbff, #d3adf7, #b37feb, #9254de, #722ed1, #531dab); } body[class*='mk-magenta-'] { --mk-sys-color: #eb2f96; + --mk-sys-color1: #fff0f6; --mk-sys-color5: #f759ab; @include viewstyle(#fff0f6, #ffd6e7, #ffadd2, #ff85c0, #f759ab, #eb2f96, #c41d7f); } body[class*='mk-grass-green-'] { --mk-sys-color: #aeb303; + --mk-sys-color1: #f2efda; --mk-sys-color5: #bfbf22; @include viewstyle(#f2efda, #e6de97, #d9d26c, #ccc845, #bfbf22, #aeb303, #838c00); } body[class*='mk-deep-red-'] { --mk-sys-color: #c32539; + --mk-sys-color1: #fff0f0; --mk-sys-color5: #cf4856; @include viewstyle(#fff0f0, #f5cbcb, #e89b9e, #db7077, #cf4856, #c32539, #9c162c); } + +body[class*='mk-deep-blue-'] { + --mk-sys-color: #1d3661; + --mk-sys-color1: #eff1f4; + --mk-sys-color5: #394c6f; + @include viewstyle(#eff1f4, #e0e3e9, #dbdfe6, #c6cede, #394c6f, #1d3661, #1d3661); +} \ No newline at end of file diff --git a/src/components/header/resetpwd/index.jsx b/src/components/header/resetpwd/index.jsx index 5db93ce..f796811 100644 --- a/src/components/header/resetpwd/index.jsx +++ b/src/components/header/resetpwd/index.jsx @@ -73,7 +73,7 @@ if (level === 'letter_num' && value && /^[0-9a-zA-Z!@#$%^&*()_]*$/.test(value) && /^([^0-9]*|[^a-zA-Z]*)$/.test(value)) { callback('瀵嗙爜涓繀椤诲惈鏈夋暟瀛楀拰瀛楁瘝銆�') - } else if ((level === 'char_num' || level === 'char_num_90') && value && /^[0-9a-zA-Z!@#$%^&*()_]*$/.test(value) && /^([^0-9]*|[^a-zA-Z]*|[^!@#$%^&*()_]*)$/.test(value)) { + } else if ((level === 'char_num' || level === 'char_num_90' || level === 'char_num_90_sms') && value && /^[0-9a-zA-Z!@#$%^&*()_]*$/.test(value) && /^([^0-9]*|[^a-zA-Z]*|[^!@#$%^&*()_]*)$/.test(value)) { callback('瀵嗙爜涓繀椤诲惈鏈夋暟瀛椼�佸瓧姣嶅拰鐗规畩瀛楃銆�') } else { callback() diff --git a/src/components/keyInterface/index.jsx b/src/components/keyInterface/index.jsx index 11a459d..1319549 100644 --- a/src/components/keyInterface/index.jsx +++ b/src/components/keyInterface/index.jsx @@ -19,6 +19,7 @@ url: '', key: '', visible: false, + apptoken: '', setting: null } @@ -104,7 +105,7 @@ return } } - this.setState({key: key, setting: _setting}) + this.setState({key: key, apptoken: values.apptoken, setting: _setting}) return } @@ -136,7 +137,7 @@ this.props.onChange(content) - this.setState({setting: message, url: values.interface, visible: false}) + this.setState({setting: message, url: values.interface, apptoken: '', visible: false}) if (this.props.type !== 'develop') { this.setState({key: ''}) @@ -153,7 +154,7 @@ if (type === 'develop') { this.setState({setting: null, url: ''}) } else { - this.setState({key: '', setting: null, url: ''}) + this.setState({key: '', apptoken: '', setting: null, url: ''}) } this.props.onChange('') @@ -163,14 +164,15 @@ const { type } = this.props if (type !== 'develop') { - this.setState({key: ''}) + this.setState({key: '', apptoken: ''}) } this.setState({visible: false}) } render() { + const { type } = this.props const { getFieldDecorator } = this.props.form - const { url, visible, setting, key } = this.state + const { url, visible, setting, key, apptoken } = this.state return ( <div className="mk-key-wrap"> @@ -191,6 +193,9 @@ > {key && setting ? <Form> + {apptoken && type !== 'develop' ? <Form.Item style={{color: 'red'}} label="姝e紡绯荤粺appkey"> + {apptoken} + </Form.Item> : null} <Form.Item label="鎺ュ彛鍦板潃"> {getFieldDecorator('interface', { initialValue: setting.interface || 'http://******/webapi/dostars', @@ -217,7 +222,7 @@ ] })(<TextArea placeholder="http://sso.mk9h.cn/cloud/webapi/dostars" rows={2}/>)} </Form.Item> - <Form.Item label="appkey"> + <Form.Item label="鐩爣绯荤粺appkey"> {getFieldDecorator('appkey', { initialValue: setting.appkey || '', rules: [ @@ -282,7 +287,7 @@ </Form.Item> </Form> : null} {!key ? <Form style={{marginTop: '20px', marginBottom: '50px'}}> - <Form.Item label="appkey"> + <Form.Item label="姝e紡绯荤粺appkey"> {getFieldDecorator('apptoken', { initialValue: '', rules: [ diff --git a/src/components/keyInterface/index.scss b/src/components/keyInterface/index.scss index baf39c1..a68404c 100644 --- a/src/components/keyInterface/index.scss +++ b/src/components/keyInterface/index.scss @@ -43,7 +43,7 @@ .ant-form-item { display: flex; .ant-form-item-label { - width: 20%; + width: 22%; } .ant-form-item-control-wrapper { width: 70%; diff --git a/src/components/mk-icon/index.jsx b/src/components/mk-icon/index.jsx index 939b7ff..42e8885 100644 --- a/src/components/mk-icon/index.jsx +++ b/src/components/mk-icon/index.jsx @@ -471,7 +471,20 @@ MkIcons[type](resProps) ) } else { - return <span className={'anticon anticon-mk ' + (resProps.className || '')} style={resProps.style || null} dangerouslySetInnerHTML={{ __html: type }}></span> + let svg = type + + if (!/<svg/.test(svg)) { + try { + svg = window.decodeURIComponent(window.atob(svg)) + if (!/<svg/.test(svg)) { + svg = '' + } + } catch (e) { + svg = '' + } + } + + return <span className={'anticon anticon-mk ' + (resProps.className || '')} style={resProps.style || null} dangerouslySetInnerHTML={{ __html: svg }}></span> } } } diff --git a/src/components/normalform/modalform/index.jsx b/src/components/normalform/modalform/index.jsx index 6a2636b..eb177a9 100644 --- a/src/components/normalform/modalform/index.jsx +++ b/src/components/normalform/modalform/index.jsx @@ -105,7 +105,6 @@ let supItem = fieldMap.get(key) let fields = [] - controlFields[key].forEach(item => { if (!fieldMap.has(item.field)) return diff --git a/src/components/normalform/modalform/styleInput/index.jsx b/src/components/normalform/modalform/styleInput/index.jsx index c6d6b45..f372a4a 100644 --- a/src/components/normalform/modalform/styleInput/index.jsx +++ b/src/components/normalform/modalform/styleInput/index.jsx @@ -128,7 +128,7 @@ const { value, options, unit } = this.state return ( - <div className="style-input-wrap"> + <div className="mk-style-input-wrap"> <Input value={value} addonAfter={ options.length > 1 ? <Select value={unit} onChange={this.changeUnit}> diff --git a/src/components/normalform/modalform/styleInput/index.scss b/src/components/normalform/modalform/styleInput/index.scss index fc0085d..5dbf186 100644 --- a/src/components/normalform/modalform/styleInput/index.scss +++ b/src/components/normalform/modalform/styleInput/index.scss @@ -1,4 +1,4 @@ -.style-input-wrap { +.mk-style-input-wrap { line-height: 32px; .ant-select { width: 60px!important; @@ -6,7 +6,6 @@ .single-unit { width: 38px; text-align: left; - color: rgba(255, 255, 255, 0.65); } div[title="vh"], div[title="vw"] { color: #1890ff; diff --git a/src/components/tabview/index.jsx b/src/components/tabview/index.jsx index d6f95ae..1b5e633 100644 --- a/src/components/tabview/index.jsx +++ b/src/components/tabview/index.jsx @@ -23,7 +23,6 @@ const Iframe = asyncComponent(() => import('@/tabviews/iframe')) const RoleManage = asyncComponent(() => import('@/tabviews/rolemanage')) const FormTab = asyncComponent(() => import('@/tabviews/formtab')) -const TabManage = asyncComponent(() => import('@/tabviews/tabmanage')) class TabViews extends Component { static propTpyes = { @@ -211,8 +210,6 @@ return (<RoleManage MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID}/>) } else if (view.type === 'FormTab') { return (<FormTab MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID} param={view.param}/>) - } else if (view.type === 'TabManage') { - return (<TabManage MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID} param={view.param}/>) } else if (view.type === 'iframe') { return (<Iframe key={view.MenuID} MenuID={view.MenuID} MenuNo={view.MenuNo} title={view.MenuName} MenuName={view.MenuName} url={window.GLOB.baseurl + 'zh-CN/' + view.LinkUrl}/>) } else { diff --git a/src/menu/components/card/balcony/options.jsx b/src/menu/components/card/balcony/options.jsx index 46f7bec..86b84f5 100644 --- a/src/menu/components/card/balcony/options.jsx +++ b/src/menu/components/card/balcony/options.jsx @@ -257,7 +257,7 @@ {value: 'true', label: '鍚敤'}, {value: 'false', label: '绂佺敤'}, ], - forbid: !appType + forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' }, { type: 'multiselect', diff --git a/src/menu/components/card/cardcellcomponent/dragaction/action.jsx b/src/menu/components/card/cardcellcomponent/dragaction/action.jsx index 95f0033..6418290 100644 --- a/src/menu/components/card/cardcellcomponent/dragaction/action.jsx +++ b/src/menu/components/card/cardcellcomponent/dragaction/action.jsx @@ -72,6 +72,14 @@ _style_ = {clear: 'left'} } + let className = card.width || '' + if (card.hidden === 'true') { + className += ' mk-hidden' + } + if (card.checkType) { + className += ' ' + card.checkType + } + return ( <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control" onDoubleClick={(e) => e.stopPropagation()}> @@ -82,7 +90,7 @@ {hasProfile ? <ProfileOutlined className="profile" title="setting" onClick={() => profileCard(id)} /> : null} </div> } trigger="hover"> - <div ref={node => drag(drop(node))} style={_style_} className={'ant-col card-button-cell ant-col-' + card.width + (card.hidden === 'true' ? ' mk-hidden' : '')} onDoubleClick={(e) => {e.stopPropagation(); doubleClickCard(id)}}> + <div ref={node => drag(drop(node))} style={_style_} className={'ant-col card-button-cell ant-col-' + className} onDoubleClick={(e) => {e.stopPropagation(); doubleClickCard(id)}}> <div style={{opacity: isDragging ? 0.3 : 1, ...card.wrapStyle}}> {btnElement} </div> diff --git a/src/menu/components/card/cardcellcomponent/index.scss b/src/menu/components/card/cardcellcomponent/index.scss index e82bfb9..bd6033c 100644 --- a/src/menu/components/card/cardcellcomponent/index.scss +++ b/src/menu/components/card/cardcellcomponent/index.scss @@ -29,6 +29,14 @@ } } .ant-checkbox .ant-checkbox-inner { + border-color: #b8b8b8; + } + } + .card-button-cell:not(.square) { + .ant-checkbox .ant-checkbox-inner { + border-radius: 15px; + } + .ant-checkbox-checked::after { border-radius: 15px; } } diff --git a/src/menu/components/card/cardcomponent/index.jsx b/src/menu/components/card/cardcomponent/index.jsx index f418268..6bd283e 100644 --- a/src/menu/components/card/cardcomponent/index.jsx +++ b/src/menu/components/card/cardcomponent/index.jsx @@ -320,7 +320,7 @@ <div className="mk-popover-control"> <PlusOutlined className="plus" title="娣诲姞鍏冪礌" onClick={this.addElement} /> <PlusSquareOutlined className="plus" title="娣诲姞鎸夐挳" onClick={this.addButton} /> - <NormalForm title="鍗$墖璁剧疆" width={950} update={this.updateSetting} getForms={this.getSettingForms}> + <NormalForm title={cards.subtype === 'datacard' && card.$cardType !== 'extendCard' ? '寰幆鍗$墖璁剧疆' : '灞炴�у崱鐗囪缃�'} width={950} update={this.updateSetting} getForms={this.getSettingForms}> <EditOutlined className="edit" title="缂栬緫"/> </NormalForm> <CopyComponent type="cardcell" card={card}/> @@ -338,7 +338,7 @@ {card.setting.type === 'multi' ? <Switch size="small" onClick={this.changeSide} defaultChecked /> : null} </div> } trigger="hover"> - <ToolOutlined /> + <ToolOutlined style={cards.subtype === 'datacard' && card.$cardType === 'extendCard' ? {color: '#26C281'} : null}/> </Popover> </div> </div> diff --git a/src/menu/components/card/cardcomponent/options.jsx b/src/menu/components/card/cardcomponent/options.jsx index 40d460f..f93e6f2 100644 --- a/src/menu/components/card/cardcomponent/options.jsx +++ b/src/menu/components/card/cardcomponent/options.jsx @@ -103,6 +103,15 @@ forbid: subtype !== 'propcard' }, { + type: 'select', + field: 'bgField', + label: '鑳屾櫙鍥�', + initval: setting.bgField || '', + tooltip: '鍔ㄦ�佽儗鏅紝鑳屾櫙鍥剧墖鐢卞瓧娈靛�兼帶鍒躲�傝娉ㄦ剰璋冩暣鑳屾櫙鏍峰紡銆�', + required: false, + options: columns + }, + { type: ops.length === 0 ? 'radio' : 'select', field: 'click', label: '鐐瑰嚮浜嬩欢', diff --git a/src/menu/components/card/data-card/index.jsx b/src/menu/components/card/data-card/index.jsx index 5f23b15..46d05a9 100644 --- a/src/menu/components/card/data-card/index.jsx +++ b/src/menu/components/card/data-card/index.jsx @@ -69,7 +69,12 @@ marginLeft: '8px', marginRight: '8px', marginTop: '8px', marginBottom: '8px' }, backStyle: {}, - elements: [], + elements: [{ + uuid: Utils.getuuid(), + eleType: 'text', + datatype: 'static', + value: '寰幆鍖哄煙' + }], backElements: [], menus: [] }] diff --git a/src/menu/components/card/data-card/options.jsx b/src/menu/components/card/data-card/options.jsx index 0487c0f..49358f7 100644 --- a/src/menu/components/card/data-card/options.jsx +++ b/src/menu/components/card/data-card/options.jsx @@ -149,7 +149,7 @@ options: [ {value: 'page', label: '椤电爜'}, {value: 'switch', label: '宸﹀彸鍒囨崲', forbid: appType === 'mob' || subtype === 'tablecard'}, - {value: 'slide', label: '婊戝姩鍔犺浇', forbid: appType !== 'mob'}, + {value: 'slide', label: '婊戝姩鍔犺浇', forbid: appType !== 'mob' || sessionStorage.getItem('editMenuType') === 'popview'}, {value: 'more', label: '鏌ョ湅鏇村'}, ], controlFields: [ @@ -196,18 +196,33 @@ forbid: subtype !== 'propcard' }, { + type: 'select', + field: 'selected', + label: '鏁版嵁閫変腑', + initval: wrap.selected || 'false', + tooltip: '鍒濆鍖栵細鏁版嵁鍔犺浇鏃堕�変腑棣栬鏁版嵁锛屼粎鎵ц涓�娆°�傛暟鎹姞杞斤細姣忔鏁版嵁鍔犺浇鏃跺潎閫変腑棣栬锛堝綋鎸夐挳鎵ц瀹屾垚骞惰繑鍥炰富閿�兼椂锛岄粯璁ら�変腑涓婚敭鍊煎搴旇锛夈�傞�変腑鏍囪锛氳繑鍥炴暟鎹腑瀛樺湪 selected 瀛楁锛屼笖鍊间负 true 鐨勬暟鎹閫変腑銆�', + required: false, + options: [ + {value: 'false', label: '鏃�'}, + {value: 'init', label: '鍒濆鍖�'}, + {value: 'always', label: '鏁版嵁鍔犺浇'}, + {value: 'sign', label: '閫変腑鏍囪'} + ], + forbid: subtype !== 'datacard' + }, + { type: 'radio', field: 'selected', - label: '棣栬閫変腑', + label: '鏁版嵁閫変腑', initval: wrap.selected || 'false', - tooltip: '褰撴寜閽墽琛屽畬鎴愬苟杩斿洖涓婚敭鍊兼椂锛岄粯璁ら�変腑涓婚敭鍊煎搴旇銆�', + tooltip: '鍒濆鍖栵細鏁版嵁鍔犺浇鏃堕�変腑棣栬鏁版嵁锛屼粎鎵ц涓�娆°�傛暟鎹姞杞斤細姣忔鏁版嵁鍔犺浇鏃跺潎閫変腑棣栬銆�', required: false, options: [ {value: 'false', label: '鏃�'}, {value: 'init', label: '鍒濆鍖�'}, {value: 'always', label: '鏁版嵁鍔犺浇'}, ], - forbid: subtype === 'tablecard' + forbid: subtype !== 'propcard' }, { type: 'select', @@ -484,7 +499,7 @@ {value: 'true', label: '鍚敤'}, {value: 'false', label: '绂佺敤'}, ], - forbid: !appType + forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' }, { type: 'multiselect', diff --git a/src/menu/components/carousel/data-card/options.jsx b/src/menu/components/carousel/data-card/options.jsx index a29facc..e6ac38e 100644 --- a/src/menu/components/carousel/data-card/options.jsx +++ b/src/menu/components/carousel/data-card/options.jsx @@ -211,7 +211,7 @@ {value: 'true', label: '鍚敤'}, {value: 'false', label: '绂佺敤'}, ], - forbid: !appType + forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' }, { type: 'multiselect', diff --git a/src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx index b5f74db..9eed12a 100644 --- a/src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx @@ -87,7 +87,7 @@ {value: 'true', label: '鍚敤'}, {value: 'false', label: '绂佺敤'}, ], - forbid: !appType + forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' }, { type: 'multiselect', @@ -316,7 +316,7 @@ label: '鑺傜偣棰滆壊', initval: card.nodeColor || '#1890ff', tooltip: '鍙充晶鑺傜偣鐨勬爣璁伴鑹层��', - isHex: true, + colorType: 'hex', required: false }, { @@ -325,7 +325,7 @@ label: '宸﹁妭鐐归鑹�', initval: card.leftColor || '#26C281', tooltip: '宸︿晶鑺傜偣鐨勬爣璁伴鑹层��', - isHex: true, + colorType: 'hex', required: false }, { diff --git a/src/menu/components/chart/antv-G6/index.jsx b/src/menu/components/chart/antv-G6/index.jsx index 670a880..82d8bf3 100644 --- a/src/menu/components/chart/antv-G6/index.jsx +++ b/src/menu/components/chart/antv-G6/index.jsx @@ -60,7 +60,8 @@ purple: '#722ed1', magenta: '#eb2f96', grass_green: '#aeb303', - deep_red: '#c32539' + deep_red: '#c32539', + deep_blue: '#1d3661' } let systemColor = '#1890ff' diff --git a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx index f26a458..2620f88 100644 --- a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx @@ -87,7 +87,7 @@ {value: 'true', text: '鍚敤'}, {value: 'false', text: '绂佺敤'}, ], - forbid: !appType + forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' }, { type: 'select', diff --git a/src/menu/components/chart/antv-dashboard/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-dashboard/chartcompile/formconfig.jsx index 61a1508..f1d676e 100644 --- a/src/menu/components/chart/antv-dashboard/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/antv-dashboard/chartcompile/formconfig.jsx @@ -61,7 +61,7 @@ {value: 'true', text: '鍚敤'}, {value: 'false', text: '绂佺敤'}, ], - forbid: !appType + forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' }, { type: 'select', diff --git a/src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx index 7c34a71..ce67f2a 100644 --- a/src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx @@ -119,7 +119,7 @@ {value: 'true', text: '鍚敤'}, {value: 'false', text: '绂佺敤'}, ], - forbid: !appType + forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' }, { type: 'select', diff --git a/src/menu/components/chart/antv-scatter/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-scatter/chartcompile/formconfig.jsx index 45f9942..8b2f4f4 100644 --- a/src/menu/components/chart/antv-scatter/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/antv-scatter/chartcompile/formconfig.jsx @@ -61,7 +61,7 @@ {value: 'true', text: '鍚敤'}, {value: 'false', text: '绂佺敤'}, ], - forbid: !appType + forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' }, { type: 'select', diff --git a/src/menu/components/chart/chart-custom/chartcompile/formconfig.jsx b/src/menu/components/chart/chart-custom/chartcompile/formconfig.jsx index 11c362b..2434abd 100644 --- a/src/menu/components/chart/chart-custom/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/chart-custom/chartcompile/formconfig.jsx @@ -72,7 +72,7 @@ {value: 'true', text: '鍚敤'}, {value: 'false', text: '绂佺敤'}, ], - forbid: !appType + forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' }, { type: 'select', diff --git a/src/menu/components/code/sandbox/options.jsx b/src/menu/components/code/sandbox/options.jsx index de03409..55c0cde 100644 --- a/src/menu/components/code/sandbox/options.jsx +++ b/src/menu/components/code/sandbox/options.jsx @@ -71,7 +71,7 @@ {value: 'true', label: '鍚敤'}, {value: 'false', label: '绂佺敤'}, ], - forbid: !appType + forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' }, { type: 'multiselect', diff --git a/src/menu/components/editor/braft-editor/options.jsx b/src/menu/components/editor/braft-editor/options.jsx index 0cf69e3..9e7094f 100644 --- a/src/menu/components/editor/braft-editor/options.jsx +++ b/src/menu/components/editor/braft-editor/options.jsx @@ -99,7 +99,7 @@ {value: 'true', label: '鍚敤'}, {value: 'false', label: '绂佺敤'}, ], - forbid: !appType + forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' }, { type: 'multiselect', diff --git a/src/menu/components/form/simple-form/options.jsx b/src/menu/components/form/simple-form/options.jsx index 889190a..760d969 100644 --- a/src/menu/components/form/simple-form/options.jsx +++ b/src/menu/components/form/simple-form/options.jsx @@ -179,7 +179,7 @@ {value: 'true', label: '鍚敤'}, {value: 'false', label: '绂佺敤'}, ], - forbid: !appType + forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' }, { type: 'cascader', diff --git a/src/menu/components/form/step-form/options.jsx b/src/menu/components/form/step-form/options.jsx index 4011d4e..48f3daf 100644 --- a/src/menu/components/form/step-form/options.jsx +++ b/src/menu/components/form/step-form/options.jsx @@ -130,7 +130,7 @@ {value: 'true', label: '鍚敤'}, {value: 'false', label: '绂佺敤'}, ], - forbid: !appType + forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' }, { type: 'cascader', diff --git a/src/menu/components/group/normal-group/options.jsx b/src/menu/components/group/normal-group/options.jsx index 168bc3b..0d128ce 100644 --- a/src/menu/components/group/normal-group/options.jsx +++ b/src/menu/components/group/normal-group/options.jsx @@ -109,7 +109,7 @@ {value: 'true', label: '鍚敤'}, {value: 'false', label: '绂佺敤'}, ], - forbid: !appType + forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' }, { type: 'radio', diff --git a/src/menu/components/iframe/options.jsx b/src/menu/components/iframe/options.jsx index 8a54190..b6e8ca6 100644 --- a/src/menu/components/iframe/options.jsx +++ b/src/menu/components/iframe/options.jsx @@ -120,7 +120,7 @@ {value: 'true', label: '鍚敤'}, {value: 'false', label: '绂佺敤'}, ], - forbid: !appType + forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' }, { type: 'multiselect', diff --git a/src/menu/components/module/voucher/voucherTable/index.jsx b/src/menu/components/module/voucher/voucherTable/index.jsx index 447365c..c582f10 100644 --- a/src/menu/components/module/voucher/voucherTable/index.jsx +++ b/src/menu/components/module/voucher/voucherTable/index.jsx @@ -4,7 +4,6 @@ import { Table } from 'antd' import Utils from '@/utils/utils.js' -import '@/assets/css/table.scss' import './index.scss' class BodyRow extends React.Component { diff --git a/src/menu/components/search/main-search/options.jsx b/src/menu/components/search/main-search/options.jsx index e72fbb2..880a5a7 100644 --- a/src/menu/components/search/main-search/options.jsx +++ b/src/menu/components/search/main-search/options.jsx @@ -54,7 +54,7 @@ { type: 'radio', field: 'drawerPlacement', - label: '鎶藉眽鏂瑰悜', + label: '寮瑰嚭鏂瑰悜', initval: wrap.drawerPlacement || 'right', required: false, options: [ @@ -129,7 +129,7 @@ {value: 'true', label: '鍚敤'}, {value: 'false', label: '绂佺敤'}, ], - forbid: !appType + forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' }, { type: 'multiselect', diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx index 56a2345..5c0a14c 100644 --- a/src/menu/components/share/actioncomponent/actionform/index.jsx +++ b/src/menu/components/share/actioncomponent/actionform/index.jsx @@ -18,7 +18,7 @@ exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'hidden'], excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'sheet', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'width', 'hidden'], excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'pagination', 'search', 'width', 'hidden'], - popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'popClose', 'width', 'display', 'ratio', 'syncComponent', 'clickouter', 'hidden'], + popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'popClose', 'width', 'display', 'ratio', 'syncComponent', 'clickouter', 'maskStyle', 'closeButton', 'hidden'], tab: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'linkmenu', 'width', 'hidden'], innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'swipe', 'icon', 'class', 'color', 'width', 'hidden'], funcbutton: ['label', 'OpenType', 'funcType', 'show', 'swipe', 'icon', 'class', 'color', 'width', 'hidden'], @@ -241,7 +241,7 @@ if (this.record.formType === 'switch') { shows.push('field', 'size', 'openVal', 'closeVal', 'openText', 'closeText') } else if (this.record.formType === 'radio') { - shows.push('field', 'openVal', 'closeVal') + shows.push('field', 'checkType', 'openVal', 'closeVal') } else { shows.push('field') } @@ -356,7 +356,9 @@ } else if (openType === 'popview') { reOptions.Ot = requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value)) - if (this.record.display === 'drawer') { + if (appType === 'mob') { + shows.push('placement') + } else if (this.record.display === 'drawer') { shows.push('placement') } if (this.record.popClose === 'grid') { diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index 254577c..ab5b23b 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -126,7 +126,7 @@ } } if (appType === 'mob') { - opentypes = opentypes.filter(item => ['pop', 'prompt', 'exec', 'excelOut', 'innerpage', 'funcbutton'].includes(item.value)) + opentypes = opentypes.filter(item => ['pop', 'prompt', 'exec', 'excelOut', 'popview', 'innerpage', 'funcbutton'].includes(item.value)) funTypes = [ { value: 'print', text: '鏍囩鎵撳嵃' }, { value: 'scan', text: '鎵爜' }, @@ -829,23 +829,13 @@ }, { value: 'drawer', text: '鎶藉眽' - }] - }, - { - type: 'number', - key: 'ratio', - min: 1, - max: 3000, - precision: 0, - label: '姣斾緥', - initVal: card.ratio || 85, - tooltip: '妯℃�佹鎴栨娊灞夌殑瀹藉害锛屽皬浜�100涓虹獥鍙e搴︼紙鎴栭珮搴︼級鐧惧垎姣旓紝澶т簬100涓哄儚绱犲�笺��', - required: true + }], + forbid: appType === 'mob', }, { type: 'radio', key: 'placement', - label: '鎶藉眽鏂瑰悜', + label: '寮瑰嚭鏂瑰悜', initVal: card.placement || 'right', required: false, options: [{ @@ -863,6 +853,17 @@ }] }, { + type: 'number', + key: 'ratio', + min: 1, + max: 3000, + precision: 0, + label: '姣斾緥', + initVal: card.ratio || 85, + tooltip: '妯℃�佹鎴栨娊灞夌殑瀹藉害锛屽皬浜�100涓虹獥鍙e搴︼紙鎴栭珮搴︼級鐧惧垎姣旓紝澶т簬100涓哄儚绱犲�笺��', + required: true + }, + { type: 'radio', key: 'clickouter', label: '鐐瑰嚮钂欏眰', @@ -875,6 +876,36 @@ value: 'close', text: '鍏抽棴' }] + }, + { + type: 'radio', + key: 'maskStyle', + label: '钂欏眰鏍峰紡', + initVal: card.maskStyle || 'default', + required: false, + options: [{ + value: 'default', + text: '榛樿' + }, { + value: 'transparent', + text: '閫忔槑' + }], + forbid: appType !== 'mob' + }, + { + type: 'radio', + key: 'closeButton', + label: '鍏抽棴鎸夐挳', + initVal: card.closeButton || 'false', + required: false, + options: [{ + value: 'false', + text: '闅愯棌' + }, { + value: 'true', + text: '鏄剧ず' + }], + forbid: appType !== 'mob' }, { type: 'radio', @@ -997,6 +1028,19 @@ }, { value: 'small', text: '灏�' + }] + }, + { + type: 'radio', + key: 'checkType', + label: '閫夋鏍峰紡', + initVal: card.checkType || 'circle', + options: [{ + value: 'circle', + text: '鍦嗚' + }, { + value: 'square', + text: '鏂硅' }] }, { @@ -1665,7 +1709,7 @@ { type: 'radio', key: 'placement', - label: '鎶藉眽鏂瑰悜', + label: '寮瑰嚭鏂瑰悜', initVal: card.placement || 'right', required: false, options: [{ diff --git a/src/menu/components/share/markcomponent/index.jsx b/src/menu/components/share/markcomponent/index.jsx index a17b5dd..ae293fe 100644 --- a/src/menu/components/share/markcomponent/index.jsx +++ b/src/menu/components/share/markcomponent/index.jsx @@ -9,7 +9,6 @@ import MarkForm from './markform' import MkIcon from '@/components/mk-icon' import { minkeIconSystem } from '@/utils/option.js' -import '@/assets/css/table.scss' import './index.scss' const EditTable = asyncComponent(() => import('@/templates/zshare/editTable')) diff --git a/src/menu/components/table/base-table/options.jsx b/src/menu/components/table/base-table/options.jsx index 80fd9bd..22efc6a 100644 --- a/src/menu/components/table/base-table/options.jsx +++ b/src/menu/components/table/base-table/options.jsx @@ -55,18 +55,32 @@ ] }, { - type: 'radio', + type: 'select', field: 'selected', - label: '棣栬閫変腑', + label: '鏁版嵁閫変腑', initval: wrap.selected || 'false', - tooltip: '褰撴寜閽墽琛屽畬鎴愬苟杩斿洖涓婚敭鍊兼椂锛岄粯璁ら�変腑涓婚敭鍊煎搴旇銆�', + tooltip: '鍒濆鍖栵細鏁版嵁鍔犺浇鏃堕�変腑棣栬鏁版嵁锛屼粎鎵ц涓�娆°�傛暟鎹姞杞斤細姣忔鏁版嵁鍔犺浇鏃跺潎閫変腑棣栬锛堝綋鎸夐挳鎵ц瀹屾垚骞惰繑鍥炰富閿�兼椂锛岄粯璁ら�変腑涓婚敭鍊煎搴旇锛夈�傞�変腑鏍囪锛氳繑鍥炴暟鎹腑瀛樺湪 selected 瀛楁锛屼笖鍊间负 true 鐨勬暟鎹閫変腑銆傛敞锛氬惎鐢ㄦ棤浜哄�煎畧鏃舵棤鏁堛��', required: false, options: [ {value: 'false', label: '鏃�'}, {value: 'init', label: '鍒濆鍖�'}, {value: 'always', label: '鏁版嵁鍔犺浇'}, - ] + {value: 'sign', label: '閫変腑鏍囪'} + ], }, + // { + // type: 'radio', + // field: 'selected', + // label: '棣栬閫変腑', + // initval: wrap.selected || 'false', + // tooltip: '褰撴寜閽墽琛屽畬鎴愬苟杩斿洖涓婚敭鍊兼椂锛岄粯璁ら�変腑涓婚敭鍊煎搴旇銆�', + // required: false, + // options: [ + // {value: 'false', label: '鏃�'}, + // {value: 'init', label: '鍒濆鍖�'}, + // {value: 'always', label: '鏁版嵁鍔犺浇'}, + // ] + // }, { type: 'radio', field: 'tableMode', diff --git a/src/menu/components/table/edit-table/options.jsx b/src/menu/components/table/edit-table/options.jsx index 565be7f..d04ef9a 100644 --- a/src/menu/components/table/edit-table/options.jsx +++ b/src/menu/components/table/edit-table/options.jsx @@ -277,7 +277,7 @@ {value: 'true', label: '鍚敤'}, {value: 'false', label: '绂佺敤'}, ], - forbid: !appType + forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' }, { type: 'multiselect', diff --git a/src/menu/components/table/normal-table/options.jsx b/src/menu/components/table/normal-table/options.jsx index 70cf580..b876e95 100644 --- a/src/menu/components/table/normal-table/options.jsx +++ b/src/menu/components/table/normal-table/options.jsx @@ -129,18 +129,32 @@ ] }, { - type: 'radio', + type: 'select', field: 'selected', - label: '棣栬閫変腑', + label: '鏁版嵁閫変腑', initval: wrap.selected || 'false', - tooltip: '褰撴寜閽墽琛屽畬鎴愬苟杩斿洖涓婚敭鍊兼椂锛岄粯璁ら�変腑涓婚敭鍊煎搴旇銆�', + tooltip: '鍒濆鍖栵細鏁版嵁鍔犺浇鏃堕�変腑棣栬鏁版嵁锛屼粎鎵ц涓�娆°�傛暟鎹姞杞斤細姣忔鏁版嵁鍔犺浇鏃跺潎閫変腑棣栬锛堝綋鎸夐挳鎵ц瀹屾垚骞惰繑鍥炰富閿�兼椂锛岄粯璁ら�変腑涓婚敭鍊煎搴旇锛夈�傞�変腑鏍囪锛氳繑鍥炴暟鎹腑瀛樺湪 selected 瀛楁锛屼笖鍊间负 true 鐨勬暟鎹閫変腑銆�', required: false, options: [ {value: 'false', label: '鏃�'}, {value: 'init', label: '鍒濆鍖�'}, {value: 'always', label: '鏁版嵁鍔犺浇'}, - ] + {value: 'sign', label: '閫変腑鏍囪'} + ], }, + // { + // type: 'radio', + // field: 'selected', + // label: '棣栬閫変腑', + // initval: wrap.selected || 'false', + // tooltip: '褰撴寜閽墽琛屽畬鎴愬苟杩斿洖涓婚敭鍊兼椂锛岄粯璁ら�変腑涓婚敭鍊煎搴旇銆�', + // required: false, + // options: [ + // {value: 'false', label: '鏃�'}, + // {value: 'init', label: '鍒濆鍖�'}, + // {value: 'always', label: '鏁版嵁鍔犺浇'}, + // ] + // }, // { // type: 'radio', // field: 'show', @@ -282,7 +296,7 @@ {value: 'true', label: '鍚敤'}, {value: 'false', label: '绂佺敤'}, ], - forbid: !appType + forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' }, { type: 'multiselect', diff --git a/src/menu/components/tabs/antv-tabs/options.jsx b/src/menu/components/tabs/antv-tabs/options.jsx index be2cd65..798a655 100644 --- a/src/menu/components/tabs/antv-tabs/options.jsx +++ b/src/menu/components/tabs/antv-tabs/options.jsx @@ -237,7 +237,7 @@ {value: 'true', label: '鍚敤'}, {value: 'false', label: '绂佺敤'}, ], - forbid: !appType + forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' }, { type: 'multiselect', diff --git a/src/menu/components/timeline/normal-timeline/options.jsx b/src/menu/components/timeline/normal-timeline/options.jsx index fac7a50..8d0ddb9 100644 --- a/src/menu/components/timeline/normal-timeline/options.jsx +++ b/src/menu/components/timeline/normal-timeline/options.jsx @@ -140,7 +140,7 @@ {value: 'true', label: '鍚敤'}, {value: 'false', label: '绂佺敤'}, ], - forbid: !appType + forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' }, { type: 'multiselect', diff --git a/src/menu/components/tree/antd-tree/options.jsx b/src/menu/components/tree/antd-tree/options.jsx index 462aa86..54e81d2 100644 --- a/src/menu/components/tree/antd-tree/options.jsx +++ b/src/menu/components/tree/antd-tree/options.jsx @@ -131,7 +131,7 @@ {value: 'true', label: '鍚敤'}, {value: 'false', label: '绂佺敤'}, ], - forbid: !appType + forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' }, { type: 'multiselect', diff --git a/src/menu/datasource/verifycard/index.jsx b/src/menu/datasource/verifycard/index.jsx index 23ae166..4962810 100644 --- a/src/menu/datasource/verifycard/index.jsx +++ b/src/menu/datasource/verifycard/index.jsx @@ -433,13 +433,9 @@ if (_loading) { notification.warning({ top: 92, - message: '瀛樺湪鏈繚瀛樿剼鏈紝璇风偣鍑荤‘瀹氫繚瀛橈紝鎴栫偣鍑诲彇娑堟斁寮冧慨鏀癸紒', + message: '瀛樺湪鏈繚瀛樿剼鏈紒', duration: 5 }) - this.setState({ - loading: false - }) - return } this.setState({ diff --git a/src/menu/datasource/verifycard/utils.jsx b/src/menu/datasource/verifycard/utils.jsx index 06c8b82..6296192 100644 --- a/src/menu/datasource/verifycard/utils.jsx +++ b/src/menu/datasource/verifycard/utils.jsx @@ -132,7 +132,7 @@ let _search = defSearch - if (setting.queryType === 'statistics' && _dataresource) { + if (_dataresource) { _regoptions.forEach(item => { _dataresource = _dataresource.replace(item.reg, '0') }) diff --git a/src/menu/pastecontroller/index.jsx b/src/menu/pastecontroller/index.jsx index 800bec8..5c6dcd7 100644 --- a/src/menu/pastecontroller/index.jsx +++ b/src/menu/pastecontroller/index.jsx @@ -62,7 +62,11 @@ let options = ['tabs', 'timeline', 'datacard', 'propcard', 'mainsearch', 'simpleform', 'stepform', 'tabform', 'balcony', 'group', 'normaltable', 'tablecard', 'line', 'bar', 'pie', 'dashboard', 'scatter', 'iframe', 'sandbox'] if (appType === 'mob') { - options.push('menubar', 'topbar') + if (sessionStorage.getItem('editMenuType') !== 'popview') { + options.push('menubar', 'topbar') + } else { + options.push('menubar') + } } else { options.push('editable', 'antvG6') } diff --git a/src/mob/colorsketch/index.jsx b/src/mob/colorsketch/index.jsx index 68d2965..6f1ba7a 100644 --- a/src/mob/colorsketch/index.jsx +++ b/src/mob/colorsketch/index.jsx @@ -8,7 +8,7 @@ const presetColors = [ '#1890ff', '#f5222d', '#fa541c', '#fa8c16', '#faad14', '#fadb14', '#a0d911', '#52c41a', '#13c2c2', '#2f54eb', '#722ed1', - '#eb2f96', '#aeb303', '#c32539', '#ffbb96', '#ffd591', '#ffe58f', '#fffb8f', '#eaff8f', '#b7eb8f', '#87e8de', '#91d5ff', + '#eb2f96', '#aeb303', '#c32539', '#1d3661', '#ffd591', '#ffe58f', '#fffb8f', '#eaff8f', '#b7eb8f', '#87e8de', '#91d5ff', '#adc6ff', '#d3adf7', '#EBE9E9', '#d9d9d9', '#434343', '#000000', '#ffffff', 'transparent' ] diff --git a/src/mob/components/menubar/normal-menubar/options.jsx b/src/mob/components/menubar/normal-menubar/options.jsx index 0cdd7bc..6415abb 100644 --- a/src/mob/components/menubar/normal-menubar/options.jsx +++ b/src/mob/components/menubar/normal-menubar/options.jsx @@ -74,7 +74,8 @@ options: [ {value: 'true', label: '鍚敤'}, {value: 'false', label: '绂佺敤'}, - ] + ], + forbid: sessionStorage.getItem('editMenuType') === 'popview' }, ] diff --git a/src/mob/components/navbar/normal-navbar/index.jsx b/src/mob/components/navbar/normal-navbar/index.jsx index 71a53d9..e33ea48 100644 --- a/src/mob/components/navbar/normal-navbar/index.jsx +++ b/src/mob/components/navbar/normal-navbar/index.jsx @@ -123,7 +123,7 @@ _style.height = card.wrap.height return ( - <div className="normal-navbar-edit-box" style={_style} id={card.uuid}> + <div className={'normal-navbar-edit-box ' + (card.wrap.menuStyle || '')} style={_style} id={card.uuid}> <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> <PlusOutlined className="plus" title="娣诲姞鑿滃崟" onClick={() => MKEmitter.emit('addmobmenu')}/> diff --git a/src/mob/components/navbar/normal-navbar/index.scss b/src/mob/components/navbar/normal-navbar/index.scss index 6414525..0a0851d 100644 --- a/src/mob/components/navbar/normal-navbar/index.scss +++ b/src/mob/components/navbar/normal-navbar/index.scss @@ -41,24 +41,7 @@ margin-bottom: 0; } } - .am-tab-bar-tab.tab-zoomIn { - .am-tab-bar-tab-icon { - padding: 10px; - display: inline-block; - background: #1890ff; - color: #ffffff; - border-radius: 40px; - width: 42px; - height: 42px; - font-size: 15px; - transform: translate(0px, -25px); - } - .am-tab-bar-tab-title { - font-size: 1.2em; - color: #1890ff; - transform: translate(0px, -22px); - } - } + } .anticon-tool { @@ -72,6 +55,43 @@ background: rgba(255, 255, 255, 0.55); } } + +.normal-navbar-edit-box:not(.class1) { + .menu .am-tab-bar-tab.tab-zoomIn { + .am-tab-bar-tab-icon { + padding: 10px; + display: inline-block; + background: #1890ff; + color: #ffffff; + border-radius: 40px; + width: 42px; + height: 42px; + font-size: 15px; + transform: translate(0px, -25px); + } + .am-tab-bar-tab-title { + font-size: 1.2em; + color: #1890ff; + transform: translate(0px, -22px); + } + } +} +.normal-navbar-edit-box.class1 { + background-color: #1890ff!important; + border-top-left-radius: 40px; + border-top-right-radius: 40px; + .am-tab-bar-tab-icon { + color: #ffffff; + position: relative; + top: 5px; + } + .menu .am-tab-bar-tab .anticon { + font-size: 20px; + } + .am-tab-bar-tab-title { + display: none; + } +} .normal-navbar-edit-box::after { display: block; content: ' '; diff --git a/src/mob/components/navbar/normal-navbar/options.jsx b/src/mob/components/navbar/normal-navbar/options.jsx index 1b4f32e..ee01650 100644 --- a/src/mob/components/navbar/normal-navbar/options.jsx +++ b/src/mob/components/navbar/normal-navbar/options.jsx @@ -30,14 +30,62 @@ ] }, { - type: 'number', + type: 'styleInput', field: 'height', label: '楂樺害', initval: wrap.height || 50, - min: 30, - max: 200, - precision: 0, - required: true + required: true, + options: ['px'] + }, + { + type: 'radio', + field: 'switch', + label: '鍒囨崲鏂瑰紡', + initval: wrap.switch || 'default', + tooltip: '榛樿鏃跺湪H5涓細鍒囨崲椤甸潰锛孉PP涓細鍒囨崲鏍囩椤碉紝浣跨敤鏍囩椤垫椂浼氬己鍒朵娇鐢ㄦ爣绛惧垏鎹€��', + required: false, + options: [ + {value: 'default', label: '榛樿'}, + {value: 'tab', label: '鏍囩椤�'}, + ], + controlFields: [ + {field: 'position', values: ['tab']}, + ] + }, + { + type: 'radio', + field: 'position', + label: '鑿滃崟浣嶇疆', + initval: wrap.position || 'bottom', + required: false, + options: [ + {value: 'bottom', label: '搴曢儴'}, + {value: 'left', label: '宸︿晶'}, + {value: 'right', label: '鍙充晶'}, + ], + controlFields: [ + {field: 'marginTop', values: ['left', 'right']}, + ] + }, + { + type: 'radio', + field: 'menuStyle', + label: '鑿滃崟鏍峰紡', + initval: wrap.menuStyle || 'default', + tooltip: '浣跨敤APP涓師鐢熻彍鍗曟爮鏃舵棤鏁堛��', + required: false, + options: [ + {value: 'default', label: '榛樿'}, + {value: 'class1', label: '鏍峰紡浜�'}, + ] + }, + { + type: 'styleInput', + field: 'marginTop', + label: '椤堕儴缂╄繘', + initval: wrap.marginTop || '', + required: false, + options: ['px', 'vh'] }, { type: 'radio', diff --git a/src/mob/components/sharecode/options.jsx b/src/mob/components/sharecode/options.jsx index 560efa3..afd57c9 100644 --- a/src/mob/components/sharecode/options.jsx +++ b/src/mob/components/sharecode/options.jsx @@ -48,7 +48,7 @@ field: 'color', label: '棰滆壊', initval: wrap.color || '#000000', - isHex: true, + colorType: 'hex', required: true }, ] diff --git a/src/mob/components/tabs/antv-tabs/options.jsx b/src/mob/components/tabs/antv-tabs/options.jsx index 664d749..21005e5 100644 --- a/src/mob/components/tabs/antv-tabs/options.jsx +++ b/src/mob/components/tabs/antv-tabs/options.jsx @@ -185,7 +185,8 @@ options: [ {value: 'true', label: '鍚敤'}, {value: 'false', label: '绂佺敤'}, - ] + ], + forbid: sessionStorage.getItem('editMenuType') === 'popview' }, ] diff --git a/src/mob/modulesource/index.jsx b/src/mob/modulesource/index.jsx index 2ee0d7e..debf9c8 100644 --- a/src/mob/modulesource/index.jsx +++ b/src/mob/modulesource/index.jsx @@ -16,7 +16,7 @@ } UNSAFE_componentWillMount () { - const { components } = this.props + const { components, viewType } = this.props let options = [] if (components) { @@ -29,6 +29,10 @@ } } + if (viewType === 'popview') { + options = options.filter(item => !['topbar', 'navbar', 'login', 'officialAccount'].includes(item.component)) + } + this.setState({ menuOptions: options }) diff --git a/src/pc/components/login/normal-login/index.scss b/src/pc/components/login/normal-login/index.scss index 037a7f7..a94c222 100644 --- a/src/pc/components/login/normal-login/index.scss +++ b/src/pc/components/login/normal-login/index.scss @@ -34,7 +34,7 @@ // margin-top: 45px; .login-form-button { width: 100%; - height: 40px; + height: 42px; line-height: 1; font-size: 18px; margin-bottom: 15px; @@ -42,7 +42,7 @@ } .sign-form-button { width: 100%; - height: 40px; + height: 42px; line-height: 1; font-size: 18px; margin-bottom: 15px; diff --git a/src/pc/components/login/normal-login/loginform.jsx b/src/pc/components/login/normal-login/loginform.jsx index fff2af3..154fadd 100644 --- a/src/pc/components/login/normal-login/loginform.jsx +++ b/src/pc/components/login/normal-login/loginform.jsx @@ -152,7 +152,7 @@ <Form.Item> <Input prefix={<UserOutlined style={{ color: 'rgba(0,0,0,.25)' }} />} - placeholder="鐢ㄦ埛鍚�" + placeholder="鐢ㄦ埛鍚�/鎵嬫満鍙�/閭" autoComplete="off" /> </Form.Item> diff --git a/src/pc/components/login/normal-login/options.jsx b/src/pc/components/login/normal-login/options.jsx index 054fd0a..0c49d34 100644 --- a/src/pc/components/login/normal-login/options.jsx +++ b/src/pc/components/login/normal-login/options.jsx @@ -73,12 +73,21 @@ { type: 'styleInput', field: 'height', - label: '楂樺害', + label: '鏈�灏忛珮搴�', initval: wrap.height || '', tooltip: '缁勪欢鍗犵敤鐨勬渶灏忛珮搴︼紝鐢ㄤ簬椤甸潰甯冨眬銆�', required: false, options: ['px', 'vh', 'vw', '%'] }, + // { + // type: 'styleInput', + // field: 'maxWidth', + // label: '鏈�澶у搴�', + // initval: wrap.maxWidth || '', + // tooltip: '缁勪欢鍗犵敤鐨勬渶澶у搴︼紝鐢ㄤ簬椤甸潰甯冨眬銆�', + // required: false, + // options: ['px', 'vh', 'vw', '%'] + // }, { type: 'radio', field: 'topTip', diff --git a/src/store/options.js b/src/store/options.js index ae3d24a..1b159bc 100644 --- a/src/store/options.js +++ b/src/store/options.js @@ -44,4 +44,6 @@ bg_white_style_grass_green: 'mk-grass-green-white', bg_black_style_deep_red: 'mk-deep-red-black', bg_white_style_deep_red: 'mk-deep-red-white', + bg_black_style_deep_blue: 'mk-deep-blue-black', + bg_white_style_deep_blue: 'mk-deep-blue-white', } \ No newline at end of file diff --git a/src/tabviews/custom/components/card/cardItem/index.jsx b/src/tabviews/custom/components/card/cardItem/index.jsx index 438e7a8..224438e 100644 --- a/src/tabviews/custom/components/card/cardItem/index.jsx +++ b/src/tabviews/custom/components/card/cardItem/index.jsx @@ -162,9 +162,14 @@ render() { const { card, data, cards } = this.props + let style = {...card.style} + + if (card.setting.bgField) { + style.backgroundImage = `url('${data[card.setting.bgField] || ''}')` + } return ( - <div className={'card-item-box ' + (card.setting.btnControl || '')} style={card.style} onClick={this.openView} onDoubleClick={this.doubleClick}> + <div className={'card-item-box ' + (card.setting.btnControl || '')} style={style} onClick={this.openView} onDoubleClick={this.doubleClick}> <CardCellComponent data={data} cards={cards} cardCell={card} elements={card.elements}/> {card.setting.type === 'multi' ? <div className={'back-side ' + card.setting.transform} style={card.backStyle}> <CardCellComponent data={data} cards={cards} cardCell={card} elements={card.backElements}/> diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx index 0c35281..8f74c29 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.jsx +++ b/src/tabviews/custom/components/card/cardcellList/index.jsx @@ -237,6 +237,7 @@ if (card.eleType === 'sequence') { let _style = {} + let className = '' if (card.marks) { _style.width = card.innerHeight _style.height = card.innerHeight @@ -245,11 +246,12 @@ let mark = getMark(card.marks, data, _style) _style = mark.style + className = mark.signType } contents.push( <Col key={card.uuid} style={_style_} span={card.width}> <div style={card.style}> - <div className="ant-mk-text line1" style={{height: card.innerHeight || 'auto'}}><span className="sequence-wrap" style={_style}>{data.$Index || ''}</span></div> + <div className={'ant-mk-text line1' + className} style={{height: card.innerHeight || 'auto'}}><span className="sequence-wrap" style={_style}>{data.$Index || ''}</span></div> </div> </Col> ) @@ -362,6 +364,7 @@ } } + let className = '' if (card.marks) { let mark = getMark(card.marks, data, _style) @@ -374,6 +377,7 @@ val = <span>{val} <MkIcon style={mark.innerStyle} type={mark.icon} /></span> } } + className = mark.signType } if (card.link || (card.anchors && card.anchors.length > 0)) { @@ -387,7 +391,7 @@ contents.push( <Col key={card.uuid} style={_style_} span={card.width}> <div style={_style} onClick={(e) => {this.openNewView(e, card)}}> - <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight || 'auto'}}>{val}</div> + <div className={'ant-mk-text line' + (card.height || '') + className} style={{height: card.innerHeight || 'auto'}}>{val}</div> </div> </Col> ) @@ -437,6 +441,7 @@ } } + let className = '' if (card.marks) { let mark = getMark(card.marks, data, _style) @@ -449,12 +454,13 @@ val = <span>{val} <MkIcon style={mark.innerStyle} type={mark.icon} /></span> } } + className = mark.signType } contents.push( <Col key={card.uuid} style={_style_} span={card.width}> <div style={_style}> - <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight || 'auto'}}>{val}</div> + <div className={'ant-mk-text line' + (card.height || '') + className} style={{height: card.innerHeight || 'auto'}}>{val}</div> </div> </Col> ) @@ -747,6 +753,7 @@ } } + let className = '' if (card.marks) { let mark = getMark(card.marks, data, _style) @@ -759,12 +766,13 @@ val = <span>{val} <MkIcon style={mark.innerStyle} type={mark.icon} /></span> } } + className = mark.signType } contents.push( <Col key={card.uuid} style={_style_} span={card.width}> <div style={_style}> - <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight || 'auto'}}>{val}</div> + <div className={'ant-mk-text line' + (card.height || '') + className} style={{height: card.innerHeight || 'auto'}}>{val}</div> </div> </Col> ) diff --git a/src/tabviews/custom/components/card/cardcellList/index.scss b/src/tabviews/custom/components/card/cardcellList/index.scss index 1523314..1eb878d 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.scss +++ b/src/tabviews/custom/components/card/cardcellList/index.scss @@ -92,8 +92,13 @@ padding: 0; overflow: hidden; } - .ant-checkbox-inner, .ant-checkbox-checked::after { - border-radius: 15px; + .ant-checkbox-wrapper:not(.square) { + .ant-checkbox-inner, .ant-checkbox-checked::after { + border-radius: 15px; + } + } + .ant-checkbox-inner { + border-color: #b8b8b8; } } .ant-mk-slider { diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx index b489eaa..121091a 100644 --- a/src/tabviews/custom/components/card/data-card/index.jsx +++ b/src/tabviews/custom/components/card/data-card/index.jsx @@ -111,7 +111,7 @@ } let selected = 'false' - if (_config.wrap.selected === 'always' || _config.wrap.selected === 'init') { + if (_config.wrap.selected === 'always' || _config.wrap.selected === 'init' || _config.wrap.selected === 'sign') { selected = _config.wrap.selected } else { _config.wrap.selected = 'false' @@ -342,17 +342,58 @@ } checkTopLine = (id) => { - const { config, data } = this.state + const { config, data, selected } = this.state + + if (!data || data.length === 0) { + this.setState({ + activeKey: '', + selectKeys: [], + selectedData: [] + }) + + MKEmitter.emit('resetSelectLine', config.uuid, '', '') + if (config.setting.$hasSyncModule) { + MKEmitter.emit('syncBalconyData', config.uuid, [], false) + } + return + } + + if (selected === 'sign') { + let index = '' + let keys = [] + let items = [] + let last = '' + data.forEach((item, i) => { + if (!item.$disabled && item.selected === 'true') { + items.push(item) + keys.push(i) + index = i + last = item + } + }) + + this.setState({ + activeKey: index, + selectKeys: keys, + selectedData: items + }) + + MKEmitter.emit('resetSelectLine', config.uuid, last ? last.$$uuid : '', last) + if (config.setting.$hasSyncModule) { + MKEmitter.emit('syncBalconyData', config.uuid, items, data.length === keys.length) + } + return + } let index = 0 - if (id && data) { + if (id) { index = data.findIndex(item => item.$$uuid === id) if (index === -1) { index = 0 } } - if (!data || data.length === 0 || data[index].$disabled) { + if (data[index].$disabled) { this.setState({ activeKey: '', selectKeys: [], diff --git a/src/tabviews/custom/components/card/data-card/index.scss b/src/tabviews/custom/components/card/data-card/index.scss index 1b7e271..77c2788 100644 --- a/src/tabviews/custom/components/card/data-card/index.scss +++ b/src/tabviews/custom/components/card/data-card/index.scss @@ -24,7 +24,7 @@ >.card-item-box { cursor: not-allowed; color: #bcbcbc; - .ant-mk-text, .ant-mk-date, .anticon { + .ant-mk-text, .anticon { color: #bcbcbc!important; span { color: #bcbcbc!important; diff --git a/src/tabviews/custom/components/chart/antv-G6/index.jsx b/src/tabviews/custom/components/chart/antv-G6/index.jsx index ab35200..8eac201 100644 --- a/src/tabviews/custom/components/chart/antv-G6/index.jsx +++ b/src/tabviews/custom/components/chart/antv-G6/index.jsx @@ -27,7 +27,8 @@ purple: '#722ed1', magenta: '#eb2f96', grass_green: '#aeb303', - deep_red: '#c32539' + deep_red: '#c32539', + deep_blue: '#1d3661' } let systemColor = '#1890ff' diff --git a/src/tabviews/custom/components/module/voucher/assistTable/index.jsx b/src/tabviews/custom/components/module/voucher/assistTable/index.jsx index 9c56276..4a5edb7 100644 --- a/src/tabviews/custom/components/module/voucher/assistTable/index.jsx +++ b/src/tabviews/custom/components/module/voucher/assistTable/index.jsx @@ -7,9 +7,6 @@ import Api from '@/api' import Utils from '@/utils/utils.js' import MKEmitter from '@/utils/events.js' -import zhCN from '@/locales/zh-CN/main.js' -import enUS from '@/locales/en-US/main.js' -import '@/assets/css/table.scss' import './index.scss' class BodyRow extends React.Component { @@ -211,7 +208,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, data: [], edData: [], edColumns: [], @@ -648,12 +644,12 @@ if (res && res.ErrCode === 'S') { // 鎵ц鎴愬姛 notification.success({ top: 92, - message: res.ErrMesg || this.state.dict['main.action.confirm.success'], + message: res.ErrMesg || '鎵ц鎴愬姛', duration: submit.stime ? submit.stime : 2 }) } else if (res && res.ErrCode === 'Y') { // 鎵ц鎴愬姛 Modal.success({ - title: res.ErrMesg || this.state.dict['main.action.confirm.success'] + title: res.ErrMesg || '鎵ц鎴愬姛' }) } else if (res && res.ErrCode === '-1') { // 瀹屾垚鍚庝笉鎻愮ず diff --git a/src/tabviews/custom/components/module/voucher/index.jsx b/src/tabviews/custom/components/module/voucher/index.jsx index e423749..2eb3f9c 100644 --- a/src/tabviews/custom/components/module/voucher/index.jsx +++ b/src/tabviews/custom/components/module/voucher/index.jsx @@ -24,6 +24,9 @@ disableAdd: false, disableSave: false, typeOptions: [], + charType: '', + charInt: '', + vouDate: null, book: null } @@ -109,7 +112,13 @@ return } - + let typeOptions = res.char || [] + + this.setState({ + typeOptions: typeOptions, + charType: typeOptions[0] ? typeOptions[0].voucher_class : '', + charInt: typeOptions[0] ? typeOptions[0].voucher_char_int : '', + }) }) } @@ -125,8 +134,12 @@ } + changeVoucherDate = () => { + + } + render() { - const { config, disableSave, disableAdd, typeOptions, data } = this.state + const { config, disableSave, disableAdd, typeOptions, charType, charInt, data } = this.state return ( <div className="menu-voucher-wrap" style={config.style}> @@ -140,15 +153,15 @@ {config.wrap.type === 'edit' ? <div className="voucher-body"> <div className="pre-wrap"> <div className="voucher-code"> - <Select dropdownClassName="mk-vcode-dropdown"> + <Select value={charType} dropdownClassName="mk-vcode-dropdown" onChange={(val, option) => this.setState({charType: val, charInt: option.props.charInt})}> {typeOptions.map(option => - <Select.Option value={option.value}>{option.label}</Select.Option> + <Select.Option value={option.voucher_class} charInt={option.voucher_char_int}>{option.voucher_char}</Select.Option> )} </Select> - <Input autoComplete="off" /> 鍙� + <Input value={charInt} autoComplete="off" onChange={(e) => this.setState({charInt: e.target.value})}/> 鍙� </div> <div className="voucher-date"> - 鏃ユ湡锛�<DatePicker onChange={this.onChange}/> + 鏃ユ湡锛�<DatePicker onChange={this.changeVoucherDate}/> </div> <div className="voucher-affix"> 闄勫崟鎹� <Input autoComplete="off" /> 寮� diff --git a/src/tabviews/custom/components/module/voucher/voucherTable/index.jsx b/src/tabviews/custom/components/module/voucher/voucherTable/index.jsx index 2bcbd81..8d5240d 100644 --- a/src/tabviews/custom/components/module/voucher/voucherTable/index.jsx +++ b/src/tabviews/custom/components/module/voucher/voucherTable/index.jsx @@ -8,7 +8,6 @@ import MKEmitter from '@/utils/events.js' import zhCN from '@/locales/zh-CN/main.js' import enUS from '@/locales/en-US/main.js' -import '@/assets/css/table.scss' import './index.scss' class BodyRow extends React.Component { diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx index 7cb3013..5c7df59 100644 --- a/src/tabviews/custom/components/share/normalTable/index.jsx +++ b/src/tabviews/custom/components/share/normalTable/index.jsx @@ -8,10 +8,7 @@ import { getMark } from '@/utils/utils.js' import MkIcon from '@/components/mk-icon' import MKEmitter from '@/utils/events.js' -import zhCN from '@/locales/zh-CN/main.js' -import enUS from '@/locales/en-US/main.js' import Encrypts from '@/components/encrypts' -import '@/assets/css/table.scss' import './index.scss' const { Paragraph } = Typography @@ -416,7 +413,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, tableId: '', // 琛ㄦ牸ID selectedRowKeys: [], // 琛ㄦ牸涓�変腑琛� pageIndex: 1, // 鍒濆椤甸潰绱㈠紩 @@ -618,10 +614,32 @@ this.props.refreshdata({pageIndex}) } - mkCheckTopLine = (menuId, id) => { + mkCheckTopLine = (menuId, id, type) => { const { MenuID, data, setting } = this.props if (MenuID !== menuId || !data || data.length === 0) return + + if (type === 'sign') { + let index = '' + let keys = [] + let items = [] + data.forEach((item, i) => { + if (!item.$disabled && item.selected === 'true') { + items.push(item) + keys.push(i) + index = i + } + }) + + this.changedata(index) + this.setState({ selectedRowKeys: keys, activeIndex: index }) + this.props.chgSelectData(items) + + if (setting.$hasSyncModule) { + MKEmitter.emit('syncBalconyData', MenuID, items, data.length === keys.length) + } + return + } let index = 0 if (id) { @@ -720,7 +738,7 @@ /** * */ - onSelectChange = selectedRowKeys => { + onSelectChange = (selectedRowKeys, e) => { const { setting, MenuID, data } = this.props let index = '' @@ -950,7 +968,7 @@ pageSizeOptions: pageOptions, showSizeChanger: true, total: this.props.total || 0, - showTotal: (total, range) => `${range[0]}-${range[1]} ${this.state.dict['main.pagination.of']} ${total} ${this.state.dict['main.pagination.items']}` + showTotal: (total, range) => `${range[0]}-${range[1]} 鍏� ${total} 鏉 } } @@ -961,6 +979,10 @@ } let height = setting.height || false + let loading = this.props.loading + if (setting.mask === 'hidden') { + loading = false + } return ( <div className={`normal-custom-table ${setting.tableHeader || ''} ${height ? 'fixed-height' : ''} ${setting.mode || ''} table-vertical-${setting.vertical || ''}`} id={tableId}> @@ -974,7 +996,7 @@ rowSelection={rowSelection} columns={this.state.columns} dataSource={_data} - loading={this.props.loading} + loading={loading} scroll={{ x: '100%', y: height }} onRow={(record, index) => { return { diff --git a/src/tabviews/custom/components/share/normalTable/index.scss b/src/tabviews/custom/components/share/normalTable/index.scss index e27e134..5a96fe8 100644 --- a/src/tabviews/custom/components/share/normalTable/index.scss +++ b/src/tabviews/custom/components/share/normalTable/index.scss @@ -219,6 +219,11 @@ table tbody tr { color: var(--mk-table-color); } + // table tbody { + // tr:nth-child(even) { + // background: #f5f5f5; + // } + // } } .normal-custom-table:not(.fixed-height) { .ant-table-body::-webkit-scrollbar { diff --git a/src/tabviews/custom/components/table/base-table/index.jsx b/src/tabviews/custom/components/table/base-table/index.jsx index c4753cc..5114db7 100644 --- a/src/tabviews/custom/components/table/base-table/index.jsx +++ b/src/tabviews/custom/components/table/base-table/index.jsx @@ -70,7 +70,7 @@ let setting = {..._config.setting, ..._config.wrap} - if (setting.selected !== 'always' && setting.selected !== 'init') { + if (setting.selected !== 'always' && setting.selected !== 'init' && setting.selected !== 'sign') { setting.selected = 'false' } else { setting.orisel = true @@ -159,7 +159,7 @@ if (result.status) { if ((setting.selected !== 'false' || (setting.orisel && id)) && result.data && result.data.length > 0) { setTimeout(() => { - MKEmitter.emit('mkCheckTopLine', config.uuid, id) + MKEmitter.emit('mkCheckTopLine', config.uuid, id, setting.selected) }, 200) if (setting.selected === 'init') { this.setState({setting: {...setting, selected: 'false'}}) diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx index b2fdec6..993a997 100644 --- a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx @@ -14,7 +14,6 @@ import enUS from '@/locales/en-US/main.js' import CusSwitch from './cusSwitch' import Encrypts from '@/components/encrypts' -import '@/assets/css/table.scss' import './index.scss' const { Paragraph } = Typography diff --git a/src/tabviews/custom/components/table/normal-table/index.jsx b/src/tabviews/custom/components/table/normal-table/index.jsx index 9349ff3..87c85cb 100644 --- a/src/tabviews/custom/components/table/normal-table/index.jsx +++ b/src/tabviews/custom/components/table/normal-table/index.jsx @@ -78,7 +78,7 @@ let setting = {..._config.setting, ..._config.wrap} - if (setting.selected !== 'always' && setting.selected !== 'init') { + if (setting.selected !== 'always' && setting.selected !== 'init' && setting.selected !== 'sign') { setting.selected = 'false' } else { setting.orisel = true @@ -120,7 +120,7 @@ if (setting.selected !== 'false' && _data && _data.length > 0) { setTimeout(() => { - MKEmitter.emit('mkCheckTopLine', _config.uuid) + MKEmitter.emit('mkCheckTopLine', _config.uuid, '', setting.selected) }, 200) if (setting.selected === 'init') { setting.selected = 'false' @@ -236,7 +236,7 @@ if (result.status) { if ((setting.selected !== 'false' || (setting.orisel && id)) && result.data && result.data.length > 0) { setTimeout(() => { - MKEmitter.emit('mkCheckTopLine', config.uuid, id) + MKEmitter.emit('mkCheckTopLine', config.uuid, id, setting.selected) }, 200) if (setting.selected === 'init') { this.setState({setting: {...setting, selected: 'false'}}) @@ -636,7 +636,7 @@ if (setting.selected !== 'false' && _data && _data.length > 0) { setTimeout(() => { - MKEmitter.emit('mkCheckTopLine', config.uuid) + MKEmitter.emit('mkCheckTopLine', config.uuid, '', setting.selected) }, 200) if (setting.selected === 'init') { this.setState({setting: {...setting, selected: 'false'}}) diff --git a/src/tabviews/zshare/actionList/index.jsx b/src/tabviews/zshare/actionList/index.jsx index 911e141..94ab9c5 100644 --- a/src/tabviews/zshare/actionList/index.jsx +++ b/src/tabviews/zshare/actionList/index.jsx @@ -203,7 +203,7 @@ <div className="button-list toolbar-button" id={fixed ? MenuID + 'mainaction' : ''}> {this.getButtonList(actions)} {mores ? <Dropdown overlay={<div className="mk-button-dropdown-wrap">{this.getButtonList(mores)}</div>} trigger={['hover']}> - <div className="mk-more">鏇村<DownOutlined/></div> + <div className="mk-button-more">鏇村<DownOutlined/></div> </Dropdown> : null} </div> </Affix> @@ -213,7 +213,7 @@ <div className="button-list toolbar-button" id={fixed ? MenuID + 'mainaction' : ''}> {this.getButtonList(actions)} {mores ? <Dropdown overlay={<div className="mk-button-dropdown-wrap">{this.getButtonList(mores)}</div>} trigger={['hover']}> - <div className="mk-more">鏇村<DownOutlined/></div> + <div className="mk-button-more">鏇村<DownOutlined/></div> </Dropdown> : null} </div> ) diff --git a/src/tabviews/zshare/actionList/index.scss b/src/tabviews/zshare/actionList/index.scss index 69b5302..8efb160 100644 --- a/src/tabviews/zshare/actionList/index.scss +++ b/src/tabviews/zshare/actionList/index.scss @@ -26,7 +26,7 @@ display: none; } } -.mk-more { +.mk-button-more { display: inline-block; height: 28px; border: 1px solid #d8d8d8; diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index 489b48e..0654d5f 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -867,7 +867,7 @@ } // 娣诲姞鏁版嵁涓瓧娈碉紝琛ㄥ崟鍊间紭鍏�(鎸夐挳涓嶉�夎鎴栧琛屾嫾鎺ユ椂璺宠繃) - if (data && btn.Ot !== 'notRequired' && btn.Ot !== 'requiredOnce' && columns && columns.length > 0) { + if (data && btn.Ot !== 'notRequired' && columns && columns.length > 0) { datavars = {...data, ...datavars} const setField = (col) => { @@ -2680,7 +2680,7 @@ if (btn.formType === 'switch') { return <Switch loading={loading} checked={check} disabled={disabled || loading} title={disabled ? (btn.reason || '') : ''} onChange={(val,e) => {e.stopPropagation();this.actionTrigger()}} style={btn.style} className={btn.size === 'large' ? 'ant-switch-large' : ''} size={btn.size} checkedChildren={btn.openText || ''} unCheckedChildren={btn.closeText || ''}/> } else if (btn.formType === 'radio') { - return <Checkbox disabled={disabled || loading} title={disabled ? (btn.reason || '') : ''} checked={check} onChange={(e) => {e.stopPropagation();this.actionTrigger()}} style={btn.style}></Checkbox> + return <Checkbox className={btn.checkType || ''} disabled={disabled || loading} title={disabled ? (btn.reason || '') : ''} checked={check} onChange={(e) => {e.stopPropagation();this.actionTrigger()}} style={btn.style}></Checkbox> } else { return <Button type="link" icon="scan" disabled={true} style={btn.style} onClick={(e) => {e.stopPropagation()}}></Button> } diff --git a/src/tabviews/zshare/mutilform/mkColor/index.jsx b/src/tabviews/zshare/mutilform/mkColor/index.jsx index 562708b..e101e12 100644 --- a/src/tabviews/zshare/mutilform/mkColor/index.jsx +++ b/src/tabviews/zshare/mutilform/mkColor/index.jsx @@ -29,7 +29,7 @@ handleChange = (color) => { let _color = `rgba(${ color.rgb.r }, ${ color.rgb.g }, ${ color.rgb.b }, ${ color.rgb.a })` - if (!this.props.config.isHex) { + if (this.props.config.colorType !== 'hex') { this.setState({ color: _color }, () => { this.props.onChange(_color) }) diff --git a/src/tabviews/zshare/normalTable/index.scss b/src/tabviews/zshare/normalTable/index.scss index 75c4770..931fee4 100644 --- a/src/tabviews/zshare/normalTable/index.scss +++ b/src/tabviews/zshare/normalTable/index.scss @@ -232,6 +232,11 @@ display: block; } } + // table tbody { + // tr:nth-child(even) { + // background: #f9f9f9; + // } + // } } .image-scale-modal { width: 70vw; diff --git a/src/tabviews/zshare/topSearch/index.jsx b/src/tabviews/zshare/topSearch/index.jsx index 0b4ad56..9c98c03 100644 --- a/src/tabviews/zshare/topSearch/index.jsx +++ b/src/tabviews/zshare/topSearch/index.jsx @@ -4,6 +4,7 @@ import { Form, Row, Col, Button, notification, Modal, Drawer } from 'antd' import { CloseOutlined, DownOutlined } from '@ant-design/icons' import moment from 'moment' +import md5 from 'md5' import Api from '@/api' import options from '@/store/options.js' @@ -37,6 +38,7 @@ } record = {} + sign = '' UNSAFE_componentWillMount () { const { config, searchlist, setting } = this.props @@ -636,6 +638,15 @@ } } + let sign = md5(JSON.stringify(searches)) + + if (sign === this.sign) return + + this.sign = sign + setTimeout(() => { + this.sign = '' + }, 2000) + this.props.refreshdata(searches) }) }) diff --git a/src/templates/modalconfig/dragelement/index.scss b/src/templates/modalconfig/dragelement/index.scss index a221984..df834a2 100644 --- a/src/templates/modalconfig/dragelement/index.scss +++ b/src/templates/modalconfig/dragelement/index.scss @@ -124,6 +124,9 @@ width: 89.5%; } } + .ant-form-item label > .anticon { + vertical-align: middle; + } } .modal-fields-row.up_down { .ant-form-item { diff --git a/src/templates/modalconfig/settingform/index.jsx b/src/templates/modalconfig/settingform/index.jsx index 4404212..e3b7b22 100644 --- a/src/templates/modalconfig/settingform/index.jsx +++ b/src/templates/modalconfig/settingform/index.jsx @@ -256,7 +256,7 @@ </Form.Item> </Col> : null} {display === 'drawer' ? <Col span={12}> - <Form.Item label="鎶藉眽鏂瑰悜"> + <Form.Item label="寮瑰嚭鏂瑰悜"> {getFieldDecorator('placement', { initialValue: placement })( diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx index d3bc305..6fe2b7c 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx @@ -868,10 +868,9 @@ if (this.scriptsForm && this.scriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.scriptsForm.props.form.getFieldValue('sql'))) { notification.warning({ top: 92, - message: '瀛樺湪鏈繚瀛樿剼鏈紝璇风偣鍑荤‘瀹氫繚瀛橈紝鎴栫偣鍑诲彇娑堟斁寮冧慨鏀癸紒', + message: '瀛樺湪鏈繚瀛樿剼鏈紒', duration: 5 }) - return } this.setState({loading: true}) diff --git a/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx index b7d47e3..832945f 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx @@ -554,10 +554,9 @@ if (this.scriptsForm && this.scriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.scriptsForm.props.form.getFieldValue('sql'))) { notification.warning({ top: 92, - message: '瀛樺湪鏈繚瀛樿剼鏈紝璇风偣鍑荤‘瀹氫繚瀛橈紝鎴栫偣鍑诲彇娑堟斁寮冧慨鏀癸紒', + message: '瀛樺湪鏈繚瀛樿剼鏈紒', duration: 5 }) - return } this.setState({loading: true}) diff --git a/src/templates/sharecomponent/searchcomponent/settingform/index.jsx b/src/templates/sharecomponent/searchcomponent/settingform/index.jsx index 584dfb4..a131ad6 100644 --- a/src/templates/sharecomponent/searchcomponent/settingform/index.jsx +++ b/src/templates/sharecomponent/searchcomponent/settingform/index.jsx @@ -89,7 +89,7 @@ <Form.Item label={ <Tooltip placement="topLeft" title="鎶藉眽灞曞紑鐨勬柟鍚戙��"> <QuestionCircleOutlined className="mk-form-tip" /> - 鎶藉眽鏂瑰悜 + 寮瑰嚭鏂瑰悜 </Tooltip> }> {getFieldDecorator('drawerPlacement', { diff --git a/src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx b/src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx index 66977c5..1280859 100644 --- a/src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx +++ b/src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx @@ -182,10 +182,9 @@ if (_loading) { notification.warning({ top: 92, - message: '瀛樺湪鏈繚瀛樿剼鏈紝璇风偣鍑荤‘瀹氫繚瀛橈紝鎴栫偣鍑诲彇娑堟斁寮冧慨鏀癸紒', + message: '瀛樺湪鏈繚瀛樿剼鏈紒', duration: 5 }) - return } this.setState({loading: true}) diff --git a/src/templates/sharecomponent/settingcomponent/settingform/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/index.jsx index 3ed654e..5e8df8d 100644 --- a/src/templates/sharecomponent/settingcomponent/settingform/index.jsx +++ b/src/templates/sharecomponent/settingcomponent/settingform/index.jsx @@ -363,10 +363,9 @@ if (this.scriptsForm && this.scriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.scriptsForm.props.form.getFieldValue('sql'))) { notification.warning({ top: 92, - message: '瀛樺湪鏈繚瀛樿剼鏈紝璇风偣鍑荤‘瀹氫繚瀛橈紝鎴栫偣鍑诲彇娑堟斁寮冧慨鏀癸紒', + message: '瀛樺湪鏈繚瀛樼殑鑴氭湰锛�', duration: 5 }) - return } if (activeKey === 'setting') { diff --git a/src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx b/src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx index bc1225f..31c37e5 100644 --- a/src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx +++ b/src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx @@ -212,10 +212,9 @@ if (_loading) { notification.warning({ top: 92, - message: '瀛樺湪鏈繚瀛樿剼鏈紝璇风偣鍑荤‘瀹氫繚瀛橈紝鎴栫偣鍑诲彇娑堟斁寮冧慨鏀癸紒', + message: '瀛樺湪鏈繚瀛樿剼鏈紒', duration: 5 }) - return } this.setState({loading: true}) this.sqlverify(() => { // 楠岃瘉鎴愬姛 diff --git a/src/templates/zshare/createinterface/index.jsx b/src/templates/zshare/createinterface/index.jsx index e8a565b..ab76039 100644 --- a/src/templates/zshare/createinterface/index.jsx +++ b/src/templates/zshare/createinterface/index.jsx @@ -1064,7 +1064,7 @@ } else if (_actionType === 'LogicDelete') { // 閫昏緫鍒犻櫎 _sql += ` /* 榛樿sql */ - update ${btn.sql} set deleted=1,modifydate=getdate(),modifyuser=@username,modifyuserid=@userid@ where ${primaryKey}=@${primaryKey}@;` + update ${btn.sql} set deleted=1,modifydate=getdate(),modifyuser=@username,modifystaff=@fullname,modifyuserid=@userid@ where ${primaryKey}=@${primaryKey}@;` } else if (_actionType === 'delete') { // 鐗╃悊鍒犻櫎 let _msg = '' diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index b11d8ca..6626b9b 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -1447,7 +1447,7 @@ { type: 'radio', key: 'placement', - label: '鎶藉眽鏂瑰悜', + label: '寮瑰嚭鏂瑰悜', initVal: card.placement || 'right', required: false, options: [{ @@ -3217,6 +3217,19 @@ }, { type: 'radio', + key: 'colorType', + label: '棰滆壊绫诲瀷', + initVal: card.colorType || 'hex', + options: [{ + value: 'hex', + text: '16杩涘埗' + }, { + value: 'rgba', + text: 'RGBA' + }] + }, + { + type: 'radio', key: 'allowHalf', label: '鍗婇��', initVal: card.allowHalf || 'false', @@ -3685,7 +3698,7 @@ key: 'regularExtra', label: '姝e垯鎵╁睍绗�', initVal: card.regularExtra || '', - tooltip: '姝e垯楠岃瘉鏃剁殑鑷畾涔夊瓧绗︼紝鍖呮嫭~!@#$%^&*()_+:;{}<>,.-', + tooltip: '姝e垯楠岃瘉鏃跺厑璁告坊鍔犵殑鑷畾涔夊瓧绗︼紝鍖呮嫭~!@#$%^&*()_+:;{}<>,.-', required: false, readonly: false }, diff --git a/src/templates/zshare/modalform/index.jsx b/src/templates/zshare/modalform/index.jsx index 2cd53c8..db416fb 100644 --- a/src/templates/zshare/modalform/index.jsx +++ b/src/templates/zshare/modalform/index.jsx @@ -34,7 +34,7 @@ datetime: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'marginTop', 'marginBottom', 'minDate', 'maxDate'], textarea: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'span', 'labelwidth', 'maxRows', 'encryption', 'interception', 'tooltip', 'extra', 'count', 'placeholder', 'marginTop', 'marginBottom'], cascader: ['readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'marginTop', 'marginBottom', 'separator'], - color: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'marginTop', 'marginBottom'], + color: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'colorType', 'extra', 'marginTop', 'marginBottom'], rate: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'splitline', 'tooltip', 'extra', 'marginTop', 'marginBottom', 'allowHalf', 'color', 'rateCount', 'character', 'place'], hint: ['label', 'field', 'type', 'blacklist', 'message', 'span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'], split: ['label', 'type', 'marginTop', 'marginBottom', 'splitline'], diff --git a/src/templates/zshare/verifycard/index.jsx b/src/templates/zshare/verifycard/index.jsx index a8cbb97..ab8d74c 100644 --- a/src/templates/zshare/verifycard/index.jsx +++ b/src/templates/zshare/verifycard/index.jsx @@ -921,10 +921,10 @@ if (_verify.voucher && _verify.voucher.enabled) { _voucher = ',BVoucher=@BVoucher,FIBVoucherDate=@FIBVoucherDate,FiYear=@FiYear' } - _defaultsql = `update ${card.sql} set deleted=1,modifydate=getdate(),modifyuser=@username,modifyuserid=@userid@${_voucher} where ${_primaryKey}${card.Ot !== 'requiredOnce' ? '=@ID@' : ' in (select ID from dbo.SplitComma(@ID@))'};` + _defaultsql = `update ${card.sql} set deleted=1,modifydate=getdate(),modifyuser=@username,modifystaff=@fullname,modifyuserid=@userid@${_voucher} where ${_primaryKey}${card.Ot !== 'requiredOnce' ? '=@ID@' : ' in (select ID from dbo.SplitComma(@ID@))'};` } else if (card.sqlType === 'delete') { let _msg = '' - if (columns && columns.length > 0 && card.Ot !== 'notRequired' && card.Ot !== 'requiredOnce') { + if (columns && columns.length > 0 && card.Ot !== 'notRequired') { let _index = 0 columns.forEach(col => { if (!col.field || col.Hide === 'true' || _index >= 4) return diff --git a/src/utils/utils.js b/src/utils/utils.js index 8616197..2a82699 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -1487,7 +1487,7 @@ } // 娣诲姞鏁版嵁涓瓧娈碉紝琛ㄥ崟鍊间紭鍏�(鎸夐挳涓嶉�夎鎴栧琛屾嫾鎺ユ椂璺宠繃) - if (data && btn.Ot !== 'notRequired' && btn.Ot !== 'requiredOnce' && columns && columns.length > 0) { + if (data && btn.Ot !== 'notRequired' && columns && columns.length > 0) { datavars = {...data, ...datavars} const setField = (col) => { @@ -2042,17 +2042,16 @@ _sql += ` /* 榛樿sql */ - update ${btn.sql} set deleted=1,modifydate=getdate(),modifyuser=@username,modifyuserid=@userid@ where ${primaryKey}${_ID};` + update ${btn.sql} set deleted=1,modifydate=getdate(),modifyuser=@username,modifystaff=@fullname,modifyuserid=@userid@ where ${primaryKey}${_ID};` } else if (_actionType === 'delete') { // 鐗╃悊鍒犻櫎 let _msg = '' - if (data && columns && columns.length > 0) { + if (data && columns && columns.length > 0 && btn.Ot !== 'notRequired') { let _index = 0 columns.forEach(col => { - if (col.Hide !== 'true' && col.type !== 'colspan' && col.type !== 'old_colspan' && _index < 4) { - _msg += col.label + '=' + data[col.field] + ',' - _index++ - } + if (!col.field || col.Hide === 'true' || _index >= 4) return + _msg += col.label + '=' + data[col.field] + ',' + _index++ }) } @@ -2149,6 +2148,7 @@ let icon = null let innerStyle = null let position = null + let signType = '' style = JSON.parse(JSON.stringify(style)) marks.some(mark => { @@ -2186,6 +2186,7 @@ if (type === 'font') { style.color = mark.color innerStyle = {color: mark.color} + signType = ' sign-font' } else if (type === 'background') { style.backgroundColor = mark.color if (mark.fontColor) { @@ -2217,7 +2218,8 @@ style, icon, innerStyle, - position + position, + signType } } diff --git a/src/views/appcheck/index.jsx b/src/views/appcheck/index.jsx index 8736e78..49c4d5b 100644 --- a/src/views/appcheck/index.jsx +++ b/src/views/appcheck/index.jsx @@ -27,7 +27,8 @@ bg_black_style_purple: {name: '绱壊', color: '#722ed1'}, bg_black_style_magenta: {name: '娲嬬孩鑹�', color: '#eb2f96'}, bg_black_style_grass_green: {name: '鑽夌豢鑹�', color: '#aeb303'}, - bg_black_style_deep_red: {name: '娣辩孩鑹�', color: '#c32539'} + bg_black_style_deep_red: {name: '娣辩孩鑹�', color: '#c32539'}, + bg_black_style_deep_blue: {name: '娣辩孩鑹�', color: '#1d3661'} } class AppCheck extends Component { diff --git a/src/views/appmanage/index.jsx b/src/views/appmanage/index.jsx index 2861ae7..3b7bf87 100644 --- a/src/views/appmanage/index.jsx +++ b/src/views/appmanage/index.jsx @@ -39,7 +39,8 @@ bg_black_style_purple: {name: '绱壊', color: '#722ed1'}, bg_black_style_magenta: {name: '娲嬬孩鑹�', color: '#eb2f96'}, bg_black_style_grass_green: {name: '鑽夌豢鑹�', color: '#aeb303'}, - bg_black_style_deep_red: {name: '娣辩孩鑹�', color: '#c32539'} + bg_black_style_deep_red: {name: '娣辩孩鑹�', color: '#c32539'}, + bg_black_style_deep_blue: {name: '娣辩孩鑹�', color: '#1d3661'} } class AppManage extends Component { diff --git a/src/views/appmanage/submutilform/index.jsx b/src/views/appmanage/submutilform/index.jsx index 5c1b1d8..9c4cb9c 100644 --- a/src/views/appmanage/submutilform/index.jsx +++ b/src/views/appmanage/submutilform/index.jsx @@ -152,6 +152,7 @@ <Select.Option value="bg_black_style_magenta"><span className="color-block" style={{background: '#eb2f96'}}></span>娲嬬孩鑹诧紙#eb2f96锛�</Select.Option> <Select.Option value="bg_black_style_grass_green"><span className="color-block" style={{background: '#aeb303'}}></span>鑽夌豢鑹诧紙#aeb303锛�</Select.Option> <Select.Option value="bg_black_style_deep_red"><span className="color-block" style={{background: '#c32539'}}></span>娣辩孩鑹诧紙#c32539锛�</Select.Option> + <Select.Option value="bg_black_style_deep_blue"><span className="color-block" style={{background: '#1d3661'}}></span>娣辫摑鑹诧紙#1d3661锛�</Select.Option> </Select> )} </Form.Item> diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx index 381ae5d..5855e79 100644 --- a/src/views/login/index.jsx +++ b/src/views/login/index.jsx @@ -133,16 +133,16 @@ let level = localStorage.getItem(_href + 'pwdlevel') - if (level) { + if (level && process.env.NODE_ENV === 'production') { let visible = false let tip = '瀵嗙爜寮哄害涓嶅锛岃淇敼瀵嗙爜锛�' if (param.password.length < 8) { visible = true } else if (level === 'letter_num' && /^([^0-9]*|[^a-zA-Z]*)$/.test(param.password)) { visible = true - } else if ((level === 'char_num' || level === 'char_num_90') && /^([^0-9]*|[^a-zA-Z]*|[^!@#$%^&*()_]*)$/.test(param.password)) { + } else if ((level === 'char_num' || level === 'char_num_90' || level === 'char_num_90_sms') && /^([^0-9]*|[^a-zA-Z]*|[^!@#$%^&*()_]*)$/.test(param.password)) { visible = true - } else if (level === 'char_num_90' && res.modifydate) { + } else if ((level === 'char_num_90' || level === 'char_num_90_sms') && res.modifydate) { let s = (new Date().getTime() - new Date(res.modifydate).getTime()) / (1000 * 24 * 60 * 60) if (!isNaN(s) && s > 90) { visible = true @@ -619,7 +619,7 @@ let level = res.pwd_level || '' - if (level && !['letter_num', 'char_num', 'char_num_90'].includes(level)) { + if (level && !['letter_num', 'char_num', 'char_num_90', 'char_num_90_sms'].includes(level)) { level = '' } diff --git a/src/views/menudesign/homeform/index.jsx b/src/views/menudesign/homeform/index.jsx index 5ab9965..1fc96b3 100644 --- a/src/views/menudesign/homeform/index.jsx +++ b/src/views/menudesign/homeform/index.jsx @@ -103,6 +103,8 @@ this.props.updateConfig({...config, cacheUseful: value}) } else if (key === 'timeUnit') { this.props.updateConfig({...config, timeUnit: value}) + } else if (key === 'cacheLocal') { + this.props.updateConfig({...config, cacheLocal: value}) } } @@ -132,9 +134,26 @@ <Row> <Col span={24}> <Form.Item label={ + <Tooltip placement="topLeft" title="鏁版嵁浼氱紦瀛樺埌鐢ㄦ埛鏈湴锛屾柟渚块〉闈㈠揩閫熷憟鐜般��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鏈湴缂撳瓨 + </Tooltip> + }> + {getFieldDecorator('cacheLocal', { + initialValue: config.cacheLocal || 'false' + })( + <Radio.Group onChange={(e) => {this.selectChange('cacheLocal', e.target.value)}}> + <Radio value="true">浣跨敤</Radio> + <Radio value="false">涓嶄娇鐢�</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> + <Col span={24}> + <Form.Item label={ <Tooltip placement="topLeft" title="瀵逛簬涓嶇粡甯告�у彉鍔ㄧ殑淇℃伅锛岀紦瀛樻暟鎹湁鍔╀簬鎻愰珮鏌ヨ鏁堢巼銆�"> <QuestionCircleOutlined className="mk-form-tip" /> - 缂撳瓨鏁版嵁 + 鍚庣缂撳瓨 </Tooltip> }> {getFieldDecorator('cacheUseful', { diff --git a/src/views/menudesign/menuform/index.jsx b/src/views/menudesign/menuform/index.jsx index dc39e55..bd6d38f 100644 --- a/src/views/menudesign/menuform/index.jsx +++ b/src/views/menudesign/menuform/index.jsx @@ -205,6 +205,8 @@ this.props.updateConfig({...config, hidden: value}) } else if (key === 'permission') { this.props.updateConfig({...config, permission: value}) + } else if (key === 'cacheLocal') { + this.props.updateConfig({...config, cacheLocal: value}) } } @@ -340,9 +342,26 @@ </Col> <Col span={24}> <Form.Item label={ + <Tooltip placement="topLeft" title="鏁版嵁浼氱紦瀛樺埌鐢ㄦ埛鏈湴锛屾柟渚块〉闈㈠揩閫熷憟鐜般��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鏈湴缂撳瓨 + </Tooltip> + }> + {getFieldDecorator('cacheLocal', { + initialValue: config.cacheLocal || 'false' + })( + <Radio.Group onChange={(e) => {this.selectChange('cacheLocal', e.target.value)}}> + <Radio value="true">浣跨敤</Radio> + <Radio value="false">涓嶄娇鐢�</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> + <Col span={24}> + <Form.Item label={ <Tooltip placement="topLeft" title="瀵逛簬涓嶇粡甯告�у彉鍔ㄧ殑淇℃伅锛岀紦瀛樻暟鎹湁鍔╀簬鎻愰珮鏌ヨ鏁堢巼銆�"> <QuestionCircleOutlined className="mk-form-tip" /> - 缂撳瓨鏁版嵁 + 鍚庣缂撳瓨 </Tooltip> }> {getFieldDecorator('cacheUseful', { diff --git a/src/views/menudesign/popview/menuform/index.jsx b/src/views/menudesign/popview/menuform/index.jsx index a925865..d2899a2 100644 --- a/src/views/menudesign/popview/menuform/index.jsx +++ b/src/views/menudesign/popview/menuform/index.jsx @@ -25,6 +25,8 @@ this.props.updateConfig({...config, cacheUseful: value}) } else if (key === 'timeUnit') { this.props.updateConfig({...config, timeUnit: value}) + } else if (key === 'cacheLocal') { + this.props.updateConfig({...config, cacheLocal: value}) } } @@ -47,9 +49,26 @@ <Row> <Col span={24}> <Form.Item label={ + <Tooltip placement="topLeft" title="鏁版嵁浼氱紦瀛樺埌鐢ㄦ埛鏈湴锛屾柟渚块〉闈㈠揩閫熷憟鐜般��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鏈湴缂撳瓨 + </Tooltip> + }> + {getFieldDecorator('cacheLocal', { + initialValue: config.cacheLocal || 'false' + })( + <Radio.Group onChange={(e) => {this.selectChange('cacheLocal', e.target.value)}}> + <Radio value="true">浣跨敤</Radio> + <Radio value="false">涓嶄娇鐢�</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> + <Col span={24}> + <Form.Item label={ <Tooltip placement="topLeft" title="瀵逛簬涓嶇粡甯告�у彉鍔ㄧ殑淇℃伅锛岀紦瀛樻暟鎹湁鍔╀簬鎻愰珮鏌ヨ鏁堢巼銆�"> <QuestionCircleOutlined className="mk-form-tip" /> - 缂撳瓨鏁版嵁 + 鍚庣缂撳瓨 </Tooltip> }> {getFieldDecorator('cacheUseful', { diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx index a3f934b..1091b21 100644 --- a/src/views/mobdesign/index.jsx +++ b/src/views/mobdesign/index.jsx @@ -45,6 +45,7 @@ const StyleCombController = asyncComponent(() => import('@/menu/stylecombcontroller')) const StyleCombControlButton = asyncComponent(() => import('@/menu/stylecombcontrolbutton')) const TableComponent = asyncComponent(() => import('@/templates/sharecomponent/tablecomponent')) +const PopView = asyncComponent(() => import('./popview')) sessionStorage.setItem('isEditState', 'true') sessionStorage.setItem('editMenuType', 'menu') // 缂栬緫鑿滃崟绫诲瀷 @@ -73,6 +74,7 @@ comloading: false, adapters: [], viewType: 'menu', + view: '', eyeopen: false, needUpdate: false } @@ -140,6 +142,7 @@ document.getElementById('mk-mob-design-view').innerHTML = '<div style="text-align: center; font-size: 30px; margin-top: 40vh; height: 100vh; background: #fff;">鏈簲鐢ㄦ病鏈塒C绔〉闈㈢殑缂栬緫鏉冮檺锛岃鑱旂郴绠$悊鍛橈紒</div>' return } + MKEmitter.addListener('changePopview', this.initPopview) MKEmitter.addListener('triggerMenuSave', this.submitConfig) MKEmitter.addListener('changeEditMenu', this.changeEditMenu) setTimeout(() => { @@ -210,8 +213,129 @@ this.setState = () => { return } + MKEmitter.removeListener('changePopview', this.initPopview) MKEmitter.removeListener('triggerMenuSave', this.submitConfig) MKEmitter.removeListener('changeEditMenu', this.changeEditMenu) + } + + initPopview = (card, btn) => { + const { config } = this.state + + if (!this.checkBase()) { + return + } + + let _btn = fromJS(btn).toJS() + + if (_btn.config) { + _btn.config.uuid = _btn.uuid + _btn.config.MenuID = _btn.uuid + _btn.config.ParentId = card.uuid + _btn.config.MenuName = _btn.label + } else { + _btn.config = { + uuid: _btn.uuid, + MenuID: _btn.uuid, + ParentId: card.uuid, + enabled: false, + MenuName: _btn.label, + tables: config.tables || [], + Template: 'CustomPage', + components: [], + viewType: 'popview', + style: { backgroundColor: '#ffffff', backgroundImage: '', paddingTop: '16px', paddingBottom: '40px', paddingLeft: '16px', paddingRight: '16px' } + } + } + + this.setState({view: 'popview', popConfig: _btn}) + } + + closePop = () => { + const {config} = this.state + + sessionStorage.setItem('editMenuType', 'menu') + + window.GLOB.urlFields = config.urlFields || [] + window.GLOB.customMenu = config + + this.setState({view: '', popConfig: null}) + } + + submitPopConfig = (btnconfig) => { + let parents = {[btnconfig.ParentId]: true} + let popbtns = {[btnconfig.uuid]: fromJS(btnconfig).toJS()} + let config = fromJS(this.state.config).toJS() + + config.components = this.setPopView(config.components, parents, popbtns) + + this.setState({ config }, () => { + this.submitConfig() + }) + } + + setPopView = (components, parents, popbtns) => { + return components.map(item => { + if (item.type === 'tabs') { + item.subtabs.forEach(tab => { + tab.components = this.setPopView(tab.components, parents, popbtns) + }) + } else if (item.type === 'group') { + item.components = this.setPopView(item.components, parents, popbtns) + } else if (parents[item.uuid]) { + this.setpopConfig(item, popbtns) + } + return item + }) + } + + setpopConfig = (config, popbtns) => { + config.subcards && config.subcards.forEach(item => { + item.elements.forEach(cell => { + if (cell.eleType !== 'button') return + if (cell.OpenType === 'popview' && popbtns[cell.uuid]) { + cell.config = popbtns[cell.uuid] + } + }) + }) + + config.cols && config.cols.forEach(col => { + if (col.type === 'action') { + col.elements.forEach(cell => { + if (cell.OpenType === 'popview' && popbtns[cell.uuid]) { + cell.config = popbtns[cell.uuid] + } + }) + } + }) + + config.elements && config.elements.forEach(cell => { + if (cell.eleType !== 'button') return + if (cell.OpenType === 'popview' && popbtns[cell.uuid]) { + cell.config = popbtns[cell.uuid] + } + }) + + config.action && config.action.forEach(cell => { + if (cell.OpenType === 'popview' && popbtns[cell.uuid]) { + cell.config = popbtns[cell.uuid] + } + }) + + config.$tables = getTables(config) + } + + checkBase = () => { + const { config } = this.state + + if (!config.MenuName || !config.MenuNo) { + notification.warning({ + top: 92, + message: '璇峰畬鍠勮彍鍗曞熀鏈俊鎭紒', + duration: 5 + }) + return false + } + return true } getSmStemp = () => { @@ -1868,7 +1992,7 @@ render () { - const { viewType, comloading, loading, settingshow, controlshow, activeKey, MenuId, config, menuloading, adapters, eyeopen, needUpdate } = this.state + const { view, viewType, comloading, loading, settingshow, controlshow, activeKey, MenuId, config, menuloading, adapters, eyeopen, needUpdate } = this.state return ( <ConfigProvider locale={antdZhCN}> @@ -1876,7 +2000,7 @@ <Header/> {loading ? <Spin className="view-spin" size="large" /> : null} <DndProvider backend={HTML5Backend}> - <div className={'menu-setting ' + (!settingshow ? 'hidden' : '')}> + {view !== 'popview' ? <><div className={'menu-setting ' + (!settingshow ? 'hidden' : '')}> <div className="draw"> {settingshow ? <DoubleLeftOutlined onClick={() => {this.setState({settingshow: false})}} /> : null} {!settingshow ? <DoubleRightOutlined onClick={() => {this.setState({settingshow: true})}} /> : null} @@ -1947,7 +2071,7 @@ {config && !comloading ? <div className="mob-shell" style={{width: window.GLOB.shellWidth, height: window.GLOB.shellHeight}}> <MobShell menu={config} handleList={this.updateConfig} /> </div> : null} - </div> + </div></> : <PopView btn={this.state.popConfig} save={this.submitPopConfig} cancel={this.closePop}/>} </DndProvider> <StyleController /> <StyleCombController /> diff --git a/src/views/mobdesign/index.scss b/src/views/mobdesign/index.scss index 11cb042..1e12390 100644 --- a/src/views/mobdesign/index.scss +++ b/src/views/mobdesign/index.scss @@ -276,6 +276,12 @@ border: 1px solid rgba(0, 0, 0, 0.07); background: rgba(0, 0, 0, 0); } + .card-button-cell { + .ant-checkbox-inner { + width: 20px; + height: 20px; + } + } } .mk-mob-view.userbind { diff --git a/src/views/mobdesign/menuform/index.jsx b/src/views/mobdesign/menuform/index.jsx index ba65de4..9846e84 100644 --- a/src/views/mobdesign/menuform/index.jsx +++ b/src/views/mobdesign/menuform/index.jsx @@ -97,9 +97,26 @@ </Col> <Col span={24}> <Form.Item label={ + <Tooltip placement="topLeft" title="鏁版嵁浼氱紦瀛樺埌鐢ㄦ埛鏈湴锛屾柟渚块〉闈㈠揩閫熷憟鐜般��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鏈湴缂撳瓨 + </Tooltip> + }> + {getFieldDecorator('cacheLocal', { + initialValue: config.cacheLocal || 'false' + })( + <Radio.Group onChange={(e) => {this.selectChange('cacheLocal', e.target.value)}}> + <Radio value="true">浣跨敤</Radio> + <Radio value="false">涓嶄娇鐢�</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> + <Col span={24}> + <Form.Item label={ <Tooltip placement="topLeft" title="瀵逛簬涓嶇粡甯告�у彉鍔ㄧ殑淇℃伅锛岀紦瀛樻暟鎹湁鍔╀簬鎻愰珮鏌ヨ鏁堢巼銆�"> <QuestionCircleOutlined className="mk-form-tip" /> - 缂撳瓨鏁版嵁 + 鍚庣缂撳瓨 </Tooltip> }> {getFieldDecorator('cacheUseful', { diff --git a/src/views/mobdesign/popview/index.jsx b/src/views/mobdesign/popview/index.jsx new file mode 100644 index 0000000..7cb6973 --- /dev/null +++ b/src/views/mobdesign/popview/index.jsx @@ -0,0 +1,306 @@ +import React, { Component } from 'react' +import { is, fromJS } from 'immutable' +import PropTypes from 'prop-types' +import { notification, Modal, Collapse, Switch, Button } from 'antd' +import { DoubleLeftOutlined, DoubleRightOutlined, EyeOutlined, EyeInvisibleOutlined } from '@ant-design/icons' + +import MKEmitter from '@/utils/events.js' +import asyncComponent from '@/utils/asyncComponent' + +import './index.scss' + +const { Panel } = Collapse +const { confirm } = Modal + +const MenuForm = asyncComponent(() => import('./menuform')) +const MobShell = asyncComponent(() => import('@/mob/mobshell')) +const SourceWrap = asyncComponent(() => import('@/mob/modulesource')) +const Modulecell = asyncComponent(() => import('@/menu/modulecell')) +const BgController = asyncComponent(() => import('@/pc/bgcontroller')) +const ReplaceField = asyncComponent(() => import('@/menu/replaceField')) +const PasteController = asyncComponent(() => import('@/menu/pastecontroller')) +const StyleCombControlButton = asyncComponent(() => import('@/menu/stylecombcontrolbutton')) +const TableComponent = asyncComponent(() => import('@/templates/sharecomponent/tablecomponent')) + +class PopViewDesign extends Component { + static propTpyes = { + btn: PropTypes.object, + save: PropTypes.func, + cancel: PropTypes.func + } + + state = { + menuloading: false, + oriConfig: null, + config: null, + comloading: false, + settingshow: true, + controlshow: true, + eyeopen: false + } + + UNSAFE_componentWillMount() { + const { btn } = this.props + sessionStorage.setItem('editMenuType', 'popview') + + let config = fromJS(btn.config).toJS() + + window.GLOB.urlFields = [] // url鍙橀噺 + window.GLOB.customMenu = config // 淇濆瓨鑿滃崟淇℃伅 + + this.setState({config: config, oriConfig: fromJS(config).toJS()}) + } + + componentDidMount () { + MKEmitter.addListener('completeSave', this.completeSave) + MKEmitter.addListener('triggerMenuSave', this.submitConfig) + } + + shouldComponentUpdate (nextProps, nextState) { + return !is(fromJS(this.state), fromJS(nextState)) + } + + /** + * @description 缁勪欢閿�姣侊紝娓呴櫎state鏇存柊 + */ + componentWillUnmount () { + this.setState = () => { + return + } + MKEmitter.removeListener('completeSave', this.completeSave) + MKEmitter.removeListener('triggerMenuSave', this.submitConfig) + } + + closeView = () => { + const { oriConfig, config } = this.state + + if (!is(fromJS(oriConfig), fromJS(config))) { + const _this = this + + confirm({ + title: '閰嶇疆宸蹭慨鏀癸紝鏀惧純淇濆瓨鍚楋紵', + content: '', + onOk() { + _this.props.cancel() + }, + onCancel() {} + }) + } else { + this.props.cancel() + } + } + + getMenuMessage = (config) => { + let tbs = [] + + let traversal = (components) => { + components.forEach(item => { + if (item.$tables) { + tbs.push(...item.$tables) + } + if (item.type === 'tabs') { + item.subtabs.forEach(tab => { + traversal(tab.components) + }) + } else if (item.type === 'group') { + traversal(item.components) + } + }) + } + + traversal(config.components) + + config.$tables = Array.from(new Set(tbs)) + } + + completeSave = () => { + this.setState({ + oriConfig: fromJS(this.state.config).toJS(), + menuloading: false + }) + } + + submitConfig = () => { + let config = fromJS(this.state.config).toJS() + + if (config.cacheUseful === 'true' && !config.cacheTime) { + notification.warning({ + top: 92, + message: '璇峰畬鍠勭紦瀛樿缃紒', + duration: 5 + }) + return + } + + if (config.enabled && this.verifyConfig()) { + config.enabled = false + } + + this.getMenuMessage(config) + + this.setState({ + config: config, + menuloading: true + }) + + window.GLOB.customMenu = config + + this.props.save(fromJS(config).toJS()) + } + + onEnabledChange = () => { + const { config } = this.state + + if (!config.enabled && this.verifyConfig(true)) { + return + } + + this.setState({ + config: {...config, enabled: !config.enabled} + }) + } + + verifyConfig = (show) => { + const { config } = this.state + let error = '' + + let check = (components) => { + components.forEach(item => { + if (error) return + if (item.type === 'tabs') { + item.subtabs.forEach(tab => { + check(tab.components) + }) + return + } else if (item.type === 'group') { + check(item.components) + return + } else if (!item.errors || item.errors.length === 0) { + return + } + + item.errors.forEach(err => { + if (err.level !== 0 || error) return + error = `缁勪欢銆�${item.name}銆�${err.detail}` + }) + }) + } + + check(config.components) + + if (show && error) { + notification.warning({ + top: 92, + message: error, + duration: 5 + }) + } + + return error + } + + // 鏇存柊閰嶇疆淇℃伅 + updateConfig = (config) => { + this.setState({ + config: config + }) + + window.GLOB.customMenu = config + } + + resetConfig = (config) => { + this.setState({ + config, + comloading: true + }, () => { + this.setState({ + comloading: false + }) + }) + + window.GLOB.customMenu = config + } + + /** + * @description 鏇存柊甯哥敤琛ㄤ俊鎭紝蹇嵎娣诲姞鍚庢洿鏂伴厤缃俊鎭� + */ + updatetable = (config) => { + this.setState({ config }) + + window.GLOB.customMenu = config + } + + insert = (item) => { + let config = fromJS(this.state.config).toJS() + + config.components.push(item) + + this.setState({config}) + + window.GLOB.customMenu = config + + notification.success({ + top: 92, + message: '绮樿创鎴愬姛锛�', + duration: 2 + }) + } + + render () { + const { settingshow, controlshow, comloading, config, menuloading, eyeopen } = this.state + + return ( + <div className="mob-poper-view"> + <div className={'menu-setting ' + (!settingshow ? 'hidden' : '')}> + <div className="draw"> + {settingshow ? <DoubleLeftOutlined onClick={() => {this.setState({settingshow: false})}} /> : null} + {!settingshow ? <DoubleRightOutlined onClick={() => {this.setState({settingshow: true})}} /> : null} + </div> + <div className="pc-setting-tools"> + <Collapse accordion defaultActiveKey="component" bordered={false}> + {/* 鍩烘湰淇℃伅 */} + <Panel header="鍩烘湰淇℃伅" forceRender className="basedata" key="basedata"> + {/* 鑿滃崟淇℃伅 */} + <MenuForm config={config} updateConfig={this.updateConfig}/> + {/* 琛ㄥ悕娣诲姞 */} + <TableComponent config={config} updatetable={this.updateConfig}/> + </Panel> + {/* 缁勪欢娣诲姞 */} + <Panel header="缁勪欢" className="component" key="component"> + <SourceWrap viewType="popview"/> + </Panel> + <Panel header="鍏冪礌" key="element"> + <Modulecell /> + </Panel> + <Panel header={'椤甸潰鏍峰紡'} key="background"> + <BgController config={config} updateConfig={this.updateConfig} /> + </Panel> + </Collapse> + </div> + </div> + <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} + </div> + <div className="wrap"> + <Button type="primary" onClick={this.submitConfig} id="save-config" loading={menuloading}>淇濆瓨</Button> + <Switch className="big" checkedChildren="鍚�" unCheckedChildren="鍋�" checked={config && config.enabled} onChange={this.onEnabledChange} /> + <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 缁勪欢鍚�</Button> + <PasteController insert={this.insert} /> + <StyleCombControlButton menu={config} /> + <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/> + <Button type="default" onClick={this.closeView}>杩斿洖</Button> + </div> + </div> + <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} + </div> + </div> + ) + } +} + +export default PopViewDesign \ No newline at end of file diff --git a/src/views/mobdesign/popview/index.scss b/src/views/mobdesign/popview/index.scss new file mode 100644 index 0000000..16eb312 --- /dev/null +++ b/src/views/mobdesign/popview/index.scss @@ -0,0 +1,4 @@ +.mob-poper-view { + background: #000; + min-height: 100vh; +} \ No newline at end of file diff --git a/src/views/mobdesign/popview/menuform/index.jsx b/src/views/mobdesign/popview/menuform/index.jsx new file mode 100644 index 0000000..d2899a2 --- /dev/null +++ b/src/views/mobdesign/popview/menuform/index.jsx @@ -0,0 +1,117 @@ +import React, {Component} from 'react' +import PropTypes from 'prop-types' +import { Form, Row, Col, Radio, Tooltip, InputNumber } from 'antd' +import { QuestionCircleOutlined } from '@ant-design/icons' + +// import './index.scss' + +class CustomMenuForm extends Component { + static propTpyes = { + config: PropTypes.object, + updateConfig: PropTypes.func + } + + changeCacheDay = (val) => { + if (typeof(val) !== 'number') { + val = '' + } + this.props.updateConfig({...this.props.config, cacheTime: val}) + } + + selectChange = (key, value) => { + const { config } = this.props + + if (key === 'cacheUseful') { + this.props.updateConfig({...config, cacheUseful: value}) + } else if (key === 'timeUnit') { + this.props.updateConfig({...config, timeUnit: value}) + } else if (key === 'cacheLocal') { + this.props.updateConfig({...config, cacheLocal: value}) + } + } + + render() { + const { config } = this.props + const { getFieldDecorator } = this.props.form + const formItemLayout = { + labelCol: { + xs: { span: 24 }, + sm: { span: 8 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 16 } + } + } + + return ( + <Form {...formItemLayout}> + <Row> + <Col span={24}> + <Form.Item label={ + <Tooltip placement="topLeft" title="鏁版嵁浼氱紦瀛樺埌鐢ㄦ埛鏈湴锛屾柟渚块〉闈㈠揩閫熷憟鐜般��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鏈湴缂撳瓨 + </Tooltip> + }> + {getFieldDecorator('cacheLocal', { + initialValue: config.cacheLocal || 'false' + })( + <Radio.Group onChange={(e) => {this.selectChange('cacheLocal', e.target.value)}}> + <Radio value="true">浣跨敤</Radio> + <Radio value="false">涓嶄娇鐢�</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> + <Col span={24}> + <Form.Item label={ + <Tooltip placement="topLeft" title="瀵逛簬涓嶇粡甯告�у彉鍔ㄧ殑淇℃伅锛岀紦瀛樻暟鎹湁鍔╀簬鎻愰珮鏌ヨ鏁堢巼銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鍚庣缂撳瓨 + </Tooltip> + }> + {getFieldDecorator('cacheUseful', { + initialValue: config.cacheUseful || 'false' + })( + <Radio.Group onChange={(e) => {this.selectChange('cacheUseful', e.target.value)}}> + <Radio value="true">浣跨敤</Radio> + <Radio value="false">涓嶄娇鐢�</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> + {config.cacheUseful === 'true' ? <Col span={24}> + <Form.Item label="鍗曚綅"> + {getFieldDecorator('timeUnit', { + initialValue: config.timeUnit || 'day' + })( + <Radio.Group onChange={(e) => {this.selectChange('timeUnit', e.target.value)}}> + <Radio value="day">澶�</Radio> + <Radio value="hour">灏忔椂</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> : null} + {config.cacheUseful === 'true' ? <Col span={24}> + <Form.Item label="鏃堕暱"> + {getFieldDecorator('cacheTime', { + initialValue: config.cacheTime, + rules: [ + { + required: true, + message: '璇疯緭鍏ユ椂闀�!' + } + ] + })( + <InputNumber min={1} max={config.timeUnit !== 'hour' ? 7 : 23} precision={0} onChange={this.changeCacheDay}/> + )} + </Form.Item> + </Col> : null} + </Row> + </Form> + ) + } +} + +export default Form.create()(CustomMenuForm) \ No newline at end of file diff --git a/src/views/mobdesign/popview/menuform/index.scss b/src/views/mobdesign/popview/menuform/index.scss new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/views/mobdesign/popview/menuform/index.scss diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx index 400aee2..15ac6d8 100644 --- a/src/views/pcdesign/index.jsx +++ b/src/views/pcdesign/index.jsx @@ -1686,7 +1686,7 @@ return ( <ConfigProvider locale={antdZhCN}> <DndProvider backend={HTML5Backend}> - {view !== 'popview' ?<div className={'mk-pc-view '} id="mk-pc-design-view"> + {view !== 'popview' ? <div className={'mk-pc-view '} id="mk-pc-design-view"> {loading ? <Spin className="view-spin" size="large" /> : null} <div className={'menu-setting ' + (!settingshow ? 'hidden' : '')}> <div className="draw"> diff --git a/src/views/pcdesign/menuform/index.jsx b/src/views/pcdesign/menuform/index.jsx index bbad766..1d7147c 100644 --- a/src/views/pcdesign/menuform/index.jsx +++ b/src/views/pcdesign/menuform/index.jsx @@ -26,6 +26,8 @@ this.props.updateConfig({...config, timeUnit: value}) } else if (key === 'mask') { this.props.updateConfig({...config, mask: value}) + } else if (key === 'cacheLocal') { + this.props.updateConfig({...config, cacheLocal: value}) // } else if (key === 'permission') { // this.props.updateConfig({...config, permission: value}) } @@ -97,9 +99,26 @@ </Col> <Col span={24}> <Form.Item label={ + <Tooltip placement="topLeft" title="鏁版嵁浼氱紦瀛樺埌鐢ㄦ埛鏈湴锛屾柟渚块〉闈㈠揩閫熷憟鐜般��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鏈湴缂撳瓨 + </Tooltip> + }> + {getFieldDecorator('cacheLocal', { + initialValue: config.cacheLocal || 'false' + })( + <Radio.Group onChange={(e) => {this.selectChange('cacheLocal', e.target.value)}}> + <Radio value="true">浣跨敤</Radio> + <Radio value="false">涓嶄娇鐢�</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> + <Col span={24}> + <Form.Item label={ <Tooltip placement="topLeft" title="瀵逛簬涓嶇粡甯告�у彉鍔ㄧ殑淇℃伅锛岀紦瀛樻暟鎹湁鍔╀簬鎻愰珮鏌ヨ鏁堢巼銆�"> <QuestionCircleOutlined className="mk-form-tip" /> - 缂撳瓨鏁版嵁 + 鍚庣缂撳瓨 </Tooltip> }> {getFieldDecorator('cacheUseful', { diff --git a/src/views/sso/index.jsx b/src/views/sso/index.jsx index 9663083..d5acb4e 100644 --- a/src/views/sso/index.jsx +++ b/src/views/sso/index.jsx @@ -95,7 +95,7 @@ let level = res.pwd_level || '' - if (level && !['letter_num', 'char_num', 'char_num_90'].includes(level)) { + if (level && !['letter_num', 'char_num', 'char_num_90', 'char_num_90_sms'].includes(level)) { level = '' } diff --git a/src/views/systemfunc/sidemenu/config.jsx b/src/views/systemfunc/sidemenu/config.jsx index 1e5c708..c49b74a 100644 --- a/src/views/systemfunc/sidemenu/config.jsx +++ b/src/views/systemfunc/sidemenu/config.jsx @@ -32,13 +32,13 @@ MenuID: '1583979633842550imkchl4qt4qppsiv', MenuNo: 'sVersionMUpgrade', MenuName: '鐗堟湰鍗囩骇', - }, { - src: '', - PageParam: {OpenType: 'newtab', Template: 'TabManage'}, - type: 'TabManage', - MenuID: 'TabManageView', - MenuNo: 'TabManage', - MenuName: '鏍囩椤电鐞�', + // }, { + // src: '', + // PageParam: {OpenType: 'newtab', Template: 'TabManage'}, + // type: 'TabManage', + // MenuID: 'TabManageView', + // MenuNo: 'TabManage', + // MenuName: '鏍囩椤电鐞�', }, { src: '', PageParam: {OpenType: 'newtab', Template: 'BaseTable'}, -- Gitblit v1.8.0