用户管理 修改
This commit is contained in:
parent
e7c78291d4
commit
75026d1c1c
@ -797,7 +797,12 @@ export default {
|
|||||||
const userId = row.userId || this.ids;
|
const userId = row.userId || this.ids;
|
||||||
getUser(userId).then((response) => {
|
getUser(userId).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
|
if (!this.form.nurseStationIds) {
|
||||||
|
this.form.nurseStationIds = ''
|
||||||
|
} else {
|
||||||
this.form.nurseStationIds = Number(this.form.nurseStationIds);
|
this.form.nurseStationIds = Number(this.form.nurseStationIds);
|
||||||
|
|
||||||
|
}
|
||||||
// if (
|
// if (
|
||||||
// !this.form.nurseStationIds ||
|
// !this.form.nurseStationIds ||
|
||||||
// this.form.nurseStationIds == null ||
|
// this.form.nurseStationIds == null ||
|
||||||
@ -844,7 +849,6 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function () {
|
submitForm: function () {
|
||||||
console.log(this.form);
|
|
||||||
this.$refs["form"].validate((valid) => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
// this.form.nurseStationIds = this.form.nurseStationIds.join(",");
|
// this.form.nurseStationIds = this.form.nurseStationIds.join(",");
|
||||||
@ -853,13 +857,26 @@ export default {
|
|||||||
// obj.push(this.form.nurseStationIds);
|
// obj.push(this.form.nurseStationIds);
|
||||||
// console.log(obj)
|
// console.log(obj)
|
||||||
// this.form.nurseStationIds = obj;
|
// this.form.nurseStationIds = obj;
|
||||||
console.log(this.form);
|
|
||||||
if (this.form.userId != undefined) {
|
if (this.form.userId != undefined) {
|
||||||
|
if (!this.form.nurseStationIds) {
|
||||||
|
this.form.nurseStationIds = null
|
||||||
updateUser(this.form).then((response) => {
|
updateUser(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
// console.log('bbb',this.form)
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.form.nurseStationIds = Number(this.form.nurseStationIds);
|
||||||
|
updateUser(this.form).then((response) => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
// console.log('bbb',this.form)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
addUser(this.form).then((response) => {
|
addUser(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user