Explorar o código

1.个贷统计报表,客户经理下拉框添加销售代表岗位的用户

GouGengquan hai 4 meses
pai
achega
d1f966ac7b
Modificáronse 1 ficheiros con 13 adicións e 0 borrados
  1. 13 0
      src/views/statistical/personal/departmentEfficiency.vue

+ 13 - 0
src/views/statistical/personal/departmentEfficiency.vue

@@ -498,6 +498,19 @@ export default {
             this.$api.user.postUser(post).then(res => {
                 if (res.code === 200) {
                     this.clientManagers = res.data;
+                    this.$api.user.postUser("销售代表").then(res => {
+                        if (res.code === 200) {
+                            this.clientManagers.push(...res.data);
+                            const key = 'name'; // 依据 name 属性去重
+                            this.clientManagers = this.clientManagers.reduce((acc, current) => {
+                                const x = acc.find(item => item[key] === current[key]);
+                                if (!x) {
+                                    acc.push(current);
+                                }
+                                return acc;
+                            }, []);
+                        }
+                    })
                 }
             })
         }