LXXXY 5 роки тому
батько
коміт
af44437145
2 змінених файлів з 35 додано та 26 видалено
  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)
     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) {
 export function getPoint(param) {
@@ -200,12 +212,6 @@ export function updatePoint(param) {
     return fetch({ method: 'POST', url: `${api}/service/point/update`, data })
     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设备族列表 
 //点击点位标签获取tab设备族列表 
 export function getTabFamily(param) {
 export function getTabFamily(param) {
     let data = {
     let data = {

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

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