106 lines
3.0 KiB
Vue
106 lines
3.0 KiB
Vue
|
<template>
|
|||
|
<view class="content">
|
|||
|
<view class="search card">
|
|||
|
<u--input
|
|||
|
prefixIcon="search"
|
|||
|
placeholder="请输入关键字"
|
|||
|
border="surround"
|
|||
|
v-model="KEYWORDS"
|
|||
|
clearable
|
|||
|
shape="circle"
|
|||
|
></u--input>
|
|||
|
<u-button class="bth-mini ml-10" type="success" text="确定" @click="resetList"></u-button>
|
|||
|
</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.PRVINCE_NAME">{{ item.PRVINCE_NAME }}</template>
|
|||
|
<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.qdCount}}</text>
|
|||
|
<text>检查次数:{{item.checkedCount}}</text>
|
|||
|
</view>
|
|||
|
<view class="flex-between mt-10 subtitle">
|
|||
|
<text>忽略:{{item.hlCount}}</text>
|
|||
|
<text>轻微:{{item.xwCount}}</text>
|
|||
|
<text>一般:{{item.qwCount}}</text>
|
|||
|
<text>较大:{{item.jdCount}}</text>
|
|||
|
</view>
|
|||
|
<view class="flex-between mt-10 subtitle">
|
|||
|
<text>重大隐患:{{item.zdCount}}</text>
|
|||
|
<u-button type="primary" text="查看" size="mini" class="bth-mini" @click="fnNavigatorDetail(item.CORPINFO_ID)"></u-button>
|
|||
|
</view>
|
|||
|
</view>
|
|||
|
</u-list-item>
|
|||
|
</u-list>
|
|||
|
<empty v-else></empty>
|
|||
|
</view>
|
|||
|
</template>
|
|||
|
|
|||
|
<script>
|
|||
|
import {getInspectionReportCorpInfoList} from "../../../api";
|
|||
|
|
|||
|
export default {
|
|||
|
data() {
|
|||
|
return {
|
|||
|
KEYWORDS: '',
|
|||
|
pageSize: 10,
|
|||
|
currentPage: 1,
|
|||
|
totalPage: 0,
|
|||
|
list: [],
|
|||
|
}
|
|||
|
},
|
|||
|
computed: {
|
|||
|
userInfo() {
|
|||
|
return this.$store.getters.getUserInfo
|
|||
|
}
|
|||
|
},
|
|||
|
onLoad() {
|
|||
|
this.resetList()
|
|||
|
},
|
|||
|
methods:{
|
|||
|
async getData(){
|
|||
|
let resData = await getInspectionReportCorpInfoList({
|
|||
|
USER_ID: this.userInfo.USER_ID,
|
|||
|
KEYWORDS: this.KEYWORDS,
|
|||
|
showCount: this.pageSize,
|
|||
|
currentPage: this.currentPage,
|
|||
|
});
|
|||
|
this.list = [...this.list,...resData.valList];
|
|||
|
this.totalPage = resData.page.totalPage;
|
|||
|
},
|
|||
|
resetList() {
|
|||
|
this.pageSize= 10
|
|||
|
this.currentPage= 1
|
|||
|
this.list = []
|
|||
|
this.getData()
|
|||
|
},
|
|||
|
fnNavigatorDetail(CORPINFO_ID){
|
|||
|
uni.$u.route({
|
|||
|
url: '/pages/branch-self-report/index/inspection-records',
|
|||
|
params: {
|
|||
|
CORPINFO_ID,
|
|||
|
}
|
|||
|
})
|
|||
|
},
|
|||
|
scrolltolower() {
|
|||
|
this.currentPage++;
|
|||
|
if(this.totalPage >= this.currentPage) this.getData();
|
|||
|
},
|
|||
|
}
|
|||
|
}
|
|||
|
</script>
|
|||
|
|
|||
|
<style scoped>
|
|||
|
|
|||
|
</style>
|