Procházet zdrojové kódy

竖井关联业务空间完成

LXXXY před 5 roky
rodič
revize
e1184f72b5

+ 5 - 0
src/api/scan/request.js

@@ -1552,6 +1552,11 @@ export function shaftSpaceTypeQuery(param, success) {
     let url = `${baseUrl}/datacenter/sh-contain-sp-base/space-type-query?shaftId=${param.shaftId}`;
     http.postJson(url, param, success)
 }
+//关系-----竖井下的业务空间,竖井一对多,此方法会覆盖以前的记录
+export function shaftZoneLink(param, success) {
+    let url = `${baseUrl}/datacenter/sh-contain-sp-base/link-shsps-replace?BuildingId=${param.BuildingId}&FloorId=${param.FloorId}&Type=${param.Type}`;
+    http.postJson(url, param.data, success)
+}
 
 /**系统集成成果管理 */
 //系统集成统计条形图

+ 15 - 2
src/components/ledger/lib/cenoteGraphy.vue

@@ -20,7 +20,7 @@ import canvasFun from "@/components/business_space/newGraphy/canvasFun";
 import { SColor, SPoint } from "@saga-web/draw/lib";
 import { DivideFloorScene, SpaceItem, ZoneItem } from "@saga-web/cad-engine/lib";
 import { FloorView } from "@saga-web/cad-engine/lib/FloorView";
-import { getFloorMsgByFloorID, queryZone, shaftSpaceQuery } from '@/api/scan/request';
+import { getFloorMsgByFloorID, queryZone, shaftSpaceQuery, shaftZoneLink } from '@/api/scan/request';
 import { resolve, reject } from 'q';
 const colorArr = [
   "#fed44c",
@@ -208,7 +208,20 @@ export default {
     },
     //保存编辑
     saveEdit(){
-
+      let param = {
+        BuildingId:this.buildingData[0],
+        FloorId:this.buildingData[1],
+        Type:this.space,
+        data:{
+          ShaftId:this.$route.query.ShaftId,
+          SpaceIdList:this.relatedSpaceIdList
+        }
+      }
+      shaftZoneLink(param, res => {
+        if(res.Result == "success"){
+          this.$message.success("保存成功")
+        }
+      })
     },
     //是否可点
     setSelectAble(val) {

+ 7 - 5
src/views/data_admin/buildGraphy/graphyTabs.vue

@@ -6,13 +6,15 @@ getLocation 定位
     <div id="graphy-tabs">
         <el-tabs style="height:100%;" v-model="activeName2" type="card" @tab-click="handleClick">
             <el-tab-pane label="本层的点位标签" name="point" style="height:100%">
-                <el-scrollbar style="height:100%;"  v-if="pointData.length" v-loading="isLoading">
+                <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>{{item.Name}}</span>
-                            <el-button size="mini" @click="getDetails(item)">编辑点位标签</el-button>
-                            <el-button :disabled="!map" size="mini" @click="btnClick(item)">
-                                {{ item.X == 0 && item.Y == 0 ? '插旗' : '定位'}}</el-button>
+                            <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="getDetails(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>
+                            </div>
                         </div>
                     </div>
                 </el-scrollbar>

+ 8 - 1
src/views/ledger/cenotelist/relatedSpace.vue

@@ -59,6 +59,7 @@ import relatedSpaceList from "@/views/ledger/cenotelist/relatedSpaceList";
 import addSpaceDialog from '@/components/ledger/cenote/dialog/addSpaceDialog';
 import { queryDictionaryHead, buildingQuery, shaftSpaceTypeQuery, shaftSpaceBuildingQuery } from '@/api/scan/request';
 import cenoteGraphy from '@/components/ledger/lib/cenoteGraphy'
+import { mapGetters } from 'vuex'
 export default {
   data() {
     return {
@@ -79,7 +80,8 @@ export default {
   computed: {
     cenoteObj() {
       return this.$route.query;
-    }
+    },
+    ...mapGetters("layout", ["projectId"])
   },
   props: {
 
@@ -281,6 +283,11 @@ export default {
       handler(val) {
         this.$refs.cenotegraphy.setSelectAble(val);
       }
+    },
+    projectId:{
+      handler(val){
+        this.goBack();
+      }
     }
   }
 }