You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

488 lines
14 KiB

<template>
<div v-if="visible" class="van-overlay"></div>
<div v-if="visible" class="popup">
<div class="popup-title">投诉事项</div>
<!-- 关闭按钮 -->
<label class="close-button" @click="closePopup"></label>
<!-- 弹窗的内容 -->
<div class="popup-content">
<div class="subtitle">时间筛选</div>
<div class="count-inspect">
<van-field v-model="searchParam.beginTime" placeholder="开始日期"
@click="showStartTime"
readonly
/>
<span style="padding: 10px">至</span>
<van-field v-model="searchParam.endTime" placeholder="结束日期"
@click="showEndTime"
readonly
/>
<van-popup v-model:show="this.startPicker" position="bottom">
<van-date-picker
title="选择时间"
v-model="this.currentStart"
:min-date="this.minDate"
:max-date="this.maxDate"
:columns-type="this.columnsType"
@confirm="startConfirm"
@cancel="cancelSelectDate"
/>
</van-popup>
<van-popup v-model:show="this.endPicker" position="bottom">
<van-date-picker
title="选择时间"
v-model="this.currentEnd"
:min-date="this.minDate"
:max-date="this.maxDate"
:columns-type="this.columnsType"
@confirm="endConfirm"
@cancel="cancelSelectDate"
/>
</van-popup>
</div>
<van-search
v-model="searchParam.searchValue"
show-action
placeholder="请输入关键字查询"
clearable="true"
clear-icon="clear"
clear-trigger="always"
@clear="clearSearch"
@search="onSearch">
<template #action>
<div @click="onClickButton">搜索</div>
</template>
</van-search>
<div class="search-result">
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
<div class="goods_box" v-for="(item, index) in dataList" :key="index">
<van-swipe-cell class="swipe_cell">
<div class="card_box">
<div class="card_box_span" >
<p v-if="item.dataType==0">执法时间{{item.enforcementTime}}</p>
<p v-if="item.dataType==1">入企时间{{item.enforcementTime}}</p>
</div>
<div @click="clickItem(item)">
<div class="van-hairline--bottom"></div>
<div class="card_box_span card-title">
<p>{{ item.title }}</p>
</div>
<div class="card_box_span">
<p v-if="item.dataType==0"><label class="card_box_label">执法单位</label> <span>{{ item.bureauDeptName }}</span></p>
<p v-if="item.dataType==1"><label class="card_box_label">入企单位</label> <span>{{ item.bureauDeptName }}</span></p>
</div>
<div class="card_box_span">
<p><label class="card_box_label" v-if="item.dataType==0">执法人员</label>
<label class="card_box_label" v-if="item.dataType==1">入企人员</label>
<span class="asblock">
<span>{{ item.lawEnforcer }}</span>
<span>{{ item.lawEnforcerOther}}</span>
</span></p>
</div>
<div class="card_box_span">
<p v-if="item.dataType==0"><label class="card_box_label" >执法类别</label> <span>{{ item.lawEnforcementType }}</span></p>
<p v-if="item.dataType==1"><label class="card_box_label" >入企事由</label> <span>{{ item.lawEnforcementType }}</span></p>
</div>
</div>
</div>
</van-swipe-cell>
</div>
</van-list>
</van-pull-refresh>
</div>
</div>
</div>
</template>
<script>
import {ref} from 'vue'
import {getAllCheckList} from '@/api/enterprise'
import {formattedTimeYYYYmmdd} from "@/util/util";
const {useCommon} = $globalStore
const router = useRouter();
export default {
props: {
visible: {
type: Boolean,
default: false
},
content: {
type: String,
default: ''
},
itemCode: {
type: String
},
},
watch: {
visible(newVal, oldVal) {
if (newVal) {
// 在这里执行你的逻辑
this.curPage = 1;
this.dataList = [];
this.onRefresh();
}
}
},
setup() {
const loading = ref(false)
const finished = ref(false)
const refreshing = ref(false)
const dataList = ref([])
const curPage = ref(1)
const searchParam = ref({
pageNum: 1,
pageSize: 6,
})
const queryList = () => {
}
},
data() {
return {
searchParam: {
enterpriseNumber:ref(useCommon.enterpriseNumber),
pageNum: 1,
pageSize: 6,
beginTime:"",
endTime:""
},
startPicker:ref(false),
endPicker:ref(false),
searchKey: "",
dataList: [],
curPage: 1,
loading: false,
finished: false,
refreshing: false,
currentStart: ref(['2025', '01','01']),
currentEnd: ref(['2025', '01','01']),
minDate: new Date(2020, 0, 1),
maxDate: new Date(2125, 5, 1),
columnsType: ['year', 'month','day'],
}
},
methods: {
onSearch() {
this.curPage = 1;
this.onRefresh();
},
onClickButton () {
this.curPage = 1;
this.dataList = [];
this.onRefresh();
},
showStartTime(){
this.startPicker=true;
},
showEndTime(){
this.endPicker=true;
},
getList(){
let params = {
pageNum: (this.curPage-1)*this.searchParam.pageSize,
pageSize: this.searchParam.pageSize
}
this.searchParam.params = params;
this.searchParam.complaintItemCodes=this.itemCode
getAllCheckList(this.searchParam,success=> {
this.curPage++;
this.loading = false; // 查出结果停止加载
if (success.total <= this.dataList.length) {
this.finished = true;
return;
}
this.dataList.push(...success.rows);
});
},
closePopup() {
this.$emit('close');
},
cancel() {
this.searchParam.complaintItemName = '';
this.search();
},
//下拉刷新
onRefresh() {
this.dataList = [];
this.finished = false;
// 重新加载数据
// 将 loading 设置为 true,表示处于加载状态
this.loading = true;
this.onLoad();
},
// 触底加载
onLoad() {
let that = this;
setTimeout(() => {
if (that.refreshing) {
that.refreshing = false;
}
that.getList();
}, 1000);
},
// 点击事件
clickItem(item){
this.$emit("reciveData", item);
this.$emit('close');
},
startConfirm(value) {
this.currentStart=ref(value.selectedValues);
this.startPicker = false;
this.searchParam.beginTime = value.selectedValues[0] + "-" + value.selectedValues[1]+ "-" + value.selectedValues[2]
},
endConfirm(value) {
this.currentEnd=ref(value.selectedValues);
this.endPicker = false;
this.searchParam.endTime = value.selectedValues[0] + "-" + value.selectedValues[1]+ "-" + value.selectedValues[2]
},
// 日期框取消
cancelSelectDate(){
if(this.startPicker===true){
this.startPicker=false
}
if(this.endPicker===true){
this.endPicker=false;
}
}
},
}
</script>
<style scoped lang="less">
.goods_box {
display: flex;
background-color: #fff;
margin: 0.27rem;
border-radius: 0.27rem;
box-shadow: 0 0 0.15rem #ececec;
.swipe_cell {
width: 100%;
}
.card_box {
display: flex;
width: 100%;
padding: 0.1rem 0 0.2rem;
flex-direction: column;
.card_body {
background-color: #fff;
border-radius: 0.27rem;
flex: 1;
}
.card_box_span {
position: relative;
display: flex;
align-items: center;
margin: 2% 0;
padding: 0 3%;
color: #666;
font-size: 0.35rem;
line-height: 1.5;
p {
display: flex;
margin: 0;
}
}
.card-title p {
display: block !important;
color: #000;
font-size: 0.4rem;
font-weight: bold;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
.card_box_label {
color: #323233;
white-space: nowrap;
}
.card_box_span:first-child p {
color: #c1bfbf !important;
}
.asblock, .asblock > span {
display: block;
}
.popup {
position: fixed;
z-index: 999;
top: 3rem;
left: 0;
width: 100%;
height: calc(100% - 3rem);
background: #fff;
overflow: hidden;
}
.popup-title {
margin: 0.3rem 0 0;
width: 100%;
height: 1rem;
border-bottom: 1px solid #f3f4f5;
text-align: center;
font-size: 0.42rem;
font-weight: 600;
}
.btn-goback {
position: absolute;
top: 0.267rem;
left: 0.3rem;
width: 0.8rem;
height: 0.8rem;
font-size: 0.5rem;
font-weight: bold;
color: #333;
line-height: 1.5;
}
.close-button {
position: absolute;
top: 0.15rem;
right: 0.1rem;
width: 0.8rem;
height: 0.8rem;
background-color: rgba(255, 255, 255, .5);
border: 0.05rem solid rgba(255, 255, 255, .7);
border-radius: 50%;
transform: rotate(45deg);
}
.close-button:before,
.close-button:after {
content: '';
position: absolute;
top: 50%;
left: 50%;
background: #333;
border-radius: 50%;
transform: translate(-50%, -50%);
height: 0.4rem;
width: 0.02rem;
}
.close-button:after {
height: 0.02rem;
width: 0.4rem;
}
.popup-content {
margin: 0.25rem 0 0;
padding-bottom: 3rem;
width: 100%;
height: calc(100% - 1.6rem);
font-size: 0.37rem;
}
.van-search__action {
margin: 0 3% 0 0;
width: 10%;
height: 0.9rem;
background: #1367fe;
border: 0.02667rem solid #1367fe;
border-radius: 0 0.15rem 0.15rem 0;
color: #fff;
text-align: center;
line-height: 0.9rem;
}
.search-result {
width: 100%;
height: calc(100% - 3rem);
padding-bottom: 1rem;
overflow-y: auto;
}
.search-result .van-cell-group {
margin: 0;
}
.case-item {
margin: 3% 2%;
padding: 2% 0;
width: 96%;
font-size: 0.35rem;
border-bottom: 1px solid #f4f4f4;
color: #999;
line-height: 2;
}
.case-title {
margin: 2% 0;
font-size: 0.42rem;
color: #333;
line-height: 1.25;
}
.subtitle {
margin: 2% 0 2% 3%;
font-size: 0.38rem;
font-weight: 600;
}
.count-inspect {
display: flex;
align-items: center;
justify-content: flex-start;
margin: 1% 3% 2%;
width: 80%;
color: #666;
font-size: 0.35rem;
white-space: nowrap;
}
/deep/ .count-inspect .van-cell {
padding: 0;
}
/deep/ .count-inspect input.van-field__control {
padding: 0 0.2rem;
height: 0.8rem;
background: #fff;
border: 0.02667rem solid #ddd;
border-radius: 0.1rem;
}
/deep/ .count-inspect .van-cell:after {
border: 0;
}
/deep/ .van-search__content {
height: 0.9rem;
border: 1px solid #ececec;
border-radius: 0.15rem 0 0 0.15rem;
}
/deep/ .van-search__action {
margin: 0 3% 0 0;
width: 10%;
height: 0.9rem;
background: #1367fe;
border: 1px solid #1367fe;
border-radius: 0 0.15rem 0.15rem 0;
color: #fff;
text-align: center;
line-height: 0.9rem;
}
</style>