Selaa lähdekoodia

消防数据中心图标问题

wang_xy 2 vuotta sitten
vanhempi
commit
5eec915477
1 muutettua tiedostoa jossa 4 lisäystä ja 4 poistoa
  1. 4 4
      src/views/datacenter.vue

+ 4 - 4
src/views/datacenter.vue

@@ -338,10 +338,11 @@ export default {
     fireControlViewList() {
       let that = this;
       fireControlViewList().then(function (res) {
-        that.resourcesList = res.data;
+        for (let i=1;i<res.data.length;i++){
+          that.resourcesList.push(res.data[i]);
+        }
         //截取data.resourceTable字段中“_”分隔符最后一个作为关键字,重新拼接成前端需要的图标:class,格式sj-icon-xxxx,将其set回原数组
-        res.data.forEach(function (data, index) {
-          if(data.type != "centerdata_t_forest_fireteam"){
+        that.resourcesList.forEach(function (data, index) {
             let icon =
               "sj" +
               "-" +
@@ -353,7 +354,6 @@ export default {
 
             //每个图标对应固定颜色
             that.$set(that.resourcesList[index], "bg", getIconBg(icon));
-          }
           // if(index < 5){
           //   // that.fireControlViewPoint(data.type, 'undefined');
           //   that.fireControlViewPoint(data.type, '所有');