qa-regulatory-gwj-app/pages/general-hidden-management/special-hidden/list.vue

109 lines
2.5 KiB
Vue
Raw Normal View History

2023-11-07 10:08:37 +08:00
<template>
<view class="content">
<view class="search card">
<u--input
prefixIcon="search"
placeholder="请输入关键字"
border="surround"
v-model="KEYWORDS"
clearable
shape="circle"
></u--input>
2024-10-10 10:14:31 +08:00
<view class="bth-mini ml-10">
<u-button type="success" text="确定" @click="resetList"></u-button>
2024-07-27 15:13:42 +08:00
</view>
2023-11-07 10:08:37 +08:00
</view>
<u-list @scrolltolower="scrolltolower" v-if="list.length > 0">
<u-list-item v-for="(item, index) in list" :key="index">
<view>
<view class="flex-between main-title">
<text>{{ item.CORP_NAME }}</text>
</view>
<view class="flex-between mt-10 subtitle">
<text>
属地
<template v-if="item.CITY_NAME">{{ item.CITY_NAME }}</template>
<template v-if="item.COUNTRY_NAME"> --{{ item.COUNTRY_NAME }}</template>
</text>
</view>
<view class="flex-between mt-10 subtitle">
<text>特殊处置隐患数{{ item.qwCount + item.xwCount }}</text>
2024-07-27 15:13:42 +08:00
</view>
<view class="see_btn">
2024-10-10 10:14:31 +08:00
<u-button type="primary" text="查看" size="mini" @click="fnNavigatorDetail(item.CORPINFO_ID)"></u-button>
2023-11-07 10:08:37 +08:00
</view>
</view>
</u-list-item>
</u-list>
<empty v-else></empty>
</view>
</template>
<script>
import {getSpecialCountByCorpInfo} from "../../../api";
export default {
data() {
return {
KEYWORDS: '',
pageSize: 10,
currentPage: 1,
totalPage: 0,
list: [{}],
}
},
onLoad() {
this.resetList()
},
methods:{
async getData(){
let resData = await getSpecialCountByCorpInfo({
KEYWORDS: this.KEYWORDS,
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()
},
fnNavigatorDetail(CORPINFO_ID){
uni.$u.route({
url: '/pages/general-hidden-management/special-hidden/detail-list',
params: {
CORPINFO_ID,
}
})
},
scrolltolower() {
this.currentPage++;
if(this.totalPage >= this.currentPage) this.getData();
},
}
}
</script>
2024-07-27 15:13:42 +08:00
<style scoped lang="scss">
.search{
display: flex;
.ml-10{
margin-left: 10rpx;
}
.bth-mini{
width: 100rpx;
}
}
.see_btn{
width: 100rpx;
float: right;
}
2023-11-07 10:08:37 +08:00
</style>