haojianlong 4 роки тому
батько
коміт
4a5814ce32

+ 4 - 4
src/views/data_admin/buildGraphy/createPointZone.vue

@@ -93,10 +93,10 @@ export default {
       let zObj = this.$refs.zoneInput.getFormData();
       zObj.pic = this.$refs.pointMsg.choImg.concat();
       zObj.pic = zObj.pic.map(item => ({
-        id: item.ObjectId,
-        key: item.Key,
-        name: item.Name,
-        type: item.Type
+        id: item.objectId,
+        key: item.key,
+        name: item.name,
+        type: item.type
       }))
       if (this.localName && this.buildFloor.length && this.space) {
         zObj.classCode = this.space;

+ 1 - 1
src/views/data_admin/buildGraphy/graphyCanvas.vue

@@ -137,7 +137,7 @@ export default {
     //右键菜单的编辑该标签
     getDatails() {
       this.menuShow = false;
-      this.$emit("getDetails", { Id: this.point.id });
+      this.$emit("getDetails", { id: this.point.Id });
     },
     //右键的清除该点位的坐标
     clearXY() {

+ 14 - 1
src/views/data_admin/buildGraphy/graphyTabs.vue

@@ -301,6 +301,19 @@ export default {
         this.$message.success("修改成功");
       })
     },
+    // 从图中右键查看详情
+    findDetails(item) {
+      let cur;
+      for(let i = 0; i < this.pointData.length; i++) {
+        if (this.pointData[i].id == item.id){
+          cur = this.pointData[i];
+          break;
+        }
+      }
+      if (cur) {
+        this.getDetails(cur)
+      }
+    },
     getDetails(item) {
       this.pointShow = true;
       this.pointDetails = item;
@@ -315,7 +328,7 @@ export default {
       this.videoPic = [];
       this.elsePic = [];
       imgArr.map((item, index) => {
-        switch (item.Name) {
+        switch (item.name) {
           case "安装位置":
             this.installPic.push(item);
             break;

+ 1 - 1
src/views/data_admin/buildGraphy/index.vue

@@ -170,7 +170,7 @@ export default {
     },
     //查看详情
     getDetails(item) {
-      this.$refs.tabs.getDetails(item);
+      this.$refs.tabs.findDetails(item);
     },
     //关闭canvas
     closeCanvas() {

+ 5 - 1
src/views/data_admin/buildGraphy/locationPointMsg.vue

@@ -13,7 +13,7 @@
         <el-checkbox-group v-model="choImg" @change="handleCheckedCitiesChange">
           <el-checkbox v-for="item in pointObj.imageList" :label="item" :key="item.key">
             <div style="max-width:250px;height:250px;float:left;">
-              <el-image :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.Key}`" style="height:250px;"></el-image>
+              <el-image :src="geterateImgUrl(item.key)" style="height:250px;"></el-image>
             </div>
           </el-checkbox>
         </el-checkbox-group>
@@ -53,6 +53,10 @@ export default {
       this.choImg = [];
       this.isIndeterminate = false;
       this.checkAll = false;
+    },
+    // 生成图片路径
+    geterateImgUrl(key){
+      return '/image-service/common/image_get?systemId=dataPlatform&key='+ key +'&width=200&height=200'
     }
   }
 }

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

@@ -74,11 +74,12 @@ export default {
     //创建
     updateZ() {
       let imgs = this.$refs.pointMsg.choImg.concat();
+      console.log(imgs);
       imgs = imgs.map(item => ({
-        id: item.ObjectId,
-        key: item.Key,
-        name: item.Name,
-        type: item.Type
+        id: item.objectId,
+        key: item.key,
+        name: item.name,
+        type: item.type
       }))
       if (imgs.length && this.zoneList.length) {
         let zones = this.zoneList.map(item => {
@@ -88,7 +89,7 @@ export default {
           else {
             item.pic = imgs;
           }
-          return { id: item.id, pic: item.pic, classCode: item.classCode };
+          return { roomId: item.id, pic: item.pic, classCode: item.classCode };
         })
         let param = {
           content: zones
@@ -111,7 +112,7 @@ export default {
         x: this.pointItem.x,
         y: this.pointItem.y,
         data: {
-          filters: `buildingId='${this.pointItem.buildId}' and floorId='${this.pointItem.floorId}'`,
+          filters: `buildingId='${this.pointItem.buildId}';floorId='${this.pointItem.floorId}'`,
           cascade: [{ name: "floor" }, { name: "building" }, { name: "zoneName" }]
         }
       }