Procházet zdrojové kódy

竖井台账修改

LXXXY před 5 roky
rodič
revize
ab0dd174e2

+ 23 - 24
src/components/ledger/lib/cenoteGraphy.vue

@@ -20,18 +20,9 @@ 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 { colorArr } from '@/utils/spaceColor';
 import { getFloorMsgByFloorID, queryZone, shaftSpaceQuery, shaftZoneLink } from '@/api/scan/request';
 import { resolve, reject } from 'q';
-const colorArr = [
-  "#fed44c",
-  "#3485d6",
-  "#a384fc",
-  "#4caf50",
-  "#ff6316",
-  "#fd8bbe",
-  "#03a9f3",
-  "#ea615b"
-];
 export default {
   data() {
     return {
@@ -177,7 +168,8 @@ export default {
         this.scene.zoneList.map(t => {
           t.selected = false;
           if (this.relatedSpaceIdList.indexOf(t.data.RoomID) != -1) {
-            t.selected = true;
+            // t.selected = true;
+            t.highLightFlag = true;
           }
         })
         this.canvasLoading = false;
@@ -188,14 +180,11 @@ export default {
       if (item.selectable) {
         if (this.selectAble) {
           if (this.relatedSpaceIdList.indexOf(item.data.RoomID) != -1) {
-            item.highLightFlag = false;
             this.relatedSpaceIdList = this.relatedSpaceIdList.filter(t => { return t != item.data.RoomID });
           }
           else {
-            item.highLightFlag = true;
             this.relatedSpaceIdList.push(item.data.RoomID);
           }
-          console.log(this.relatedSpaceIdList.length);
         }
         else {
           item.selected = !item.selected;
@@ -203,23 +192,24 @@ export default {
       }
     },
     //取消编辑
-    cancelEdit(){
+    cancelEdit() {
       this.getBusinessSpace();
     },
     //保存编辑
-    saveEdit(){
+    saveEdit() {
       let param = {
-        BuildingId:this.buildingData[0],
-        FloorId:this.buildingData[1],
-        Type:this.space,
-        data:{
-          ShaftId:this.$route.query.ShaftId,
-          SpaceIdList:this.relatedSpaceIdList
+        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("保存成功")
+        if (res.Result == "success") {
+          this.$message.success("保存成功");
+          this.getBusinessSpace();
         }
       })
     },
@@ -227,6 +217,15 @@ export default {
     setSelectAble(val) {
       if (this.scene) {
         this.selectAble = val && !this.$route.query.onlyRead;
+        if (this.selectAble) {
+          this.scene.zoneList.map(t => {
+            t.highLightFlag = false;
+            t.selected = false;
+            if (this.relatedSpaceIdList.indexOf(t.data.RoomID) != -1) {
+              t.selected = true;
+            }
+          })
+        }
       }
     },
     // 清除canvas

+ 46 - 28
src/views/data_admin/buildGraphy/createPointZone.vue

@@ -10,16 +10,16 @@
           <span>基本信息:</span>
           <div>
             <label><span style="color:red;">*</span>业务空间名称</label>
-            <el-input placeholder="请输入业务空间名称" v-model="zoneName" clearable style="width:215px;margin-right:10px;"></el-input>
+            <el-input placeholder="请输入业务空间名称" v-model="zoneObj.RoomLocalName" clearable style="width:215px;margin-right:10px;"></el-input>
             <label>业务空间编码</label>
-            <el-input placeholder="请输入业务空间编码" v-model="zoneLocalId" clearable style="width:215px;margin-right:10px;"></el-input>
+            <el-input placeholder="请输入业务空间编码" v-model="zoneObj.RoomLocalID" clearable style="width:215px;margin-right:10px;"></el-input>
           </div>
           <div>
             <label><span style="color:red;">*</span>所属建筑楼层</label>
             <el-cascader placeholder='请选择' :options="options" @change="changeFloor" :props="floorProps" filterable ref="buildfloor"
               style="width:215px;margin-right:10px;"></el-cascader>
             <label><span style="color:red;">*</span>业务空间类型</label>
-            <el-select v-model="space" placeholder="请选择空间" style="width:215px;margin-right:10px;">
+            <el-select v-model="space" placeholder="请选择空间" style="width:215px;margin-right:10px;" @change="changeSpace">
               <el-option v-for="item in spaceList" :key="item.Code" :label="item.Name" :value="item.Code">
               </el-option>
             </el-select>
@@ -27,24 +27,16 @@
         </div>
         <div class="item">
           <span>其它可补充信息:</span>
-          <i style="cursor: pointer;" :class="showEx" @click="showEx = (showEx == 'el-icon-arrow-up' ? 'el-icon-arrow-down' : 'el-icon-arrow-up')"></i>
-          <div v-show="showEx == 'el-icon-arrow-up'">
-            <div class="suppMsg">
-              <label>使用面积:</label>
-              <el-input placeholder="请输入使用面积" v-model="zoneName" clearable style="width:215px;margin-right:10px;"></el-input>
+          <i style="cursor: pointer;" :class="showEx"
+            @click="showEx = (showEx == 'el-icon-arrow-up' ? 'el-icon-arrow-down' : 'el-icon-arrow-up')"></i>
+          <div v-show="showEx == 'el-icon-arrow-up'" v-loading="loadingOtherMsg">
+            <div v-if="otherList.length">
+            <div class="suppMsg" v-for="(item, key) in otherList" :key="key" >
+              <label>{{item.InfoPointName}}:</label>
+              <el-input :placeholder="`请输入${item.InfoPointName}`" v-model="otherMsg[item.InfoPointCode]" clearable style="width:215px;margin-right:10px;"></el-input>
             </div>
-            <div class="suppMsg" >
-              <label>备注文字:</label>
-              <el-input placeholder="请输入备注文字" v-model="zoneName" clearable style="width:215px;margin-right:10px;"></el-input>
-            </div>
-            <div class="suppMsg" >
-              <label>所属租户:</label>
-              <el-input placeholder="请输入所属租户" v-model="zoneName" clearable style="width:215px;margin-right:10px;"></el-input>
-            </div>
-            <div class="suppMsg" >
-              <label>配电容量:</label>
-              <el-input placeholder="请输入配电容量" v-model="zoneName" clearable style="width:215px;margin-right:10px;"></el-input>
             </div>
+            <p v-else>请选择业务空间类型</p>
           </div>
         </div>
         <div class="item">
@@ -58,7 +50,7 @@
 
 <script>
 import locationPointMsg from '@/views/data_admin/buildGraphy/locationPointMsg'
-import { queryDictionaryHead } from '@/api/scan/request';
+import { queryDictionaryHead, getDataDictionary } from '@/api/scan/request';
 import { mapGetters } from 'vuex'
 export default {
   data() {
@@ -75,6 +67,15 @@ export default {
       zoneName: '',//业务空间名称
       zoneLocalId: '',//业务空间编码
       showEx: 'el-icon-arrow-down',//下拉菜单
+      zoneObj: {
+        RoomLocalID: '',//业务空间本地编码
+        RoomLocalName:'',//业务空间名称
+      },
+      otherMsg:{//其他可补充信息
+
+      },
+      otherList:[],//可补充信息list
+      loadingOtherMsg:false,
     }
   },
   computed: {
@@ -89,12 +90,10 @@ export default {
   created() {
     this.options = this.$route.params.floorData
     this.getSpaceList();
-    console.log(this.$route.params.item)
-    console.log(this.$route.params.floorData)
   },
   methods: {
     //创建
-    createZone(){
+    createZone() {
       let param = {
 
       }
@@ -112,11 +111,30 @@ export default {
     changeFloor(val) {
 
     },
+    //选择业务空间
+    changeSpace(val) {
+      this.space = val;
+      let pa = {
+        type: this.space,
+        data: {
+          "Orders": "sort asc", "PageNumber": 1, "PageSize": 500
+        }
+      };
+      this.loadingOtherMsg = true;
+      getDataDictionary(pa, res => {
+        this.loadingOtherMsg = false;
+        this.otherMsg = {}
+        this.otherList = res.Content;
+        res.Content.map(item => {
+          this.otherMsg[item.InfoPointCode] = '';
+        })
+      })
+    },
     //返回
     goBack() {
       this.$router.push({
         name: "buildGraphy",
-        params:{nowBuildFloor: this.$route.params.nowBuildFloor}
+        params: { nowBuildFloor: this.$route.params.nowBuildFloor }
       })
     }
   },
@@ -159,11 +177,11 @@ export default {
   label {
     display: inline-block;
     padding: 5px 10px;
-    width:100px;
+    width: 130px;
   }
 }
-.suppMsg{
-  display:inline-block;
-  position:relative;
+.suppMsg {
+  display: inline-block;
+  position: relative;
 }
 </style>

+ 19 - 24
src/views/data_admin/buildGraphy/graphyTabs.vue

@@ -30,9 +30,9 @@ getLocation 定位
           <div v-for="(item,index) in pointNoData" :key="index">
             <div class="point">
               <span>{{item.Name}}</span>
-              <el-button @click="getDetails(item)">编辑点位标签</el-button>
-              <el-button :disabled="!(item.X == 0 && item.Y == 0)" @click="btnClick(item)">
-                {{ item.X == 0 && item.Y == 0 ? '插旗' : '定位'}}</el-button>
+              <el-button size="mini" @click="getDetails(item)" icon="el-icon-edit-outline"></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>
@@ -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>
@@ -260,6 +260,7 @@ export default {
         confirmButtonText: '更新',
         cancelButtonText: '创建'
       }).then(() => {
+        this.$emit("closeCanvas")
         this.$router.push({
           name: 'updateLocationPointZone',
           params: { item: item, floorData: this.floorOption, nowBuildFloor: this.buildingData }
@@ -336,29 +337,23 @@ export default {
     getPointList() {
       if (this.buildingData[0] && this.buildingData[1]) {
         let param = {
-          Filters: `BuildId='${this.buildingData[0]}';floorId='${this.buildingData[1]}'`,
-          "Cascade": [{ "Name": "imageList" }]
-        };
-        // console.log(param)
-        //当index为1时FloorId为空
+            Filters: `BuildId='${this.buildingData[0]}';floorId='${this.buildingData[1]}'`,
+            "Cascade": [{ "Name": "imageList" }]
+          };
         if (this.index == "1") {
-          // param.FloorId = "";
+          param.Filters =  `BuildId='${this.buildingData[0]}';floorId isNull`
         }
         this.isLoading = true;
         locationPointQuery(param, res => {
           this.isLoading = false;
-          console.log(res)
-          // res.data.PointList.splice(0, 1);
-          this.pointData = res.Content;
+          if (this.index == "1") {
+            this.pointNoData = res.Content;
+          }
+          else {
+            this.pointData = res.Content;
+          }
           this.$emit("getPointList", res.Content);
-          // if (this.index == "1") {
-          //     this.pointNoData = res.data.PointList;
-          // } else {
-          //     this.$emit("getPointList", res.data.PointList);
-          //     this.pointData = res.data.PointList;
-          // }
         })
-
       }
     },
     //初始化

+ 5 - 1
src/views/data_admin/buildGraphy/index.vue

@@ -15,7 +15,7 @@
         <graphy-canvas v-if="show" @getDetails="getDetails" @resetPoint="resetPoint" ref="canvas"></graphy-canvas>
       </div>
       <div class="graphy-right">
-        <graphy-tabs v-show="show" ref="tabs" :floorOption="options" :pointParam="pointParam" @setFalg="setFalg" @getLocation="getLocation" @getPointList="sendPointList">
+        <graphy-tabs v-show="show" ref="tabs" :floorOption="options" :pointParam="pointParam" @setFalg="setFalg" @getLocation="getLocation" @getPointList="sendPointList" @closeCanvas="closeCanvas">
         </graphy-tabs>
       </div>
     </div>
@@ -177,6 +177,10 @@ export default {
     //查看详情
     getDetails(item) {
       this.$refs.tabs.getDetails(item);
+    },
+    //关闭canvas
+    closeCanvas(){
+      this.show = false;
     }
   },
   watch: {

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

@@ -7,7 +7,7 @@
     </div>
     <div style="padding:5px 10px;">
       <p>勾选需要补充到业务空间的图片信息</p>
-      <div v-if="pointObj.ImageList.length">
+      <div v-if="pointObj.ImageList && pointObj.ImageList.length">
         <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange"><span style="padding-left:20px">全选</span></el-checkbox>
         <div style="margin: 15px 0;"></div>
         <el-checkbox-group v-model="choImg" @change="handleCheckedCitiesChange">
@@ -48,8 +48,8 @@ export default {
     //选中
     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.pointObj.ImageList;
+      this.isIndeterminate = checkedCount > 0 && checkedCount < this.pointObj.ImageList.length && this.pointObj.ImageList;
     },
     //获取选中的图片
     getChoImg(){

+ 3 - 0
src/views/ledger/cenotelist/relatedSpace.vue

@@ -361,6 +361,9 @@ export default {
 .data-item {
   height: calc(100% - 44px);
   padding: 10px 0px;
+  /deep/ .el-scrollbar__wrap .is-horizontal{
+    display:none
+  }
 }
 .floor-item {
   padding: 10px 10px;