wangfukang 1 month ago
parent
commit
a453364fd7
  1. 10
      src/views/sys/user-manage/addEdit.vue

10
src/views/sys/user-manage/addEdit.vue

@ -269,13 +269,15 @@ export default {
submit() {
this.$refs.form.validate((valid) => {
if (valid) {
if (typeof this.form.birth == "object") {
this.form.birth = this.format(this.form.birth, "yyyy-MM-dd");
const params = { ...this.form };
if (typeof params.birth == "object") {
params.birth = this.format(params.birth, "yyyy-MM-dd");
}
delete params.realNameAuthTime;
if (this.type == "1") {
//
this.submitLoading = true;
editUser(this.form).then((res) => {
editUser(params).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
@ -286,7 +288,7 @@ export default {
} else {
//
this.submitLoading = true;
addUser(this.form).then((res) => {
addUser(params).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");

Loading…
Cancel
Save