Browse Source

1. bug fix 右上角 草稿箱数量 不显示
2. 右下角 小红点查询接口,上送undefined修复

yx 4 years ago
parent
commit
0c621e184d
2 changed files with 13 additions and 9 deletions
  1. 12 8
      src/components/Legend/src/legend.vue
  2. 1 1
      src/components/menuList.vue

+ 12 - 8
src/components/Legend/src/legend.vue

@@ -185,14 +185,18 @@ export default {
         async getDraftNum() {
             let res = null,
                 // floorId = this.$cookie.get('floorMapId'),
-                floorId = this.$store.state.currentFloor.gname,
-                data = {
-                    Distinct: true,
-                    Filters: `projectId='${this.plazaId}';isPub=false;floorId='${floorId}'`,
-                    PageNumber: 1,
-                    PageSize: 500,
-                    Projection: ['floorId']
-                }
+                floorId = this.$store.state.currentFloor.gname || this.$cookie.get('floorMapId')
+            // 增加校验 floorId,防止上传 undefined
+            if (!floorId) {
+                return true
+            }
+            let data = {
+                Distinct: true,
+                Filters: `projectId='${this.plazaId}';isPub=false;floorId='${floorId}'`,
+                PageNumber: 1,
+                PageSize: 500,
+                Projection: ['floorId']
+            }
             try {
                 // 调用接口
                 res = await queryDraftNum(data)

+ 1 - 1
src/components/menuList.vue

@@ -109,7 +109,7 @@ export default {
                 }
             try {
                 // 调用接口
-                // res = await queryDraftNum(data)
+                res = await queryDraftNum(data)
             } catch (error) {
                 console.error(error)
             }