Compare commits

..

2 Commits

Author SHA1 Message Date
mengfanliang 20b4ca00fb feat: code saved 2024-08-29 08:35:22 +08:00
mengfanliang db25047877 feat: 修改安全环保检查样式统一 2024-08-28 18:12:34 +08:00
9 changed files with 827 additions and 514 deletions

View File

@ -1,15 +1,9 @@
<template> <template>
<u-sticky bgColor="#ffffff"> <u-sticky bgColor="#ffffff">
<view class="card"> <view class="card top-flex-box">
<u-search <u--text v-if="isHasFilter" suffixIcon="arrow-down" text="筛选" @click="selfHandleShowPicker" style="flex: 0.2" />
v-model="localInputSearchValue" <u-search v-model="localInputSearchValue" :showAction="true" actionText="搜索" :animation="false"
:showAction="true" @search="selfHandlerSearch" @custom="selfHandlerSearch" @clear="selfHandlerClear" />
actionText="搜索"
:animation="false"
@search="selfHandlerSearch"
@custom="selfHandlerSearch"
@clear="selfHandlerClear"
/>
</view> </view>
<app-line /> <app-line />
</u-sticky> </u-sticky>
@ -22,6 +16,11 @@ export default {
type: String, type: String,
required: true, required: true,
}, },
/** 是否需要启用前置筛选能力 */
isHasFilter: {
type: Boolean,
required: false
}
}, },
data() { data() {
return { return {
@ -41,6 +40,14 @@ export default {
}, },
selfHandlerClear() { selfHandlerClear() {
this.localInputSearchValue = ""; this.localInputSearchValue = "";
},
/** 组件自身的筛选器处理事件 */
selfHandleShowPicker() {
if (!this.isHasFilter) {
console.log("%c%s", "background: orange; color: black", "请添加 is-has-filter 属性使其生效")
return;
}
this.$emit("showPicker");
} }
}, },
}; };
@ -50,4 +57,8 @@ export default {
.key-word-search-input-box { .key-word-search-input-box {
margin: 20rpx; margin: 20rpx;
} }
.top-flex-box {
display: flex;
}
</style> </style>

View File

@ -1,7 +1,7 @@
<template> <template>
<view v-if="list.length > 0"> <view v-if="list.length > 0">
<view class="list"> <view class="list">
<u-list @scrolltolower="selfScrollToLower"> <u-list @scrolltolower="selfScrollToLower" :height="height" style="box-sizing: border-box;">
<u-list-item v-for="(item, index) in list" :key="index" style="border-bottom: none; padding: 0rpx;"> <u-list-item v-for="(item, index) in list" :key="index" style="border-bottom: none; padding: 0rpx;">
<view class="item"> <view class="item">
<slot :item="item" :index="index" /> <slot :item="item" :index="index" />
@ -20,6 +20,11 @@ export default {
type: Array, type: Array,
required: true, required: true,
}, },
height: {
type: String,
requierd: false,
default: '100%'
}
}, },
data() { data() {

View File

@ -48,20 +48,18 @@
type="primary" type="primary"
size="mini" size="mini"
shape="circle" shape="circle"
text="确认"
@click="handleClickConfirm(item)" @click="handleClickConfirm(item)"
> />
确认
</u-button>
</view> </view>
<view class="ml-10"> <view class="ml-10">
<u-button <u-button
type="primary" type="primary"
size="mini" size="mini"
shape="circle" shape="circle"
text="查看"
@click="handleClickView(item)" @click="handleClickView(item)"
> />
查看
</u-button>
</view> </view>
</view> </view>
</view> </view>
@ -84,17 +82,25 @@ export default {
data() { data() {
return { return {
store: this.$store, // store /** 全局store */
store: this.$store,
searchForm: { searchForm: {
HIDDENDESCR: "", HIDDENDESCR: "",
}, },
isRequestEnd: false, // /** 请求是否已结束 */
isRequestEnd: false,
/** 分页配置 */
pagination: { pagination: {
/** 展示总数 */
showCount: 10, showCount: 10,
/** 当前页 */
currentPage: 1, currentPage: 1,
/** 状态确认 */
stateConfirm: "0", stateConfirm: "0",
/** 总页数 */
total: 0, total: 0,
}, },
/** 列表数据存储 */
list: [], list: [],
}; };
}, },
@ -118,6 +124,10 @@ export default {
userInfo() { userInfo() {
return this.$store.getters.getUserInfo; return this.$store.getters.getUserInfo;
}, },
/** 动态计算 list 列表的高度 */
calcListHeight() {
return this.totalHeight;
},
}, },
methods: { methods: {
@ -169,22 +179,16 @@ export default {
}, },
/** 处理点击确认按钮事件 */ /** 处理点击确认按钮事件 */
handleClickConfirm(ext) { handleClickConfirm(ext) {
uni.$u.route( uni.$u.route("/hiddenManageSubPackages/pages/hidden_confirm/confirm", {
"/hiddenManageSubPackages/pages/hidden_confirm/confirm",
{
HIDDEN_ID: ext.HIDDEN_ID, HIDDEN_ID: ext.HIDDEN_ID,
} });
);
}, },
/** 处理点击查看按钮事件 */ /** 处理点击查看按钮事件 */
handleClickView(ext) { handleClickView(ext) {
uni.$u.route( uni.$u.route("/hiddenManageSubPackages/pages/hidden_confirm/view", {
"/hiddenManageSubPackages/pages/hidden_confirm/view",
{
HIDDEN_ID: ext.HIDDEN_ID, HIDDEN_ID: ext.HIDDEN_ID,
} });
) },
}
}, },
}; };
</script> </script>

View File

@ -78,7 +78,6 @@ export default {
this.baseList[baseListKey].NUM = resData.repulseAndCheckCount.repulseAndCheckCount ? resData.repulseAndCheckCount.repulseAndCheckCount : 0 this.baseList[baseListKey].NUM = resData.repulseAndCheckCount.repulseAndCheckCount ? resData.repulseAndCheckCount.repulseAndCheckCount : 0
} }
} }
}, },
}, },
} }

View File

@ -1,13 +1,16 @@
<template> <template>
<view class="content">
<view class="search card">
<u--input class="ml-10" 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>
<!-- 吸顶搜索框 start -->
<key-word-search-input
:inputSearchValue="searchForm.HIDDENDESCR"
@search="resetList"
@showPicker="showPicker"
/>
<!-- 吸顶搜索框 end -->
<!-- 列表渲染 start -->
<list :list="list" @scroll-to-lower="scrollToLower">
<template #default="{ item }">
<view class="flex-between main-title"> <view class="flex-between main-title">
<text>被检查单位{{ item.INSPECTED_CORPINFO_ID_NAME }}</text> <text>被检查单位{{ item.INSPECTED_CORPINFO_ID_NAME }}</text>
</view> </view>
@ -16,57 +19,98 @@
<text>检查类型{{ item.INSPECTION_TYPE_NAME }}</text> <text>检查类型{{ item.INSPECTION_TYPE_NAME }}</text>
</view> </view>
<view class="flex-between mt-10 subtitle"> <view class="flex-between mt-10 subtitle">
<text>检查时间 {{ item.INSPECTION_TIME_START }} {{ item.INSPECTION_TIME_END }} </text> <text
>检查时间 {{ item.INSPECTION_TIME_START }}
{{ item.INSPECTION_TIME_END }} </text
>
</view> </view>
<view class="flex-between mt-10 subtitle"> <view class="flex-between mt-10 subtitle">
<text> <text>
状态 状态
<template v-if="item.INSPECTION_STATUS == '0'"></template> <template v-if="item.INSPECTION_STATUS == '0'"
<template v-else-if="item.INSPECTION_STATUS == '1'">检查人核实中</template> >待检查人核实</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 == '1'"
<template v-else-if="item.INSPECTION_STATUS == '4'">指派中</template> >检查人核实中</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 == '2'"
<template v-else-if="item.INSPECTION_STATUS == '7'">检查已验收</template> >待被检查人确认</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 == '3'"
<template v-else-if="item.INSPECTION_STATUS == '-2'">被检查人申辩</template> >待指派</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> </text>
<u-button type="primary" text="申辩记录" size="mini" class="bth-mini ml-10"
@click="fnNavigatorPlead(item.INSPECTION_ID)"></u-button>
</view> </view>
<view class="flex-end">
<u-button
type="primary"
text="申辩记录"
size="mini"
shape="circle"
@click="fnNavigatorPlead(item.INSPECTION_ID)"
/>
</view> </view>
</u-list-item> </template>
</u-list> </list>
<empty v-else></empty> <!-- 列表渲染 end -->
</view> </view>
</template> </template>
<script> <script>
import { getpleadList, getSafetyenvironmentalList } from "../../api"; import { getpleadList, getSafetyenvironmentalList } from "../../api";
import { initiateList } from '../../../Mock/safetyEnvirData'; import keyWordSearchInput from "@/components/keyWordSearchInput/index.vue";
import List from "@/components/list/list.vue";
import { initiateList } from "../../../Mock/safetyEnvirData";
export default { export default {
components: { keyWordSearchInput, List },
data() { data() {
return { return {
keyword: '', searchForm: {
HIDDENDESCR: "",
},
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
totalPage: 0, totalPage: 0,
list: [], list: [],
} };
}, },
computed: { computed: {
userInfo() { userInfo() {
return this.$store.getters.getUserInfo return this.$store.getters.getUserInfo;
} },
}, },
onShow() { onShow() {
this.resetList() this.resetList();
}, },
methods: { methods: {
async getData() { async getData() {
uni.showLoading({
title: "加载中",
});
// TODO: , // TODO: ,
// let resData = await getpleadList({ // let resData = await getpleadList({
// loginUserId: this.userInfo.USER_ID, // loginUserId: this.userInfo.USER_ID,
@ -80,29 +124,33 @@ export default {
// this.list = [...this.list, ...resData.varList]; // this.list = [...this.list, ...resData.varList];
// this.totalPage = resData.page.totalPage; // this.totalPage = resData.page.totalPage;
// mock
setTimeout(() => {
this.list = initiateList; this.list = initiateList;
this.totalPage = initiateList.length; this.totalPage = initiateList.length;
uni.hideLoading();
}, 400);
}, },
resetList() { resetList() {
this.pageSize = 10 this.pageSize = 10;
this.currentPage = 1 this.currentPage = 1;
this.list = [] this.list = [];
this.getData() this.getData();
}, },
fnNavigatorPlead(INSPECTION_ID) { fnNavigatorPlead(INSPECTION_ID) {
uni.$u.route({ uni.$u.route({
url: '/safetyEnvirSubPackages/pages/defense-record/plead-list', url: "/safetyEnvirSubPackages/pages/defense-record/plead-list",
params: { params: {
INSPECTION_ID, INSPECTION_ID,
} },
}) });
}, },
scrolltolower() { scrolltolower() {
this.currentPage++; this.currentPage++;
if (this.totalPage >= this.currentPage) this.getData(); if (this.totalPage >= this.currentPage) this.getData();
}, },
} },
} };
</script> </script>
<style scoped></style> <style scoped></style>

View File

@ -1,15 +1,27 @@
<template> <template>
<view class="content">
<view class="search card">
<u--text suffixIcon="arrow-down" text="筛选" @click="showPicker"></u--text>
<u--input class="ml-10" 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-picker :show="show" :columns="columns" keyName="name" @cancel="show = false" @confirm="confirmPicker"></u-picker>
<u-list @scrolltolower="scrolltolower" v-if="list.length > 0">
<u-list-item v-for="(item, index) in list" :key="index">
<view> <view>
<!-- 吸顶搜索框 start -->
<key-word-search-input
:inputSearchValue="searchForm.HIDDENDESCR"
@search="resetList"
is-has-filter
@showPicker="showPicker"
/>
<!-- 吸顶搜索框 end -->
<!-- 筛选器 start -->
<u-picker
:show="show"
:columns="columns"
keyName="name"
@cancel="show = false"
@confirm="confirmPicker"
/>
<!-- 筛选器 end -->
<!-- 列表渲染 start -->
<list :list="list" @scroll-to-lower="scrollToLower">
<template #default="{ item }">
<view class="flex-between main-title"> <view class="flex-between main-title">
<text>被检查单位{{ item.INSPECTED_CORPINFO_ID_NAME }}</text> <text>被检查单位{{ item.INSPECTED_CORPINFO_ID_NAME }}</text>
</view> </view>
@ -18,87 +30,148 @@
<text>检查类型{{ item.INSPECTION_TYPE_NAME }}</text> <text>检查类型{{ item.INSPECTION_TYPE_NAME }}</text>
</view> </view>
<view class="flex-between mt-10 subtitle"> <view class="flex-between mt-10 subtitle">
<text>检查时间 {{ item.INSPECTION_TIME_START }} {{ item.INSPECTION_TIME_END }} </text> <text
>检查时间 {{ item.INSPECTION_TIME_START }}
{{ item.INSPECTION_TIME_END }} </text
>
</view> </view>
<view class="flex-between mt-10 subtitle"> <view class="flex-between mt-10 subtitle">
<text> <text>
状态 状态
<template v-if="item.INSPECTION_STATUS == '0'"></template> <template v-if="item.INSPECTION_STATUS == '0'"
<template v-else-if="item.INSPECTION_STATUS == '1'">检查人核实中</template> >待检查人核实</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 == '1'"
<template v-else-if="item.INSPECTION_STATUS == '4'">指派中</template> >检查人核实中</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 == '2'"
<template v-else-if="item.INSPECTION_STATUS == '7'">检查已验收</template> >待被检查人确认</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 == '3'"
<template v-else-if="item.INSPECTION_STATUS == '-2'">被检查人申辩</template> >待指派</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> </text>
</view> </view>
<view class="flex-end mt-10"> <view class="flex-end">
<u-button type="primary" text="查看" size="mini" class="bth-mini" <view>
@click="fnNavigatorDetail(item.INSPECTION_ID, 'view')"></u-button> <u-button
<u-button type="primary" text="流程图" size="mini" class="bth-mini ml-10" type="primary"
@click="showFlowChart(item.INSPECTION_ID)"></u-button> text="查看"
<u-button type="primary" text="编辑" size="mini" class="bth-mini ml-10" size="mini"
v-show="item.INSPECTION_STATUS === '-1'" @click="fnNavigatorDetail(item.INSPECTION_ID, 'edit')"></u-button> shape="circle"
<u-button type="primary" text="申辩处理" size="mini" class="bth-mini ml-10" @click="fnNavigatorDetail(item.INSPECTION_ID, 'view')"
v-show="item.INSPECTION_STATUS === '-2'" @click="fnNavigatorPlead(item.INSPECTION_ID)"></u-button> />
</view>
<view class="ml-10">
<u-button
type="primary"
text="流程图"
size="mini"
shape="circle"
@click="showFlowChart(item.INSPECTION_ID)"
/>
</view>
<view class="ml-10" v-if="item.INSPECTION_STATUS === '-1'">
<u-button
type="primary"
text="编辑"
size="mini"
shape="circle"
@click="fnNavigatorDetail(item.INSPECTION_ID, 'edit')"
/>
</view>
<view class="ml-10" v-if="item.INSPECTION_STATUS === '-2'">
<u-button
type="primary"
text="申辩处理"
size="mini"
shape="circle"
@click="fnNavigatorPlead(item.INSPECTION_ID)"
/>
</view> </view>
</view> </view>
</u-list-item> </template>
</u-list> </list>
<empty v-else></empty> <!-- 列表渲染 end -->
</view> </view>
</template> </template>
<script> <script>
import { getSafetyenvironmentalList } from "../../api"; import { getSafetyenvironmentalList } from "../../api";
import { initiateList } from '../../../Mock/safetyEnvirData'; import keyWordSearchInput from "@/components/keyWordSearchInput/index.vue";
import List from "@/components/list/list.vue";
import { initiateList } from "../../../Mock/safetyEnvirData";
export default { export default {
components: { keyWordSearchInput, List },
data() { data() {
return { return {
show: false, show: false,
columns: [ columns: [
[ [
{ id: '', name: '请选择' }, { id: "", name: "请选择" },
{ id: '0', name: '待检查人核实' }, { id: "0", name: "待检查人核实" },
{ id: '1', name: '检查人核实中' }, { id: "1", name: "检查人核实中" },
{ id: '2', name: '待被检查人确认' }, { id: "2", name: "待被检查人确认" },
{ id: '3', name: '已归档' }, { id: "3", name: "已归档" },
{ id: '4', name: '指派中' }, { id: "4", name: "指派中" },
{ id: '5', name: '指派完成' }, { id: "5", name: "指派完成" },
{ id: '6', name: '待验收' }, { id: "6", name: "待验收" },
{ id: '7', name: '已验收' }, { id: "7", name: "已验收" },
{ id: '-1', name: '检查人核实打回' }, { id: "-1", name: "检查人核实打回" },
{ id: '-2', name: '被检查人申辩' } { id: "-2", name: "被检查人申辩" },
]
], ],
keyword: '', ],
INSPECTION_STATUS: '', searchForm: {
HIDDENDESCR: "",
},
INSPECTION_STATUS: "",
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
totalPage: 0, totalPage: 0,
list: [], list: [],
} };
}, },
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
if (e.index === 0) { if (e.index === 0) {
this.fnNavigatorDetail('', 'add'); this.fnNavigatorDetail("", "add");
} }
}, },
computed: { computed: {
userInfo() { userInfo() {
return this.$store.getters.getUserInfo return this.$store.getters.getUserInfo;
} },
}, },
onShow() { onShow() {
this.resetList() this.resetList();
}, },
methods: { methods: {
async getData() { async getData() {
uni.showLoading({
title: "加载中",
});
// TODO: , // TODO: ,
// let resData = await getSafetyenvironmentalList({ // let resData = await getSafetyenvironmentalList({
// loginUserId: this.userInfo.USER_ID, // loginUserId: this.userInfo.USER_ID,
@ -112,54 +185,68 @@ export default {
// this.list = [...this.list, ...resData.varList]; // this.list = [...this.list, ...resData.varList];
// this.totalPage = resData.page.totalPage; // this.totalPage = resData.page.totalPage;
// mock
setTimeout(() => {
this.list = initiateList; this.list = initiateList;
this.totalPage = initiateList.length; this.totalPage = initiateList.length;
uni.hideLoading();
}, 400);
}, },
resetList() { resetList() {
this.pageSize = 10 this.pageSize = 10;
this.currentPage = 1 this.currentPage = 1;
this.list = [] this.list = [];
this.getData() this.getData();
}, },
showPicker() { showPicker() {
this.show = true; this.show = true;
}, },
confirmPicker(e) { confirmPicker(e) {
this.INSPECTION_STATUS = e.value[0].id this.INSPECTION_STATUS = e.value[0].id;
this.show = false; this.show = false;
this.resetList() this.resetList();
}, },
fnNavigatorDetail(INSPECTION_ID, type) { fnNavigatorDetail(INSPECTION_ID, type) {
uni.$u.route({ uni.$u.route({
url: '/safetyEnvirSubPackages/pages/initiate/detail', url: "/safetyEnvirSubPackages/pages/initiate/detail",
params: { params: {
INSPECTION_ID, INSPECTION_ID,
type type,
}
})
}, },
// });
},
/**
* 申辩处理按钮事件
*/
fnNavigatorPlead(INSPECTION_ID) { fnNavigatorPlead(INSPECTION_ID) {
uni.$u.route({ uni.$u.route({
url: '/safetyEnvirSubPackages/pages/initiate/plead', url: "/safetyEnvirSubPackages/pages/initiate/plead",
params: { params: {
INSPECTION_ID, INSPECTION_ID,
}
})
}, },
// });
},
/**
* 滚动加载数据
*/
scrolltolower() { scrolltolower() {
this.currentPage++; this.currentPage++;
if (this.totalPage >= this.currentPage) this.getData(); if (this.totalPage >= this.currentPage) this.getData();
}, },
// /**
* 查看流程图
*/
showFlowChart(id) { showFlowChart(id) {
uni.navigateTo({ uni.navigateTo({
url: '/safetyEnvirSubPackages/pages/initiate/steps?ID=' + id url: "/safetyEnvirSubPackages/pages/initiate/steps?ID=" + id,
}); });
}, },
} },
} };
</script> </script>
<style scoped lang="scss"></style> <style scoped lang="scss">
.self-time {
font-size: 14px;
}
</style>

View File

@ -1,13 +1,16 @@
<template> <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>
<!-- 吸顶搜索框 start -->
<key-word-search-input
:inputSearchValue="searchForm.HIDDENDESCR"
@search="resetList"
@showPicker="showPicker"
/>
<!-- 吸顶搜索框 end -->
<!-- 列表渲染 start -->
<list :list="list" @scroll-to-lower="scrollToLower">
<template #default="{ item }">
<view class="flex-between main-title"> <view class="flex-between main-title">
<text>被检查单位{{ item.INSPECTED_CORPINFO_ID_NAME }}</text> <text>被检查单位{{ item.INSPECTED_CORPINFO_ID_NAME }}</text>
</view> </view>
@ -16,63 +19,119 @@
<text>检查类型{{ item.INSPECTION_TYPE_NAME }}</text> <text>检查类型{{ item.INSPECTION_TYPE_NAME }}</text>
</view> </view>
<view class="flex-between mt-10 subtitle"> <view class="flex-between mt-10 subtitle">
<text>检查时间 {{ item.INSPECTION_TIME_START }} {{ item.INSPECTION_TIME_END }} </text> <text
>检查时间 {{ item.INSPECTION_TIME_START }}
{{ item.INSPECTION_TIME_END }} </text
>
</view> </view>
<view class="flex-between mt-10 subtitle"> <view class="flex-between mt-10 subtitle">
<text> <text>
状态 状态
<template v-if="item.INSPECTION_STATUS == '0'"></template> <template v-if="item.INSPECTION_STATUS == '0'"
<template v-else-if="item.INSPECTION_STATUS == '1'">检查人核实中</template> >待检查人核实</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 == '1'"
<template v-else-if="item.INSPECTION_STATUS == '4'">指派中</template> >检查人核实中</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 == '2'"
<template v-else-if="item.INSPECTION_STATUS == '7'">检查已验收</template> >待被检查人确认</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 == '3'"
<template v-else-if="item.INSPECTION_STATUS == '-2'">被检查人申辩</template> >待指派</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> </text>
</view> </view>
<view class="flex-end mt-10">
<u-button type="primary" text="查看" size="mini" class="bth-mini" <view class="flex-end">
@click="fnNavigatorDetail(item.INSPECTION_ID)"></u-button> <view>
<u-button <u-button
v-show="(item.INSPECTION_STATUS === '6' || item.INSPECTION_STATUS === '5' || item.INSPECTION_STATUS === '7') && item.checkout === 1" type="primary"
type="primary" text="验收" size="mini" class="bth-mini ml-10" text="查看"
@click="fnNavigatorAcceptance(item.INSPECTION_ID)"></u-button> size="mini"
shape="circle"
@click="fnNavigatorDetail(item.INSPECTION_ID)"
/>
</view>
<view
class="ml-10"
v-if="
(item.INSPECTION_STATUS === '6' ||
item.INSPECTION_STATUS === '5' ||
item.INSPECTION_STATUS === '7') &&
item.checkout === 1
"
>
<u-button
type="primary"
text="验收"
size="mini"
shape="circle"
@click="fnNavigatorAcceptance(item.INSPECTION_ID)"
></u-button>
</view> </view>
</view> </view>
</u-list-item> </template>
</u-list> </list>
<empty v-else></empty>
</view> </view>
</template> </template>
<script> <script>
import { getSafetyenvironmentalCheckList, getSafetyenvironmentalList } from "../../api"; import {
import { initiateList } from '../../../Mock/safetyEnvirData'; getSafetyenvironmentalCheckList,
getSafetyenvironmentalList,
} from "../../api";
import keyWordSearchInput from "@/components/keyWordSearchInput/index.vue";
import List from "@/components/list/list.vue";
import { initiateList } from "../../../Mock/safetyEnvirData";
export default { export default {
components: { keyWordSearchInput, List },
data() { data() {
return { return {
keyword: '', searchForm: {
HIDDENDESCR: "",
},
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
totalPage: 0, totalPage: 0,
list: [], list: [],
} };
}, },
computed: { computed: {
userInfo() { userInfo() {
return this.$store.getters.getUserInfo return this.$store.getters.getUserInfo;
} },
}, },
onShow() { onShow() {
this.resetList() this.resetList();
}, },
methods: { methods: {
async getData() { async getData() {
uni.showLoading({
title: "加载中",
});
// TODO: , // TODO: ,
// let resData = await getSafetyenvironmentalCheckList({ // let resData = await getSafetyenvironmentalCheckList({
// INSPECTION_ORIGINATOR_ID: this.userInfo.USER_ID, // INSPECTION_ORIGINATOR_ID: this.userInfo.USER_ID,
@ -85,37 +144,41 @@ export default {
// this.list = [...this.list, ...resData.varList]; // this.list = [...this.list, ...resData.varList];
// this.totalPage = resData.page.totalPage; // this.totalPage = resData.page.totalPage;
// mock
setTimeout(() => {
this.list = initiateList; this.list = initiateList;
this.totalPage = initiateList.length; this.totalPage = initiateList.length;
uni.hideLoading();
}, 400);
}, },
resetList() { resetList() {
this.pageSize = 10 this.pageSize = 10;
this.currentPage = 1 this.currentPage = 1;
this.list = [] this.list = [];
this.getData() this.getData();
}, },
fnNavigatorDetail(INSPECTION_ID) { fnNavigatorDetail(INSPECTION_ID) {
uni.$u.route({ uni.$u.route({
url: '/safetyEnvirSubPackages/pages/inspector-archives/detail', url: "/safetyEnvirSubPackages/pages/inspector-archives/detail",
params: { params: {
INSPECTION_ID, INSPECTION_ID,
} },
}) });
}, },
fnNavigatorAcceptance(INSPECTION_ID) { fnNavigatorAcceptance(INSPECTION_ID) {
uni.$u.route({ uni.$u.route({
url: '/safetyEnvirSubPackages/pages/inspector-archives/acceptance-list', url: "/safetyEnvirSubPackages/pages/inspector-archives/acceptance-list",
params: { params: {
INSPECTION_ID, INSPECTION_ID,
} },
}) });
}, },
scrolltolower() { scrolltolower() {
this.currentPage++; this.currentPage++;
if (this.totalPage >= this.currentPage) this.getData(); if (this.totalPage >= this.currentPage) this.getData();
}, },
} },
} };
</script> </script>
<style scoped lang="scss"></style> <style scoped lang="scss"></style>

View File

@ -1,13 +1,16 @@
<template> <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>
<!-- 吸顶搜索框 start -->
<key-word-search-input
:inputSearchValue="searchForm.HIDDENDESCR"
@search="resetList"
@showPicker="showPicker"
/>
<!-- 吸顶搜索框 end -->
<!-- 列表渲染 start -->
<list :list="list" @scroll-to-lower="scrollToLower">
<template #default="{ item }">
<view class="flex-between main-title"> <view class="flex-between main-title">
<text>被检查单位{{ item.INSPECTED_CORPINFO_ID_NAME }}</text> <text>被检查单位{{ item.INSPECTED_CORPINFO_ID_NAME }}</text>
</view> </view>
@ -16,68 +19,149 @@
<text>检查类型{{ item.INSPECTION_TYPE_NAME }}</text> <text>检查类型{{ item.INSPECTION_TYPE_NAME }}</text>
</view> </view>
<view class="flex-between mt-10 subtitle"> <view class="flex-between mt-10 subtitle">
<text>检查时间 {{ item.INSPECTION_TIME_START }} {{ item.INSPECTION_TIME_END }} </text> <text
>检查时间 {{ item.INSPECTION_TIME_START }}
{{ item.INSPECTION_TIME_END }} </text
>
</view> </view>
<view class="flex-between mt-10 subtitle"> <view class="flex-between mt-10 subtitle">
<text> <text>
状态 状态
<template v-if="item.INSPECTION_STATUS == '0'"></template> <template v-if="item.INSPECTION_STATUS == '0'"
<template v-else-if="item.INSPECTION_STATUS == '1'">检查人核实中</template> >待检查人核实</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 == '1'"
<template v-else-if="item.INSPECTION_STATUS == '4'">指派中</template> >检查人核实中</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 == '2'"
<template v-else-if="item.INSPECTION_STATUS == '7'">检查已验收</template> >待被检查人确认</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 == '3'"
<template v-else-if="item.INSPECTION_STATUS == '-2'">被检查人申辩</template> >待指派</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> </text>
</view> </view>
<view class="flex-end mt-10">
<u-button type="primary" text="查看" size="mini" class="bth-mini" <view class="flex-end">
@click="fnNavigatorDetail(item.INSPECTION_ID, item.INSPECTION_USER_ID, item.INSPECTION_INSPECTOR_ID, 'view')"></u-button>
<u-button <u-button
v-if="!validStr(item.INSPECTION_USER_SIGN_TIME) && (item.INSPECTION_STATUS == '0' || item.INSPECTION_STATUS == '1')" type="primary"
type="primary" text="核实" size="mini" class="bth-mini ml-10" text="查看"
@click="fnNavigatorDetail(item.INSPECTION_ID, item.INSPECTION_USER_ID, item.INSPECTION_INSPECTOR_ID, 'verify')"></u-button> size="mini"
shape="circle"
@click="
fnNavigatorDetail(
item.INSPECTION_ID,
item.INSPECTION_USER_ID,
item.INSPECTION_INSPECTOR_ID,
'view'
)
"
/>
<view class="ml-10">
<u-button
type="primary"
text="流程图"
size="mini"
shape="circle"
@click="showFlowChart(item.INSPECTION_ID)"
/>
</view>
<view
class="ml-10"
v-if="
!validStr(item.INSPECTION_USER_SIGN_TIME) &&
(item.INSPECTION_STATUS == '0' || item.INSPECTION_STATUS == '1')
"
>
<u-button
type="primary"
text="核实"
size="mini"
shape="circle"
@click="
fnNavigatorDetail(
item.INSPECTION_ID,
item.INSPECTION_USER_ID,
item.INSPECTION_INSPECTOR_ID,
'verify'
)
"
/>
</view> </view>
</view> </view>
</u-list-item> </template>
</u-list> </list>
<empty v-else></empty>
</view> </view>
</template> </template>
<script> <script>
import { getSafetyenvironmentalinspectorList } from "../../api"; import { getSafetyenvironmentalinspectorList } from "../../api";
import { initiateList } from '../../../Mock/safetyEnvirData'; import keyWordSearchInput from "@/components/keyWordSearchInput/index.vue";
import List from "@/components/list/list.vue";
import { initiateList } from "../../../Mock/safetyEnvirData";
export default { export default {
components: { keyWordSearchInput, List },
data() { data() {
return { return {
keyword: '', searchForm: {
INSPECTION_STATUS: '', HIDDENDESCR: "",
},
INSPECTION_STATUS: "",
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
totalPage: 0, totalPage: 0,
list: [], list: [],
} };
}, },
computed: { computed: {
userInfo() { userInfo() {
return this.$store.getters.getUserInfo return this.$store.getters.getUserInfo;
} },
}, },
onShow() { onShow() {
this.resetList() this.resetList();
}, },
methods: { methods: {
validStr(str) { validStr(str) {
if (str != null && str != '' && typeof (str) != 'undefined' && str != 'undefined' && str != 0 && str != 'null') { return true } if (
return false str != null &&
str != "" &&
typeof str != "undefined" &&
str != "undefined" &&
str != 0 &&
str != "null"
) {
return true;
}
return false;
}, },
async getData() { async getData() {
uni.showLoading({
title: "加载中",
});
// TODO: , // TODO: ,
// let resData = await getSafetyenvironmentalinspectorList({ // let resData = await getSafetyenvironmentalinspectorList({
// INSPECTION_USER_ID: this.userInfo.USER_ID, // INSPECTION_USER_ID: this.userInfo.USER_ID,
@ -88,32 +172,44 @@ export default {
// this.list = [...this.list,...resData.varList]; // this.list = [...this.list,...resData.varList];
// this.totalPage = resData.page.totalPage; // this.totalPage = resData.page.totalPage;
// mock
setTimeout(() => {
this.list = initiateList; this.list = initiateList;
this.totalPage = initiateList.length; this.totalPage = initiateList.length;
uni.hideLoading();
}, 400);
}, },
resetList() { resetList() {
this.pageSize = 10 this.pageSize = 10;
this.currentPage = 1 this.currentPage = 1;
this.list = [] this.list = [];
this.getData() this.getData();
}, },
fnNavigatorDetail(INSPECTION_ID, INSPECTION_USER_ID, INSPECTION_INSPECTOR_ID, type) { fnNavigatorDetail(
uni.$u.route({
url: '/safetyEnvirSubPackages/pages/inspector-confirms/detail',
params: {
INSPECTION_ID, INSPECTION_ID,
INSPECTION_USER_ID, INSPECTION_USER_ID,
INSPECTION_INSPECTOR_ID, INSPECTION_INSPECTOR_ID,
type type
} ) {
}) uni.$u.route({
url: "/safetyEnvirSubPackages/pages/inspector-confirms/detail",
params: {
INSPECTION_ID,
INSPECTION_USER_ID,
INSPECTION_INSPECTOR_ID,
type,
}, },
});
},
/**
* 滚动加载数据
*/
scrolltolower() { scrolltolower() {
this.currentPage++; this.currentPage++;
if (this.totalPage >= this.currentPage) this.getData(); if (this.totalPage >= this.currentPage) this.getData();
}, },
} },
} };
</script> </script>
<style scoped lang="scss"></style> <style scoped lang="scss"></style>

View File

@ -1,4 +1,4 @@
let requestPath = "http://192.168.0.115:8088"; let requestPath = "http://192.168.0.112:8088";
// let requestPath = 'http://192.168.0.31:8992/qa-prevention-xgf/'; // 后台请求地址 // let requestPath = 'http://192.168.0.31:8992/qa-prevention-xgf/'; // 后台请求地址
// let requestPath = 'https://skqhdg.porthebei.com:9006/qa-prevention-xgf/'; // 后台请求地址 // let requestPath = 'https://skqhdg.porthebei.com:9006/qa-prevention-xgf/'; // 后台请求地址
// let requestPath = 'https://qgxgf.qhdsafety.com/qa-prevention-xgf/'; // 外网地址 // let requestPath = 'https://qgxgf.qhdsafety.com/qa-prevention-xgf/'; // 外网地址