|
@ -59,14 +59,14 @@ export default { |
|
|
const res = await this.$store.dispatch('bi/commonAPI', { |
|
|
const res = await this.$store.dispatch('bi/commonAPI', { |
|
|
apiCode: 'modules/list', |
|
|
apiCode: 'modules/list', |
|
|
dispatcherSystem: 'system', |
|
|
dispatcherSystem: 'system', |
|
|
param: {}, |
|
|
param: { |
|
|
|
|
|
app_code:'demo_app' |
|
|
|
|
|
}, |
|
|
}) |
|
|
}) |
|
|
console.log(res,'seee'); |
|
|
if (res.code === 0) { |
|
|
// if (res.code === 0) { |
|
|
this.modules = res.data.modules_list |
|
|
|
|
|
let moduleUrl = JSON.parse(window.localStorage.getItem('module_url')) |
|
|
this.modules = res.modules_list |
|
|
this.editableTabs = moduleUrl && moduleUrl.path ? moduleUrl.path : res.data.modules_list[0].module_url |
|
|
// let moduleUrl = JSON.parse(window.localStorage.getItem('module_url')) |
|
|
|
|
|
// this.editableTabs = moduleUrl && moduleUrl.path ? moduleUrl.path : res.data.modules_list[0].module_url |
|
|
|
|
|
this.modules.forEach((item) => { |
|
|
this.modules.forEach((item) => { |
|
|
if (fullPath.indexOf(item.module_url) !== -1) { |
|
|
if (fullPath.indexOf(item.module_url) !== -1) { |
|
|
this.editableTabs = item.module_url |
|
|
this.editableTabs = item.module_url |
|
@ -75,13 +75,15 @@ export default { |
|
|
const newModules = cloneDeep(res.data) |
|
|
const newModules = cloneDeep(res.data) |
|
|
this.$store.commit('global/SET_MODULES', newModules) |
|
|
this.$store.commit('global/SET_MODULES', newModules) |
|
|
window.localStorage.setItem('modules', JSON.stringify(newModules)) |
|
|
window.localStorage.setItem('modules', JSON.stringify(newModules)) |
|
|
// } |
|
|
} |
|
|
}, |
|
|
}, |
|
|
async fetchVersion() { |
|
|
async fetchVersion() { |
|
|
const res = await this.$store.dispatch('bi/commonAPI', { |
|
|
const res = await this.$store.dispatch('bi/commonAPI', { |
|
|
apiCode: 'version/getVersion', |
|
|
apiCode: 'version/getVersion', |
|
|
dispatcherSystem: 'system', |
|
|
dispatcherSystem: 'system', |
|
|
param: {}, |
|
|
param: { |
|
|
|
|
|
app_code:'demo_app' |
|
|
|
|
|
}, |
|
|
}) |
|
|
}) |
|
|
if (res.code === 0) { |
|
|
if (res.code === 0) { |
|
|
this.showMessage = res.data |
|
|
this.showMessage = res.data |
|
|