gaoluyang
2024-07-31 38e6f27a8082e1173e3c02a33da5da39b6c6872c
src/view/notice.vue
@@ -6,14 +6,15 @@
  :direction="direction"
  :before-close="handleClose" style="height: 100vh;z-index: 9999999;" size="450px">
    <div class="notice-content" v-loading="loading">
      <scroll-pagination @load="refresh" :finishLoding="finishLoding" :list="list">
      <el-button size="small" type="primary" @click="handleDropdownAll(1)" style="margin-bottom: 10px;margin-left: 330px;">全部已读</el-button>
      <scroll-pagination @load="refresh" :finishLoding="finishLoding" :list="list" style="height: calc(100% - 50px);">
        <div
        class="notice-content-item"
        v-for="(m,i) in list"
        :key="i"
        :class="{readStyle:!m.viewStatus}"
        :class="{readStyle:m.viewStatus}"
        @click="goNoticeDetail(m)">
          <img :src="`../../static/img/notice-${m.viewStatus?0:1}-${m.messageType}.svg`" alt="" style="margin-right: 6px;">
          <img :src="`../../static/img/notice-${m.viewStatus?1:0}-${m.messageType}.svg`" alt="" style="margin-right: 6px;">
          <div class="notice-content-item-left">
            <p>{{ m.theme }}</p>
            <p style="width: 100%;display: flex;align-items: center;justify-content: space-between;">
@@ -23,7 +24,7 @@
          </div>
        </div>
      </scroll-pagination>
      <!-- <div v-if="list.length<1&&!loading" style="color:#909399;font-size:14px;text-align: center;margin-top:200px" >暂无数据</div> -->
      <div v-if="list.length<1&&!loading" style="color:#909399;font-size:14px;text-align: center;margin-top:200px" >暂无数据</div>
    </div>
  </el-drawer>
</div>
@@ -69,22 +70,7 @@
          value:4
        },
      ],
      list:[
        // {
        //   messageType:1,
        //   theme:'测试标题',
        //   createTime: '2019-08-30 15:46:17',
        //   createUser:'<USERNAME>',
        //   viewStatus:false,
        // },
        // {
        //   messageType:2,
        //   theme:'测试标题',
        //   createTime: '2019-08-30 15:46:17',
        //   createUser:'<USERNAME>',
        //   viewStatus:true,
        // },
      ],
      list:[],
      currentPage:1,
      pageSize: 8, // 一页7条
      total: null,
@@ -221,6 +207,7 @@
        this.keyMap = {};
        this.currentPage = 1;
        this.refresh();
        this.$emit('goNoticeDetail')
      })
    }
  },