src/components/header/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/pc/createview/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/utils/utils-custom.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/design/header/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/design/header/transmenu/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/design/sidemenu/editthdmenu/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/design/sidemenu/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/design/sidemenu/thdmenuplus/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/imdesign/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/login/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/menudesign/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/mobdesign/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/pcdesign/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/tabledesign/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/components/header/index.jsx
@@ -123,6 +123,7 @@ onOk() { sessionStorage.clear() _this.props.history.replace('/login') window.location.reload() }, onCancel() {} }) src/pc/createview/index.jsx
@@ -87,8 +87,8 @@ MenuName: res.MenuName || '', PageParam: JSON.stringify({Template: 'webPage'}), open_edition: '', LText: '', LTexttb: '' // LText: '', // LTexttb: '' } param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') src/utils/utils-custom.js
@@ -1108,6 +1108,8 @@ value = item.initval || `${item.minValue || '-999999999'},${item.maxValue || '999999999'}` } else if (item.type === 'multiselect' || (item.type === 'checkcard' && item.multiple === 'true')) { type = 'multi' } else { value = item.initval || '0' } newsearches.push({ @@ -2145,6 +2147,17 @@ } } let filterForm = (n) => { sql.push(n.label) if (n.resourceType === '1') { filterSql(n.dataSource) } else if (n.options) { n.options.forEach(o => { ops.push(o.Text) }) } } let traversal = (components) => { if (!components) return @@ -2173,15 +2186,7 @@ } 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) } filterForm(cell) }) } if (item.action) { @@ -2193,10 +2198,7 @@ } 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) } filterForm(n) }) } } @@ -2214,10 +2216,7 @@ } 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) } filterForm(n) }) } } @@ -2234,10 +2233,7 @@ } 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) } filterForm(n) }) } } @@ -2256,10 +2252,7 @@ } 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) } filterForm(n) }) } } @@ -2289,10 +2282,7 @@ } 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) } filterForm(n) }) } } @@ -2308,10 +2298,7 @@ item.subcards.forEach(cell => { filterBtn(cell.subButton) cell.fields.forEach(n => { sql.push(n.label) if (n.resourceType === '1') { filterSql(n.dataSource) } filterForm(n) }) }) } @@ -2353,7 +2340,7 @@ list.unshift(`'${config.MenuName}','menu'`) } if (config.fstMenuId && config.parentId) { if (config.fstMenuId && config.parentId && config.fstMenuId !== 'BillPrintTemp') { let menulist = sessionStorage.getItem('fstMenuList') try { menulist = JSON.parse(menulist) @@ -2385,3 +2372,357 @@ return result.join(';') } /** * @description 语言转换 */ export function setLangTrans (config, btnDict, titDict, lisDict, regs, tail) { let filterElement = (card) => { if (card.datatype === 'static' && card.eleType === 'text' && !/@.+@/g.test(card.value)) { if (card.value && titDict[card.value]) { card.value = titDict[card.value] } } if (card.prefix && titDict[card.prefix]) { card.prefix = titDict[card.prefix] } if (card.postfix && titDict[card.postfix]) { card.postfix = titDict[card.postfix] } } let filterSql = (sl) => { if (!sl) return regs.forEach(item => { sl = sl.replace(item.reg, item.value) }) return sl } let filterBtn = (btn) => { if (btn.label && btnDict[btn.label]) { btn.label = btnDict[btn.label] } if (btn.OpenType === 'tab' && btn.linkmenu) { if (btn.linkmenu[0] === 'multiMenu') { btn.multiMenus.forEach(menu => { menu.menuId = menu.menuId.map(c => { if (c.length <= 24) { return md5(window.GLOB.appkey + c + sessionStorage.getItem('lang')).toLowerCase() } else { return c.slice(0, 24) + tail } }) menu.MenuID = menu.menuId[menu.menuId.length - 1] }) } else { btn.linkmenu = btn.linkmenu.map(c => { if (c.length <= 24) { return md5(window.GLOB.appkey + c + sessionStorage.getItem('lang')).toLowerCase() } else { return c.slice(0, 24) + tail } }) btn.MenuID = btn.linkmenu[btn.linkmenu.length - 1] } } else { if (btn.refreshTab && btn.refreshTab.length > 0) { btn.refreshTab = btn.refreshTab.map(c => { if (c.length <= 24) { return md5(window.GLOB.appkey + c + sessionStorage.getItem('lang')).toLowerCase() } else { return c.slice(0, 24) + tail } }) } if (btn.openmenu && Array.isArray(btn.openmenu) && btn.openmenu.length > 0) { btn.openmenu = btn.openmenu.map(c => { if (c.length <= 24) { return md5(window.GLOB.appkey + c + sessionStorage.getItem('lang')).toLowerCase() } else { return c.slice(0, 24) + tail } }) btn.MenuID = btn.openmenu[btn.openmenu.length - 1] } else if (btn.openmenu && typeof(btn.openmenu) === 'string' && btn.openmenu !== 'goback') { btn.openmenu = btn.openmenu.slice(0, 24) + tail } if (btn.pageTemplate === 'linkpage' && btn.linkmenu && typeof(btn.linkmenu) === 'string') { btn.linkmenu = btn.linkmenu.slice(0, 24) + tail } } if (!btn.verify) return btn.verify.customverifys && btn.verify.customverifys.forEach(script => { script.sql = filterSql(script.sql) }) btn.verify.scripts && btn.verify.scripts.forEach(script => { script.sql = filterSql(script.sql) }) btn.verify.cbScripts && btn.verify.cbScripts.forEach(script => { script.sql = filterSql(script.sql) }) if (btn.OpenType === 'funcbutton') { if (btn.intertype === 'system' && btn.verify.dataType === 'custom' && btn.verify.setting) { btn.verify.setting.dataresource = filterSql(btn.verify.setting.dataresource) } } else if (btn.OpenType === 'excelOut' && btn.verify.dataresource) { btn.verify.dataresource = filterSql(btn.verify.dataresource) } } let filterForm = (n) => { if (n.label && titDict[n.label]) { n.label = titDict[n.label] } if (n.resourceType === '1') { n.dataSource = filterSql(n.dataSource) } else if (n.options) { n.options.forEach(o => { if (o.Text && lisDict[o.Text]) { o.Text = lisDict[o.Text] } }) } } let resetMenu = (wrap) => { if (!wrap.menu) return if (typeof(wrap.menu) === 'string') { wrap.menu = wrap.menu.slice(0, 24) + tail if (wrap.MenuID) { wrap.MenuID = wrap.menu } } else { wrap.menu = wrap.menu.map(c => { if (c.length <= 24) { return md5(window.GLOB.appkey + c + sessionStorage.getItem('lang')).toLowerCase() } else { return c.slice(0, 24) + tail } }) if (wrap.MenuID) { wrap.MenuID = wrap.menu[wrap.menu.length - 1] } } } let resetMenus = (wrap) => { if (!wrap.menus) return wrap.menus.forEach(m => { if (typeof(m.menu) === 'string') { m.menu = m.menu.slice(0, 24) + tail } else { m.menu = m.menu.map(c => { if (c.length <= 24) { return md5(window.GLOB.appkey + c + sessionStorage.getItem('lang')).toLowerCase() } else { return c.slice(0, 24) + tail } }) if (m.MenuID) { m.MenuID = m.menu[m.menu.length - 1] } } }) } let traversal = (components) => { if (!components) return components.forEach(item => { if (item.type === 'tabs') { item.subtabs.forEach(tab => { if (tab.label && titDict[tab.label]) { tab.label = titDict[tab.label] } traversal(tab.components) }) } else if (item.type === 'group') { traversal(item.components) } else { if (item.wrap && (item.wrap.click === 'menu' || item.wrap.click === 'menus')) { if (item.wrap.click === 'menu') { resetMenu(item.wrap) } else if (item.wrap.click === 'menus') { resetMenus(config.wrap) } } else if (item.plot && (item.plot.click === 'menu' || item.plot.click === 'menus')) { if (item.plot.click === 'menu') { resetMenu(item.plot) } else if (item.plot.click === 'menus') { resetMenus(config.plot) } } if (item.setting && (!item.wrap || !item.wrap.datatype || item.wrap.datatype === 'dynamic')) { if (item.setting.interType === 'system') { item.setting.dataresource = filterSql(item.setting.dataresource) item.scripts && item.scripts.forEach(script => { script.sql = filterSql(script.sql) }) } } if (item.columns) { item.columns.forEach(cell => { if (cell.label && titDict[cell.label]) { cell.label = titDict[cell.label] } }) } if (item.search) { item.search.forEach(cell => { filterForm(cell) }) } if (item.action) { item.action.forEach(cell => { 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 => { filterForm(n) }) } } }) } if (item.type === 'menubar') { item.subMenus = item.subMenus.map(cell => { if (cell.setting.type === 'linkmenu') { cell.setting.linkMenuId = cell.setting.linkMenuId.slice(0, 24) + tail } return cell }) } else if (item.type === 'topbar') { if (item.wrap.menus) { resetMenus(item.wrap) } } else if (item.type === 'card' || item.type === 'carousel' || item.type === 'timeline') { item.subcards.forEach(card => { if (card.setting.click === 'menus') { resetMenus(card) } else if (card.setting.click === 'menu') { resetMenu(card.setting) } card.elements && card.elements.forEach(cell => { if (cell.eleType === 'button') { 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 => { filterForm(n) }) } } } else { filterElement(cell) } }) card.backElements && card.backElements.forEach(cell => { if (cell.eleType === 'button') { 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 => { filterForm(n) }) } } } else { filterElement(cell) } }) }) } else if (item.type === 'balcony') { item.elements && item.elements.forEach(cell => { if (cell.eleType === 'button') { 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 => { filterForm(n) }) } } } else { filterElement(cell) } }) } else if (item.type === 'table') { let loopCol = (cols) => { cols.forEach(col => { if (col.label && titDict[col.label]) { col.label = titDict[col.label] } if (col.prefix && titDict[col.prefix]) { col.prefix = titDict[col.prefix] } if (col.postfix && titDict[col.postfix]) { col.postfix = titDict[col.postfix] } if (col.type === 'colspan') { loopCol(col.subcols) } else if (col.type === 'custom') { col.elements.forEach(cell => { if (cell.eleType === 'button') { 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 => { filterForm(n) }) } } } else { filterElement(cell) } }) } }) } loopCol(item.cols) } else if (item.type === 'form') { item.subcards.forEach(cell => { filterBtn(cell.subButton) cell.fields.forEach(n => { filterForm(n) }) }) } } }) } if (config.interfaces) { config.interfaces.forEach(item => { if (item.setting.interType === 'system') { item.setting.dataresource = filterSql(item.setting.dataresource) item.scripts && item.scripts.forEach(script => { script.sql = filterSql(script.sql) }) } }) } traversal(config.components) } src/views/design/header/index.jsx
@@ -40,6 +40,7 @@ onOk() { sessionStorage.clear() _this.props.history.replace('/login') window.location.reload() }, onCancel() {} }) src/views/design/header/transmenu/index.jsx
@@ -3,15 +3,20 @@ import { Modal, notification, Button, Spin, Cascader } from 'antd' // import { ClockCircleOutlined, SyncOutlined, WarningOutlined, CheckCircleOutlined } from '@ant-design/icons' import moment from 'moment' import md5 from 'md5' import Api from '@/api' import Utils from '@/utils/utils.js' import MenuUtils, { setLangTrans } from '@/utils/utils-custom.js' import './index.scss' const { confirm } = Modal class TransMenu extends Component { state = { visible: false, loading: false, saveing: false, lang: '', dicts: [], menus: [], @@ -30,6 +35,7 @@ lang: langs[0], loading: true, visible: true, saveing: false, values: [] }) @@ -135,25 +141,354 @@ menus.push(fstItem) }) menus.push({ value: 'home_page_id', label: '首页', }) this.setState({menus: menus, loading: false}) }) } submit = () => { const { menulist } = this.props const { values } = this.state if (!values || values.length !== 3) { if (!values || (values.length !== 3 && values[0] !== 'home_page_id')) { notification.warning({ top: 92, message: '请选择三级菜单!', message: '请选择菜单!', duration: 5 }) return } console.log(values) console.log(menulist) this.setState({saveing: true}) if (values[0] === 'home_page_id') { this.transThdMenu({ value: 'home_page_id', MenuID: 'home_page_id', label: '首页' }) } else { this.transFirstMenu(values[0], values[1], values[2]) } } transFirstMenu = (firstId, secId, thdId) => { const { menulist } = this.props const { menus, dicts } = this.state let tail = md5(window.GLOB.appkey + sessionStorage.getItem('lang')).toLowerCase() tail = tail.slice(-8) let oriFirstMenu = menus.filter(item => item.value === firstId)[0] let oriSecMenu = oriFirstMenu.children.filter(item => item.value === secId)[0] let oriThdMenu = oriSecMenu.children.filter(item => item.value === thdId)[0] oriThdMenu = fromJS(oriThdMenu).toJS() let curFirstId = firstId if (curFirstId.length <= 24) { curFirstId = md5(window.GLOB.appkey + curFirstId + sessionStorage.getItem('lang')).toLowerCase() } else { curFirstId = curFirstId.slice(0, 24) + tail } let curSectId = secId if (curSectId.length <= 24) { curSectId = md5(window.GLOB.appkey + curSectId + sessionStorage.getItem('lang')).toLowerCase() } else { curSectId = curSectId.slice(0, 24) + tail } let curThdId = thdId if (curThdId.length <= 24) { curThdId = md5(window.GLOB.appkey + curThdId + sessionStorage.getItem('lang')).toLowerCase() } else { curThdId = curThdId.slice(0, 24) + tail } let firstName = oriFirstMenu.label let secName = oriSecMenu.label dicts.forEach(item => { if (item.type !== 'menu') return if (item.reg === firstName) { firstName = item.value } if (item.reg === secName) { secName = item.value } if (item.reg === oriThdMenu.label) { oriThdMenu.label = item.value } }) let firstParam = { func: 'sPC_MainMenu_Add', MenuID: curFirstId, MenuName: firstName, PageParam: JSON.stringify({ OpenType: 'menu', linkUrl: '' }) } let secParam = { func: 'sPC_SndMenu_Add', ParentID: curFirstId, MenuID: curSectId, MenuName: secName, PageParam: JSON.stringify({ Icon: '' }) } oriThdMenu.fstMenuId = curFirstId oriThdMenu.parentId = curSectId oriThdMenu.MenuID = curThdId if (menulist.findIndex(item => item.MenuID === firstParam.MenuID) === -1) { Api.getCloudConfig(firstParam).then(res => { if (!res.status) { notification.warning({ top: 92, message: res.message, duration: 5 }) this.setState({saveing: false}) return } this.transSecondMenu(secParam, oriThdMenu, true) }) } else { this.transSecondMenu(secParam, oriThdMenu) } } transSecondMenu = (secParam, oriThdMenu, reload) => { const { menulist } = this.props let creat = true menulist.forEach(item => { if (item.children.findIndex(cell => cell.MenuID === secParam.MenuID) > -1) { creat = false } }) if (creat) { Api.getCloudConfig(secParam).then(res => { if (!res.status) { notification.warning({ top: 92, message: res.message, duration: 5 }) this.setState({saveing: false}) return } this.transThdMenu(oriThdMenu, true) }) } else { this.transThdMenu(oriThdMenu, reload) } } transThdMenu = (menu, reload) => { const { menulist } = this.props const { lang, dicts } = this.state let _param = { func: 'sPC_Get_LongParam', MenuID: menu.value, lang: lang } let creat = true if (menu.MenuID === 'home_page_id') { creat = false } else { menulist.forEach(item => { item.children.forEach(cell => { if (cell.children.findIndex(n => n.MenuID === menu.MenuID) > -1) { creat = false } }) }) } Api.getCloudConfig(_param).then(res => { if (!res.status) { notification.warning({ top: 92, message: res.message, duration: 5 }) this.setState({saveing: false}) return } let config = null if (res.LongParam) { try { config = JSON.parse(window.decodeURIComponent(window.atob(res.LongParam))) } catch (e) { console.warn('Parse Failure') config = '' } } if (!config) { notification.warning({ top: 92, message: '未获取到菜单配置信息', duration: 5 }) this.setState({saveing: false}) if (reload) { this.props.reload() } return } let btnDict = {} let titDict = {} let lisDict = {} let regs = [] dicts.forEach(item => { if (item.type === 'button') { btnDict[item.reg] = item.value } else if (item.type === 'title') { titDict[item.reg] = item.value } else if (item.type === 'list') { lisDict[item.reg] = item.value } else if (item.type === 'text') { regs.push({reg: new RegExp(item.reg, 'g'), value: item.value, sort: item.reg.length}) } }) regs.sort((a, b) => b.sort - a.sort) let tail = md5(window.GLOB.appkey + sessionStorage.getItem('lang')).toLowerCase() tail = tail.slice(-8) setLangTrans(config, btnDict, titDict, lisDict, regs, tail) if (config.components) { let commonId = Utils.getuuid() if (config.interfaces && config.interfaces.length > 0) { config.interfaces = config.interfaces.map(inter => { inter.uuid = md5(commonId + inter.uuid) return inter }) } config.components = MenuUtils.resetConfig(config.components, commonId, false) config.tables = config.tables || [] config.style = config.style || {} } config.MenuName = menu.label config.fstMenuId = menu.fstMenuId || '' config.parentId = menu.parentId || '' config.uuid = menu.MenuID || '' config.open_edition = '' if (config.MenuNo) { config.MenuNo = config.MenuNo + '_' + sessionStorage.getItem('lang') } let param = { func: 'sPC_TrdMenu_AddUpt', FstID: config.fstMenuId, SndID: config.parentId, ParentID: config.parentId, MenuID: config.uuid, MenuNo: config.MenuNo || '', EasyCode: config.easyCode || '', Template: config.Template, MenuName: config.MenuName || '', PageParam: JSON.stringify({Template: config.Template, OpenType: config.OpenType || 'newtab'}) } if (creat) { param.open_edition = config.open_edition param.LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(config))) this.setMenu(param, true) } else { Api.getCloudConfig({ func: 'sPC_Get_LongParam', MenuID: menu.MenuID }).then(res => { if (!res.status) { notification.warning({ top: 92, message: res.message, duration: 5 }) this.setState({saveing: false}) return } config.open_edition = res.open_edition || '' param.open_edition = config.open_edition param.LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(config))) if (res.LongParam) { const that = this confirm({ title: '菜单已存在,确定重新生成吗?', content: '', onOk() { that.setMenu(param, true) }, onCancel() {} }) } else { this.setMenu(param, true) } }) } }) } setMenu = (param, reload) => { param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) Api.getCloudConfig(param).then(res => { if (!res.status) { notification.warning({ top: 92, message: res.message, duration: 5 }) this.setState({saveing: false}) return } notification.success({ top: 92, message: '添加成功。', duration: 5 }) this.setState({ loading: false, visible: false }) if (reload) { this.props.reload() } }) } cancel = () => { @@ -164,7 +499,7 @@ } render () { const { visible, loading, menus } = this.state const { visible, loading, saveing, menus } = this.state return ( <> @@ -180,6 +515,7 @@ maskClosable={false} onOk={this.submit} onCancel={this.cancel} confirmLoading={saveing} destroyOnClose > {loading ? <Spin /> : <div> src/views/design/sidemenu/editthdmenu/index.jsx
@@ -214,8 +214,8 @@ MenuName: res.MenuName, PageParam: JSON.stringify(PageParam), LongParam: '', LText: '', LTexttb: '' // LText: '', // LTexttb: '' } param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') src/views/design/sidemenu/index.jsx
@@ -249,8 +249,8 @@ MenuName: res.MenuName, PageParam: JSON.stringify(PageParam), LongParam: '', LText: '', LTexttb: '' // LText: '', // LTexttb: '' } param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') src/views/design/sidemenu/thdmenuplus/index.jsx
@@ -174,8 +174,8 @@ MenuName: values.MenuName, PageParam: JSON.stringify(PageParam), LongParam: '', LText: '', LTexttb: '', // LText: '', // LTexttb: '', Sort: sysMenu.menuSort } src/views/imdesign/index.jsx
@@ -361,8 +361,8 @@ PageParam: JSON.stringify({Template: 'imPage'}), open_edition: config.open_edition, menus_rolelist: window.btoa(window.encodeURIComponent(JSON.stringify({type: 'im', key: config.uuid, title: config.MenuName, children: []}))), LText: '', LTexttb: '' // LText: '', // LTexttb: '' } param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') src/views/login/index.jsx
@@ -310,6 +310,9 @@ // md5("/ws/location/v1/ip?callback=callbackFunction&key=key&output=jsonp secret key") // md5("/ws/location/v1/ip?callback=callbackFunction&key=BA7BZ-4QB65-LFCIA-QPDA6-4G6O7-MJB4Q&output=jsonpuThL4ZM3XOj642ksEQh76tyHFjh4") sessionStorage.removeItem('subLangList') sessionStorage.removeItem('langList') setTimeout(() => { Api.delCacheConfig() }, 50) @@ -706,14 +709,13 @@ if (window.GLOB.defLang && list.includes(window.GLOB.defLang)) { lang = window.GLOB.defLang } if (list.includes(lang)) { list = [lang, ...list.filter(item => item !== lang)] if (lang === sessionStorage.getItem('lang')) { sessionStorage.setItem('langList', JSON.stringify(list)) sessionStorage.removeItem('subLangList') } else { sessionStorage.setItem('subLangList', JSON.stringify(list)) sessionStorage.removeItem('langList') } } } src/views/menudesign/index.jsx
@@ -773,7 +773,7 @@ }) return } else if (this.checklog()) { if (MenuType !== 'billPrint' && sessionStorage.getItem('langList') && !config.trans) { if (sessionStorage.getItem('langList') && !config.trans) { } else { notification.success({ @@ -846,7 +846,7 @@ let interfaces = getFuncsAndInters(config) let urlFields = config.urlFields ? config.urlFields.join(',') : '' let langSql = MenuType !== 'billPrint' ? getLangTrans(config) : '' let langSql = getLangTrans(config) let param = { func: 'sPC_TrdMenu_AddUpt', @@ -860,13 +860,16 @@ MenuName: config.MenuName || '', PageParam: JSON.stringify({Template: 'CustomPage', OpenType: config.OpenType || 'newtab', hidden: config.hidden || 'false', menuColor: config.menuColor || '', interfaces, urlFields}), open_edition: config.open_edition, LText: '', LTexttb: '', // LText: '', // LTexttb: '', debug_md5: key, debug_url: url, debug_list: window.btoa(tbs), LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))), lang_translation: window.btoa(window.encodeURIComponent(langSql)) LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))) } if (langSql) { param.lang_translation = window.btoa(window.encodeURIComponent(langSql)) } param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') src/views/mobdesign/index.jsx
@@ -1533,8 +1533,8 @@ PageParam: JSON.stringify({Template: 'webPage', interfaces}), open_edition: config.open_edition, menus_rolelist: window.btoa(window.encodeURIComponent(JSON.stringify(roleParam))), LText: '', LTexttb: '', // LText: '', // LTexttb: '', menus_used_list, debug_md5: key, debug_url: url, @@ -1602,8 +1602,8 @@ PageParam: JSON.stringify({Template: NavBar.type}), open_edition: _item ? (_item.open_edition || '') : '', menus_rolelist: window.btoa(window.encodeURIComponent(JSON.stringify(roles))), LText: '', LTexttb: '' // LText: '', // LTexttb: '' } _param.LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(NavBar))) src/views/pcdesign/index.jsx
@@ -1232,8 +1232,8 @@ PageParam: JSON.stringify({Template: 'webPage', interfaces}), menus_rolelist: window.btoa(window.encodeURIComponent(JSON.stringify(roleParam))), open_edition: config.open_edition, LText: '', LTexttb: '', // LText: '', // LTexttb: '', menus_used_list, debug_md5: key, debug_url: url, @@ -1318,8 +1318,8 @@ PageParam: JSON.stringify({Template: NavBar.type}), menus_rolelist: window.btoa(window.encodeURIComponent(JSON.stringify(roles))), open_edition: NavBar.open_edition, LText: '', LTexttb: '' // LText: '', // LTexttb: '' } _param.LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(NavBar))) src/views/tabledesign/index.jsx
@@ -608,13 +608,16 @@ MenuName: config.MenuName || '', PageParam: JSON.stringify({Template: 'BaseTable', OpenType: config.OpenType || 'newtab', hidden: config.hidden || 'false', menuColor: config.menuColor || '', interfaces, urlFields}), open_edition: config.open_edition, LText: '', LTexttb: '', // LText: '', // LTexttb: '', debug_md5: key, debug_url: url, debug_list: window.btoa(tbs), LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))), lang_translation: window.btoa(window.encodeURIComponent(langSql)) LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))) } if (langSql) { param.lang_translation = window.btoa(window.encodeURIComponent(langSql)) } param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')