dedsudiyu 1 місяць тому
батько
коміт
b1b93d89a9
1 змінених файлів з 9 додано та 2 видалено
  1. 9 2
      src/views/components/mapComponent.vue

+ 9 - 2
src/views/components/mapComponent.vue

@@ -137,7 +137,13 @@
                 list.list[o] = {...list.list[o],...res.data[i]};
                 list.list[o].floorName = list.floorName;
                 list.list[o].status = list.list[o].runningStateName == '维修' ? '3':(list.list[o].stateName == '租用'?'2':'1')
-                list.list[o].rentUserName = !list.list[o].userName?'':(list.list[o].userName.indexOf('-') != -1?list.list[o].userName.split('-')[0]:list.list[o].userName)
+                if(list.list[o].stateName == '租用'){
+                  list.list[o].userOrgName = list.list[o].userOrgName?list.list[o].userOrgName:''
+                  list.list[o].rentUserName = !list.list[o].userName?'':(list.list[o].userName.indexOf('-') != -1?list.list[o].userName.split('-')[0]:list.list[o].userName)
+                }else{
+                  list.list[o].headOrgName = list.list[o].headOrgName?list.list[o].headOrgName:''
+                  list.list[o].rentUserName = !list.list[o].headName?'':(list.list[o].headName.indexOf('-') != -1?list.list[o].headName.split('-')[0]:list.list[o].headName)
+                }
                 //假数据
                 // list.list[o].monitorVisable = true;
                 // list.list[o].subId = '1955554621449019392';
@@ -569,13 +575,14 @@
           img {
             width: 18px;
             height: 18px;
-            margin: 3px 4px 0 10px;
+            margin: 3px 4px 0 6px;
           }
           p {
             height: 24px;
             line-height: 24px;
             font-size: 14px;
             color: #fff;
+            overflow: hidden;
           }
         }
       }