Pārlūkot izejas kodu

竖井台账平面图展示

haojianlong 4 gadi atpakaļ
vecāks
revīzija
f464df60d2

+ 3 - 3
src/components/ledger/cenote/elevationMap.vue

@@ -139,7 +139,7 @@
       let params = {
         type: this.params.objectType,
         data: {
-          shaftId: this.params.ShaftId,
+          shaftId: this.params.shaftId,
           spaceIdList: this.checkedList.map(item => {
             return item.RoomID
           })
@@ -153,7 +153,7 @@
   },
   watch: {
     projectId() {
-      if (this.params.BuildingId && this.params.ObjectType && this.params.ShaftId) {
+      if (this.params.buildingId && this.params.objectType && this.params.shaftId) {
         this.init();
       }
       console.log(this.projectId)
@@ -165,7 +165,7 @@
     // },
     params: {
       handler() {
-        if (this.params.BuildingId && this.params.ObjectType && this.params.ShaftId) {
+        if (this.params.buildingId && this.params.objectType && this.params.shaftId) {
           this.init();
         }
       },

+ 23 - 30
src/components/ledger/cenote/relatedSpaceList.vue

@@ -5,25 +5,25 @@
         <i slot="suffix" class="el-input__icon el-icon-search" @click="getSpaceList"></i>
       </el-input>
       <label style="line-height:32px;padding: 0 10px;">所属建筑楼层:</label>
-      <el-cascader v-model="Buildfloor" :options="buildingData" @change="handleChange"></el-cascader>
+      <el-cascader v-model="Buildfloor" :options="buildingData" :props="{value: 'id', label: 'localName', children: 'floor'}" @change="handleChange"></el-cascader>
     </div>
     <div class="table-area" style="height:calc(100% - 52px)">
       <el-table :data="tableData" style="width: 100%;height:calc(100% - 48px);" v-loading="loading" :header-cell-style="headerStyle">
         <el-table-column label='业务空间建筑楼层' show-overflow-tooltip min-width="200" header-align='center' align="center">
           <template slot-scope="scope">
-            {{ scope.row.BuildingId && floorType[scope.row.BuildingId]? ((floorType[scope.row.BuildingId] || '') + (scope.row.FloorId && floorType[scope.row.FloorId] ? (' - ' + floorType[scope.row.FloorId] || '') : '')) : ''}}
+            {{ scope.row.buildingId && floorType[scope.row.buildingId]? ((floorType[scope.row.buildingId] || '') + (scope.row.floorId && floorType[scope.row.floorId] ? (' - ' + floorType[scope.row.floorId] || '') : '')) : ''}}
           </template>
         </el-table-column>
         <el-table-column label='业务空间类型' show-overflow-tooltip min-width="200" header-align='center' align="center">
           <template slot-scope="scope">
-            {{spaceType[scope.row.ObjectType] || ''}}
+            {{spaceType[scope.row.classCode] || ''}}
           </template>
         </el-table-column>
-        <el-table-column prop='RoomLocalName' label='业务空间本地名称' show-overflow-tooltip min-width="200" header-align='center' align="center">
+        <el-table-column prop='localName' label='业务空间本地名称' show-overflow-tooltip min-width="200" header-align='center' align="center">
         </el-table-column>
         <el-table-column prop='localId' label='业务空间本地编码' show-overflow-tooltip min-width="200" header-align='center' align="center">
         </el-table-column>
-        <el-table-column v-if="!$route.query.onlyRead" prop='' label='操作' show-overflow-tooltip min-width="90" header-align='center' align='center'>
+        <el-table-column v-if="!$route.query.onlyRead" label='操作' show-overflow-tooltip min-width="90" header-align='center' align='center'>
           <template slot-scope="scope">
             <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain icon="el-icon-delete"></el-button>
           </template>
@@ -140,37 +140,30 @@ export default {
       if (val && val.length) {
         let bL = val.concat();
         bL.map(item => {
-          item.value = item.id;
-          item.label = item.localName;
-          item.children = [];
-          if (item.floor instanceof Array) {
-            item.children = item.floor.map(fitem => {
-              fitem.value = fitem.id
-              fitem.label = fitem.localName
-              return fitem
-            })
+          if (item.floor && item.floor.length) {
+
+          } else {
+            item.floor = []
           }
           if (!this.$route.query.onlyRead) {
-            item.children.unshift({
-              value: "noKnow",
-              label: "未明确建筑"
+            item.floor.unshift({
+              id: "noKnow",
+              localName: "未明确建筑"
+            },{
+              id: "all",
+              localName: "全部"
             })
+            bL.unshift({
+              id: "all",
+              localName: "全部"
+            }, {
+              id: "noKnow",
+              localName: "未明确建筑"
+            });
           }
-          item.children.unshift({
-            value: "all",
-            label: "全部"
-          })
         });
-        if (!this.$route.query.onlyRead) {
-          bL.unshift({
-            value: "all",
-            label: "全部"
-          }, {
-            value: "noKnow",
-            label: "未明确建筑"
-          });
-        }
         this.buildingData = bL;
+        console.log(this.buildingData);
       }
       else {
         this.buildingData = [];

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

@@ -185,8 +185,8 @@ export default {
               OutLine: t.outline,
               RoomID: t.id,
               Color: colorArr[i % colorArr.length],
-              HighLightFlag: relatedZone.findIndex((item) => (item.RoomID == t.RoomID)) > -1,
-              Transparency: relatedZone.findIndex((item) => (item.RoomID == t.RoomID)) > -1 ? 20 : 1
+              HighLightFlag: relatedZone.findIndex((item) => (item.id == t.id)) > -1,
+              Transparency: relatedZone.findIndex((item) => (item.id == t.id)) > -1 ? 20 : 1
             }
           } else {
             return undefined

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

@@ -292,7 +292,7 @@ export default {
       this.floor = '';
       this.buildingList = [];
       this.building = '';
-      this.changeFloor({ FloorID: '' });
+      this.changeFloor({ id: '' });
       this.loadBuildingData();
       this.calculateRelation();
     },
@@ -345,7 +345,7 @@ export default {
     //更换列表或平面图
     changeRadio(val) {
       if (val == 2) {
-        this.spaceList.unshift({ Code: '', Name: '全部' });
+        this.spaceList.unshift({ code: '', name: '全部' });
       }
       if (val == 1) {
         if (this.spaceList.length > 0) {
@@ -353,7 +353,8 @@ export default {
         }
       }
       if (this.spaceList.length) {
-        this.changeSpace(this.spaceList[0].Code);
+        this.changeSpace(this.spaceList[0].code);
+        this.space = [this.spaceList[0].code]
       }
       this.isMyTab = val;
     },