483 lines
9.2 KiB
Vue
483 lines
9.2 KiB
Vue
<template>
|
|
|
|
<view class="new-patient-page">
|
|
|
|
|
|
<uni-nav-bar
|
|
left-icon="left"
|
|
title="我的患者"
|
|
@clickLeft="goBack"
|
|
fixed
|
|
color="#8B2316"
|
|
height="140rpx"
|
|
:border="false"
|
|
backgroundColor="#eeeeee"
|
|
/>
|
|
|
|
|
|
<!-- 提醒区域 -->
|
|
<view class="reminder-section">
|
|
<view class="reminder-icon">
|
|
<uni-icons type="notification" size="16" color="#ff9500"></uni-icons>
|
|
</view>
|
|
<text class="reminder-text">提醒: 为了避免不必要的纠纷,请您务必选择线下就诊过的患者</text>
|
|
</view>
|
|
|
|
<!-- 随访申请 -->
|
|
<view class="follow-up-section">
|
|
<view class="section-title">随访申请</view>
|
|
<view class="pending-request" v-if="pendingRequest">
|
|
<view class="request-item">
|
|
<view class="avatar">
|
|
<view class="avatar-icon"></view>
|
|
</view>
|
|
<view class="request-content">
|
|
<view class="request-time">2025-08-18 15:55:03</view>
|
|
<view class="request-text">我是陈新华,在线上和您沟通过,请您同意我作为您的随访患者</view>
|
|
|
|
<view class="action-buttons">
|
|
<button class="reject-btn" @click="rejectRequest">拒绝</button>
|
|
<button class="agree-btn" @click="agreeRequest">同意</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 申请记录 -->
|
|
<view class="history-section">
|
|
<view class="section-title">申请记录(近一月)</view>
|
|
<view class="history-list">
|
|
<view class="history-item" v-for="(item, index) in historyList" :key="index">
|
|
<view class="avatar">
|
|
<view class="avatar-icon"></view>
|
|
</view>
|
|
<view class="history-content">
|
|
<view class="history-time">{{ item.time }}</view>
|
|
<view class="nickname">昵称: {{ item.nickname }}</view>
|
|
<view class="history-text">{{ item.message }}</view>
|
|
<view class="status-info">
|
|
<up-image :src="goImg" width="30rpx" height="30rpx" ></up-image>
|
|
<text class="status-text">已同意</text>
|
|
</view>
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 底部按钮 -->
|
|
<view class="bottom-button">
|
|
<button class="add-patient-btn" @click="addPatient">加患者</button>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { ref } from 'vue';
|
|
import goImg from "@/static/go_big.png"
|
|
// 响应式数据
|
|
const pendingRequest = ref({
|
|
name: '陈新华',
|
|
message: '我是陈新华,在线上和您沟通过,请您同意我作为您的随访患者',
|
|
time: '2025-08-18 15:55:03'
|
|
});
|
|
|
|
const historyList = ref([
|
|
{
|
|
nickname: '韩夫臣',
|
|
message: '我是韩夫臣,在线上和您沟通过,请您...',
|
|
time: '2025-08-19 22:41:35'
|
|
},
|
|
{
|
|
nickname: '鲁保山',
|
|
message: '我是鲁保山,在线上和您沟通过,请您...',
|
|
time: '2025-08-19 22:41:27'
|
|
},
|
|
{
|
|
nickname: '蒋宁宁',
|
|
message: '我是蒋宁宁,在线上和您沟通过,请您...',
|
|
time: '2025-08-19 11:25:46'
|
|
},
|
|
{
|
|
nickname: '蒋宁',
|
|
message: '我是蒋宁,在线上和您沟通过,请您同...',
|
|
time: '2025-08-19 11:25:39'
|
|
}
|
|
]);
|
|
|
|
// 方法
|
|
const goBack = () => {
|
|
uni.navigateBack();
|
|
};
|
|
|
|
const rejectRequest = () => {
|
|
uni.showModal({
|
|
title: '确认拒绝',
|
|
content: '确定要拒绝陈新华的随访申请吗?',
|
|
success: (res) => {
|
|
if (res.confirm) {
|
|
uni.showToast({
|
|
title: '已拒绝申请',
|
|
icon: 'success'
|
|
});
|
|
// 这里可以调用API拒绝申请
|
|
}
|
|
}
|
|
});
|
|
};
|
|
|
|
const agreeRequest = () => {
|
|
uni.showModal({
|
|
title: '确认同意',
|
|
content: '确定要同意陈新华的随访申请吗?',
|
|
success: (res) => {
|
|
if (res.confirm) {
|
|
uni.showToast({
|
|
title: '已同意申请',
|
|
icon: 'success'
|
|
});
|
|
// 这里可以调用API同意申请
|
|
}
|
|
}
|
|
});
|
|
};
|
|
|
|
const addPatient = () => {
|
|
uni.showToast({
|
|
title: '跳转到添加患者页面',
|
|
icon: 'none'
|
|
});
|
|
// 这里可以跳转到添加患者页面
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.new-patient-page {
|
|
min-height: 100vh;
|
|
background-color: #f5f5f5;
|
|
}
|
|
|
|
.status-bar {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 10rpx 30rpx;
|
|
background-color: #ffffff;
|
|
font-size: 24rpx;
|
|
color: #333;
|
|
|
|
.status-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 20rpx;
|
|
|
|
.time {
|
|
font-weight: 500;
|
|
}
|
|
|
|
.status-icons {
|
|
display: flex;
|
|
gap: 10rpx;
|
|
|
|
.status-icon {
|
|
width: 32rpx;
|
|
height: 32rpx;
|
|
background-color: #ff0000;
|
|
color: #ffffff;
|
|
border-radius: 6rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 20rpx;
|
|
font-weight: normal;
|
|
}
|
|
}
|
|
}
|
|
|
|
.status-right {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 20rpx;
|
|
|
|
.network {
|
|
color: #666;
|
|
}
|
|
|
|
.wifi-icon {
|
|
width: 32rpx;
|
|
height: 24rpx;
|
|
background-color: #333;
|
|
border-radius: 2rpx;
|
|
}
|
|
|
|
.battery {
|
|
width: 40rpx;
|
|
height: 20rpx;
|
|
border: 2rpx solid #333;
|
|
border-radius: 4rpx;
|
|
background-color: #ff0000;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
|
|
.battery-text {
|
|
font-size: 20rpx;
|
|
color: #ffffff;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.header {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 20rpx 30rpx;
|
|
background-color: #ffffff;
|
|
border-bottom: 1rpx solid #f0f0f0;
|
|
|
|
.back-btn {
|
|
padding: 10rpx;
|
|
}
|
|
|
|
.title {
|
|
flex: 1;
|
|
text-align: center;
|
|
font-size: 36rpx;
|
|
font-weight: normal;
|
|
color: #ff0000;
|
|
margin-right: 60rpx; // 为了保持标题居中
|
|
}
|
|
}
|
|
|
|
.reminder-section {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
padding: 30rpx;
|
|
background-color: #ffffff;
|
|
margin-bottom: 20rpx;
|
|
|
|
.reminder-icon {
|
|
margin-right: 20rpx;
|
|
margin-top: 4rpx;
|
|
}
|
|
|
|
.reminder-text {
|
|
flex: 1;
|
|
font-size: 28rpx;
|
|
color: #333;
|
|
line-height: 1.5;
|
|
}
|
|
}
|
|
|
|
.follow-up-section {
|
|
background-color: #ffffff;
|
|
margin-bottom: 20rpx;
|
|
|
|
.section-title {
|
|
padding: 30rpx 30rpx 20rpx;
|
|
font-size: 32rpx;
|
|
font-weight: normal;
|
|
color: #333;
|
|
border-bottom: 1rpx solid #f0f0f0;
|
|
}
|
|
|
|
.pending-request {
|
|
padding: 30rpx;
|
|
|
|
.request-item {
|
|
display: flex;
|
|
gap: 20rpx;
|
|
|
|
.avatar {
|
|
width: 80rpx;
|
|
height: 80rpx;
|
|
background-color: #ffb6c1;
|
|
border-radius: 12rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
|
|
.avatar-icon {
|
|
width: 40rpx;
|
|
height: 40rpx;
|
|
background-color: #ffffff;
|
|
border-radius: 50%;
|
|
}
|
|
}
|
|
|
|
.request-content {
|
|
flex: 1;
|
|
|
|
.request-text {
|
|
font-size: 28rpx;
|
|
color: #333;
|
|
line-height: 1.4;
|
|
margin-bottom: 20rpx;
|
|
}
|
|
|
|
.request-time {
|
|
font-size: 24rpx;
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
color: #333;
|
|
margin-bottom: 10rpx;
|
|
}
|
|
|
|
.action-buttons {
|
|
display: flex;
|
|
justify-content: center;
|
|
|
|
gap:60rpx;
|
|
.reject-btn {
|
|
|
|
width:180rpx;
|
|
height: 70rpx;
|
|
border: 2rpx solid #8B2316;
|
|
background-color: #ffffff;
|
|
color: #8B2316;
|
|
padding:0;
|
|
border-radius: 10rpx;
|
|
font-size: 28rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin: 0;
|
|
}
|
|
|
|
.agree-btn {
|
|
margin: 0;
|
|
width:180rpx;
|
|
padding:0;
|
|
height: 70rpx;
|
|
background-color: #8B2316;
|
|
color: #ffffff;
|
|
border: none;
|
|
border-radius: 10rpx;
|
|
font-size: 28rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.history-section {
|
|
background-color: #ffffff;
|
|
margin-bottom: 120rpx; // 为底部按钮留出空间
|
|
|
|
.section-title {
|
|
padding: 30rpx 30rpx 20rpx;
|
|
font-size: 32rpx;
|
|
font-weight: normal;
|
|
color: #333;
|
|
border-bottom: 1rpx solid #f0f0f0;
|
|
}
|
|
|
|
.history-list {
|
|
padding-bottom: 100rpx;
|
|
.history-item {
|
|
display: flex;
|
|
gap: 20rpx;
|
|
padding: 30rpx;
|
|
border-bottom: 1rpx solid #f0f0f0;
|
|
|
|
&:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.avatar {
|
|
width: 80rpx;
|
|
height: 80rpx;
|
|
background-color: #ffb6c1;
|
|
border-radius: 12rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
|
|
.avatar-icon {
|
|
width: 40rpx;
|
|
height: 40rpx;
|
|
background-color: #ffffff;
|
|
border-radius: 50%;
|
|
}
|
|
}
|
|
|
|
.history-content {
|
|
flex: 1;
|
|
|
|
.nickname {
|
|
font-size: 28rpx;
|
|
font-weight: normal;
|
|
color: #8B2316;
|
|
margin-bottom: 10rpx;
|
|
}
|
|
|
|
.history-text {
|
|
font-size: 28rpx;
|
|
color: #333;
|
|
line-height: 1.4;
|
|
margin-bottom: 20rpx;
|
|
}
|
|
|
|
.status-info {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
gap: 10rpx;
|
|
margin-bottom: 10rpx;
|
|
|
|
.status-arrow {
|
|
width: 0;
|
|
height: 0;
|
|
border-left: 8rpx solid transparent;
|
|
border-right: 8rpx solid transparent;
|
|
border-bottom: 12rpx solid #999;
|
|
transform: rotate(45deg);
|
|
}
|
|
|
|
.status-text {
|
|
font-size: 30rpx;
|
|
color: #999;
|
|
}
|
|
}
|
|
|
|
.history-time {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
font-size: 24rpx;
|
|
color: #333;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.bottom-button {
|
|
position: fixed;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
|
|
background-color: #ffffff;
|
|
border-top: 1rpx solid #f0f0f0;
|
|
|
|
.add-patient-btn {
|
|
width: 100%;
|
|
height: 100rpx;
|
|
background-color: #00cac1;
|
|
color: #ffffff;
|
|
border: none;
|
|
border-radius: 0rpx;
|
|
font-size: 32rpx;
|
|
font-weight: normal;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
}
|
|
</style>
|