Browse Source

Merge branch 'msg-sever' of http://39.106.8.246:3003/web/ibms into msg-sever

haojianlong 5 years ago
parent
commit
4976cd4e71
1 changed files with 19 additions and 6 deletions
  1. 19 6
      src/views/data_admin/buildGraphy/updatePointZone.vue

+ 19 - 6
src/views/data_admin/buildGraphy/updatePointZone.vue

@@ -10,8 +10,7 @@
           <p>将位置标签图片批量补充到业务空间:</p>
           <div v-for="item in zoneList" :key="item.objid" class="zone-item">
             <el-tooltip class="item" effect="light" :content="item.RoomLocalName || item.RoomName" placement="top">
-              <p style="width:215px;float:left;height:32px;overflow:hidden;text-overflow: ellipsis;padding: 0 0;">
-                {{item.RoomLocalName || item.RoomName}}</p>
+              <p>{{item.RoomLocalName || item.RoomName}}</p>
             </el-tooltip>
             <el-button type="info" icon="el-icon-delete" circle style="float:right;" size="mini" @click="deleteZone(item.RoomID)"></el-button>
           </div>
@@ -167,13 +166,18 @@ export default {
     },
     //添加业务空间
     addZone() {
-      if (this.newZoneObj.RoomID && this.zoneList.indexOf(this.newZoneObj.RoomID) == -1) {
+      if (this.newZoneObj.RoomID && this.zoneList.findIndex((item) => (item.RoomID == this.newZoneObj.RoomID)) == -1) {
         this.zoneList.push(this.newZoneObj)
-        this.zoneCa = [];
+        console.log(this.zoneList)
       }
-      else {
+      else if (!this.newZoneObj.RoomID) {
         this.$message("请选择业务空间后添加")
       }
+      else {
+        this.$message("已有业务空间,请重新选择");
+      }
+      this.zoneCa = [];
+      this.newZoneObj = {}
     },
     //选择业务空间
     changeCascader(val) {
@@ -234,7 +238,16 @@ export default {
   position: relative;
   width: 245px;
   padding: 5px 10px;
-  border: 1px solid rgba(0, 0, 0, 0.5);
   margin: 0 5px 5px 0;
 }
+.zone-item p {
+  width: 200px;
+  float: left;
+  height: 32px;
+  overflow: hidden;
+  border: 1px solid rgb(220, 223, 230);
+  padding-left: 15px;
+  padding: 0 0 0 15px;
+  border-radius: 5px;
+}
 </style>