whao 2 年之前
父節點
當前提交
88e0f536f3
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      src/views/datacenter.vue

+ 6 - 2
src/views/datacenter.vue

@@ -10,7 +10,7 @@
 				<div class="forthis">
 					<div class="i-list-con h-78">
 						<div class="d-l-con-icon">
-							<div class="icon-con" v-for="(item,index) in resourcesList"
+							<div class="icon-con" :class="{on:iconCurrentIndex==item.resourceTable}" v-for="(item,index) in resourcesList"
 								v-on:click="indentleftSetMarkers(item.resourceTable)">
 								<div class="iconfont icon icon-normal" :class="item.icon"></div>
 								<div class="icon-text">
@@ -36,7 +36,7 @@
 					</div>
           <div class="i-list-con h-73">
 			<div class="overflow-y" style="height: 39vh">
-            <div class="d-l-con" v-for="(item,index) in deptGroupList"
+            <div class="d-l-con" :class="{on:listCurrentIndex==item.deptId}" v-for="(item,index) in deptGroupList" 
                  v-on:click="indentleftByDeptIdSetMarkers(item.deptId)">
               <div class="d-l-l-text">
                 <i class="i-small"></i>
@@ -94,6 +94,8 @@
 		},
 		data() {
 			return {
+		iconCurrentIndex:'',
+		listCurrentIndex:'',
         markersList: [],
         iframeBoo: true,
         open: false,
@@ -283,6 +285,7 @@
 				})
 			},
       indentleftSetMarkers(resourceTable) {
+		this.iconCurrentIndex = resourceTable
         let that = this
         that.resourceTable=resourceTable;
         that.markersList = [];
@@ -628,6 +631,7 @@
         })
       },
       indentleftByDeptIdSetMarkers(deptId) {
+		this.listCurrentIndex = deptId
         let that = this
         //点击左侧地图落点
         getResourcePointByDeptId(that.resourceTable,deptId).then(res => {