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.
670 lines
15 KiB
670 lines
15 KiB
|
|
<template>
|
|
|
|
<div class="search-button-list">
|
|
<van-button plain hairline :class="0==data.checkNum?'search-button active':'search-button'" @click="searchWarnType(1)" round type="primary" size="mini">
|
|
全市
|
|
</van-button>
|
|
<van-button plain hairline :class="1==data.checkNum?'search-button active':'search-button'" @click="searchWarnType(0)" round type="primary"
|
|
size="mini">本单位
|
|
</van-button>
|
|
</div>
|
|
<!-- <div class="warning-rule">-->
|
|
<!-- <span><van-icon name="warning-o" /></span><span>当月累计接受行政执法三至四次为黄色提示,五至六次为橙色提示,七次及以上为红色提示。</span>-->
|
|
<!-- </div>-->
|
|
<!-- 中间 -->
|
|
<div class="shop-center">
|
|
<lodding-card :isLodding="isLodding">
|
|
<refresh-list v-model:freshMap="freshMap" :classMap="classMap" @refresh="onRefresh" @onLoad="onLoad"
|
|
:resetScroll="resetScroll" class="refresh_box">
|
|
<div class="refresh_content" v-if="1 ==1 ">
|
|
<div class="goods_box" v-for="(item, index) in data.dataList" :key="index">
|
|
<van-swipe-cell class="swipe_cell">
|
|
<div class="card_box">
|
|
|
|
<div class="card_box_span">
|
|
<p class="warn-time">{{ item.createTime }}
|
|
</p>
|
|
</div>
|
|
<div class="card_box_span card-title">
|
|
<p :style="{marginLeft: '25px' }" class="warn-name">{{item.enterpriseName }}</p>
|
|
</div>
|
|
<div class="card_box_span">
|
|
<p class="warn-cont"><span class="card_box_label">被执法次数:</span> {{ item.num }}次</p>
|
|
</div>
|
|
<div :class="item.show? 'new_detail' : 'work_detail'">
|
|
<div class="timbox">
|
|
<div :class="'progress-box level-0'" v-for="(t,index) in warnListInfoList" :key="index" >
|
|
<!-- <div class="timtit">{{ t.lawEnforcementItemText }}</div> -->
|
|
<div class="timtit">{{ t.createTime }}</div>
|
|
<!-- <div class="prolist"><label>执法时间:</label><span>{{ t.createTime }}</span></div> -->
|
|
<div class="prolist"><label>执法单位:</label><span>{{ t.bureauDeptName }}</span></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="look_all" @click="selectByEnterpriseNumber(item.enterpriseNumber,item.id,item.show)" :class="{ new_up: !item.show }">
|
|
<van-icon v-if="!item.show" name="arrow-down" />
|
|
<van-icon v-else name="arrow-up" />
|
|
</div>
|
|
</div>
|
|
</van-swipe-cell>
|
|
</div>
|
|
</div>
|
|
<van-empty v-if="data.dataList.length===0" description="暂无数据" />
|
|
</refresh-list>
|
|
</lodding-card>
|
|
</div>
|
|
<!-- </div>-->
|
|
</template>
|
|
|
|
<script setup name="registrationList">
|
|
import { showToast } from "vant";
|
|
import {queryRegistrationListNew, queryRegistrationByEpId} from '@/api/enforce';
|
|
import { setGoodsNum ,formattedTimeYYYYmmdd } from "@/util/util";
|
|
const { useCommon, useShopCard } = $globalStore;
|
|
|
|
const router = useRouter();
|
|
//路由参数
|
|
const route = useRoute();
|
|
let allchecked = ref(false); // 是否全选
|
|
let refreshLoad = ref(false); // 是否加载中
|
|
let value = ref('')
|
|
let totalPrice = ref(0); // 总钱数
|
|
|
|
let searchParam = reactive({
|
|
//执法事件
|
|
// lawEnforcementIncident:"",
|
|
//执法单位
|
|
lawEnforcement:"",
|
|
//搜索框
|
|
searchValue: ref(''),
|
|
//时间类型
|
|
dateType: 4,
|
|
//是否投诉
|
|
isComplaint: null,
|
|
//企业统一信用码
|
|
enterpriseNumber: ref(useCommon.enterpriseNumber),
|
|
//搜索时间
|
|
searchDate: ref(),
|
|
beginTime: null,
|
|
endTime: null,
|
|
warnType: 1,
|
|
//用户ID
|
|
userId: useCommon.userId,
|
|
});
|
|
|
|
const data = reactive({
|
|
cartList: [],
|
|
dataList: [],
|
|
dateSearch: ref(),
|
|
showDatePicker:false,
|
|
currentDate:ref(['2024', '01']),
|
|
minDate: new Date(2020, 0, 1),
|
|
maxDate: new Date(2125, 5, 1),
|
|
columnsType :['year', 'month'],
|
|
checkNum: 0,
|
|
});
|
|
|
|
const props = defineProps({
|
|
enterpriseNumber: {
|
|
type: String,
|
|
default: "",
|
|
},
|
|
});
|
|
const warnListInfoList = ref([])
|
|
|
|
// 设置初始值为当前时间
|
|
onMounted(() => {
|
|
console.log(data.dataList.length)
|
|
// getCard();
|
|
// searchParam.enterpriseNumber = useCommon.enterpriseNumber;
|
|
searchParam.enterpriseNumber = props.enterpriseNumber;
|
|
queryList();
|
|
data.dateSearch = nowDate(new Date());
|
|
});
|
|
const queryList = () =>{
|
|
//默认展示前30个自然日
|
|
const formatDate = (date) =>
|
|
`${date.getFullYear()}-${date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1)
|
|
: date.getMonth()+1}-${date.getDate() < 10 ? '0'+date.getDate() : date.getDate()}`;
|
|
searchParam.beginTime = formatDate(new Date(new Date().setDate(new Date().getDate() - 30)));
|
|
searchParam.endTime = formatDate(new Date());
|
|
queryRegistrationListNew(searchParam,success =>{
|
|
data.dataList = success.rows;
|
|
},error =>{
|
|
|
|
})
|
|
}
|
|
|
|
const onSearch = (val) => {
|
|
queryRegistrationListNew(
|
|
{
|
|
"searchValue": searchParam.searchValue
|
|
}
|
|
,success =>{
|
|
data.dataList = success.data;
|
|
},error =>{
|
|
|
|
})
|
|
};
|
|
const onClickButton = () =>{
|
|
queryList();
|
|
}
|
|
|
|
const toComplaintView = (id,name) =>{
|
|
router.push(
|
|
{
|
|
path: "/enterprise/complaint",
|
|
query: {
|
|
id: id,
|
|
lawEnforcementIncident: name
|
|
}
|
|
});
|
|
}
|
|
onActivated(() => {
|
|
});
|
|
|
|
onDeactivated(() => {
|
|
|
|
});
|
|
|
|
// 返回
|
|
const goBack = () => {
|
|
router.push({
|
|
path:"/enforceHome"
|
|
});
|
|
};
|
|
|
|
let resetScroll = ref(0); // 滚动记录
|
|
let isLodding = ref(true); // 是否加载中
|
|
let freshMap = reactive({
|
|
refreshLoad: false, // 是否刷新
|
|
listLoading: false, // 是否加载中
|
|
listFinished: false, // 是否加载完成标识
|
|
});
|
|
|
|
|
|
//下拉刷新
|
|
const onRefresh = () => {
|
|
freshMap.listFinished = false;
|
|
freshMap.listLoading = true;
|
|
getGoodslist();
|
|
};
|
|
|
|
// 触底加载
|
|
const onLoad = () => {
|
|
freshMap.listFinished = true;
|
|
getGoodslist(true);
|
|
};
|
|
|
|
|
|
|
|
//获取分类下的商品列表
|
|
const getGoodslist = async (onLoad) => {
|
|
// const res = await useClassify.classifyGoods();
|
|
// if (res?.code === 20000) {
|
|
// goodsList = onLoad ? goodsList.concat(res?.data) : res?.data;
|
|
// freshMap.refreshLoad = false;
|
|
// freshMap.listLoading = false;
|
|
// freshMap.listFinished = res?.listFinished;
|
|
// if (goodsList.length > 50) {
|
|
// freshMap.listFinished = true;
|
|
// }
|
|
// }
|
|
freshMap.refreshLoad = false;
|
|
freshMap.listLoading = false;
|
|
freshMap.listFinished = true;
|
|
isLodding.value = false;
|
|
};
|
|
|
|
onMounted(async () => {
|
|
queryList();
|
|
isLodding.value = false;
|
|
});
|
|
|
|
const selectDate = () =>{
|
|
data.showDatePicker = true;
|
|
console.log(data.showDatePicker)
|
|
}
|
|
|
|
const onDateConfirm = (value)=> {
|
|
console.log(value);
|
|
value.selectedValues.forEach((item,index) => {
|
|
console.log(item);
|
|
});
|
|
data.dateSearch = value.selectedValues[0] + "/" + value.selectedValues[1]
|
|
data.showDatePicker = false;
|
|
searchParam.searchDate = value.selectedValues[0] + "-" + value.selectedValues[1]
|
|
queryList();
|
|
}
|
|
const nowDate = (time) => {
|
|
var year = time.getFullYear(); // 年
|
|
var month = (time.getMonth() + 1).toString().padStart(2, '0'); // 月
|
|
var date = time.getDate().toString().padStart(2, '0'); // 日
|
|
var hour = time.getHours().toString().padStart(2, '0'); // 时
|
|
var minute = time.getMinutes().toString().padStart(2, '0'); // 分
|
|
var second = time.getSeconds().toString().padStart(2, '0'); // 秒
|
|
return (
|
|
year + "/" + month
|
|
)
|
|
}
|
|
|
|
|
|
const searchWarnType = (val) =>{
|
|
// searchParam.dateType = 4;
|
|
searchParam.dateType = val;
|
|
searchParam.isComplaint = null;
|
|
searchParam.warnType = val;
|
|
queryList();
|
|
if(val == 0){
|
|
data.checkNum = 1;
|
|
}else{
|
|
data.checkNum = 0;
|
|
}
|
|
}
|
|
const searchComplaint = (val) =>{
|
|
searchParam.isComplaint = val;
|
|
searchParam.dateType = 4;
|
|
queryList();
|
|
}
|
|
const selectByEnterpriseNumber = (val,id,show) =>{
|
|
searchParam.enterpriseNumber = val;
|
|
// todo 需要添加判断
|
|
// if(show){return}
|
|
queryRegistrationByEpId(searchParam,success =>{
|
|
console.log(success.data)
|
|
warnListInfoList.value = success.data;
|
|
for (let index = 0; index < data.dataList.length; index++) {
|
|
const element = data.dataList[index];
|
|
if(element.id == id){
|
|
// if(element.show){
|
|
// element.show = false;
|
|
// }else{
|
|
// element.show = true;
|
|
// }
|
|
element.show = !element.show;
|
|
}else{
|
|
element.show = false;
|
|
}
|
|
}
|
|
},error =>{
|
|
|
|
})
|
|
}
|
|
</script>
|
|
<script>
|
|
export default {
|
|
data()
|
|
{
|
|
return {
|
|
is_show: false
|
|
}
|
|
},
|
|
computed: {
|
|
words()
|
|
{
|
|
if (this.is_show === false)
|
|
return '展开'
|
|
else if (this.is_show === true)
|
|
return '收起'
|
|
else if (this.is_show === '')
|
|
return null
|
|
else
|
|
return null
|
|
}
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
.card_box_label {
|
|
color: #323233;
|
|
white-space: nowrap;
|
|
}
|
|
.shop {
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
background-color: #ebf3fb;
|
|
|
|
.header_body {
|
|
height: 1.33rem;
|
|
}
|
|
|
|
.shop-center {
|
|
flex: 1;
|
|
overflow-y: scroll;
|
|
position: relative;
|
|
|
|
.goods_box {
|
|
display: flex;
|
|
background-color: #fff;
|
|
margin: 0.27rem;
|
|
border-radius: 0.27rem;
|
|
|
|
.swipe_cell {
|
|
width: 100%;
|
|
}
|
|
|
|
.card_box {
|
|
display: flex;
|
|
width: 100%;
|
|
padding: 0.27rem 0;
|
|
flex-direction: column;
|
|
.card_body {
|
|
background-color: #fff;
|
|
border-radius: 0.27rem;
|
|
flex: 1;
|
|
}
|
|
.card_box_span {
|
|
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_box_action{
|
|
position: absolute;
|
|
right: 4%;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.shop_footer_body {
|
|
//height: 2.67rem;
|
|
position: relative;
|
|
.footer-one-btn {
|
|
height: 1.33rem;
|
|
bottom: 1.34rem;
|
|
}
|
|
}
|
|
}
|
|
|
|
.search-button-list {
|
|
display: flex;
|
|
align-items: end;
|
|
justify-content: space-between;
|
|
flex-direction: row;
|
|
padding: 0 0.27rem;
|
|
margin: 0.35rem 0;
|
|
height: 0.85rem;
|
|
|
|
.search-button {
|
|
width: 50%;
|
|
height: 90%;
|
|
background: #fff;
|
|
border-color: #fff;
|
|
color: #4c4c4c;
|
|
font-size: 0.35rem;
|
|
line-height: 1.5;
|
|
}
|
|
.search-button.active {
|
|
position: relative;
|
|
background-color: #fff;
|
|
border-color: #fff;
|
|
color: #1367fe;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.search-button.active::after {
|
|
display: block;
|
|
content: "";
|
|
position: absolute;
|
|
z-index: 10;
|
|
left: 48%;
|
|
top: 0.9rem;
|
|
transform: translate(-50%, -50%);
|
|
width: 90%;
|
|
height: 0.08rem;
|
|
background-color: #1367fe;
|
|
}
|
|
|
|
}
|
|
.search-button-date {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: end;
|
|
position: relative;
|
|
|
|
.date-select {
|
|
margin: 3% 0 0 4%;
|
|
color: #c1bfbf;
|
|
font-size: 0.52rem;
|
|
i {
|
|
transform: rotate(90deg);
|
|
font-size: 0.4rem;
|
|
}
|
|
}
|
|
.search-button{
|
|
width: 15%;
|
|
height: 80%;
|
|
position: absolute;
|
|
top: 1%;
|
|
right: 1%;
|
|
}
|
|
}
|
|
|
|
|
|
/deep/ .card_box {
|
|
margin: 3% 3%;
|
|
}
|
|
|
|
/deep/ .card_box_span {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
/deep/ .card_box_span p.warn-time {
|
|
margin: 0;
|
|
padding-left: 2%;
|
|
color: #c1bfbf;
|
|
font-size: 0.35rem;
|
|
height: 0.75rem;
|
|
line-height: 0.5rem;
|
|
}
|
|
|
|
/deep/ .card_box_span p.warn-name {
|
|
margin: 0 0 2% 0;
|
|
width: calc(100% - 1rem);
|
|
font-size: 0.40rem;
|
|
font-weight: bold;
|
|
}
|
|
|
|
/deep/ .card_box_span .van-icon {
|
|
font-size: 0.75rem;
|
|
width: 0.9rem;
|
|
}
|
|
|
|
/deep/ .card_box_span p.warn-cont {
|
|
margin: 1.5% 0;
|
|
padding-left: 0.65rem;
|
|
color: #666;
|
|
font-size: 0.35rem;
|
|
}
|
|
|
|
.goods_box {
|
|
margin: 3%;
|
|
width: 94%;
|
|
border-radius: 0.27rem;
|
|
box-shadow: 0 0 0.15rem #ececec;
|
|
}
|
|
|
|
/deep/ .van-hairline--bottom {
|
|
margin: -1% 0 3% 0;
|
|
height: 0;
|
|
background-color: transparent;
|
|
border: 1px;
|
|
}
|
|
|
|
.card-title i {
|
|
font-size: 0.5rem;
|
|
width: 0.65rem;
|
|
}
|
|
|
|
.card-title p {
|
|
display: block !important;
|
|
width: calc(100% - 1rem);
|
|
color: #000;
|
|
font-size: 0.40rem;
|
|
font-weight: bold;
|
|
/*white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;*/
|
|
}
|
|
|
|
.warning-rule {
|
|
display: flex;
|
|
margin: 2% 0.27rem 1%;
|
|
padding: 0.2rem;
|
|
border-radius: 0.27rem;
|
|
background-color: #fff4e8;
|
|
color: #fb710b;
|
|
font-size: 0.3rem;
|
|
line-height: 1.25;
|
|
}
|
|
|
|
.warning-rule i {
|
|
margin: 0 0.1rem;
|
|
color: #f50;
|
|
font-size: 0.35rem;
|
|
}
|
|
|
|
/***折叠**/
|
|
|
|
.look_all {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 100%;
|
|
height: 0.75rem;
|
|
font-size: 0.3rem;
|
|
color: #666;
|
|
cursor: pointer;
|
|
user-select: none;
|
|
border-radius: 0.05rem;
|
|
}
|
|
|
|
.look_all i {
|
|
margin: 0 0.2rem;
|
|
padding: 0.1rem 0.3rem 0;
|
|
color: rgba(0, 0, 0, 0.35);
|
|
font-size: 0.4rem;
|
|
height: 0.5rem;
|
|
/*background: linear-gradient(to bottom, rgba(0, 0, 0, .1), transparent);*/
|
|
border-radius: 0.2rem 0.2rem 0 0;
|
|
}
|
|
|
|
.new_detail {
|
|
padding-top: 0.3rem;
|
|
height: 100%;
|
|
transition: height 2s linear;
|
|
}
|
|
|
|
.work_detail {
|
|
padding-top: 0.3rem;
|
|
height: 0.2rem;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.new_up {
|
|
position: absolute;
|
|
bottom: 0.1rem;
|
|
}
|
|
/***/
|
|
|
|
.timbox {
|
|
margin: 3% 0 3% 8%;
|
|
padding-bottom: 1rem;
|
|
width: 90%;
|
|
height: 94%;
|
|
font-size: 0.3rem;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.timtit {
|
|
position: relative;
|
|
top: -0.2rem;
|
|
left: 1.5%;
|
|
margin: 0.2rem 0 0;
|
|
font-size: 0.4rem;
|
|
color: #999;
|
|
}
|
|
|
|
.progress-box {
|
|
position: relative;
|
|
float: left;
|
|
clear: both;
|
|
margin: 0 2% 0 3%;
|
|
padding: 0.1rem 0.2rem 0.3rem;
|
|
width: 95%;
|
|
}
|
|
|
|
.prolist {
|
|
margin: 0 0 0 1.5%;
|
|
width: 100%;
|
|
color: #666;
|
|
font-size: 0.35rem;
|
|
line-height: 1.75;
|
|
}
|
|
|
|
.progress-box::before {
|
|
position: absolute;
|
|
z-index: 10;
|
|
left: 0;
|
|
top: 0.1rem;
|
|
content: '';
|
|
width: 0.01rem;
|
|
height: 100%;
|
|
background-color: rgb(195, 195, 195);
|
|
}
|
|
|
|
.progress-box:last-child::before {
|
|
height: 0;
|
|
}
|
|
|
|
.progress-box::after {
|
|
position: absolute;
|
|
z-index: 10;
|
|
left: -0.2rem;
|
|
top: 0.1rem;
|
|
content: '';
|
|
width: 0.25rem;
|
|
height: 0.25rem;
|
|
border: 0.1rem solid #fff;
|
|
border-radius: 0.5rem;
|
|
background-color: rgb(155 155 155);
|
|
}
|
|
|
|
.progress-box.level-0::after {
|
|
background-color: #1989fa;
|
|
}
|
|
|
|
.progress-box.level-1::after {
|
|
background-color: #ff0000;
|
|
}
|
|
|
|
.progress-box.level-2::after {
|
|
background-color: #f78b00;
|
|
}
|
|
|
|
.progress-box.level-3::after {
|
|
background-color: #f5cf08;
|
|
}
|
|
|
|
.prolist label {
|
|
display: inline-block;
|
|
margin-right: 0.1rem;
|
|
min-width: 1.2rem;
|
|
color: #323233;
|
|
}
|
|
/**/
|
|
</style>
|
|
|