|
@@ -370,6 +370,7 @@ import {getToken} from "@/utils/auth";
|
|
|
import {treeselect} from "@/api/system/dept";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
+import el from "element-ui/src/locale/lang/el";
|
|
|
|
|
|
export default {
|
|
|
name: "User",
|
|
@@ -637,14 +638,20 @@ export default {
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
if (this.form.userId != undefined) {
|
|
|
- this.form.postIds = [this.form.postIds]
|
|
|
+ if (this.form.postIds !== '')
|
|
|
+ this.form.postIds = [this.form.postIds]
|
|
|
+ else
|
|
|
+ this.form.postIds = []
|
|
|
updateUser(this.form).then(response => {
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
});
|
|
|
} else {
|
|
|
- this.form.postIds = [this.form.postIds]
|
|
|
+ if (this.form.postIds !== '')
|
|
|
+ this.form.postIds = [this.form.postIds]
|
|
|
+ else
|
|
|
+ this.form.postIds = []
|
|
|
addUser(this.form).then(response => {
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
this.open = false;
|