qa-regulatory-gwj-app/pages/key-project-management/safety-environmental-inspec.../detail-list.vue

131 lines
3.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-07-27 15:46:35 +08:00
<view class="ml-10">
<u-button class="bth-mini ml-10" type="success" text="确定" @click="resetList"></u-button>
</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.INSPECTION_PLACE }}</text>
</view>
<view class="flex-between mt-10 subtitle">
<text>
检查状态{{ state[item.INSPECTION_STATUS] }}
</text>
<text>
检查类型{{ item.INSPECTION_TYPE_NAME }}
</text>
</view>
<view class="flex-between mt-10 subtitle">
<text class="u-line-1">检查人{{ item.INSPECTION_USERS }}</text>
</view>
<view class="flex-between mt-10 subtitle">
<text>被检查人{{item.PERSON_NAME}}</text>
</view>
<view class="flex-between mt-10 subtitle">
<text>检查时间{{item.INSPECTION_TIME_START}}-{{item.INSPECTION_TIME_END}}</text>
</view>
<view class="flex-between mt-10 subtitle">
<text>检查隐患数{{item.HIDDEN_COUNT}}</text>
2024-07-27 15:46:35 +08:00
</view>
<view class="see_btn">
2023-11-07 10:08:37 +08:00
<u-button type="primary" text="查看" size="mini" class="bth-mini" @click="fnNavigatorDetail(item.KEYPROJECTCHECK_ID,'view')"></u-button>
</view>
</view>
</u-list-item>
</u-list>
<empty v-else></empty>
</view>
</template>
<script>
import {getKeyProjectsCheckList} from "../../../api";
export default {
data() {
return {
KEYWORDS: '',
CORPINFO_ID: '',
2023-11-07 10:08:37 +08:00
OUTSOURCED_ID: '',
pageSize: 10,
currentPage: 1,
totalPage: 0,
list: [],
state:{
'-1':'检查人驳回',
'0':'待被检查人确认',
'1':'被检查人已确认',
'2':'已归档',
}
}
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
this.fnNavigatorDetail('', 'add');
}
},
onLoad(e) {
this.OUTSOURCED_ID = e.OUTSOURCED_ID,
this.CORPINFO_ID = this.$route.query.CORPINFO_ID
2023-11-07 10:08:37 +08:00
},
onShow(){
this.resetList()
},
methods:{
async getData(){
let resData = await getKeyProjectsCheckList({
KEYWORDS: this.KEYWORDS,
OUTSOURCED_ID: this.OUTSOURCED_ID,
CORPINFO_ID: this.CORPINFO_ID,
2023-11-07 10:08:37 +08:00
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(KEYPROJECTCHECK_ID, type) {
uni.$u.route({
url: '/pages/key-project-management/safety-environmental-inspection/detail',
params: {
KEYPROJECTCHECK_ID,
type,
CORPINFO_ID:this.CORPINFO_ID,
2023-11-07 10:08:37 +08:00
OUTSOURCED_ID:this.OUTSOURCED_ID
}
})
},
scrolltolower() {
this.currentPage++;
if(this.totalPage >= this.currentPage) this.getData();
},
}
}
</script>
2024-07-27 15:46:35 +08:00
<style scoped lang="scss">
.see_btn{
width: 200rpx;
float: right;
}
2023-11-07 10:08:37 +08:00
</style>