qa-prevention-xgf-app/safetyEnvirSubPackages/pages/inspector-archives/list.vue

122 lines
4.5 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<view class="content">
<view class="search card">
<u--input prefixIcon="search" placeholder="请输入关键字" border="surround" v-model="keyword" 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.INSPECTED_CORPINFO_ID_NAME }}</text>
</view>
<view class="flex-between mt-10 subtitle">
<text>检查发起人{{ item.INSPECTION_ORIGINATOR_NAME }}</text>
<text>检查类型{{ item.INSPECTION_TYPE_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>
状态
<template v-if="item.INSPECTION_STATUS == '0'">待检查人核实</template>
<template v-else-if="item.INSPECTION_STATUS == '1'">检查人核实中</template>
<template v-else-if="item.INSPECTION_STATUS == '2'">待被检查人确认</template>
<template v-else-if="item.INSPECTION_STATUS == '3'">待指派</template>
<template v-else-if="item.INSPECTION_STATUS == '4'">指派中</template>
<template v-else-if="item.INSPECTION_STATUS == '5'">指派完成</template>
<template v-else-if="item.INSPECTION_STATUS == '6'">检查待验收</template>
<template v-else-if="item.INSPECTION_STATUS == '7'">检查已验收</template>
<template v-else-if="item.INSPECTION_STATUS == '8'">已归档</template>
<template v-else-if="item.INSPECTION_STATUS == '-1'">检查人核实打回</template>
<template v-else-if="item.INSPECTION_STATUS == '-2'">被检查人申辩</template>
</text>
</view>
<view class="flex-end mt-10">
<u-button type="primary" text="查看" size="mini" class="bth-mini"
@click="fnNavigatorDetail(item.INSPECTION_ID)"></u-button>
<u-button
v-show="(item.INSPECTION_STATUS === '6' || item.INSPECTION_STATUS === '5' || item.INSPECTION_STATUS === '7') && item.checkout === 1"
type="primary" text="验收" size="mini" class="bth-mini ml-10"
@click="fnNavigatorAcceptance(item.INSPECTION_ID)"></u-button>
</view>
</view>
</u-list-item>
</u-list>
<empty v-else></empty>
</view>
</template>
<script>
import { getSafetyenvironmentalCheckList, getSafetyenvironmentalList } from "../../api";
import { initiateList } from '../../../Mock/safetyEnvirData';
export default {
data() {
return {
keyword: '',
pageSize: 10,
currentPage: 1,
totalPage: 0,
list: [],
}
},
computed: {
userInfo() {
return this.$store.getters.getUserInfo
}
},
onShow() {
this.resetList()
},
methods: {
async getData() {
// TODO: 目前因后端资源接口未完成,故注释接口数据接入逻辑
// let resData = await getSafetyenvironmentalCheckList({
// INSPECTION_ORIGINATOR_ID: this.userInfo.USER_ID,
// KEYWORDS: this.keyword,
// INSPECTION_STATUS: '3-7',
// showCount: this.pageSize,
// currentPage: this.currentPage,
// ARCHIVE_USER_ID: this.userInfo.USER_ID
// });
// this.list = [...this.list, ...resData.varList];
// this.totalPage = resData.page.totalPage;
this.list = initiateList;
this.totalPage = initiateList.length;
},
resetList() {
this.pageSize = 10
this.currentPage = 1
this.list = []
this.getData()
},
fnNavigatorDetail(INSPECTION_ID) {
uni.$u.route({
url: '/safetyEnvirSubPackages/pages/inspector-archives/detail',
params: {
INSPECTION_ID,
}
})
},
fnNavigatorAcceptance(INSPECTION_ID) {
uni.$u.route({
url: '/safetyEnvirSubPackages/pages/inspector-archives/acceptance-list',
params: {
INSPECTION_ID,
}
})
},
scrolltolower() {
this.currentPage++;
if (this.totalPage >= this.currentPage) this.getData();
},
}
}
</script>
<style scoped lang="scss"></style>