chenrui  2 years ago
parent
commit
542037a01e
1 changed files with 25 additions and 24 deletions
  1. 25 24
      src/views/systemSettings/messageTemplate/index.vue

+ 25 - 24
src/views/systemSettings/messageTemplate/index.vue

@@ -30,16 +30,19 @@
           <el-form :model="tableForm">
             <el-row :gutter="24">
               <el-col>
-                <el-form-item label="名称" size="default">
-                  <el-input v-model="tableForm.name" placeholder="请输入名称" />
+                <el-form-item label="消息标题" size="default">
+                  <el-input
+                    v-model="tableForm.newsTitle"
+                    placeholder="请输入名称"
+                  />
                 </el-form-item>
               </el-col>
               <el-col>
-                <el-form-item label="描述" size="default">
+                <el-form-item label="消息内容" size="default">
                   <el-input
                     type="textarea"
-                    v-model="tableForm.china"
-                    placeholder="请输入描述"
+                    v-model="tableForm.newContent"
+                    placeholder="请输入消息内容"
                   />
                 </el-form-item>
               </el-col>
@@ -68,12 +71,10 @@ const type = ref<String>(""); //判断是否删除
 const msgTitle = ref<String>("新增消息模板"); //弹窗标题
 const tableColsCopys = reactive<Object>({}); //弹窗
 const tableForm = reactive({
-  name: "",
-  china: "",
-  englin: "",
-  two: "",
-  three: "",
-  text: "",
+  newsId: "",
+  newsTitle: "",
+  newContent: "",
+  event: "",
 }); //弹窗内容
 //列表
 const tableData = ref([]);
@@ -101,17 +102,15 @@ const tableBtnGroup = ref([
 const addForm = () => {
   msgTitle.value = "新增消息模板";
   flag.value = true;
+  tableForm.event = 1;
   type.value = "";
 };
 //取消
 const resetForm = () => {
   flag.value = false;
-  tableForm.name = "";
-  tableForm.china = "";
-  tableForm.englin = "";
-  tableForm.two = "";
-  tableForm.three = "";
-  tableForm.text = "";
+  tableForm.newsId = "";
+  tableForm.newsTitle = "";
+  tableForm.newContent = "";
 };
 //编辑
 // const editDialog = (data) => {
@@ -131,16 +130,18 @@ const btnClick = (row, index, param) => {
     msgTitle.value = "编辑消息模板";
     flag.value = true;
     type.value = "";
-    tableForm.name = index.name;
-    tableForm.china = index.china;
-    tableForm.englin = index.englin;
-    tableForm.two = index.two;
-    tableForm.three = index.three;
-    tableForm.text = index.text;
+    tableForm.event = 2;
+    tableForm.newsId = index.newsId;
+    tableForm.newsTitle = index.newsTitle;
+    tableForm.newContent = index.newContent;
   } else if (param === 3) {
     msgTitle.value = "删除消息模板";
     flag.value = true;
     type.value = "del";
+    tableForm.event = 3;
+    tableForm.newsId = index.newsId;
+    tableForm.newsTitle = index.newsTitle;
+    tableForm.newContent = index.newContent;
   } else if (param === 4) {
   }
 };
@@ -242,7 +243,7 @@ getQuery();
 </script>
 <style lang="scss" scoped>
 ::v-deep .el-form-item__label {
-  width: 50px;
+  width: 80px;
 }
 .app-containers {
   height: calc(100vh - 180px);