<template>
|
<view class="datum_index">
|
<view class="datum_headers">
|
<u--input placeholder="检查事项" width="80%" v-model="search.inspectName"></u--input>
|
<view style="width:60px;">
|
<u-button type="primary" color="#1977FF" text="查询" @click="searchNoticeList"></u-button>
|
</view>
|
</view>
|
<view class="datum_main">
|
<scroll-view
|
scroll-y="true"
|
class="datum_index_scroll"
|
:scroll-top="scrollTop"
|
refresher-enabled="true"
|
refresher-background="#EAEAEA"
|
:refresher-triggered="triggered"
|
@refresherpulling="refresherrefresh"
|
@scrolltolower="scrolltoLower">
|
<view class="datum_main_list" v-for="(item,index) in rectifyLists" :key="index">
|
<view class="notice_items">
|
<view class="notice_item_text" style="color:#333333 ;">{{item.inspectName}}</view>
|
<view class="notice_item_name" style="color: #1977FF;display: flex;position:relative" @click="tabDetails(item)">{{item.realName}}
|
<view class="icon_style">
|
<u-icon name="arrow-right"></u-icon>
|
</view>
|
</view>
|
</view>
|
<view class="notice_items">
|
<view class="notice_item_text"><span>工号:</span>{{item.jobNum}}</view>
|
<view class="notice_item_name">{{item.createTime}}</view>
|
</view>
|
</view>
|
<u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" />
|
</scroll-view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
import { throttle } from '../../plugins/public.js';
|
export default{
|
data(){
|
return{
|
search:{},//查询条件
|
rectifyLists:[
|
],//整改通知列表
|
pageNum: 1,
|
pageSize: 10,
|
loadPage: 0,
|
scrollTop: 0,
|
triggered: true,
|
status: 'loading',
|
loadText: {
|
loading: '努力加载中',
|
nomore: '没有更多数据了'
|
},
|
}
|
},
|
onLoad() {
|
this.searchNoticeList()
|
},
|
methods:{
|
//跳转详情
|
tabDetails(val){
|
uni.navigateTo({
|
url: `./rectifyDetails?secureInspectId=${val.secureInspectId}`
|
})
|
},
|
//查询列表
|
searchNoticeList(){
|
this.triggered = true;
|
this.rectifyLists = [];
|
this.$api.reboSystem.searchNoticeLists(this.search).then(res=>{
|
if(res.statusMsg === 'ok'){
|
this.rectifyLists = res.data
|
this.triggered = false;
|
this.status = 'nomore';
|
}else{
|
uni.$u.toast(res.statusMsg);
|
}
|
}).catch((err) => {
|
uni.$u.toast('请检查网络服务或联系管理员!')
|
})
|
},
|
//自定义下拉刷新
|
refresherrefresh: throttle(function() {
|
this.status = 'loading';
|
this.pageNum = 1;
|
this.searchNoticeList();
|
uni.$u.toast('刷新成功');
|
}, 500),
|
//触底刷新
|
scrolltoLower: throttle(function() {
|
this.status = 'loading';
|
this.pageNum = 1;
|
this.searchNoticeList();
|
}, 1500),
|
}
|
}
|
</script>
|
|
<style scoped lang="scss">
|
.datum_index{
|
background-color: #FFFFFF;
|
height: 100vh;
|
padding: 0 15px;
|
overflow: hidden;
|
|
.datum_headers{
|
height: 10vh;
|
display: flex;
|
align-items: center;
|
border-bottom: 1px solid #EAEAEA;
|
|
}
|
.datum_main{
|
height: calc(100vh - 85px);
|
.datum_index_scroll{
|
height: 90%;
|
|
.datum_main_list{
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
line-height: 50px;
|
border-bottom: 1px solid #EAEAEA;
|
padding-bottom: 10px;
|
|
.notice_items{
|
width: 100%;
|
height: 40px;
|
display: flex;
|
justify-content: space-between;
|
.notice_item_text{
|
font-size: 16px;
|
color:#999999;
|
}
|
.notice_item_name{
|
font-size: 16px;
|
color: #999999;
|
}
|
}
|
}
|
}
|
}
|
}
|
::v-deep .u-border{
|
border-top-right-radius: 0px!important;
|
border-bottom-right-radius: 0px!important;
|
border-color: #1977FF!important;
|
padding-top: 7px!important;
|
padding-bottom: 8px!important;
|
}
|
::v-deep .u-button--square{
|
border-top-left-radius: 0px!important;
|
border-bottom-left-radius: 0px!important;
|
}
|
</style>
|
<style scoped>
|
.icon_style /deep/.u-icon__icon{
|
top: 17px!important;
|
}
|
</style>
|