朱鑫波 hace 4 años
padre
commit
9c14378d20
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/views/modules/Statistics/components/Treeselect.vue

+ 2 - 2
src/views/modules/Statistics/components/Treeselect.vue

@@ -199,8 +199,8 @@ export default {
               }
             })
             if (this.oneData) {
-              var data = this.options.map((item) => {
-                if (item.children.length > 0) {
+              var data = this.options.filter((item) => {
+                if (item.children&&item.children.length > 0) {
                   return { ...item }
                 }
               })