174 lines
3.3 KiB
Vue
174 lines
3.3 KiB
Vue
<template>
|
|
<page-meta :page-font-size="$store.state.vuex_fontsize+'px'" :root-font-size="$store.state.vuex_fontsize+'px'"></page-meta>
|
|
<view class='box-div'>
|
|
<view class="box-div-title">
|
|
<view class="box-div-left">
|
|
<view class="box-div-left-title">手册列表</view>
|
|
</view>
|
|
</view>
|
|
<view class="sc">
|
|
<!-- <view class="sc-title">
|
|
<view class="one-left">名称</view>
|
|
<view class="one-right">类别</view>
|
|
</view> -->
|
|
<view class="sc-one" v-for="(item,index) in list" :key="index" @click="gotoDtail(item.id)">
|
|
<view class="one-left">{{item.name}}</view>
|
|
<view class="one-right">{{item.type==0?'现场履职':'班组履职'}}</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- <u-loadmore :status="status" @loadmore="loadmore" /> -->
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
gethandbookList
|
|
} from '@/api/handbook.js'
|
|
export default {
|
|
data() {
|
|
return {
|
|
list: [],
|
|
form: {
|
|
pageNum: 1,
|
|
pageSize: 100
|
|
},
|
|
pages: 0,
|
|
status: 'loadmore',
|
|
|
|
}
|
|
},
|
|
onLoad() {
|
|
this.gethandbookList()
|
|
},
|
|
onPullDownRefresh() {
|
|
this.form.pageNum=1;
|
|
this.gethandbookList()
|
|
},
|
|
// onReachBottom() {
|
|
// if (this.form.pageNum >= this.pages) return;
|
|
// this.status = 'loading';
|
|
// this.form.pageNum=1+this.form.pageNum;
|
|
// this.gethandbookList();
|
|
// },
|
|
methods: {
|
|
loadmore(){
|
|
if (this.form.pageNum >= this.pages) return;
|
|
this.status = 'loading';
|
|
this.form.pageNum=1+this.form.pageNum;
|
|
this.gethandbookList();
|
|
},
|
|
gethandbookList() {
|
|
gethandbookList(this.form).then(res => {
|
|
uni.stopPullDownRefresh();
|
|
// this.pages = Math.ceil(res.total/this.form.pageSize);
|
|
// if (this.form.pageNum == 1) {
|
|
// this.list = res.rows;
|
|
// }
|
|
|
|
this.list = res.rows;
|
|
|
|
// if (this.form.pageNum >= this.pages) {
|
|
// this.list.concat(res.rows);
|
|
// this.status = 'nomore'
|
|
// } else {
|
|
// this.list.concat(res.rows);
|
|
// this.status = 'loadmore';
|
|
// }
|
|
|
|
|
|
})
|
|
},
|
|
gotoDtail(item) {
|
|
this.$store.commit('SET_CLEAR');
|
|
uni.navigateTo({
|
|
url: '/pages/aqlz/detail?id=' + item
|
|
})
|
|
},
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
uni-page-body {
|
|
background:#FAFAFA;
|
|
}
|
|
|
|
.sc {
|
|
margin-bottom:25px;
|
|
margin-top: 15px;
|
|
|
|
.sc-title {
|
|
border-radius: 12px 12px 0 0;
|
|
background-color: #102566;
|
|
min-height: 38px;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: 10px 5px;
|
|
|
|
.one-left {
|
|
color: #fff;
|
|
width: calc(100% - 33px);
|
|
font-weight: bold;
|
|
font-size: 13px;
|
|
padding-left: 75px;
|
|
}
|
|
|
|
.one-right {
|
|
width: 33px;
|
|
color: #fff;
|
|
font-size: 12px;
|
|
}
|
|
|
|
}
|
|
|
|
.sc-one {
|
|
background-color: #FFFFFF;
|
|
min-height: 38px;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: 15px;
|
|
border: 1px solid #F1F1F1;
|
|
margin-bottom:5px;
|
|
|
|
.one-left {
|
|
color: #00b27b;
|
|
width: calc(100% - 65px);
|
|
font-weight: bold;
|
|
font-size: 15px;
|
|
}
|
|
|
|
.one-right {
|
|
width: 33px;
|
|
color: #999999;
|
|
font-size: 13px;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
.box-div {
|
|
margin: auto;
|
|
background-color: white;
|
|
border-radius: 8px;
|
|
height: 100%;
|
|
padding: 10px;
|
|
|
|
.box-div-title {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
|
|
.box-div-left {
|
|
display: flex;
|
|
|
|
.box-div-left-title {
|
|
font-size: 20px;
|
|
font-weight: bold;
|
|
padding: 5px 10px;
|
|
position: relative;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style> |