瀏覽代碼

数据中心

wangzhe 2 年之前
父節點
當前提交
76d911f7de
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/views/resources.vue

+ 3 - 1
src/views/resources.vue

@@ -32,7 +32,7 @@
                      v-on:click="selectResourcesByLabel(item.type, searchName)">
                      <!--v-on:click="selectResourcesByLabel(item.label)">-->
                   <!--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>-->
@@ -99,6 +99,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 resourcesdialog from '@/views/resourcesdialog.vue' //事件详情弹窗
   /** ----------------------------------摄像头预览开始------------------------------------- */
   import {
@@ -170,6 +171,7 @@
             let icon ='sj' + '-' + 'icon' + '-' + data.type.replaceAll("_", "-").replaceAll("@", "-");
             console.log("icon_" + (index + 1) + "=", icon);
             that.$set(that.resourcesCountList[index], 'icon', icon);
+            that.$set(that.resourcesCountList[index], 'bg', getIconBg(icon));
             // alert(resourcesCountList[i])
             // console.log("data resourcesCountList[index]=", data.type)
             // console.log("resourcesCountList[index]=", that.resourcesCountList[index])