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