|
@@ -498,6 +498,19 @@ export default {
|
|
this.$api.user.postUser(post).then(res => {
|
|
this.$api.user.postUser(post).then(res => {
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
this.clientManagers = res.data;
|
|
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;
|
|
|
|
+ }, []);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|