数据库分类
This commit is contained in:
parent
1b45cb6927
commit
dd980ee0af
|
|
@ -87,6 +87,48 @@ export const generatorDynamicRouter = token => {
|
||||||
// 后端数据, 根级树数组, 根级 PID
|
// 后端数据, 根级树数组, 根级 PID
|
||||||
listToTree(data, childrenNav, '')
|
listToTree(data, childrenNav, '')
|
||||||
console.log('childrenNav', childrenNav)
|
console.log('childrenNav', childrenNav)
|
||||||
|
childrenNav[0].title ='保障实体类数据库'
|
||||||
|
childrenNav[1].title ='业务应用类数据库'
|
||||||
|
const aaa = new Array(8)
|
||||||
|
const bbb = new Array(8)
|
||||||
|
for(let i = 0; i < childrenNav[0].children.length; i++) {
|
||||||
|
// if(childrenNav[0].children[i].key ==='xdsjk' || childrenNav[0].children[i].key ==='fasjk'
|
||||||
|
// || childrenNav[0].children[i].key ==='jcsjk' || childrenNav[0].children[i].key ==='txsjk' || childrenNav[0].children[i].key ==='yxjlsjk'){
|
||||||
|
//
|
||||||
|
// aaa.push(childrenNav[0].children[i])
|
||||||
|
// }
|
||||||
|
if(childrenNav[0].children[i].key ==='txsjk') {
|
||||||
|
bbb.push(childrenNav[0].children[i])
|
||||||
|
childrenNav[0].children.splice(i, 1)
|
||||||
|
}
|
||||||
|
if(childrenNav[0].children[i].key ==='xdsjk') {
|
||||||
|
bbb.push(childrenNav[0].children[i])
|
||||||
|
childrenNav[0].children.splice(i, 1)
|
||||||
|
}
|
||||||
|
if(childrenNav[0].children[i].key ==='fasjk') {
|
||||||
|
bbb.push(childrenNav[0].children[i])
|
||||||
|
childrenNav[0].children.splice(i, 1)
|
||||||
|
}
|
||||||
|
if(childrenNav[0].children[i].key ==='jcsjk') {
|
||||||
|
bbb.push(childrenNav[0].children[i])
|
||||||
|
childrenNav[0].children.splice(i, 1)
|
||||||
|
}
|
||||||
|
if(childrenNav[0].children[i].key ==='yxjlsjk') {
|
||||||
|
bbb.push(childrenNav[0].children[i])
|
||||||
|
childrenNav[0].children.splice(i, 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
// childrenNav[0].children =aaa
|
||||||
|
childrenNav[1].children =bbb
|
||||||
|
// for(let i = 0; i < childrenNav[1].children.length; i++) {
|
||||||
|
// if(childrenNav[1].children[i].key ==='zzllsjk' || childrenNav[1].children[i].key ==='bzllsjk'
|
||||||
|
// || childrenNav[1].children[i].key ==='bzhjsjk' || childrenNav[1].children[i].key ==='zbsjk' || childrenNav[1].children[i].key ==='zzsjk'){
|
||||||
|
// childrenNav[1].children.splice(i, 1)
|
||||||
|
// console.log(childrenNav[1].children)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
const routers = generator(childrenNav)
|
const routers = generator(childrenNav)
|
||||||
console.log('routers', routers)
|
console.log('routers', routers)
|
||||||
resolve(routers)
|
resolve(routers)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user