左侧树修改
This commit is contained in:
parent
511f4690c1
commit
2156e70433
|
@ -161,7 +161,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="yyzy" label="应用资源" min-width="100%">
|
<el-table-column prop="yyzy" label="应用资源" min-width="100%">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="hys" label="会议室" min-width="100%" v-show='departmentId == 2 || departmentId == 4'>
|
<el-table-column prop="hys" label="会客厅" min-width="100%" v-show='departmentId == 2 || departmentId == 4'>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="zj" label="总计" min-width="100%">
|
<el-table-column prop="zj" label="总计" min-width="100%">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -321,7 +321,7 @@ export default {
|
||||||
{ name: '基础设施', key: 3 },
|
{ name: '基础设施', key: 3 },
|
||||||
{ name: '数据资源', key: 4 },
|
{ name: '数据资源', key: 4 },
|
||||||
{ name: '知识库', key: 5 },
|
{ name: '知识库', key: 5 },
|
||||||
{ name: '会议室', value: 6 }
|
{ name: '会客厅', value: 6 }
|
||||||
],
|
],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
tableDataClone: [],
|
tableDataClone: [],
|
||||||
|
@ -347,9 +347,9 @@ export default {
|
||||||
{ name: '开发组件', value: 3 },
|
{ name: '开发组件', value: 3 },
|
||||||
{ name: '业务组件', value: 4 },
|
{ name: '业务组件', value: 4 },
|
||||||
{ name: '应用资源', value: 5 },
|
{ name: '应用资源', value: 5 },
|
||||||
{ name: '会议室', value: 6 }
|
{ name: '会客厅', value: 6 }
|
||||||
], // 类型备选列表
|
], // 类型备选列表
|
||||||
typeOptions1: [// 能力上架隐藏会议室
|
typeOptions1: [// 能力上架隐藏会客厅
|
||||||
{ name: '智能算法', value: 1 },
|
{ name: '智能算法', value: 1 },
|
||||||
{ name: '图层服务', value: 2 },
|
{ name: '图层服务', value: 2 },
|
||||||
{ name: '开发组件', value: 3 },
|
{ name: '开发组件', value: 3 },
|
||||||
|
|
|
@ -185,31 +185,32 @@
|
||||||
treeData.value.sort((a, b) => {
|
treeData.value.sort((a, b) => {
|
||||||
return sortArr.indexOf(a.key) - sortArr.indexOf(b.key)
|
return sortArr.indexOf(a.key) - sortArr.indexOf(b.key)
|
||||||
})
|
})
|
||||||
let deptId=user.value.deptId
|
//根据不同的权限展示不同的能力超市左侧树
|
||||||
treeData.value.forEach((child) => {
|
// let deptId=user.value.deptId
|
||||||
let childern=child.children
|
// treeData.value.forEach((child) => {
|
||||||
childern.forEach((childs) => {//第一层:市级
|
// let childern=child.children
|
||||||
if(childs.key==deptId ){
|
// childern.forEach((childs) => {//第一层:市级
|
||||||
childs.show=true
|
// if(childs.key==deptId ){
|
||||||
child.show=true
|
// childs.show=true
|
||||||
mybus.emit('paramsGetResources', [childs.key])
|
// child.show=true
|
||||||
selectId.value =childs.key
|
// mybus.emit('paramsGetResources', [childs.key])
|
||||||
}
|
// selectId.value =childs.key
|
||||||
if(childs.children && childs.children.length>0){//第二层 区级
|
// }
|
||||||
let qu=childs.children
|
// if(childs.children && childs.children.length>0){//第二层 区级
|
||||||
qu.forEach((qu) => {
|
// let qu=childs.children
|
||||||
if(qu.key==deptId ){
|
// qu.forEach((qu) => {
|
||||||
qu.show=true
|
// if(qu.key==deptId ){
|
||||||
childs.show=true
|
// qu.show=true
|
||||||
child.show=true
|
// childs.show=true
|
||||||
mybus.emit('paramsGetResources', [qu.key])
|
// child.show=true
|
||||||
selectId.value = qu.key
|
// mybus.emit('paramsGetResources', [qu.key])
|
||||||
}
|
// selectId.value = qu.key
|
||||||
})
|
// }
|
||||||
}
|
// })
|
||||||
})
|
// }
|
||||||
|
// })
|
||||||
|
|
||||||
})
|
// })
|
||||||
console.log('左侧树结构数据======================>', treeData.value)
|
console.log('左侧树结构数据======================>', treeData.value)
|
||||||
|
|
||||||
showKey.value++
|
showKey.value++
|
||||||
|
|
Loading…
Reference in New Issue