|
@@ -372,6 +372,9 @@ export default {
|
|
|
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
+ const pattern = /\"/g;
|
|
|
+ this.form.noticeContent = this.form.noticeContent.replace(pattern, "'");
|
|
|
+ console.log(this.form.noticeContent);
|
|
|
if (this.form.noticeId != undefined) {
|
|
|
updateNotice(this.form).then((response) => {
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
@@ -379,14 +382,12 @@ export default {
|
|
|
this.getList();
|
|
|
});
|
|
|
} else {
|
|
|
- const pattern = /\"/g;
|
|
|
- this.form.noticeContent = this.form.noticeContent.replace(pattern, "'");
|
|
|
- console.log(this.form.noticeContent);
|
|
|
- // addNotice(this.form).then((response) => {
|
|
|
- // this.$modal.msgSuccess("新增成功");
|
|
|
- // this.open = false;
|
|
|
- // this.getList();
|
|
|
- // });
|
|
|
+
|
|
|
+ addNotice(this.form).then((response) => {
|
|
|
+ this.$modal.msgSuccess("新增成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
});
|