This commit is contained in:
曹辉 2023-04-11 14:52:56 +08:00
parent 8246287f96
commit 202ff9fdf9

View File

@ -711,10 +711,6 @@ export default {
); );
this.form = response.data; this.form = response.data;
if (this.form.nurseStationIds) { if (this.form.nurseStationIds) {
this.form.nurseStationIds = this.form.nurseStationIds.split(",");
this.form.nurseStationIds = this.form.nurseStationIds.map(e => {
return (e = Number(e));
});
this.form.nurseStationIdstwo = this.form.nurseStationIdstwo.split( this.form.nurseStationIdstwo = this.form.nurseStationIdstwo.split(
"," ","
); );
@ -771,26 +767,26 @@ export default {
// obj.push(this.form.nurseStationIds); // obj.push(this.form.nurseStationIds);
// this.form.nurseStationIds = obj; // this.form.nurseStationIds = obj;
if (this.form.userId != undefined) { if (this.form.userId != undefined) {
if (!this.form.nurseStationIds) { if (!this.form.nurseStationIdstwo) {
this.form.nurseStationIds = null; this.form.nurseStationIds = null;
updateUser(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else { } else {
// this.form.nurseStationIds = Number(this.form.nurseStationIds);
this.form.nurseStationIds = this.form.nurseStationIdstwo.join( this.form.nurseStationIds = this.form.nurseStationIdstwo.join(
"," ","
); );
updateUser(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} }
updateUser(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else { } else {
this.form.nurseStationIds = this.form.nurseStationIdstwo.join(","); if (this.form.nurseStationIdstwo) {
this.form.nurseStationIds = this.form.nurseStationIdstwo.join(
","
);
} else {
this.form.nurseStationIds = null;
}
addUser(this.form).then(response => { addUser(this.form).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;