|
@@ -44,7 +44,7 @@
|
|
|
|
|
|
|
|
<view class="today-reminder-card">
|
|
<view class="today-reminder-card">
|
|
|
<view class="card-header">
|
|
<view class="card-header">
|
|
|
- <text class="card-title">数据概览</text>
|
|
|
|
|
|
|
+ <text class="card-title">复诊概览</text>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="card-content">
|
|
<view class="card-content">
|
|
|
<view class="reminder-item" @click="onItemClick('复诊管理')">
|
|
<view class="reminder-item" @click="onItemClick('复诊管理')">
|
|
@@ -52,17 +52,17 @@
|
|
|
<image src="/static/icons/remixicon/time-line.svg" class="icon" />
|
|
<image src="/static/icons/remixicon/time-line.svg" class="icon" />
|
|
|
</view>
|
|
</view>
|
|
|
<view class="reminder-text">
|
|
<view class="reminder-text">
|
|
|
- <text class="reminder-number">{{ todayReminders.followUpCount }}</text>
|
|
|
|
|
- <text class="reminder-label">待处理复诊</text>
|
|
|
|
|
|
|
+ <text class="reminder-number">{{ todayReminders.pendingCount }}</text>
|
|
|
|
|
+ <text class="reminder-label">待确认复诊</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="reminder-item" @click="onItemClick('我的病人')">
|
|
|
|
|
|
|
+ <view class="reminder-item" @click="onItemClick('复诊管理')">
|
|
|
<view class="reminder-icon">
|
|
<view class="reminder-icon">
|
|
|
<image src="/static/icons/remixicon/alert-line.svg" class="icon" />
|
|
<image src="/static/icons/remixicon/alert-line.svg" class="icon" />
|
|
|
</view>
|
|
</view>
|
|
|
<view class="reminder-text">
|
|
<view class="reminder-text">
|
|
|
- <text class="reminder-number">{{ todayReminders.abnormalCount }}</text>
|
|
|
|
|
- <text class="reminder-label">异常患者</text>
|
|
|
|
|
|
|
+ <text class="reminder-number">{{ todayReminders.confirmedCount }}</text>
|
|
|
|
|
+ <text class="reminder-label">待完成复诊</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -124,8 +124,8 @@ const avatarSrc = computed(() => {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const todayReminders = ref({
|
|
const todayReminders = ref({
|
|
|
- followUpCount: 0,
|
|
|
|
|
- abnormalCount: 0
|
|
|
|
|
|
|
+ pendingCount: 0,
|
|
|
|
|
+ confirmedCount: 0
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const patientActivities = ref<Array<{
|
|
const patientActivities = ref<Array<{
|
|
@@ -204,14 +204,34 @@ const fetchTodayReminders = async () => {
|
|
|
try {
|
|
try {
|
|
|
const token = uni.getStorageSync('token')
|
|
const token = uni.getStorageSync('token')
|
|
|
if (!token) return
|
|
if (!token) return
|
|
|
- const response = await request({
|
|
|
|
|
- url: 'https://wx.baiyun.work/doctor/today_reminders',
|
|
|
|
|
- method: 'GET',
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // 获取复诊数据
|
|
|
|
|
+ const followUpResponse = await request({
|
|
|
|
|
+ url: 'https://wx.baiyun.work/follow-up/list',
|
|
|
|
|
+ method: 'POST',
|
|
|
|
|
+ header: { 'Content-Type': 'application/json' },
|
|
|
|
|
+ data: {}
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
|
|
+ let pendingCount = 0
|
|
|
|
|
+ let confirmedCount = 0
|
|
|
|
|
|
|
|
- const resp = response.data as any
|
|
|
|
|
- if (resp && resp.code === 200 && resp.data) {
|
|
|
|
|
- todayReminders.value = resp.data
|
|
|
|
|
|
|
+ const followUpData = followUpResponse.data as any
|
|
|
|
|
+ if (followUpData && followUpData.code === 200 && followUpData.data) {
|
|
|
|
|
+ // 计算待确认复诊数量:状态为PENDING的复诊
|
|
|
|
|
+ pendingCount = followUpData.data.records.filter((item: any) =>
|
|
|
|
|
+ item.status === 'PENDING'
|
|
|
|
|
+ ).length
|
|
|
|
|
+
|
|
|
|
|
+ // 计算待完成复诊数量:状态为CONFIRMED的复诊
|
|
|
|
|
+ confirmedCount = followUpData.data.records.filter((item: any) =>
|
|
|
|
|
+ item.status === 'CONFIRMED'
|
|
|
|
|
+ ).length
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ todayReminders.value = {
|
|
|
|
|
+ pendingCount,
|
|
|
|
|
+ confirmedCount
|
|
|
}
|
|
}
|
|
|
} catch (err) {
|
|
} catch (err) {
|
|
|
console.error('Fetch today reminders error:', err)
|
|
console.error('Fetch today reminders error:', err)
|
|
@@ -636,6 +656,12 @@ const formatActivityDescription = (activity: any) => {
|
|
|
color: #333;
|
|
color: #333;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+.reminder-label {
|
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ margin-top: 10rpx;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.activity-card-content {
|
|
.activity-card-content {
|
|
|
padding: 20rpx;
|
|
padding: 20rpx;
|
|
|
display: block;
|
|
display: block;
|