From f95bd530f635ab9bad73fba9de3bc7eeb902c54d Mon Sep 17 00:00:00 2001
From: hyingbo <1363390067@qq.com>
Date: 星期三, 04 六月 2025 18:07:09 +0800
Subject: [PATCH] 我的消息添加状态筛选

---
 src/views/system/UserAnnouncementList.vue |   44 +++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 43 insertions(+), 1 deletions(-)

diff --git a/src/views/system/UserAnnouncementList.vue b/src/views/system/UserAnnouncementList.vue
index 891880e..e72e518 100644
--- a/src/views/system/UserAnnouncementList.vue
+++ b/src/views/system/UserAnnouncementList.vue
@@ -15,8 +15,19 @@
               <a-input placeholder="璇疯緭鍏ュ彂甯冧汉" v-model="queryParam.sender"></a-input>
             </a-form-item>
           </a-col>
+          <a-col :span="6">
+            <a-form-item label="娑堟伅绫诲瀷">
+              <a-auto-complete
+                v-model="queryParam.msgCategory"
+                :data-source="messageTypeList"
+                placeholder="璇烽�夋嫨娑堟伅绫诲瀷"
+                :filter-option="filterOption"
+                :allowClear="true"
+              />
+            </a-form-item>
+          </a-col>
 
-          <a-col :span="8" >
+          <a-col :span="6" >
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
               <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
@@ -68,6 +79,7 @@
       return {
         description: '绯荤粺閫氬憡琛ㄧ鐞嗛〉闈�',
         queryParam: {},
+        messageTypeList: [],
         columns: [{
           title: '鏍囬',
           align:"center",
@@ -137,7 +149,37 @@
         formData:''
       }
     },
+
+    created() {
+      this.getDriveTypeByApi()
+    },
     methods: {
+      /**
+       * 璋冪敤鎺ュ彛鑾峰彇鎺у埗绯荤粺绫诲瀷
+       */
+      getDriveTypeByApi(){
+        getAction("/sys/sysAnnouncementSend/getMessageType").then(res => {
+          if (res.success) {
+            this.messageTypeList=res.result.map(item=>item.value)
+          } else {
+            this.$message.warning(res.message)
+          }
+        })
+          .finally(() => {
+            this.loading = false
+          })
+      },
+      /**
+       * 鑱旀兂杈撳叆妗嗙瓫閫夊姛鑳�
+       * @param input 杈撳叆鐨勫唴瀹�
+       * @param option 閰嶇疆
+       * @returns {boolean} 鍒ゆ柇鏄惁绛涢��
+       */
+      filterOption(input, option) {
+        return (
+          option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0
+        );
+      },
       handleDetail: function(record){
         this.$refs.sysAnnouncementModal.detail(record);
         this.$refs.sysAnnouncementModal.title="鏌ョ湅";

--
Gitblit v1.9.3