12 changed files with 1710 additions and 656 deletions
@ -0,0 +1,195 @@ |
|||
<template> |
|||
<div class="home app_content"> |
|||
<!-- 中间 --> |
|||
<!-- <div class="warp_body">--> |
|||
<!-- <div class="white-body">--> |
|||
<!-- <div class="tabs">--> |
|||
<!-- <ul>--> |
|||
<!-- <li v-for='(item,index) in data.list' @click='check(index)'--> |
|||
<!-- :class="{ active: index === data.TabId }">--> |
|||
<!-- <span v-if="index === 0"> {{item.title}}</span>--> |
|||
<!-- <span v-else-if="index === 1" class="warn-tab"> {{item.title}}</span>--> |
|||
<!-- </li>--> |
|||
<!-- </ul>--> |
|||
<!-- </div>--> |
|||
<!-- <div v-if="data.TabId == 0">--> |
|||
<!-- <enterpriseInspectionList isReg="0"></enterpriseInspectionList>--> |
|||
<!-- </div>--> |
|||
<!-- <div v-if="data.TabId == 1">--> |
|||
<!-- <enterpriseInspectionList isReg="1"></enterpriseInspectionList>--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
|
|||
<van-tabs v-model:active="active" sticky @click-tab="onClickTab"> |
|||
<van-tab v-for="(item, index) in data.list" :title="item.title"> |
|||
<div v-if="data.TabId == 0" style="height: calc(100vh - 1.5rem);"> |
|||
<registrationListView isReg="0" /> |
|||
</div> |
|||
<div v-if="data.TabId == 1" style="height: calc(100vh - 1.5rem);"> |
|||
<complaintNoScan isReg="1" /> |
|||
</div> |
|||
</van-tab> |
|||
</van-tabs> |
|||
</div> |
|||
</template> |
|||
|
|||
<script setup name="complaintBase"> |
|||
import complaint from '@/views/enterprise/complaint.vue'; |
|||
import complaintNoScan from '@/views/enterprise/complaintNoScan.vue'; |
|||
import registrationListView from '@/views/enterprise/compaint/registrationListView.vue'; |
|||
|
|||
|
|||
const {useCommon} = $globalStore; |
|||
//路由参数 |
|||
const router = useRouter(); |
|||
const route = useRoute(); |
|||
//tab切换 |
|||
const active = ref(0); |
|||
const data = reactive({ |
|||
status: 0, |
|||
TabId: 0, |
|||
list: [ |
|||
{ |
|||
title: '检查事项投诉', |
|||
value: '0' |
|||
}, |
|||
{ |
|||
title: '入企不扫码投诉', |
|||
value: '1' |
|||
}, |
|||
], |
|||
}); |
|||
|
|||
const onClickTab = ({ title }) => { |
|||
if(title == '检查事项投诉'){ |
|||
data.TabId = 0; |
|||
}else{ |
|||
data.TabId = 1; |
|||
} |
|||
}; |
|||
|
|||
|
|||
onMounted(() => { |
|||
|
|||
}) |
|||
|
|||
</script> |
|||
|
|||
<style lang="less" scoped> |
|||
.home { |
|||
display: flex; |
|||
flex-direction: column; |
|||
height: 100%; |
|||
overflow: hidden; |
|||
background-color: #ebf3fb; |
|||
|
|||
.warp_body { |
|||
position: relative; |
|||
background-image: linear-gradient(to bottom, #ebf3fb, transparent); |
|||
} |
|||
|
|||
.white-body { |
|||
margin: 0 3%; |
|||
width: 94%; |
|||
height: 99%; |
|||
background-color: #fff; |
|||
border-radius: 0.27rem; |
|||
} |
|||
} |
|||
|
|||
.tohome { |
|||
position: absolute; |
|||
top: 1.25%; |
|||
right: 5%; |
|||
font-size: 0.5rem; |
|||
} |
|||
|
|||
.tabs { |
|||
padding: 3% 3% 0; |
|||
width: 94%; |
|||
height: 1.25rem; |
|||
box-sizing: content-box; |
|||
} |
|||
|
|||
.tabs ul { |
|||
display: flex; |
|||
width: 100%; |
|||
height: 100%; |
|||
font-size: 0.4rem; |
|||
line-height: 1.25rem; |
|||
text-align: center; |
|||
align-content: center; |
|||
justify-items: center; |
|||
} |
|||
|
|||
.tabs ul li { |
|||
float: left; |
|||
width: 50%; |
|||
height: 100%; |
|||
} |
|||
|
|||
.tabs ul li span { |
|||
display: block; |
|||
width: 100%; |
|||
height: 100%; |
|||
color: #4aa1f9; |
|||
background: url("src/assets/images/tab_bg1_1.png") no-repeat; |
|||
background-size: 100% 100%; |
|||
} |
|||
|
|||
.tabs ul li.active span { |
|||
background: url("src/assets/images/tab_bg1.png") no-repeat; |
|||
background-size: 100% 100%; |
|||
color: #fff; |
|||
} |
|||
|
|||
.tabs ul li span.warn-tab { |
|||
margin-left: -2%; |
|||
background: url("src/assets/images/tab_bg.png") no-repeat; |
|||
background-size: 100% 100%; |
|||
} |
|||
|
|||
.tabs ul li.active span.warn-tab { |
|||
background: url("src/assets/images/tab_bg_1.png") no-repeat; |
|||
background-size: 100% 100%; |
|||
color: #fff; |
|||
} |
|||
|
|||
.tabs ul li span.level1 { |
|||
background: url("src/assets/images/tab_shine_red.gif") no-repeat !important; |
|||
background-size: 100% 100% !important; |
|||
color: #fff !important; |
|||
} |
|||
|
|||
.tabs ul li span.level2 { |
|||
background: url("src/assets/images/tab_shine_org.gif") no-repeat !important; |
|||
background-size: 100% 100% !important; |
|||
color: #fff !important; |
|||
} |
|||
|
|||
.tabs ul li span.level3 { |
|||
background: url("src/assets/images/tab_shine_yel.gif") no-repeat !important; |
|||
background-size: 100% 100% !important; |
|||
color: #fff !important; |
|||
} |
|||
|
|||
.addinfo { |
|||
position: absolute; |
|||
bottom: 3%; |
|||
right: 2%; |
|||
z-index: 99999; |
|||
width: 1.5rem; |
|||
height: 1.5rem; |
|||
background-color: #1367fe; |
|||
border-radius: 50%; |
|||
box-shadow: 0 0 0.27rem #1367fe; |
|||
color: #fff; |
|||
font-size: 0.4rem; |
|||
text-align: center; |
|||
vertical-align: middle; |
|||
padding-top: 0.45rem; |
|||
box-sizing: border-box; |
|||
} |
|||
|
|||
</style> |
|||
@ -0,0 +1,204 @@ |
|||
<template> |
|||
<div class="home app_content"> |
|||
<!-- 中间 --> |
|||
<!-- <div class="warp_body">--> |
|||
<!-- <div class="white-body">--> |
|||
<!-- <div class="tabs">--> |
|||
<!-- <ul>--> |
|||
<!-- <li v-for='(item,index) in data.list' @click='check(index)'--> |
|||
<!-- :class="{ active: index === data.TabId }">--> |
|||
<!-- <span v-if="index === 0"> {{item.title}}</span>--> |
|||
<!-- <span v-else-if="index === 1" class="warn-tab"> {{item.title}}</span>--> |
|||
<!-- </li>--> |
|||
<!-- </ul>--> |
|||
<!-- </div>--> |
|||
<!-- <div v-if="data.TabId == 0">--> |
|||
<!-- <enterpriseInspectionList isReg="0"></enterpriseInspectionList>--> |
|||
<!-- </div>--> |
|||
<!-- <div v-if="data.TabId == 1">--> |
|||
<!-- <enterpriseInspectionList isReg="1"></enterpriseInspectionList>--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
|
|||
<van-tabs v-model:active="active" sticky @click-tab="onClickTab"> |
|||
<van-tab v-for="(item, index) in data.list" :title="item.title"> |
|||
<div v-if="data.TabId == 0" style="height: calc(100vh - 1.5rem);"> |
|||
<complaintDetailView isReg="0" :id="data.id" /> |
|||
</div> |
|||
<!-- 处置流程页面 --> |
|||
<div v-if="data.TabId == 1" style="height: calc(100vh - 1.5rem);"> |
|||
<complaintNoScan isReg="1" :id="data.id" /> |
|||
</div> |
|||
</van-tab> |
|||
</van-tabs> |
|||
<!-- <van-tabs v-model:active="active" @click-tab="onClickTab"> |
|||
<van-tab title="标签 1">内容 1</van-tab> |
|||
<van-tab title="标签 2">内容 2</van-tab> |
|||
</van-tabs> --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script setup name="complaintBase"> |
|||
import complaintDetailView from '@/views/enterprise/complaintDetailView.vue'; |
|||
import complaintNoScan from '@/views/enterprise/complaintNoScan.vue'; |
|||
|
|||
|
|||
const {useCommon} = $globalStore; |
|||
//路由参数 |
|||
const router = useRouter(); |
|||
const route = useRoute(); |
|||
const data = reactive({ |
|||
id: ref(""), |
|||
status: 0, |
|||
TabId: 0, |
|||
list: [ |
|||
{ |
|||
title: '诉求详情', |
|||
value: '0' |
|||
}, |
|||
{ |
|||
title: '处置进度', |
|||
value: '1' |
|||
}, |
|||
], |
|||
}); |
|||
|
|||
const check = (index) => { |
|||
console.log("点击切换tab", index); |
|||
data.TabId = index; |
|||
}; |
|||
const active = ref(0); |
|||
const onClickTab = ({ title }) => { |
|||
if(title == '诉求详情'){ |
|||
data.TabId = 0; |
|||
}else{ |
|||
data.TabId = 1; |
|||
} |
|||
}; |
|||
|
|||
onMounted(() => { |
|||
// let id = route?.query?.id; |
|||
data.id = route?.query?.id; |
|||
|
|||
}) |
|||
|
|||
</script> |
|||
|
|||
<style lang="less" scoped> |
|||
.home { |
|||
display: flex; |
|||
flex-direction: column; |
|||
height: 100%; |
|||
overflow: hidden; |
|||
background-color: #ebf3fb; |
|||
|
|||
.warp_body { |
|||
position: relative; |
|||
background-image: linear-gradient(to bottom, #ebf3fb, transparent); |
|||
} |
|||
|
|||
.white-body { |
|||
margin: 0 3%; |
|||
width: 94%; |
|||
height: 99%; |
|||
background-color: #fff; |
|||
border-radius: 0.27rem; |
|||
} |
|||
} |
|||
|
|||
.tohome { |
|||
position: absolute; |
|||
top: 1.25%; |
|||
right: 5%; |
|||
font-size: 0.5rem; |
|||
} |
|||
|
|||
.tabs { |
|||
padding: 3% 3% 0; |
|||
width: 94%; |
|||
height: 1.25rem; |
|||
box-sizing: content-box; |
|||
} |
|||
|
|||
.tabs ul { |
|||
display: flex; |
|||
width: 100%; |
|||
height: 100%; |
|||
font-size: 0.4rem; |
|||
line-height: 1.25rem; |
|||
text-align: center; |
|||
align-content: center; |
|||
justify-items: center; |
|||
} |
|||
|
|||
.tabs ul li { |
|||
float: left; |
|||
width: 50%; |
|||
height: 100%; |
|||
} |
|||
|
|||
.tabs ul li span { |
|||
display: block; |
|||
width: 100%; |
|||
height: 100%; |
|||
color: #4aa1f9; |
|||
background: url("src/assets/images/tab_bg1_1.png") no-repeat; |
|||
background-size: 100% 100%; |
|||
} |
|||
|
|||
.tabs ul li.active span { |
|||
background: url("src/assets/images/tab_bg1.png") no-repeat; |
|||
background-size: 100% 100%; |
|||
color: #fff; |
|||
} |
|||
|
|||
.tabs ul li span.warn-tab { |
|||
margin-left: -2%; |
|||
background: url("src/assets/images/tab_bg.png") no-repeat; |
|||
background-size: 100% 100%; |
|||
} |
|||
|
|||
.tabs ul li.active span.warn-tab { |
|||
background: url("src/assets/images/tab_bg_1.png") no-repeat; |
|||
background-size: 100% 100%; |
|||
color: #fff; |
|||
} |
|||
|
|||
.tabs ul li span.level1 { |
|||
background: url("src/assets/images/tab_shine_red.gif") no-repeat !important; |
|||
background-size: 100% 100% !important; |
|||
color: #fff !important; |
|||
} |
|||
|
|||
.tabs ul li span.level2 { |
|||
background: url("src/assets/images/tab_shine_org.gif") no-repeat !important; |
|||
background-size: 100% 100% !important; |
|||
color: #fff !important; |
|||
} |
|||
|
|||
.tabs ul li span.level3 { |
|||
background: url("src/assets/images/tab_shine_yel.gif") no-repeat !important; |
|||
background-size: 100% 100% !important; |
|||
color: #fff !important; |
|||
} |
|||
|
|||
.addinfo { |
|||
position: absolute; |
|||
bottom: 3%; |
|||
right: 2%; |
|||
z-index: 99999; |
|||
width: 1.5rem; |
|||
height: 1.5rem; |
|||
background-color: #1367fe; |
|||
border-radius: 50%; |
|||
box-shadow: 0 0 0.27rem #1367fe; |
|||
color: #fff; |
|||
font-size: 0.4rem; |
|||
text-align: center; |
|||
vertical-align: middle; |
|||
padding-top: 0.45rem; |
|||
box-sizing: border-box; |
|||
} |
|||
|
|||
</style> |
|||
@ -0,0 +1,599 @@ |
|||
<template> |
|||
<div class="shop app_content"> |
|||
<!-- 导航栏 --> |
|||
<!-- <div class="header_body"> |
|||
<header-nav |
|||
:slefBack="true" |
|||
@goBack="goBack" |
|||
:titelText="`行政检查信息查询`" |
|||
> |
|||
</header-nav> |
|||
|
|||
</div>--> |
|||
<van-search |
|||
v-model="searchParam.searchValue" |
|||
show-action |
|||
placeholder="请输入关键字查询" |
|||
@search="onSearch" |
|||
> |
|||
<template #action> |
|||
<div @click="onClickButton">搜索</div> |
|||
</template> |
|||
</van-search> |
|||
<div class="search-button-date"> |
|||
<span class="date-select" v-show="data.dateShow" @click="selectDate">{{ data.dateSearch }} <van-icon |
|||
name="play"/></span> |
|||
<div style="border-color: black;" class="van-hairline--bottom"></div> |
|||
<!-- <van-button class="search-button" type="primary" size="mini">统计分析</van-button> --> |
|||
<van-popup v-model:show="data.showDatePicker" position="bottom"> |
|||
<van-date-picker |
|||
title="选择日期" |
|||
v-model="data.currentDate" |
|||
:min-date="data.minDate" |
|||
:max-date="data.maxDate" |
|||
:columns-type="data.columnsType" |
|||
@confirm="onDateConfirm" |
|||
@cancel="cancelSelectDate" |
|||
/> |
|||
</van-popup> |
|||
</div> |
|||
|
|||
<!-- 中间 --> |
|||
<div class="shop-center"> |
|||
<van-pull-refresh v-model="data.refreshing" @refresh="onRefresh"> |
|||
<van-list v-model:loading="data.loading" :finished="data.finished" finished-text="没有更多了" @load="onLoad"> |
|||
<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>执法时间:{{ item.createTime }} <span class="card_box_action"></span></p> |
|||
</div> |
|||
|
|||
|
|||
<div @click="toDetailView(item.id)"> |
|||
<div class="van-hairline--bottom"></div> |
|||
<div class="card_box_span"> |
|||
<p>{{ item.lawEnforcementItemText }}</p> |
|||
</div> |
|||
|
|||
<div class="card_box_span"> |
|||
<p><label class="card_box_label">执法部门:</label> <span>{{ item.bureauDeptName }}</span></p> |
|||
</div> |
|||
<!-- <div class="card_box_span"> |
|||
<p><label class="card_box_label">执法人员:</label> <span>{{ item.lawEnforcer }}</span></p> |
|||
</div> |
|||
<div class="card_box_span" v-for="(item, index) in item.lawEnforcer2List"> |
|||
<p><label class="card_box_label">执法人员:</label> <span>{{ item }}</span></p> |
|||
</div>--> |
|||
<div class="card_box_span"> |
|||
<p> |
|||
<label class="card_box_label">执法人员:</label> |
|||
<div> |
|||
<div>{{ item.lawEnforcer }}</div> |
|||
<div v-for="(item, index) in item.lawEnforcer2List">{{ item }}</div> |
|||
</div> |
|||
</p> |
|||
</div> |
|||
<div class="card_box_span"> |
|||
<p><label class="card_box_label">检查类别:</label> {{ item.checkCategoryText }} |
|||
</p> |
|||
</div> |
|||
</div> |
|||
<div class="btn-list"> |
|||
<a @click.stop="toComplaintView(item.id,item.lawEnforcementItem,item.lawEnforcementItemText)"> |
|||
<van-icon name="warning-o"/> |
|||
投诉</a> |
|||
|
|||
</div> |
|||
|
|||
<div class="card_box_action" v-if="item.comOrOpi == 0"> |
|||
<!-- <span><van-button @click="toComplaint(item.id, item.lawEnforcementItemText)" type="primary"--> |
|||
<!-- size="mini">建议</van-button></span>--> |
|||
</div> |
|||
</div> |
|||
</van-swipe-cell> |
|||
</div> |
|||
</van-list> |
|||
</van-pull-refresh> |
|||
</div> |
|||
|
|||
<!-- 底部 --> |
|||
<!-- <div class="shop_footer_body"> |
|||
<footer-nav></footer-nav> |
|||
</div> --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script setup name="registrationList"> |
|||
import { queryListWithFiveDay } from '@/api/enterprise'; |
|||
import {queryLinkage, queryLinkageById, queryLinkageDictByValueAndParentId} from "@/api/linkage"; |
|||
import {setGoodsNum} from "@/util/util"; |
|||
|
|||
const {useCommon, useShopCard} = $globalStore; |
|||
|
|||
const router = useRouter(); |
|||
let allchecked = ref(false); // 是否全选 |
|||
let refreshLoad = ref(false); // 是否加载中 |
|||
let value = ref('') |
|||
let totalPrice = ref(0); // 总钱数 |
|||
|
|||
let searchParam = reactive({ |
|||
// 分页 |
|||
pageNum: 1, |
|||
pageSize: 6, |
|||
//执法事件 |
|||
lawEnforcementIncident: "", |
|||
//执法部门 |
|||
lawEnforcement: "", |
|||
//搜索框 |
|||
searchValue: ref(''), |
|||
//时间类型 |
|||
dateType: null, |
|||
// 是否提交 |
|||
isSubmit: 1, |
|||
//是否投诉 |
|||
isComplaint: null, |
|||
//企业统一信用码 |
|||
enterpriseNumber: ref(useCommon.enterpriseNumber), |
|||
//时间搜索 |
|||
dateSearch: "", |
|||
dataScopeId: 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'], |
|||
ga_columns: [], |
|||
dateShow: false, |
|||
checkNum: null, |
|||
loading: false, |
|||
finished: false, |
|||
refreshing: false, |
|||
curPage: 1, |
|||
}); |
|||
|
|||
// 设置初始值为当前时间 |
|||
onMounted(() => { |
|||
// getCard(); |
|||
searchParam.enterpriseNumber = useCommon.enterpriseNumber; |
|||
// queryList(); |
|||
data.dateSearch = nowDate(new Date()); |
|||
}); |
|||
const getLinkageByParentIdToItem = (parentId) => { |
|||
// 查询检查要求字典信息 |
|||
queryLinkage({"parentId": parentId}, success => { |
|||
for (var i = 0; i < success.length; i++) { |
|||
data.ga_columns.push({text: success[i].title, value: success[i].id, id: success[i].id}) |
|||
} |
|||
// queryList(); |
|||
searchDateType(null); |
|||
}, error => { |
|||
}); |
|||
} |
|||
const queryList = () => { |
|||
// searchParam.enterpriseNumber = "92440300MACQUM2M9D"; |
|||
//TODO 临时注释 |
|||
if (searchParam.enterpriseNumber == '' || searchParam.enterpriseNumber == null) { |
|||
console.log("该用户没有关联企业!"); |
|||
return; |
|||
} |
|||
searchParam.pageNum = (data.curPage - 1) * searchParam.pageSize; |
|||
//未投诉数据 |
|||
searchParam.isComplaint = 0; |
|||
queryListWithFiveDay(searchParam, success => { |
|||
console.log("---- ",success.rows); |
|||
data.curPage++; |
|||
data.loading = false; // 查出结果停止加载 |
|||
if (success.total <= data.dataList.length) { |
|||
// 查到最后没数据 |
|||
data.finished = true; |
|||
return; |
|||
} |
|||
// data.dataList = success.data; |
|||
data.dataList.push(...success.rows); |
|||
}, error => { |
|||
|
|||
}) |
|||
} |
|||
const setLinkageItem = (id, item) => { |
|||
queryLinkageById({"id": id}, success => { |
|||
item.lawEnforcementItem = success.title |
|||
}, error => { |
|||
}); |
|||
} |
|||
const onSearch = (val) => { |
|||
data.curPage = 1; |
|||
data.dataList = []; |
|||
onRefresh(); |
|||
// queryRegistrationList( |
|||
// { |
|||
// "searchValue": searchParam.searchText |
|||
// } |
|||
// , success => { |
|||
// console.log(success) |
|||
// data.dataList = success.data; |
|||
// }, error => { |
|||
// |
|||
// }) |
|||
}; |
|||
const onClickButton = () => { |
|||
data.curPage = 1; |
|||
data.dataList = []; |
|||
onRefresh(); |
|||
} |
|||
|
|||
/** |
|||
* 企业投诉页面 |
|||
* @param {*} id |
|||
* @param {*} name |
|||
*/ |
|||
const toComplaintView = (id, name, text) => { |
|||
console.log(id, name) |
|||
router.push({ |
|||
path: "/enterprise/complaint", |
|||
query: { |
|||
id: id, |
|||
lawEnforcementIncident: name, |
|||
lawEnforcementItemText: text, |
|||
isSelect: false |
|||
} |
|||
}); |
|||
} |
|||
/** 企业评价页面 */ |
|||
const toEvaluate = (id, checkItem) => { |
|||
console.log(checkItem); |
|||
router.push({ |
|||
path: "/evaluate", |
|||
query: { |
|||
isSelect: false, |
|||
id: id, |
|||
lawEnforcementItemText: checkItem, |
|||
} |
|||
}); |
|||
} |
|||
/** |
|||
* 查看执法登记详情 |
|||
* @param {} id |
|||
* @param {*} name |
|||
*/ |
|||
const toDetailView = (id) => { |
|||
console.log(id) |
|||
router.push( |
|||
{ |
|||
path: "/registrationDetail", |
|||
query: { |
|||
id: id, |
|||
} |
|||
}); |
|||
} |
|||
onActivated(() => { |
|||
}); |
|||
|
|||
onDeactivated(() => { |
|||
|
|||
}); |
|||
|
|||
const countWorkdays = (startDate) => { |
|||
let workdays = 0; |
|||
endDate = new Date(); |
|||
for (let date = new Date(startDate); date <= endDate; date.setDate(date.getDate() + 1)) { |
|||
if (date.getDay() % 6 !== 0) { // 假设周末是6 (星期六) 和 0 (星期日) |
|||
workdays++; |
|||
} |
|||
} |
|||
return workdays; |
|||
} |
|||
|
|||
// 返回 |
|||
const goBack = () => { |
|||
router.go(-1); |
|||
}; |
|||
|
|||
let resetScroll = ref(0); // 滚动记录 |
|||
let isLodding = ref(true); // 是否加载中 |
|||
let freshMap = reactive({ |
|||
refreshLoad: false, // 是否刷新 |
|||
listLoading: false, // 是否加载中 |
|||
listFinished: false, // 是否加载完成标识 |
|||
}); |
|||
|
|||
//下拉刷新 |
|||
const onRefresh = () => { |
|||
// 清空列表数据 |
|||
data.dataList = []; |
|||
data.finished = false; |
|||
|
|||
// 重新加载数据 |
|||
// 将 loading 设置为 true,表示处于加载状态 |
|||
data.loading = true; |
|||
onLoad(); |
|||
}; |
|||
// 触底加载 |
|||
const onLoad = () => { |
|||
setTimeout(() => { |
|||
if (data.refreshing) { |
|||
data.refreshing = false; |
|||
} |
|||
queryList(); |
|||
}, 1000); |
|||
}; |
|||
|
|||
|
|||
//获取分类下的商品列表 |
|||
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; |
|||
}; |
|||
|
|||
const selectDate = () => { |
|||
data.checkNum = 9; |
|||
data.showDatePicker = true; |
|||
} |
|||
|
|||
const onDateConfirm = (value) => { |
|||
data.dateSearch = value.selectedValues[0] + "/" + value.selectedValues[1] |
|||
data.showDatePicker = false; |
|||
//搜索数据 |
|||
searchParam.dateSearch = value.selectedValues[0] + "-" + value.selectedValues[1] |
|||
searchParam.dateType = null; |
|||
data.dateShow = true; |
|||
|
|||
data.curPage = 1; |
|||
data.dataList = []; |
|||
onRefresh(); |
|||
} |
|||
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 searchDateType = (val) => { |
|||
data.checkNum = val; |
|||
searchParam.dateType = val; |
|||
searchParam.isComplaint = null; |
|||
searchParam.dateSearch = null; |
|||
if (val == null) { |
|||
searchParam.dateSearch = null; |
|||
} |
|||
data.dateShow = false; |
|||
|
|||
data.curPage = 1; |
|||
data.dataList = []; |
|||
onRefresh(); |
|||
} |
|||
const searchComplaint = (val) => { |
|||
searchParam.isComplaint = val; |
|||
searchParam.dateType = null; |
|||
|
|||
data.curPage = 1; |
|||
data.dataList = []; |
|||
onRefresh(); |
|||
} |
|||
</script> |
|||
|
|||
<style lang="less" scoped> |
|||
.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.2rem; |
|||
|
|||
.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-left: 3%; |
|||
font-size: 0.35rem; |
|||
line-height: 1.5; |
|||
|
|||
p { |
|||
display: flex; |
|||
margin: 0; |
|||
} |
|||
} |
|||
|
|||
.card_box_action { |
|||
|
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
.shop_footer_body { |
|||
//height: 101px; |
|||
position: relative; |
|||
|
|||
.footer-one-btn { |
|||
height: 1.33rem; |
|||
bottom: 1.34rem; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.search-button-list { |
|||
height: 0.7rem; |
|||
display: flex; |
|||
flex-direction: row; |
|||
padding-left: 0.27rem; |
|||
margin-top: 0.27rem; |
|||
align-items: end; |
|||
|
|||
.search-button { |
|||
width: 15%; |
|||
height: 100%; |
|||
background: #e3e0e0; |
|||
border-color: #e3e0e0; |
|||
color: #4c4c4c; |
|||
font-size: 0.3rem; |
|||
} |
|||
|
|||
.search-button.active { |
|||
background-color: #1367fe; |
|||
border-color: #1367fe; |
|||
color: #fff; |
|||
} |
|||
} |
|||
|
|||
.search-button-date { |
|||
display: flex; |
|||
flex-direction: row; |
|||
align-items: end; |
|||
position: relative; |
|||
|
|||
.date-select { |
|||
font-size: 0.52rem; |
|||
margin: 3% 0 0 4%; |
|||
|
|||
i { |
|||
transform: rotate(90deg); |
|||
font-size: 0.4rem; |
|||
} |
|||
} |
|||
|
|||
.search-button { |
|||
position: absolute; |
|||
top: 1%; |
|||
right: 3%; |
|||
width: 15%; |
|||
height: 100%; |
|||
font-size: 0.3rem; |
|||
} |
|||
} |
|||
|
|||
.trbtn { |
|||
position: absolute; |
|||
top: 0; |
|||
right: 4%; |
|||
height: 90%; |
|||
} |
|||
|
|||
.trbtn_e { |
|||
position: absolute; |
|||
top: 0; |
|||
right: 16%; |
|||
height: 90%; |
|||
color: antiquewhite |
|||
} |
|||
|
|||
/deep/ .van-hairline--bottom { |
|||
margin: -1% 0 3% 0; |
|||
height: 0; |
|||
background-color: transparent; |
|||
border: 1px; |
|||
} |
|||
|
|||
/deep/ .card_box_span:first-child { |
|||
color: #c1bfbf; |
|||
} |
|||
|
|||
/deep/ .card_box_span:nth-child(2) p { |
|||
font-size: 0.40rem; |
|||
font-weight: bold; |
|||
white-space: nowrap; |
|||
overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
} |
|||
|
|||
.card_box_label { |
|||
color: rgba(128, 128, 128, 0.65); |
|||
white-space: nowrap; |
|||
} |
|||
|
|||
/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: 0.01rem solid #1367fe; |
|||
border-radius: 0 0.15rem 0.15rem 0; |
|||
color: #fff; |
|||
text-align: center; |
|||
line-height: 0.9rem; |
|||
} |
|||
|
|||
.btn-list { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: flex-end; |
|||
margin: 0.3rem 3% 0; |
|||
width: 94%; |
|||
border-top: 1px solid #f4f5f6; |
|||
} |
|||
|
|||
.btn-list a { |
|||
margin: 3% 3% 1%; |
|||
font-size: 0.35rem; |
|||
color: #1367fe; |
|||
white-space: nowrap; |
|||
} |
|||
|
|||
.btn-list a i { |
|||
margin: 0 0.12rem; |
|||
font-size: 0.4rem; |
|||
} |
|||
</style> |
|||
File diff suppressed because it is too large
Loading…
Reference in new issue