Prechádzať zdrojové kódy

位置标签字段小写

haojianlong 4 rokov pred
rodič
commit
7cc554eeea

+ 1 - 1
src/api/scan/config.js

@@ -22,7 +22,7 @@ export const tenant = dataCenter + '/tenant'
 export const floor = object + '/floor'
 export const dict = dataCenter + '/dict'
 export const classDef = dataCenter + '/class-def'
-export const locationPoint = dataCenter + '/location-point'
+export const locationPoint = object + '/location-point'
 export const modelScanTask = dataCenter + '/model-scan-task'
 export const equipScanTask = dataCenter + '/equip-scan-task'
 export const shContainSp = rel + '/sh-contain-sp-base'

+ 18 - 20
src/views/data_admin/buildGraphy/graphyCanvas.vue

@@ -121,14 +121,14 @@ export default {
         this.view.canvasView.style.cursor = `default`;
       }
       this.list = list.map(t => {
-        if (t.X == 0 && t.Y == 0) {
+        if (t.x == 0 && t.y == 0) {
           return undefined;
         } else {
           return {
-            Id: t.Id,
-            X: t.X,
-            Y: t.Y * -1,
-            Name: t.Name
+            Id: t.id,
+            X: t.x,
+            Y: t.y * -1,
+            Name: t.name
           };
         }
       }).filter(item => item);
@@ -137,19 +137,19 @@ export default {
     //右键菜单的编辑该标签
     getDatails() {
       this.menuShow = false;
-      this.$emit("getDetails", { Id: this.point.Id });
+      this.$emit("getDetails", { Id: this.point.id });
     },
     //右键的清除该点位的坐标
     clearXY() {
       this.menuShow = false
-      this.point.X = 0
-      this.point.Y = 0
+      this.point.x = 0
+      this.point.y = 0
       this.updatePoint('clearXY')
     },
     //右键的修改为无法定位到楼层的点位
     noLocate() {
       this.menuShow = false
-      delete this.point.FloorId
+      delete this.point.floorId
       this.updatePoint('noLocate')
     },
     //创建实例
@@ -162,15 +162,13 @@ export default {
     },
     // 定位
     locationGraphy(point) {
-      let centerX = (this.view.width / 2) - point.X * this.view.scale;
-      let centerY = (this.view.height / 2) - point.Y * this.view.scale;
+      let centerX = (this.view.width / 2) - point.x * this.view.scale;
+      let centerY = (this.view.height / 2) - point.y * this.view.scale;
       this.view.origin = new SPoint(centerX, centerY)
     },
     //点击按钮
     addPoint(point) {
-
-      if (this.point.Id != point.Id) {
-        console.log(point)
+      if (this.point.id != point.id) {
         this.point = point;
         this.view.canvasView.style.cursor = `url(${this.imageUrl}) 14 33,auto`;
         this.setFlag = true
@@ -198,14 +196,14 @@ export default {
       this.menuShow = false;
       if (this.setFlag) {
         this.scene.addMarker({
-          Id: this.point.Id,
-          Name: this.point.Name,
+          Id: this.point.id,
+          Name: this.point.name,
           X: event[0].x,
           Y: event[0].y
         })
         this.scene.markerClick(this, this.markClick);
-        this.point.X = event[0].x
-        this.point.Y = -event[0].y
+        this.point.x = event[0].x
+        this.point.y = -event[0].y
         this.updatePoint('setFlag')
         this.cancelSetFlag()
       }
@@ -226,10 +224,10 @@ export default {
     //更新位置标签
     updatePoint(type) {
       let pa = {
-        Content: [this.point]
+        content: [this.point]
       }
       if (type == 'noLocate') {
-        pa.Projection = ['FloorId']
+        pa.projection = ['floorId']
       }
       //type == clearXY setFlag noLocate
       updateLocationPoint(pa, res => {

+ 46 - 42
src/views/data_admin/buildGraphy/graphyTabs.vue

@@ -9,12 +9,12 @@ getLocation 定位
         <el-scrollbar style="height:100%;width:calc(100% - 10px);" v-if="pointData.length" v-loading="isLoading">
           <div v-for="(item,index) in pointData" :key="index">
             <div class="point">
-              <span style="line-height:30px;">{{item.Name}}</span>
+              <span style="line-height:30px;">{{item.name}}</span>
               <div style="height:30px;float:right;font-size:14px;">
                 <el-button size="mini" @click="getDetails(item)" icon="el-icon-edit-outline"></el-button>
                 <el-button size="mini" @click="updateOrCreate(item)" icon="el-icon-link"></el-button>
                 <el-button :disabled="!map" size="mini" @click="btnClick(item)"
-                  :icon="item.X == 0 && item.Y == 0 ? 'el-icon-s-flag' : 'el-icon-place'"></el-button>
+                  :icon="item.x == 0 && item.y == 0 ? 'el-icon-s-flag' : 'el-icon-place'"></el-button>
               </div>
             </div>
           </div>
@@ -22,23 +22,23 @@ getLocation 定位
 
         <div v-if="!pointData.length" class="center" style="height: 400px;padding-top: 260px; box-sizing:border-box;">
           <i class="icon-wushuju iconfont"></i>
-          {{pointParam.FloorId ? "数据为空" : "请选择楼层"}}
+          {{pointParam.floorId ? "数据为空" : "请选择楼层"}}
         </div>
       </el-tab-pane>
       <el-tab-pane label="无法定位到楼层的点位标签" name="noPoint">
         <div v-if="pointNoData.length" v-loading="isLoading" style="max-height: 600px;">
           <div v-for="(item,index) in pointNoData" :key="index">
             <div class="point">
-              <span>{{item.Name}}</span>
+              <span>{{item.name}}</span>
               <el-button size="mini" @click="getDetails(item)" icon="el-icon-edit-outline"></el-button>
               <el-button :disabled="true" size="mini" @click="btnClick(item)"
-                  :icon="item.X == 0 && item.Y == 0 ? 'el-icon-s-flag' : 'el-icon-place'"></el-button>
+                  :icon="item.x == 0 && item.y == 0 ? 'el-icon-s-flag' : 'el-icon-place'"></el-button>
             </div>
           </div>
         </div>
         <div v-if="!pointNoData.length" class="center" style="height: 400px;padding-top: 260px; box-sizing:border-box;">
           <i class="icon-wushuju iconfont"></i>
-          {{pointParam.FloorId ? "数据为空" : "请选择楼层"}}
+          {{pointParam.floorId ? "数据为空" : "请选择楼层"}}
         </div>
       </el-tab-pane>
     </el-tabs>
@@ -46,19 +46,19 @@ getLocation 定位
       <div class="qrcode">
         <div class="qrcode-view">
           <img
-            :src="'/ScanBuilding/service/qrcode/point?projectId=' + projectId + '&pointId=' + pointDetails.PointId + '&FloorId=' + pointDetails.FloorId + '&width=200&height=200'"
+            :src="'/ScanBuilding/service/qrcode/point?projectId=' + projectId + '&pointId=' + pointDetails.id + '&FloorId=' + pointDetails.floorId + '&width=200&height=200'"
             alt="点位标签二维码">
         </div>
         <div class="point-edit">
           <p>
-            点位标签的现场位置:{{activeName2 != 'point' ? '无楼层' : pointParam.fllorName}}
+            点位标签的现场位置:{{activeName2 != 'point' ? '无楼层' : pointParam.floorName}}
             -{{pointDetails.spaceName || '未知原空间'}}
-            -({{pointDetails.X}},{{pointDetails.Y}})
+            -({{pointDetails.x}},{{pointDetails.y}})
           </p>
           <div>
-            <form-input :width="100" @change="changeInput" :value="pointDetails.Name" :keys="'Name'" :label="'点位标签'" :isRule="false">
+            <form-input :width="100" @change="changeInput" :value="pointDetails.name" :keys="'name'" :label="'点位标签'" :isRule="false">
             </form-input>
-            <form-input :width="100" @change="changeInput" :value="pointDetails.LocalId" :keys="'LocalId'" :label="'点位本地编码'"
+            <form-input :width="100" @change="changeInput" :value="pointDetails.localId" :keys="'localId'" :label="'点位本地编码'"
               :isRule="false"></form-input>
             <!-- <form-input></form-input> -->
           </div>
@@ -69,11 +69,11 @@ getLocation 定位
         <ul>
           <li>
             <span>点位标签ID</span>
-            <span>{{pointDetails.PointId}}</span>
+            <span>{{pointDetails.id}}</span>
           </li>
           <li>
             <span>模型ID</span>
-            <span>{{pointDetails.BimId || '暂无'}}</span>
+            <span>{{pointDetails.bimId || '暂无'}}</span>
           </li>
         </ul>
       </div>
@@ -87,7 +87,7 @@ getLocation 定位
           <li>
             <span>备注</span>
             <span>
-              <form-input :width="0" @change="changeInput" :value="pointDetails.Note" :keys="'Note'" :label="''" :isRule="false"></form-input>
+              <form-input :width="0" @change="changeInput" :value="pointDetails.note" :keys="'note'" :label="''" :isRule="false"></form-input>
             </span>
           </li>
         </ul>
@@ -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="geterateImgUrl(item.key)" 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="geterateImgUrl(item.key)" 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="geterateImgUrl(item.key)" 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="geterateImgUrl(item.key)" 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="geterateImgUrl(item.key)" alt>
           </div>
         </template>
         <load-img keyName="其他照片" @getKey="getKey"></load-img>
@@ -217,35 +217,35 @@ export default {
       switch (name) {
         case "安装位置":
           this.installPic.push({
-            Key: val,
+            key: val,
             name: name,
             type: "image_wz"
           });
           break;
         case "全景照片":
           this.panorama.push({
-            Key: val,
+            key: val,
             name: name,
             type: "panorama"
           });
           break;
         case "周边照片":
           this.rimPic.push({
-            Key: val,
+            key: val,
             name: name,
             type: "image_zb"
           });
           break;
         case "视频":
           this.videoPic.push({
-            Key: val,
+            key: val,
             name: name,
             type: "video"
           });
           break;
         default:
           this.elsePic.push({
-            Key: val,
+            key: val,
             name: name,
             type: "image_else"
           });
@@ -275,7 +275,7 @@ export default {
       })
     },
     btnClick(item) {
-      if (item.X == 0 && item.Y == 0) {
+      if (item.x == 0 && item.y == 0) {
         this.$emit("setFalg", item);
       } else {
         this.$emit("getLocation", item);
@@ -288,14 +288,14 @@ export default {
     },
     //修改详情
     updatePoint() {
-      this.pointDetails.ImageList = [];
-      this.mapPush(this.pointDetails.ImageList, this.installPic);
-      this.mapPush(this.pointDetails.ImageList, this.panorama);
-      this.mapPush(this.pointDetails.ImageList, this.rimPic);
-      this.mapPush(this.pointDetails.ImageList, this.videoPic);
-      this.mapPush(this.pointDetails.ImageList, this.elsePic);
+      this.pointDetails.imageList = [];
+      this.mapPush(this.pointDetails.imageList, this.installPic);
+      this.mapPush(this.pointDetails.imageList, this.panorama);
+      this.mapPush(this.pointDetails.imageList, this.rimPic);
+      this.mapPush(this.pointDetails.imageList, this.videoPic);
+      this.mapPush(this.pointDetails.imageList, this.elsePic);
       let pa = {
-        Content: [this.pointDetails]
+        content: [this.pointDetails]
       }
       updateLocationPoint(pa, res => {
         this.$message.success("修改成功");
@@ -304,8 +304,8 @@ export default {
     getDetails(item) {
       this.pointShow = true;
       this.pointDetails = item;
-      if (item.ImageList && item.ImageList.length) {
-        this.getPic(item.ImageList);
+      if (item.imageList && item.imageList.length) {
+        this.getPic(item.imageList);
       }
     },
     getPic(imgArr) {
@@ -337,22 +337,22 @@ export default {
     getPointList() {
       if (this.buildingData[0] && this.buildingData[1]) {
         let param = {
-            Filters: `BuildId='${this.buildingData[0]}';floorId='${this.buildingData[1]}'`,
-            "Cascade": [{ "Name": "imageList" }]
+            filters: `buildId='${this.buildingData[0]}';floorId='${this.buildingData[1]}'`,
+            cascade: [{ name: "imageList" }]
           };
         if (this.activeName2 != "point") {
-          param.Filters =  `BuildId='${this.buildingData[0]}';floorId isNull`
+          param.filters =  `buildId='${this.buildingData[0]}';floorId isNull`
         }
         this.isLoading = true;
         locationPointQuery(param, res => {
           this.isLoading = false;
           if (this.activeName2 != "point") {
-            this.pointNoData = res.Content;
+            this.pointNoData = res.content;
             this.$emit("getPointList", []);
           }
           else {
-            this.pointData = res.Content;
-            this.$emit("getPointList", res.Content);
+            this.pointData = res.content;
+            this.$emit("getPointList", res.content);
           }
         })
       }
@@ -360,11 +360,15 @@ export default {
     //初始化
     reset(data, map) {
       this.map = map
-      this.pointParam.FloorId = data.FloorId;
-      this.pointParam.fllorName = data.fllorName;
+      this.pointParam.floorId = data.floorId;
+      this.pointParam.floorName = data.floorName;
       this.buildingData = data.buildingData;
       this.activeName2 = "point";
       this.getPointList();
+    },
+    // 生成图片路径
+    geterateImgUrl(key){
+      return '/image-service/common/image_get?systemId=dataPlatform&key='+ key +'&width=200&height=200'
     }
   },
   watch: {

+ 20 - 33
src/views/data_admin/buildGraphy/index.vue

@@ -3,9 +3,6 @@
  -->
 <template>
   <div id="graphy">
-    <!-- <div class="graphy-left">
-          <graphy-tree v-if="show" :param="param" @change="getPoint"></graphy-tree>
-        </div> -->
     <div class='search-title'>
       <span class="p12">建筑楼层</span>
       <el-cascader placeholder='请选择' v-model="buildVlaue" :options="options" @change="changeFloor" filterable :props="props" ref="buildfloor">
@@ -61,9 +58,9 @@ export default {
         UserId: this.userId //用户id
       },
       pointParam: {
-        ProjId: this.projectId, //项目id
-        UserId: this.userId, //用户id
-        fllorName: "",
+        projId: this.projectId, //项目id
+        userId: this.userId, //用户id
+        floorName: "",
         buildingData: [],//建筑楼层信息
       },
       options: [],
@@ -87,14 +84,14 @@ export default {
         name = "",
         buildFloorName = ''
       this.options.map(item => {
-        if (!!item.Floor && item.Floor.length) {
-          if (item.BuildID == val[0]) {
-            buildFloorName = `${item.BuildLocalName || item.BuildName}-`
-            item.Floor.map(child => {
-              if (child.BuildID == val[1]) {
-                floorMap = child.StructureInfo ? child.StructureInfo.FloorMap : ''
-                name = child.FloorLocalName
-                buildFloorName += `${child.FloorLocalName || child.FloorName}`
+        if (!!item.floor && item.floor.length) {
+          if (item.id == val[0]) {
+            buildFloorName = `${item.localName || item.name}-`
+            item.floor.map(child => {
+              if (child.id == val[1]) {
+                floorMap = child.infos ? child.infos.floorMap : ''
+                name = child.localName
+                buildFloorName += `${child.localName || child.name}`
               }
             })
           }
@@ -119,16 +116,6 @@ export default {
         pageSize: 50
       }
       buildingQuery(param, res => {
-        res.content.map(t => {
-          if (t.floor && t.floor.length) {
-            t.floor = t.floor.map(item => {
-              if (item.id == this.FloorID) return
-              item.BuildID = item.id
-              item.BuildLocalName = item.localName || item.name
-              return item
-            }).filter(it => it)
-          }
-        })
         this.options = res.content
         if(this.$route.params.nowBuildFloor){
           this.changeFloor(this.$route.params.nowBuildFloor)
@@ -137,16 +124,16 @@ export default {
       })
     },
     changeValue() {
-      this.$set(this.param, 'ProjId', this.projectId)
-      this.$set(this.param, 'UserId', this.userId)
-      this.$set(this.pointParam, 'ProjId', this.projectId)
-      this.$set(this.pointParam, 'UserId', this.userId)
+      this.$set(this.param, 'projId', this.projectId)
+      this.$set(this.param, 'userId', this.userId)
+      this.$set(this.pointParam, 'projId', this.projectId)
+      this.$set(this.pointParam, 'userId', this.userId)
       this.show = true
     },
     //渲染
     getPoint(data) {
-      this.pointParam.FloorId = data.code;
-      this.pointParam.fllorName = data.name;
+      this.pointParam.floorId = data.code;
+      this.pointParam.floorName = data.name;
       this.pointParam.buildingData = data.buildingData
 
       if (this.map != data.map) {
@@ -160,7 +147,7 @@ export default {
     //获取到点位标签坐标
     sendPointList(list) {
       if (list && list.length) {
-        this.pointId = list[0].Id;
+        this.pointId = list[0].i;
         this.$refs.canvas.doPoint(list);
       } else {
         this.$refs.canvas.doPoint([]);
@@ -173,8 +160,8 @@ export default {
     //定位getLocation
     getLocation(item) {
       this.$refs.canvas.locationGraphy({
-        X: item.X,
-        Y: item.Y * -1
+        x: item.x,
+        y: item.y * -1
       });
     },
     //重新获取点位信息resetPoint