@@ -64,10 +66,10 @@
-
+
-
+
@@ -175,7 +177,12 @@ export default {
form: {},
// 表单校验
rules: {
-
+ title: [
+ { required: true, message: '请输入标题', trigger: 'blur' },
+ ],
+ content: [
+ { required: true, message: '请输入内容', trigger: 'blur' },
+ ]
}
};
},
@@ -331,6 +338,10 @@ export default {
this.form = item;
this.form.fileSuffix = 'images';
this.form.type = 1;
+ if (!this.form.title || !this.form.content) {
+ this.$modal.msgError("标题或者内容不能为空");
+ return;
+ }
if (this.form.id != null) {
updateInfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
@@ -347,6 +358,9 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
+ if(!row && this.videoForm) {
+ row = this.videoForm;
+ }
if (!row.id) {
this.$modal.msgError('目前数据状态不允许删除');
return;
@@ -357,6 +371,11 @@ export default {
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
+ if(this.videoForm && this.videoForm.id){
+ this.videoForm = {};
+ this.$refs["video"].load();
+ this.$refs["video"].play();
+ }
}).catch(() => {});
},
/** 导出按钮操作 */
diff --git a/flossom-ui/src/views/system/leaveMessage/index.vue b/flossom-ui/src/views/system/leaveMessage/index.vue
index e2b284a..fa1abd2 100644
--- a/flossom-ui/src/views/system/leaveMessage/index.vue
+++ b/flossom-ui/src/views/system/leaveMessage/index.vue
@@ -84,7 +84,14 @@
-
+
+
+
+
+
+
+
+