|
@@ -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)
|