| | |
| | | </div> |
| | | <div class="right-3 card" style="overflow: hidden;"> |
| | | <div class="right-3-tab"> |
| | | <div class="tab-item" style="cursor: pointer;" :class="{active:currentIndex==0}" @click="currentIndex=0">预警提醒 10</div> |
| | | <div class="tab-item" style="cursor: pointer;" :class="{active:currentIndex==1}" @click="currentIndex=1">通知通告 12</div> |
| | | <div class="tab-item" style="cursor: pointer;" :class="{active:currentIndex==4}" @click="currentIndex=4">预警提醒</div> |
| | | <div class="tab-item" style="cursor: pointer;" :class="{active:currentIndex==5}" @click="currentIndex=5">通知通告</div> |
| | | </div> |
| | | <div class="right-3-list"> |
| | | <div class="list3-item" v-for="(m,i) in 5" :key="i"> |
| | | <div class="right-3-list" v-loading="listLoading"> |
| | | <scroll-pagination @load="getList" :finishLoding="finishLoding"> |
| | | <div class="list3-item" v-for="(m,i) in list" :key="i"> |
| | | <div class="list3-item-title"> |
| | | <img src="../../../static/img/index-tip.svg" alt=""> |
| | | <p>设备到期提醒</p> |
| | | <p>{{ m.theme }}</p> |
| | | </div> |
| | | <div class="list3-item-info"> |
| | | <p style="width: 73%;-webkit-line-clamp: 1;" class="ellipsis-multiline">编号<span style="color:#3A7BFA;"> SB20240101-001 </span>的设备将于2023-09-09 11:11:11过期</p> |
| | | <p>2023-09-09 09:09:09</p> |
| | | <p style="width: 73%;-webkit-line-clamp: 1;" class="ellipsis-multiline"> |
| | | <!-- 编号<span style="color:#3A7BFA;"> SB20240101-001 </span>的设备将于2023-09-09 11:11:11过期 --> |
| | | {{ m.content }} |
| | | </p> |
| | | <p>{{ m.createTime }}</p> |
| | | </div> |
| | | </div> |
| | | </scroll-pagination> |
| | | <div v-if="list.length<1&&!listLoading" style="color:#909399;font-size:14px;text-align: center;margin-top:80px" >暂无数据</div> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | |
| | | import { |
| | | getYearAndMonthAndDays |
| | | } from '../../util/date' |
| | | import ScrollPagination from '../tool/scroll-paging.vue' |
| | | export default { |
| | | components: { |
| | | ScrollPagination |
| | | }, |
| | | data() { |
| | | return { |
| | | user: {}, |
| | | now: null, |
| | | calendarValue: new Date(), |
| | | currentIndex:0, |
| | | currentIndex:4, |
| | | dialogVisible:false, |
| | | query:{ |
| | | time:'', |
| | |
| | | weekdays:[], |
| | | listScheduleByMe:[], |
| | | scheduleLoading:false, |
| | | list:[], |
| | | currentPage:1, |
| | | pageSize: 8, // 一页7条 |
| | | total: null, |
| | | listLoading: true, // 组件loading的展示,默认为true |
| | | finishLoding: false // 加载完成,显示已经没有更多了 |
| | | } |
| | | }, |
| | | watch:{ |
| | | calendarValue(val){ |
| | | this.getScheduleByMe() |
| | | }, |
| | | currentIndex(){ |
| | | this.currentPage = 1; |
| | | this.list = []; |
| | | this.getList(); |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | this.init(); |
| | | this.weekdays = this.getWeekdaysForNextWeek() |
| | | this.getScheduleByMe() |
| | | this.currentPage = 1; |
| | | this.list = []; |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | getList(){ |
| | | if(this.currentPage==1){ |
| | | this.listLoading = true |
| | | } |
| | | if(this.list.length==0){ |
| | | this.finishLoding = false; |
| | | } |
| | | this.$axios.get(this.$api.informationNotification.page+'?size='+this.pageSize+'¤t='+this.currentPage+'&messageType='+this.currentIndex).then(res => { |
| | | if(res.code === 201){ |
| | | return |
| | | } |
| | | let list = res.data.records; |
| | | this.total = res.data.total; |
| | | if(list.length==0){ |
| | | this.finishLoding = true; |
| | | }else{ |
| | | if(list.length<this.pageSize){ |
| | | this.finishLoding = true; |
| | | } |
| | | this.list = this.list.concat(list) |
| | | if(this.total==this.list.length){ |
| | | this.finishLoding = true; |
| | | } |
| | | this.currentPage++; |
| | | } |
| | | this.listLoading = false |
| | | }) |
| | | }, |
| | | nowTime() { |
| | | var date = new Date(); |
| | | var y = date.getFullYear(); |
| | |
| | | this.workList.push(res.data[`work${i}`]) |
| | | } |
| | | this.workDay = res.data.weekDays.map(m=>{ |
| | | return m[2] |
| | | let arr = m.split('-') |
| | | return arr[2] |
| | | }) |
| | | }) |
| | | }, |
| | |
| | | }) |
| | | }) |
| | | }, |
| | | } |
| | | }, |
| | | } |
| | | </script> |