Przeglądaj źródła

位置标签字段修改

haojianlong 4 lat temu
rodzic
commit
a883dda0cd

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

@@ -11,7 +11,7 @@
         <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange"><span style="padding-left:25px;vertical-align: text-bottom;">全选</span></el-checkbox>
         <div style="margin: 15px 0;"></div>
         <el-checkbox-group v-model="choImg" @change="handleCheckedCitiesChange">
-          <el-checkbox v-for="item in pointObj.ImageList" :label="item" :key="item.key">
+          <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>
             </div>
@@ -39,14 +39,14 @@ export default {
   methods: {
     //是否全选
     handleCheckAllChange(val) {
-      this.choImg = val ? this.pointObj.ImageList : [];
+      this.choImg = val ? this.pointObj.imageList : [];
       this.isIndeterminate = false;
     },
     //选中
     handleCheckedCitiesChange(value) {
       let checkedCount = value.length;
-      this.checkAll = checkedCount === this.pointObj.ImageList.length;
-      this.isIndeterminate = checkedCount > 0 && checkedCount < this.pointObj.ImageList.length;
+      this.checkAll = checkedCount === this.pointObj.imageList.length;
+      this.isIndeterminate = checkedCount > 0 && checkedCount < this.pointObj.imageList.length;
     },
     //清空选项
     clearImg(){

+ 39 - 39
src/views/data_admin/buildGraphy/updatePointZone.vue

@@ -8,14 +8,14 @@
       <el-scrollbar style="height:calc(100% - 43px)">
         <div class="item">
           <p>将位置标签图片批量补充到业务空间:</p>
-          <div v-for="item in zoneList" :key="item.objid" class="zone-item">
+          <div v-for="item in zoneList" :key="item.id" class="zone-item">
             <el-tooltip class="item" effect="dark"
-              :content="`${item.Building.BuildLocalName} / ${item.Floor.FloorLocalName} / ${item.DClassDef.Name} / ${item.RoomLocalName}`"
+              :content="`${item.building.localName} / ${item.floor.localName} / ${item.dClassDef.name} / ${item.localName}`"
               placement="top">
-              <p>{{item.RoomLocalName || item.RoomName}}</p>
+              <p>{{item.localName || item.name}}</p>
             </el-tooltip>
             <i class="el-icon-delete" circle style="float:right;line-height:32px;padding: 0 9px 0 0;cursor: pointer;" size="mini"
-              @click="deleteZone(item.RoomID)"></i>
+              @click="deleteZone(item.id)"></i>
           </div>
           <div class="zone-item" style="border:none;border-left:-4px;width:auto;">
             <el-cascader v-show="plusZone" :props="zoneCascader" :show-all-levels="false" v-model="zoneCa" @change="changeCascader" filterable
@@ -40,7 +40,7 @@
 import locationPointMsg from '@/views/data_admin/buildGraphy/locationPointMsg'
 import { zoneQueryByPoint, zoneQuery, updateZonePic } from '@/api/scan/request';
 import { mapGetters } from 'vuex'
-import { getDataDictionary, queryPhysicsAllType } from "@/api/dict";
+import { queryPhysicsAllType } from "@/api/dict";
 export default {
   data() {
     let that = this;
@@ -75,23 +75,23 @@ export default {
     updateZ() {
       let imgs = this.$refs.pointMsg.choImg.concat();
       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 => {
-          if (item.Pic) {
-            item.Pic = item.Pic.concat(imgs);
+          if (item.pic) {
+            item.pic = item.pic.concat(imgs);
           }
           else {
-            item.Pic = imgs;
+            item.pic = imgs;
           }
-          return { RoomID: item.RoomID, Pic: item.Pic, ObjectType: item.ObjectType };
+          return { id: item.id, pic: item.pic, classCode: item.classCode };
         })
         let param = {
-          Content: zones
+          content: zones
         }
         updateZonePic(param, res => {
           this.$message.success("更新成功");
@@ -104,7 +104,6 @@ export default {
       else {
         this.$message("请至少添加一个业务空间");
       }
-
     },
     //获取空间列表
     getSpaceList() {
@@ -126,18 +125,18 @@ export default {
       //建筑
       if (level == 0) {
         let nodes = this.$route.params.floorData.map(item => ({
-          value: item.BuildID,
-          label: item.BuildLocalName || item.BuildName,
+          value: item.id,
+          label: item.localName || item.name,
           leaf: level >= 3
         }))
         resolve(nodes)
       }
       //楼层
       else if (level == 1) {
-        let floors = this.$route.params.floorData.filter(item => { return item.BuildID == node.value })
-        let nodes = floors[0].Floor.map(item => ({
-          value: item.FloorID,
-          label: item.FloorLocalName || item.FloorName,
+        let floors = this.$route.params.floorData.filter(item => { return item.id == node.value })
+        let nodes = floors[0].floor.map(item => ({
+          value: item.id,
+          label: item.localName || item.name,
           leaf: level >= 3
         }))
         resolve(nodes)
@@ -152,9 +151,9 @@ export default {
             type: `space`
           }
           queryPhysicsAllType(pa, res => {
-            this.zoneTypeList = res.Content.filter((item => { return item.Name != '元空间' })).map(item => ({
-              value: item.Code,
-              label: item.Name,
+            this.zoneTypeList = res.content.filter((item => { return item.name != '元空间' })).map(item => ({
+              value: item.code,
+              label: item.name,
               leaf: level >= 3
             }))
             resolve(this.zoneTypeList)
@@ -164,22 +163,23 @@ export default {
       //业务空间
       else {
         let pa = {
-          Filters: `not id isNull`,
-          Orders: "createTime desc, id asc",
-          PageNumber: 1,
-          PageSize: 1000,
-          ZoneType: node.value,
-          BuildingId: node.parent.parent.value,
-          FloorId: node.parent.value
+          filters: `not id isNull`,
+          orders: "createTime desc, id asc",
+          pageNumber: 1,
+          pageSize: 1000,
+          zoneType: node.value,
+          buildingId: node.parent.parent.value,
+          floorId: node.parent.value
         }
         zoneQuery(pa, res => {
-          let nodes = res.Content.map(item => {
-            item.Building = { BuildLocalName: node.parent.parent.label };
-            item.Floor = { FloorLocalName: node.parent.label };
-            item.DClassDef = { Name: node.label };
+          let nodes = res.content.map(item => {
+            item.building = { localName: node.parent.parent.label };
+            item.floor = { localName: node.parent.label };
+            item.dClassDef = { name: node.label };
+            console.log(item);
             return {
               value: item,
-              label: item.RoomLocalName || item.RoomName,
+              label: item.localName || item.name,
               leaf: level >= 3
             }
           })
@@ -189,15 +189,15 @@ export default {
     },
     //删除业务空间
     deleteZone(zoneid) {
-      this.zoneList = this.zoneList.filter(item => { return item.RoomID != zoneid });
+      this.zoneList = this.zoneList.filter(item => { return item.id != zoneid });
     },
     //添加业务空间
     addZone() {
-      if (this.newZoneObj.RoomID && this.zoneList.findIndex((item) => (item.RoomID == this.newZoneObj.RoomID)) == -1) {
+      if (this.newZoneObj.id && this.zoneList.findIndex((item) => (item.id == this.newZoneObj.id)) == -1) {
         this.zoneList.push(this.newZoneObj)
         this.plusZone = false;
       }
-      else if (!this.newZoneObj.RoomID) {
+      else if (!this.newZoneObj.id) {
         this.$message("请选择业务空间后添加")
       }
       else {