From 722f88db9ee0396050cb737347f332baa175414a Mon Sep 17 00:00:00 2001
From: “dzb” <2632970487@qq.com>
Date: 星期一, 24 十月 2022 09:05:39 +0800
Subject: [PATCH] 添加消息筛选

---
 src/views/operate/message/myIndex/index.vue |   67 ++++++++++++++++++---------------
 1 files changed, 36 insertions(+), 31 deletions(-)

diff --git a/src/views/operate/message/myIndex/index.vue b/src/views/operate/message/myIndex/index.vue
index a6a6527..d90975b 100644
--- a/src/views/operate/message/myIndex/index.vue
+++ b/src/views/operate/message/myIndex/index.vue
@@ -8,7 +8,7 @@
             <div class="header-content">
                 <div class="search">
                     <span>杈撳叆鏌ヨ:</span>
-                    <el-input placeholder="璇疯緭鍏ュ唴瀹�" v-model="context"></el-input>
+                    <el-input placeholder="娑堟伅鏍囬" v-model="context"></el-input>
                 </div>
                 <div class="message-status">
                     <span>娑堟伅鐘舵��:</span>
@@ -19,14 +19,14 @@
                 </div>
                 <div class="message-kind">
                     <span>娑堟伅鍒嗙被:</span>
-                    <el-select v-model="messageStatus" placeholder="璇烽�夋嫨娑堟伅鍒嗙被">
-                        <el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value">
+                    <el-select v-model="messageKind" placeholder="璇烽�夋嫨娑堟伅鍒嗙被">
+                        <el-option v-for="item in kindList" :key="item.id" :label="item.columnName" :value="item.id">
                         </el-option>
                     </el-select>
                 </div>
                 <div class="find">
-                    <el-button type="primary" icon="el-icon-search">鏌ヨ</el-button>
-                    <el-button icon="el-icon-delete-solid">閲嶇疆</el-button>
+                    <el-button type="primary" icon="el-icon-search" @click="handleSearch">鏌ヨ</el-button>
+                    <el-button icon="el-icon-delete-solid" @click="handleReset">閲嶇疆</el-button>
                 </div>
             </div>
         </header>
@@ -156,42 +156,57 @@
                 }
             ],
             tempList: [],
-            messageStatus: 0,
-            messageKind: 0,
+            messageStatus: 2,
+            messageKind: '00',
             statusList: [
                 {
                     label: '鍏ㄩ儴',
-                    value: 0,
+                    value: 2,
                 },
                 {
                     label: '鏈彂甯�',
-                    value: 1,
+                    value: 0,
                 },
                 {
                     label: '宸插彂甯�',
-                    value: 2,
+                    value: 1,
                 }
             ],
             kindList: [
                 {
-                    label: '鍏ㄩ儴',
-                    value: 0,
+                    id:'00',
+                    columnName:'鍏ㄩ儴',
                 },
                 {
-                    label: '鍏ㄩ儴',
-                    value: 0,
+                    id:'01',
+                    columnName:'绔欏唴淇�',
                 },
                 {
-                    label: '鍏ㄩ儴',
-                    value: 0,
+                    id:'02',
+                    columnName:'閭欢',
                 },
+                {
+                    id:'03',
+                    columnName:'鐭俊',
+                }
             ]
         }
     },
     created() {
-        this.setTableData();
+        const {setTableData} = this
+        setTableData();
     },
     methods: {
+        // 鏌ヨ
+        handleSearch(){
+            const {setTableData} = this
+            setTableData();
+        },
+        // 閲嶇疆
+        handleReset(){
+
+        },
+        // 鍒犻櫎淇℃伅
         handleDelete(idarr) {
             this.$confirm('纭鍒犻櫎?')
                 .then(_ => {
@@ -224,7 +239,7 @@
         // 鑾峰彇娑堟伅鏁版嵁
         async getMessageList() {
             let arr = [];
-            const { currentPage, pageSize } = this;
+            const { currentPage, pageSize,context,messageStatus,messageKind } = this;
             await this.$axios({
                 method: 'post',
                 url: 'sccg/message/list',
@@ -233,13 +248,13 @@
                     channelCode: "",
                     createUser: '',
                     current: currentPage,
-                    head: "",
-                    messageType: "",
+                    head: context,
+                    messageType: messageKind === '00' ?'':messageKind,
                     pageSize: pageSize,
                     randomCode: "",
                     remark: "",
                     sendTime: "",
-                    status: '',
+                    status: messageStatus === 2 ? '':messageStatus,
                     targetFrom: "",
                     targetTo: ""
                 }
@@ -336,16 +351,6 @@
             this.currentPage = page;
             this.setTableData();
         },
-        // // 涓婁竴椤电偣鍑讳簨浠�
-        // handlePrev(page) {
-        //     this.currentPage = page;
-        //     this.search();
-        // },
-        // // 涓嬩竴椤电偣鍑讳簨浠�
-        // handleNext(page) {
-        //     this.currentPage = page;
-        //     this.search();
-        // },
         // 鍏抽棴寮圭獥
         handleClose(done) {
             done();

--
Gitblit v1.8.0