104 lines
2.7 KiB
Vue
104 lines
2.7 KiB
Vue
<template>
|
||
<view class="content">
|
||
<u-list @scrolltolower="scrolltolower" v-if="list.length > 0">
|
||
<u-list-item v-for="(item, index) in list" :key="index">
|
||
<view style="display: flex;align-items: center;justify-content: space-between;">
|
||
<view>
|
||
<u-image width="200upx" height="200upx" :src="$filePath + item.FILEPATH"></u-image>
|
||
</view>
|
||
<view class="ml-10" style="flex: 1;">
|
||
<view class="flex-between main-title">
|
||
<text>{{ item.CERTIFICATE }}</text>
|
||
</view>
|
||
<view class="flex-between mt-10 subtitle">
|
||
<text>证书编号:{{ item.SPECIAL_NUMBER }}</text>
|
||
</view>
|
||
<view class="flex-between mt-10 subtitle">
|
||
<text>复审时间:{{ item.REVIEW_TIME }}</text>
|
||
</view>
|
||
<view class="flex-between mt-10 subtitle">
|
||
<view></view>
|
||
<view class="flex-between">
|
||
<u-button type="primary" text="编辑" size="mini" class="bth-mini" @click="fnEdit(item.SPECIAL_USER_ID)"></u-button>
|
||
<u-button type="primary" text="查看" size="mini" class="bth-mini ml-10" @click="fnView(item.SPECIAL_USER_ID)"></u-button>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</u-list-item>
|
||
</u-list>
|
||
<empty v-else></empty>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
import {getCertificateInformationList, getCertificateInformationView} from "../../api";
|
||
|
||
export default {
|
||
data() {
|
||
return {
|
||
SPECIAL_USER_ID:'',
|
||
info: {},
|
||
pageSize: 10,
|
||
currentPage: 1,
|
||
totalPage: 0,
|
||
list: []
|
||
}
|
||
},
|
||
/*onLoad(query) {
|
||
this.SPECIAL_USER_ID = query.SPECIAL_USER_ID
|
||
this.fnGetData()
|
||
},*/
|
||
onShow() {
|
||
this.resetList()
|
||
},
|
||
onNavigationBarButtonTap(e) {
|
||
if (e.index === 0) {
|
||
this.fnEdit()
|
||
}
|
||
},
|
||
methods: {
|
||
async getData() {
|
||
let resData = await getCertificateInformationList({
|
||
showCount: this.pageSize,
|
||
currentPage: this.currentPage,
|
||
});
|
||
this.list = [...this.list, ...resData.varList];
|
||
this.totalPage = resData.page.totalPage;
|
||
},
|
||
resetList() {
|
||
this.pageSize = 10
|
||
this.currentPage = 1
|
||
this.list = []
|
||
this.getData()
|
||
},
|
||
scrolltolower() {
|
||
this.currentPage++;
|
||
if (this.totalPage >= this.currentPage) this.getData();
|
||
},
|
||
fnView(SPECIAL_USER_ID) {
|
||
uni.$u.route({
|
||
url: '/pages/certificate_information/view',
|
||
params:{
|
||
SPECIAL_USER_ID
|
||
}
|
||
})
|
||
},
|
||
fnEdit(SPECIAL_USER_ID) {
|
||
uni.$u.route({
|
||
url: '/pages/certificate_information/add',
|
||
params:{
|
||
SPECIAL_USER_ID
|
||
}
|
||
})
|
||
},
|
||
},
|
||
}
|
||
|
||
|
||
</script>
|
||
|
||
<style scoped>
|
||
|
||
</style>
|