From d154966cc9492a30c47809aa2824ba61d18e6fef Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 28 五月 2024 16:51:24 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
h5/pages/applicationRecord/applicationRecord.vue | 107 +++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 86 insertions(+), 21 deletions(-)
diff --git a/h5/pages/applicationRecord/applicationRecord.vue b/h5/pages/applicationRecord/applicationRecord.vue
index 6c647ed..c10e776 100644
--- a/h5/pages/applicationRecord/applicationRecord.vue
+++ b/h5/pages/applicationRecord/applicationRecord.vue
@@ -2,41 +2,66 @@
<view class="box">
<scroll-view scroll-x class="box_head">
<view class="box_head_list">
- <view class="box_head_item active">鍏ㄩ儴</view>
- <view class="box_head_item">寰呭鏍�</view>
- <view class="box_head_item">瀹℃牳閫氳繃</view>
- <view class="box_head_item">瀹℃牳椹冲洖</view>
+ <view
+ class="box_head_item"
+ :class="{ active: status == '' }"
+ @click="tabsClick('')"
+ >鍏ㄩ儴</view
+ >
+ <view
+ class="box_head_item"
+ @click="tabsClick('0')"
+ :class="{ active: status == '0' }"
+ >寰呭鏍�</view
+ >
+ <view
+ class="box_head_item"
+ @click="tabsClick('2')"
+ :class="{ active: status == '2' }"
+ >瀹℃牳閫氳繃</view
+ >
+ <view
+ class="box_head_item"
+ @click="tabsClick('3')"
+ :class="{ active: status == '3' }"
+ >瀹℃牳椹冲洖</view
+ >
</view>
</scroll-view>
<view class="box_list">
- <view class="box_list_item" v-for="(item, index) in 3" :key="index">
+ <view
+ @click="handleDetail(item.id)"
+ class="box_list_item"
+ v-for="(item, index) in list"
+ :key="index"
+ >
<view class="box_list_item_head">
- <text>涓佹仼鍑殑鍔冲姟鍏ュ巶鐢宠</text>
- <text class="loading">寰呭鏍�</text>
+ <text>{{ item.name }}鐨勫姵鍔″叆鍘傜敵璇�</text>
+ <text class="loading">{{ statusMap[item.status] }}</text>
</view>
<view class="box_list_item_nr">
<view class="box_list_item_nr_item">
<text>琚闂汉锛�</text>
- <text>浜轰簨閮�-鐜嬩簹钃�</text>
+ <text
+ >{{ item.receptMemberDepartment }}-{{
+ item.receptMemberName
+ }}</text
+ >
</view>
<view class="box_list_item_nr_item">
<text>杩涘巶鏃堕棿锛�</text>
- <text>12-12 09:00</text>
+ <text>{{ item.starttime }}</text>
</view>
<view class="box_list_item_nr_item">
<text>绂诲巶鏃堕棿锛�</text>
- <text>12-12 12:00</text>
- </view>
- <view class="box_list_item_nr_item">
- <text>鍏ュ巶浜烘暟锛�</text>
- <text>10</text>
+ <text>{{ item.endtime }}</text>
</view>
<view class="box_list_item_nr_item">
<text>鏉ヨ浜嬬敱锛�</text>
- <text>涓氬姟鏉ュ線</text>
+ <text>{{ item.reason }}</text>
</view>
<view class="box_list_item_nr_x"></view>
- <view class="box_list_item_nr_text"> 2023-12-12 09:00鎻愪氦 </view>
+ <view class="box_list_item_nr_text">{{ item.createDate }} 鎻愪氦</view>
</view>
</view>
</view>
@@ -49,22 +74,62 @@
data() {
return {
pagination: {
- page: 1,
+ page: 0,
capacity: 10
},
- list: []
+ list: [],
+ total: 0,
+ status: '',
+
+ statusMap: {
+ 0: '寰呭鏍�',
+ 1: '宸叉彁浜�',
+ 2: '瀹℃牳閫氳繃',
+ 3: '瀹℃牳涓嶉�氳繃',
+ 4: '鍙栨秷',
+ 5: '涓嬪彂鎴愬姛',
+ 6: '涓嬪彂澶辫触',
+ }
}
},
onLoad() {
this.getList()
},
+ onReachBottom() {
+ if (this.total > 10) {
+ this.getList()
+ }
+
+ },
methods: {
+ handleDetail(id) {
+ uni.navigateTo({
+ url: "/pages/appointmentDetails/appointmentDetails?id=" + id
+ })
+ },
+ tabsClick(val) {
+ this.pagination.page = 0
+ this.status = val
+ this.getList()
+ },
getList() {
- const { pagination } = this
+ const { pagination, status, list } = this
+ pagination.page = pagination.page + 1
getVisitedRecord({
- pageWrap: { ...pagination }
+ ...pagination,
+ model: {
+ openid: this.$store.state.openId,
+ status
+ },
}).then(res => {
- this.list = res.data
+ if (res.data.records.length > 0) {
+ if(pagination.page === 1){
+ this.list = res.data.records
+ }else{
+ this.list = [...list, ...res.data.records]
+ }
+ this.total = res.data.total
+ }
})
}
--
Gitblit v1.9.3