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

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