Browse Source

Merge branch 'develop' of http://39.106.8.246:3003/web/wanda-bm-guide into develop

YaolongHan 4 years ago
parent
commit
9d7d0dac94

+ 2 - 0
src/assets/css/rotation.css

@@ -66,6 +66,7 @@
   margin-top: 12px;
   margin-bottom: 10px;
   position: relative;
+  border: 1px solid #ccc;
 }
 .overview .view-box .view-left .lb-left img {
   width: 100%;
@@ -193,6 +194,7 @@
   margin-top: 12px;
   margin-bottom: 10px;
   position: relative;
+  border: 1px solid #ccc;
 }
 .overview .view-box .view-right .view-right-box .lb-right .lb-icon {
   z-index: 99;

+ 2 - 0
src/assets/css/rotation.less

@@ -63,6 +63,7 @@
                 margin-top: 12px;
                 margin-bottom: 10px;
                 position: relative;
+                border: 1px solid #ccc;
                 img {
                     width: 100%;
                     // height: 100%;
@@ -190,6 +191,7 @@
                     margin-top: 12px;
                     margin-bottom: 10px;
                     position: relative;
+                    border: 1px solid #ccc;
                     .lb-icon {
                         z-index: 99;
                         position: absolute;

+ 2 - 2
src/components/PicLarge/src/picLarge.vue

@@ -12,7 +12,7 @@
                         <li @click='getIndex(item.url)'>
                             <img :src='item.url' />
                         </li>
-                        <!-- <span>{{item.name}}</span> -->
+                        <span>{{item.name}}</span>
                     </ul>
                 </div>
                 <div class='pic-right'>
@@ -119,7 +119,7 @@ export default {
 <style lang="less">
 .tpyl {
     .el-dialog {
-        height: 80%;
+        height: 80% !important;
         margin-top: 5vh !important;
     }
     .el-dialog__body {

+ 2 - 3
src/components/Rotation/src/rotation.vue

@@ -10,6 +10,7 @@
                 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
             />-->
+            <img :src='rotationImg[0].url' alt />
         </div>
         <el-carousel v-else trigger='click' style='height:100%' :interval='5000' arrow='always'>
             <el-carousel-item v-for='(item,index) in rotationImg' :key='index'>
@@ -27,9 +28,7 @@ export default {
             rotationImgs: [{ url: require('@/assets/images/login_back.png') }]
         }
     },
-    mounted() {
-        console.log(this.rotationImg)
-    }
+    mounted() {}
 }
 </script>
 <style lang="less" scoped>

+ 138 - 9
src/components/floorList.vue

@@ -6,20 +6,22 @@
 <template>
     <div class='floor-box'>
         <div class='floor-list'>
-            <i class='el-icon-caret-top icon-top' v-if='showT' @click='removeTop(num)'></i>
+            <!-- <i class='el-icon-caret-top icon-top' v-if='showT' @click='removeTop(num)'></i> -->
+            <i class='el-icon-caret-top icon-top' v-if='showT' @click='changeFloor(1)'></i>
             <i class='el-icon-caret-top icon-top' v-else style='color:#ccc'></i>
             <div class='floor-out'>
                 <div class='floor-center'>
                     <div
                         class='floor-item'
-                        :class='item.code==floorId?"isActive":""'
+                        :class='item.seq == currentFloorId?"isActive":""'
                         @click='tabFloor(item,index)'
                         v-for='(item,index) in floorsArr'
                         :key='index'
                     >{{item.code}}</div>
                 </div>
             </div>
-            <i class='el-icon-caret-bottom icon-bottom' v-if='showB' @click='removeBottom(num)'></i>
+            <!-- <i class='el-icon-caret-bottom icon-bottom' v-if='showB' @click='removeBottom(num)'></i> -->
+            <i class='el-icon-caret-bottom icon-bottom' v-if='showB' @click='changeFloor(-1)'></i>
             <i class='el-icon-caret-bottom icon-bottom' v-else style='color:#ccc'></i>
         </div>
     </div>
@@ -41,23 +43,144 @@ export default {
                 gname: 'f1',
                 name: '第1层',
                 seq: 100
-            }
+            },
+            currentFloorId: null,
+            floorIdArr: []
         }
     },
     mounted() {
-        this.removeBottom(-1)
-        this.tabFloor()
+        // this.removeBottom(-1)
+        // this.tabFloor()
+        console.log(`floorsArr---------------:\n`, this.floorsArr)
+        this.init()
+    },
+    watch: {
+        // 监听floorsArr的变化
+        /* floorsArr: {
+            handler(newVal, oldVal) {
+                this.init()
+            },
+            deep: true,
+            immediate: true
+        } */
     },
     computed: {
         ...mapGetters(['floorsArr'])
     },
     methods: {
-        tabFloor(item = this.floor, index) {
+        init() {
+            window.vm = this
+            this.floorIdArr = []
+            this.floorsArr.map(item => {
+                this.floorIdArr.push(item.seq)
+            })
+            console.log('cookie:', this.$cookie.get('currentFloorId'))
+            this.currentFloorId = Number(this.$cookie.get('currentFloorId') || 100)
+            this.changeFloor(0)
+        },
+        /**
+         * @name changeFloor
+         * @param {Number} flag 1:向上滚动楼层, -1向下滚动 , 0:进入页面初始化时,执行位置处理
+         * @description 点击图例下方的,上下切换按钮
+         */
+        changeFloor(flag) {
+            console.log(this.floorIdArr)
+            const len = this.floorIdArr.length
+            let index = this.floorIdArr.findIndex(item => item === this.currentFloorId)
+            // 点击上箭头
+            if (flag === 1) {
+                index--
+                this.currentFloorId = this.floorIdArr[index]
+            } else if (flag === -1) {
+                //点击下箭头
+                index++
+                this.currentFloorId = this.floorIdArr[index]
+            }
+            // 数据处理
+            this.handleCookie()
+            // debugger
+            console.log('---------------index:', index, '--------------')
+            console.log('---------------floorIdArr:', this.floorIdArr, '--------------')
+            //楼层位置处理,
+            const inner = document.querySelectorAll('.floor-item')
+            const innerbox = document.querySelector('.floor-center')
+            // 页面显示5条,当第五条以上,进行marginTop修改
+            // index从0开始
+            // TODO: 需要修改可以修改这里,配置页面样式,修改showNumber和height
+            let showNumber = 5, //页面中展示的楼层条数
+                height = 32, //一个楼层的div标签高度
+                timer = 500 //动画时长
+            // flag 为0时,timer设置为0
+            flag === 0 && (timer = 0)
+            if (index >= showNumber - 1) {
+                index < len - 1 && animate(innerbox, { marginTop: -height * (index - (showNumber - 2)) }, timer)
+            } else {
+                // 前 showNumber 条的margin-top设置为0
+                animate(innerbox, { marginTop: 0 }, 500)
+            }
+            // 处理上下按钮禁用逻辑
+            this.handleUpDownStatus(index, len)
+        },
+        /**
+         * @name handleUpDownStatus
+         * @param { Number } index 当前楼层在floorIdArr中的下标
+         * @param { Number } len    floorIdArr的长度
+         * @description 处理上下按钮禁用逻辑
+         */
+        handleUpDownStatus(index, len) {
+            switch (index) {
+                // 第一条的上箭头禁用
+                case 0:
+                    this.currentFloorId = this.floorIdArr[0]
+                    this.showT = false
+                    this.showB = true
+                    break
+                //  最后一条的 下箭头设置为禁用
+                case len - 1:
+                    this.currentFloorId = this.floorIdArr[len - 1]
+                    console.log('currentFloorId', this.currentFloorId)
+                    this.showT = true
+                    this.showB = false
+                    break
+                // 默认都可以点击
+                default:
+                    this.showT = true
+                    this.showB = true
+                    break
+            }
+        },
+        /**
+         * @name handleCookie
+         * @description cookie数据处理
+         */
+        handleCookie() {
+            let currentFloor = this.floorsArr.filter(item => item.seq == this.currentFloorId)[0]
+            console.log('------------------------')
+            console.log('currentFloor', currentFloor)
+            console.log('------------------------')
+            this.$cookie.set('floorNow', currentFloor.code, 3)
+            this.$cookie.set('floorMapId', currentFloor.gname, 3)
+            this.$cookie.set('currentFloorId', currentFloor.seq, 3)
+            this.floorId = this.$cookie.get('floorNow') || currentFloor.code
+            this.floorMapIdName = this.$cookie.get('floorMapId') || currentFloor.gname
+            this.$emit('emitFloor', currentFloor)
+        },
+        /**
+         * @name tabFloor
+         * @param {Object} 选中的楼层信息
+         * @param {Number} 楼层信息在floorsArr数组中的位置
+         */
+        tabFloor(item, index) {
+            this.currentFloorId = this.floorIdArr[index]
+            this.handleCookie()
+            this.handleUpDownStatus(index, this.floorIdArr.length)
+        },
+        /* tabFloor(item = this.floor, index) {
             console.log(this.num)
             if (this.num <= -1) {
                 this.showT = true
             }
-            if (this.num >= -1) {
+            if (this.num > -1) {
                 this.showB = true
             }
             this.$cookie.set('floorNow', item.code, 3)
@@ -65,7 +188,8 @@ export default {
             this.floorId = this.$cookie.get('floorNow') || item.code
             this.floorMapIdName = this.$cookie.get('floorMapId') || item.gname
             this.$emit('emitFloor', item)
-        },
+        }, */
+
         removeTop(num) {
             console.log(num)
             if (num == -1) {
@@ -117,6 +241,7 @@ export default {
     .floor-list {
         width: 44px;
         height: 212px;
+        // height: 312px;
         background: rgba(255, 255, 255, 1);
         box-shadow: 0px 2px 15px 0px rgba(31, 36, 41, 0.08);
         border-radius: 2px;
@@ -125,6 +250,8 @@ export default {
         text-align: center;
         .floor-out {
             height: 160px;
+            // height: 312px;
+            //TODO:
             overflow: hidden;
             // overflow-y: auto;
             position: relative;
@@ -133,6 +260,8 @@ export default {
             // }
 
             .floor-center {
+                // TODO:
+                // margin-top: 0 !important;
                 .floor-item {
                     width: 36px;
                     height: 32px;

+ 0 - 5
src/store/index.js

@@ -54,10 +54,6 @@ export default new Vuex.Store({
             state.fmapID = data
         },
     },
-    //   const params = {
-    //     username: 'aiyu6'
-    // }
-
     actions: {
         // 获取项目列表、userId
         async getUserInfo({ commit }, palyload) {
@@ -74,7 +70,6 @@ export default new Vuex.Store({
             })
         },
         getFloors(context) {
-            console.log(context)
             queryFloor({ plazaId: context.state.plazaId }).then((res) => {
                 if (res.result == 'success') {
                     context.commit('SETFLOORS', res.data)

+ 2 - 2
src/views/equipment/table/standTable.vue

@@ -33,8 +33,8 @@
         </div>
         <el-table :data='tableData' :border='true' style='width: 100%' @row-click='rowHandle'>
             <el-table-column type='index' label='序号' width='80'></el-table-column>
-            <el-table-column prop='classqc' label='设备名称' show-overflow-tooltip resizable>
-                <template slot-scope='{row}'>{{row.classqc || '--'}}</template>
+            <el-table-column prop label='设备名称' show-overflow-tooltip resizable>
+                <template slot-scope='{row}'>{{row.type_name || '--'}}</template>
             </el-table-column>
             <!-- sbjc -->
             <el-table-column prop='sl' label='数量' width='100'>

+ 1 - 1
src/views/equipment/table/wbTable.vue

@@ -222,7 +222,7 @@ export default {
                 row.forEach(el => {
                     let obj = {
                         name: el.description,
-                        url: el.urlname
+                        url: el.url
                     }
                     this.imgUrl.push(obj)
                 })

+ 1 - 1
src/views/equipment/table/wxTable.vue

@@ -229,7 +229,7 @@ export default {
                 row.forEach(el => {
                     let obj = {
                         name: el.description,
-                        url: el.urlname
+                        url: el.url
                     }
                     this.imgUrl.push(obj)
                 })

+ 2 - 2
src/views/other/gcfz1.vue

@@ -13,8 +13,8 @@
         <el-table-column prop label='楼层' :show-overflow-tooltip='true' resizable>
             <template slot-scope='{row}'>{{row.floor||'--'}}</template>
         </el-table-column>
-        <el-table-column prop='roomsl' label='总间数'>
-            <template slot-scope='{row}'>{{row.roomsl||'--'}}</template>
+        <el-table-column prop='beforekf' label='总间数'>
+            <template slot-scope='{row}'>{{row.beforekf||'--'}}</template>
         </el-table-column>
         <el-table-column prop='area' label='面积(㎡)'>
             <template slot-scope='{row}'>{{row.area||'--'}}</template>

+ 1 - 3
src/views/other/zhsxDialog.vue

@@ -32,7 +32,7 @@ export default {
             this.visible = true
         },
         objectSpanMethod({ row, column, rowIndex, columnIndex }) {
-            if (columnIndex === 2) {
+            if (columnIndex === 2 || columnIndex === 3) {
                 if (rowIndex > 0 && row[column.property] === this.tableData[rowIndex - 1][column.property]) {
                     return {
                         rowspan: 0,
@@ -50,8 +50,6 @@ export default {
                         colspan: 1
                     }
                 }
-            } else if (columnIndex == 3) {
-                console.log(row, column)
             }
         }
     }

+ 20 - 9
src/views/room/index.vue

@@ -290,15 +290,6 @@
                                 :placeholder='"请选择"'
                                 style='margin-right:12px'
                             ></Select>
-                            <el-input
-                                @change='Index4'
-                                clearable
-                                placeholder='异常工单编号'
-                                size='small'
-                                prefix-icon='el-icon-search'
-                                v-model='ycgdbhInput5'
-                                style='margin-right:12px;width:220px;'
-                            ></el-input>
                         </div>
                         <div class='dialog-none'>
                             <div class='input-dialog'>
@@ -336,6 +327,26 @@
                                             end-placeholder
                                         ></el-date-picker>
                                     </p>
+                                    <!-- <el-input
+                                @change='Index4'
+                                clearable
+                                placeholder='异常工单编号'
+                                size='small'
+                                prefix-icon='el-icon-search'
+                                v-model='ycgdbhInput5'
+                                style='margin-right:12px;width:220px;'
+                                    ></el-input>-->
+                                    <p class='input-dialog-p'>异常工单编号</p>
+                                    <p class='input-dialog-p2'>
+                                        <el-input
+                                            clearable
+                                            placeholder='异常工单编号'
+                                            size='small'
+                                            prefix-icon='el-icon-search'
+                                            v-model='ycgdbhInput5'
+                                            style='width:200px;'
+                                        ></el-input>
+                                    </p>
                                     <p class='input-dialog-p'>异常工单填报日期</p>
                                     <p class='input-dialog-p2'>
                                         <el-date-picker

+ 2 - 2
src/views/room/room5.vue

@@ -110,8 +110,8 @@ export default {
             if (row) {
                 row.forEach(el => {
                     let obj = {
-                        name: el.DESCRIPTION,
-                        url: el.URLNAME
+                        name: el.description,
+                        url: el.url
                     }
                     this.imgUrl.push(obj)
                 })