Browse Source

'合并代码,解决冲突'

zhangyu 4 years ago
parent
commit
6169b3ca47

+ 5 - 5
package.json

@@ -11,11 +11,11 @@
     },
     "dependencies": {
         "@mapbox/geojson-merge": "^1.1.1",
-        "@saga-web/base": "2.1.24",
-        "@saga-web/big": "1.0.95",
-        "@saga-web/draw": "2.1.105",
-        "@saga-web/feng-map": "1.0.29",
-        "@saga-web/graph": "2.1.117",
+        "@saga-web/base": "2.1.25",
+        "@saga-web/big": "1.0.102",
+        "@saga-web/draw": "2.1.106",
+        "@saga-web/feng-map": "1.0.35",
+        "@saga-web/graph": "2.1.119",
         "ant-design-vue": "^1.4.10",
         "axios": "^0.19.2",
         "core-js": "^3.4.4",

File diff suppressed because it is too large
+ 33 - 4
public/index.html


+ 3 - 3
src/components/404.vue

@@ -4,15 +4,15 @@
       <img src="@/assets/imgs/dlsb.png" alt />
     </div>
     <div class="not-text" v-if="isrequestAuth=='err'">
-      <span>您的权限不足……</span>
-      <span>建议您联系管理员开通管理说明书相关权限</span>
+      <span>您的权限不足或登陆已失效</span>
+      <span>请联系管理员开通管理说明书相关权限,若已有权限请刷新!</span>
     </div>
     <div class="not-text" v-else>
       <span>您的访问出错了!</span>
       <span>建议您稍后再试,或直接联系管理员解决</span>
     </div>
     <div class="not-button" @click="goLogin">
-      <span>关闭页面</span>
+      <span>刷新页面</span>
     </div>
   </div>
 </template>

+ 33 - 11
src/components/Legend/src/legend.vue

@@ -37,7 +37,13 @@
         </div>
 
         <!-- 单独展示新增分布图 -->
-        <el-tooltip effect='dark' v-if='floors.length==0' content='新增分布图' placement='left'>
+        <el-tooltip
+            v-show='permissions ? permissions.includes("GLSMS_PLANARGRAPH_MANAGE"):false'
+            effect='dark'
+            v-if='floors.length==0'
+            content='新增分布图'
+            placement='left'
+        >
             <div class='edit_map1' @click='addFloor'>
                 <!-- <p class='tltk' style='margin-left: -5px;'> -->
                 <img src='@/assets/imgs/bjj.png' alt />
@@ -58,7 +64,13 @@
                 <!-- </p> -->
             </el-tooltip>
             <!-- 新增分布图 -->
-            <el-tooltip effect='dark' content='新增分布图1' placement='left' v-if='floorSelect.length!=floors.length && type==0'>
+            <el-tooltip
+                v-show='permissions ? permissions.includes("GLSMS_PLANARGRAPH_MANAGE"):false'
+                effect='dark'
+                content='新增分布图1'
+                placement='left'
+                v-if='floorSelect.length!=floors.length && type==0'
+            >
                 <p class='tltk' style='margin-left: -5px;' @click='addFloor'>
                     <img src='@/assets/imgs/bjj.png' alt />
                 </p>
@@ -66,13 +78,8 @@
             <!-- 编辑分布图 -->
 
             <!-- 有修改权限 -->
-            <el-tooltip
-                class='bjpmt'
-                effect='dark'
-                :content='editTips?editTips:`编辑${categoryId=="FZQZL"?"分水器支路分布图":"消防泵房引出管路分布图"}`'
-                placement='left'
-            >
-                <span v-show="permissions ? permissions.includes('GLSMS_PLANARGRAPH_MANAGE'):false" class='edit-icon corner-con' @click='goToEditer'>
+            <el-tooltip class='bjpmt' effect='dark' :content='editTips?editTips:`编辑${categoryId=="FZQZL"?"分水器支路分布图":"消防泵房引出管路分布图"}`' placement='left'>
+                <span v-show='permissions ? permissions.includes("GLSMS_PLANARGRAPH_MANAGE"):false' class='edit-icon corner-con' @click='goToEditer'>
                     <img src='@/assets/imgs/bjs.png' alt />
                     <!-- 角标 -->
                     <!-- <span v-if='draftNum' class='corner' :style='{lineHeight : draftNum > 99 ?"10px":"18px"}'>{{draftNum > 99 ? '...' : draftNum}}</span> -->
@@ -130,13 +137,25 @@ export default {
         }
     },
     computed: {
-        ...mapGetters(['planNum', 'typeNum', 'plazaId', 'fmapID', 'floorSelect', 'isMessage', 'ssoToken', 'showView', 'legendTable','permissions']),
+        ...mapGetters([
+            'planNum',
+            'typeNum',
+            'remarksText',
+            'plazaId',
+            'fmapID',
+            'floorSelect',
+            'isMessage',
+            'ssoToken',
+            'showView',
+            'legendTable',
+            'permissions',
+        ]),
     },
     props: {
         floors: {
             //原理图中有数据楼层
             default: () => {
-                []
+                ;[]
             },
             type: Array,
         },
@@ -275,6 +294,7 @@ export default {
             }
             let data = {}
             queryRead({ data, postParams }).then((res) => {
+                // this.$store.commit('SETREMARKSTEXT', '')
                 if (res.data) {
                     let Res = res.data.Data && res.data.Data[0] ? res.data.Data[0].Note : ''
                     if (Res) {
@@ -382,6 +402,7 @@ export default {
             // 弹窗组件内传入floorInfo,使用其楼层id
             this.floorInfo.gname && (data.floorId = this.floorInfo.gname)
             queryStatis({ data, postParams }).then((res) => {
+                // this.$store.commit('SETREMARKSTEXT', '')
                 this.$store.commit('SETPLANNUM', '')
                 this.loading = false
                 let viewTable = []
@@ -517,6 +538,7 @@ export default {
             // 备注
             bus.$off('queryRemarksMethods')
             bus.$on('queryRemarksMethods', (res) => {
+                // this.$store.commit('SETREMARKSTEXT', '')
                 if (res) {
                     this.$store.commit('SETREMARKSTEXT', res)
                 } else {

+ 36 - 25
src/components/Rotation/src/rotation.vue

@@ -19,6 +19,18 @@
         <!-- 不显示指示器 -->
         <!-- :indicator-position='rotationImg.length == 1 ? "none":""' -->
         <el-carousel
+            v-else-if='type!="5"'
+            style='height:100%;width:100%'
+            :interval='5000'
+            indicator-position='none'
+            :arrow='rotationImg.length == 1 ? "never":"always"'
+            @change='changePic'
+        >
+            <el-carousel-item v-for='(item,index) in rotationImg' :key='index'>
+                <img :src='item.url' alt style='  width: 100%; height: 100%;object-fit: container;' />
+            </el-carousel-item>
+        </el-carousel>
+        <el-carousel
             v-else
             style='height:100%;width:100%'
             :interval='5000'
@@ -27,11 +39,11 @@
             @change='changePic'
         >
             <el-carousel-item v-for='(item,index) in rotationImg' :key='index'>
-                <img :src='item.url' alt style='  width: 100%; height: 100%;object-fit: cover;' />
+                <img :src='item.url' alt style='  width: 100%; height: 100%;object-fit:inherit' />
             </el-carousel-item>
         </el-carousel>
     </div>
-</template>s
+</template>
 <script>
 export default {
     name: 'Rotation',
@@ -39,24 +51,24 @@ export default {
     data() {
         return {
             rotationImgs: [{ url: require('@/assets/images/login_back.png') }],
-            fileList: [
-                {
-                    name: 'food.jpeg',
-                    url: require('@/assets/imgs/2020.png')
-                },
-                {
-                    name: 'food2.jpeg',
-                    url: require('@/assets/imgs/20200.png')
-                },
-                {
-                    name: 'food.jpeg',
-                    url: 'https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg'
-                },
-                {
-                    name: 'food2.jpeg',
-                    url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg'
-                }
-            ]
+            // fileList: [
+            //     {
+            //         name: 'food.jpeg',
+            //         url: require('@/assets/imgs/2020.png'),
+            //     },
+            //     {
+            //         name: 'food2.jpeg',
+            //         url: require('@/assets/imgs/20200.png'),
+            //     },
+            //     {
+            //         name: 'food.jpeg',
+            //         url: 'https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg',
+            //     },
+            //     {
+            //         name: 'food2.jpeg',
+            //         url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
+            //     },
+            // ],
         }
     },
     methods: {
@@ -64,7 +76,7 @@ export default {
             if (this.type == 2) {
                 this.$emit('scan', val + 1)
             }
-        }
+        },
     },
     // 解决两张图片时,轮播顺序反向
     created() {
@@ -76,7 +88,7 @@ export default {
         if (this.type == 2) {
             this.changePic(1)
         }
-    }
+    },
 }
 </script>
 <style lang="less" scoped>
@@ -168,6 +180,8 @@ export default {
     }
     img {
         height: 100%;
+        height: 100%;
+        object-fit: contain;
     }
     .rotationCon {
         height: 100%;
@@ -178,8 +192,5 @@ export default {
         text-align: center;
         background: #fff;
     }
-    img {
-        width: 100%;
-    }
 }
 </style>

+ 19 - 20
src/components/floorList.vue

@@ -38,7 +38,7 @@ import RepeatClick from '@/directives/repeat-click'
 
 export default {
     directives: {
-        repeatClick: RepeatClick
+        repeatClick: RepeatClick,
     },
     data() {
         return {
@@ -47,22 +47,17 @@ export default {
             showB: true,
             num: 0,
             floorMapIdName: '',
-            floor: {
-                code: 'F1',
-                gcode: '1F',
-                gname: 'f1',
-                name: '第1层',
-                seq: 100
-            },
+            floor: {},
             currentFloorId: null,
             marginTop: 0,
             marginTopMax: 0,
             startTime: '',
             endTime: '',
+            floorObj2: {},
             showNumber: 8, //需要展示的楼层数   //TODO:
             height: 39, //一个楼层的高度
             currIndex: 0, //当前楼层在 楼层数组中的下标,上下箭头使用
-            conHeight: 0 // floor-out 的高度
+            conHeight: 0, // floor-out 的高度
         }
     },
     props: {
@@ -70,21 +65,20 @@ export default {
             type: Array,
             default: () => {
                 return []
-            }
+            },
         },
         // 默认true,
         // 1. 切换楼层后,是否触发 cookie,vuex数据修改,
         // 2. 在fenbuPic组件中为false, 1)不触发cookie,vuex , 2) 选中的楼层ID,为楼层列表数组floorIdArr的第0个
         changeDataFlag: {
             type: Boolean,
-            default: true
-        }
+            default: true,
+        },
     },
     computed: {
-        ...mapGetters(['legendTable'])
+        ...mapGetters(['legendTable', 'floorObj']),
     },
     mounted() {
-        window.vm = this
         this.init()
     },
     methods: {
@@ -108,13 +102,18 @@ export default {
                 return false
             }
             this.floorIdArr = []
-            this.floorsArr.map(item => {
+            this.floorsArr.map((item) => {
                 this.floorIdArr.push(item.seq)
+                if (item.seq == this.$cookie.get('currentFloorId')) {
+                    this.floor = item
+                } else {
+                    this.floor = this.floorObj
+                }
             })
-            this.currentFloorId = Number(this.$cookie.get('currentFloorId') || 100)
+            this.currentFloorId = Number(this.$cookie.get('currentFloorId') || this.floor.seq)
             // bug fix 修复 fenbuPic 弹窗中,楼层不能选中的问题
             // 如果 floorIdArr 不在 floorIdArr数组中,或者changeDataFlag为false(弹窗组件中的楼层组件),使用 floorIdArr[0], 而不使用 cookie
-            let index = this.floorIdArr.findIndex(item => item === this.currentFloorId)
+            let index = this.floorIdArr.findIndex((item) => item === this.currentFloorId)
             if (index === -1 || !this.changeDataFlag) {
                 this.currentFloorId = this.floorIdArr[0]
             }
@@ -151,7 +150,7 @@ export default {
             this.handlePosition(flag, index, len)
         },
         handleCookie() {
-            let currentFloor = this.floorsArr.filter(item => item.seq == this.currentFloorId)[0]
+            let currentFloor = this.floorsArr.filter((item) => item.seq == this.currentFloorId)[0]
             if (currentFloor) {
                 // 如果 changeDataFlag为true(不是在 分布图弹窗组件中的 楼层组件),设置cookie,vuex
                 if (this.changeDataFlag) {
@@ -222,8 +221,8 @@ export default {
                 default:
                     break
             }
-        }
-    }
+        },
+    },
 }
 </script>
 <style lang="less" scoped>

+ 67 - 60
src/components/floorMap/index.vue

@@ -134,23 +134,23 @@ export default {
     props: {
         id: {
             default: '1',
-            type: String
+            type: String,
         },
         categoryId: {
             default: '',
-            type: String
+            type: String,
         },
         // 弹窗高度,适配底图高度使用
         modalHeight: {
             type: [Number, undefined],
-            default: undefined
+            default: undefined,
         },
         loadName: null,
-        type: null
+        type: null,
     },
     components: { RoomBox, canvasFun },
     computed: {
-        ...mapGetters(['plazaId', 'fmapID', 'haveFengMap', 'bunkObj'])
+        ...mapGetters(['plazaId', 'fmapID', 'haveFengMap', 'bunkObj']),
     },
     methods: {
         handleClickLegendItem(item, events) {
@@ -289,44 +289,50 @@ export default {
                     this.scene.addItem(imgItem)
                     this.view.scene = this.scene
                     // this.view.fitSceneToView()
+                } else {
+                    // 屋顶图不为图片
+                    this.readBaseMap(floor);
                 }
             } else {
                 if (window.fengmapData.gnameToGid[floor]) {
-                    window.fengmapData.parseData(window.fengmapData.gnameToGid[floor], res => {
-                        if (res.err) {
-                            console.log('errr', res.err)
-                            return
-                        }
-                        this.fParser = new SFloorParser(null)
-                        this.fParser.parseData(res)
-                        this.fParser.spaceList.forEach(t => {
-                            this.scene.addItem(t)
-                            t.nameSize = 12
-                            t.nameColor = '#2a2a2a'
-                            if (t.data.Name && this.bunkObj[t.data.Name]) {
-                                t.name = this.bunkObj[t.data.Name].brandname
-                            } else {
-                                // t.name = t.data.Name
-                                t.name = ''
-                            }
-                        })
-                        this.fParser.wallList.forEach(t => this.scene.addItem(t))
-                        this.fParser.virtualWallList.forEach(t => this.scene.addItem(t))
-                        this.fParser.doorList.forEach(t => this.scene.addItem(t))
-                        this.fParser.columnList.forEach(t => this.scene.addItem(t))
-                        this.fParser.casementList.forEach(t => this.scene.addItem(t))
-                        this.view.scene = this.scene
-                        // this.view.fitSceneToView()
-                        this.readGraph()
-                    })
+                    this.readBaseMap(floor);
                 } else {
                     console.log('楼层不正确')
                 }
             }
+        },// 解析底图
+        readBaseMap(floor){
+            window.fengmapData.parseData(window.fengmapData.gnameToGid[floor], res => {
+                if (res.err) {
+                    console.log('errr', res.err)
+                    return
+                }
+                this.fParser = new SFloorParser(null)
+                this.fParser.parseData(res)
+                this.fParser.spaceList.forEach(t => {
+                    this.scene.addItem(t)
+                    t.nameSize = 12
+                    t.nameColor = '#2a2a2a'
+                    if (t.data.Name && this.bunkObj[t.data.Name]) {
+                        t.name = this.bunkObj[t.data.Name].brandname
+                    } else {
+                        // t.name = t.data.Name
+                        t.name = ''
+                    }
+                })
+                this.fParser.wallList.forEach(t => this.scene.addItem(t))
+                this.fParser.virtualWallList.forEach(t => this.scene.addItem(t))
+                this.fParser.doorList.forEach(t => this.scene.addItem(t))
+                this.fParser.columnList.forEach(t => this.scene.addItem(t))
+                this.fParser.casementList.forEach(t => this.scene.addItem(t))
+                this.view.scene = this.scene
+                // this.view.fitSceneToView()
+                this.readGraph()
+            })
         },
         readGraph() {
             this.readGroup(this.floorid)
-                .then(data => {
+                .then((data) => {
                     if (data.Result == 'failure') {
                         this.$store.commit('SETISMESSAGE', false)
                         this.view.fitSceneToView()
@@ -370,7 +376,7 @@ export default {
                         scpzTable = data.Data[0].Elements.Nodes || []
                         console.log(scpzTable)
                         if (scpzTable.length > 0) {
-                            scpzTable.forEach(e => {
+                            scpzTable.forEach((e) => {
                                 if (e.Properties.ItemExplain) {
                                     let obj = e
                                     arr.push(obj)
@@ -383,8 +389,9 @@ export default {
                     if (data.Data[0].Elements.Nodes.length > 0) {
                         this.$store.commit('SETTYPENUM', '')
                         let Lengd = data.Data[0].Elements.Nodes
-                        Lengd.forEach(el => {
+                        Lengd.forEach((el) => {
                             if (el.Type == 'Image' && el.Num > 1) {
+                                console.log(el.Num)
                                 this.$store.commit('SETTYPENUM', el.Num)
                             }
                         })
@@ -399,30 +406,30 @@ export default {
                     this.topologyParser = new STopologyParser(null)
                     this.topologyParser.parseData(data.Data[0].Elements)
                     // 多边形
-                    this.topologyParser.zoneLegendList.forEach(t => {
+                    this.topologyParser.zoneLegendList.forEach((t) => {
                         this.scene.addItem(t)
                         t.connect("legendItemClick", t, this.handleClickLegendItem);
                     })
                     // 增加文字
-                    this.topologyParser.textMarkerList.forEach(t => {
+                    this.topologyParser.textMarkerList.forEach((t) => {
                         this.scene.addItem(t)
                     })
                     // 增加图片
-                    this.topologyParser.imageMarkerList.forEach(t => {
+                    this.topologyParser.imageMarkerList.forEach((t) => {
                         this.scene.addItem(t)
                     })
                     // 增加直线
-                    this.topologyParser.lineMarkerList.forEach(t => {
+                    this.topologyParser.lineMarkerList.forEach((t) => {
                         this.scene.addItem(t)
                     })
                     // 增加图标类图例
-                    this.topologyParser.imageLegendList.forEach(t => {
+                    this.topologyParser.imageLegendList.forEach((t) => {
                         this.scene.addItem(t)
                         t.connect("legendItemClick", t, this.handleClickLegendItem);
                     })
                     // 增加管线类
                     // 增加图标类图例
-                    this.topologyParser.relationList.forEach(t => {
+                    this.topologyParser.relationList.forEach((t) => {
                         t.selectable = true
                         this.scene.addItem(t)
                         t.connect("legendItemClick", t, this.handleClickLegendItem);
@@ -479,7 +486,7 @@ export default {
         // 选中电井关联的商铺高亮
         setHightLight(arr) {
             this.clearHightLight()
-            arr.forEach(item => {
+            arr.forEach((item) => {
                 let location = item.data.AttachObjectIds[0] ? item.data.AttachObjectIds[0].id : ''
                 // 添加了位置类型并且选中的类型为电井类型
                 if (
@@ -490,7 +497,7 @@ export default {
                     location
                 ) {
                     if (this.wellMap.hasOwnProperty(location)) {
-                        this.wellMap[location].forEach(item => {
+                        this.wellMap[location].forEach((item) => {
                             item.highLightFlag = true
                             item.zOrder = 30
                         })
@@ -498,23 +505,23 @@ export default {
                         let getParams = {
                             plazaId: this.plazaId,
                             floor: this.floorid,
-                            keyword: `${location}:wellnum;`
+                            keyword: `${location}:wellnum;`,
                         }
-                        queryShops({ getParams }).then(res => {
+                        queryShops({ getParams }).then((res) => {
                             let shopsnumList = []
                             let shopsnumItemList = []
                             if (res.data && res.data.length) {
                                 for (let floor in res.data[0]) {
                                     if (res.data[0][floor].length) {
-                                        res.data[0][floor].forEach(v => {
+                                        res.data[0][floor].forEach((v) => {
                                             shopsnumList = shopsnumList.concat(v.shopsnumList.split(','))
                                         })
                                     }
                                 }
                             }
                             if (shopsnumList.length) {
-                                this.fParser.spaceList.forEach(item => {
-                                    if (shopsnumList.findIndex(name => name == item.data.Name) != -1) {
+                                this.fParser.spaceList.forEach((item) => {
+                                    if (shopsnumList.findIndex((name) => name == item.data.Name) != -1) {
                                         item.highLightFlag = true
                                         item.zOrder = 30
                                         shopsnumItemList.push(item)
@@ -531,7 +538,7 @@ export default {
         clearHightLight() {
             ItemColor.spaceHighColor = new SColor('#FBF2CC')
             for (let key in this.wellMap) {
-                this.wellMap[key].forEach(item => {
+                this.wellMap[key].forEach((item) => {
                     item.highLightFlag = false
                     item.zOrder = ItemOrder.spaceOrder
                 })
@@ -568,7 +575,7 @@ export default {
             // this.topologyParser.zoneLegendList.forEach(t => {
             //     t.showText = val
             // })
-            this.fParser.spaceList.forEach(t => {
+            this.fParser.spaceList.forEach((t) => {
                 t.showBaseName = val
             })
         },
@@ -579,7 +586,7 @@ export default {
                 FloorID: FloorID,
                 categoryId: this.categoryId ? this.categoryId : this.$cookie.get('categoryId'),
                 projectId: this.urlMsg.ProjectID,
-                Pub: true
+                Pub: true,
             }
             return readGroup(data)
         },
@@ -597,9 +604,9 @@ export default {
             }
         },
         getEvent() {
-            bus.$on('changeShow', res => {
+            bus.$on('changeShow', (res) => {
                 this.topologyParser &&
-                    this.topologyParser.zoneLegendList.forEach(t => {
+                    this.topologyParser.zoneLegendList.forEach((t) => {
                         let id = t.data.GraphElementId
                         t.maskFlag = !(res.indexOf(id) > -1)
                     })
@@ -616,17 +623,17 @@ export default {
                 //     t.maskFlag = !(res.indexOf(id) > -1)
                 // })
                 this.topologyParser &&
-                    this.topologyParser.imageLegendList.forEach(t => {
+                    this.topologyParser.imageLegendList.forEach((t) => {
                         let id = t.data.GraphElementId
                         t.maskFlag = !(res.indexOf(id) > -1)
                     })
                 this.topologyParser &&
-                    this.topologyParser.relationList.forEach(t => {
+                    this.topologyParser.relationList.forEach((t) => {
                         let id = t.data.GraphElementId || t.data.GraphElementID
                         t.maskFlag = !(res.indexOf(id) > -1)
                     })
             })
-        }
+        },
     },
     watch: {
         'view.scale': {
@@ -635,11 +642,11 @@ export default {
                     let s = (n * 10) / this.view.minScale
                     this.$refs.canvasFun.sliderVal = s > 1000 ? 1000 : s
                 }
-            }
+            },
         },
         haveFengMap() {
             this.init(this.floorid)
-        }
+        },
     },
     mounted() {
         this.mapSize()
@@ -654,9 +661,9 @@ export default {
             ProjectID: this.plazaId,
             BuildingID: '1',
             FloorID: this.$cookie.get('floorMapId') || 'f1',
-            fmapID: this.fmapID
+            fmapID: this.fmapID,
         }
-    }
+    },
 }
 </script>
 <style lang="less" scoped>

+ 13 - 13
src/components/legendremarks.vue

@@ -40,17 +40,17 @@ export default {
             text2: '图例后×的数字,代表此位置的数量',
             editorOption: {
                 modules: {
-                    toolbar: [['bold', 'underline'], [{ color: [] }], [{ list: 'ordered' }]]
+                    toolbar: [['bold', 'underline'], [{ color: [] }], [{ list: 'ordered' }]],
                 },
                 theme: 'snow',
-                placeholder: '请输入内容...'
+                placeholder: '请输入内容...',
             },
             title: '编辑图例备注',
-            visible: false
+            visible: false,
         }
     },
     computed: {
-        ...mapGetters(['remarksText', 'typeNum', 'planNum'])
+        ...mapGetters(['remarksText', 'typeNum', 'planNum']),
     },
     methods: {
         // 点击取消
@@ -59,7 +59,7 @@ export default {
                 this.$confirm('是否保存编辑后的备注?', '提示', {
                     confirmButtonText: '保存',
                     cancelButtonText: '取消',
-                    type: 'warning'
+                    type: 'warning',
                 })
                     .then(() => {
                         this.handleOk()
@@ -67,7 +67,7 @@ export default {
                     .catch(() => {
                         this.$message({
                             type: 'info',
-                            message: '已取消保存'
+                            message: '已取消保存',
                         })
                         this.visible = false
                     })
@@ -107,7 +107,7 @@ export default {
                 if (this.remarksText.search(`${this.text2}`) != -1) {
                     this.remarksTexts = this.remarksText
                 } else {
-                    if (this.planNum) {
+                    if (this.typeNum) {
                         this.remarksTexts = `${this.remarksText}<ol style="padding-left: 1.5em;"><li>${this.text2}</li></ol>`
                     } else {
                         this.remarksTexts = this.remarksText
@@ -131,14 +131,14 @@ export default {
                 postParams: {
                     graphId: this.$cookie.get('graphId'),
                     projectId: this.$store.state.plazaId,
-                    Note: val
-                }
+                    Note: val,
+                },
             }
-            updateRead(params).then(res => {
+            updateRead(params).then((res) => {
                 this.$message({
                     showClose: true,
                     message: '更新成功',
-                    type: 'success'
+                    type: 'success',
                 })
                 this.$emit('queryMarks')
                 this.visible = false
@@ -161,9 +161,9 @@ export default {
             if (val.html) {
                 this.remarksTexts = val.html
             }
-        }
+        },
     },
-    mounted() {}
+    mounted() {},
 }
 </script>
 

+ 7 - 8
src/components/viewLengend.vue

@@ -30,7 +30,6 @@
                 ref='dataTable'
                 v-if='legendTable.length>=0'
                 :data='legendTable'
-                :height='tableHeight'
                 tooltip-effect='dark'
                 style='width:100%;'
                 @selection-change='handleSelectionChange'
@@ -109,13 +108,13 @@ export default {
     },
     computed: {
         ...mapGetters(['scpzTable', 'legendTable', 'remarksText']),
-        tableHeight() {
-            if (window.screen.height > 1000) {
-                return 500
-            } else {
-                return 334
-            }
-        },
+        // tableHeight() {
+        //     if (window.screen.height > 1000) {
+        //         return 500
+        //     } else {
+        //         return 334
+        //     }
+        // },
         // initText() {
         // if (this.defaultComment) {
         //     return this.defaultComment

+ 1 - 3
src/main.ts

@@ -3,7 +3,7 @@ import router from './router'
 import store from './store'
 import App from './App.vue'
 Vue.config.productionTip = false
-
+import {query} from "./utils/query.js"
 import design from 'ant-design-vue'
 import 'ant-design-vue/dist/antd.css'
 Vue.use(design)
@@ -55,8 +55,6 @@ document.addEventListener('readystatechange',()=>{
         IndexLoading.remove(indexLoading)
     }
 }) */
-
-
 new Vue({
     router,
     store,

+ 5 - 0
src/router/index.js

@@ -95,6 +95,11 @@ router.beforeEach(async (to, from, next) => {
         localStorage.setItem('PLAZAID', plazaId)
         store.commit('STOREPLAZAID', plazaId);
     }
+    let previewUrl = to.query.isPreview ? to.query.isPreview : '';
+    if (previewUrl) {
+        sessionStorage.setItem("SETISPREVIEW", previewUrl)
+        store.commit('SETISPREVIEW', previewUrl)
+    }
     // 取出刷新时的 ssoToken, 路由拦截时app.vue 生命周期还没有执行,store中还没有数据,
     let beforeunload = localStorage.getItem("beforeunload"),
         __token = null

+ 36 - 15
src/store/index.js

@@ -14,11 +14,10 @@ import router from '../router'
 Vue.use(Vuex)
 export default new Vuex.Store({
     state: {
-        // ssoToken: 'admin:liujiandong',
         ssoToken: 'admin:liulin34',
         // ssoToken: '',
         // ssoToken: null,
-        plazaName: '',
+        plazaName: "",
         isPreview: false,
         lastRoute: '',
         isrequestAuth: null, // 是否请求登录校验接口
@@ -48,6 +47,7 @@ export default new Vuex.Store({
         isGetmap: false, //是否可以请求底图(在项目中方可请求)
         planNum: '', //主要设备房 展示备注需要
         typeNum: '', //图例数量 展示备注需要
+        floorObj: {},
     },
     getters: {
         plazaName: (state) => state.plazaName,
@@ -72,6 +72,7 @@ export default new Vuex.Store({
         typeNum: (state) => state.typeNum,
         isrequestAuth: (state) => state.isrequestAuth,
         permissions: (state) => state.permissions,
+        floorObj: (state) => state.floorObj,
     },
     mutations: {
         SETPLAZENAME(state, data) {
@@ -105,6 +106,10 @@ export default new Vuex.Store({
             state.isMessage = data
         },
         SETFLOORS(state, data) {
+            console.log(data)
+            let numArr = [],
+                minNum = '',
+                floor = {}
             state.floorSelect = []
             state.floorsArr = data
             if (data.length > 0) {
@@ -113,8 +118,18 @@ export default new Vuex.Store({
                         id: e.gname,
                         name: e.code,
                     }
+                    // 下拉框的楼层数组
                     state.floorSelect.push(obj)
+                    // 获取默认展示楼层
+                    if (e.seq > 0) {
+                        numArr.push(e.seq)
+                    }
                 })
+                if (Math.min.apply(Math, numArr)) {
+                    state.floorObj = data.find((item) => {
+                        return item.seq == Math.min.apply(Math, numArr)
+                    })
+                }
             }
         },
         SETMAPID(state, data) {
@@ -183,6 +198,8 @@ export default new Vuex.Store({
                         let level = res.level
                         console.log('window.opener', window.opener)
                         if (window.opener && window.opener.__fromGroupPage) {
+                            console.log('window.openerxxx', window.opener)
+                            commit('SETAUTHMSG', level)
                             let data = window.opener.__fromGroupPage
                             level = data.level
                             commit('SETPLAZENAME', data.plazaName)
@@ -192,7 +209,8 @@ export default new Vuex.Store({
                                 path: './home/homepage',
                             })
                         } else {
-                            if (level === 0) {
+                            console.log('window.openerxxx', window.opener, level)
+                            if (level == 0) {
                                 if (res.treeData[0].ccode) {
                                     localStorage.setItem('PLAZAID', res.treeData[0].ccode)
                                     commit('STOREPLAZAID', res.treeData[0].ccode)
@@ -201,7 +219,7 @@ export default new Vuex.Store({
                                 router.push({
                                     path: './home/overview',
                                     query: {
-                                        plazaId: res.treeData[0].ccode
+                                        plazaId: res.treeData[0].ccode,
                                     },
                                 })
                             } else {
@@ -214,17 +232,20 @@ export default new Vuex.Store({
                         // 指定条问题
                         window.wd_fm_info = {
                             profile: {
-                                username: encodeURIComponent(res.username)
-                            }
-                        };
+                                username: encodeURIComponent(res.username),
+                            },
+                        }
                     }
                 })
                 .catch((err) => {
-                    console.log('getuserfo catch', err)
-                    // router.push({
-                    //     path: '/404',
-                    // })
-                    // commit('SETISREQUESTtAUTH', err)
+                    console.log('getuserfo catch', this.getters.accessLevel);
+                    // 由于跨域做的判断
+                    if (this.getters.accessLevel == 0) {
+                        router.push({
+                            path: './home/homepage',
+                        })
+                    }
+
                 })
         },
         async getUserInfoNoPath({
@@ -239,9 +260,9 @@ export default new Vuex.Store({
                         commit('SETAUTHMSG', res)
                         window.wd_fm_info = {
                             profile: {
-                                username: encodeURIComponent(res.username)
-                            }
-                        };
+                                username: encodeURIComponent(res.username),
+                            },
+                        }
                     }
                 })
                 .catch((err) => {

+ 36 - 16
src/views/equipment/eqDialog.vue

@@ -133,7 +133,7 @@ export default {
             tabCount: [],
             sizePic: '',
             imgInfo: {},
-            showFenbuPic: false //显示楼层分布组件
+            showFenbuPic: false, //显示楼层分布组件
         }
     },
     mounted() {},
@@ -182,6 +182,16 @@ export default {
                 this.diff = this.dialogInfo.children[`${tab.index}`].param.diff
                 this.difference = this.dialogInfo.children[`${tab.index}`].param.difference
             }
+            if (this.dialogInfo.children.length > 0) {
+                this.dialogInfo.children.forEach((el) => {
+                    if (el.label == '分水器支路分布图' || el.label == '消防泵房引出管路分布图') {
+                        this.showFenbuPic = true
+                        this.$nextTick(() => {
+                            this.$refs.fenbutu[0] && this.$refs.fenbutu[0].openFloorMap()
+                        })
+                    }
+                })
+            }
             if (this.dialogInfo.children[0].id.slice(2, 4) == 'YL' && this.typecode.slice(0, 3) != 'FBT') {
                 this.initImage(this.typecode)
             }
@@ -206,7 +216,7 @@ export default {
                 plazaId: this.$store.state.plazaId,
                 module: '1002',
                 neTypename: '位置布置图',
-                typecode: typecode
+                typecode: typecode,
             }
             switch (this.systemName) {
                 case '暖通系统':
@@ -234,12 +244,12 @@ export default {
             if (this.systemName == '供电系统') {
                 getParams.system = '1001'
             }
-            queryPic({ getParams }).then(res => {
+            queryPic({ getParams }).then((res) => {
                 this.rotationImg = res.data || []
                 let img = new Image()
-                img.src = this.rotationImg[0].url
+                img.src = this.rotationImg && this.rotationImg[0] ? this.rotationImg[0].url : ''
                 const vm = this
-                img.onload = function() {
+                img.onload = function () {
                     vm.$set(vm.imgInfo, 'width', img.width)
                     vm.$set(vm.imgInfo, 'height', img.height)
                     if (vm.imgInfo.width > vm.imgInfo.height) {
@@ -255,7 +265,7 @@ export default {
         isShowTab() {
             let data = {
                 plazaId: this.$store.state.plazaId,
-                major: this.systemName.slice(0, 2)
+                major: this.systemName.slice(0, 2),
             }
             let postParams = []
             if (this.dialogInfo.children.length == 0) {
@@ -263,33 +273,43 @@ export default {
                     params: {
                         typecode: this.dialogInfo.param.type_code,
                         system: this.smsxt,
-                        module: '1002'
+                        module: '1002',
                     },
-                    tableName: 'glsms_proimgup'
+                    tableName: 'glsms_proimgup',
                 })
             } else {
-                this.dialogInfo.children.forEach(el => {
+                this.dialogInfo.children.forEach((el) => {
                     postParams.push({
                         params: {
                             typecode: el.param.type_code,
                             system: this.smsxt,
-                            module: '1002'
+                            module: '1002',
                         },
-                        tableName: 'glsms_proimgup'
+                        tableName: 'glsms_proimgup',
                     })
                 })
             }
-            queryTab({ data, postParams }).then(res => {
+            queryTab({ data, postParams }).then((res) => {
                 this.tabCount = []
                 let data = res.data.data || []
-                data.forEach(el => {
+                let counts = []
+                data.forEach((el) => {
                     this.tabCount.push({
                         count: el.count,
                         system: el.params.system,
-                        typecode: el.params.typecode
+                        typecode: el.params.typecode,
                     })
+                    counts.push(el.count)
                 })
                 this.$emit('emitCount', this.tabCount)
+                if (counts.every((el) => el == 0)) {
+                    this.typecode = this.dialogInfo.children[this.dialogInfo.children.length - 1].param.type_code
+                    this.activeName = this.typecode
+                    this.showFenbuPic = true
+                    this.$nextTick(() => {
+                        this.$refs.fenbutu[0] && this.$refs.fenbutu[0].openFloorMap()
+                    })
+                }
             })
         },
         /**
@@ -298,8 +318,8 @@ export default {
         closeModal() {
             this.showFenbuPic = false
             this.$emit('closeModal', true)
-        }
-    }
+        },
+    },
 }
 </script>
 <style lang="less" scoped>

+ 26 - 41
src/views/equipment/index.vue

@@ -89,12 +89,7 @@ export default {
             systemId: 1,
             categoryId: 'GDXT',
             systemName: '供电系统',
-            floorInfo: {
-                code: 'F1',
-                gcode: '1F',
-                gname: 'f1',
-                seq: 100
-            },
+            floorInfo: {},
             smsxt: '1001',
             dialogInfo: {},
             brand: [], //品牌
@@ -106,7 +101,7 @@ export default {
             bottomOffset: 0,
             keyFL: 'keyFL' + new Date().getTime(),
             keyLd: 'keyLd_' + new Date().getTime(),
-            ShowDialog: false //是否显示弹窗
+            ShowDialog: false, //是否显示弹窗
         }
     },
     components: { floorList, eqDialog, floorMap, editList },
@@ -135,18 +130,18 @@ export default {
             this.viewLengend()
             // 发送pvUv
             const data = {
-                plazaId: this.plazaId
+                plazaId: this.plazaId,
             }
             let postParams = {
                 type: 'equipmentRouter',
                 target: item.name,
-                parameter: item.categoryId
+                parameter: item.categoryId,
             }
             getPvUv(data, postParams)
-                .then(res => {
+                .then((res) => {
                     console.log('pvuv', res)
                 })
-                .catch(res => {
+                .catch((res) => {
                     console.log('error', res)
                 })
         },
@@ -162,7 +157,6 @@ export default {
         },
         emitFloor(item) {
             this.floorInfo = item
-            console.log(item)
             this.$refs.floorMap.init(this.floorInfo.gname)
             this.init()
             this.querySmsxt()
@@ -179,19 +173,19 @@ export default {
                 // pvuv接口记录
                 // 发送pvUv
                 const data = {
-                    plazaId: this.plazaId
+                    plazaId: this.plazaId,
                 }
 
                 let postParams = {
                     type: 'modal',
                     target: eve.id,
-                    parameter: eve.label
+                    parameter: eve.label,
                 }
                 getPvUv(data, postParams)
-                    .then(res => {
+                    .then((res) => {
                         console.log('pvuv', res)
                     })
-                    .catch(res => {
+                    .catch((res) => {
                         console.log('error', res)
                     })
             }
@@ -232,15 +226,20 @@ export default {
                 module: '1003',
                 floor: picFloor,
                 system: system,
-                plazaId: this.plazaId
+                plazaId: this.plazaId,
             }
-            queryPic({ getParams }).then(res => {
+            queryPic({ getParams }).then((res) => {
                 // console.log('附加数据', res)
                 this.fqPic = res.data ? res.data : []
             })
         },
         init() {
             this.loadName = `设备设施-${this.systemName}-${this.floorInfo.code}`
+            if (this.floorsArr.length > 0 && this.$cookie.get('currentFloorId')) {
+                this.floorInfo = this.floorsArr.find((item) => {
+                    return this.$cookie.get('currentFloorId') == item.seq
+                })
+            }
         },
         // 从设备设施进入的机房
         queryType(val) {
@@ -271,30 +270,19 @@ export default {
             } else {
                 this.$cookie.set('categoryId', 'SCPZ')
             }
-        }
+        },
     },
-    /* mounted() {
-        if (this.$route.query.smsxt) {
-            this.smsxt = this.$route.query.smsxt
-            this.system.forEach(el => {
-                if (el.smsxt == this.smsxt) {
-                    this.everySystem = el.children
-                    this.systemName = el.name
-                    this.systemId = el.id
-                }
-            })``
-        }
-        this.everySystem = this.system[0].children
-        this.init()
-        this.$refs.floorMap.init(this.floorInfo.gname)
-    }, */
     mounted() {
         window._vm = this
+        // if (Object.keys(this.floorObj).length > 0) {
+        //     this.floorInfo = this.floorObj
+        // }
+        this.$refs.floorMap.init(this.floorInfo.gname)
         if (this.$route.query.smsxt) {
             console.log(this.$route.query.smsxt)
             this.smsxt = this.$route.query.smsxt
             this.smsxtQuery()
-            this.system.forEach(el => {
+            this.system.forEach((el) => {
                 if (el.smsxt == this.smsxt) {
                     this.everySystem = el.children
                     this.systemName = el.name
@@ -305,22 +293,19 @@ export default {
         this.everySystem = this.system[0].children
         // 刷新时,store中有categoryId时,选中子系统状态
         if (this.$store.state.categoryId) {
-            let item = this.system.filter(item => item.categoryId === this.$store.state.categoryId)[0]
+            let item = this.system.filter((item) => item.categoryId === this.$store.state.categoryId)[0]
             this.systemId = item.id
             this.everySystem = item.children
             this.systemName = item.name
             this.smsxt = item.smsxt
-            // this.$refs.floorMap.init(this.floorInfo.gname)
             this.querySmsxt()
             this.viewLengend()
         }
         this.init()
-        console.log(this.floorInfo.gname)
-        this.$refs.floorMap.init(this.floorInfo.gname)
     },
     computed: {
-        ...mapGetters(['floorsArr', 'plazaId', 'showView', 'legendTable'])
-    }
+        ...mapGetters(['floorsArr', 'plazaId', 'showView', 'legendTable', 'floorObj']),
+    },
 }
 </script>
 <style lang="less" scoped>

+ 11 - 8
src/views/floorFunc/index.vue

@@ -21,19 +21,17 @@ export default {
     data() {
         return {
             show: true,
-            floorInfo: {
-                gname: 'f1',
-                code: 'F1'
-            },
+            floorInfo: {},
             loadName: '',
-            type: ''
+            type: '',
         }
     },
     computed: {
-        ...mapGetters(['floorsArr'])
+        ...mapGetters(['floorsArr', 'floorObj']),
     },
     methods: {
         emitFloor(item) {
+            console.log(item)
             this.floorInfo = item
             this.$refs.floorMap.init(this.floorInfo.gname)
             this.init()
@@ -43,12 +41,17 @@ export default {
         },
         init() {
             this.loadName = `楼层功能-${this.floorInfo.code}`
-        }
+            if (this.floorsArr.length > 0 && this.$cookie.get('currentFloorId')) {
+                this.floorInfo = this.floorsArr.find((item) => {
+                    return this.$cookie.get('currentFloorId') == item.seq
+                })
+            }
+        },
     },
     mounted() {
         this.init()
         this.$refs.floorMap.init(this.floorInfo.gname)
-    }
+    },
 }
 </script>
 <style lang="less">

+ 18 - 18
src/views/legendLibrary/addLegend.vue

@@ -85,13 +85,13 @@ export default {
                 Size: { Height: '32', Width: '32' },
                 InfoTypeId: [], //铺位可视化typeid
                 InfoLocal: [], //工程信息化位置与设备分类
-                InfoSystem: [] //工程信息化专业/系统
+                InfoSystem: [], //工程信息化专业/系统
             },
             title: '',
             GraphCategoryId: 'DTXT',
             modalShow4: false,
             treeData: [],
-            tableData: []
+            tableData: [],
         }
     },
     components: { addForm, addList },
@@ -101,17 +101,17 @@ export default {
             this.GraphCategoryId = GraphCategoryId
             //console.log(title)
             let getParams = {
-                categoryId: String(this.GraphCategoryId)
+                categoryId: String(this.GraphCategoryId),
             }
             if (GraphCategoryId) {
-                groupByCategory({ getParams }).then(res => {
+                groupByCategory({ getParams }).then((res) => {
                     this.treeData = []
-                    this.treeData = res.Data.map(i => this.getTree(i))
+                    this.treeData = res.Data.map((i) => this.getTree(i))
                 })
                 //获取图例列表
                 let postParams = this.GraphCategoryId
                 let data = {}
-                queryRelation({ data, postParams }).then(res => {
+                queryRelation({ data, postParams }).then((res) => {
                     this.tableData = res.data.Content
                 })
                 //treeSelect
@@ -127,7 +127,7 @@ export default {
 
                     InfoTypeId: [], //铺位可视化typeid
                     InfoLocal: [], //工程信息化位置与设备分类
-                    InfoSystem: [] //工程信息化专业/系统
+                    InfoSystem: [], //工程信息化专业/系统
                 }
             } else if (title == '添加图例库') {
                 this.dialogVisible = true
@@ -144,7 +144,7 @@ export default {
 
                     InfoTypeId: [], //铺位可视化typeid
                     InfoLocal: [], //工程信息化位置与设备分类
-                    InfoSystem: [] //工程信息化专业/系统
+                    InfoSystem: [], //工程信息化专业/系统
                 }
             } else if (title == '修改图例库') {
                 this.dialogVisible = true
@@ -152,7 +152,7 @@ export default {
                 this.InfosList = []
                 this.InfoTypeIdList = []
                 // this.InfosList = [...row.InfoLocal.map(({ id }) => id), ...row.InfoSystem]
-                this.InfosList = row.InfoLocal ? [...row.InfoLocal.map(({ id }) => id)] : []
+                this.InfosList = row.InfoLocal ? [...row.InfoLocal.map(({ id, type }) => id + type)] : []
                 this.InfoTypeIdList = row.InfoTypeId
 
                 // 图例库规则中的transform
@@ -164,7 +164,7 @@ export default {
             return {
                 id: data.Id,
                 name: data.Name,
-                children: data.Children && data.Children.length > 0 ? data.Children.map(i => this.getTree(i)) : []
+                children: data.Children && data.Children.length > 0 ? data.Children.map((i) => this.getTree(i)) : [],
             }
         },
         cancal() {
@@ -178,7 +178,7 @@ export default {
                 Size: { Height: '32', Width: '32' },
                 InfoTypeId: [], //铺位可视化typeid
                 InfoLocal: [], //工程信息化位置与设备分类
-                InfoSystem: [] //工程信息化专业/系统
+                InfoSystem: [], //工程信息化专业/系统
             }
             this.InfoTypeIdList = []
             this.InfosList = []
@@ -223,26 +223,26 @@ export default {
             let tableList = [],
                 list = [],
                 totalLst = []
-            dataObj.forEach(i => {
+            dataObj.forEach((i) => {
                 list.push({
                     Id: i.id,
-                    name: i.name
+                    name: i.name,
                 })
             })
             tableList = [...list, ...this.tableData]
             tableList.forEach((i, index) => {
                 totalLst.push({
                     GraphElementId: i.Id,
-                    OrderId: index
+                    OrderId: index,
                 })
             })
 
             let postParams = {
                 GraphCategoryId: this.GraphCategoryId[0],
-                GraphRelations: totalLst
+                GraphRelations: totalLst,
             }
             console.log(totalLst, 'list')
-            updateRelation({ postParams }).then(res => {
+            updateRelation({ postParams }).then((res) => {
                 if (res.Result == 'success') {
                     this.$message.success('添加成功!')
                     this.$emit('mesg')
@@ -251,8 +251,8 @@ export default {
         },
         treeCancel() {
             this.modalShow4 = false
-        }
-    }
+        },
+    },
 }
 </script>
 

+ 13 - 95
src/views/overview/index.vue

@@ -82,7 +82,7 @@
                 <div class='view-right-box'>
                     <div class='lb-right'>
                         <div v-if='pic1.length>0' style='height:100%'>
-                            <rotation type='2' :rotationImg='pic1' :key='1' @scan='scan'></rotation>
+                            <rotation type='5' :rotationImg='pic1' :key='1' @scan='scan'></rotation>
                             <div class='lb-icon' @click='picClick("1")'></div>
                             <img class='lb-img' @click='picClick("1")' src='../../assets/imgs/zk.png' alt />
                         </div>
@@ -132,82 +132,12 @@
         </div>
         <PicModal ref='picModal'></PicModal>
     </div>
-    <!-- <div class='view-right-bottom' v-for='(item,index) in rightA' :key='index'>
-                            <div class='view-right-bottom-l'>{{item.type}}</div>
-                            <div class='view-right-bottom-r'>{{item.company}}</div>
-    </div>-->
-    <!-- <div class='view-left-box'>
-                    <div class='view-left-top'>
-                        <div class='view-top-imgL'>
-                            <rotation :rotationImg='rotationImg'></rotation>
-                        </div>
-                        <div class='view-top-imgR'>
-                            <rotation :rotationImg='rotationImg'></rotation>
-                        </div>
-                    </div>
-                    <div class='view-left-bottom'>
-                        <nav>
-                            <span></span>
-                            <span>建筑综合信息</span>
-                        </nav>
-                        <p class='place-p'>
-                            <span>福建省三明市梅列区东乾二路1号15幢三明万达广场4楼201室福建省三明市梅列区东乾二路1号</span>
-                        </p>
-                        <span class='place-hr'></span>
-                        <div class='place-bottom'>
-                            <div class='place-bottom-row'>
-                                <div>
-                                    <span>项目名称</span>
-                                    <span>建筑高度</span>
-                                    <span>楼层分布</span>
-                                    <span>车位信息</span>
-                                </div>
-                                <div style='min-width:172px;'>
-                                    <span>三明万达广场</span>
-                                    <span>裙房31.22m</span>
-                                    <span>地上5层/地下2层</span>
-                                    <span>地上832个/地下0个</span>
-                                </div>
-                            </div>
-                            <div class='place-bottom-row'>
-                                <div>
-                                    <span>竣工日期</span>
-                                    <span>开业日期</span>
-                                    <span>移交日期</span>
-                                </div>
-                                <div style='min-width:172px;'>
-                                    <span>2016年11月21日</span>
-                                    <span>2016年12月30日</span>
-                                    <span>2017年04月30日</span>
-                                </div>
-                            </div>
-                            <div class='place-bottom-row'>
-                                <div>
-                                    <span style='margin-bottom:32px'>建筑面积</span>
-                                    <span>租赁面积</span>
-                                </div>
-                                <div>
-                                    <span>
-                                        13.07万㎡
-                                        其中地上9.90万㎡、地下3.55万㎡
-                                    </span>
-                                    <span>
-                                        6.45㎡
-                                        其中地上5.82万㎡,地下0.63万㎡
-                                    </span>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-    </div>-->
 </template>
 <script>
 import PicModal from './picModal'
 import { queryFact } from '@/api/overview'
 import { mapGetters } from 'vuex'
-import {
-    query
-} from "@/utils/query"
+import { query } from '@/utils/query'
 export default {
     data() {
         return {
@@ -324,20 +254,9 @@ export default {
         },
         picClick(type) {
             if (type === '1') {
-                this.$refs.picModal.showModal(this.pic1)
-                //     if (this.pic1.length >= this.va) {
-                //         this.$refs.picModal.showModal([this.pic1[this.va - 1]])
-                //     } else {
-                //         this.$refs.picModal.showModal(this.pic1)
-                //     }
+                this.$refs.picModal.showModal(this.pic1, type)
             } else {
-                this.$refs.picModal.showModal(this.pic2)
-
-                //     if (this.pic2.length >= this.va) {
-                //         this.$refs.picModal.showModal([this.pic2[this.va - 1]])
-                //     } else {
-                //         this.$refs.picModal.showModal(this.pic2)
-                //     }
+                this.$refs.picModal.showModal(this.pic2, type)
             }
         },
         findxmzl() {
@@ -346,7 +265,7 @@ export default {
             // }
         },
         query() {
-            let plazaId = this.$route.query.plazaId ?this.$route.query.plazaId:this.plazaId
+            let plazaId = this.$route.query.plazaId ? this.$route.query.plazaId : this.plazaId
             let params = {
                 getParams: {
                     plazaId: plazaId,
@@ -380,8 +299,8 @@ export default {
                     this.shuzihuayijiao = res.shuzihuayijiao ? res.shuzihuayijiao : ''
                     if (res.plazaName) {
                         this.$store.commit('SETPLAZENAME', res.plazaName)
-                    }else{
-                         this.$store.commit('SETPLAZENAME','')
+                    } else {
+                        this.$store.commit('SETPLAZENAME', '')
                     }
                 }
             })
@@ -425,14 +344,13 @@ export default {
     },
     watch: {
         '$store.state.plazaId': {
-          handler(val,nel){
-           console.log('val',val,nel)
-           this.query()
-          },
-          immediate:true
-        }
+            handler(val, nel) {
+                console.log('val', val, nel)
+                this.query()
+            },
+            immediate: true,
+        },
     },
-
 }
 </script>
 <style lang="less" scoped>

+ 22 - 14
src/views/overview/picModal.vue

@@ -1,38 +1,44 @@
 <template>
     <div class='picDia'>
-        <el-dialog :visible.sync='dialogVisible' width='90%' :close-on-click-modal='false' :show-close='false'>
-            <!-- <img
-                src='https://ss0.bdstatic.com/94oJfD_bAAcT8t7mm9GUKT-xh_/timg?image&quality=100&size=b4000_4000&sec=1592807833&di=5adf17cda9f46c37696da5b1d0aec9dc&src=http://a3.att.hudong.com/14/75/01300000164186121366756803686.jpg'
-                alt
-            />-->
-            <rotation :size='sizePic' :key='key' :type='3' v-if='rotationImg.length>0' :rotationImg='rotationImg' style='height:100%;width:100%'></rotation>
+        <el-dialog :visible.sync='dialogVisible' width='75%' :close-on-click-modal='false' :show-close='false'>
+            <pic-view-rotation
+                :picType='picType'
+                :size='sizePic'
+                :key='key'
+                v-if='rotationImg.length>0'
+                :rotationImg='rotationImg'
+                style='height:100%;width:100%'
+            ></pic-view-rotation>
             <span class='close' @click='close'>X</span>
         </el-dialog>
     </div>
 </template>
 
 <script>
+import PicViewRotation from './picViewRotation'
 export default {
     data() {
         return {
             dialogVisible: false,
             mode: 'top',
-            rotationImg: [],
+            rotationImg: [], //要展示的大图
+            picType: null, //图片类型  1 区位图 2 鸟瞰图
             key: 1,
-            sizePic: '',
-            imgInfo: {}
+            sizePic: '', //横向||纵向展示 width 横向展示 height 纵向展示
+            imgInfo: {}, //返回图片信息
         }
     },
     methods: {
-        showModal(params) {
+        showModal(params, type) {
             this.key++
             this.dialogVisible = true
             this.rotationImg = params
+            this.picType = type
             if (this.rotationImg.length > 0) {
                 let img = new Image()
                 img.src = this.rotationImg[0].url
                 const vm = this
-                img.onload = function() {
+                img.onload = function () {
                     vm.$set(vm.imgInfo, 'width', img.width)
                     vm.$set(vm.imgInfo, 'height', img.height)
                     if (vm.imgInfo.width > vm.imgInfo.height) {
@@ -40,14 +46,16 @@ export default {
                     } else {
                         vm.sizePic = 'height'
                     }
-                    console.log(vm.sizePic)
                 }
             }
         },
         close() {
             this.dialogVisible = false
-        }
-    }
+        },
+    },
+    components: {
+        PicViewRotation,
+    },
 }
 </script>
 

+ 102 - 0
src/views/overview/picViewRotation.vue

@@ -0,0 +1,102 @@
+/**
+*@author:Guoxiaohuan
+*@date:2020.05.26
+*@info:图片轮播
+*/
+<template>
+    <div class='wanda-rotation rotationFullYlt'>
+        <div v-if='rotationImg.length==1&&size=="height"' class='rotationConType'>
+            <img :src='rotationImg[0].url' alt />
+        </div>
+        <div v-else-if='rotationImg.length==1&&size=="width"' class='rotationCon'>
+            <img :src='rotationImg[0].url' alt />
+        </div>
+        <el-carousel
+            v-else
+            style='height:100%;width:100%'
+            :interval='5000'
+            indicator-position='none'
+            :arrow='rotationImg.length == 1 ? "never":"always"'
+        >
+            <el-carousel-item v-for='(item,index) in rotationImg' :key='index'>
+                <img :src='item.url' alt style='  width: 100%; height: 100%;object-fit: container;' />
+            </el-carousel-item>
+        </el-carousel>
+    </div>
+</template>s
+<script>
+export default {
+    name: 'Rotation',
+    props: ['rotationImg', 'picType', 'size'],
+    data() {
+        return {}
+    },
+    methods: {},
+    // 解决两张图片时,轮播顺序反向
+    created() {
+        if (this.rotationImg && this.rotationImg.length === 2) {
+            this.rotationImg = [...this.rotationImg, ...this.rotationImg]
+        }
+    },
+    mounted() {},
+}
+</script>
+<style lang="less" scoped>
+.wanda-rotation {
+    height: 100%;
+    /deep/ .el-carousel__button {
+        background-color: rgba(2, 91, 170, 1);
+    }
+    /deep/ .el-carousel__arrow {
+        background-color: #00000050;
+    }
+    /deep/ .el-carousel__container {
+        height: 100%;
+    }
+    /deep/ .el-carousel__item {
+        text-align: center;
+        background: #fff;
+    }
+    img {
+        width: 100%;
+    }
+}
+.rotationFullYlt {
+    width: 100%;
+    height: 100%;
+    overflow: hidden;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    /deep/ .el-carousel__container {
+        height: 100% !important;
+    }
+    .rotationConType {
+        height: 100%;
+        width: 100%;
+        overflow: auto;
+        /deep/ .el-carousel__item {
+            text-align: center;
+            background: #fff;
+        }
+        img {
+            height: 100%;
+            object-fit: contain;
+        }
+    }
+
+    .rotationCon {
+        width: 100%;
+        height: 100%;
+        /deep/ .el-carousel__item {
+            text-align: center;
+            background: #fff;
+        }
+        img {
+            width: 100%;
+            height: 100%;
+            object-fit: contain;
+        }
+    }
+}
+</style>

+ 0 - 0
src/views/overview/viewRotation.vue


+ 27 - 27
vue.config.js

@@ -1,17 +1,17 @@
-const CompressionPlugin = require("compression-webpack-plugin")
+const CompressionPlugin = require('compression-webpack-plugin')
 module.exports = {
     devServer: {
         port: 8090,
         proxy: {
-            "/data": {
-                target: "http://60.205.177.43",
-                // target: 'http://10.199.143.126',
+            '/data': {
+                // target: "http://60.205.177.43",
+                target: 'http://10.199.143.126',
                 // target: 'http://192.168.200.11:9003', //yll
                 // target: 'http://localhost:6040/data/',
                 changeOrigin: true,
                 secure: false,
                 pathRewrite: {
-                    "^/data": "/data",
+                    '^/data': '/data',
                 },
             },
             // // 工程信息化服务
@@ -24,27 +24,27 @@ module.exports = {
             //     },
             // },
             // 万达蜂鸟服务
-            "/wdfn": {
-                target: "http://map.wanda.cn",
+            '/wdfn': {
+                target: 'http://map.wanda.cn',
                 changeOrigin: true,
                 pathRewrite: {
-                    "^/wdfn": "/editor",
+                    '^/wdfn': '/editor',
                 },
             },
             // 图例库服务
-            "/serve": {
+            '/serve': {
                 // target: 'http://192.168.200.87:8088',
-                target: "http://60.205.177.43:8080",
+                target: 'http://60.205.177.43:8080',
                 changeOrigin: true,
                 pathRewrite: {
-                    "^/serve": "",
+                    '^/serve': '',
                 },
             },
-            "/version": {
-                target: "http://mapapp.wanda.cn/",
+            '/version': {
+                target: 'http://mapapp.wanda.cn/',
                 changeOrigin: true,
                 pathRewrite: {
-                    "^/version": "/sgmap/mapversion",
+                    '^/version': '/sgmap/mapversion',
                 },
             },
         },
@@ -56,27 +56,27 @@ module.exports = {
         },
     },
     chainWebpack: (config) => {
-        const svgRule = config.module.rule("svg")
+        const svgRule = config.module.rule('svg')
         svgRule.uses.clear()
         svgRule
-            .use("babel-loader")
-            .loader("babel-loader")
+            .use('babel-loader')
+            .loader('babel-loader')
             .end()
-            .use("vue-svg-loader")
-            .loader("vue-svg-loader")
-        config.output.filename("static/js/[name].[hash].js").end()
-        config.output.chunkFilename("static/js/[name].[hash].js").end()
+            .use('vue-svg-loader')
+            .loader('vue-svg-loader')
+        config.output.filename('static/js/[name].[hash].js').end()
+        config.output.chunkFilename('static/js/[name].[hash].js').end()
     },
     lintOnSave: false,
-    publicPath: "/wandaBmGuide",
+    publicPath: '/wandaBmGuide',
     // 打包名称
-    outputDir: "wandaBmGuide",
+    outputDir: 'wandaBmGuide',
     // 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录
-    assetsDir: "static",
+    assetsDir: 'static',
     transpileDependencies: [
-        "@saga-web", // 指定对第三方依赖包进行babel-polyfill处理
-        "@ant-design",
-        "element-ui",
+        '@saga-web', // 指定对第三方依赖包进行babel-polyfill处理
+        '@ant-design',
+        'element-ui',
     ],
     productionSourceMap: false, //
     // CSS 相关选项