linweizeng 2 лет назад
Родитель
Сommit
7540983f01
1 измененных файлов с 2 добавлено и 10 удалено
  1. 2 10
      src/business/platform/org/position/panel.vue

+ 2 - 10
src/business/platform/org/position/panel.vue

@@ -238,11 +238,7 @@ export default {
                         const frist = this.$store.getters.level.first || ''
                         if ((type === '1' || type === '2') && this.filtrate && frist) {
                             const showBoo = arr.some((item) => item.id === frist)
-                            if (showBoo) {
-                                arrList = arr.filter((item) => item.id === frist)
-                            } else {
-                                arrList = arr
-                            }
+                            arrList = showBoo ? arr.filter(item => item.id === frist) : arr
                         } else {
                             arrList = arr
                         }
@@ -279,11 +275,7 @@ export default {
                     const second = this.$store.getters.level.second || ''
                     if ((type === '1' || type === '2') && this.filtrate && second) {
                         const showBoo = arr.some((item) => item.id === second)
-                        if (showBoo) {
-                            arrList = arr.filter((item) => item.id === second)
-                        } else {
-                            arrList = arr
-                        }
+                        arrList = showBoo ? arr.filter((item) => item.id === second) : arr
                     } else {
                         arrList = arr
                     }