wangzhe před 2 roky
rodič
revize
ba0388c491
1 změnil soubory, kde provedl 3 přidání a 2 odebrání
  1. 3 2
      src/views/datacenter.vue

+ 3 - 2
src/views/datacenter.vue

@@ -31,7 +31,7 @@
                      v-for="(item,index) in resourcesList"
                      v-on:click="indentleftSetMarkers(item.type, item.searchName)">
                   <!--v-on:click="indentleftSetMarkers(item.resourceTable)">-->
-                  <div class="iconfont icon icon-normal" :class="item.icon"></div>
+                  <div class="iconfont icon icon-normal" :class="item.icon" :style="'background:' + item.bg"></div>
                   <div class="icon-text">
                     <h6>{{ item.num }}</h6>
                     <!--<h6>{{ item.count }}</h6>-->
@@ -103,7 +103,7 @@
   import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部菜单
   import eventLocation from '@/components/eventLocation.vue' //事件定位弹窗
   import TVWall from '@/components/TVWall.vue' //电视墙弹窗
-
+  import {getIconBg} from '@/api/components/sookaMapIcon';//资源底色控制文件
   // import echarts from 'echarts'
   let echarts = require('echarts')
   export default {
@@ -342,6 +342,7 @@
             let icon ='sj' + '-' + 'icon' + '-' + data.type.replaceAll("_", "-").replaceAll("@", "-");
             console.log("icon_" + (index + 1) + "=", icon);
             that.$set(that.resourcesList[index], 'icon', icon);
+            that.$set(that.resourcesList[index], 'bg', getIconBg(icon));
             // if(index < 5){
             //   // that.fireControlViewPoint(data.type, 'undefined');
             //   that.indentleftSetMarkers(data.type, '所有');