task#6524 添加刷新按钮
This commit is contained in:
@ -2,7 +2,10 @@
|
||||
<div class="wrap">
|
||||
<div class="service_title">
|
||||
<span class="name">{{orderInfo?.serviceName}}</span>
|
||||
<span class="status">{{orderInfo?.orderStatusString}}</span>
|
||||
<span class="status">
|
||||
{{orderInfo?.orderStatusString}}
|
||||
<span class="refresh_btn" @click="refreshHandler">刷新</span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- <img class="report_line" src="@/assets/report/report_line.png" alt="">-->
|
||||
<div class="service_content">
|
||||
@ -25,6 +28,11 @@
|
||||
export default {
|
||||
name: "service-item",
|
||||
props: ['orderInfo'],
|
||||
methods: {
|
||||
refreshHandler() {
|
||||
this.$emit('refresh')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -58,6 +66,13 @@
|
||||
font-size: 13px;
|
||||
color: #F19028;
|
||||
}
|
||||
.refresh_btn {
|
||||
background-color: #267EF0;
|
||||
color: #fff;
|
||||
padding: 6px 12px;
|
||||
margin-left: 5px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
.service_content {
|
||||
padding: 11px 16px 18px;
|
||||
|
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<van-pull-refresh v-model="isLoading" class="custom-pull-refresh" @refresh="onRefresh">
|
||||
<!-- <van-pull-refresh v-model="isLoading" class="custom-pull-refresh safe-pull-refresh" @refresh="onRefresh">-->
|
||||
<div class="main_wrap">
|
||||
<div class="top_bg" :class="{'dispatch' : type == 1 , 'driver' : type != 1}">
|
||||
<!-- <div class="title">报备中心</div>-->
|
||||
</div>
|
||||
<div class="service_wrap">
|
||||
<service-item :order-info="orderInfo"></service-item>
|
||||
<service-item :order-info="orderInfo" @refresh="onRefreshHandler"></service-item>
|
||||
</div>
|
||||
<div class="chat_list" ref="chatList">
|
||||
<div class="chat_list" ref="chatList" >
|
||||
<!--ai对话框 s -->
|
||||
<div v-for="(item, index) in recordList" :key="index">
|
||||
<template v-if="item.messageType == 4">
|
||||
@ -121,7 +121,7 @@
|
||||
/>
|
||||
</van-popup>
|
||||
</div>
|
||||
</van-pull-refresh>
|
||||
<!-- </van-pull-refresh>-->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -179,16 +179,14 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onRefresh() {
|
||||
onRefreshHandler() {
|
||||
setTimeout(async () => {
|
||||
try {
|
||||
this.recordList = [];
|
||||
await this.getReportList();
|
||||
await this.getDetail();
|
||||
await this.getRecordList();
|
||||
setTimeout(async () => {
|
||||
await this.scrollToBottom();
|
||||
}, 1)
|
||||
|
||||
await this.scrollToBottom();
|
||||
} finally {
|
||||
this.isLoading = false; // 结束加载状态
|
||||
}
|
||||
@ -315,6 +313,7 @@
|
||||
background: #F9FCFF !important;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.main_wrap {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
Reference in New Issue
Block a user