用户userName替换userId

yangwl
wws 10 months ago
parent 8e8e847ecf
commit 1c510f40dd

@ -892,7 +892,7 @@ export default {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.personList.push({ this.personList.push({
label: response.data[i].nickName + '(' + response.data[i].userName + ')', label: response.data[i].nickName + '(' + response.data[i].userName + ')',
key: response.data[i].userId, key: response.data[i].userName,
}) })
} }
}); });
@ -1231,7 +1231,11 @@ export default {
} }
this.planLoading = true; this.planLoading = true;
if (this.form.planId != null) { if (this.form.planId != null) {
this.form.personList = this.selectPersonList; this.form.personList = this.selectPersonList.map(item => {
return{
userName: item.toString()
}
});
updatePlan(this.form).then(response => { updatePlan(this.form).then(response => {
this.planLoading = false; this.planLoading = false;
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
@ -1239,7 +1243,11 @@ export default {
this.getList(); this.getList();
}); });
} else { } else {
this.form.personList = this.selectPersonList; this.form.personList = this.selectPersonList.map(item => {
return{
userName: item.toString()
}
});
addPlan(this.form).then(response => { addPlan(this.form).then(response => {
this.planLoading = false; this.planLoading = false;
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");

@ -937,7 +937,7 @@ export default {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.personList.push({ this.personList.push({
label: response.data[i].nickName + '(' + response.data[i].userName + ')', label: response.data[i].nickName + '(' + response.data[i].userName + ')',
key: response.data[i].userId, key: response.data[i].userName,
}) })
} }
}); });
@ -1265,7 +1265,11 @@ export default {
} }
this.planLoading = true; this.planLoading = true;
if (this.form.planId != null) { if (this.form.planId != null) {
this.form.personList = this.selectPersonList; this.form.personList = this.selectPersonList.map(item => {
return{
userName: item.toString()
}
});
updatePlan(this.form).then(response => { updatePlan(this.form).then(response => {
this.planLoading = false; this.planLoading = false;
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
@ -1273,7 +1277,11 @@ export default {
this.getList(); this.getList();
}); });
} else { } else {
this.form.personList = this.selectPersonList; this.form.personList = this.selectPersonList.map(item => {
return{
userName: item.toString()
}
});
addPlan(this.form).then(response => { addPlan(this.form).then(response => {
this.planLoading = false; this.planLoading = false;
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");

@ -1290,7 +1290,7 @@ export default {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.personList.push({ this.personList.push({
label: response.data[i].nickName + '(' + response.data[i].userName + ')', label: response.data[i].nickName + '(' + response.data[i].userName + ')',
key: response.data[i].userId, key: response.data[i].userName,
}) })
} }
}); });
@ -1660,7 +1660,11 @@ export default {
} }
this.planLoading = true; this.planLoading = true;
if (this.form.planId != null) { if (this.form.planId != null) {
this.form.personList = this.selectPersonList; this.form.personList = this.selectPersonList.map(item => {
return{
userName: item.toString()
}
});
updatePlan(this.form).then(response => { updatePlan(this.form).then(response => {
this.planLoading = false; this.planLoading = false;
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
@ -1668,7 +1672,11 @@ export default {
this.getList(); this.getList();
}); });
} else { } else {
this.form.personList = this.selectPersonList; this.form.personList = this.selectPersonList.map(item => {
return{
userName: item.toString()
}
});
addPlan(this.form).then(response => { addPlan(this.form).then(response => {
this.planLoading = false; this.planLoading = false;
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");

Loading…
Cancel
Save