修改
This commit is contained in:
parent
96809f7f95
commit
0778dce9b0
@ -312,7 +312,7 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="护理站" prop="nurseStationIds">
|
||||
<el-select v-model="form.nurseStationIds" placeholder="请选择护理站" multiple>
|
||||
<el-select v-model="form.nurseStationIdstwo" placeholder="请选择护理站" multiple>
|
||||
<el-option
|
||||
v-for="item in nurseStationlist"
|
||||
:key="item.id"
|
||||
@ -653,7 +653,9 @@ export default {
|
||||
status: "0",
|
||||
remark: undefined,
|
||||
postIds: [],
|
||||
roleIds: []
|
||||
roleIds: [],
|
||||
nurseStationIdstwo: null,
|
||||
nurseStationIds: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
@ -705,12 +707,21 @@ export default {
|
||||
this.getTreeselect();
|
||||
const userId = row.userId || this.ids;
|
||||
getUser(userId).then(response => {
|
||||
response.data.nurseStationIdstwo = JSON.parse(
|
||||
JSON.stringify(response.data.nurseStationIds)
|
||||
);
|
||||
this.form = response.data;
|
||||
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.map(e => {
|
||||
return (e = Number(e));
|
||||
});
|
||||
// this.form.nurseStationIds = [];
|
||||
} else {
|
||||
// this.form.nurseStationIds = Number(this.form.nurseStationIds);
|
||||
@ -721,7 +732,6 @@ export default {
|
||||
// this.form.nurseStationIds.length == 0
|
||||
// ) {getList
|
||||
// } else {
|
||||
|
||||
// }
|
||||
console.log(this.form);
|
||||
this.postOptions = response.posts;
|
||||
@ -774,7 +784,9 @@ export default {
|
||||
});
|
||||
} else {
|
||||
// this.form.nurseStationIds = Number(this.form.nurseStationIds);
|
||||
this.form.nurseStationIds = this.form.nurseStationIds.join(",");
|
||||
this.form.nurseStationIds = this.form.nurseStationIdstwo.join(
|
||||
","
|
||||
);
|
||||
updateUser(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
@ -783,7 +795,7 @@ export default {
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.form.nurseStationIds = this.form.nurseStationIds.join(",");
|
||||
this.form.nurseStationIds = this.form.nurseStationIdstwo.join(",");
|
||||
addUser(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user