左侧树修改

This commit is contained in:
gongjiale 2022-10-31 17:47:38 +08:00
parent 511f4690c1
commit 2156e70433
2 changed files with 29 additions and 28 deletions

View File

@ -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 },

View File

@ -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++