zhulizhen1111 4 years ago
parent
commit
35f58070f9

+ 31 - 18
src/components/Legend/src/legend.vue

@@ -77,7 +77,7 @@
         <div class='select-floor' v-if='isFloor'>
         <div class='select-floor' v-if='isFloor'>
             <p class='p1'>请选择需要创建“消防泵房引出管路分布图”的楼层</p>
             <p class='p1'>请选择需要创建“消防泵房引出管路分布图”的楼层</p>
             <p class='p2'>
             <p class='p2'>
-                <Select width='240' tipPlace='top' caption='楼层:' size='mini' :selectdata='floorSelectAble' :placeholder='"请选择"'></Select>
+                <Select width='240' tipPlace='top' v-model='floor' caption='楼层:' size='mini' :selectdata='floorSelectAble' :placeholder='"请选择"'></Select>
             </p>
             </p>
             <p class='p3'>
             <p class='p3'>
                 <span @click='cancel'>取消</span>
                 <span @click='cancel'>取消</span>
@@ -117,7 +117,9 @@ export default {
             editSwitch: false,
             editSwitch: false,
             isFloor: false,
             isFloor: false,
             editPmt: true, //是否有跳转道图例库的权限
             editPmt: true, //是否有跳转道图例库的权限
-            floorSelectAble: []
+            floorSelectAble: [],
+            floor: '', //传的楼层
+            floorName: ''
         }
         }
     },
     },
     computed: {
     computed: {
@@ -137,21 +139,19 @@ export default {
         systemName: {
         systemName: {
             default: '',
             default: '',
             type: String
             type: String
+        },
+        categoryId: {
+            default: '',
+            type: String
         }
         }
     },
     },
     components: { lengendView, legendRemarks, lengendEdit },
     components: { lengendView, legendRemarks, lengendEdit },
     methods: {
     methods: {
         formatFloor() {
         formatFloor() {
             this.floorSelectAble = []
             this.floorSelectAble = []
-            this.floorSelect.forEach(el => {
-                this.floors.forEach(ele => {
-                    if (el.id == ele.gname) {
-                        this.floorSelectAble.push({
-                            id: ele.gname,
-                            name: ele.code
-                        })
-                    }
-                })
+            this.floorSelectAble =  this.floorSelect.filter(item=>{
+                const hit = this.floors.find(i => i.gname == item.id)
+                return !hit
             })
             })
             console.log(this.floorSelectAble)
             console.log(this.floorSelectAble)
         },
         },
@@ -163,7 +163,7 @@ export default {
         // 查询备注
         // 查询备注
         queryMarks() {
         queryMarks() {
             let postParams = {
             let postParams = {
-                categoryId: this.$cookie.get('categoryId'),
+                categoryId: this.categoryId ? this.categoryId : this.$cookie.get('categoryId'),
                 projectId: this.$store.state.plazaId,
                 projectId: this.$store.state.plazaId,
                 BuildingID: '1',
                 BuildingID: '1',
                 FloorID: this.$cookie.get('floorNow')
                 FloorID: this.$cookie.get('floorNow')
@@ -210,14 +210,23 @@ export default {
          * @description t跳转editer编辑器
          * @description t跳转editer编辑器
          */
          */
         goToEditer() {
         goToEditer() {
-            let FloorID = this.$cookie.get('floorMapId') || 'f1'
-            let categoryId = this.$cookie.get('categoryId')
+            if (this.floor) {
+                this.floorSelect.forEach(el=>{
+                    if(el.id==this.floor){
+                        this.floorName = el.name
+                    }
+                })
+                console.log(this.floorName)
+            }
+        
+            let FloorID = this.floor ? this.floor : this.$cookie.get('floorMapId') || 'f1'
+            let categoryId = this.categoryId ? this.categoryId : this.$cookie.get('categoryId')
             const { conf } = window.__systemConf,
             const { conf } = window.__systemConf,
                 { editerUrl } = conf
                 { editerUrl } = conf
-            let data = `categoryId=${categoryId}&projectId=${this.plazaId}&BuildingID=1&FloorID=${FloorID}&FloorName=${this.$cookie.get(
-                'floorNow'
-            )}&fmapID=${this.fmapID}`
+            let floorName = this.floorName ? this.floorName : this.$cookie.get('floorNow')
+            let data = `categoryId=${categoryId}&projectId=${this.plazaId}&BuildingID=1&FloorID=${FloorID}&FloorName=${floorName}&fmapID=${this.fmapID}`
             let url = editerUrl + 'editer?' + encodeURIComponent(data)
             let url = editerUrl + 'editer?' + encodeURIComponent(data)
+            console.log(data)
             window.open(url, true)
             window.open(url, true)
         },
         },
         isShow2() {
         isShow2() {
@@ -309,11 +318,15 @@ export default {
         // 新增楼层确定
         // 新增楼层确定
         determine() {
         determine() {
             this.isFloor = false
             this.isFloor = false
+            this.goToEditer()
         }
         }
     },
     },
     mounted() {
     mounted() {
+        console.log(this.floors)
+        console.log(this.floorSelect)
         if (this.floors.length > 0) {
         if (this.floors.length > 0) {
-            this.formatFloor()
+            debugger
+             this.formatFloor()
         }
         }
     }
     }
 }
 }

+ 2 - 2
src/utils/plugins/components.js

@@ -111,7 +111,7 @@ var system = [
                         {
                         {
                             label: "分水器支路分布图",
                             label: "分水器支路分布图",
                             id: "NTYL4",
                             id: "NTYL4",
-                            param: { tab_code: "1542", type_code: "FBT" },
+                            param: { tab_code: "1542", type_code: "FBT1" },
                         },
                         },
                     ],
                     ],
                 },
                 },
@@ -221,7 +221,7 @@ var system = [
                         {
                         {
                             label: "消防泵房引出管路分布图",
                             label: "消防泵房引出管路分布图",
                             id: "XFYL5",
                             id: "XFYL5",
-                            param: { type_code: "FBT" },
+                            param: { type_code: "FBT2" },
                         },
                         },
                     ],
                     ],
                     id: "XFYL",
                     id: "XFYL",

+ 3 - 3
src/views/equipment/eqDialog.vue

@@ -58,7 +58,7 @@
                                     :key='index1+index'
                                     :key='index1+index'
                                     :label='`${value.label}`'
                                     :label='`${value.label}`'
                                     :name='`${value.param.type_code}`'
                                     :name='`${value.param.type_code}`'
-                                    v-if='value.id.slice(2,4)=="YL" && eve.count>0 && value.param.type_code!="FBT"'
+                                    v-if='value.id.slice(2,4)=="YL" && eve.count>0 && value.param.type_code.slice(0,3)!="FBT"'
                                 >
                                 >
                                     <!-- 有tab的原理图 -->
                                     <!-- 有tab的原理图 -->
                                     <div style='width:100%;height:600px;overflow:hidden'>
                                     <div style='width:100%;height:600px;overflow:hidden'>
@@ -70,9 +70,9 @@
                                     :key='index1+index'
                                     :key='index1+index'
                                     :label='`${value.label}`'
                                     :label='`${value.label}`'
                                     :name='`${value.param.type_code}`'
                                     :name='`${value.param.type_code}`'
-                                    v-if='value.id.slice(2,4)=="YL" && value.param.type_code=="FBT"'
+                                    v-if='value.id.slice(2,4)=="YL" && value.param.type_code.slice(0,3)=="FBT"'
                                 >
                                 >
-                                    <fenbuPic ref='fenbutu'></fenbuPic>
+                                    <fenbuPic ref='fenbutu' :typecode='value.param.type_code'></fenbuPic>
                                 </el-tab-pane>
                                 </el-tab-pane>
                             </template>
                             </template>
                         </template>
                         </template>

+ 12 - 4
src/views/equipment/fenbuPic.vue

@@ -2,11 +2,11 @@
     <div class='fenbu-box'>
     <div class='fenbu-box'>
         <!-- 图例 -->
         <!-- 图例 -->
         <div class='legend-boxs'>
         <div class='legend-boxs'>
-            <Legend :floors='floors' type='0'></Legend>
+            <Legend :floors='floors' type='0' :categoryId='`${typecode=="FBT1"?"FZQZL":"XFBFYCFL"}`'></Legend>
         </div>
         </div>
         <floor-list v-if='floors.length>0' :floorsArr='floors' :type='1' @emitFloor='emitFloor' :id='"floor"'></floor-list>
         <floor-list v-if='floors.length>0' :floorsArr='floors' :type='1' @emitFloor='emitFloor' :id='"floor"'></floor-list>
-        <div>
-            <floorMap ref='floorMap' :loadName='""' :type='"floor"'></floorMap>
+        <div v-if='floors.length>0'>
+            <floorMap ref='floorMap' :loadName='""' :categoryId='`${typecode=="FBT1"?"FZQZL":"XFBFYCFL"}`' :type='"floor"'></floorMap>
         </div>
         </div>
         <div class='nodata' v-show='floors.length==0'>
         <div class='nodata' v-show='floors.length==0'>
             <img class='img1' src='@/assets/imgs/wtp.png' alt />
             <img class='img1' src='@/assets/imgs/wtp.png' alt />
@@ -33,6 +33,7 @@ export default {
             floors: []
             floors: []
         }
         }
     },
     },
+    props: ['typecode'],
     computed: {
     computed: {
         ...mapGetters(['floorsArr'])
         ...mapGetters(['floorsArr'])
     },
     },
@@ -48,11 +49,17 @@ export default {
         getFloorData() {
         getFloorData() {
             let postParams = {
             let postParams = {
                 Distinct: true,
                 Distinct: true,
-                Filters: `projectId =${this.$store.state.plazaId};categoryId='LCGN' or categoryId='XFBFYCFL';isPub=true`,
+                Filters: `projectId =${this.$store.state.plazaId};categoryId='XTYLT';isPub=true`,
                 PageNumber: 1,
                 PageNumber: 1,
                 PageSize: 500,
                 PageSize: 500,
                 Projection: ['floorId']
                 Projection: ['floorId']
             }
             }
+            if (this.typecode == 'FBT1') {
+                postParams.Filters = `projectId =${this.$store.state.plazaId};categoryId='FZQZL';isPub=true`
+            }
+            if (this.typecode == 'FBT2') {
+                postParams.Filters = `projectId =${this.$store.state.plazaId};categoryId='XFBFYCFL';isPub=true`
+            }
             let floor = []
             let floor = []
             queryPics({ postParams }).then(res => {
             queryPics({ postParams }).then(res => {
                 console.log(res)
                 console.log(res)
@@ -77,6 +84,7 @@ export default {
                 }
                 }
                 console.log(this.floors)
                 console.log(this.floors)
                 this.floorInfo = this.floors[0]
                 this.floorInfo = this.floors[0]
+                console.log(this.floorInfo.gname)
                 this.$refs.floorMap.init(this.floorInfo.gname)
                 this.$refs.floorMap.init(this.floorInfo.gname)
                 this.init()
                 this.init()
             })
             })

+ 2 - 2
src/views/equipment/index.vue

@@ -25,9 +25,9 @@
                     </div>
                     </div>
                     <div class='eq-content'>
                     <div class='eq-content'>
                         <div class='legend-boxs'>
                         <div class='legend-boxs'>
-                            <Legend :systemName='systemName' :floors='floorsArr' type='1'></Legend>
+                            <Legend :systemName='systemName' :categoryId='categoryId' :floors='floorsArr' type='1'></Legend>
                         </div>
                         </div>
-                        <floorMap ref='floorMap' :id='"equip"' :loadName='loadName' :type='"system"'></floorMap>
+                        <floorMap ref='floorMap' :id='"equip"' :loadName='loadName' :categoryId='categoryId' :type='"system"'></floorMap>
                         <div class='additional-box' v-if='fqPic.length>0'>
                         <div class='additional-box' v-if='fqPic.length>0'>
                             <div class='additional' @click='additionalColl'>
                             <div class='additional' @click='additionalColl'>
                                 <img src='../../assets/imgs/bg.png' alt />
                                 <img src='../../assets/imgs/bg.png' alt />