Bladeren bron

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

zhangyu 4 jaren geleden
bovenliggende
commit
eb24c7752c
10 gewijzigde bestanden met toevoegingen van 58 en 30 verwijderingen
  1. 2 0
      .env.alyTest
  2. 8 3
      README.md
  3. 3 1
      package.json
  4. 2 3
      src/App.vue
  5. 5 5
      src/main.ts
  6. 18 7
      src/views/equipmentFacilities/ElectricWell.vue
  7. 14 2
      src/views/equipmentFacilities/index.vue
  8. 3 6
      src/views/overview/index.vue
  9. 1 1
      version.js
  10. 2 2
      vue.config.js

+ 2 - 0
.env.alyTest

@@ -0,0 +1,2 @@
+NODE_ENV=production
+VUE_APP_RealEnv=alyTest

+ 8 - 3
README.md

@@ -17,8 +17,9 @@ yarn serve 或 npm run serve
 ``` shell
 
 1. yarn build_aly  或 npm run build_aly     # 阿里云环境
-2. yarn build_test 或 npm run build_test    # 测试环境
-3. yarn build_prod 或 npm run build_prod    # 生产环境
+2. yarn build_alyTest 或 npm run build_alyTest    # 阿里云环境,可在PC端查看的项目
+3. yarn build_test 或 npm run build_test    # 测试环境
+4. yarn build_prod 或 npm run build_prod    # 生产环境
 
 ```
 
@@ -54,7 +55,11 @@ npm run publish # 只能发布到阿里云环境(需要外网支持)
   
 
 ``` shell
-  npm run build_test
+  npm run build_alyTest
+```
+
+``` shell
+ npm run version 
 ```
 
 发布

+ 3 - 1
package.json

@@ -12,9 +12,11 @@
   "scripts": {
     "serve": "vue-cli-service serve",
     "build_aly": "vue-cli-service build --mode aly",
+    "build_alyTest": "vue-cli-service build --mode alyTest",
     "build_test": "vue-cli-service build --mode test",
     "build_prod": "vue-cli-service build --mode production",
-    "publish": "node publish.js"
+    "publish": "node publish.js",
+    "version": "node version.js"
   },
   "dependencies": {
     "@saga-web/base": "2.1.27",

+ 2 - 3
src/App.vue

@@ -100,7 +100,6 @@ export default {
         }
         // 获取楼层列表
         this.getFloorList()
-        console.log('over')
     },
     mounted() {
         // console.log('环境变量', process.env.VUE_APP_RealEnv)
@@ -176,8 +175,8 @@ export default {
         handleUrl() {
             let url = window.location.href
             let params = this.queryURLParams(url)
-            console.log('%c 路径参数:', 'color:blue')
-            console.log(params)
+            // console.log('%c 路径参数:', 'color:blue')
+            // console.log(params)
             let { username, plazaId } = params
             if (username) {
                 this.SETSSOTOKEN(`admin:${username}`)

+ 5 - 5
src/main.ts

@@ -23,12 +23,12 @@ if (process.env.NODE_ENV === 'production' && process.env.VUE_APP_RealEnv !== 'pr
 }
 const ua = navigator.userAgent
 
-console.log('wdith:', window.screen.width)
-console.log('height:', window.screen.height)
-console.log('clientWidth:', document.body.clientWidth)
-console.log('clientHeight:', document.body.clientHeight)
+// console.log('wdith:', window.screen.width)
+// console.log('height:', window.screen.height)
+// console.log('clientWidth:', document.body.clientWidth)
+// console.log('clientHeight:', document.body.clientHeight)
 // 打包后,监听deviceready事件,处理 部分设备 不能使用cordova插件方法的问题
-if (process.env.NODE_ENV === 'production' && process.env.VUE_APP_RealEnv !== 'test') {
+if (process.env.NODE_ENV === 'production' && process.env.VUE_APP_RealEnv !== 'alyTest') {
     window.addEventListener('deviceready', function() {
         new Vue({
             router,

+ 18 - 7
src/views/equipmentFacilities/ElectricWell.vue

@@ -39,8 +39,7 @@
                             <span class='value'>{{detail.shopsnumList}}</span>
                         </div>
                     </div>
-                    <!-- 加载更多 -->
-                    <div class='load-more' v-show='!item.loadMore && item.data.length>2' @click='loadMore(item)'>加载更多</div>
+
                     <!-- 第三条以上 -->
                     <div v-show='item.loadMore &&  item.data.length>2' :key='key'>
                         <div class='well' v-for='(detail) in item.data.slice(2)' :key='detail.meterbox'>
@@ -58,6 +57,10 @@
 
                     <!-- </div> -->
                 </div>
+                <!-- 加载更多 -->
+                <div class='load-more-container' v-show='!item.loadMore && item.data.length>2' @click='loadMore(item)'>
+                    <div class='load-more'>加载更多</div>
+                </div>
             </div>
         </div>
         <!-- 无数据 -->
@@ -335,7 +338,9 @@ export default {
         // background-color: #fff;
         text-align: center;
         .search {
-            width: 80%;
+            width: 100%;
+            padding-left: 15px;
+            padding-right: 15px;
             margin: 0 auto;
             background: none;
         }
@@ -357,7 +362,7 @@ export default {
         color: #333333;
         .floor {
             width: 100%;
-            max-height: 400px;
+            max-height: 410px;
             overflow: auto;
             display: flex;
             flex-direction: column;
@@ -387,13 +392,13 @@ export default {
             }
             // 电井列表
             .well-container {
-                padding: 15px 15px 10px 15px;
+                padding: 0 15px;
                 flex: 1;
                 overflow: auto;
                 .well {
                     width: 100%;
                     // height: 130px;
-                    padding: 10px 0;
+                    padding: 15px 0;
                     border-bottom: 1px solid #e6e6e6;
                     .well-title {
                         font-size: 16px;
@@ -418,13 +423,19 @@ export default {
                         }
                     }
                 }
+            }
+            .load-more-container {
+                width: 100%;
+                height: 50px;
+                background: #f5f6f7;
+                text-align: center;
+                padding-top: 12px;
                 .load-more {
                     width: 80px;
                     height: 25px;
                     line-height: 25px;
                     text-align: center;
                     margin: 0 auto;
-                    margin-top: 10px;
                     color: #025baa;
                     background: #e5eef6;
                 }

+ 14 - 2
src/views/equipmentFacilities/index.vue

@@ -38,8 +38,8 @@
                     :key='item.category_name'
                     @click.native='goToEquipment(item)'
                 />
-                <!-- 更多主要设备 -->
-                <m-card class='card' :type='4' name unit v-if='!showMoreCardList' :total='0' @click.native='goToMoreEquipment' />
+                <!-- 更多主要设备,有moreCardList时才显示 -->
+                <m-card class='card' :type='4' name unit v-if='moreCardList.length &&  !showMoreCardList' :total='0' @click.native='goToMoreEquipment' />
                 <m-card
                     v-show='moreCardList.length && showMoreCardList'
                     class='card'
@@ -207,6 +207,11 @@ export default {
                     }
                     this.getTuliData({ smsxt: newV, system_code: dict[newV] })
                 }
+                // 八大系统,查询更多主要设备列表
+                let smsxtArr1 = ['1001', '1002', '1003', '1004', '1005', '1006', '1007', '1008']
+                if (smsxtArr1.includes(newV)) {
+                    this.getMoreCardList()
+                }
             },
             immediate: true,
         },
@@ -637,6 +642,12 @@ export default {
          */
         async goToMoreEquipment(e) {
             this.showMoreCardList = true
+        },
+        /**
+         * 查询更多主要设备
+         */
+        async getMoreCardList() {
+            // console.log('getMoreCardList')
             let getParams = {
                 plazaId: this.plazaId,
                 system_code: this.smsxt,
@@ -644,6 +655,7 @@ export default {
             let res = await queryMoreSystemCard({ getParams })
             console.log(res)
             if (!res?.data) {
+                this.moreCardList = []
                 return false
             }
             let moreCardList = res.data

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

@@ -238,9 +238,6 @@ export default {
 
     beforeMount() {},
     mounted() {
-        console.log('项目概况页面mounted')
-        console.table({ a: 'sssss' })
-        console.error('sdfasdfasdf')
         // debugger
         this.openPreview()
     },
@@ -253,7 +250,7 @@ export default {
                 plazaId: this.plazaId,
             }
             let data = await queryFact({ getParams })
-            console.log(data)
+            // console.log(data)
             // 顶部轮播图
             this.imgList = data.pic2.concat(data.pic1)
             this.plazaName = data.plazaName
@@ -296,7 +293,7 @@ export default {
                 }
             })
             this.subcontractInfo = subcontractInfo
-            console.log(subcontractInfo)
+            // console.log(subcontractInfo)
         },
         /**
          * 查询近三十天说明书更新记录
@@ -309,7 +306,7 @@ export default {
                 changeDateEndDate: moment().format('YYYYMMDD000000'), //变更记录结束时间 格式yyyyMMddHHmiss 必填
             }
             let data = await queryRecordCount({ getParams })
-            console.log(data)
+            // console.log(data)
             // 测试数据
             // data = {
             //     data: [

+ 1 - 1
version.js

@@ -1,6 +1,6 @@
 /** 自动记录版本信息**/
 const fs = require('fs')
-const buildPath = 'wandaBmGuideH5' //放置 version.txt的路径
+const buildPath = process.env.npm_package_remote_local //'wandaBmGuideH5Test' //放置 version.txt的路径
 const execSync = require('child_process').execSync //同步子进程
 const date = new Date() // Date对象
 

+ 2 - 2
vue.config.js

@@ -41,9 +41,9 @@ module.exports = {
     },
     lintOnSave: false,
     // 测试包路径修改
-    publicPath: process.env.VUE_APP_RealEnv === 'test' ? '/wandaBmGuideH5Test' : '/wandaBmGuideH5',
+    publicPath: process.env.VUE_APP_RealEnv === 'alyTest' ? '/wandaBmGuideH5Test' : '/wandaBmGuideH5',
     // 打包名称
-    outputDir: process.env.VUE_APP_RealEnv === 'test' ? 'wandaBmGuideH5Test' : 'wandaBmGuideH5',
+    outputDir: process.env.VUE_APP_RealEnv === 'alyTest' ? 'wandaBmGuideH5Test' : 'wandaBmGuideH5',
     // 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录
     assetsDir: 'static',
     transpileDependencies: [