| | |
| | | import Utils from '@/utils/utils.js' |
| | | import { langs } from '@/store/options' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import { getTables, getFuncsAndInters, getLangTrans } from '@/utils/utils-custom.js' |
| | | import { getTables, getFuncsAndInters, getLangTrans, getAllSqls } from '@/utils/utils-custom.js' |
| | | import SourceElement from '@/templates/zshare/dragsource' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import Source from './source' |
| | |
| | | } else if (this.checklog()) { |
| | | if (sessionStorage.getItem('langList') && !config.trans) { |
| | | |
| | | // } else if (window.backend && config.enabled && !config.allSqls) { |
| | | } else if (window.backend && config.enabled && !config.allSqls) { |
| | | |
| | | } else { |
| | | notification.success({ |
| | |
| | | delete config.force |
| | | } |
| | | |
| | | // let sqls = [] |
| | | // delete config.allSqls |
| | | // if (window.backend && config.enabled) { |
| | | // sqls = getAllSqls(config) |
| | | let long_data = '' |
| | | delete config.allSqls |
| | | if (window.backend && config.enabled) { |
| | | let sqls = getAllSqls(config) |
| | | let _t = moment().format('YYYYMMDDHHmmss') |
| | | let getguid = () => { |
| | | let uuid = '' |
| | | for (let i = 0; i < 18; i++) { |
| | | uuid += String.fromCharCode(Math.floor(Math.random() * 26) + 65) |
| | | } |
| | | return uuid |
| | | } |
| | | |
| | | // config.allSqls = sqls |
| | | // } |
| | | long_data = [] |
| | | |
| | | config.allSqls = sqls.map(item => { |
| | | let v_id = _t + getguid() |
| | | long_data.push(`${md5(window.GLOB.appkey + v_id)},${item.uuid},${v_id},${window.btoa(window.encodeURIComponent(item.LText))}`) |
| | | |
| | | return { |
| | | uuid: item.uuid, |
| | | v_id: v_id, |
| | | type: item.type, |
| | | reps: item.reps, |
| | | sql: item.LText |
| | | } |
| | | }) |
| | | |
| | | long_data = long_data.join(';') |
| | | } |
| | | |
| | | let tbs = [] |
| | | let btns = this.getMenuMessage(tbs) |
| | |
| | | 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: '', |
| | | long_data: long_data, |
| | | debug_md5: key, |
| | | debug_url: url, |
| | | debug_list: window.btoa(tbs), |