From 5d8eb51419d2c1b7dc88dd0cbde5c8341cceda2f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 24 二月 2023 18:01:14 +0800 Subject: [PATCH] 2023-02-24 --- src/menu/datasource/verifycard/utils.jsx | 44 +++++++++++--- src/utils/utils-datamanage.js | 8 ++ src/api/cacheutils.js | 4 + src/tabviews/custom/components/card/double-data-card/index.scss | 8 +- src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx | 2 src/menu/stylecontroller/index.jsx | 32 +++------- src/tabviews/custom/components/card/double-data-card/index.jsx | 1 src/templates/zshare/verifycard/callbackcustomscript/index.jsx | 4 src/menu/datasource/verifycard/customscript/index.jsx | 2 src/tabviews/zshare/actionList/printbutton/index.jsx | 2 public/options.json | 10 +- src/tabviews/custom/popview/index.jsx | 2 src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx | 4 src/menu/stylecontroller/index.scss | 8 ++ src/tabviews/custom/index.jsx | 2 src/templates/sharecomponent/actioncomponent/verifyprint/utils.jsx | 4 src/views/billprint/index.jsx | 2 src/tabviews/zshare/actionList/normalbutton/index.jsx | 1 src/utils/utils.js | 15 ---- 19 files changed, 87 insertions(+), 68 deletions(-) diff --git a/public/options.json b/public/options.json index 4e405d0..bedcbee 100644 --- a/public/options.json +++ b/public/options.json @@ -1,12 +1,12 @@ { - "appId": "201912040924165801464FF1788654BC5AC73", - "appkey": "20191106103859640976D6E924E464D029CF0", + "appId": "202108312122504607B107A83F55B40C98CCF", + "appkey": "20210831212235413F287EC3BF489424496C8", "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars", "systemType": "", "externalDatabase": "", "lineColor": "", "filter": "false", - "defaultApp": "mk", + "defaultApp": "mkindustry", "defaultLang": "zh-CN", "WXAppID": "", "WXminiAppID": "", @@ -17,6 +17,6 @@ "transfer": "false", "keepPassword": "true", "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"], - "host": "http://qingqiumarket.cn", - "service": "MKWMS/" + "host": "http://demo.mk9h.cn", + "service": "erp_new/" } \ No newline at end of file diff --git a/src/api/cacheutils.js b/src/api/cacheutils.js index 012223d..1c174d9 100644 --- a/src/api/cacheutils.js +++ b/src/api/cacheutils.js @@ -45,6 +45,10 @@ } catch (e) { console.warn('WebSql 鍒濆鍖栧け璐ワ紒') window.GLOB.WebSql = null + + if (window.indexedDB) { + this.openIndexDB(db) + } } } diff --git a/src/menu/datasource/verifycard/customscript/index.jsx b/src/menu/datasource/verifycard/customscript/index.jsx index 2631584..85de3e6 100644 --- a/src/menu/datasource/verifycard/customscript/index.jsx +++ b/src/menu/datasource/verifycard/customscript/index.jsx @@ -234,7 +234,7 @@ </Col> <Col span={24} className="sqlfield"> <Form.Item label={'鍙敤瀛楁'}> - <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, LoginUID, SessionUid, UserID, Appkey, time_id</span></Tooltip>, + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, LoginUID, SessionUid, UserID, Appkey, time_id, typename</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> diff --git a/src/menu/datasource/verifycard/utils.jsx b/src/menu/datasource/verifycard/utils.jsx index 8b3fd5a..93f129b 100644 --- a/src/menu/datasource/verifycard/utils.jsx +++ b/src/menu/datasource/verifycard/utils.jsx @@ -14,13 +14,11 @@ let _customScript = '' let arr_field = columns.map(item => item.field).join(',') - if (scripts.length > 0) { - scripts.forEach(item => { - _customScript += ` - ${item.sql} - ` - }) - } + scripts.forEach(item => { + _customScript += ` + ${item.sql} + ` + }) if (!arr_field) { arr_field = '*' @@ -44,8 +42,8 @@ // error = '绯荤粺鍑芥暟' + _customScript.match(/\$ex@.{1,50}@ex\$/g)[0].replace(/\$ex@|@ex\$/g, '') + '鏈畾涔�' // } - _dataresource = _dataresource.replace(/@(BID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|upid)@/ig, `'${timestamp}'`) - _customScript = _customScript.replace(/@(BID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|upid)@/ig, `'${timestamp}'`) + _dataresource = _dataresource.replace(/@(BID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|upid|typename)@/ig, `'${timestamp}'`) + _customScript = _customScript.replace(/@(BID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|upid|typename)@/ig, `'${timestamp}'`) _dataresource = _dataresource.replace(/@\$|\$@/ig, '') _customScript = _customScript.replace(/@\$|\$@/ig, '') @@ -218,12 +216,38 @@ if (/@[0-9a-zA-Z_]+@/ig.test(sql)) { let arr = sql.match(/@[0-9a-zA-Z_]+@/ig) + let getTrueSql = (sl) => { + if (!/\/\*/.test(sl)) return sl + let index = 0 + + sl = sl.replace(/\s/ig, ' ') + sl = sl.replace(/\*\//ig, 'm_k@') + sl = sl.replace(/\/\*/ig, () => { + index++ + return '@m_k' + index + }) + + for (let i = index; i > 0; i--) { + let reg = new RegExp(`@m_k${i}.+m_k@`, 'ig') + sl = sl.replace(reg, '') + } + + return sl + } + + let _scripts = [] + _dataresource = _dataresource.replace('/*system_query*/', '') + _dataresource = getTrueSql(_dataresource) + scripts.forEach(item => { + _scripts.push({...item, sql: getTrueSql(item.sql)}) + }) + arr.forEach(item => { let reg = new RegExp(item, 'ig') if (reg.test(_dataresource)) { errors.push(`鏁版嵁婧愪腑瀛樺湪鏈浛鎹㈠��${item}`) } - scripts && scripts.forEach(script => { + _scripts.forEach(script => { if (reg.test(script.sql)) { errors.push(`鑷畾涔夎剼鏈�(${script.$index || ''})瀛樺湪鏈浛鎹㈠��${item}`) } diff --git a/src/menu/stylecontroller/index.jsx b/src/menu/stylecontroller/index.jsx index b795e25..e06a198 100644 --- a/src/menu/stylecontroller/index.jsx +++ b/src/menu/stylecontroller/index.jsx @@ -167,12 +167,16 @@ this.callback = null } - updateStyle = (style) => { + updateStyle = (style, prop) => { const { card } = this.state let _style = { ...card, ...style + } + + if (prop && !_style[prop]) { + delete _style[prop] } this.setState({ @@ -278,7 +282,7 @@ * @description 淇敼鑳屾櫙棰滆壊 锛岄鑹叉帶浠� */ changeBackgroundColor = (val) => { - this.updateStyle({backgroundColor: val}) + this.updateStyle({backgroundColor: val}, 'backgroundColor') } changeBackground = (val) => { @@ -438,29 +442,11 @@ } changeWidth = (val) => { - const { card } = this.state - let _style = {...card} - - if (val === '0px') { - delete _style.width - } else { - _style.width = val - } - - this.setState({ - card: _style - }) - - this.callback && this.callback(_style) + this.updateStyle({width: val === '0px' ? '' : val}, 'width') } changeHeight = (val) => { - let _val = val - if (_val === '0px') { - _val = 'auto' - } - - this.updateStyle({height: _val}) + this.updateStyle({height: val === '0px' ? '' : val}, 'height') } changeNormalStyle = (val, type) => { @@ -633,7 +619,7 @@ label={<BgColorsOutlined title="鑳屾櫙棰滆壊"/>} labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } > - <ColorSketch value={card.backgroundColor || '#ffffff'} onChange={this.changeBackgroundColor} /> + <ColorSketch allowClear={true} value={card.backgroundColor || ''} onChange={this.changeBackgroundColor} /> </Form.Item> <Form.Item colon={false} diff --git a/src/menu/stylecontroller/index.scss b/src/menu/stylecontroller/index.scss index 02bccdb..8940758 100644 --- a/src/menu/stylecontroller/index.scss +++ b/src/menu/stylecontroller/index.scss @@ -82,6 +82,14 @@ .color-sketch-block { position: relative; top: 10px; + .color-sketch-value { + .anticon-close-circle { + background: transparent; + } + .anticon-close-circle:hover { + color: #ffffff; + } + } } .color-sketch-block + .ant-input { float: right; diff --git a/src/tabviews/custom/components/card/double-data-card/index.jsx b/src/tabviews/custom/components/card/double-data-card/index.jsx index 9431a8d..c450a84 100644 --- a/src/tabviews/custom/components/card/double-data-card/index.jsx +++ b/src/tabviews/custom/components/card/double-data-card/index.jsx @@ -120,6 +120,7 @@ let subconfig = fromJS(_config).toJS() subconfig.columns = subconfig.subColumns || [] + subconfig.setting.primaryKey = subconfig.setting.subKey subcard.style = subcard.backStyle subcard.elements = subcard.backElements diff --git a/src/tabviews/custom/components/card/double-data-card/index.scss b/src/tabviews/custom/components/card/double-data-card/index.scss index 4969ee5..b57592e 100644 --- a/src/tabviews/custom/components/card/double-data-card/index.scss +++ b/src/tabviews/custom/components/card/double-data-card/index.scss @@ -236,6 +236,9 @@ .circle-select:hover { border-color: var(--mk-sys-color); } + .card-item-box:hover { + background-color: var(--mk-sys-color2); + } } .card-item-wrap { .card-item-box { @@ -283,11 +286,6 @@ height: 0; overflow: hidden; transition: height 0.3s; - } - .sub-card-wrap { - .card-item-box:hover { - background-color: var(--mk-sys-color2); - } } } .card-item-wrap.flex-card { diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx index 093e914..3a43701 100644 --- a/src/tabviews/custom/index.jsx +++ b/src/tabviews/custom/index.jsx @@ -900,7 +900,7 @@ // dataName 绯荤粺鐢熸垚鐨勬暟鎹簮鍚嶇О if (component.setting.sync === 'true') { - component.dataName = Utils.getdataName() + component.dataName = 'mk' + component.uuid.slice(-18) } // floor 缁勪欢鐨勫眰绾� diff --git a/src/tabviews/custom/popview/index.jsx b/src/tabviews/custom/popview/index.jsx index a3eb065..7f394ba 100644 --- a/src/tabviews/custom/popview/index.jsx +++ b/src/tabviews/custom/popview/index.jsx @@ -713,7 +713,7 @@ // dataName 绯荤粺鐢熸垚鐨勬暟鎹簮鍚嶇О if (component.setting.sync === 'true') { - component.dataName = Utils.getdataName() + component.dataName = 'mk' + component.uuid.slice(-18) } // floor 缁勪欢鐨勫眰绾� diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index 2271803..9d15120 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -973,6 +973,7 @@ _sql = _sql.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`) _sql = _sql.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`) _sql = _sql.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`) + _sql = _sql.replace(/@typename@/ig, `'admin'`) return _sql } diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx index d868d58..fbe6651 100644 --- a/src/tabviews/zshare/actionList/printbutton/index.jsx +++ b/src/tabviews/zshare/actionList/printbutton/index.jsx @@ -1131,6 +1131,8 @@ _customScript = _customScript.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`) _dataresource = _dataresource.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`) _customScript = _customScript.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`) + _dataresource = _dataresource.replace(/@typename@/ig, `'admin'`) + _customScript = _customScript.replace(/@typename@/ig, `'admin'`) let LText = '' diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx index 7e27b64..09adfd9 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx @@ -272,7 +272,7 @@ </Col> <Col span={24} className="sqlfield"> <Form.Item label={'鍙敤瀛楁'}> - <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={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id, typename</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> : null} {linefields ? <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'琛ㄥ崟鍙婅鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��'}>, {linefields}</Tooltip> : null} diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx index 306c80d..6e71f40 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx @@ -45,8 +45,8 @@ _dataresource = '' } - _dataresource = _dataresource.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${timestamp}'`) - _customScript = _customScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${timestamp}'`) + _dataresource = _dataresource.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|typename)@/ig, `'${timestamp}'`) + _customScript = _customScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|typename)@/ig, `'${timestamp}'`) _dataresource = _dataresource.replace(/@\$|\$@/ig, '') _customScript = _customScript.replace(/@\$|\$@/ig, '') diff --git a/src/templates/sharecomponent/actioncomponent/verifyprint/utils.jsx b/src/templates/sharecomponent/actioncomponent/verifyprint/utils.jsx index 0e8275c..19c1db3 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyprint/utils.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyprint/utils.jsx @@ -23,8 +23,8 @@ _dataresource = '' } - _dataresource = _dataresource.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${timestamp}'`) - _customScript = _customScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${timestamp}'`) + _dataresource = _dataresource.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|typename)@/ig, `'${timestamp}'`) + _customScript = _customScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|typename)@/ig, `'${timestamp}'`) _dataresource = _dataresource.replace(/@\$|\$@/ig, '') _customScript = _customScript.replace(/@\$|\$@/ig, '') diff --git a/src/templates/zshare/verifycard/callbackcustomscript/index.jsx b/src/templates/zshare/verifycard/callbackcustomscript/index.jsx index d2b8119..4fe7e4e 100644 --- a/src/templates/zshare/verifycard/callbackcustomscript/index.jsx +++ b/src/templates/zshare/verifycard/callbackcustomscript/index.jsx @@ -146,7 +146,7 @@ } param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.LText = param.LText.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`) + param.LText = param.LText.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|typename)@/ig, `'${param.timestamp}'`) console.info(`/* sql 楠岃瘉 */\n${param.LText.replace(/\n\s{6,20}/ig, '\n')}`) @@ -239,7 +239,7 @@ </Col> <Col span={24} className="sqlfield"> <Form.Item label={'鍙敤瀛楁'}> - <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={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id, typename</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 ? <span>, {usefulfields}</span> : ''} diff --git a/src/utils/utils-datamanage.js b/src/utils/utils-datamanage.js index 80b560e..c081694 100644 --- a/src/utils/utils-datamanage.js +++ b/src/utils/utils-datamanage.js @@ -157,6 +157,8 @@ _customScript = _customScript.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`) _dataresource = _dataresource.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`) _customScript = _customScript.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`) + _dataresource = _dataresource.replace(/@typename@/ig, `'admin'`) + _customScript = _customScript.replace(/@typename@/ig, `'admin'`) let regoptions = null if (setting.queryType === 'statistics' || _customScript) { @@ -375,6 +377,8 @@ _customScript = _customScript.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`) _dataresource = _dataresource.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`) _customScript = _customScript.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`) + _dataresource = _dataresource.replace(/@typename@/ig, `'admin'`) + _customScript = _customScript.replace(/@typename@/ig, `'admin'`) let regoptions = null if (setting.queryType === 'statistics' || _customScript) { @@ -556,6 +560,7 @@ sql = sql.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`) sql = sql.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`) sql = sql.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`) + sql = sql.replace(/@typename@/ig, `'admin'`) // 娴嬭瘯绯荤粺鎵撳嵃鏌ヨ璇彞 if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { @@ -646,6 +651,7 @@ sql = sql.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`) sql = sql.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`) sql = sql.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`) + sql = sql.replace(/@typename@/ig, `'admin'`) if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { console.info(sql.replace(/\n\s{8}/ig, '\n')) @@ -863,6 +869,8 @@ _script = _script.replace(/@UserID@/ig, userId) _sql = _sql.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`) _script = _script.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`) + _sql = _sql.replace(/@typename@/ig, `'admin'`) + _script = _script.replace(/@typename@/ig, `'admin'`) // 娴嬭瘯绯荤粺鎵撳嵃鏌ヨ璇彞 if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { diff --git a/src/utils/utils.js b/src/utils/utils.js index e7c224d..29a248c 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -78,20 +78,6 @@ } /** - * @description 鏁版嵁婧愬悕绉帮紝鐢ㄤ簬缁熶竴鏌ヨ - * @return {String} name - */ - static getdataName () { - let name = [] - let _options = 'abcdefghigklmnopqrstuvwxyz' - for (let i = 0; i < 6; i++) { - name.push(_options.substr(Math.floor(Math.random() * 26), 1)) - } - name.splice(3, 0, new Date().getTime()) - return name.join('') - } - - /** * @description 鐢熸垚32浣島uid string + 鏃堕棿 * @return {String} uuid */ @@ -2141,6 +2127,7 @@ _callbacksql = _callbacksql.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`) _callbacksql = _callbacksql.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`) _callbacksql = _callbacksql.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`) + _callbacksql = _callbacksql.replace(/@typename@/ig, `'admin'`) return { sql: _sql, diff --git a/src/views/billprint/index.jsx b/src/views/billprint/index.jsx index f69b43a..b616463 100644 --- a/src/views/billprint/index.jsx +++ b/src/views/billprint/index.jsx @@ -399,7 +399,7 @@ // floor 缁勪欢鐨勫眰绾� // pageable 鏄惁鍒嗛〉锛岀粍浠跺睘鎬э紝涓嶅垎椤电殑缁勪欢鎵嶅彲浠ョ粺涓�鏌ヨ if (component.setting.sync === 'true') { - component.dataName = Utils.getdataName() + component.dataName = 'mk' + component.uuid.slice(-18) let param = this.getDefaultParam(component) _pars.push(param) } else { -- Gitblit v1.8.0