hyingbo
2025-06-04 f95bd530f635ab9bad73fba9de3bc7eeb902c54d
我的消息添加状态筛选
已修改1个文件
44 ■■■■■ 文件已修改
src/views/system/UserAnnouncementList.vue 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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="查看";