From ed719ec5d86d3373ee95df8262eba3f456f94d60 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 12 六月 2024 17:28:09 +0800 Subject: [PATCH] 2024-06-12 --- src/menu/components/search/main-search/index.jsx | 9 +--- src/tabviews/zshare/mutilform/index.jsx | 4 +- src/templates/zshare/modalform/index.jsx | 9 +--- src/mob/searchconfig/index.jsx | 9 +--- src/api/index.js | 6 -- src/tabviews/zshare/topSearch/index.jsx | 4 +- src/templates/zshare/formconfig.jsx | 6 ++- src/menu/components/share/searchcomponent/index.jsx | 9 +--- src/menu/components/table/edit-table/columns/editColumn/index.jsx | 9 +--- src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx | 3 + src/tabviews/custom/components/table/edit-table/normalTable/index.jsx | 2 src/templates/sharecomponent/searchcomponent/index.jsx | 9 +--- 12 files changed, 24 insertions(+), 55 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index 9923416..fcf4748 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1087,7 +1087,7 @@ /** * @description sql妫�楠� */ - sDebug (sql, rduri = null) { + sDebug (sql) { let param = { func: 's_debug_sql', exec_type: window.GLOB.execType || 'y', @@ -1123,10 +1123,6 @@ param = this.encryptParam(param) let url = '/webapi/dostars' - - if (rduri) { - url = rduri - } let timer = setTimeout(() => { let _param = { diff --git a/src/menu/components/search/main-search/index.jsx b/src/menu/components/search/main-search/index.jsx index 07a0c93..a1786c1 100644 --- a/src/menu/components/search/main-search/index.jsx +++ b/src/menu/components/search/main-search/index.jsx @@ -250,7 +250,7 @@ return } - if (['select', 'multiselect', 'link', 'checkcard'].includes(res.type) && res.resourceType === '1' && /\s/.test(res.dataSource)) { + if (['select', 'multiselect', 'link', 'checkcard'].includes(res.type) && res.resourceType === '1' && res.database !== 'sso' && /\s/.test(res.dataSource)) { this.setState({ sqlVerifing: true }) @@ -258,13 +258,8 @@ let sql = `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20) ${res.dataSource}` sql = sql.replace(/@\$|\$@/ig, '') - - let rduri = '' - if (window.GLOB.mainSystemApi && res.database === 'sso') { - rduri = window.GLOB.mainSystemApi - } - Api.sDebug(sql, rduri).then(result => { + Api.sDebug(sql).then(result => { if (result.status || result.ErrCode === '-2') { this.setState({ sqlVerifing: false, diff --git a/src/menu/components/share/searchcomponent/index.jsx b/src/menu/components/share/searchcomponent/index.jsx index b809cb9..82050b9 100644 --- a/src/menu/components/share/searchcomponent/index.jsx +++ b/src/menu/components/share/searchcomponent/index.jsx @@ -205,7 +205,7 @@ return } - if (['select', 'multiselect', 'link', 'checkcard'].includes(res.type) && res.resourceType === '1' && /\s/.test(res.dataSource)) { + if (['select', 'multiselect', 'link', 'checkcard'].includes(res.type) && res.resourceType === '1' && res.database !== 'sso' && /\s/.test(res.dataSource)) { this.setState({ sqlVerifing: true }) @@ -213,13 +213,8 @@ let sql = `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20) ${res.dataSource}` sql = sql.replace(/@\$|\$@/ig, '') - - let rduri = '' - if (window.GLOB.mainSystemApi && res.database === 'sso') { - rduri = window.GLOB.mainSystemApi - } - Api.sDebug(sql, rduri).then(result => { + Api.sDebug(sql).then(result => { if (result.status || result.ErrCode === '-2') { this.setState({ sqlVerifing: false, diff --git a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx index 94e2a8c..2d99072 100644 --- a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx +++ b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx @@ -690,12 +690,13 @@ key: 'database', label: '鏁版嵁搴�', initVal: card.database || 'local', + tooltip: '娴嬭瘯绯荤粺鏁版嵁搴撳潎鎸囧悜鏈湴锛屾寮忕郴缁熷彲浣跨敤鍗曠偣鏁版嵁搴撱��', options: [{ value: 'local', text: '鏈湴' }, { value: 'sso', - text: '绯荤粺' + text: '鍗曠偣' }] }, { diff --git a/src/menu/components/table/edit-table/columns/editColumn/index.jsx b/src/menu/components/table/edit-table/columns/editColumn/index.jsx index dd97ea0..4e086b5 100644 --- a/src/menu/components/table/edit-table/columns/editColumn/index.jsx +++ b/src/menu/components/table/edit-table/columns/editColumn/index.jsx @@ -580,7 +580,7 @@ if (!pass) return } - if (values.editType === 'select' && values.resourceType === '1' && values.dataSource) { + if (values.editType === 'select' && values.resourceType === '1' && values.database !== 'sso' && values.dataSource) { let _option = Utils.getSelectQueryOptions(values) let sql = `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20) @@ -588,13 +588,8 @@ // LoginUID|SessionUid|UserID|Appkey 宸叉浛鎹� sql = sql.replace(/@\$|\$@/ig, '') - - let rduri = '' - if (window.GLOB.mainSystemApi && values.database === 'sso') { - rduri = window.GLOB.mainSystemApi - } - Api.sDebug(sql, rduri).then(result => { + Api.sDebug(sql).then(result => { if (result.status || result.ErrCode === '-2') { this.setState({visible: false, loading: false, formlist: null}) this.props.submitCol(values) diff --git a/src/mob/searchconfig/index.jsx b/src/mob/searchconfig/index.jsx index e943736..1e9b13b 100644 --- a/src/mob/searchconfig/index.jsx +++ b/src/mob/searchconfig/index.jsx @@ -223,7 +223,7 @@ return } - if (['checkcard'].includes(res.type) && res.resourceType === '1' && /\s/.test(res.dataSource)) { + if (['checkcard'].includes(res.type) && res.resourceType === '1' && res.database !== 'sso' && /\s/.test(res.dataSource)) { this.setState({ sqlVerifing: true }) @@ -232,12 +232,7 @@ ${res.dataSource}` sql = sql.replace(/@\$|\$@/ig, '') - let rduri = '' - if (window.GLOB.mainSystemApi && res.database === 'sso') { - rduri = window.GLOB.mainSystemApi - } - - Api.sDebug(sql, rduri).then(result => { + Api.sDebug(sql).then(result => { if (result.status || result.ErrCode === '-2') { this.setState({ sqlVerifing: false, diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx index 916818a..cb62553 100644 --- a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx @@ -1874,7 +1874,7 @@ let _sso = _sql deForms.forEach(item => { - if (item.database === 'sso') { + if (item.database === 'sso' && (window.GLOB.mkHS || window.GLOB.systemType === 'production')) { let sql = _sso + item.base_sql _sso = '' diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx index 75e47b3..2d1dfaf 100644 --- a/src/tabviews/zshare/mutilform/index.jsx +++ b/src/tabviews/zshare/mutilform/index.jsx @@ -856,7 +856,7 @@ let _sso = _sql deForms.forEach(item => { - if (item.database === 'sso') { + if (item.database === 'sso' && (window.GLOB.mkHS || window.GLOB.systemType === 'production')) { let sql = _sso + item.base_sql _sso = '' @@ -1013,7 +1013,7 @@ param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : param.LText, param.timestamp) - if (form.database === 'sso' && window.GLOB.mainSystemApi) { + if (form.database === 'sso' && window.GLOB.mainSystemApi && (window.GLOB.mkHS || window.GLOB.systemType === 'production')) { param.rduri = window.GLOB.mainSystemApi } if (window.GLOB.mkHS) { // 浜戠鏁版嵁楠岃瘉 diff --git a/src/tabviews/zshare/topSearch/index.jsx b/src/tabviews/zshare/topSearch/index.jsx index 47f13bc..4929607 100644 --- a/src/tabviews/zshare/topSearch/index.jsx +++ b/src/tabviews/zshare/topSearch/index.jsx @@ -215,7 +215,7 @@ }) } else { // 鍚堝苟璇锋眰锛屽尯鍒嗘湰鍦板強绯荤粺 _sql = _sql.replace(/%/ig, ' mpercent ') - if (item.database === 'sso') { + if (item.database === 'sso' && (window.GLOB.mkHS || window.GLOB.systemType === 'production')) { if (mainItems.length === 0) { _sql = _declare + _sql } @@ -558,7 +558,7 @@ param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : param.LText, param.timestamp) - if (item.database === 'sso' && window.GLOB.mainSystemApi) { + if (item.database === 'sso' && window.GLOB.mainSystemApi && (window.GLOB.mkHS || window.GLOB.systemType === 'production')) { param.rduri = window.GLOB.mainSystemApi } diff --git a/src/templates/sharecomponent/searchcomponent/index.jsx b/src/templates/sharecomponent/searchcomponent/index.jsx index 4a0973a..f6e9073 100644 --- a/src/templates/sharecomponent/searchcomponent/index.jsx +++ b/src/templates/sharecomponent/searchcomponent/index.jsx @@ -205,7 +205,7 @@ return } - if (['checkcard', 'select', 'multiselect', 'link'].includes(res.type) && res.resourceType === '1' && /\s/.test(res.dataSource)) { + if (['checkcard', 'select', 'multiselect', 'link'].includes(res.type) && res.resourceType === '1' && res.database !== 'sso' && /\s/.test(res.dataSource)) { this.setState({ sqlVerifing: true }) @@ -213,13 +213,8 @@ let sql = `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20) ${res.dataSource}` sql = sql.replace(/@\$|\$@/ig, '') - - let rduri = '' - if (window.GLOB.mainSystemApi && res.database === 'sso') { - rduri = window.GLOB.mainSystemApi - } - Api.sDebug(sql, rduri).then(result => { + Api.sDebug(sql).then(result => { if (result.status || result.ErrCode === '-2') { this.setState({ sqlVerifing: false, diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index e766e3f..b895955 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -439,12 +439,13 @@ key: 'database', label: '鏁版嵁搴�', initVal: card.database || 'local', + tooltip: '娴嬭瘯绯荤粺鏁版嵁搴撳潎鎸囧悜鏈湴锛屾寮忕郴缁熷彲浣跨敤鍗曠偣鏁版嵁搴撱��', options: [{ value: 'local', text: '鏈湴' }, { value: 'sso', - text: '绯荤粺' + text: '鍗曠偣' }] }, { @@ -1872,12 +1873,13 @@ key: 'database', label: '鏁版嵁搴�', initVal: card.database || 'local', + tooltip: '娴嬭瘯绯荤粺鏁版嵁搴撳潎鎸囧悜鏈湴锛屾寮忕郴缁熷彲浣跨敤鍗曠偣鏁版嵁搴撱��', options: [{ value: 'local', text: '鏈湴' }, { value: 'sso', - text: '绯荤粺' + text: '鍗曠偣' }] }, { diff --git a/src/templates/zshare/modalform/index.jsx b/src/templates/zshare/modalform/index.jsx index 87a9c8b..d01bb98 100644 --- a/src/templates/zshare/modalform/index.jsx +++ b/src/templates/zshare/modalform/index.jsx @@ -1095,7 +1095,7 @@ window.GLOB.formId = card.uuid - if (['select', 'multiselect', 'link', 'checkbox', 'radio', 'checkcard'].includes(values.type) && values.resourceType === '1' && values.dataSource) { + if (['select', 'multiselect', 'link', 'checkbox', 'radio', 'checkcard'].includes(values.type) && values.resourceType === '1' && values.database !== 'sso' && values.dataSource) { let _option = Utils.getSelectQueryOptions(values) let sql = `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20) @@ -1103,14 +1103,9 @@ // LoginUID|SessionUid|UserID|Appkey|lang 宸叉浛鎹� sql = sql.replace(/@\$|\$@/ig, '') - - let rduri = '' - if (window.GLOB.mainSystemApi && values.database === 'sso') { - rduri = window.GLOB.mainSystemApi - } resolve({values, loading: true, promise: () => new Promise((resolve, reject) => { - Api.sDebug(sql, rduri).then(result => { + Api.sDebug(sql).then(result => { if (result.status || result.ErrCode === '-2') { resolve() } else { -- Gitblit v1.8.0