src/index.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/menu/components/share/actioncomponent/actionform/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/menu/components/share/actioncomponent/formconfig.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/menu/datasource/verifycard/settingform/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/tabviews/zshare/actionList/excelInbutton/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/tabviews/zshare/actionList/exceloutbutton/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/tabviews/zshare/actionList/normalbutton/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/utils/utils-custom.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/utils/utils-datamanage.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/login/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/menudesign/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/systemfunc/sidemenu/config.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/tabledesign/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/index.js
@@ -61,6 +61,7 @@ GLOB.upStatus = false GLOB.navBar = 'shutter' // 默认为百叶窗 GLOB.style = 'bg_black_style_blue' GLOB.defLang = config.defaultLang GLOB.sysType = options.sysType if (GLOB.sysType !== 'cloud') { src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -221,7 +221,7 @@ } reRequired.innerFunc = true } else { shows.push('sql', 'sqlType', 'output') shows.push('sql', 'sqlType', 'output', 'database') } if (Ot === 'required') { @@ -299,7 +299,7 @@ shows.push('innerFunc', 'extraParam') reRequired.innerFunc = true } else { shows.push('sql', 'sqlType') shows.push('sql', 'sqlType', 'database') } if (this.record.execSuccess === 'goback') { @@ -349,6 +349,8 @@ } else if (this.record.intertype === 'inner') { shows.push('innerFunc', 'extraParam') reRequired.innerFunc = true } else { shows.push('database') } if (this.record.execSuccess === 'grid' || this.record.execError === 'grid') { shows.push('resetPageIndex') @@ -384,6 +386,8 @@ } else if (this.record.intertype === 'inner') { shows.push('innerFunc', 'extraParam') reRequired.innerFunc = true } else { shows.push('database') } if (this.record.execSuccess === 'grid' || this.record.execError === 'grid') { shows.push('resetPageIndex') src/menu/components/share/actioncomponent/formconfig.jsx
@@ -1371,6 +1371,20 @@ }, { type: 'radio', key: 'database', label: '数据库', initVal: card.database || 'local', tooltip: '测试系统数据库均指向本地,正式系统可使用单点数据库。', options: [{ value: 'local', text: '本地' }, { value: 'sso', text: '单点' }] }, { type: 'radio', key: 'permission', label: '权限验证', initVal: card.permission || 'true', @@ -2562,6 +2576,20 @@ }, { type: 'radio', key: 'database', label: '数据库', initVal: card.database || 'local', tooltip: '测试系统数据库均指向本地,正式系统可使用单点数据库。', options: [{ value: 'local', text: '本地' }, { value: 'sso', text: '单点' }] }, { type: 'radio', key: 'permission', label: '权限验证', initVal: card.permission || 'true', src/menu/datasource/verifycard/settingform/index.jsx
@@ -105,6 +105,9 @@ if (values.interType === 'system' && values.onload === 'false') { values.sync = 'false' } if (values.interType === 'system' && values.database === 'sso') { values.sync = 'false' } // 数据源前端验证 if (values.interType === 'system' && values.execute !== 'false' && values.dataresource) { @@ -515,6 +518,22 @@ </Radio.Group>)} </Form.Item> </Col> : null} {setting.interType === 'system' ? <Col span={8}> <Form.Item label={ <Tooltip placement="topLeft" title="测试系统数据库均指向本地,正式系统可使用单点数据库。"> <QuestionCircleOutlined className="mk-form-tip" /> 数据库 </Tooltip> }> {getFieldDecorator('database', { initialValue: setting.database || 'local' })( <Radio.Group> <Radio value="local">本地</Radio> <Radio value="sso">单点</Radio> </Radio.Group>)} </Form.Item> </Col> : null} {/* 1、不分页且不存在上级模块 */} {!['navbar', 'interface', 'calendar'].includes(config.type) && !['editable', 'basetable', 'dualdatacard', 'invoice', 'invTable'].includes(config.subtype) && (!config.pageable || (config.pageable && setting.laypage === 'false')) && (setting.supModule.length === 0 || setting.supModule[0] === 'empty') && setting.interType === 'system' && setting.onload !== 'false' ? <Col span={8}> <Form.Item label={ src/tabviews/zshare/actionList/excelInbutton/index.jsx
@@ -354,6 +354,12 @@ param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) } if (btn.database === 'sso') { if ((window.GLOB.mkHS || window.GLOB.systemType === 'production') && window.GLOB.mainSystemApi) { param.rduri = window.GLOB.mainSystemApi } } param.menuname = btn.logLabel if (window.GLOB.probation) { src/tabviews/zshare/actionList/exceloutbutton/index.jsx
@@ -159,7 +159,11 @@ if (btn.pagination !== 'true') { if (btn.intertype === 'system') { // 使用系统函数 let param = this.getExcelDefaultParam(viewParam.orderBy, viewParam.search) if (btn.database === 'sso') { if ((window.GLOB.mkHS || window.GLOB.systemType === 'production') && window.GLOB.mainSystemApi) { param.rduri = window.GLOB.mainSystemApi } } Api.genericInterface(param).then(result => { if (result.status) { this.exportExcel(result.data, result.ErrCode, result.message, viewParam.search) @@ -376,6 +380,11 @@ let param = null if (btn.intertype === 'system') { // 使用系统函数 param = this.getExcelDefaultParam(viewParam.orderBy, viewParam.search, true, pageIndex, pageSize) if (btn.database === 'sso') { if ((window.GLOB.mkHS || window.GLOB.systemType === 'production') && window.GLOB.mainSystemApi) { param.rduri = window.GLOB.mainSystemApi } } } else if (btn.intertype === 'inner') { // 使用内部函数 param = this.getExcelCustomParam(viewParam.orderBy, viewParam.search, true, pageIndex, pageSize) param.func = btn.innerFunc src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -1137,6 +1137,14 @@ return item }) } if (btn.database === 'sso') { if ((window.GLOB.mkHS || window.GLOB.systemType === 'production') && window.GLOB.mainSystemApi) { params = params.map(item => { item.rduri = window.GLOB.mainSystemApi return item }) } } } else { params = this.getInnerParam(data, formdata) } src/utils/utils-custom.js
@@ -558,6 +558,9 @@ }) } } else if (item.type === 'form') { if (item.wrap.datatype === 'public' && item.wrap.publicId) { item.wrap.publicId = md5(commonId + item.wrap.publicId) } item.subcards = item.subcards.map(cell => { cell.uuid = this.getuuid() @@ -2071,4 +2074,303 @@ } return true } /** * @description 获取语言转换信息 */ export function getLangTrans (config) { let defLang = window.GLOB.defLang || '' let langList = sessionStorage.getItem('langList') if (langList) { try { langList = JSON.parse(langList) if (langList.length === 1) { defLang = '' } else if (!defLang || langList.findIndex(item => item.Lang === defLang) === -1) { if (langList.findIndex(item => item.Lang === 'zh-CN') === -1) { defLang = langList[0].Lang } else { defLang = 'zh-CN' } } } catch (e) { defLang = '' } } else { defLang = '' } if (!defLang) return '' let sql = [] let btn = [] let ops = [] let text = [] let filterElement = (card) => { if (card.datatype === 'static' && card.eleType === 'text') { sql.push(card.value) } if (card.prefix) { sql.push(card.prefix) } if (card.postfix) { sql.push(card.postfix) } } let filterSql = (sl) => { if (!sl) return let cutreg = /[\u4E00-\u9FA5。!,、]+/ig let tbs = sl.match(cutreg) if (!tbs) return text.push(...tbs) } let filterBtn = (btn) => { if (!btn.verify) return btn.verify.customverifys && btn.verify.customverifys.forEach(script => { filterSql(script.sql) }) btn.verify.scripts && btn.verify.scripts.forEach(script => { filterSql(script.sql) }) btn.verify.cbScripts && btn.verify.cbScripts.forEach(script => { filterSql(script.sql) }) if (btn.OpenType === 'funcbutton') { if (btn.intertype === 'system' && btn.verify.dataType === 'custom' && btn.verify.setting) { filterSql(btn.verify.setting.dataresource) } } else if (btn.OpenType === 'excelOut') { filterSql(btn.verify.dataresource) } } let traversal = (components) => { if (!components) return components.forEach(item => { if (item.type === 'tabs') { item.subtabs.forEach(tab => { sql.push(tab.label) traversal(tab.components) }) } else if (item.type === 'group') { traversal(item.components) } else { if (item.setting && (!item.wrap || !item.wrap.datatype || item.wrap.datatype === 'dynamic')) { if (item.setting.interType === 'system') { filterSql(item.setting.dataresource) item.scripts && item.scripts.forEach(script => { filterSql(script.sql) }) } } if (item.columns) { item.columns.forEach(cell => { sql.push(cell.label) }) } if (item.search) { item.search.forEach(cell => { sql.push(cell.label) if (cell.options) { cell.options.forEach(o => { ops.push(o.Text) }) } if (cell.resourceType === '1') { filterSql(cell.dataSource) } }) } if (item.action) { item.action.forEach(cell => { btn.push(cell.label) filterBtn(cell) if (cell.OpenType === 'popview' && cell.config) { traversal(cell.config.components) } else if (cell.OpenType === 'pop') { if (cell.modal && cell.modal.fields.length) { cell.modal.fields.forEach(n => { sql.push(n.label) if (n.resourceType === '1') { filterSql(n.dataSource) } }) } } }) } if (item.type === 'card' || item.type === 'carousel' || item.type === 'timeline') { item.subcards.forEach(card => { card.elements && card.elements.forEach(cell => { if (cell.eleType === 'button') { btn.push(cell.label) filterBtn(cell) if (cell.OpenType === 'popview' && cell.config) { traversal(cell.config.components) } else if (cell.OpenType === 'pop') { if (cell.modal && cell.modal.fields.length) { cell.modal.fields.forEach(n => { sql.push(n.label) if (n.resourceType === '1') { filterSql(n.dataSource) } }) } } } else { filterElement(cell) } }) card.backElements && card.backElements.forEach(cell => { if (cell.eleType === 'button') { btn.push(cell.label) filterBtn(cell) if (cell.OpenType === 'popview' && cell.config) { traversal(cell.config.components) } else if (cell.OpenType === 'pop') { if (cell.modal && cell.modal.fields.length) { cell.modal.fields.forEach(n => { sql.push(n.label) if (n.resourceType === '1') { filterSql(n.dataSource) } }) } } } else { filterElement(cell) } }) }) } else if (item.type === 'balcony') { item.elements && item.elements.forEach(cell => { if (cell.eleType === 'button') { btn.push(cell.label) filterBtn(cell) if (cell.OpenType === 'popview' && cell.config) { traversal(cell.config.components) } else if (cell.OpenType === 'pop') { if (cell.modal && cell.modal.fields.length) { cell.modal.fields.forEach(n => { sql.push(n.label) if (n.resourceType === '1') { filterSql(n.dataSource) } }) } } } else { filterElement(cell) } }) } else if (item.type === 'table') { let loopCol = (cols) => { cols.forEach(col => { sql.push(col.label) if (col.prefix) { sql.push(col.prefix) } if (col.postfix) { sql.push(col.postfix) } if (col.type === 'colspan') { loopCol(col.subcols) } else if (col.type === 'custom') { col.elements.forEach(cell => { if (cell.eleType === 'button') { btn.push(cell.label) filterBtn(cell) if (cell.OpenType === 'popview' && cell.config) { traversal(cell.config.components) } else if (cell.OpenType === 'pop') { if (cell.modal && cell.modal.fields.length) { cell.modal.fields.forEach(n => { sql.push(n.label) if (n.resourceType === '1') { filterSql(n.dataSource) } }) } } } else { filterElement(cell) } }) } }) } loopCol(item.cols) } else if (item.type === 'form') { item.subcards.forEach(cell => { filterBtn(cell.subButton) cell.fields.forEach(n => { sql.push(n.label) if (n.resourceType === '1') { filterSql(n.dataSource) } }) }) } } }) } if (config.interfaces) { config.interfaces.forEach(item => { if (item.setting.interType === 'system') { filterSql(item.setting.dataresource) item.scripts && item.scripts.forEach(script => { filterSql(script.sql) }) } }) } traversal(config.components) sql = sql.filter(Boolean) btn = btn.filter(Boolean) ops = ops.filter(Boolean) text = text.filter(Boolean) sql = Array.from(new Set(sql)) btn = Array.from(new Set(btn)) ops = Array.from(new Set(ops)) text = Array.from(new Set(text)) sql = sql.map(l => `'${l}','title'`) btn = btn.map(l => `'${l}','button'`) ops = ops.map(l => `'${l}','list'`) text = text.map(l => `'${l}','text'`) let list = [...btn, ...sql, ...ops, ...text] if (config.MenuName) { list.unshift(`'${config.MenuName}','menu'`) } let result = [] langList.forEach(lan => { if (lan.Lang === defLang) return list.forEach(n => { result.push(`'${lan.Lang}',${n}`) }) }) return result.join(';') } src/utils/utils-datamanage.js
@@ -323,6 +323,12 @@ param.s_version_up = 'true' } if (setting.database === 'sso') { if ((window.GLOB.mkHS || window.GLOB.systemType === 'production') && window.GLOB.mainSystemApi) { param.rduri = window.GLOB.mainSystemApi } } return param } src/views/login/index.jsx
@@ -699,6 +699,8 @@ } catch (e) { localStorage.removeItem(_loginurl) } sessionStorage.setItem('langList', JSON.stringify(res.lang_data || [])) this.setState({ loginWays: login_ways, src/views/menudesign/index.jsx
@@ -13,7 +13,7 @@ import Utils, { setGLOBFuncs } from '@/utils/utils.js' import antdZhCN from 'antd/es/locale/zh_CN' import MKEmitter from '@/utils/events.js' import { getTables, getFuncsAndInters } from '@/utils/utils-custom.js' import { getTables, getFuncsAndInters, getLangTrans } from '@/utils/utils-custom.js' import asyncComponent from '@/utils/asyncComponent' import '@/assets/css/design.scss' @@ -842,6 +842,7 @@ let interfaces = getFuncsAndInters(config) let urlFields = config.urlFields ? config.urlFields.join(',') : '' let langSql = getLangTrans(config) let param = { func: 'sPC_TrdMenu_AddUpt', @@ -860,7 +861,8 @@ debug_md5: key, debug_url: url, debug_list: window.btoa(tbs), LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))) LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))), lang_translation: window.btoa(window.encodeURIComponent(langSql)) } param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') src/views/systemfunc/sidemenu/config.jsx
@@ -84,6 +84,14 @@ MenuID: '15827879285193g85m3i2uprektpgmpf', MenuNo: 'bd_mes_techM', MenuName: '工艺主数据', }, { src: '', systems: ['local'], PageParam: {OpenType: 'newtab', Template: 'CustomPage'}, type: 'CustomPage', MenuID: '17180925258436em38rhpqncckvohv0s', MenuNo: 's_app_lang_translation_M', MenuName: '语言包', }] }, { MenuID: 'systemManageViewInterface', src/views/tabledesign/index.jsx
@@ -12,7 +12,7 @@ import Utils, { setGLOBFuncs } from '@/utils/utils.js' import antdZhCN from 'antd/es/locale/zh_CN' import MKEmitter from '@/utils/events.js' import { getTables, getFuncsAndInters } from '@/utils/utils-custom.js' import { getTables, getFuncsAndInters, getLangTrans } from '@/utils/utils-custom.js' import SourceElement from '@/templates/zshare/dragsource' import asyncComponent from '@/utils/asyncComponent' import Source from './source' @@ -590,6 +590,7 @@ let interfaces = getFuncsAndInters(config) let urlFields = config.urlFields ? config.urlFields.join(',') : '' let langSql = getLangTrans(config) let param = { func: 'sPC_TrdMenu_AddUpt', @@ -608,7 +609,8 @@ debug_md5: key, debug_url: url, debug_list: window.btoa(tbs), LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))) LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))), lang_translation: window.btoa(window.encodeURIComponent(langSql)) } param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')