6
0

2 Commits b1e42cb7f6 ... 79fbd384f1

Autor SHA1 Mensagem Data
  LXXXY 79fbd384f1 Merge branch 'msg-sever' of http://39.106.8.246:3003/web/ibms into msg-sever 5 anos atrás
  LXXXY af44437145 位置标签整理 5 anos atrás
2 arquivos alterados com 35 adições e 26 exclusões
  1. 12 6
      src/api/scan/request.js
  2. 23 20
      src/views/data_admin/buildGraphy/graphyTabs.vue

+ 12 - 6
src/api/scan/request.js

@@ -177,6 +177,18 @@ export function locationPointQuery(param, success) {
     http.postJson(url, param, success)
 }
 
+//点位标签详情修改【数据中心接口】
+export function updateLocationPoint(param, success) {
+    let url = `${baseUrl}/datacenter/location-point/update`;
+    http.postJson(url, param, success)
+}
+
+//扫楼作业-位置标签-删除图片
+export function deleteLocationImg(param, success) {
+    let url = `${baseUrl}/datacenter/location-point/delete-image`;
+    http.postJson(url, param, success)
+}
+
 
 //点位标签查看详情
 export function getPoint(param) {
@@ -200,12 +212,6 @@ export function updatePoint(param) {
     return fetch({ method: 'POST', url: `${api}/service/point/update`, data })
 }
 
-//点位标签详情修改【数据中心接口】
-export function updateLocationPoint(param, success) {
-    let url = `${baseUrl}/datacenter/location-point/update`;
-    http.postJson(url, param, success)
-}
-
 //点击点位标签获取tab设备族列表 
 export function getTabFamily(param) {
     let data = {

+ 23 - 20
src/views/data_admin/buildGraphy/graphyTabs.vue

@@ -97,7 +97,7 @@ getLocation 定位
         <template v-for="(item,index) in installPic">
           <div class="point-image" :key="index">
             <i class="el-icon-delete" @click="delImage(index,installPic)"></i>
-            <img :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.key +'&width=200&height=200'" alt>
+            <img :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200&height=200'" alt>
           </div>
         </template>
         <load-img keyName="安装位置" @getKey="getKey"></load-img>
@@ -107,7 +107,7 @@ getLocation 定位
         <template v-for="(item,index) in panorama">
           <div class="point-image" :key="index">
             <i class="el-icon-delete" @click="delImage(index,panorama)"></i>
-            <img :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.key +'&width=200&height=200'" alt>
+            <img :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200&height=200'" alt>
           </div>
         </template>
         <load-img keyName="全景照片" @getKey="getKey"></load-img>
@@ -117,7 +117,7 @@ getLocation 定位
         <template v-for="(item,index) in rimPic">
           <div class="point-image" :key="index">
             <i class="el-icon-delete" @click="delImage(index,rimPic)"></i>
-            <img :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.key +'&width=200&height=200'" alt>
+            <img :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200&height=200'" alt>
           </div>
         </template>
         <load-img keyName="周边照片" @getKey="getKey"></load-img>
@@ -127,7 +127,7 @@ getLocation 定位
         <template v-for="(item,index) in videoPic">
           <div class="point-image" :key="index">
             <i class="el-icon-delete" @click="delImage(index,videoPic)"></i>
-            <img :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.key +'&width=200&height=200'" alt>
+            <img :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200&height=200'" alt>
           </div>
         </template>
         <load-img keyName="视频" @getKey="getKey"></load-img>
@@ -137,7 +137,7 @@ getLocation 定位
         <template v-for="(item,index) in elsePic">
           <div class="point-image" :key="index">
             <i class="el-icon-delete" @click="delImage(index,elsePic)"></i>
-            <img :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.key +'&width=200&height=200'" alt>
+            <img :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200&height=200'" alt>
           </div>
         </template>
         <load-img keyName="其他照片" @getKey="getKey"></load-img>
@@ -150,7 +150,8 @@ getLocation 定位
 import {
   locationPointQuery, //获取点位列表
   getPoint, //获取点位详情
-  updatePoint //修改点位
+  updateLocationPoint, //修改点位
+  deleteLocationImg,//数据中心删除图片
 } from "@/api/scan/request";
 import formInput from "./lib/formInput";
 import loadImg from "./lib/uploadImg";
@@ -163,7 +164,7 @@ export default {
     pointParam: {
       type: Object
     },
-   floorOption: {//建筑楼层
+    floorOption: {//建筑楼层
       Type: Array,
       default: () => []
     },
@@ -206,8 +207,10 @@ export default {
     },
     //删除图片
     delImage(index, arr) {
-      arr.splice(index, 1);
-      this.updatePoint();
+      let delArr = arr.splice(index, 1);
+      deleteLocationImg(delArr, res => {
+        this.$message.success("修改成功");
+      })
     },
     //获取key的值
     getKey(val, name) {
@@ -258,14 +261,14 @@ export default {
         cancelButtonText: '创建'
       }).then(() => {
         this.$router.push({
-          name: 'updatePointZone',
-          params: { item: item,floorData:this.floorOption,nowBuildFloor:this.buildingData }
+          name: 'updateLocationPointZone',
+          params: { item: item, floorData: this.floorOption, nowBuildFloor: this.buildingData }
         })
       }).catch(action => {
         if (action === 'cancel') {
           this.$router.push({
             name: 'createPointZone',
-            params: { item: item,floorData:this.floorOption,nowBuildFloor:this.buildingData }
+            params: { item: item, floorData: this.floorOption, nowBuildFloor: this.buildingData }
           })
         }
       })
@@ -290,19 +293,19 @@ export default {
       this.mapPush(this.pointDetails.ImageList, this.rimPic);
       this.mapPush(this.pointDetails.ImageList, this.videoPic);
       this.mapPush(this.pointDetails.ImageList, this.elsePic);
-      let param = {
-        ProjId: this.pointParam.ProjId,
-        UserId: this.pointParam.UserId,
-        PointList: this.pointDetails
-      };
-      updatePoint(param).then(res => {
+      let pa = {
+        Content: [this.pointDetails]
+      }
+      updateLocationPoint(pa, res => {
         this.$message.success("修改成功");
-      });
+      })
     },
     getDetails(item) {
       this.pointShow = true;
       this.pointDetails = item;
-      this.getPic(item.ImageList);
+      if (item.ImageList && item.ImageList.length) {
+        this.getPic(item.ImageList);
+      }
     },
     getPic(imgArr) {
       this.installPic = [];