From 6128b532f5397d8863697fc9ffe6f5a6361fca80 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 26 五月 2024 12:13:34 +0800 Subject: [PATCH] 2024-05-26 --- src/tabviews/custom/popview/index.jsx | 66 +++++++++------- src/tabviews/basetable/index.jsx | 64 +++++++++------- src/tabviews/custom/index.jsx | 66 +++++++++------- src/templates/zshare/verifycard/baseform/index.jsx | 2 src/tabviews/zshare/actionList/normalbutton/index.jsx | 16 +++ 5 files changed, 122 insertions(+), 92 deletions(-) diff --git a/src/tabviews/basetable/index.jsx b/src/tabviews/basetable/index.jsx index a8c9ff9..b02c94b 100644 --- a/src/tabviews/basetable/index.jsx +++ b/src/tabviews/basetable/index.jsx @@ -512,37 +512,45 @@ } } - if (cell.verify && cell.verify.invalid === 'true') { - if (item.setting.maxScript && item.setting.maxScript >= 300) { - cell.verify.invalid = 'false' - } else if (cell.intertype !== 'system' && cell.procMode !== 'system') { - cell.verify.invalid = 'false' - } else if (cell.sqlType === 'insert') { - cell.verify.invalid = 'false' - } else if (cell.Ot === 'notRequired') { - cell.verify.invalid = 'false' - } - } - - if (cell.verify && cell.verify.preHandle === 'true') { - let script = cell.verify.pre_func - if (!/#position-/.test(script) || /#position-init/.test(script)) { - try { - // eslint-disable-next-line - let func = new Function('btn', 'position', 'systemType', script) - func(cell, 'init', window.GLOB.systemType) - } catch (e) { - console.warn(e) + if (cell.verify) { + if (cell.verify.invalid === 'true') { + if (item.wrap && (item.wrap.datatype === 'static' || item.wrap.datatype === 'public')) { + cell.verify.invalid = 'false' + } else if (item.setting && item.setting.maxScript && item.setting.maxScript >= 300) { + cell.verify.invalid = 'false' + } else if (cell.intertype !== 'system' && cell.procMode !== 'system') { + cell.verify.invalid = 'false' + } else if (cell.sqlType === 'insert') { + cell.verify.invalid = 'false' + } else if (cell.Ot === 'notRequired') { + cell.verify.invalid = 'false' } } - if (/#position-inner/.test(script)) { - cell.$innerScript = script + + if (cell.verify.linkEnable === 'true' && /@/.test(cell.verify.linkUrl)) { + cell.returnValue = 'true' } - if (/#position-outer/.test(script)) { - cell.$outerScript = script - } - if (/#position-callback/.test(script)) { - cell.$callbackScript = script + + if (cell.verify.preHandle === 'true') { + let script = cell.verify.pre_func + if (!/#position-/.test(script) || /#position-init/.test(script)) { + try { + // eslint-disable-next-line + let func = new Function('btn', 'position', 'systemType', script) + func(cell, 'init', window.GLOB.systemType) + } catch (e) { + console.warn(e) + } + } + if (/#position-inner/.test(script)) { + cell.$innerScript = script + } + if (/#position-outer/.test(script)) { + cell.$outerScript = script + } + if (/#position-callback/.test(script)) { + cell.$callbackScript = script + } } } diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx index b56749d..8f36d50 100644 --- a/src/tabviews/custom/index.jsx +++ b/src/tabviews/custom/index.jsx @@ -931,39 +931,45 @@ cell.modal.uuid = cell.uuid + 'pop' } - if (cell.verify && cell.verify.invalid === 'true') { - if (item.wrap && (item.wrap.datatype === 'static' || item.wrap.datatype === 'public')) { - cell.verify.invalid = 'false' - } else if (item.setting && item.setting.maxScript && item.setting.maxScript >= 300) { - cell.verify.invalid = 'false' - } else if (cell.intertype !== 'system' && cell.procMode !== 'system') { - cell.verify.invalid = 'false' - } else if (cell.sqlType === 'insert') { - cell.verify.invalid = 'false' - } else if (cell.Ot === 'notRequired') { - cell.verify.invalid = 'false' - } - } - - if (cell.verify && cell.verify.preHandle === 'true') { - let script = cell.verify.pre_func - if (!/#position-/.test(script) || /#position-init/.test(script)) { - try { - // eslint-disable-next-line - let func = new Function('btn', 'position', 'systemType', script) - func(cell, 'init', window.GLOB.systemType) - } catch (e) { - console.warn(e) + if (cell.verify) { + if (cell.verify.invalid === 'true') { + if (item.wrap && (item.wrap.datatype === 'static' || item.wrap.datatype === 'public')) { + cell.verify.invalid = 'false' + } else if (item.setting && item.setting.maxScript && item.setting.maxScript >= 300) { + cell.verify.invalid = 'false' + } else if (cell.intertype !== 'system' && cell.procMode !== 'system') { + cell.verify.invalid = 'false' + } else if (cell.sqlType === 'insert') { + cell.verify.invalid = 'false' + } else if (cell.Ot === 'notRequired') { + cell.verify.invalid = 'false' } } - if (/#position-inner/.test(script)) { - cell.$innerScript = script + + if (cell.verify.linkEnable === 'true' && /@/.test(cell.verify.linkUrl)) { + cell.returnValue = 'true' } - if (/#position-outer/.test(script)) { - cell.$outerScript = script - } - if (/#position-callback/.test(script)) { - cell.$callbackScript = script + + if (cell.verify.preHandle === 'true') { + let script = cell.verify.pre_func + if (!/#position-/.test(script) || /#position-init/.test(script)) { + try { + // eslint-disable-next-line + let func = new Function('btn', 'position', 'systemType', script) + func(cell, 'init', window.GLOB.systemType) + } catch (e) { + console.warn(e) + } + } + if (/#position-inner/.test(script)) { + cell.$innerScript = script + } + if (/#position-outer/.test(script)) { + cell.$outerScript = script + } + if (/#position-callback/.test(script)) { + cell.$callbackScript = script + } } } diff --git a/src/tabviews/custom/popview/index.jsx b/src/tabviews/custom/popview/index.jsx index 4213bf9..db2caee 100644 --- a/src/tabviews/custom/popview/index.jsx +++ b/src/tabviews/custom/popview/index.jsx @@ -628,39 +628,45 @@ } } - if (cell.verify && cell.verify.invalid === 'true') { - if (item.wrap && item.wrap.datatype === 'static') { - cell.verify.invalid = 'false' - } else if (item.setting && item.setting.maxScript && item.setting.maxScript >= 300) { - cell.verify.invalid = 'false' - } else if (cell.sqlType === 'insert') { - cell.verify.invalid = 'false' - } else if (cell.Ot === 'notRequired') { - cell.verify.invalid = 'false' - } else if (cell.intertype !== 'system' && cell.procMode !== 'system') { - cell.verify.invalid = 'false' - } - } - - if (cell.verify && cell.verify.preHandle === 'true') { - let script = cell.verify.pre_func - if (!/#position-/.test(script) || /#position-init/.test(script)) { - try { - // eslint-disable-next-line - let func = new Function('btn', 'position', 'systemType', script) - func(cell, 'init', window.GLOB.systemType) - } catch (e) { - console.warn(e) + if (cell.verify) { + if (cell.verify.invalid === 'true') { + if (item.wrap && (item.wrap.datatype === 'static' || item.wrap.datatype === 'public')) { + cell.verify.invalid = 'false' + } else if (item.setting && item.setting.maxScript && item.setting.maxScript >= 300) { + cell.verify.invalid = 'false' + } else if (cell.intertype !== 'system' && cell.procMode !== 'system') { + cell.verify.invalid = 'false' + } else if (cell.sqlType === 'insert') { + cell.verify.invalid = 'false' + } else if (cell.Ot === 'notRequired') { + cell.verify.invalid = 'false' } } - if (/#position-inner/.test(script)) { - cell.$innerScript = script + + if (cell.verify.linkEnable === 'true' && /@/.test(cell.verify.linkUrl)) { + cell.returnValue = 'true' } - if (/#position-outer/.test(script)) { - cell.$outerScript = script - } - if (/#position-callback/.test(script)) { - cell.$callbackScript = script + + if (cell.verify.preHandle === 'true') { + let script = cell.verify.pre_func + if (!/#position-/.test(script) || /#position-init/.test(script)) { + try { + // eslint-disable-next-line + let func = new Function('btn', 'position', 'systemType', script) + func(cell, 'init', window.GLOB.systemType) + } catch (e) { + console.warn(e) + } + } + if (/#position-inner/.test(script)) { + cell.$innerScript = script + } + if (/#position-outer/.test(script)) { + cell.$outerScript = script + } + if (/#position-callback/.test(script)) { + cell.$callbackScript = script + } } } diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index d4f7524..492aad9 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -2320,7 +2320,7 @@ Modal.success({ title: msg, onOk: () => { - this.successContinue(sign, id) + this.successContinue(sign, id, res) } }) return @@ -2328,10 +2328,10 @@ } - this.successContinue(sign, id) + this.successContinue(sign, id, res) } - successContinue = (sign, id) => { + successContinue = (sign, id, res) => { const { btn } = this.props const { btnconfig } = this.state @@ -2452,6 +2452,16 @@ } else { url = btn.verify.linkUrl } + + if (/@/.test(url)) { + Object.keys(res).forEach(key => { + url = url.replace(new RegExp('@' + key + '@', 'ig'), res[key]) + }) + } + if (!/^http/.test(url)) { + url = window.location.origin + url + } + window.open(url) } } diff --git a/src/templates/zshare/verifycard/baseform/index.jsx b/src/templates/zshare/verifycard/baseform/index.jsx index affd4f5..7b9cec0 100644 --- a/src/templates/zshare/verifycard/baseform/index.jsx +++ b/src/templates/zshare/verifycard/baseform/index.jsx @@ -548,7 +548,7 @@ <Col span={24}></Col> <Col span={8}> <Form.Item label={ - <Tooltip placement="bottomLeft" title="鎸夐挳鎵ц鎴愬姛鍚庨渶瑕佹墦寮�鐨勯摼鎺ュ湴鍧�銆�"> + <Tooltip placement="bottomLeft" overlayStyle={{maxWidth: 350}} title="鎸夐挳鎵ц鎴愬姛鍚庨渶瑕佹墦寮�鐨勯摼鎺ュ湴鍧�銆傚鏋滃湴鍧�涓嶆槸http寮�濮嬶紝浼氭嫾鎺ュ綋鍓嶇郴缁熷煙鍚嶏紝渚嬪锛氬湴鍧�涓� /xxxx 鏃讹紝浼氭墦寮� http://***.***.**/xxxx銆�"> <QuestionCircleOutlined className="mk-form-tip" /> 鎵撳紑閾炬帴 </Tooltip> -- Gitblit v1.8.0