Ver código fonte

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

yunxing 4 anos atrás
pai
commit
6c24b97fa2

+ 5 - 0
src/api/homePage.js

@@ -30,3 +30,8 @@ export function querySystemCard({ getParams }) {
 export function queryEventStatus({ getParams }) {
     return httputils.getJson(`/data/home/queryEventStatus`, getParams)
 }
+
+// 查询集团首页事项状态统计
+export function getExceptionNum({ getParams }) {
+    return httputils.getJson(`/data/home/queryExceptionPlazaInfo`, getParams)
+}

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

@@ -35,7 +35,7 @@
   width: 106px;
   height: 32px;
   background: linear-gradient(180deg, #369cf7 0%, #025baa 50%);
-  opacity: 0.5;
+  /* opacity: 0.5; */
   font-size: 14px;
   color: #ffffff;
   display: flex;
@@ -43,7 +43,7 @@
   justify-content: center;
   cursor: pointer;
   border-radius: 4px;
-  cursor: not-allowed;
+  /* cursor: not-allowed; */
 }
 .overview .view-title .view-button img {
   display: inline-block;

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

@@ -34,7 +34,7 @@
             width: 106px;
             height: 32px;
             background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 50%);
-            opacity: 0.5;
+            // opacity: 0.5;
             font-size: 14px;
             color: #ffffff;
             display: flex;
@@ -42,7 +42,7 @@
             justify-content: center;
             cursor: pointer;
             border-radius: 4px;
-            cursor: not-allowed;
+            // cursor: not-allowed;
             img {
                 display: inline-block;
                 height: 16px;

+ 7 - 4
src/views/equipment/eqDialog.vue

@@ -4,10 +4,13 @@
         <el-dialog :visible.sync='visible' :fullscreen='true' @close='closeModal'>
             <!-- 除了清单和原理页面,别的都有记录事项detailDialog页面 -->
             <div slot='title' class='header-title' v-if='Object.keys(dialogInfo).length>0'>
-                <span class='title-name'>{{systemName}}-{{dialogInfo.label}}</span>
-                <!-- 2020-7-12 查看图纸时 隐藏图标(查看入口) -->
-                <!-- v-if='dialogInfo.id.slice(2,4)!="QD" && dialogInfo.id.slice(2,4)!="YL" && dialogInfo.id.slice(0,4)!="GJSP"' -->
-                <!-- v-if='dialogInfo.id.slice(2,4)!="QD" && dialogInfo.id.slice(2,4)!="YL" && dialogInfo.id.slice(0,4)!="GJSP" && dialogInfo.label !== "查看图纸"' -->
+                <span class='title-name'>{{dialogInfo.label}}-{{systemName}}</span>
+                <!-- icon图标,显示规则 -->
+                <!-- // title右侧 icon入口
+                // 1. 主要设备清单, 系统原理图 不显示 icon
+                // 2. 供电系统 楼层电井(间)控制商铺范围清单(GJSP)不显示icon
+                // 3. 查看图纸 不显示icon
+                // 4. 点开 主要设备维保事项/维修事项, 专维及其他事项 中的日常维保事项,日常维修事项 不显示 icon-->
                 <img v-if='showImg' src='../../assets/imgs/zy2.png' @click='visibalBox' class='title-img' alt />
             </div>
             <!-- 没有tab的页面 -->

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

@@ -14,15 +14,15 @@
                 <ul v-for='(eve,index) in everySystem' :key='"o"+index'>
                     <li class='li-style' :class='{"is-active": eve.id}' @click='dialogVisible(eve)'>
                         <span class='circle'></span>
-                        <el-button
+                        <!-- <el-button
                             type='text'
                             disabled
                             class='hanzi2'
                             title='数字化移交系统上线后可用'
                             v-if='eve.label=="查看图纸"'
                             style='text-align:left'
-                        >{{eve.label}}</el-button>
-                        <span class='hanzi' v-else>{{eve.label}}</span>
+                        >{{eve.label}}</el-button>-->
+                        <span class='hanzi'>{{eve.label}}</span>
                     </li>
                 </ul>
             </div>
@@ -164,30 +164,30 @@ export default {
             // console.log('dialogVisible')
             console.log(eve)
             // 点击后显示弹窗组件
-            if (eve.label != '查看图纸') {
-                this.ShowDialog = true
-                this.$nextTick(() => {
-                    this.$refs.dialog.showModal(eve)
-                })
-                // pvuv接口记录
-                // 发送pvUv
-                const data = {
-                    plazaId: this.plazaId,
-                }
+            // if (eve.label != '查看图纸') {
+            this.ShowDialog = true
+            this.$nextTick(() => {
+                this.$refs.dialog.showModal(eve)
+            })
+            // pvuv接口记录
+            // 发送pvUv
+            const data = {
+                plazaId: this.plazaId,
+            }
 
-                let postParams = {
-                    type: 'modal',
-                    target: eve.id,
-                    parameter: eve.label,
-                }
-                getPvUv(data, postParams)
-                    .then((res) => {
-                        console.log('pvuv', res)
-                    })
-                    .catch((res) => {
-                        console.log('error', res)
-                    })
+            let postParams = {
+                type: 'modal',
+                target: eve.id,
+                parameter: eve.label,
             }
+            getPvUv(data, postParams)
+                .then((res) => {
+                    console.log('pvuv', res)
+                })
+                .catch((res) => {
+                    console.log('error', res)
+                })
+            // }
         },
         /**
          * 关闭弹窗后,重新渲染 楼层组件

+ 132 - 35
src/views/equipment/table/lookPageTable.vue

@@ -2,37 +2,44 @@
 <template>
     <div class='look-page'>
         <div class='eq-list-top'>
+            <Select @change='getList(true)' v-model='floor' width='160' tipPlace='top' caption='楼层 :' :selectdata='floorData'></Select>
             <el-input
-                placeholder='搜索文件名'
+                placeholder='搜索文件名/上传文件名'
                 size='small'
-                @keyup.enter.native='getList'
-                @blur="getList"
+                @keyup.enter.native='getList(true)'
+                @blur='getList(true)'
                 clearable
                 prefix-icon='el-icon-search'
                 v-model='keyword'
-                style='width:192px;margin-right:12px'
+                style='width:220px;margin-left:12px'
             ></el-input>
-            <Select @change='getList' v-model='floor' width='180' tipPlace='top' caption='楼层 :' :selectdata='floorSelect'></Select>
-            <!-- <Select @change='getList' v-model='fileType' width='180' tipPlace='top' caption='文件类型:' :selectdata='files'></Select> -->
         </div>
         <el-table :data='tableData' style='width: 100%' :border='true'>
             <el-table-column type='index' label='序号' width='60' :index='indexMethod'></el-table-column>
-            <el-table-column prop='lb' label='分类' width='300' show-overflow-tooltip resizable>
-                <template slot-scope='{row}'>{{row.assetnum || '--'}}</template>
+            <el-table-column prop='lb' label='楼层' width='100' show-overflow-tooltip resizable>
+                <template slot-scope='{row}'>{{row.floor || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='sl' label='文件名称' show-overflow-tooltip resizable>
-                <template slot-scope='{row}'>{{row.assetnum || '--'}}</template>
+            <el-table-column prop='lb' label='文件目录' width='300' show-overflow-tooltip resizable>
+                <template slot-scope='{row}'>{{row.fileDir || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='assetnum' label='文件类型' width='70' show-overflow-tooltip resizable>
-                <template slot-scope='{row}'>{{row.assetnum || '--'}}</template>
+            <el-table-column prop='sl' label='文件名' show-overflow-tooltip resizable>
+                <template slot-scope='{row}'>{{row.fileName || '--'}}</template>
+            </el-table-column>
+            <el-table-column prop='assetnum' label='文件类型' width='100' show-overflow-tooltip resizable>
+                <template slot-scope='{row}'>{{row.fileType || '--'}}</template>
             </el-table-column>
             <el-table-column prop='assetnum' label='上传文件名'>
-                <template slot-scope='{row}'>{{row.assetnum || '--'}}</template>
+                <template slot-scope='{row}'>{{row.uploadFileName || '--'}}</template>
             </el-table-column>
-            <el-table-column label='操作' width='70'>
+            <el-table-column label='操作' width='170'>
                 <template slot-scope='{row}'>
+                    <el-button type='text' size='mini' @click='handlePreview(row)'>
+                        <!-- <i class='el-icon-download'></i> -->
+                        预览
+                    </el-button>
                     <el-button type='text' size='mini' @click='handleDown(row)'>
-                        <i class='el-icon-download'></i>预览
+                        <!-- <i class='el-icon-download'></i> -->
+                        下载{{row.fileSize? `(${row.fileSize})` :''}}
                     </el-button>
                 </template>
             </el-table-column>
@@ -43,6 +50,7 @@
                 layout='prev, pager, next'
                 :total='total'
                 :page-size='size'
+                :current-page='page'
                 @prev-click='pageChanged'
                 @next-click='pageChanged'
                 @current-change='pageChanged'
@@ -53,51 +61,140 @@
 <script>
 import { queryEquipmentList } from '@/api/equipmentList.js'
 import { mapGetters } from 'vuex'
+import { random } from 'lodash'
 export default {
     data() {
         return {
-            tableData: [{ index: 1 }],
+            tableData: [],
+            floorData: [],
             total: 0,
-            currentPage: 1,
+            page: 1,
             size: 11,
             keyword: '',
-            floor: '',
+            floor: 'all',
             fileType: '',
-            files: []
+            files: [],
         }
     },
     props: ['major'],
     computed: {
-        ...mapGetters(['floorSelect'])
+        ...mapGetters(['floorSelect']),
     },
     methods: {
         //序号的方法
         indexMethod(index) {
-            return (this.currentPage - 1) * this.size + index + 1
+            return (this.page - 1) * this.size + index + 1
         },
+        /**
+         * 分页器选择页码
+         */
         pageChanged(page, size) {
-            this.currentPage = page
+            this.page = page
             this.getList()
         },
-        getList() {
+        /**
+         * 获取查看图纸列表
+         * @param { Boolean } initPage 是否重置页码, true是 false 否
+         *                    更改楼层,搜索文件名时,重置页码
+         */
+        getList(initPage) {
+            // 重置页码
+            if (initPage) {
+                this.total = 0
+                this.page = 1
+            }
             let postParams = {}
+            const { page, size, keyword, floor } = this
             let data = {
-                page: this.currentPage,
-                size: this.size,
-                plazaId: this.$store.state.plazaId,
-                major: this.major
+                page,
+                size,
+            }
+            console.log(data)
+            // 楼层不为全部时,上送楼层字段
+            if (floor !== 'all') {
+                postParams.floor = floor
+            }
+            // 搜索文件名/上传文件名
+            if (keyword) {
+                data.keyword = `${keyword}:fileName,uploadFileName;`
+            }
+            /**
+             * 模拟数据
+             */
+            let mockData = [
+                {
+                    floor: 'F1',
+                    fileDir: '03-MEP机电/02-EL电气',
+                    fileId: '123',
+                    fileName: 'F01层结构',
+                    fileType: 'pdf',
+                    fileSize: '99.2M',
+                    uploadFileName: '万达广场 地库电梯井施工图.dwg',
+                    fireUrl: 'xxxxx',
+                },
+                {
+                    floor: 'B2',
+                    fileDir: 'dist/test2',
+                    fileId: '123',
+                    fileName: '文件2',
+                    fileType: 'cad',
+                    fileSize: '1.3M',
+                    uploadFileName: '上传文件2',
+                    fireUrl: 'xxxxx',
+                },
+            ]
+            initPage && (this.total = random(15, 90))
+            let max = this.size - 2
+            if (this.page === Math.ceil(this.total / this.size)) {
+                max = (this.total % this.size) - 2
+            }
+            for (let index = 0; index < max; index++) {
+                mockData.push({})
+            }
+            this.tableData = mockData
+        },
+        /**
+         * 预览
+         */
+        handlePreview(row) {
+            window.open('http://szhyj.wanda.cn/dwg/index.html?fileId=123456')
+        },
+        /**
+         * 下载
+         */
+        handleDown(row) {
+            window.open('http://mapapp.wanda.cn/editor/fmap/1000772_54/1000772_54.fmap')
+        },
+        /**
+         * 页面窗口变化,更新 size值
+         * 不会实时重新渲染页面列表,只是适配不同宽度浏览器使用
+         */
+        handleResize() {
+            let width = document.body.clientWidth
+            if (width >= 1920) {
+                this.size = 15
+            } else if (width >= 1600) {
+                this.size = 14
+            } else {
+                this.size = 13
             }
-            queryEquipmentList({ data, postParams }).then(res => {
-                //console.log(res)
-                this.tableData = res.data.data
-                this.total = res.data.count
-            })
         },
-        handleDown() {}
+    },
+    created() {
+        // 楼层筛选下拉菜单
+        this.floorData = [{ id: 'all', name: '全部' }, ...this.floorSelect]
     },
     mounted() {
-        // this.getList()
-    }
+        // 根据分辨率更改size值
+        this.handleResize()
+        // 查询列表
+        this.getList()
+        // 监听resize事件
+        window.addEventListener('resize', this.handleResize)
+        this.$once('hook:beforeDestroy', () => {
+            window.removeEventListener('resize', this.handleResize)
+        })
+    },
 }
 </script>
 <style lang="less" scoped>

+ 3 - 3
src/views/overview/index.vue

@@ -258,9 +258,9 @@ export default {
             }
         },
         findxmzl() {
-            // if (this.shuzihuayijiao) {
-            //     window.open(`${this.shuzihuayijiao}`, true)
-            // }
+            if (this.shuzihuayijiao) {
+                window.open(`${this.shuzihuayijiao}`, true)
+            }
         },
         query() {
             let plazaId = this.$route.query.plazaId ? this.$route.query.plazaId : this.plazaId

+ 22 - 15
src/views/statistics/index.vue

@@ -194,7 +194,7 @@
                     />
                 </div>
                 <section>
-                    <table id="tableReport">
+                    <table id="tableReport" class="table-report">
                         <thead>
                             <tr>
                                 <th width="10%">序号</th>
@@ -213,11 +213,10 @@
                                 <td >{{td.center}}</td>
                                 <td >{{td.zone}}</td>
                                 <td >{{td.name}}</td>
-                                <td >{{td.exceptionReason}}</td>
+                                <td >{{td.reason}}</td>
                             </tr>
                         </tbody>
                     </table>
-                    
                     <Pagination
                         v-show="pageCount>9"
                         :pageCount="pageCount"
@@ -402,23 +401,31 @@ export default {
                 if (res.result === 'success') {
                     let flattenArr = []
                     recursionData(res.data)
+                    console.log(flattenArr)
+                    let finalHandledArr = []
                     flattenArr.forEach(item => {
                         let path = item.path.split('/')
-                        item.center = path[0]
-                        item.zone = path[1]
+                        item.classExList.forEach(each => {
+                            let obj = {}
+                            obj.center = path[0]
+                            obj.zone = path[1]
+                            obj.name = item.name
+                            obj.reason = each.description
+                            finalHandledArr.push(obj)
+                        })
                     })
-                    this.storeExceptionData = cloneDeep(flattenArr)
+                    console.log(finalHandledArr)
+                    this.storeExceptionData = finalHandledArr
                     this.exceptionData =  this.storeExceptionData.slice(this.currentPage, this.pageSize)
-                    this.pageCount = flattenArr.length
+                    this.pageCount = finalHandledArr.length
                     function recursionData(data, parent) {
-                        data.forEach(item => {
+                        data.forEach((item , index) => {
                             item.name = item.cname
                             item.id = item.ccode
                             if (parent) {
                                 item.path = parent + '/' + item.cname
                             }
                             if (item.level === 0) {
-                                item.exceptionReason = item.classExList[0].description
                                 flattenArr.push(item)
                             }
                             let children = item.children
@@ -901,7 +908,7 @@ export default {
                 maxZoom: 10,
                 closePopupOnClick:true,
                 doubleClickZoom:false,
-                wheelPxPerZoomLevel:20
+                wheelPxPerZoomLevel:20,
                 // scrollWheelZoom:false,
                 // dragging: false,
             })
@@ -951,7 +958,6 @@ export default {
          *@description 打开弹窗
          */
         openMaskPanel(system) {
-            return;
             this.tabData = []
             system.assetTypeList.forEach(item => {
                 if (item.is_exception_num > 0) {
@@ -1396,6 +1402,7 @@ export default {
                         border-bottom:1px solid #E4E6E7;
                         td{
                             padding: 0 24px;
+                            line-height: 22px;
                         }
                     }
                 }
@@ -1768,9 +1775,9 @@ export default {
             }
             .map-container {
                 position: relative;
-                height: 70vh;
+                height: 90%;
                 #map {
-                    height: 70vh;
+                    height: 100%;
                     overflow: hidden;
                     
                     svg {
@@ -1780,7 +1787,7 @@ export default {
                 .legend {
                     position: absolute;
                     left: 1.4rem;
-                    bottom: 2.7rem;
+                    bottom: 10rem;
                     padding: 0.6rem;
                     background: white;
                     .legend-bar {
@@ -1837,7 +1844,7 @@ export default {
                 .list {
                     margin-top: 1.4rem;
                     overflow: hidden;
-                    height: calc(100% - 4.5rem);
+                    height: calc(100% - 7.5rem);
                     ul {
                         li {
                             display: flex;