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