118 lines
2.8 KiB
Vue
118 lines
2.8 KiB
Vue
<template>
|
||
<view class="content">
|
||
<view class="search card">
|
||
<u--input
|
||
prefixIcon="search"
|
||
placeholder="请输入关键字"
|
||
border="surround"
|
||
v-model="companyName"
|
||
clearable
|
||
shape="circle"
|
||
></u--input>
|
||
<view class="bth-mini ml-10">
|
||
<u-button type="success" text="确定" @click="resetList"></u-button>
|
||
</view>
|
||
|
||
</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.companyName }}</text>
|
||
</view>
|
||
<view class="flex-between mt-10 subtitle">
|
||
<text>
|
||
属地:
|
||
<template v-if="item.companyCity">{{ item.companyCity }}</template>
|
||
<template v-if="item.companyArea"> --{{ item.companyArea }}</template>
|
||
</text>
|
||
</view>
|
||
<view class="flex-between mt-10 subtitle">
|
||
<text>主要负责人:{{item.contacts}}</text>
|
||
<text>电话:{{item.contactsPhone}}</text>
|
||
</view>
|
||
<view class="flex-between mt-10 subtitle">
|
||
<text>忽略隐患数:{{item.ignoreHiddenCount}}</text>
|
||
|
||
</view>
|
||
<view class="see_btn">
|
||
<u-button type="primary" text="查看" size="mini" @click="fnNavigatorDetail(item.companyId)"></u-button>
|
||
</view>
|
||
</view>
|
||
</u-list-item>
|
||
</u-list>
|
||
<empty v-else></empty>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
import { getIgnoreCountByCorpInfo } from "@/api";
|
||
|
||
export default {
|
||
data() {
|
||
return {
|
||
companyName: '',
|
||
limit: 10,
|
||
curPage: 1,
|
||
totalPage: 0,
|
||
list: [],
|
||
}
|
||
},
|
||
computed: {
|
||
userInfo() {
|
||
return this.$store.getters.getUserInfo
|
||
}
|
||
},
|
||
onLoad() {
|
||
this.resetList()
|
||
},
|
||
methods:{
|
||
async getData(){
|
||
let { page } = await getIgnoreCountByCorpInfo({
|
||
companyName: this.companyName,
|
||
limit: this.limit,
|
||
curPage: this.curPage,
|
||
});
|
||
this.list = [ ...this.list, ...page.list];
|
||
this.totalPage = page.totalPage;
|
||
},
|
||
resetList() {
|
||
this.limit= 10
|
||
this.curPage= 1
|
||
this.list = []
|
||
this.getData()
|
||
},
|
||
fnNavigatorDetail(companyId){
|
||
uni.$u.route({
|
||
url: '/pages/general-hidden-management/ignore-hidden/detail-list',
|
||
params: {
|
||
companyId,
|
||
}
|
||
})
|
||
},
|
||
scrolltolower() {
|
||
this.curPage++;
|
||
if(this.totalPage >= this.curPage) this.getData();
|
||
},
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style scoped lang="scss">
|
||
.search{
|
||
display: flex;
|
||
.ml-10{
|
||
margin-left: 10rpx;
|
||
}
|
||
.bth-mini{
|
||
width: 100rpx;
|
||
}
|
||
|
||
}
|
||
.see_btn{
|
||
width: 100rpx;
|
||
float: right;
|
||
}
|
||
|
||
</style>
|