Browse Source

优化空间结果下面是空的情况报错问题

wenningning 4 years ago
parent
commit
4a31d187a1

+ 5 - 1
src/views/customer/components/customerManager.vue

@@ -594,7 +594,11 @@ export default {
         this.frame.children.forEach(item => {
           ids.push(item.id)
         })
-        this.params.fixedCondition = ' frame_id in (' + ids + ')'
+        if (ids.length > 0) {
+          this.params.fixedCondition = ' frame_id in (' + ids + ')'
+        } else {
+          this.params.fixedCondition = ' frame_id = ' + this.frame.id
+        }
       } else {
         this.params.fixedCondition = ' frame_id = ' + this.frame.id
       }

+ 5 - 1
src/views/hospital/ncs_customer/customerManager.vue

@@ -545,7 +545,11 @@ export default {
         this.frame.children.forEach(item => {
           ids.push(item.id)
         })
-        this.params.fixedCondition = ' frame_id in (' + ids + ')'
+        if (ids.length > 0) {
+          this.params.fixedCondition = ' frame_id in (' + ids + ')'
+        } else {
+          this.params.fixedCondition = ' frame_id = ' + this.frame.id
+        }
       } else {
         this.params.fixedCondition = ' frame_id = ' + this.frame.id
       }