提交更改
This commit is contained in:
@@ -77,6 +77,7 @@ const getTreeList = (list:any) => {
|
||||
item3.color = config.getColorVal('elementUiPrimary')
|
||||
if (item3.comFlag === 1) {
|
||||
item3.color = '#e26257 !important'
|
||||
item3.color = item3.comFlag == 3 ? '#e26257 !important' : config.getColorVal('elementUiPrimary')
|
||||
}
|
||||
arr.push(item3)
|
||||
})
|
||||
|
||||
@@ -58,9 +58,10 @@ getDeviceTree().then(res => {
|
||||
item.icon = 'el-icon-Platform'
|
||||
item.color = config.getColorVal('elementUiPrimary')
|
||||
item.color = '#e26257 !important'
|
||||
item.color = item.comFlag === 3 ? config.getColorVal('elementUiPrimary') : '#e26257 !important'
|
||||
item.children.forEach((item2: any) => {
|
||||
item2.icon = 'el-icon-Platform'
|
||||
item2.color = config.getColorVal('elementUiPrimary')
|
||||
item2.color = item2.comFlag === 3 ? config.getColorVal('elementUiPrimary') : '#e26257 !important'
|
||||
// item2.children.forEach((item3: any) => {
|
||||
// item3.icon = 'el-icon-Platform'
|
||||
// item3.color = config.getColorVal('elementUiPrimary')
|
||||
@@ -76,7 +77,7 @@ getDeviceTree().then(res => {
|
||||
tree.value = res.data
|
||||
nextTick(() => {
|
||||
if (arr.length) {
|
||||
console.log(treRef.value.treeRef1,"99999999");
|
||||
console.log(treRef.value.treeRef1, '99999999')
|
||||
treRef.value.treeRef1.setCurrentKey(arr[0].id)
|
||||
// 注册父组件事件
|
||||
emit('init', {
|
||||
|
||||
@@ -43,10 +43,12 @@ getLineTree().then(res => {
|
||||
item.children.forEach((item: any) => {
|
||||
item.icon = 'el-icon-Platform'
|
||||
item.color = config.getColorVal('elementUiPrimary')
|
||||
console.log(item.comFlag,"88888");
|
||||
item.color = item.comFlag === 3 ? config.getColorVal('elementUiPrimary') : '#e26257 !important'
|
||||
item.children.forEach((item2: any) => {
|
||||
item2.icon = 'el-icon-Platform'
|
||||
item2.color = config.getColorVal('elementUiPrimary')
|
||||
item2.color = '#e26257 !important'
|
||||
item2.icon = 'el-icon-Platform'
|
||||
console.log(item2.comFlag,"88888");
|
||||
item2.color = item2.comFlag === 3 ? config.getColorVal('elementUiPrimary') : '#e26257 !important'
|
||||
arr2.push(item2)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<el-collapse accordion v-model="activeName" style="flex: 1; overflow: auto" @change="changeDevice">
|
||||
<el-collapse-item title="治理设备" :name="0">
|
||||
<el-tree
|
||||
style="min-height: calc(100vh - 250px)"
|
||||
style="min-height: calc(100vh - 250px)"
|
||||
ref="treeRef1"
|
||||
:props="defaultProps"
|
||||
highlight-current
|
||||
@@ -59,7 +59,7 @@
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="便携式设备" :name="1">
|
||||
<el-tree
|
||||
style="min-height: calc(100vh - 250px)"
|
||||
style="min-height: calc(100vh - 250px)"
|
||||
ref="treeRef2"
|
||||
:props="defaultProps"
|
||||
highlight-current
|
||||
|
||||
Reference in New Issue
Block a user