From c5b6f6cb5bba7268aaa2496bbf21bf2965277f8b Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 01 七月 2022 13:29:03 +0800 Subject: [PATCH] 2022-07-01 --- src/templates/zshare/modalform/index.jsx | 27 + src/utils/utils-datamanage.js | 56 ++- src/menu/sysinterface/settingform/simplescript/index.jsx | 5 src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx | 28 src/tabviews/zshare/mutilform/index.scss | 7 src/templates/zshare/verifycard/customscript/index.jsx | 6 src/templates/modalconfig/checkCard/index.scss | 47 ++ src/templates/modalconfig/checkCard/index.jsx | 85 +++- src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx | 7 src/templates/sharecomponent/searchcomponent/searchform/index.scss | 1 src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx | 12 src/views/billprint/index.jsx | 13 src/tabviews/subtabtable/index.jsx | 4 src/tabviews/commontable/index.jsx | 4 src/tabviews/zshare/actionList/changeuserbutton/index.jsx | 1 src/assets/css/main.scss | 2 src/tabviews/custom/components/card/cardcellList/index.jsx | 4 src/tabviews/zshare/mutilform/mkCheckCard/index.scss | 172 +++++++-- src/templates/zshare/modalform/datatable/index.jsx | 45 +- src/templates/zshare/modalform/index.scss | 1 src/tabviews/custom/index.jsx | 4 src/templates/zshare/modalform/datatable/index.scss | 8 src/templates/sharecomponent/treesettingcomponent/settingform/utils.jsx | 4 src/tabviews/zshare/actionList/funcMegvii/index.scss | 4 src/templates/zshare/customscript/index.jsx | 17 src/templates/sharecomponent/searchcomponent/searchform/index.jsx | 30 + src/tabviews/treepage/index.jsx | 4 src/menu/datasource/verifycard/utils.jsx | 8 src/assets/css/viewstyle.scss | 56 +- src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx | 10 src/templates/zshare/verifycard/callbackcustomscript/index.jsx | 7 src/menu/datasource/verifycard/customscript/index.jsx | 9 src/tabviews/calendar/index.jsx | 16 src/tabviews/zshare/actionList/exceloutbutton/index.jsx | 12 src/templates/zshare/verifycard/customform/index.jsx | 10 src/tabviews/subtable/index.jsx | 4 src/menu/sysinterface/settingform/utils.jsx | 4 src/templates/sharecomponent/settingcomponent/settingform/utils.jsx | 13 src/utils/utils.js | 43 + src/views/sso/index.jsx | 1 src/menu/components/search/main-search/dategroup/index.scss | 1 src/tabviews/custom/components/timeline/normal-timeline/index.scss | 4 src/tabviews/zshare/mutilform/mkCheckCard/index.jsx | 102 ++++- src/templates/sharecomponent/searchcomponent/dategroup/index.scss | 1 src/templates/zshare/formconfig.jsx | 62 ++- src/templates/zshare/verifycard/index.jsx | 6 src/menu/components/share/sourcecomponent/index.jsx | 4 src/templates/sharecomponent/settingcalcomponent/verifycard/utils.jsx | 7 src/tabviews/custom/components/table/edit-table/normalTable/index.scss | 4 src/menu/components/card/cardcellcomponent/formconfig.jsx | 2 src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx | 4 src/tabviews/custom/components/card/cardcellList/index.scss | 2 src/tabviews/zshare/topSearch/dategroup/index.scss | 1 src/views/login/index.jsx | 16 54 files changed, 664 insertions(+), 343 deletions(-) diff --git a/src/assets/css/main.scss b/src/assets/css/main.scss index eb16632..fa34e11 100644 --- a/src/assets/css/main.scss +++ b/src/assets/css/main.scss @@ -482,7 +482,7 @@ background-color: transparent; .ant-progress-bg { height: 4px!important; - background-color: var(--antd-wave-shadow-color); + background-color: var(--mk-sys-color); } } } diff --git a/src/assets/css/viewstyle.scss b/src/assets/css/viewstyle.scss index dce11d4..ef70846 100644 --- a/src/assets/css/viewstyle.scss +++ b/src/assets/css/viewstyle.scss @@ -500,128 +500,128 @@ } body.mk-blue-black { - --antd-wave-shadow-color: #1890ff; + --mk-sys-color: #1890ff; @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65), #e6f7ff, #bae7ff, #91d5ff, #69c0ff, #40a9ff, #1890ff, #096dd9, #0050b3, #003a8c, #002766); @include bgblack(); } body.mk-blue-white { - --antd-wave-shadow-color: #1890ff; + --mk-sys-color: #1890ff; @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #e6f7ff, #bae7ff, #91d5ff, #69c0ff, #40a9ff, #1890ff, #096dd9, #0050b3, #003a8c, #002766); } body.mk-red-black { - --antd-wave-shadow-color: #f5222d; + --mk-sys-color: #f5222d; @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65), #fff1f0, #ffccc7, #ffa39e, #ff7875, #ff4d4f, #f5222d, #cf1322, #a8071a, #820014, #5c0011); @include bgblack(); } body.mk-red-white { - --antd-wave-shadow-color: #f5222d; + --mk-sys-color: #f5222d; @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #fff1f0, #ffccc7, #ffa39e, #ff7875, #ff4d4f, #f5222d, #cf1322, #a8071a, #820014, #5c0011); } body.mk-orange-red-black { - --antd-wave-shadow-color: #fa541c; + --mk-sys-color: #fa541c; @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65), #fff2e8, #ffd8bf, #ffbb96, #ff9c6e, #ff7a45, #fa541c, #d4380d, #ad2102, #871400, #610b00); @include bgblack(); } body.mk-orange-red-white { - --antd-wave-shadow-color: #fa541c; + --mk-sys-color: #fa541c; @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #fff2e8, #ffd8bf, #ffbb96, #ff9c6e, #ff7a45, #fa541c, #d4380d, #ad2102, #871400, #610b00); } body.mk-orange-black { - --antd-wave-shadow-color: #fa8c16; + --mk-sys-color: #fa8c16; @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65), #fff7e6, #ffe7ba, #ffd591, #ffc069, #ffa940, #fa8c16, #d46b08, #ad4e00, #873800, #612500); @include bgblack(); } body.mk-orange-white { - --antd-wave-shadow-color: #fa8c16; + --mk-sys-color: #fa8c16; @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #fff7e6, #ffe7ba, #ffd591, #ffc069, #ffa940, #fa8c16, #d46b08, #ad4e00, #873800, #612500); } body.mk-orange-yellow-black { - --antd-wave-shadow-color: #faad14; + --mk-sys-color: #faad14; @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#fffbe6, #fff1b8, #ffe58f, #ffd666, #ffc53d, #faad14, #d48806, #ad6800, #874d00, #613400); @include bgblack(); } body.mk-orange-yellow-white { - --antd-wave-shadow-color: #faad14; + --mk-sys-color: #faad14; @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #fffbe6, #fff1b8, #ffe58f, #ffd666, #ffc53d, #faad14, #d48806, #ad6800, #874d00, #613400); } body.mk-yellow-black { - --antd-wave-shadow-color: #fadb14; + --mk-sys-color: #fadb14; @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#feffe6, #ffffb8, #fffb8f, #fff566, #ffec3d, #fadb14, #d4b106, #ad8b00, #876800, #614700); @include bgblack(); } body.mk-yellow-white { - --antd-wave-shadow-color: #fadb14; + --mk-sys-color: #fadb14; @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #feffe6, #ffffb8, #fffb8f, #fff566, #ffec3d, #fadb14, #d4b106, #ad8b00, #876800, #614700); } body.mk-yellow-green-black { - --antd-wave-shadow-color: #a0d911; + --mk-sys-color: #a0d911; @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#fcffe6, #f4ffb8, #eaff8f, #d3f261, #bae637, #a0d911, #7cb305, #5b8c00, #3f6600, #254000); @include bgblack(); } body.mk-yellow-green-white { - --antd-wave-shadow-color: #a0d911; + --mk-sys-color: #a0d911; @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #fcffe6, #f4ffb8, #eaff8f, #d3f261, #bae637, #a0d911, #7cb305, #5b8c00, #3f6600, #254000); } body.mk-green-black { - --antd-wave-shadow-color: #52c41a; + --mk-sys-color: #52c41a; @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#f6ffed, #d9f7be, #b7eb8f, #95de64, #73d13d, #52c41a, #389e0d, #237804, #135200, #092b00); @include bgblack(); } body.mk-green-white { - --antd-wave-shadow-color: #52c41a; + --mk-sys-color: #52c41a; @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #f6ffed, #d9f7be, #b7eb8f, #95de64, #73d13d, #52c41a, #389e0d, #237804, #135200, #092b00); } body.mk-cyan-black { - --antd-wave-shadow-color: #13c2c2; + --mk-sys-color: #13c2c2; @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#e6fffb, #b5f5ec, #87e8de, #5cdbd3, #36cfc9, #13c2c2, #08979c, #006d75, #00474f, #002329); @include bgblack(); } body.mk-cyan-white { - --antd-wave-shadow-color: #13c2c2; + --mk-sys-color: #13c2c2; @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #e6fffb, #b5f5ec, #87e8de, #5cdbd3, #36cfc9, #13c2c2, #08979c, #006d75, #00474f, #002329); } body.mk-blue-purple-black { - --antd-wave-shadow-color: #2f54eb; + --mk-sys-color: #2f54eb; @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#f0f5ff, #d6e4ff, #adc6ff, #85a5ff, #597ef7, #2f54eb, #1d39c4, #10239e, #061178, #030852); @include bgblack(); } body.mk-blue-purple-white { - --antd-wave-shadow-color: #2f54eb; + --mk-sys-color: #2f54eb; @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #f0f5ff, #d6e4ff, #adc6ff, #85a5ff, #597ef7, #2f54eb, #1d39c4, #10239e, #061178, #030852); } body.mk-purple-black { - --antd-wave-shadow-color: #722ed1; + --mk-sys-color: #722ed1; @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#f9f0ff, #efdbff, #d3adf7, #b37feb, #9254de, #722ed1, #531dab, #391085, #22075e, #120338); @include bgblack(); } body.mk-purple-white { - --antd-wave-shadow-color: #722ed1; + --mk-sys-color: #722ed1; @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #f9f0ff, #efdbff, #d3adf7, #b37feb, #9254de, #722ed1, #531dab, #391085, #22075e, #120338); } body.mk-magenta-black { - --antd-wave-shadow-color: #eb2f96; + --mk-sys-color: #eb2f96; @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#fff0f6, #ffd6e7, #ffadd2, #ff85c0, #f759ab, #eb2f96, #c41d7f, #9e1068, #780650, #520339); @include bgblack(); } body.mk-magenta-white { - --antd-wave-shadow-color: #eb2f96; + --mk-sys-color: #eb2f96; @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #fff0f6, #ffd6e7, #ffadd2, #ff85c0, #f759ab, #eb2f96, #c41d7f, #9e1068, #780650, #520339); } body.mk-grass-green-black { - --antd-wave-shadow-color: #aeb303; + --mk-sys-color: #aeb303; @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#f2efda, #e6de97, #d9d26c, #ccc845, #bfbf22, #aeb303, #838c00, #5c6600, #374000, #151a00); @include bgblack(); } body.mk-grass-green-white { - --antd-wave-shadow-color: #aeb303; + --mk-sys-color: #aeb303; @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #f2efda, #e6de97, #d9d26c, #ccc845, #bfbf22, #aeb303, #838c00, #5c6600, #374000, #151a00); } body.mk-deep-red-black { - --antd-wave-shadow-color: #c32539; + --mk-sys-color: #c32539; @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#fff0f0, #f5cbcb, #e89b9e, #db7077, #cf4856, #c32539, #9c162c, #750b20, #4f0315, #29010c); @include bgblack(); } body.mk-deep-red-white { - --antd-wave-shadow-color: #c32539; + --mk-sys-color: #c32539; @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #fff0f0, #f5cbcb, #e89b9e, #db7077, #cf4856, #c32539, #9c162c, #750b20, #4f0315, #29010c); } diff --git a/src/menu/components/card/cardcellcomponent/formconfig.jsx b/src/menu/components/card/cardcellcomponent/formconfig.jsx index 8635568..2e65cfb 100644 --- a/src/menu/components/card/cardcellcomponent/formconfig.jsx +++ b/src/menu/components/card/cardcellcomponent/formconfig.jsx @@ -90,7 +90,7 @@ min: 0, label: '鍐呭', initVal: card.value || '', - tooltip: '鏂囨湰绫诲瀷锛屼細鏇挎崲鍐呭涓殑@username@銆丂fullName@銆丂login_city@銆丂appname@銆�', + tooltip: '鏂囨湰绫诲瀷锛屼細鏇挎崲鍐呭涓殑@username@銆丂fullName@銆丂mk_city@銆丂appname@銆�', required: true }, { diff --git a/src/menu/components/search/main-search/dategroup/index.scss b/src/menu/components/search/main-search/dategroup/index.scss index 6782732..3e0369e 100644 --- a/src/menu/components/search/main-search/dategroup/index.scss +++ b/src/menu/components/search/main-search/dategroup/index.scss @@ -9,6 +9,7 @@ border-radius: 2px; margin-right: 2px; padding: 2px 6px; + background: #ffffff; } .ant-tag-checkable-checked { border-color: #1890ff; diff --git a/src/menu/components/share/sourcecomponent/index.jsx b/src/menu/components/share/sourcecomponent/index.jsx index e6657c0..ae5a6eb 100644 --- a/src/menu/components/share/sourcecomponent/index.jsx +++ b/src/menu/components/share/sourcecomponent/index.jsx @@ -20,11 +20,13 @@ } UNSAFE_componentWillMount () { - const { value } = this.props + const { value, initialValue } = this.props let val = '' if (value) { val = value + } else if (initialValue) { + val = initialValue } else if (this.props['data-__meta']) { val = this.props['data-__meta'].initialValue || '' } diff --git a/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx b/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx index baf0e0c..e4af9ba 100644 --- a/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx +++ b/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx @@ -274,7 +274,9 @@ </Col> {usefulfields ? <Col span={24} className="sqlfield"> <Form.Item label={'鍙敤瀛楁'}> - BID, ID, LoginUID, SessionUid, UserID, Appkey, UserName, FullName, RoleID, mk_departmentcode, mk_organization, login_city, {usefulfields},data_type锛堟敞锛歫skey涓轰富閿�硷紝鏂板鏃跺墠绔敓鎴愶紱data_type涓烘搷浣滅被鍨嬶紝鏂板 - add銆佷慨鏀� - upt銆佸垹闄� - del锛� + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey</span></Tooltip>, + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip>, + {usefulfields},data_type锛堟敞锛歫skey涓轰富閿�硷紝鏂板鏃跺墠绔敓鎴愶紱data_type涓烘搷浣滅被鍨嬶紝鏂板 - add銆佷慨鏀� - upt銆佸垹闄� - del锛� </Form.Item> </Col> : null} <Col span={8} style={{whiteSpace: 'nowrap'}}> diff --git a/src/menu/datasource/verifycard/customscript/index.jsx b/src/menu/datasource/verifycard/customscript/index.jsx index 071c5c7..ac493e7 100644 --- a/src/menu/datasource/verifycard/customscript/index.jsx +++ b/src/menu/datasource/verifycard/customscript/index.jsx @@ -1,7 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Form, Row, Col, Button, notification, Select } from 'antd' +import { Form, Row, Col, Button, notification, Select, Tooltip } from 'antd' import Utils from '@/utils/utils.js' import CodeMirror from '@/templates/zshare/codemirror' @@ -207,6 +207,8 @@ } } + let urlFields = window.GLOB.urlFields ? window.GLOB.urlFields.join(', ') : '' + return ( <Form {...formItemLayout} className="modal-menu-setting-script"> <Row gutter={24}> @@ -222,7 +224,10 @@ </Col> <Col span={24} className="sqlfield"> <Form.Item label={'鍙敤瀛楁'}> - id, bid, loginuid, sessionuid, userid, username, fullname, RoleID, mk_departmentcode, mk_organization, login_city, appkey, time_id, orderBy, pageSize, pageIndex{usefulFields ? ', ' + usefulFields : ''}{window.GLOB.urlFields && window.GLOB.urlFields.length > 0 ? ', ' + window.GLOB.urlFields.join(', ') : ''} + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id</span></Tooltip>, + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip>, + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鎺掑簭銆佸垎椤典互鍙婃悳绱㈡潯浠跺彉閲忥紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}>orderBy, pageSize, pageIndex{usefulFields ? ', ' + usefulFields : ''}</Tooltip> + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'url鍙橀噺锛岃鎸夌収@xxx@鏍煎紡浣跨敤銆�'}>{urlFields ? ', ' : ''}<span style={{color: '#13c2c2'}}>{urlFields}</span></Tooltip> </Form.Item> </Col> <Col span={10} style={{width: '43%'}}> diff --git a/src/menu/datasource/verifycard/utils.jsx b/src/menu/datasource/verifycard/utils.jsx index 933ff02..d911f20 100644 --- a/src/menu/datasource/verifycard/utils.jsx +++ b/src/menu/datasource/verifycard/utils.jsx @@ -51,7 +51,7 @@ _dataresource = _dataresource.replace(/@sum\$/ig, '@sum$*/') if (_customScript) { - _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' + _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg ='' ${_customScript} ` } @@ -137,8 +137,6 @@ if (_customScript) { _regoptions.push({ - reg: new RegExp('@login_city@', 'ig'), - }, { reg: new RegExp('@orderBy@', 'ig'), }, { reg: new RegExp('@UserName@', 'ig'), @@ -173,7 +171,7 @@ ` } else { sumSql = `/* sql sum楠岃瘉 */ - declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' + declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg ='' ${_sql}` } } @@ -201,7 +199,7 @@ ` } else { sql = `/* sql 楠岃瘉 */ - declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' + declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg ='' ${_dataresource}` } sql = sql.replace(/\n\s{8}/ig, '\n') diff --git a/src/menu/sysinterface/settingform/simplescript/index.jsx b/src/menu/sysinterface/settingform/simplescript/index.jsx index ea519cb..1026595 100644 --- a/src/menu/sysinterface/settingform/simplescript/index.jsx +++ b/src/menu/sysinterface/settingform/simplescript/index.jsx @@ -1,7 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { fromJS } from 'immutable' -import { Form, Row, Col, Button, notification, Select, Popconfirm, Typography, Modal, Radio } from 'antd' +import { Form, Row, Col, Button, notification, Select, Popconfirm, Typography, Modal, Radio, Tooltip } from 'antd' import { StopTwoTone, SwapOutlined, EditOutlined, CheckCircleTwoTone, DeleteOutlined } from '@ant-design/icons' import moment from 'moment' @@ -395,7 +395,8 @@ </Col> <Col span={24} className="sqlfield"> <Form.Item label={'鍙敤瀛楁'}> - bid, loginuid, sessionuid, userid, username, fullname, RoleID, mk_departmentcode, mk_organization, login_city, appkey, time_id + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id</span></Tooltip>, + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip> </Form.Item> </Col> {type === 'back' ? <Col span={8} style={{whiteSpace: 'nowrap'}}> diff --git a/src/menu/sysinterface/settingform/utils.jsx b/src/menu/sysinterface/settingform/utils.jsx index 94c7839..60d5574 100644 --- a/src/menu/sysinterface/settingform/utils.jsx +++ b/src/menu/sysinterface/settingform/utils.jsx @@ -17,13 +17,13 @@ }) if (_customScript) { - _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' + _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg ='' ${_customScript} ` } _customScript = _customScript.replace(/@\$|\$@/ig, '') - _customScript = _customScript.replace(/@userName@|@fullName@|@login_city@/ig, `''`) + _customScript = _customScript.replace(/@userName@|@fullName@/ig, `''`) // 澶栬仈鏁版嵁搴撴浛鎹� if (window.GLOB.externalDatabase !== null) { _customScript = _customScript.replace(/@db@/ig, window.GLOB.externalDatabase) diff --git a/src/tabviews/calendar/index.jsx b/src/tabviews/calendar/index.jsx index 1c59cca..069142e 100644 --- a/src/tabviews/calendar/index.jsx +++ b/src/tabviews/calendar/index.jsx @@ -168,7 +168,6 @@ let userName = sessionStorage.getItem('User_Name') || '' let fullName = sessionStorage.getItem('Full_Name') || '' - let city = sessionStorage.getItem('city') || '' if (sessionStorage.getItem('isEditState') === 'true') { userName = sessionStorage.getItem('CloudUserName') || '' @@ -177,8 +176,7 @@ let regs = [ { reg: /@userName@/ig, value: `'${userName}'` }, - { reg: /@fullName@/ig, value: `'${fullName}'` }, - { reg: /@login_city@/ig, value: `'${city}'` } + { reg: /@fullName@/ig, value: `'${fullName}'` } ] regs.forEach(cell => { @@ -347,7 +345,12 @@ let RoleID = sessionStorage.getItem('role_id') || '' let departmentcode = sessionStorage.getItem('departmentcode') || '' let organization = sessionStorage.getItem('organization') || '' + let mk_user_type = sessionStorage.getItem('mk_user_type') || '' + let nation = sessionStorage.getItem('nation') || '' + let province = sessionStorage.getItem('province') || '' let city = sessionStorage.getItem('city') || '' + let district = sessionStorage.getItem('district') || '' + let address = sessionStorage.getItem('address') || '' if (sessionStorage.getItem('isEditState') === 'true') { userName = sessionStorage.getItem('CloudUserName') || '' @@ -363,9 +366,6 @@ } }) regoptions.push({ - reg: new RegExp('@login_city@', 'ig'), - value: city - }, { reg: new RegExp('@userName@', 'ig'), value: userName }, { @@ -403,8 +403,8 @@ param.custom_script = param.custom_script.replace(item.reg, item.value) }) - param.custom_script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) - Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' + param.custom_script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) + Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}' ${param.custom_script} ` diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx index b413afd..cf93007 100644 --- a/src/tabviews/commontable/index.jsx +++ b/src/tabviews/commontable/index.jsx @@ -264,7 +264,6 @@ let userName = sessionStorage.getItem('User_Name') || '' let fullName = sessionStorage.getItem('Full_Name') || '' - let city = sessionStorage.getItem('city') || '' if (sessionStorage.getItem('isEditState') === 'true') { userName = sessionStorage.getItem('CloudUserName') || '' @@ -273,8 +272,7 @@ let regs = [ { reg: /@userName@/ig, value: `'${userName}'` }, - { reg: /@fullName@/ig, value: `'${fullName}'` }, - { reg: /@login_city@/ig, value: `'${city}'` } + { reg: /@fullName@/ig, value: `'${fullName}'` } ] regs.forEach(cell => { diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx index ab7f92a..e0d6d11 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.jsx +++ b/src/tabviews/custom/components/card/cardcellList/index.jsx @@ -262,11 +262,11 @@ if (card.datatype === 'static') { val = card.value || '' - if (/@username@|@fullName@|@login_city@/ig.test(val)) { + if (/@username@|@fullName@|@mk_city@/ig.test(val)) { let userName = sessionStorage.getItem('User_Name') || '' let fullName = sessionStorage.getItem('Full_Name') || '' let city = sessionStorage.getItem('city') || '' - val = val.replace(/@username@/ig, userName).replace(/@fullName@/ig, fullName).replace(/@login_city@/ig, city) + val = val.replace(/@username@/ig, userName).replace(/@fullName@/ig, fullName).replace(/@mk_city@/ig, city) } } else if (data.hasOwnProperty(card.field)) { val = data[card.field] diff --git a/src/tabviews/custom/components/card/cardcellList/index.scss b/src/tabviews/custom/components/card/cardcellList/index.scss index ba005cc..b584f3d 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.scss +++ b/src/tabviews/custom/components/card/cardcellList/index.scss @@ -14,7 +14,7 @@ text-decoration: inherit; color: inherit; .anticon-copy { - color: var(--antd-wave-shadow-color); + color: var(--mk-sys-color); } } .ant-mk-text { diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/index.scss b/src/tabviews/custom/components/table/edit-table/normalTable/index.scss index 5232fee..754dda6 100644 --- a/src/tabviews/custom/components/table/edit-table/normalTable/index.scss +++ b/src/tabviews/custom/components/table/edit-table/normalTable/index.scss @@ -156,7 +156,7 @@ left: 0px; right: 0px; bottom: 0px; - border: 1px solid var(--antd-wave-shadow-color); + border: 1px solid var(--mk-sys-color); height: auto; border-radius: 0; box-shadow: none!important; @@ -196,7 +196,7 @@ left: 0px; right: 0px; bottom: 0px; - border: 1px solid var(--antd-wave-shadow-color); + border: 1px solid var(--mk-sys-color); } } .anticon-exclamation-circle { diff --git a/src/tabviews/custom/components/timeline/normal-timeline/index.scss b/src/tabviews/custom/components/timeline/normal-timeline/index.scss index 0f867bf..3fecd28 100644 --- a/src/tabviews/custom/components/timeline/normal-timeline/index.scss +++ b/src/tabviews/custom/components/timeline/normal-timeline/index.scss @@ -39,6 +39,10 @@ } } + .ant-timeline-item { + padding-bottom: 0px; + } + .card-row-list { overflow-y: auto; padding: 15px; diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx index 1273078..3b22e80 100644 --- a/src/tabviews/custom/index.jsx +++ b/src/tabviews/custom/index.jsx @@ -168,7 +168,6 @@ let userName = sessionStorage.getItem('User_Name') || '' let fullName = sessionStorage.getItem('Full_Name') || '' - let city = sessionStorage.getItem('city') || '' if (sessionStorage.getItem('isEditState') === 'true') { userName = sessionStorage.getItem('CloudUserName') || '' @@ -177,8 +176,7 @@ let regs = [ { reg: /@userName@/ig, value: `'${userName}'` }, - { reg: /@fullName@/ig, value: `'${fullName}'` }, - { reg: /@login_city@/ig, value: `'${city}'` } + { reg: /@fullName@/ig, value: `'${fullName}'` } ] if (window.GLOB.externalDatabase !== null) { diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx index 58c1ec9..13e2662 100644 --- a/src/tabviews/subtable/index.jsx +++ b/src/tabviews/subtable/index.jsx @@ -302,7 +302,6 @@ let userName = sessionStorage.getItem('User_Name') || '' let fullName = sessionStorage.getItem('Full_Name') || '' - let city = sessionStorage.getItem('city') || '' if (sessionStorage.getItem('isEditState') === 'true') { userName = sessionStorage.getItem('CloudUserName') || '' @@ -311,8 +310,7 @@ let regs = [ { reg: /@userName@/ig, value: `'${userName}'` }, - { reg: /@fullName@/ig, value: `'${fullName}'` }, - { reg: /@login_city@/ig, value: `'${city}'` } + { reg: /@fullName@/ig, value: `'${fullName}'` } ] regs.forEach(cell => { diff --git a/src/tabviews/subtabtable/index.jsx b/src/tabviews/subtabtable/index.jsx index 298dab5..4de1107 100644 --- a/src/tabviews/subtabtable/index.jsx +++ b/src/tabviews/subtabtable/index.jsx @@ -260,7 +260,6 @@ let userName = sessionStorage.getItem('User_Name') || '' let fullName = sessionStorage.getItem('Full_Name') || '' - let city = sessionStorage.getItem('city') || '' if (sessionStorage.getItem('isEditState') === 'true') { userName = sessionStorage.getItem('CloudUserName') || '' @@ -269,8 +268,7 @@ let regs = [ { reg: /@userName@/ig, value: `'${userName}'` }, - { reg: /@fullName@/ig, value: `'${fullName}'` }, - { reg: /@login_city@/ig, value: `'${city}'` } + { reg: /@fullName@/ig, value: `'${fullName}'` } ] regs.forEach(cell => { diff --git a/src/tabviews/treepage/index.jsx b/src/tabviews/treepage/index.jsx index 936dac9..3c53923 100644 --- a/src/tabviews/treepage/index.jsx +++ b/src/tabviews/treepage/index.jsx @@ -181,7 +181,6 @@ let userName = sessionStorage.getItem('User_Name') || '' let fullName = sessionStorage.getItem('Full_Name') || '' - let city = sessionStorage.getItem('city') || '' if (sessionStorage.getItem('isEditState') === 'true') { userName = sessionStorage.getItem('CloudUserName') || '' @@ -190,8 +189,7 @@ let regs = [ { reg: /@userName@/ig, value: `'${userName}'` }, - { reg: /@fullName@/ig, value: `'${fullName}'` }, - { reg: /@login_city@/ig, value: `'${city}'` } + { reg: /@fullName@/ig, value: `'${fullName}'` } ] regs.forEach(cell => { diff --git a/src/tabviews/zshare/actionList/changeuserbutton/index.jsx b/src/tabviews/zshare/actionList/changeuserbutton/index.jsx index 2bddb9a..01f08c0 100644 --- a/src/tabviews/zshare/actionList/changeuserbutton/index.jsx +++ b/src/tabviews/zshare/actionList/changeuserbutton/index.jsx @@ -195,6 +195,7 @@ sessionStorage.setItem('role_id', res.role_id || '') sessionStorage.setItem('departmentcode', res.departmentcode || '') sessionStorage.setItem('organization', res.organization || '') + sessionStorage.setItem('mk_user_type', res.mk_user_type || '') sessionStorage.setItem('localRole_id', res.role_id || '') sessionStorage.removeItem('CloudAvatar') diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx index 3325bbd..45ee06b 100644 --- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx +++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx @@ -786,7 +786,12 @@ let RoleID = sessionStorage.getItem('role_id') || '' let departmentcode = sessionStorage.getItem('departmentcode') || '' let organization = sessionStorage.getItem('organization') || '' + let mk_user_type = sessionStorage.getItem('mk_user_type') || '' + let nation = sessionStorage.getItem('nation') || '' + let province = sessionStorage.getItem('province') || '' let city = sessionStorage.getItem('city') || '' + let district = sessionStorage.getItem('district') || '' + let address = sessionStorage.getItem('address') || '' if (sessionStorage.getItem('isEditState') === 'true') { userName = sessionStorage.getItem('CloudUserName') || '' @@ -805,9 +810,6 @@ }) regoptions.push({ - reg: new RegExp('@login_city@', 'ig'), - value: city - }, { reg: new RegExp('@userName@', 'ig'), value: userName }, { @@ -841,7 +843,7 @@ } if (param.custom_script) { - param.custom_script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' + param.custom_script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}' ${param.custom_script} ` regoptions.forEach(item => { @@ -862,7 +864,7 @@ ` } } else if (LText) { - LText = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' + LText = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}' ${LText} ` } diff --git a/src/tabviews/zshare/actionList/funcMegvii/index.scss b/src/tabviews/zshare/actionList/funcMegvii/index.scss index eed792c..8eccbd6 100644 --- a/src/tabviews/zshare/actionList/funcMegvii/index.scss +++ b/src/tabviews/zshare/actionList/funcMegvii/index.scss @@ -20,7 +20,7 @@ } } .ip-item.active { - border-color: var(--antd-wave-shadow-color); - box-shadow: 0 0 2px var(--antd-wave-shadow-color); + border-color: var(--mk-sys-color); + box-shadow: 0 0 2px var(--mk-sys-color); } } \ No newline at end of file diff --git a/src/tabviews/zshare/mutilform/index.scss b/src/tabviews/zshare/mutilform/index.scss index 3eeeb15..29c34d5 100644 --- a/src/tabviews/zshare/mutilform/index.scss +++ b/src/tabviews/zshare/mutilform/index.scss @@ -30,7 +30,12 @@ .ant-form-item { display: flex; } - .ant-form-item.checkcard, .ant-form-item.file-upload { + .ant-form-item.checkcard { + .ant-form-item-control { + line-height: 1; + } + } + .ant-form-item.file-upload { margin-bottom: 10px; .ant-form-item-control { line-height: 1; diff --git a/src/tabviews/zshare/mutilform/mkCheckCard/index.jsx b/src/tabviews/zshare/mutilform/mkCheckCard/index.jsx index d0b2c65..a80a850 100644 --- a/src/tabviews/zshare/mutilform/mkCheckCard/index.jsx +++ b/src/tabviews/zshare/mutilform/mkCheckCard/index.jsx @@ -2,6 +2,7 @@ import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' import { Col, Row } from 'antd' +import { CheckOutlined } from '@ant-design/icons' import MKEmitter from '@/utils/events.js' import './index.scss' @@ -19,15 +20,28 @@ } UNSAFE_componentWillMount() { - const { config } = this.props + let config = fromJS(this.props.config).toJS() let selectKeys = config.initval if (config.multiple === 'true') { selectKeys = config.initval ? config.initval.split(',') : [] } + if (!config.selectStyle && config.backgroundColor) { + config.selectStyle = 'custom' + } else if (!config.selectStyle) { + config.selectStyle = 'background' + } + + if (config.display === 'picture' && !config.picratio) { // 鍏煎鏃ф暟鎹� + config.picratio = config.ratio || '1:1' + } + + config.selectClass = ` mk-${config.selectStyle} ` + config.fields = config.fields || [] + this.setState({ - config: fromJS(config).toJS(), + config: config, options: fromJS(config.options).toJS(), selectKeys: selectKeys }) @@ -163,44 +177,58 @@ getCards = () => { const { selectKeys, options, config } = this.state - const { display, width, fields, ratio, multiple, backgroundColor, borderColor } = config - - let paddingTop = '100%' - if (ratio === '4:3') { - paddingTop = '75%' - } else if (ratio === '3:2') { - paddingTop = '66.7%' - } else if (ratio === '16:9') { - paddingTop = '56.25%' - } - - let style = borderColor ? {borderColor} : {} - let _style = backgroundColor ? {backgroundColor} : null - - if (!options || options.length === 0) { + const { display, width, fields, picratio, multiple, backgroundColor, selectStyle, selectClass } = config + + if (options.length === 0) { return null - } else if (display !== 'picture') { - if (!fields || fields.length === 0) { - return null - } + } else if (display === 'color') { return options.map(item => { let _active = false - if (multiple === 'true' && selectKeys.includes(item.$value)) { - _active = true - } else if (multiple !== 'true' && selectKeys === item.$value) { - _active = true + if (multiple === 'true') { + _active = selectKeys.includes(item.$value) + } else { + _active = selectKeys === item.$value } return <Col span={width} key={item.key}> - <div className={'card-cell' + (_active ? ' active' : '') + (_style ? ' bg-control' : '') + (item.$disabled ? ' disabled' : '')} style={style} onClick={() => this.changeCard(item)}> + <div className={'card-color-cell' + (_active ? ' active' : '') + (item.$disabled ? ' disabled' : '')} style={{background: item.$value}} onClick={() => this.changeCard(item)}> + {fields.map(col => { + return <span className="content-line" key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{item[col.field]}</span> + })} + <CheckOutlined /> + </div> + </Col> + }) + } else if (display !== 'picture') { + let _style = selectStyle === 'custom' ? {backgroundColor} : null + + return options.map(item => { + let _active = false + if (multiple === 'true') { + _active = selectKeys.includes(item.$value) + } else { + _active = selectKeys === item.$value + } + + return <Col span={width} key={item.key}> + <div className={'card-cell' + (_active ? ' active' : '') + selectClass + (item.$disabled ? ' disabled' : '')} onClick={() => this.changeCard(item)}> <div className="bg-mask" style={_style}></div> {fields.map(col => { - return <span key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{item[col.field]}</span> + return <span className="content-line" key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{item[col.field]}</span> })} </div> </Col> }) } else { + let paddingTop = '100%' + if (picratio === '4:3') { + paddingTop = '75%' + } else if (picratio === '3:2') { + paddingTop = '66.7%' + } else if (picratio === '16:9') { + paddingTop = '56.25%' + } + return options.map(item => { let _active = false if (multiple === 'true' && selectKeys.includes(item.$value)) { @@ -210,7 +238,15 @@ } return <Col span={width} key={item.key}> - <div className={'card-pic-cell ' + (_active ? 'active' : '') + (item.$disabled ? ' disabled' : '')} onClick={() => this.changeCard(item)} style={{...style, paddingTop, backgroundImage: `url(${item.$url})`}}> + <div className={'card-pic-cell ' + (_active ? 'active' : '') + (item.$disabled ? ' disabled' : '')} onClick={() => this.changeCard(item)} style={{paddingTop, backgroundImage: `url(${item.$url})`}}> + <div className="content-wrap"> + <div className="content-center"> + {fields.map(col => { + return <span className="content-line" key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{item[col.field]}</span> + })} + </div> + <CheckOutlined /> + </div> </div> </Col> }) @@ -218,10 +254,16 @@ } render() { - const { config } = this.state + const { config, options } = this.state + + let extend = config.readonly ? 'readonly' : '' + + if (options.length * config.width > 24) { + extend += ' mutile-line' + } return ( - <div className={'check-card-form-box' + (config.readonly ? ' readonly' : '')}> + <div className={'check-card-form-box ' + extend}> <Row gutter={12}>{this.getCards()}</Row> </div> ) diff --git a/src/tabviews/zshare/mutilform/mkCheckCard/index.scss b/src/tabviews/zshare/mutilform/mkCheckCard/index.scss index 1fb51b0..da3fdc4 100644 --- a/src/tabviews/zshare/mutilform/mkCheckCard/index.scss +++ b/src/tabviews/zshare/mutilform/mkCheckCard/index.scss @@ -1,64 +1,46 @@ .check-card-form-box { margin-top: 5px; - // margin-bottom: -10px; .card-cell { position: relative; border: 1px solid #bcbcbc; + background: #ffffff; border-radius: 4px; padding: 6px; - margin-bottom: 12px; + margin-bottom: 2px; line-height: 1.5; transition: all 0.3s; cursor: pointer; - span { - display: block; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - position: relative; - z-index: 1; - } + .bg-mask { position: absolute; top: 0; left: 0; right: 0; bottom: 0; - opacity: 0.5; + opacity: 0.6; border-radius: 4px; background-color: transparent; transition: opacity 0.3s; } } - .card-cell:not(.bg-control).active { - border-color: #1890ff; - background: #1890ff; + + .content-line { + display: block; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + position: relative; + z-index: 1; + line-height: 1.5; + } + .card-cell.mk-background.active { + border-color: var(--mk-sys-color); + background: var(--mk-sys-color); span { color: #ffffff!important; } } - .card-cell.bg-control.active { - .bg-mask { - opacity: 1; - } - } - .card-pic-cell { - position: relative; - border: 1px solid #bcbcbc; - border-radius: 4px; - background-size: cover; - background-position: center; - margin-bottom: 12px; - line-height: 1.5; - cursor: pointer; - transition: all 0.3s; - } - .card-pic-cell.active { - border-color: #1890ff; - box-shadow: 0px 0px 4px #1890ff; - } - - .card-cell:not(.bg-control).active::after { + .card-cell.mk-background.active::after { content: ' '; position: absolute; display: table; @@ -71,7 +53,92 @@ height: 12px; transform: rotate(45deg) scale(1) translate(-50%, -50%); } + .card-cell.mk-font.active { + border-color: var(--mk-sys-color); + span { + color: var(--mk-sys-color)!important; + } + } + .card-cell.mk-custom { + border-color: transparent; + } + .card-cell.mk-custom.active { + .bg-mask { + opacity: 1; + } + } + .card-pic-cell { + position: relative; + border: 1px solid #e8e8e8; + border-radius: 4px; + background-size: cover; + background-position: center; + margin-bottom: 2px; + line-height: 1.5; + cursor: pointer; + transition: all 0.3s; + + .content-wrap { + position: absolute; + top: 6px; + left: 6px; + right: 6px; + bottom: 6px; + .content-center { + position: relative; + top: 50%; + transform: translate(0px, -50%); + } + } + .anticon-check { + display: none; + position: absolute; + color: #ffffff; + border-radius: 20px; + padding: 3px; + width: 18px; + height: 18px; + font-size: 12px; + right: -2px; + bottom: -2px; + background: var(--mk-sys-color); + } + } + + .card-color-cell { + position: relative; + border: 1px solid transparent; + border-radius: 4px; + padding: 6px; + margin-bottom: 2px; + min-height: 35px; + cursor: pointer; + + .anticon-check { + display: none; + position: absolute; + color: #ffffff; + border-radius: 20px; + padding: 3px; + width: 18px; + height: 18px; + font-size: 12px; + right: 0px; + bottom: 0px; + background: var(--mk-sys-color); + } + } + + .card-pic-cell.active, .card-color-cell.active { + .anticon-check { + display: inline-block; + } + } + .card-cell.disabled { + cursor: not-allowed; + } + .card-color-cell.disabled { cursor: not-allowed; } .card-pic-cell.disabled { @@ -79,22 +146,41 @@ } } +.check-card-form-box.mutile-line { + .card-cell { + margin-bottom: 12px; + } + .card-pic-cell { + margin-bottom: 12px; + } + .card-color-cell { + margin-bottom: 12px; + } +} + .check-card-form-box:not(.readonly) { - .card-cell:not(.bg-control):not(.disabled):hover { - border-color: #1890ff; - background: #1890ff; + .card-cell.mk-background:not(.disabled):hover { + border-color: var(--mk-sys-color); + background: var(--mk-sys-color); span { color: #ffffff!important; } } - .card-cell.bg-control:not(.active):not(.disabled):hover { + .card-cell.mk-font:not(.disabled):hover { + border-color: var(--mk-sys-color); + span { + color: var(--mk-sys-color)!important; + } + } + + .card-cell.mk-custom:not(.active):not(.disabled):hover { .bg-mask { - opacity: 0.7; + opacity: 0.8; } } .card-pic-cell:not(.disabled):hover { - border-color: #1890ff; - box-shadow: 0px 0px 4px #1890ff; + border-color: var(--mk-sys-color); + box-shadow: 0px 0px 4px var(--mk-sys-color); } } .check-card-form-box.readonly { diff --git a/src/tabviews/zshare/topSearch/dategroup/index.scss b/src/tabviews/zshare/topSearch/dategroup/index.scss index c13982b..59410f2 100644 --- a/src/tabviews/zshare/topSearch/dategroup/index.scss +++ b/src/tabviews/zshare/topSearch/dategroup/index.scss @@ -43,6 +43,7 @@ border-radius: 2px; margin-right: 2px; padding: 2px 6px; + background: #ffffff; } .ant-tag-checkable:active { background-color: #ffffff; diff --git a/src/templates/modalconfig/checkCard/index.jsx b/src/templates/modalconfig/checkCard/index.jsx index 0969425..dea9b8a 100644 --- a/src/templates/modalconfig/checkCard/index.jsx +++ b/src/templates/modalconfig/checkCard/index.jsx @@ -13,63 +13,88 @@ state = {} getCards = () => { - const { display, width, options, fields, ratio, picratio, backgroundColor, borderColor } = this.props.config + const { display, width, options, fields, ratio, picratio, backgroundColor } = this.props.config - let _ratio = picratio || ratio let _options = [] - let paddingTop = '100%' - if (_ratio === '4:3') { - paddingTop = '75%' - } else if (_ratio === '3:2') { - paddingTop = '66.7%' - } else if (_ratio === '16:9') { - paddingTop = '56.25%' - } + let _fields = fields || [] if (options) { _options = options.filter(op => !op.Hide) } - let style = {} - - if (borderColor) { - style.borderColor = borderColor + let cls = '' + if (_options.length * width <= 24) { + cls = 'no-margin-bottom' } - - if (display !== 'picture') { - let _style = backgroundColor ? {backgroundColor} : null - + if (display === 'picture') { + let _ratio = picratio || ratio + let paddingTop = '100%' + if (_ratio === '4:3') { + paddingTop = '75%' + } else if (_ratio === '3:2') { + paddingTop = '66.7%' + } else if (_ratio === '16:9') { + paddingTop = '56.25%' + } if (_options.length === 0) { return <Col span={width}> - <div className="card-cell" style={style}> - <div className="bg-mask" style={_style}></div> - {fields ? fields.map(col => { - return <span key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{col.field}</span> - }) : null} - {!fields || fields.length === 0 ? <span style={{color: '#000000', fontSize: '14px', height: '21px'}}>绀轰緥</span> : null} + <div className="card-pic-cell no-margin-bottom" style={{paddingTop, background: '#91d5ff'}}> </div> </Col> } return _options.map(item => { return <Col span={width} key={item.key}> - <div className="card-cell" style={style}> - <div className="bg-mask" style={_style}></div> - {fields.map(col => { - return <span key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{item[col.field]}</span> + <div className={'card-pic-cell ' + cls} style={{paddingTop, backgroundImage: `url(${item.$url})`}}> + <div className="content-wrap"> + <div className="content-center"> + {_fields.map(col => { + return <span className="content-line" key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{item[col.field]}</span> + })} + </div> + </div> + </div> + </Col> + }) + } else if (display === 'color') { + if (_options.length === 0) { + return <Col span={width}> + <div className="card-color-cell no-margin-bottom" style={{background: '#1890ff'}}> + </div> + </Col> + } + return _options.map(item => { + return <Col span={width} key={item.key}> + <div className={'card-color-cell ' + cls} style={{background: item.$value}}> + {_fields.map(col => { + return <span className="content-line" key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{item[col.field]}</span> })} </div> </Col> }) } else { + let _style = null + let style = null + + if (backgroundColor) { + _style = {backgroundColor} + style = {borderColor: 'transparent'} + } + if (_options.length === 0) { return <Col span={width}> - <div className="card-pic-cell" style={{...style, paddingTop, background: '#91d5ff'}}> + <div className="card-cell no-margin-bottom" style={style}> + <div className="bg-mask" style={_style}></div> + <span style={{color: '#000000', fontSize: '14px', height: '21px'}}>绀轰緥</span> </div> </Col> } return _options.map(item => { return <Col span={width} key={item.key}> - <div className="card-pic-cell" style={{...style, paddingTop, backgroundImage: `url(${item.$url})`}}> + <div className={'card-cell ' + cls} style={style}> + <div className="bg-mask" style={_style}></div> + {_fields.map(col => { + return <span className="content-line" key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{item[col.field]}</span> + })} </div> </Col> }) diff --git a/src/templates/modalconfig/checkCard/index.scss b/src/templates/modalconfig/checkCard/index.scss index 230aa8d..52cb625 100644 --- a/src/templates/modalconfig/checkCard/index.scss +++ b/src/templates/modalconfig/checkCard/index.scss @@ -9,14 +9,7 @@ border-radius: 4px; padding: 6px; margin-bottom: 12px; - span { - display: block; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - position: relative; - z-index: 1; - } + .bg-mask { position: absolute; top: 0; @@ -29,10 +22,46 @@ } } .card-pic-cell { - border: 1px solid #bcbcbc; + position: relative; + border: 1px solid #e8e8e8; border-radius: 4px; background-size: cover; background-position: center; margin-bottom: 12px; + overflow: hidden; + + .content-wrap { + position: absolute; + top: 6px; + left: 6px; + right: 6px; + bottom: 6px; + .content-center { + position: relative; + top: 50%; + transform: translate(0px, -50%); + } + } + } + .card-color-cell { + border: 1px solid transparent; + border-radius: 4px; + padding: 6px; + background-size: cover; + background-position: center; + margin-bottom: 12px; + min-height: 35px; + } + + .content-line { + display: block; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + position: relative; + z-index: 1; + } + .no-margin-bottom { + margin-bottom: 2px; } } \ No newline at end of file diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx index 90f73ad..d4e3ece 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx @@ -16,7 +16,7 @@ scripts: PropTypes.array, // 鑷畾涔夎剼鏈垪琛� usefulfields: PropTypes.any, // 鍙敤瀛楁 systemScripts: PropTypes.array, // 绯荤粺鑴氭湰 - scriptsChange: PropTypes.func // 琛ㄥ崟 + scriptsChange: PropTypes.func } state = { @@ -50,7 +50,7 @@ } let _sql = `Declare @${btn.sheet} table (${_dec}jskey nvarchar(50) ) - Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50),@ErrorCode nvarchar(50), @retmsg nvarchar(4000),@tbid Nvarchar(512) + Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100),@ErrorCode nvarchar(50), @retmsg nvarchar(4000),@tbid Nvarchar(512) Select @ErrorCode='', @retmsg='' ` @@ -286,11 +286,13 @@ ErrorCode锛堝鍔犲悗缂�NT琛ㄧず鏁版嵁涓嶅洖婊氾紝濡侲NT銆丯NT銆丗NT銆丯MNT锛�, retmsg </Form.Item> </Col> - {usefulfields ? <Col span={24} className="sqlfield"> + <Col span={24} className="sqlfield"> <Form.Item label={'鍙敤瀛楁'}> - BID, ID, LoginUID, SessionUid, UserID, Appkey, UserName, FullName, RoleID, mk_departmentcode, mk_organization, login_city, {usefulfields} + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey</span></Tooltip>, + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip>, + {usefulfields} </Form.Item> - </Col> : null} + </Col> <Col span={8} style={{whiteSpace: 'nowrap'}}> <Form.Item style={{marginBottom: 0}} label={ <Tooltip placement="bottomLeft" title={'鑷畾涔夎剼鏈笌榛樿sql浣嶇疆鍏崇郴銆�'}> diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx index 7554b81..5baf7cb 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx @@ -39,7 +39,7 @@ columns = columns.filter(item => item.Column !== '$Index') let fields = columns.map(item => item.Column) - let _sql = `Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50),@ErrorCode nvarchar(50), @retmsg nvarchar(4000) + let _sql = `Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100),@ErrorCode nvarchar(50), @retmsg nvarchar(4000) ` this.setState({ @@ -267,11 +267,13 @@ ErrorCode锛堝鍔犲悗缂�NT琛ㄧず鏁版嵁涓嶅洖婊氾紝濡侲NT銆丯NT銆丗NT銆丯MNT锛�, retmsg </Form.Item> </Col> - {usefulfields ? <Col span={24} className="sqlfield"> + <Col span={24} className="sqlfield"> <Form.Item label={'鍙敤瀛楁'}> - BID, ID, LoginUID, SessionUid, UserID, Appkey, UserName, FullName, RoleID, mk_departmentcode, mk_organization, login_city, {usefulfields} + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey</span></Tooltip>, + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip>, + {usefulfields} </Form.Item> - </Col> : null} + </Col> <Col span={8} style={{whiteSpace: 'nowrap'}}> <Form.Item style={{marginBottom: 0}} label={ <Tooltip placement="bottomLeft" title={'鑷畾涔夎剼鏈笌榛樿sql浣嶇疆鍏崇郴銆�'}> diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx index 4b4fbe2..78bdce9 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx @@ -32,7 +32,7 @@ }) if (_customScript) { - _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' + _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg ='' ${_customScript} ` } @@ -68,9 +68,6 @@ }) _regoptions.push({ - reg: new RegExp('@login_city@', 'ig'), - value: `''` - }, { reg: new RegExp('@userName@', 'ig'), value: `''` }, { @@ -128,7 +125,7 @@ ` } else { sql = `/* sql 楠岃瘉 */ - declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' + declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg ='' ${_dataresource}` } sql = sql.replace(/\n\s{8}/ig, '\n') diff --git a/src/templates/sharecomponent/searchcomponent/dategroup/index.scss b/src/templates/sharecomponent/searchcomponent/dategroup/index.scss index 6782732..3e0369e 100644 --- a/src/templates/sharecomponent/searchcomponent/dategroup/index.scss +++ b/src/templates/sharecomponent/searchcomponent/dategroup/index.scss @@ -9,6 +9,7 @@ border-radius: 2px; margin-right: 2px; padding: 2px 6px; + background: #ffffff; } .ant-tag-checkable-checked { border-color: #1890ff; diff --git a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx index f8b115b..06d7186 100644 --- a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx +++ b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx @@ -119,7 +119,6 @@ openType: null, // 鎼滅储鏉′欢鏄剧ず绫诲瀷 resourceType: null, // 涓嬫媺鎼滅储鏃讹紝閫夐」鏉ユ簮绫诲瀷 formlist: null, // 琛ㄥ崟 - display: null, cFields: [], textTooltip: '瀛楁鍚嶅彲浠ヤ娇鐢ㄩ�楀彿鍒嗛殧锛岃繘琛岀患鍚堟悳绱�', } @@ -189,17 +188,28 @@ shows.push('dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database') } } else if (type === 'checkcard') { + reRequired.fields = false if (this.record.display === 'picture') { if (this.record.resourceType === '0') { // 鑷畾涔夎祫婧� - shows.push('options', 'picratio') + shows.push('options', 'fields', 'picratio') } else if (this.record.resourceType === '1') { // 鏁版嵁婧� - shows.push('dataSource', 'cardValField', 'urlField', 'orderBy', 'orderType', 'database', 'picratio') + shows.push('dataSource', 'cardValField', 'fields', 'urlField', 'orderBy', 'orderType', 'database', 'picratio') + } + } else if (this.record.display === 'color') { + if (this.record.resourceType === '0') { // 鑷畾涔夎祫婧� + shows.push('options', 'fields') + } else if (this.record.resourceType === '1') { // 鏁版嵁婧� + shows.push('dataSource', 'cardValField', 'fields', 'orderBy', 'orderType', 'database') } } else { + reRequired.fields = true if (this.record.resourceType === '0') { // 鑷畾涔夎祫婧� - shows.push('options', 'fields', 'backgroundColor', 'borderColor') + shows.push('options', 'fields', 'selectStyle') } else if (this.record.resourceType === '1') { // 鏁版嵁婧� - shows.push('dataSource', 'cardValField', 'fields', 'orderBy', 'orderType', 'database', 'backgroundColor', 'borderColor') + shows.push('dataSource', 'cardValField', 'fields', 'orderBy', 'orderType', 'database', 'selectStyle') + } + if (this.record.selectStyle === 'custom') { + shows.push('backgroundColor') } } shows.push('linkField') @@ -509,7 +519,7 @@ { required: item.required, message: dict['form.required.select'] + item.label + '!' } ] - content = <Radio.Group onChange={(e) => {this.optionChange(item.key, e.target.value)}}> + content = <Radio.Group style={{whiteSpace: 'nowrap'}} onChange={(e) => {this.optionChange(item.key, e.target.value)}}> {item.options.map(option => { return ( <Radio key={option.value} value={option.value}>{option.text}</Radio> @@ -546,6 +556,10 @@ span = 24 className = 'text-area' + rules = [ + { required: item.required, message: '璇锋坊鍔�' + item.label + '!' } + ] + content = <FieldsTable dict={dict} onChange={this.changeField}/> } else if (item.type === 'checkbox') { rules = [ @@ -567,6 +581,10 @@ content = <Cascader options={item.options} placeholder="" /> } else if (item.type === 'color') { className = 'color-form-item' + rules = [ + { required: item.required, message: dict['form.required.select'] + item.label + '!' } + ] + content = <ColorSketch allowClear={true}/> } diff --git a/src/templates/sharecomponent/searchcomponent/searchform/index.scss b/src/templates/sharecomponent/searchcomponent/searchform/index.scss index b1ed736..1f9373d 100644 --- a/src/templates/sharecomponent/searchcomponent/searchform/index.scss +++ b/src/templates/sharecomponent/searchcomponent/searchform/index.scss @@ -25,6 +25,7 @@ } } .color-form-item { + margin-bottom: 24px; .ant-form-item-control { height: 40px; .color-sketch-block { diff --git a/src/templates/sharecomponent/settingcalcomponent/verifycard/utils.jsx b/src/templates/sharecomponent/settingcalcomponent/verifycard/utils.jsx index b5586e2..b48f75f 100644 --- a/src/templates/sharecomponent/settingcalcomponent/verifycard/utils.jsx +++ b/src/templates/sharecomponent/settingcalcomponent/verifycard/utils.jsx @@ -22,7 +22,7 @@ } if (_customScript) { - _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' + _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg ='' ${_customScript} ` } @@ -78,9 +78,6 @@ } _regoptions.push({ - reg: new RegExp('@login_city@', 'ig'), - value: `''` - }, { reg: new RegExp('@userName@', 'ig'), value: `''` }, { @@ -134,7 +131,7 @@ ` } else { sql = `/* sql 楠岃瘉 */ - declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' + declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg ='' ${_dataresource}` } sql = sql.replace(/\n\s{8}/ig, '\n') diff --git a/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx index 61ac6e4..a54097c 100644 --- a/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx +++ b/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx @@ -1,7 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { fromJS } from 'immutable' -import { Form, Row, Col, Button, notification, Select, Popconfirm, Typography, Modal, Radio } from 'antd' +import { Form, Row, Col, Button, notification, Select, Popconfirm, Typography, Modal, Radio, Tooltip } from 'antd' import { StopOutlined, CheckCircleOutlined, EditOutlined, SwapOutlined, DeleteOutlined } from '@ant-design/icons' import moment from 'moment' @@ -31,6 +31,7 @@ editItem: null, loading: false, usefulFields: '', + urlFields: '', systemScripts: [], scriptsColumns: [ { @@ -106,6 +107,7 @@ let _usefulFields = [] let scriptsColumns = fromJS(this.state.scriptsColumns).toJS() + let _urlFields = '' if (searches) { searches.forEach(item => { @@ -120,14 +122,11 @@ } else if (_usefulFields.includes(item.field)) { _usefulFields.push(item.field + '1') } else { - _usefulFields.push(item.field) + _usefulFields.push(item.field.replace(/,/ig, ', ')) } }) - if (urlFields) { - _usefulFields.push(...urlFields) - } - + _urlFields = urlFields ? urlFields.join(', ') : '' _usefulFields = _usefulFields.join(', ') scriptsColumns = scriptsColumns.filter(item => { if (item.dataIndex === 'sql') { @@ -140,6 +139,7 @@ } this.setState({ + urlFields: _urlFields, usefulFields: _usefulFields, scripts: fromJS(scripts).toJS(), scriptsColumns @@ -404,7 +404,7 @@ render() { const { setting, scripts } = this.props const { getFieldDecorator } = this.props.form - const { usefulFields, scriptsColumns, systemScripts } = this.state + const { usefulFields, scriptsColumns, systemScripts, urlFields } = this.state const formItemLayout = { labelCol: { xs: { span: 24 }, @@ -430,16 +430,14 @@ ErrorCode锛堝鍔犲悗缂�NT琛ㄧず鏁版嵁涓嶅洖婊氾紝濡侲NT銆丯NT銆丗NT銆丯MNT锛�, retmsg </Form.Item> </Col> - {usefulFields ? <Col span={24} className="sqlfield"> + <Col span={24} className="sqlfield"> <Form.Item label={'鍙敤瀛楁'}> - id, bid, loginuid, sessionuid, userid, username, fullname, RoleID, mk_departmentcode, mk_organization, login_city, appkey, time_id{usefulFields ? ', ' + usefulFields : ''} + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id</span></Tooltip>, + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip> + {usefulFields ? <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鎼滅储鏉′欢鍙橀噺锛岃鎸夌収@xxx@鏍煎紡浣跨敤銆�'}>, {usefulFields}</Tooltip> : ''} + {urlFields ?<Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'url鍙橀噺锛岃鎸夌収@xxx@鏍煎紡浣跨敤銆�'}>, <span style={{color: '#13c2c2'}}>{urlFields}</span></Tooltip> : ''} </Form.Item> - </Col> : null} - {!usefulFields ? <Col span={24} className="sqlfield"> - <Form.Item label={'鍙敤瀛楁'}> - id, bid, loginuid, sessionuid, userid, username, fullname, RoleID, mk_departmentcode, mk_organization, login_city, appkey, time_id - </Form.Item> - </Col> : null} + </Col> {!usefulFields ? <Col span={8} style={{whiteSpace: 'nowrap'}}> <Form.Item style={{marginBottom: 0}} label="鎵ц浣嶇疆"> {getFieldDecorator('position', { diff --git a/src/templates/sharecomponent/settingcomponent/settingform/utils.jsx b/src/templates/sharecomponent/settingcomponent/settingform/utils.jsx index f98ee4f..63e3a84 100644 --- a/src/templates/sharecomponent/settingcomponent/settingform/utils.jsx +++ b/src/templates/sharecomponent/settingcomponent/settingform/utils.jsx @@ -18,7 +18,7 @@ }) if (_customScript) { - _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' + _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg ='' ${_customScript} ` } @@ -61,9 +61,6 @@ }) _regoptions.push({ - reg: new RegExp('@login_city@', 'ig'), - value: `''` - }, { reg: new RegExp('@userName@', 'ig'), value: `''` }, { @@ -115,7 +112,7 @@ ` } else { sumSql = `/* sql sum楠岃瘉 */ - declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' + declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg ='' ${_sql}` } } @@ -139,7 +136,7 @@ ` } else { sql = `/* sql 楠岃瘉 */ - declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' + declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg ='' ${_dataresource}` } sql = sql.replace(/\n\s{8}/ig, '\n') @@ -171,7 +168,7 @@ }) if (_customScript) { - _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' + _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg ='' ${_customScript} ` } @@ -184,7 +181,7 @@ } _customScript = _customScript.replace(/@\$|\$@/ig, '') - _customScript = _customScript.replace(/@userName@|@fullName@|@login_city@/ig, `''`) + _customScript = _customScript.replace(/@userName@|@fullName@/ig, `''`) // 澶栬仈鏁版嵁搴撴浛鎹� if (window.GLOB.externalDatabase !== null) { _customScript = _customScript.replace(/@db@/ig, window.GLOB.externalDatabase) diff --git a/src/templates/sharecomponent/treesettingcomponent/settingform/utils.jsx b/src/templates/sharecomponent/treesettingcomponent/settingform/utils.jsx index 74d911e..0833c70 100644 --- a/src/templates/sharecomponent/treesettingcomponent/settingform/utils.jsx +++ b/src/templates/sharecomponent/treesettingcomponent/settingform/utils.jsx @@ -18,7 +18,7 @@ }) if (_customScript) { - _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' + _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg ='' ${_customScript} ` } @@ -75,7 +75,7 @@ ` } else { sql = `/* sql 楠岃瘉 */ - declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' + declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg ='' ${_dataresource}` } sql = sql.replace(/\n\s{8}/ig, '\n') diff --git a/src/templates/zshare/customscript/index.jsx b/src/templates/zshare/customscript/index.jsx index 8daf4ab..0a63489 100644 --- a/src/templates/zshare/customscript/index.jsx +++ b/src/templates/zshare/customscript/index.jsx @@ -1,7 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { fromJS } from 'immutable' -import { Form, Row, Col, Button, notification, Select, Popconfirm, Typography } from 'antd' +import { Form, Row, Col, Button, notification, Select, Popconfirm, Typography, Tooltip } from 'antd' import { StopOutlined, CheckCircleOutlined, EditOutlined, SwapOutlined, DeleteOutlined } from '@ant-design/icons' import moment from 'moment' @@ -31,6 +31,7 @@ editItem: null, loading: false, usefulFields: '', + urlFields: '', systemScripts: [], scriptsColumns: [ { @@ -105,15 +106,12 @@ } else if (_usefulFields.includes(item.field)) { _usefulFields.push(item.field + '1') } else { - _usefulFields.push(item.field) + _usefulFields.push(item.field.replace(/,/ig, ', ')) } }) - if (urlFields) { - _usefulFields.push(...urlFields) - } - this.setState({ + urlFields: urlFields ? urlFields.join(', ') : '', usefulFields: _usefulFields.join(', '), scripts: fromJS(scripts).toJS() }) @@ -353,7 +351,7 @@ render() { const { setting, defaultSql, scripts } = this.props const { getFieldDecorator } = this.props.form - const { usefulFields, scriptsColumns, systemScripts } = this.state + const { usefulFields, scriptsColumns, systemScripts, urlFields } = this.state const formItemLayout = { labelCol: { xs: { span: 24 }, @@ -381,7 +379,10 @@ </Col> <Col span={24} className="sqlfield"> <Form.Item label={'鍙敤瀛楁'}> - id, bid, loginuid, sessionuid, userid, username, fullname, RoleID, mk_departmentcode, mk_organization, login_city, appkey, time_id, orderBy{setting.laypage === 'true' ? ', pageSize, pageIndex': ''}{usefulFields ? ', ' + usefulFields : ''} + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id</span></Tooltip>, + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip>, + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鎺掑簭銆佸垎椤典互鍙婃悳绱㈡潯浠跺彉閲忥紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}>orderBy{setting.laypage === 'true' ? ', pageSize, pageIndex': ''}{usefulFields ? ', ' + usefulFields : ''}</Tooltip> + {urlFields ?<Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'url鍙橀噺锛岃鎸夌収@xxx@鏍煎紡浣跨敤銆�'}>, <span style={{color: '#13c2c2'}}>{urlFields}</span></Tooltip> : ''} </Form.Item> </Col> <Col span={10} className="quick-add"> diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index 9eb47d7..343c0b7 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -461,6 +461,9 @@ }, { value: 'picture', text: '鍥剧墖' + }, { + value: 'color', + text: '鑹插潡' }] }, { @@ -827,19 +830,29 @@ }] }, { + type: 'radio', + key: 'selectStyle', + label: '閫変腑鏁堟灉', + tooltip: '鑳屾櫙鍙婃枃瀛楀彉鍖栨椂浼氫娇鐢ㄧ郴缁熻壊銆�', + initVal: card.selectStyle || (card.backgroundColor ? 'custom' : 'background'), + options: [{ + value: 'background', + text: '鑳屾櫙鍙樺寲' + }, { + value: 'font', + text: '鏂囧瓧鍙樺寲' + }, { + value: 'custom', + text: '鑷畾涔�' + }] + }, + { type: 'color', key: 'backgroundColor', label: '鑳屾櫙鑹�', initVal: card.backgroundColor || '', tooltip: '璁剧疆鑳屾櫙鑹插悗锛岄�変腑鏁堟灉鐢辫儗鏅鑹叉帶鍒躲��', - required: false - }, - { - type: 'color', - key: 'borderColor', - label: '杈规棰滆壊', - initVal: card.borderColor || '', - required: false + required: true }, { type: 'multiselect', @@ -2579,6 +2592,9 @@ }, { value: 'picture', text: '鍥剧墖' + }, { + value: 'color', + text: '鑹插潡' }] }, { @@ -2610,9 +2626,9 @@ }, { type: 'radio', - key: 'ratio', + key: 'picratio', label: '鍥剧墖姣斾緥', - initVal: card.ratio || '1:1', + initVal: card.picratio || card.ratio || '1:1', required: true, options: [{ value: '1:1', @@ -3142,19 +3158,29 @@ }] }, { + type: 'radio', + key: 'selectStyle', + label: '閫変腑鏁堟灉', + tooltip: '鑳屾櫙鍙婃枃瀛楀彉鍖栨椂浼氫娇鐢ㄧ郴缁熻壊銆�', + initVal: card.selectStyle || (card.backgroundColor ? 'custom' : 'background'), + options: [{ + value: 'background', + text: '鑳屾櫙鍙樺寲' + }, { + value: 'font', + text: '鏂囧瓧鍙樺寲' + }, { + value: 'custom', + text: '鑷畾涔�' + }] + }, + { type: 'color', key: 'backgroundColor', label: '鑳屾櫙鑹�', initVal: card.backgroundColor || '', tooltip: '璁剧疆鑳屾櫙鑹插悗锛岄�変腑鏁堟灉鐢辫儗鏅鑹叉帶鍒躲��', - required: false - }, - { - type: 'color', - key: 'borderColor', - label: '杈规棰滆壊', - initVal: card.borderColor || '', - required: false + required: true }, { type: 'radio', diff --git a/src/templates/zshare/modalform/datatable/index.jsx b/src/templates/zshare/modalform/datatable/index.jsx index ec8b5a1..31e23ed 100644 --- a/src/templates/zshare/modalform/datatable/index.jsx +++ b/src/templates/zshare/modalform/datatable/index.jsx @@ -6,9 +6,11 @@ import { PlusOutlined, EditOutlined, DeleteOutlined, SwapOutlined } from '@ant-design/icons' import Utils from '@/utils/utils.js' -import FileUpload from '@/tabviews/zshare/fileupload' +import asyncComponent from '@/utils/asyncComponent' +// import FileUpload from '@/tabviews/zshare/fileupload' import './index.scss' +const SourceComponent = asyncComponent(() => import('@/menu/components/share/sourcecomponent')) const EditableContext = React.createContext() let dragingIndex = -1 @@ -73,12 +75,13 @@ getInput = (form) => { const { inputType, record } = this.props if (inputType === 'file') { - return <FileUpload config={{ - initval: record ? (record.$url || '') : '', - suffix: '', - maxfile: 1, - fileType: 'picture-card' - }}/> + return <SourceComponent initialValue={record ? (record.$url || '') : ''} type="" placement="right"/> + // return <FileUpload config={{ + // initval: record ? (record.$url || '') : '', + // suffix: '', + // maxfile: 1, + // fileType: 'picture-card' + // }}/> } else { return <Input onPressEnter={() => this.getValue(form)} /> } @@ -199,16 +202,16 @@ return <span style={{display: 'block', width: '70px', height: '70px'}}><img style={{width: '100%', height: '100%'}} src={text} alt="" /></span> } }) - } else { - columns = fields.map(item => { - keys.push(item.field) - return { - title: item.field, - dataIndex: item.field, - editable: true, - } - }) } + + fields.forEach(item => { + keys.push(item.field) + columns.push({ + title: item.field, + dataIndex: item.field, + editable: true, + }) + }) if (linkSubFields.length > 0) { linkSubFields.forEach(m => { @@ -369,11 +372,11 @@ if (display === 'picture') { item.$url = '' - } else { - fields.forEach(f => { - item[f.field] = `${this.state.data.length + 1}` - }) } + + fields.forEach(f => { + item[f.field] = `${this.state.data.length + 1}` + }) let data = [...this.state.data, item] @@ -441,7 +444,7 @@ }) let addable = false - if (this.props.display === 'picture') { + if (this.props.display === 'picture' || this.props.display === 'color') { addable = true } else if (this.props.fields && this.props.fields.length > 0) { addable = true diff --git a/src/templates/zshare/modalform/datatable/index.scss b/src/templates/zshare/modalform/datatable/index.scss index 252bc80..ac76a17 100644 --- a/src/templates/zshare/modalform/datatable/index.scss +++ b/src/templates/zshare/modalform/datatable/index.scss @@ -77,4 +77,12 @@ tr.drop-over-upward td { border-top: 2px dashed #1890ff; } + .mk-source-wrap { + .ant-radio-button-wrapper + .ant-radio-button-wrapper { + border-radius: 0 4px 4px 0; + } + .ant-radio-button-wrapper:last-child { + display: none; + } + } } diff --git a/src/templates/zshare/modalform/index.jsx b/src/templates/zshare/modalform/index.jsx index 8e2e0a6..605c7a5 100644 --- a/src/templates/zshare/modalform/index.jsx +++ b/src/templates/zshare/modalform/index.jsx @@ -163,17 +163,28 @@ reRequired.linkField = false } } else if (type === 'checkcard') { + reRequired.fields = false if (this.record.display === 'picture') { if (this.record.resourceType === '0') { // 鑷畾涔夎祫婧� - shows.push('options', 'ratio') + shows.push('options', 'fields', 'picratio') } else if (this.record.resourceType === '1') { // 鏁版嵁婧� - shows.push('dataSource', 'cardValField', 'urlField', 'orderBy', 'orderType', 'disableField', 'database', 'ratio') + shows.push('dataSource', 'cardValField', 'fields', 'urlField', 'orderBy', 'orderType', 'disableField', 'database', 'picratio') + } + } else if (this.record.display === 'color') { + if (this.record.resourceType === '0') { // 鑷畾涔夎祫婧� + shows.push('options', 'fields') + } else if (this.record.resourceType === '1') { // 鏁版嵁婧� + shows.push('dataSource', 'cardValField', 'fields', 'orderBy', 'orderType', 'database') } } else { + reRequired.fields = true if (this.record.resourceType === '0') { // 鑷畾涔夎祫婧� - shows.push('options', 'fields', 'backgroundColor', 'borderColor') + shows.push('options', 'fields', 'selectStyle') } else if (this.record.resourceType === '1') { // 鏁版嵁婧� - shows.push('dataSource', 'cardValField', 'fields', 'orderBy', 'orderType', 'disableField', 'database', 'backgroundColor', 'borderColor') + shows.push('dataSource', 'cardValField', 'fields', 'orderBy', 'orderType', 'disableField', 'database', 'selectStyle') + } + if (this.record.selectStyle === 'custom') { + shows.push('backgroundColor') } } @@ -537,7 +548,7 @@ ] initVal = item.initVal - content = <Radio.Group onChange={(e) => {this.optionChange(item.key, e.target.value)}}> + content = <Radio.Group style={{whiteSpace: 'nowrap'}} onChange={(e) => {this.optionChange(item.key, e.target.value)}}> {item.options.map(option => { return ( <Radio key={option.value} value={option.value}>{option.text}</Radio> @@ -591,10 +602,16 @@ } else if (item.type === 'fields') { span = 24 className = 'text-area' + rules = [ + { required: item.required, message: '璇锋坊鍔�' + item.label + '!' } + ] content = <FieldsTable dict={this.props.dict} onChange={this.changeField}/> } else if (item.type === 'color') { className = 'color-form-item' + rules = [ + { required: item.required, message: dict['form.required.select'] + item.label + '!' } + ] content = <ColorSketch allowClear={true}/> } else if (item.type === 'icon') { diff --git a/src/templates/zshare/modalform/index.scss b/src/templates/zshare/modalform/index.scss index 6df9194..f2c7018 100644 --- a/src/templates/zshare/modalform/index.scss +++ b/src/templates/zshare/modalform/index.scss @@ -27,6 +27,7 @@ white-space: nowrap; } .color-form-item { + margin-bottom: 24px; .ant-form-item-control { height: 40px; .color-sketch-block { diff --git a/src/templates/zshare/verifycard/callbackcustomscript/index.jsx b/src/templates/zshare/verifycard/callbackcustomscript/index.jsx index 0f481b7..f17e3e7 100644 --- a/src/templates/zshare/verifycard/callbackcustomscript/index.jsx +++ b/src/templates/zshare/verifycard/callbackcustomscript/index.jsx @@ -220,6 +220,8 @@ } } + let _usefulfields = usefulfields ? usefulfields.replace(/(BID|ID|LoginUID|SessionUid|UserID|Appkey|UserName|FullName|RoleID|mk_departmentcode|mk_organization|mk_nation|mk_province|mk_city|mk_district|mk_address|mk_user_type|BillCode|BVoucher|FIBVoucherDate|FiYear|ModularDetailCode),\s/ig, '') : null + return ( <Form {...formItemLayout} className="verify-form verify-custom-callback-scripts" id="verify-custom-callback-scripts"> <Row gutter={24}> @@ -235,7 +237,10 @@ </Col> {usefulfields ? <Col span={24} className="sqlfield"> <Form.Item label={'鍙敤瀛楁'}> - {usefulfields} + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey</span></Tooltip>, + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip>, + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞跺湪鍗曞彿鐢熸垚鎴栧垱寤哄嚟璇佹椂浣跨敤銆�'}><span style={{color: '#13c2c2'}}>BillCode, BVoucher, FIBVoucherDate, FiYear, ModularDetailCode</span></Tooltip>, + {_usefulfields} </Form.Item> </Col> : null} <Col span={8} style={{whiteSpace: 'nowrap'}}> diff --git a/src/templates/zshare/verifycard/customform/index.jsx b/src/templates/zshare/verifycard/customform/index.jsx index 0dc8608..4817dc5 100644 --- a/src/templates/zshare/verifycard/customform/index.jsx +++ b/src/templates/zshare/verifycard/customform/index.jsx @@ -1,6 +1,6 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { Form, Row, Col, Input, Select, Button, notification, Modal } from 'antd' +import { Form, Row, Col, Input, Select, Button, notification, Modal, Tooltip } from 'antd' import moment from 'moment' import Utils from '@/utils/utils.js' @@ -158,12 +158,18 @@ sm: { span: 16 } } } + + let _usefulfields = usefulfields ? usefulfields.replace(/(BID|ID|LoginUID|SessionUid|UserID|Appkey|UserName|FullName|RoleID|mk_departmentcode|mk_organization|mk_nation|mk_province|mk_city|mk_district|mk_address|mk_user_type|BillCode|BVoucher|FIBVoucherDate|FiYear|ModularDetailCode),\s/ig, '') : null + return ( <Form {...formItemLayout} className="verify-form" id="verifycard2"> <Row gutter={24}> {usefulfields ? <Col span={21} className="sqlfield"> <Form.Item label={'鍙敤瀛楁'}> - {usefulfields} + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey</span></Tooltip>, + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip>, + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞跺湪鍗曞彿鐢熸垚鎴栧垱寤哄嚟璇佹椂浣跨敤銆�'}><span style={{color: '#13c2c2'}}>BillCode, BVoucher, FIBVoucherDate, FiYear, ModularDetailCode</span></Tooltip>, + {_usefulfields} </Form.Item> </Col> : null} <Col span={21} className="sql"> diff --git a/src/templates/zshare/verifycard/customscript/index.jsx b/src/templates/zshare/verifycard/customscript/index.jsx index 257064a..75bc197 100644 --- a/src/templates/zshare/verifycard/customscript/index.jsx +++ b/src/templates/zshare/verifycard/customscript/index.jsx @@ -253,6 +253,7 @@ } let _type = type || '' + let _usefulfields = usefulfields ? usefulfields.replace(/(BID|ID|LoginUID|SessionUid|UserID|Appkey|UserName|FullName|RoleID|mk_departmentcode|mk_organization|mk_nation|mk_province|mk_city|mk_district|mk_address|mk_user_type|BillCode|BVoucher|FIBVoucherDate|FiYear|ModularDetailCode),\s/ig, '') : null return ( <Form {...formItemLayout} className="verify-form verify-custom-scripts" id={'verify-custom-scripts' + _type}> @@ -269,7 +270,10 @@ </Col> : null} {!_type && usefulfields ? <Col span={24} className="sqlfield"> <Form.Item label={'鍙敤瀛楁'}> - {usefulfields} + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey</span></Tooltip>, + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip>, + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞跺湪鍗曞彿鐢熸垚鎴栧垱寤哄嚟璇佹椂浣跨敤銆�'}><span style={{color: '#13c2c2'}}>BillCode, BVoucher, FIBVoucherDate, FiYear, ModularDetailCode</span></Tooltip>, + {_usefulfields} </Form.Item> </Col> : null} {!_type ?<Col span={8} style={{whiteSpace: 'nowrap'}}> diff --git a/src/templates/zshare/verifycard/index.jsx b/src/templates/zshare/verifycard/index.jsx index ba04881..47d2230 100644 --- a/src/templates/zshare/verifycard/index.jsx +++ b/src/templates/zshare/verifycard/index.jsx @@ -652,9 +652,9 @@ resolve(_fields) } }).then(_fields => { - let _usefulfields = ['UserName', 'FullName', 'RoleID', 'mk_departmentcode', 'mk_organization', 'login_city', 'BillCode', 'BVoucher', 'FIBVoucherDate', 'FiYear', 'ModularDetailCode'] - let _declare = ['@UserName nvarchar(50)', '@FullName nvarchar(50)', '@RoleID nvarchar(512)', '@mk_departmentcode nvarchar(50)', '@mk_organization nvarchar(50)', '@login_city nvarchar(50)', '@ErrorCode nvarchar(50)', '@retmsg nvarchar(4000)', '@BillCode nvarchar(50)', '@BVoucher nvarchar(50)', '@FIBVoucherDate nvarchar(50)', '@FiYear nvarchar(50)', '@ModularDetailCode nvarchar(50)', '@bid nvarchar(50)'] - let _select = ['@UserName=\'\'', '@FullName=\'\'', '@RoleID=\'\'', '@mk_departmentcode=\'\'', '@mk_organization=\'\'', '@login_city=\'\'', '@ErrorCode=\'\'', '@retmsg=\'\'', '@BillCode=\'\'', '@BVoucher=\'\'', '@FIBVoucherDate=\'\'', '@FiYear=\'\'', '@ModularDetailCode=\'\'', '@bid=\'\''] + let _usefulfields = ['UserName', 'FullName', 'RoleID', 'mk_departmentcode', 'mk_organization', 'mk_user_type', 'mk_nation', 'mk_province', 'mk_city', 'mk_district', 'mk_address', 'BillCode', 'BVoucher', 'FIBVoucherDate', 'FiYear', 'ModularDetailCode'] + let _declare = ['@UserName nvarchar(50)', '@FullName nvarchar(50)', '@RoleID nvarchar(512)', '@mk_departmentcode nvarchar(50)', '@mk_organization nvarchar(50)', '@mk_user_type nvarchar(20)', '@mk_nation nvarchar(50)', '@mk_province nvarchar(50)', '@mk_city nvarchar(50)', '@mk_district nvarchar(50)', '@mk_address nvarchar(100)', '@ErrorCode nvarchar(50)', '@retmsg nvarchar(4000)', '@BillCode nvarchar(50)', '@BVoucher nvarchar(50)', '@FIBVoucherDate nvarchar(50)', '@FiYear nvarchar(50)', '@ModularDetailCode nvarchar(50)', '@bid nvarchar(50)'] + let _select = ['@UserName=\'\'', '@FullName=\'\'', '@RoleID=\'\'', '@mk_departmentcode=\'\'', '@mk_organization=\'\'', '@mk_user_type=\'\'', '@mk_nation=\'\'', '@mk_province=\'\'', '@mk_city=\'\'', '@mk_district=\'\'', '@mk_address=\'\'', '@ErrorCode=\'\'', '@retmsg=\'\'', '@BillCode=\'\'', '@BVoucher=\'\'', '@FIBVoucherDate=\'\'', '@FiYear=\'\'', '@ModularDetailCode=\'\'', '@bid=\'\''] let fieldArr = _usefulfields.map(_f => _f.toLowerCase()) let hasBid = false diff --git a/src/utils/utils-datamanage.js b/src/utils/utils-datamanage.js index 13628af..bed57a6 100644 --- a/src/utils/utils-datamanage.js +++ b/src/utils/utils-datamanage.js @@ -99,7 +99,12 @@ let RoleID = sessionStorage.getItem('role_id') || '' let departmentcode = sessionStorage.getItem('departmentcode') || '' let organization = sessionStorage.getItem('organization') || '' + let mk_user_type = sessionStorage.getItem('mk_user_type') || '' + let nation = sessionStorage.getItem('nation') || '' + let province = sessionStorage.getItem('province') || '' let city = sessionStorage.getItem('city') || '' + let district = sessionStorage.getItem('district') || '' + let address = sessionStorage.getItem('address') || '' if (sessionStorage.getItem('isEditState') === 'true') { userName = sessionStorage.getItem('CloudUserName') || '' @@ -110,8 +115,8 @@ let _customScript = '' if (setting.customScript) { - _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) - Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' + _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) + Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}' ${setting.customScript} ` } @@ -198,8 +203,8 @@ ` } } else { - LText = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) - Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' + LText = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) + Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}' ${LText} ` } @@ -272,7 +277,12 @@ let RoleID = sessionStorage.getItem('role_id') || '' let departmentcode = sessionStorage.getItem('departmentcode') || '' let organization = sessionStorage.getItem('organization') || '' + let mk_user_type = sessionStorage.getItem('mk_user_type') || '' + let nation = sessionStorage.getItem('nation') || '' + let province = sessionStorage.getItem('province') || '' let city = sessionStorage.getItem('city') || '' + let district = sessionStorage.getItem('district') || '' + let address = sessionStorage.getItem('address') || '' if (sessionStorage.getItem('isEditState') === 'true') { userName = sessionStorage.getItem('CloudUserName') || '' @@ -280,8 +290,8 @@ } if (setting.customScript) { - _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) - Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' + _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) + Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}' ${setting.customScript} ` } @@ -342,8 +352,8 @@ insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@ ` } else { - LText = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) - Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' + LText = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) + Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}' ${LText} ` } @@ -426,7 +436,12 @@ let RoleID = sessionStorage.getItem('role_id') || '' let departmentcode = sessionStorage.getItem('departmentcode') || '' let organization = sessionStorage.getItem('organization') || '' + let mk_user_type = sessionStorage.getItem('mk_user_type') || '' + let nation = sessionStorage.getItem('nation') || '' + let province = sessionStorage.getItem('province') || '' let city = sessionStorage.getItem('city') || '' + let district = sessionStorage.getItem('district') || '' + let address = sessionStorage.getItem('address') || '' if (sessionStorage.getItem('isEditState') === 'true') { userName = sessionStorage.getItem('CloudUserName') || '' @@ -441,8 +456,8 @@ if (sql) { sql = `/*鍓嶇疆鑴氭湰*/ - declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) - Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' + declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) + Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}' ${sql} aaa: if @ErrorCode!='' @@ -457,9 +472,6 @@ } }) regoptions.push({ - reg: new RegExp('@login_city@', 'ig'), - value: `'${city}'` - }, { reg: new RegExp('@userName@', 'ig'), value: `'${userName}'` }, { @@ -511,15 +523,20 @@ let RoleID = sessionStorage.getItem('role_id') || '' let departmentcode = sessionStorage.getItem('departmentcode') || '' let organization = sessionStorage.getItem('organization') || '' + let mk_user_type = sessionStorage.getItem('mk_user_type') || '' + let nation = sessionStorage.getItem('nation') || '' + let province = sessionStorage.getItem('province') || '' let city = sessionStorage.getItem('city') || '' + let district = sessionStorage.getItem('district') || '' + let address = sessionStorage.getItem('address') || '' if (sessionStorage.getItem('isEditState') === 'true') { userName = sessionStorage.getItem('CloudUserName') || '' fullName = sessionStorage.getItem('CloudFullName') || '' } - let _prevCustomScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) - Select @ErrorCode='',@retmsg='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' + let _prevCustomScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) + Select @ErrorCode='',@retmsg='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}' ${errSql} ` let _backCustomScript = ` @@ -692,14 +709,19 @@ let RoleID = sessionStorage.getItem('role_id') || '' let departmentcode = sessionStorage.getItem('departmentcode') || '' let organization = sessionStorage.getItem('organization') || '' + let mk_user_type = sessionStorage.getItem('mk_user_type') || '' + let nation = sessionStorage.getItem('nation') || '' + let province = sessionStorage.getItem('province') || '' let city = sessionStorage.getItem('city') || '' + let district = sessionStorage.getItem('district') || '' + let address = sessionStorage.getItem('address') || '' if (sessionStorage.getItem('isEditState') === 'true') { userName = sessionStorage.getItem('CloudUserName') || '' fullName = sessionStorage.getItem('CloudFullName') || '' } - _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) - select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' + _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) + select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}' ${_customScript} ` } diff --git a/src/utils/utils.js b/src/utils/utils.js index 1f78e17..dcccada 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -748,7 +748,7 @@ let arrfield = [item.valueField, item.valueText] if (item.type === 'checkcard') { - arrfield = item.fields.map(f => f.field) + arrfield = item.fields ? item.fields.map(f => f.field) : [] arrfield.push(item.cardValField) if (item.urlField) { arrfield.push(item.urlField) @@ -822,7 +822,12 @@ let RoleID = sessionStorage.getItem('role_id') || '' let departmentcode = sessionStorage.getItem('departmentcode') || '' let organization = sessionStorage.getItem('organization') || '' + let mk_user_type = sessionStorage.getItem('mk_user_type') || '' + let nation = sessionStorage.getItem('nation') || '' + let province = sessionStorage.getItem('province') || '' let city = sessionStorage.getItem('city') || '' + let district = sessionStorage.getItem('district') || '' + let address = sessionStorage.getItem('address') || '' let _sheet = item.sheet if (sessionStorage.getItem('isEditState') === 'true') { @@ -1069,9 +1074,9 @@ _sql = ` /* 绯荤粺鐢熸垚 */ declare @${sheet} table (${declarefields.join(',')},jskey nvarchar(50),BID nvarchar(50) ) - Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@tbid Nvarchar(512) + Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@tbid Nvarchar(512) - Select @ErrorCode='', @retmsg='', @UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' + Select @ErrorCode='', @retmsg='', @UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}' ${_initCustomScript} ` _sqlInsert = `Insert into @${sheet} (${fields},jskey,BID)` @@ -1104,9 +1109,9 @@ _sql = ` /* 绯荤粺鐢熸垚 */ declare @${sheet} table (jskey nvarchar(50)) - Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@tbid Nvarchar(512) + Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@tbid Nvarchar(512) - Select @ErrorCode='', @retmsg='', @UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' + Select @ErrorCode='', @retmsg='', @UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}' ` } @@ -1136,7 +1141,13 @@ let RoleID = sessionStorage.getItem('role_id') || '' let departmentcode = sessionStorage.getItem('departmentcode') || '' let organization = sessionStorage.getItem('organization') || '' + let mk_user_type = sessionStorage.getItem('mk_user_type') || '' + let nation = sessionStorage.getItem('nation') || '' + let province = sessionStorage.getItem('province') || '' let city = sessionStorage.getItem('city') || '' + let district = sessionStorage.getItem('district') || '' + let address = sessionStorage.getItem('address') || '' + let _sheet = btn.sheet let BID = data[0].$$BID || '' @@ -1281,9 +1292,9 @@ _sql = ` /* 绯荤粺鐢熸垚 */ declare @${sheet} table (${declarefields.join(',')},jskey nvarchar(50),data_type nvarchar(50),BID nvarchar(50) ) - Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@tbid Nvarchar(512) + Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@tbid Nvarchar(512) - Select @ErrorCode='', @retmsg='', @UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' + Select @ErrorCode='', @retmsg='', @UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}' ${_initCustomScript} ` _sqlInsert = `Insert into @${sheet} (${fields},jskey,data_type,BID)` @@ -1316,9 +1327,9 @@ _sql = ` /* 绯荤粺鐢熸垚 */ declare @${sheet} table (jskey nvarchar(50)) - Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@tbid Nvarchar(512) + Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@tbid Nvarchar(512) - Select @ErrorCode='', @retmsg='', @UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' + Select @ErrorCode='', @retmsg='', @UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}' ` } @@ -1385,7 +1396,7 @@ }) // 闇�瑕佸0鏄庣殑鍙橀噺闆� - let _vars = ['tbid', 'errorcode', 'retmsg', 'billcode', 'bvoucher', 'fibvoucherdate', 'fiyear', 'username', 'fullname', 'modulardetailcode', 'roleid', 'mk_departmentcode', 'mk_organization', 'login_city', 'bid'] + let _vars = ['tbid', 'errorcode', 'retmsg', 'billcode', 'bvoucher', 'fibvoucherdate', 'fiyear', 'username', 'fullname', 'modulardetailcode', 'roleid', 'mk_departmentcode', 'mk_organization', 'mk_user_type', 'mk_nation', 'mk_province', 'mk_city', 'mk_district', 'mk_address', 'bid'] // 涓婚敭瀛楁 let primaryKey = setting.primaryKey || 'id' @@ -1511,7 +1522,7 @@ _declarefields = ',' + _declarefields } _sql = `/* 绯荤粺鐢熸垚 */ - Declare @tbid nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@BillCode nvarchar(50),@BVoucher nvarchar(50),@FIBVoucherDate nvarchar(50), @FiYear nvarchar(50), @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50),@bid nvarchar(50),@ModularDetailCode nvarchar(50)${_declarefields} + Declare @tbid nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@BillCode nvarchar(50),@BVoucher nvarchar(50),@FIBVoucherDate nvarchar(50), @FiYear nvarchar(50),@ModularDetailCode nvarchar(50), @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100),@bid nvarchar(50)${_declarefields} ` let userName = sessionStorage.getItem('User_Name') || '' @@ -1519,7 +1530,12 @@ let RoleID = sessionStorage.getItem('role_id') || '' let departmentcode = sessionStorage.getItem('departmentcode') || '' let organization = sessionStorage.getItem('organization') || '' + let mk_user_type = sessionStorage.getItem('mk_user_type') || '' + let nation = sessionStorage.getItem('nation') || '' + let province = sessionStorage.getItem('province') || '' let city = sessionStorage.getItem('city') || '' + let district = sessionStorage.getItem('district') || '' + let address = sessionStorage.getItem('address') || '' if (sessionStorage.getItem('isEditState') === 'true') { userName = sessionStorage.getItem('CloudUserName') || '' @@ -1529,7 +1545,7 @@ // 鍒濆鍖栧嚟璇佸強鐢ㄦ埛淇℃伅瀛楁 _sql += ` /* 鍑瘉鍙婄敤鎴蜂俊鎭垵濮嬪寲璧嬪�� */ - select @BVoucher='',@FIBVoucherDate='',@FiYear='',@ErrorCode='',@retmsg='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}', @BillCode='', @ModularDetailCode='' + select @BVoucher='',@FIBVoucherDate='',@FiYear='',@ErrorCode='',@retmsg='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}', @BillCode='', @ModularDetailCode='' ` // 琛ㄥ崟鍙橀噺璧嬪�� @@ -1609,9 +1625,6 @@ } }) regoptions.push({ - reg: new RegExp('@login_city@', 'ig'), - value: `'${city}'` - }, { reg: new RegExp('@userName@', 'ig'), value: `'${userName}'` }, { diff --git a/src/views/billprint/index.jsx b/src/views/billprint/index.jsx index d1e8084..5493e12 100644 --- a/src/views/billprint/index.jsx +++ b/src/views/billprint/index.jsx @@ -225,7 +225,6 @@ let userName = sessionStorage.getItem('User_Name') || '' let fullName = sessionStorage.getItem('Full_Name') || '' - let city = sessionStorage.getItem('city') || '' if (sessionStorage.getItem('isEditState') === 'true') { userName = sessionStorage.getItem('CloudUserName') || '' @@ -234,8 +233,7 @@ let regs = [ { reg: /@userName@/ig, value: `'${userName}'` }, - { reg: /@fullName@/ig, value: `'${fullName}'` }, - { reg: /@login_city@/ig, value: `'${city}'` } + { reg: /@fullName@/ig, value: `'${fullName}'` } ] if (window.GLOB.externalDatabase !== null) { @@ -417,7 +415,12 @@ let RoleID = sessionStorage.getItem('role_id') || '' let departmentcode = sessionStorage.getItem('departmentcode') || '' let organization = sessionStorage.getItem('organization') || '' + let mk_user_type = sessionStorage.getItem('mk_user_type') || '' + let nation = sessionStorage.getItem('nation') || '' + let province = sessionStorage.getItem('province') || '' let city = sessionStorage.getItem('city') || '' + let district = sessionStorage.getItem('district') || '' + let address = sessionStorage.getItem('address') || '' if (sessionStorage.getItem('isEditState') === 'true') { userName = sessionStorage.getItem('CloudUserName') || '' @@ -429,8 +432,8 @@ let _script = item.script if (index === 0) { - _script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) - select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' + _script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) + select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}' ${_script} ` } diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx index 036109b..be43871 100644 --- a/src/views/login/index.jsx +++ b/src/views/login/index.jsx @@ -91,6 +91,7 @@ sessionStorage.setItem('role_id', res.role_id || '') sessionStorage.setItem('departmentcode', res.departmentcode || '') sessionStorage.setItem('organization', res.organization || '') + sessionStorage.setItem('mk_user_type', res.mk_user_type || '') sessionStorage.setItem('localRole_id', res.role_id || '') localStorage.setItem(_href + 'lang', param.lang || 'zh-CN') @@ -186,6 +187,7 @@ sessionStorage.setItem('role_id', res.role_id || '') sessionStorage.setItem('departmentcode', res.departmentcode || '') sessionStorage.setItem('organization', res.organization || '') + sessionStorage.setItem('mk_user_type', res.mk_user_type || '') sessionStorage.setItem('localRole_id', res.role_id || '') localStorage.setItem(_href + 'lang', param.lang || 'zh-CN') @@ -231,6 +233,7 @@ sessionStorage.setItem('role_id', res.role_id || '') sessionStorage.setItem('departmentcode', res.departmentcode || '') sessionStorage.setItem('organization', res.organization || '') + sessionStorage.setItem('mk_user_type', res.mk_user_type || '') sessionStorage.setItem('localRole_id', res.role_id || '') sessionStorage.removeItem('visitorUserID') @@ -311,10 +314,7 @@ const _addressUrl = _href + 'queryAddress' - if (localStorage.getItem(_addressUrl) !== 'true') { - sessionStorage.setItem('city', '') - sessionStorage.setItem('ipAddress', '') - } else { + if (localStorage.getItem(_addressUrl) === 'true') { this.queryAddress() } @@ -696,8 +696,12 @@ queryAddress = () => { window.callbackFunction = (res) => { if (res.result && res.result.ad_info) { - sessionStorage.setItem('city', res.result.ad_info.city) - sessionStorage.setItem('ipAddress', res.result.ip) + sessionStorage.setItem('nation', res.result.ad_info.nation || '') + sessionStorage.setItem('province', res.result.ad_info.province || '') + sessionStorage.setItem('city', res.result.ad_info.city || '') + sessionStorage.setItem('district', res.result.ad_info.district || '') + sessionStorage.setItem('address', res.result.ad_info.address || '') + sessionStorage.setItem('ipAddress', res.result.ip || '') } } diff --git a/src/views/sso/index.jsx b/src/views/sso/index.jsx index 8847f11..164d7c4 100644 --- a/src/views/sso/index.jsx +++ b/src/views/sso/index.jsx @@ -39,6 +39,7 @@ sessionStorage.setItem('role_id', res.role_id || '') sessionStorage.setItem('departmentcode', res.departmentcode || '') sessionStorage.setItem('organization', res.organization || '') + sessionStorage.setItem('mk_user_type', res.mk_user_type || '') sessionStorage.setItem('localRole_id', res.role_id || '') this.getMessage() -- Gitblit v1.8.0