【update】菜单管理增加是否为外网展示字段
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -24,14 +24,14 @@ const err = (error) => {
|
||||
if (error.response) {
|
||||
let data = error.response.data
|
||||
const token = Vue.ls.get(ACCESS_TOKEN)
|
||||
console.log('------异常响应------',token)
|
||||
console.log('------异常响应------',error.response.status)
|
||||
// console.log('------异常响应------',token)
|
||||
// console.log('------异常响应------',error.response.status)
|
||||
switch (error.response.status) {
|
||||
case 403:
|
||||
notification.error({ message: '系统提示', description: '拒绝访问',duration: 4})
|
||||
break
|
||||
case 500:
|
||||
console.log('------error.response------',error.response)
|
||||
// console.log('------error.response------',error.response)
|
||||
// update-begin- --- author:liusq ------ date:20200910 ---- for:处理Blob情况----
|
||||
let type=error.response.request.responseType
|
||||
if(type === 'blob'){
|
||||
|
||||
+20
-20
@@ -1,6 +1,10 @@
|
||||
import * as api from '@/api/api'
|
||||
import { isURL } from '@/utils/validate'
|
||||
import { JSEncrypt } from 'jsencrypt'
|
||||
|
||||
// 全局字段,是否是外网部署
|
||||
export const isExternalTerminal = false
|
||||
|
||||
// import onlineCommons from '@/components/onlineForm/onlineForm'
|
||||
//
|
||||
export function timeFix() {
|
||||
@@ -138,28 +142,8 @@ function generateChildRouters(data) {
|
||||
}
|
||||
|
||||
let componentPath
|
||||
// if(item.component=="modules/online/cgform/OnlCgformHeadList"){
|
||||
// componentPath = onlineCommons.OnlCgformHeadList
|
||||
// }else if(item.component=="modules/online/cgform/OnlCgformCopyList"){
|
||||
// componentPath = onlineCommons.OnlCgformCopyList
|
||||
// }else if(item.component=="modules/online/cgform/auto/OnlCgformAutoList"){
|
||||
// componentPath = onlineCommons.OnlCgformAutoList
|
||||
// }else if(item.component=="modules/online/cgform/auto/OnlCgformTreeList"){
|
||||
// componentPath = onlineCommons.OnlCgformTreeList
|
||||
// }else if(item.component=="modules/online/cgform/auto/erp/OnlCgformErpList"){
|
||||
// componentPath = onlineCommons.OnlCgformErpList
|
||||
// }else if(item.component=="modules/online/cgform/auto/tab/OnlCgformTabList"){
|
||||
// componentPath = onlineCommons.OnlCgformTabList
|
||||
// }else if(item.component=="modules/online/cgform/auto/innerTable/OnlCgformInnerTableList"){
|
||||
// componentPath = onlineCommons.OnlCgformInnerTableList
|
||||
// }else if(item.component=="modules/online/cgreport/OnlCgreportHeadList"){
|
||||
// componentPath = onlineCommons.OnlCgreportHeadList
|
||||
// }else if(item.component=="modules/online/cgreport/auto/OnlCgreportAutoList"){
|
||||
// componentPath = onlineCommons.OnlCgreportAutoList
|
||||
// }else{
|
||||
// eslint-disable-next-line
|
||||
componentPath = resolve => require(['@/' + component + '.vue'], resolve)
|
||||
// }
|
||||
let menu = {
|
||||
path: item.path,
|
||||
name: item.name,
|
||||
@@ -712,3 +696,19 @@ export function deepMerge (target, ...arg) {
|
||||
}, acc)
|
||||
}, target)
|
||||
}
|
||||
|
||||
// 为外部系统的时候,过滤掉所有的 isExternalTerminal = false 的数据
|
||||
export const filterTreeData = (treeData) => {
|
||||
const result = []
|
||||
treeData.map(item => {
|
||||
if(item.meta.externalTerminalShow) {
|
||||
let treeNode = {...item }
|
||||
if (item.children && item.children.length > 0) {
|
||||
treeNode.children = [...filterTreeData(item.children)]
|
||||
}
|
||||
result.push(treeNode)
|
||||
}
|
||||
})
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user