Sfoglia il codice sorgente

Fix: 用户组件刷新问题

chris 2 anni fa
parent
commit
1f2ca9b2b3
1 ha cambiato i file con 7 aggiunte e 4 eliminazioni
  1. 7 4
      src/views/modules/common/user-components.vue

+ 7 - 4
src/views/modules/common/user-components.vue

@@ -91,10 +91,13 @@ export default {
           }
           this.noMore = data.data.pageUsers.records.length >= 10
           data.data.pageUsers.records.forEach(item => {
-            this.options.push({
-              label: item.name + ' (' + item.orgName + ')',
-              value: item.userId
-            })
+            let i = this.options.findIndex(i => i.value === item.userId)
+            if (i === -1) {
+              this.options.push({
+                label: item.name + ' (' + item.orgName + ')',
+                value: item.userId
+              })
+            }
           })
         } else {
           this.options = []