Forráskód Böngészése

Merge branch 'dev' of http://39.106.8.246:3003/yunxing/wanda-bm-guide-h5 into dev

zhangyu 4 éve
szülő
commit
4c9ba29b5b

+ 5 - 0
package.json

@@ -17,6 +17,11 @@
     "publish": "node publish.js"
   },
   "dependencies": {
+    "@saga-web/base": "2.1.27",
+    "@saga-web/big": "1.0.113",
+    "@saga-web/draw": "2.1.107",
+    "@saga-web/feng-map": "1.0.47",
+    "@saga-web/graph": "2.1.126",
     "axios": "^0.20.0",
     "compression-webpack-plugin": "^5.0.2",
     "core-js": "^3.6.5",

+ 5 - 1
src/api/equipmentList.js

@@ -51,7 +51,11 @@ export function queryDygjcx({ data, postParams }) {
 export function queryDygjcxline({ getParams }) {
     return httputils.getJson(`/data/sms_dygjcxline/queryDygjcxline`, getParams)
 }
-// 查询更多主要设备
+// 查询更多主要设备 --废弃
 export function queryMoreAsset({ data, postParams }) {
     return httputils.fetchJson(`/data/sms_asset/queryAsset`, data, postParams)
 }
+// 查询更多设备卡片
+export function queryMoreSystemCard({ getParams }) {
+    return httputils.getJson(`/data/sms_asset/moreSystemCard`, getParams)
+}

+ 2 - 2
src/components/equipmentFacilities/Card.vue

@@ -84,7 +84,7 @@ export default {
     height: 100%;
     border-radius: 4px;
     background-size: cover !important;
-    padding: 8px 12px;
+    padding: 8px 0 8px 12px;
     line-height: 25px;
     display: flex;
     flex-direction: column;
@@ -99,6 +99,7 @@ export default {
     }
     .number {
         font-size: 20px;
+        line-height: 20px;
         i {
             font-size: 12px;
             color: #666;
@@ -209,5 +210,4 @@ export default {
         right: 8px;
     }
 }
-
 </style>

+ 72 - 61
src/views/AssetDetail.vue

@@ -599,7 +599,7 @@ export default {
   .m-popup-container {
     width: 80%;
     height: 100%;
-    padding: 55px 20px 10px 20px;
+    padding: 10px 15px;
     .m-popup {
       width: 100%;
       height: calc(100% - 80px);
@@ -615,27 +615,30 @@ export default {
       .system {
         width: 100%;
         height: auto;
-        // 专业系统按钮
-        .system-btn-container {
-          display: flex;
-          width: 100%;
-          flex-wrap: wrap;
-          flex-flow: wrap;
-          .system-btn {
-            width: 50% !important;
-            min-width: 50% !important;
-            max-width: 50% !important;
-            height: 40px;
-            box-sizing: border-box;
-            padding: 10px 10px 10px 0;
-            .m-btn {
-              width: 100%;
-              height: 32px !important;
-              text-align: center;
-              background: #eff0f1;
-              border-radius: 2px;
+         .system-btn-container {
+            display: flex;
+            width: 100%;
+            flex-wrap: wrap;
+            flex-flow: wrap;
+             // 专业系统按钮
+            .system-btn {
+                width: calc(50% - 4px) !important;
+                min-width: calc(50% - 4px) !important;
+                max-width: calc(50% - 4px) !important;
+                height: 32px;
+                margin-bottom: 8px;
+                box-sizing: border-box;
+                .m-btn {
+                    width: 100%;
+                    height: 32px !important;
+                    text-align: center;
+                    background: #eff0f1;
+                    border-radius: 2px;
+                }
+            }
+            .system-btn:not(:nth-child(2n)) {
+                margin-right: 8px;
             }
-          }
         }
         .active {
           background-color: #025baa !important;
@@ -652,42 +655,46 @@ export default {
           height: 25px;
         }
         .system-btn-container {
-          display: flex;
-          width: 100%;
-          flex-wrap: wrap;
-          flex-flow: wrap;
-          .system-btn {
-            width: 33% !important;
-            min-width: 33% !important;
-            max-width: 33% !important;
-            height: 50px;
-            box-sizing: border-box;
-            padding: 5px 10px 5px 0;
-            .m-btn {
-              width: 100%;
-              height: 32px !important;
-              text-align: center;
-              background: #eff0f1;
-              border-radius: 2px;
-              padding: 0 !important;
+            display: flex;
+            width: 100%;
+            flex-wrap: wrap;
+            flex-flow: wrap;
+            .system-btn {
+                width: calc(33.333% - 5.34px) !important;
+                min-width: calc(33.333% - 5.34px) !important;
+                max-width: calc(33.333% - 5.34px) !important;
+                height: 32px;
+                margin-bottom: 8px;
+                box-sizing: border-box;
+                .m-btn {
+                    width: 100%;
+                    height: 32px !important;
+                    text-align: center;
+                    background: #eff0f1;
+                    border-radius: 2px;
+                    padding: 0 !important;
+                }
             }
-          }
-          .self-btn {
-            width: 100% !important;
-            min-width: 100% !important;
-            max-width: 100% !important;
-            height: 50px;
-            box-sizing: border-box;
-            padding: 5px 10px 5px 0;
-            .m-btn {
-              width: 100%;
-              height: 32px !important;
-              text-align: center;
-              background: #eff0f1;
-              border-radius: 2px;
-              padding: 0 !important;
+            .system-btn:not(:nth-child(3n)) {
+                margin-right: 8px;
+            }
+            .self-btn {
+                width: 100% !important;
+                min-width: 100% !important;
+                max-width: 100% !important;
+                height: 50px;
+                box-sizing: border-box;
+                padding: 0;
+                margin-right: 0;
+                .m-btn {
+                    width: 100%;
+                    height: 32px !important;
+                    text-align: center;
+                    background: #eff0f1;
+                    border-radius: 2px;
+                    padding: 0 !important;
+                }
             }
-          }
         }
         .active {
           background-color: #025baa !important;
@@ -707,19 +714,23 @@ export default {
         border-bottom: 1px solid #e6e6e6;
         margin: 20px 0;
       }
-      .footer {
+     .footer {
         position: absolute;
         bottom: 30px;
         right: 0;
         width: 100%;
         height: 35px;
         display: flex;
-        justify-content: space-around;
+        justify-content: space-between;
+        padding: 0 15px;
         .van-button {
-          width: 40%;
-          height: 100%;
-          max-width: 40%;
-          min-width: 40%;
+            width: calc(50% - 7px) !important;
+            min-width: calc(50% - 7px) !important;
+            max-width: calc(50% - 7px) !important;
+            height: 100%;
+        }
+        .van-button:first-child {
+            margin-right: 14px;
         }
       }
     }

+ 2 - 1
src/views/GlobalSearch.vue

@@ -8,7 +8,8 @@
         <p @click="handleClickEngineRoomPicture" class="quick-entry-item">机房平面布置图</p>
         <p @click="handleClickLowVoltageCabinet" class="quick-entry-item">配电室低压出线柜及出线明细</p>
         <p @click="handleClickElectricWell" class="quick-entry-item">电井(间)控制商铺范围</p>
-        <p @click="handleClickMoreEquipmentList" class="quick-entry-item">更多设备</p>
+        <!-- 无更多主要设备页面,删除入口 -->
+        <!-- <p @click="handleClickMoreEquipmentList" class="quick-entry-item">更多设备</p> -->
       </div>
     </div>
     <div v-if="equipList.length" class="equip-box">

+ 7 - 6
src/views/equipmentFacilities/EquipmentList.vue

@@ -142,12 +142,13 @@ export default {
     },
     components: {},
     created() {
-        console.log('created')
-        this.system_code = this.smsxt
-        let { title, category_code } = this.$route.query
-        this.title = title
-        this.category_code = category_code
-        this.onLoad()
+        // console.log('created')
+        // this.system_code = this.smsxt
+        // let { title, category_code } = this.$route.query
+        // this.title = title
+        // this.category_code = category_code
+        
+        // this.onLoad() --会与 activated 中查询重复
     },
     beforeMount() {},
     mounted() {},

+ 0 - 4
src/views/equipmentFacilities/LowVoltageCabinet.vue

@@ -130,10 +130,6 @@ export default {
             // list无数据,不执行后续分页查询
             console.log(this.list)
             console.log(this.count)
-            // TODO: 111
-            this.loading = false
-            this.finished = true
-            return true
             if (!this.list.length) {
                 this.finished = true
                 this.loading = false

+ 72 - 61
src/views/equipmentFacilities/MaintenanceRecordView.vue

@@ -560,7 +560,7 @@ export default {
   .m-popup-container {
     width: 80%;
     height: 100%;
-    padding: 55px 20px 10px 20px;
+    padding: 10px 15px;
     .m-popup {
       width: 100%;
       height: calc(100% - 80px);
@@ -576,27 +576,30 @@ export default {
       .system {
         width: 100%;
         height: auto;
-        // 专业系统按钮
-        .system-btn-container {
-          display: flex;
-          width: 100%;
-          flex-wrap: wrap;
-          flex-flow: wrap;
-          .system-btn {
-            width: 50% !important;
-            min-width: 50% !important;
-            max-width: 50% !important;
-            height: 40px;
-            box-sizing: border-box;
-            padding: 10px 10px 10px 0;
-            .m-btn {
-              width: 100%;
-              height: 32px !important;
-              text-align: center;
-              background: #eff0f1;
-              border-radius: 2px;
+         .system-btn-container {
+            display: flex;
+            width: 100%;
+            flex-wrap: wrap;
+            flex-flow: wrap;
+             // 专业系统按钮
+            .system-btn {
+                width: calc(50% - 4px) !important;
+                min-width: calc(50% - 4px) !important;
+                max-width: calc(50% - 4px) !important;
+                height: 32px;
+                margin-bottom: 8px;
+                box-sizing: border-box;
+                .m-btn {
+                    width: 100%;
+                    height: 32px !important;
+                    text-align: center;
+                    background: #eff0f1;
+                    border-radius: 2px;
+                }
+            }
+            .system-btn:not(:nth-child(2n)) {
+                margin-right: 8px;
             }
-          }
         }
         .active {
           background-color: #025baa !important;
@@ -613,42 +616,46 @@ export default {
           height: 25px;
         }
         .system-btn-container {
-          display: flex;
-          width: 100%;
-          flex-wrap: wrap;
-          flex-flow: wrap;
-          .system-btn {
-            width: 33% !important;
-            min-width: 33% !important;
-            max-width: 33% !important;
-            height: 50px;
-            box-sizing: border-box;
-            padding: 5px 10px 5px 0;
-            .m-btn {
-              width: 100%;
-              height: 32px !important;
-              text-align: center;
-              background: #eff0f1;
-              border-radius: 2px;
-              padding: 0 !important;
+            display: flex;
+            width: 100%;
+            flex-wrap: wrap;
+            flex-flow: wrap;
+            .system-btn {
+                width: calc(33.333% - 5.34px) !important;
+                min-width: calc(33.333% - 5.34px) !important;
+                max-width: calc(33.333% - 5.34px) !important;
+                height: 32px;
+                margin-bottom: 8px;
+                box-sizing: border-box;
+                .m-btn {
+                    width: 100%;
+                    height: 32px !important;
+                    text-align: center;
+                    background: #eff0f1;
+                    border-radius: 2px;
+                    padding: 0 !important;
+                }
             }
-          }
-          .self-btn {
-            width: 100% !important;
-            min-width: 100% !important;
-            max-width: 100% !important;
-            height: 50px;
-            box-sizing: border-box;
-            padding: 5px 10px 5px 0;
-            .m-btn {
-              width: 100%;
-              height: 32px !important;
-              text-align: center;
-              background: #eff0f1;
-              border-radius: 2px;
-              padding: 0 !important;
+            .system-btn:not(:nth-child(3n)) {
+                margin-right: 8px;
+            }
+            .self-btn {
+                width: 100% !important;
+                min-width: 100% !important;
+                max-width: 100% !important;
+                height: 50px;
+                box-sizing: border-box;
+                padding: 0;
+                margin-right: 0;
+                .m-btn {
+                    width: 100%;
+                    height: 32px !important;
+                    text-align: center;
+                    background: #eff0f1;
+                    border-radius: 2px;
+                    padding: 0 !important;
+                }
             }
-          }
         }
         .active {
           background-color: #025baa !important;
@@ -668,19 +675,23 @@ export default {
         border-bottom: 1px solid #e6e6e6;
         margin: 20px 0;
       }
-      .footer {
+       .footer {
         position: absolute;
         bottom: 30px;
         right: 0;
         width: 100%;
         height: 35px;
         display: flex;
-        justify-content: space-around;
+        justify-content: space-between;
+        padding: 0 15px;
         .van-button {
-          width: 40%;
-          height: 100%;
-          max-width: 40%;
-          min-width: 40%;
+            width: calc(50% - 7px) !important;
+            min-width: calc(50% - 7px) !important;
+            max-width: calc(50% - 7px) !important;
+            height: 100%;
+        }
+        .van-button:first-child {
+            margin-right: 14px;
         }
       }
     }

+ 49 - 29
src/views/equipmentFacilities/index.vue

@@ -26,7 +26,7 @@
             <!-- 分割线 -->
             <div class='divider'></div>
             <!-- 设备卡片 -->
-            <div class='card-container'>
+            <div class='card-container' :key='`card_${key}`'>
                 <m-card
                     class='card'
                     :type='item.type'
@@ -48,7 +48,7 @@
                     :unit='item.unit'
                     :total='item.total'
                     :number='item.number'
-                    v-for='(item,index) in cardList'
+                    v-for='(item,index) in moreCardList'
                     :key='index'
                     @click.native='goToEquipment(item)'
                 />
@@ -64,7 +64,7 @@ import Vue from 'vue'
 import { Cell, Toast } from 'vant'
 Vue.use(Cell).use(Toast)
 import { mapGetters, mapMutations } from 'vuex'
-import { querySystemCount, querySystemCard, querySystemImage, querySystemTuJianImage, queryRoomCount, queryMoreAsset } from '@/api/equipmentList'
+import { querySystemCount, querySystemCard, querySystemImage, querySystemTuJianImage, queryRoomCount, queryMoreSystemCard } from '@/api/equipmentList'
 
 import { appGraphElementQuery } from '@/api/public'
 import MCard from '@/components/equipmentFacilities/Card'
@@ -179,6 +179,7 @@ export default {
                 ],
             },
             listKey: `list_${new Date().getTime()}`,
+            key: new Date().getTime(),
             cardList: [],
             moreCardList: [],
             showMoreCardList: false,
@@ -211,7 +212,7 @@ export default {
         },
     },
     async created() {
-        window.vm = this
+        // window.vm = this
         // let initSys = {
         //     text: '供电',
         //     categoryId: 'GDXT',
@@ -238,7 +239,9 @@ export default {
          * @param { String }  currentSmsxt 系统id? 1001 - 1008
          */
         async changeSystem({ text, categoryId, smsxt }) {
+            this.key = new Date().getTime()
             this.showMoreCardList = false
+            this.moreCardList = []
             this.showRight = false
             this.currentSmsxt = smsxt
             this.systemText = text + '系统'
@@ -633,30 +636,45 @@ export default {
          * 点击更多设备卡片,跳转设备列表页面
          */
         async goToMoreEquipment(e) {
-            // this.$router.push({ name: 'MoreEquipmentList', params: {} })
-            console.log(e.target)
-            // TODO: 更多设备
-            return false
             this.showMoreCardList = true
-            this.moreCardList = cloneDeep(this.cardList)
-            console.log()
-            //
-            // let data = {
-            //     // page: 1,
-            //     // size: 400,
-            //     // subPage: 1,
-            //     // subSize: 100,
-            //     plazaId: this.plazaId,
-            //     onlyMainAsset: true,
-            // }
-            // let postParams = {
-            //     system_code: this.smsxt,
-            // }
-            // let res = await queryMoreAsset({ data, postParams })
-            // if (!res?.data?.data) {
-            //     return false
-            // }
-            // console.log(res.data.data)
+            let getParams = {
+                plazaId: this.plazaId,
+                system_code: this.smsxt,
+            }
+            let res = await queryMoreSystemCard({ getParams })
+            console.log(res)
+            if (!res?.data) {
+                return false
+            }
+            let moreCardList = res.data
+            moreCardList.map((item) => {
+                item.total = item.asset_num // card 第二行台数
+                item.name = item.category_name //card 第一行名称
+                // 设备卡片单位处理
+                if (item.name === '屋面logo') {
+                    item.unit = '个'
+                } else if (item.name === '玻璃护栏') {
+                    item.unit = '段'
+                } else {
+                    item.unit = '台'
+                }
+                /**
+                 * type 1: 正常运维 2:重要维保 3:重要维修
+                 */
+                // 默认正常
+                item.type = 1
+                item.number = 0
+                if (item.is_exception_num) {
+                    // 有异常
+                    item.type = 3
+                    item.number = item.is_exception_num
+                } else if (item.is_detecting_num) {
+                    // 检测中
+                    item.type = 2
+                    item.number = item.is_detecting_num
+                }
+            })
+            this.moreCardList = moreCardList
         },
     },
 }
@@ -752,13 +770,15 @@ export default {
         .close {
             position: fixed;
             background-color: #fff;
+            color: #025baa;
             width: 50px;
             height: 50px;
+            box-shadow: 0px 2px 10px 0px rgba(31, 36, 41, 0.1);
             line-height: 50px;
             border-radius: 50px;
             text-align: center;
-            bottom: 80px;
-            right: 30px;
+            bottom: 70px;
+            right: 20px;
         }
     }
 }