From 4641a877cd6a94e4d35dca7f7f14bc1443e2d2ad Mon Sep 17 00:00:00 2001
From: luobisheng <727299681@qq.com>
Date: 星期二, 29 十一月 2022 17:59:55 +0800
Subject: [PATCH] 上传处置类型修改

---
 src/views/operate/sms/smsTemplate/index.vue |   23 ++++++++++++++---------
 1 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/src/views/operate/sms/smsTemplate/index.vue b/src/views/operate/sms/smsTemplate/index.vue
index 735bac4..cd54a9b 100644
--- a/src/views/operate/sms/smsTemplate/index.vue
+++ b/src/views/operate/sms/smsTemplate/index.vue
@@ -3,7 +3,6 @@
         <header>
             <div class="header-nav">
                 <span class="nav-left">鏁版嵁绛涢��</span>
-                <span class="nav-right">楂樼骇鎼滅储</span>
             </div>
             <div class="header-content">
                 <div class="search">
@@ -27,7 +26,7 @@
             <div class="mainContent">
                 <div class="main-nav">
                     <span>鏁版嵁鍒楄〃</span>
-                    <el-button type="primary" icon="el-icon-plus" @click="isShowDialog = true; dialogType = 'created'">娣诲姞</el-button>
+                    <el-button class="button-addition" type="primary" icon="el-icon-plus" @click="isShowDialog = true; dialogType = 'create'">娣诲姞</el-button>
                 </div>
                 <!-- 鏁版嵁灞曠ず -->
                 <el-table ref="multipleTable"
@@ -54,7 +53,7 @@
                     <el-table-column prop="operation" label="鎿嶄綔" min-width="15">
                         <template slot-scope="scope">
                             <div class="operation">
-                                <el-link icon="el-icon-view" :underline="false" @click="handleView(scope.row)">鏌ョ湅</el-link>
+                                <el-link icon="el-icon-view" :underline="false" @click="handleView(scope.row, 'view')">鏌ョ湅</el-link>
                                 <el-link icon="el-icon-edit" class="leftPx" :underline="false" @click="handleEdit(scope.row)">缂栬緫</el-link>
                                 <el-link class="leftPx" icon="el-icon-delete-solid" :underline="false"
                                     @click="handleDelete([scope.row.id])">鍒犻櫎</el-link>
@@ -63,9 +62,10 @@
                     </el-table-column>
                 </el-table>
                 <!-- 鏂板缓娑堟伅 -->
-                <el-dialog title="鏂板缓鐭俊妯℃澘" :visible.sync="isShowDialog" v-if="isShowDialog" width="80%"
+                <el-dialog :title="dialogType === 'view' ? '鏌ョ湅鐭俊妯℃澘' : '鏇存柊鐭俊妯℃澘'" :visible.sync="isShowDialog" width="80%"
                     :before-close="handleConfirmClose">
-                    <MyCreate @closeMyDialog="handleConfirmClose" :dialogType="dialogType" :tableRowData="messageTemplateData"></MyCreate>
+                    <MyCreate v-if="isShowDialog" @closeMyDialog="handleConfirmClose" @closeDialog="closeDialog"
+                              :dialogType="dialogType" :tableRowData="messageTemplateData"></MyCreate>
                 </el-dialog>
                 <div class="tools">
                     <div class="funs">
@@ -182,6 +182,9 @@
         },
         // 閲嶇疆
         handleReset(){
+            this.context="";
+            this.messageStatus=0;
+            this.getMessageList();
         },
         // 鏌ョ湅
         handleView(data){
@@ -211,7 +214,7 @@
         },
         // 鑾峰彇娑堟伅鏁版嵁
         getMessageList() {
-            SMS.getSMSTemplateList({ current: this.currentPage, pageSize: this.pageSize, context: this.context, type: this.messageType })
+            SMS.getSMSTemplateList({ current: this.currentPage, pageSize: this.pageSize, title: this.context, type: this.messageStatus })
                 .then(({ records, total }) => {
                   this.tableData = records;
                   this.totalNum = total;
@@ -263,7 +266,7 @@
                             }
                         })
                 })
-                .catch(err => { console.log(err) })
+                .catch(err => {  })
         },
         // 琛ㄦ牸鐩戝惉
         tableChange(list) {
@@ -306,7 +309,10 @@
                 .then(() => {
                     done();
                 })
-        }
+        },
+      closeDialog() {
+          this.isShowDialog = false;
+      }
     }
 }
 </script>
@@ -548,7 +554,6 @@
     &::v-deep .el-dialog__close {
         width: 20px;
         height: 20px;
-        // color: #fff;
     }
 
     &::v-deep .el-dialog__body {

--
Gitblit v1.8.0