| | |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | </div> |
| | | <div class="notice-content" @scroll="scrollFn" v-loading="loading"> |
| | | <div class="notice-content-item" v-for="(m,i) in list" :key="i"> |
| | | <div class="btns" v-if="m"> |
| | | <el-dropdown style="margin-right: 20px;" trigger="click" @command="e=>handleDropdown(e,m)" v-if="m.messageType==2||m.messageType==3"> |
| | | <span class="el-dropdown-link"> |
| | | <span class="more" style="line-height: 26px;display: inline-block;">···</span> |
| | | </span> |
| | | <el-dropdown-menu slot="dropdown" v-if="m.messageType==2"> |
| | | <el-dropdown-item v-for="(n,j) in dropdownList0" :key="j" :command="n.value"> |
| | | {{ n.label }} |
| | | </el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | <el-dropdown-menu slot="dropdown" v-if="m.messageType==3"> |
| | | <el-dropdown-item v-for="(n,j) in dropdownList1" :key="j" :command="n.value"> |
| | | {{ n.label }} |
| | | </el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | <i class="el-icon-close" style="cursor: pointer;" @click="handleDel(m)"></i> |
| | | </div> |
| | | <div class="content"> |
| | | <img :src="`../../static/img/notice-${m.messageType}.svg`" alt="" style="width: 50px;margin-right: 18px;"> |
| | | <div class="content-info"> |
| | | <h4 style="font-weight: normal;margin-bottom: 4px;display: flex;align-items: center;justify-content: space-between;"> |
| | | <span>{{ m.theme }}<el-tag :type="!m.messageStatus?'danger':'success'" size="small" v-if="m.messageType==1||m.messageType==2||m.messageType==3" style="margin-left: 8px;">{{ !m.messageStatus?'未处理':'已处理' }}</el-tag></span> |
| | | <span class="time" style="color: #999999;font-size: 12px;">{{ m.createTime }}</span> |
| | | </h4> |
| | | <p style="color: #999999;font-size: 14px;margin-bottom: 6px;cursor: pointer;" class="ellipsis-multiline" @click="goNoticeDetail(m)">{{ m.content }}</p> |
| | | <p style="font-size: 12px;color: #999999;display: flex;align-items: center;justify-content: space-between;"> |
| | | <span>发送人:{{m.createUser}}</span> |
| | | <span>收件人:{{ m.consigneeUser }}</span> |
| | | </p> |
| | | <div class="notice-content" v-loading="loading"> |
| | | <scroll-pagination @load="refresh" :finishLoding="finishLoding"> |
| | | <div class="notice-content-item" v-for="(m,i) in list" :key="i"> |
| | | <div class="btns" v-if="m"> |
| | | <el-dropdown style="margin-right: 20px;" trigger="click" @command="e=>handleDropdown(e,m)" v-if="m.messageType==2||m.messageType==3"> |
| | | <span class="el-dropdown-link"> |
| | | <span class="more" style="line-height: 26px;display: inline-block;">···</span> |
| | | </span> |
| | | <el-dropdown-menu slot="dropdown" v-if="m.messageType==2"> |
| | | <el-dropdown-item v-for="(n,j) in dropdownList0" :key="j" :command="n.value"> |
| | | {{ n.label }} |
| | | </el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | <el-dropdown-menu slot="dropdown" v-if="m.messageType==3"> |
| | | <el-dropdown-item v-for="(n,j) in dropdownList1" :key="j" :command="n.value"> |
| | | {{ n.label }} |
| | | </el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | <i class="el-icon-close" style="cursor: pointer;" @click="handleDel(m)"></i> |
| | | </div> |
| | | <div class="content"> |
| | | <img :src="`../../static/img/notice-${m.messageType}.svg`" alt="" style="width: 50px;margin-right: 18px;"> |
| | | <div class="content-info"> |
| | | <h4 style="font-weight: normal;margin-bottom: 4px;display: flex;align-items: center;justify-content: space-between;"> |
| | | <span>{{ m.theme }}<el-tag :type="!m.messageStatus?'danger':'success'" size="small" v-if="m.messageType==1||m.messageType==2||m.messageType==3" style="margin-left: 8px;">{{ !m.messageStatus?'未处理':'已处理' }}</el-tag></span> |
| | | <span class="time" style="color: #999999;font-size: 12px;">{{ m.createTime }}</span> |
| | | </h4> |
| | | <p style="color: #999999;font-size: 14px;margin-bottom: 6px;cursor: pointer;" class="ellipsis-multiline" @click="goNoticeDetail(m)">{{ m.content }}</p> |
| | | <p style="font-size: 12px;color: #999999;display: flex;align-items: center;justify-content: space-between;"> |
| | | <span>发送人:{{m.createUser}}</span> |
| | | <span>收件人:{{ m.consigneeUser }}</span> |
| | | </p> |
| | | </div> |
| | | </div> |
| | | <div class="new-notice" v-if="!m.viewStatus"> |
| | | <span>new</span> |
| | | </div> |
| | | </div> |
| | | <div class="new-notice" v-if="!m.viewStatus"> |
| | | <span>new</span> |
| | | </div> |
| | | </div> |
| | | <div v-if="list.length<1&&!loading&&!isLoding" style="color:#909399;font-size:14px;text-align: center;margin-top:200px" >暂无数据</div> |
| | | <div v-if="list.length>0"> |
| | | <el-button |
| | | v-if="isLoding" |
| | | type="text" |
| | | style="display: flex; margin: 0 auto; color: #909399" |
| | | ><i class="el-icon-loading" style="font-size:20px"></i |
| | | ></el-button> |
| | | <el-button |
| | | type="text" |
| | | v-if="finishLoding" |
| | | style="display: flex; margin: 0 auto; color: #909399" |
| | | >已经没有更多啦~</el-button |
| | | > |
| | | </div> |
| | | </scroll-pagination> |
| | | <div v-if="list.length<1&&!loading" style="color:#909399;font-size:14px;text-align: center;margin-top:200px" >暂无数据</div> |
| | | </div> |
| | | </el-drawer> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import ScrollPagination from '../components/tool/scroll-paging.vue' |
| | | export default { |
| | | components: { |
| | | ScrollPagination |
| | | }, |
| | | data(){ |
| | | return{ |
| | | drawer:false, |
| | | direction:'rtl', |
| | | options:[], |
| | | type:'0', |
| | | list:[], |
| | | dropdownList0:[ |
| | | { |
| | | label:'通过', |
| | |
| | | value:4 |
| | | }, |
| | | ], |
| | | list:[], |
| | | currentPage:1, |
| | | pageSize: 16, // 一页16条 |
| | | pageSize: 8, // 一页7条 |
| | | total: null, |
| | | loading: false, // 组件loading的展示,默认为true |
| | | isLoding: false, // 加载中,loading图标,默认为true |
| | | loading: true, // 组件loading的展示,默认为true |
| | | finishLoding: false // 加载完成,显示已经没有更多了 |
| | | } |
| | | }, |
| | |
| | | }, |
| | | methods:{ |
| | | refresh(){ |
| | | if(this.currentPage>1){ |
| | | this.isLoding = true |
| | | }else{ |
| | | if(this.currentPage==1){ |
| | | this.loading = true |
| | | } |
| | | if(this.list.length==0){ |
| | | window.addEventListener("scroll", this.throttle(this.scrollFn, 20000)); |
| | | this.finishLoding = false |
| | | } |
| | | let type = this.type==0?null:this.type; |
| | | this.$axios.get(this.$api.informationNotification.page+'?size='+this.pageSize+'¤t='+this.currentPage+(type?'&messageType='+type:'')).then(res => { |
| | |
| | | if(this.total==this.list.length){ |
| | | this.finishLoding = true; |
| | | } |
| | | this.currentPage++ |
| | | } |
| | | this.loading = false |
| | | this.isLoding = false; |
| | | }) |
| | | }, |
| | | open(){ |
| | |
| | | goNoticeDetail(row){ |
| | | this.$axios.put(this.$api.informationNotification.triggerModificationStatusToRead+'/'+row.id).then(res => { |
| | | this.drawer = false; |
| | | row.num = Math.random(100); |
| | | this.$bus.$emit("change", JSON.stringify(row)); |
| | | this.$parent.addTab({ |
| | | v: "消息详情", |
| | | i: "el-icon-s-tools", |