8.26 17:41

This commit is contained in:
zoujiandong 2025-08-26 17:41:57 +08:00
parent b6120d9a40
commit ef5b3fb59f
15 changed files with 1331 additions and 55 deletions

View File

@ -0,0 +1,26 @@
<template>
<view class="emptybox">
<up-image :src="emptyImg" width="176rpx" height="204rpx" ></up-image>
<text class="empty-text">暂无数据</text>
</view>
</template>
<script setup>
import { ref } from 'vue';
import { onShow } from "@dcloudio/uni-app";
import emptyImg from "@/static/icon_empty.png"
</script>
<style scoped lang="scss">
.emptybox{
height:800rpx;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.empty-text{
font-size: 30rpx;
color:#999;
}
}
</style>

View File

@ -0,0 +1,38 @@
<template>
<!-- 顶部导航栏 -->
<uni-nav-bar
left-icon="left"
:title="title"
@clickLeft="goBack"
fixed
color="#8B2316"
height="140rpx"
:border="false"
backgroundColor="#eeeeee"
/>
</template>
<script setup>
import { ref } from 'vue';
import { onShow } from "@dcloudio/uni-app";
cosnt props=defineProps({
title:{
type:String,
default:''
}
})
//
const goBack = () => {
uni.navigateBack({
fail() {
uni.redirectTo({
url: '/pages/index/index'
});
}
});
};
</script>
<style scoped>
</style>

View File

@ -451,6 +451,36 @@
}
}
},
{
"path": "schedule/schedule",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "uni-app分页",
"app": {
"bounce": "none"
}
}
},
{
"path": "visit/visit",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "uni-app分页",
"app": {
"bounce": "none"
}
}
},
{
"path": "patientDetail/patientDetail",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "uni-app分页",
"app": {
"bounce": "none"
}
}
},
{
"path": "idcardAuth/idcardAuth",
"style": {

View File

@ -0,0 +1,137 @@
<template>
<view class="content">
<!-- 顶部导航栏 -->
<uni-nav-bar
left-icon="left"
title="患者详情"
@clickLeft="goBack"
fixed
color="#8B2316"
height="140rpx"
:border="false"
backgroundColor="#eeeeee"
>
<template #right>
<view class="nav-right" @click="editPatient">
<uni-icons type="compose" size="22" color="#8B2316"></uni-icons>
</view>
</template>
</uni-nav-bar>
<!-- 头部信息卡片 -->
<view class="card header-card">
<image class="avatar" src="/static/avatar-a.png" mode="aspectFill"></image>
<view class="base-info">
<view class="name-row">
<text class="name">aa</text>
<uni-icons type="person" size="20" color="#c0392b" style="margin-left: 8rpx;"></uni-icons>
</view>
<view class="line"><text class="label">昵称</text><text class="value">Android</text></view>
<view class="line"><text class="label">年龄</text><text class="value">23</text><text class="sep"></text><text class="label">民族</text><text class="value">未知</text></view>
<view class="line multi">
<text class="label">地区</text>
<text class="value">内蒙古自治区呼伦贝尔市莫力达瓦达斡尔族自治旗</text>
</view>
</view>
</view>
<!-- 功能分组条目 -->
<view class="cell" @click="openGroup" style="margin-top: 20rpx;">
<text class="cell-label">分组</text>
<view class="cell-right">
<text class="hint">分组了分组2</text>
<uni-icons type="right" color="#999" size="18"></uni-icons>
</view>
</view>
<view class="cell" @click="editDesc">
<text class="cell-label">描述</text>
<view class="cell-right">
<text class="hint">补充患者关键信息方便随访患者</text>
<uni-icons type="right" color="#999" size="18"></uni-icons>
</view>
</view>
<view class="cell">
<text class="cell-label">电话号码</text>
<view class="cell-right">
<text class="phone">18012345600</text>
</view>
</view>
<!-- 患者病史 -->
<view class="section-title">患者病史</view>
<view class="card history-card">
<text class="history-text" :class="{ fold: !showAllHistory }">{{ historyText }}</text>
<text class="toggle" @click="toggleHistory">{{ showAllHistory ? '收起' : '展开全部' }}</text>
</view>
<!-- 底部操作 -->
<view class="actions">
<view class="action" @click="sendMessage">
<up-image :src="msgImg" width="44rpx" height="44rpx" ></up-image>
<text class="action-text">发消息</text>
</view>
<view class="action" @click="goMakePlan">
<up-image :src="planImg" width="44rpx" height="44rpx" ></up-image>
<text class="action-text">制定随访计划</text>
</view>
<view class="action" @click="recordIllness">
<up-image :src="recordImg" width="44rpx" height="44rpx" ></up-image>
<text class="action-text">记录病情</text>
</view>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue'
import { onShow } from '@dcloudio/uni-app'
import msgImg from "@/static/icon_message_big.png"
import planImg from "@/static/image_backgrond_red_big1.png"
import recordImg from "@/static/image_backgrond_red_big.png"
const showAllHistory = ref(false)
const historyText = '2025年检查出戊型肝炎, 同时患有结核。有饮酒史、无吸烟史, 无输血或其他血液制品史, 使用过恩…'
const goBack = ()=> uni.navigateBack()
const editPatient = ()=> uni.showToast({ title:'编辑资料', icon:'none' })
const openGroup = ()=> uni.showToast({ title:'分组', icon:'none' })
const editDesc = ()=> uni.showToast({ title:'编辑描述', icon:'none' })
const sendMessage = ()=> uni.showToast({ title:'发消息', icon:'none' })
const goMakePlan = ()=> uni.navigateTo({ url:'/pages_app/visit/visit' })
const recordIllness = ()=> uni.showToast({ title:'记录病情', icon:'none' })
const toggleHistory = ()=> showAllHistory.value = !showAllHistory.value
</script>
<style lang="scss" scoped>
.content { background:#f5f5f5; min-height:100vh; }
.nav-right { padding-right: 20rpx; }
.card { background:#ffffff; padding: 20rpx; }
.header-card { display:flex; }
.avatar { width: 140rpx; height: 140rpx; border-radius: 12rpx; margin-right: 20rpx; }
.base-info { flex:1; }
.name-row { display:flex; align-items:center; margin-bottom: 10rpx; }
.name { font-size: 40rpx; color:#222; font-weight: 600; }
.line { font-size: 28rpx; color:#666; margin-top: 6rpx; display:flex; align-items:center; }
.label { color:#999;white-space: nowrap; }
.value { color:#333; }
.sep { color:#ddd; margin: 0 10rpx; }
.multi{
display: inline;
}
.cell { display:flex; align-items:center; justify-content:space-between; background:#ffffff; padding: 28rpx 30rpx; border-top:1rpx solid #efefef; }
.cell:first-of-type { margin-top: 10rpx; border-top:none; }
.cell-label { font-size: 28rpx; color:#333; }
.cell-right { display:flex; align-items:center; }
.hint { font-size: 28rpx; color:#999; margin-right: 12rpx; }
.phone { font-size: 32rpx; color:#b10000; }
.section-title { padding: 16rpx 30rpx; color:#8B2316; font-size: 30rpx; margin-top: 20rpx; }
.history-card { position: relative; }
.history-text { font-size: 28rpx; color:#666; line-height: 1.7; display:block; }
.history-text.fold { display:-webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.toggle { position:absolute; right: 20rpx; bottom: 16rpx; color:#b10000; font-size: 28rpx; }
.actions { background:#ffffff; margin-top: 20rpx;}
.action { display:flex; align-items:center;justify-content: center; padding: 28rpx 30rpx; border-top:1rpx solid #f0f0f0; }
.action-text { font-size:28rpx; color:#333; margin-left: 12rpx; }
</style>

View File

@ -20,7 +20,7 @@
</uni-nav-bar>
<!-- 消息列表区域 -->
<view class="message-list">
<view class="message-list" v-if="activeTab === 'message'">
<!-- 消息项 -->
<view class="message-item" @click="openMessage">
<view class="message-avatar">
@ -46,11 +46,102 @@
</view>
</view>
<!-- 患者列表区域 -->
<view class="patient-list" v-if="activeTab === 'list'">
<!-- 特殊操作项 -->
<view class="special-actions">
<view class="action-item" @click="addNewPatient">
<view class="action-icon new-patient">
<uni-icons type="person" size="24" color="#ffffff"></uni-icons>
<uni-icons type="plus" size="16" color="#ffffff" style="position: absolute; right: 8rpx; bottom: 8rpx;"></uni-icons>
</view>
<text class="action-text">新的患者</text>
<uni-icons type="right" size="20" color="#999"></uni-icons>
</view>
<view class="action-item" @click="managePatientGroups">
<view class="action-icon group-icon">
<view class="grid-icon">
<view class="grid-item"></view>
<view class="grid-item"></view>
<view class="grid-item"></view>
<view class="grid-item"></view>
</view>
</view>
<text class="action-text">患者分组 (随访5人)</text>
<uni-icons type="right" size="20" color="#999"></uni-icons>
</view>
</view>
<view class="listbox">
<!-- 使用 up-index-list 索引组件数据动态渲染 -->
<up-index-list :index-list="indexList" custom-nav-height="140rpx">
<template v-for="group in patientGroups" :key="group.letter">
<up-index-item >
<up-index-anchor :text="group.letter" />
<view class="group-section">
<view class="patient-item" v-for="item in group.items" :key="item.name" @click="openPatient(item.name)">
<template v-if="item.placeholder">
<view class="patient-avatar-placeholder">
<uni-icons type="person" size="32" color="#ffffff"></uni-icons>
</view>
</template>
<template v-else>
<image class="patient-avatar" :src="item.avatar" mode="aspectFill"></image>
</template>
<view class="patient-info">
<text class="patient-name">{{ item.name }}</text>
<view class="patient-badge" v-if="item.badge">
<text class="badge-text">{{ item.badge }}</text>
</view>
</view>
<view class="patient-status">
<uni-icons type="compose" size="20" color="#8B2316"></uni-icons>
<text class="follow-date">随访于{{ item.date }}</text>
</view>
</view>
</view>
</up-index-item>
</template>
</up-index-list>
</view>
</view>
<view class="plan" v-if="activeTab === 'plan'">
<empty></empty>
<!-- 悬浮添加按钮 -->
<view class="floating-add-btn" @click="showAddMenu">
<uni-icons type="plus" size="24" color="#ffffff"></uni-icons>
<text class="btn-text">添加</text>
</view>
<!-- 添加菜单弹窗 -->
<view class="add-menu-popup" v-if="showAddMenuFlag" @click="hideAddMenu">
<view class="menu-content" @click.stop>
<!-- 添加日程 -->
<view class="menu-item" @click="addSchedule">
<up-image :src="dayImg" width="34rpx" height="34rpx" ></up-image>
<text class="menu-text">添加日程</text>
</view>
<!-- 分割线 -->
<view class="menu-divider"></view>
<!-- 添加随访计划 -->
<view class="menu-item" @click="addFollowUpPlan">
<up-image :src="planImg" width="34rpx" height="34rpx" ></up-image>
<text class="menu-text">添加随访计划</text>
</view>
</view>
</view>
</view>
<!-- 底部标签栏 -->
<view class="tab-bar">
<view class="tab-item active" @click="switchTab('message')">
<text class="tab-text">患者消息</text>
<view class="tab-line"></view>
</view>
<view class="tab-item" @click="switchTab('list')">
<text class="tab-text">患者列表</text>
@ -62,9 +153,12 @@
</view>
</template>
<script setup>
import { ref } from 'vue';
import { ref, getCurrentInstance } from 'vue';
import { onShow } from "@dcloudio/uni-app";
import dayImg from "@/static/visit_data11.png"
import planImg from "@/static/visitplan.png"
//
const messageList = ref([
@ -79,6 +173,82 @@
//
const activeTab = ref('message');
const letters = ref(['A','C','E','L']);
const activeLetter = ref('A');
const scrollIntoViewId = ref('');
let scrollingByClick = false;
//
const showAddMenuFlag = ref(false);
// selectorQuery
const { proxy } = getCurrentInstance();
// up-index-list
const indexList = ref([]);
// - (rpxpx) - tab(100rpx->px) - (200rpx->px)
const groupsListHeight = ref(0);
const rpxToPx = (rpx) => {
const { screenWidth } = uni.getSystemInfoSync();
return Math.round((screenWidth / 750) * rpx);
};
const computeListHeight = () => {
const { windowHeight } = uni.getSystemInfoSync();
const reserved = rpxToPx(240); // 140rpx(nav) + 100rpx(tab)
groupsListHeight.value = Math.max(0, windowHeight - reserved);
};
//
const patientGroups = ref([]);
//
const rebuildIndexList = () => {
indexList.value = patientGroups.value.map(g => g.letter);
};
//
const generateMockDate = () => {
const start = new Date(2019, 0, 1).getTime();
const end = new Date().getTime();
const d = new Date(start + Math.random() * (end - start));
const y = d.getFullYear();
const m = `${d.getMonth() + 1}`.padStart(2, '0');
const day = `${d.getDate()}`.padStart(2, '0');
return `${y}-${m}-${day}`;
};
const generateMockGroups = () => {
const lettersPool = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');
const avatarSamples = ['/static/avatar-a.png','/static/avatar-l.png','/static/avatar-l2.png'];
const groups = [];
lettersPool.forEach((L) => {
// 0-3
const count = Math.floor(Math.random() * 3);
if (count === 0) return;
const items = Array.from({length: count}).map((_, i) => {
const usePlaceholder = Math.random() < 0.4;
return {
name: `${L}患者${i+1}`,
avatar: usePlaceholder ? '' : avatarSamples[Math.floor(Math.random()*avatarSamples.length)],
placeholder: usePlaceholder,
badge: Math.random() < 0.2 ? 'GOOD' : '',
date: generateMockDate()
};
});
groups.push({ letter: L, items });
});
return groups;
};
//
const loadMockGroups = () => {
uni.showLoading({ title: '加载中' });
setTimeout(() => {
patientGroups.value = generateMockGroups();
rebuildIndexList();
uni.hideLoading();
}, 300);
};
//
const goBack = () => {
@ -109,7 +279,7 @@
});
};
//
//
const switchTab = (tab) => {
activeTab.value = tab;
@ -118,10 +288,7 @@
//
break;
case 'list':
//
uni.navigateTo({
url: '/pages_app/myPatient/myPatient'
});
//
break;
case 'plan':
// 访
@ -133,9 +300,62 @@
}
};
//
const addNewPatient = () => {
uni.showToast({
title: '添加新患者',
icon: 'none'
});
};
//
const managePatientGroups = () => {
uni.showToast({
title: '管理患者分组',
icon: 'none'
});
};
//
const openPatient = (patientName) => {
uni.showToast({
title: `打开患者: ${patientName}`,
icon: 'none'
});
};
// 访
const addFollowUpPlan = () => {
showAddMenuFlag.value = false;
uni.navigateTo({
url: '/pages_app/visit/visit'
});
};
//
const addSchedule = () => {
uni.navigateTo({
url: '/pages_app/schedule/schedule'
});
};
//
const showAddMenu = () => {
showAddMenuFlag.value = true;
};
//
const hideAddMenu = () => {
showAddMenuFlag.value = false;
};
// 使 up-index-list
//
onShow(() => {
loadMessageList();
loadMockGroups();
computeListHeight();
});
//
@ -149,7 +369,8 @@
.content {
background-color: #f5f5f5;
min-height: 100vh;
}
}
//
.nav-right {
@ -286,4 +507,245 @@
}
}
}
//
.patient-list {
height:calc(100vh - 265rpx);
display: flex;
flex-direction:column;
background-color: #ffffff;
margin-top: 20rpx;
position: relative;
.listbox{
flex:1;
padding-bottom: 100rpx;
}
.groups-scroll {
display: none;
}
.special-actions {
background-color: #ffffff;
border-bottom: 1rpx solid #f0f0f0;
.action-item {
display: flex;
align-items: center;
padding: 30rpx;
border-bottom: 1rpx solid #f0f0f0;
&:last-child {
border-bottom: none;
}
.action-icon {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20rpx;
position: relative;
&.new-patient {
background-color: #8B2316;
}
&.group-icon {
background-color: #8B2316;
.grid-icon {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr;
gap: 2rpx;
width: 32rpx;
height: 32rpx;
.grid-item {
background-color: #ffffff;
border-radius: 2rpx;
}
}
}
}
.action-text {
flex: 1;
font-size: 32rpx;
color: #333333;
}
}
}
.letter-index {
position: fixed;
right: 10rpx;
top: 50%;
transform: translateY(-50%);
background-color: rgba(255, 255, 255, 0.9);
border-radius: 20rpx;
padding: 10rpx 5rpx;
z-index: 999;
.letter-item {
padding: 8rpx 12rpx;
font-size: 24rpx;
color: #666666;
text-align: center;
border-radius: 10rpx;
&.active {
color: #8B2316;
font-weight: 600;
}
&:active {
background-color: #f0f0f0;
}
}
}
}
.group-section {
.group-header {
padding: 20rpx 30rpx;
background-color: #f8f8f8;
font-size: 36rpx;
color: #666666;
font-weight: bold;
}
.patient-item {
display: flex;
align-items: center;
padding: 30rpx 80rpx 20rpx 30rpx;
border-bottom: 1rpx solid #f0f0f0;
background-color: #ffffff;
&:last-child {
border-bottom: none;
}
.patient-avatar,
.patient-avatar-placeholder {
width: 80rpx;
height: 80rpx;
border-radius: 10rpx;
margin-right: 20rpx;
display: flex;
align-items: center;
justify-content: center;
}
.patient-avatar-placeholder {
background-color: #ff6b6b;
}
.patient-info {
flex: 1;
.patient-name {
font-size: 32rpx;
color: #333333;
font-weight: 500;
margin-bottom: 8rpx;
}
.patient-badge {
background-color: #d4a574;
border-radius: 20rpx;
padding: 4rpx 12rpx;
display: inline-block;
.badge-text {
font-size: 20rpx;
color: #ffffff;
font-weight: 500;
}
}
}
.patient-status {
display: flex;
align-items: center;
.follow-date {
font-size: 24rpx;
color: #666666;
margin-left: 10rpx;
}
}
}
}
.floating-add-btn {
position: fixed;
bottom: 140rpx; /* Adjust based on nav-bar height */
right: 30rpx;
background-color: #8B2316;
border-radius: 50%;
width: 100rpx;
height: 100rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 999;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
.btn-text {
font-size: 20rpx;
color: #ffffff;
margin-top: 4rpx;
}
}
.add-menu-popup {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
.menu-content {
background-color: #ffffff;
border-radius: 20rpx;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.2);
width: 80%;
max-width: 400rpx;
overflow: hidden;
}
.menu-item {
display: flex;
align-items: center;
padding: 30rpx 40rpx;
border-bottom: 1rpx solid #f0f0f0;
&:last-child {
border-bottom: none;
}
.menu-text {
font-size: 32rpx;
color: #333333;
margin-left: 20rpx;
}
}
.menu-divider {
height: 1rpx;
background-color: #f0f0f0;
margin: 0 40rpx;
}
</style>

View File

@ -0,0 +1,378 @@
<template>
<view class="content">
<!-- 顶部导航栏 -->
<uni-nav-bar
left-icon="left"
title="添加日程"
@clickLeft="goBack"
fixed
color="#8B2316"
height="140rpx"
:border="false"
backgroundColor="#ffffff"
>
<template #right>
<view class="nav-right" @click="submitSchedule">
<text class="submit-text">提交</text>
</view>
</template>
</uni-nav-bar>
<!-- 主要内容区域 -->
<view class="main-content">
<!-- 患者选择 -->
<view class="form-section" @click="selectPatient">
<view class="section-label">
<text class="label-text">患者</text>
</view>
<view class="section-content">
<text class="content-text">{{ selectedPatient || '请选择患者' }}</text>
<uni-icons type="right" class ="icon" size="20" color="#999"></uni-icons>
</view>
</view>
<!-- 日期选择 -->
<view class="form-section " @click="selectDate" style="margin-top: 20rpx;">
<view class="section-label ">
<text class="label-text">日期</text>
</view>
<view class="section-content">
<text class="content-text">{{ selectedDate }}</text>
<uni-icons class ="icon" type="right" size="20" color="#999"></uni-icons>
</view>
</view>
<!-- 随访内容 -->
<view class="form-section content-section cloumn">
<view class="section-label">
<text class="label-text">随访内容</text>
</view>
<view class="content-input-area">
<textarea
class="content-textarea"
v-model="followUpContent"
placeholder="请输入随访内容"
:maxlength="500"
auto-height
></textarea>
</view>
</view>
<!-- 提醒选项 -->
<view class="reminder-section">
<!-- 提醒我 -->
<view class="reminder-item" @click="toggleRemindMe">
<text class="reminder-text">提醒我</text>
<view class="checkbox" :class="{ active: remindMe }">
<uni-icons v-if="remindMe" type="checkmarkempty" size="16" color="#ffffff"></uni-icons>
</view>
</view>
<!-- 提醒患者 -->
<view class="reminder-item" @click="toggleRemindPatient">
<text class="reminder-text">提醒患者</text>
<view class="checkbox" :class="{ active: remindPatient }">
<uni-icons v-if="remindPatient" type="checkmarkempty" size="16" color="#ffffff"></uni-icons>
</view>
</view>
</view>
</view>
<u-overlay :show="show">
<view class="warp">
<view class="calendarbox">
<view class="calendartop">
<view class="title">时间日期</view>
<view class="datebox">
<view class="year">2025</view>
<view class="day">11月22日周六</view>
</view>
</view>
<uni-calendar class="uni-calendar--hook" @change="change" @monthSwitch="monthSwitch" />
<view class="calendarbottom">
<view class="cancel" @click="show=false">取消</view>
<view class="ok">确定</view>
</view>
</view>
</view>
</u-overlay>
</view>
</template>
<script setup>
import { ref, onMounted } from 'vue';
import { onShow } from "@dcloudio/uni-app";
//
const show=ref(false);
const selectedPatient = ref('');
const selectedDate = ref('');
const followUpContent = ref('请于近日来院复诊、复查');
const remindMe = ref(false);
const remindPatient = ref(true);
//
const goBack = () => {
uni.navigateBack();
};
//
const submitSchedule = () => {
if (!selectedPatient.value) {
uni.showToast({
title: '请选择患者',
icon: 'none'
});
return;
}
uni.showToast({
title: '日程添加成功',
icon: 'success'
});
//
setTimeout(() => {
uni.navigateBack();
}, 1500);
};
//
const selectPatient = () => {
uni.showActionSheet({
itemList: ['张三', '李四', '王五', '赵六'],
success: (res) => {
selectedPatient.value = ['张三', '李四', '王五', '赵六'][res.tapIndex];
}
});
};
//
const selectDate = () => {
show.value=true;
// 使uni-datetime-picker
};
//
const toggleRemindMe = () => {
remindMe.value = !remindMe.value;
};
//
const toggleRemindPatient = () => {
remindPatient.value = !remindPatient.value;
};
//
onShow(() => {
initPage();
});
const change=(e)=>{
console.log('change 返回:', e)
};
const monthSwitch=(e)=>{
console.log('monthSwitchs 返回:', e)
}
//
const initPage = () => {
//
const today = new Date();
const year = today.getFullYear();
const month = today.getMonth() + 1;
const day = today.getDate();
const weekdays = ['日', '一', '二', '三', '四', '五', '六'];
const weekday = weekdays[today.getDay()];
selectedDate.value = `${year}${month}${day}日(星期${weekday})`;
};
</script>
<style lang="scss" scoped>
.warp {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
.calendarbox{
margin-top: 140rpx;
display: flex;
background-color: #ffffff;
flex-direction: column;
align-items: center;
justify-content: center;
:deep(.uni-calendar-item--checked){
background:#ff3346!important;
border-radius: 50%;
color:#fff;
}
:deep(.uni-calendar-item--isDay){
border-radius: 50%;
background:#ff3346!important;
}
.calendartop {
width:100%;
.title{
font-size:34rpx;
padding:20rpx 30rpx 8rpx;
}
.datebox{
background:#ff3346;
display: flex;
width:100%;
color:#fff;
font-size: 46rpx;
padding:20rpx 30rpx;
box-sizing:border-box;
align-items: center;
justify-content: center;
}
}
.calendarbottom{
color:#ff3346;
display: flex;
box-sizing:border-box;
padding:30rpx 40rpx 40rpx;
width:100%;
justify-content: flex-end;
.ok{
font-size: 28rpx;
margin-left: 40rpx;
}
.cancel{
font-size: 28rpx;
}
}
}
}
.content {
background-color: #f5f5f5;
min-height: 100vh;
}
/* 导航栏右侧按钮样式 */
.nav-right {
display: flex;
align-items: center;
}
.submit-text {
font-size: 32rpx;
color: #8B2316;
font-weight: 500;
}
/* 主要内容区域 */
.main-content {
margin-top: 20rpx;
}
/* 表单区域样式 */
.form-section {
display: flex;
background-color: #ffffff;
align-items: center;
justify-content:space-between;
padding: 30rpx;
border-bottom: 1rpx solid #f0f0f0;
&:last-child {
border-bottom: none;
}
&.content-section {
align-items: flex-start;
}
.section-label {
width: 160rpx;
flex-shrink: 0;
.label-text {
font-size: 32rpx;
color: #8B2316;
font-weight: 500;
}
}
.section-content {
flex: 1;
display: flex;
align-items: center;
justify-content: flex-end;
.content-text {
font-size: 32rpx;
color: #333333;
}
.icon{
margin-top: 8rpx;
}
}
.content-input-area {
flex: 1;
margin-top: 20rpx;
width:100%;
.content-textarea {
width: 100%;
min-height: 200rpx;
font-size: 32rpx;
color: #333333;
line-height: 1.5;
border: none;
outline: none;
resize: none;
}
}
}
.cloumn{
flex-direction: column;
}
/* 提醒选项区域 */
.reminder-section {
background-color: #ffffff;
margin-top: 20rpx;
.reminder-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx;
border-bottom: 1rpx solid #f0f0f0;
&:last-child {
border-bottom: none;
}
.reminder-text {
font-size: 32rpx;
color: #8B2316;
font-weight: 500;
}
.checkbox {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
border: 2rpx solid #cccccc;
display: flex;
align-items: center;
justify-content: center;
background-color: #ffffff;
&.active {
background-color: #8B2316;
border-color: #8B2316;
}
}
}
}
</style>

180
pages_app/visit/visit.vue Normal file
View File

@ -0,0 +1,180 @@
<template>
<view class="content">
<!-- 顶部导航栏 -->
<uni-nav-bar
left-icon="left"
title="添加随访计划"
@clickLeft="goBack"
fixed
color="#8B2316"
height="140rpx"
:border="false"
backgroundColor="#ffffff"
>
<template #right>
<view class="nav-right" @click="submitPlan">
<text class="submit-text">提交</text>
</view>
</template>
</uni-nav-bar>
<!-- 患者选择 -->
<view class="form-section" @click="selectPatient">
<view class="section-label"><text class="label-text">患者</text></view>
<view class="section-content">
<text class="content-text">{{ selectedPatient || '请选择患者' }}</text>
<uni-icons type="right" size="20" color="#999"></uni-icons>
</view>
</view>
<!-- 随访内容列表 -->
<view class="title-bar">随访内容</view>
<scroll-view class="visit-list" scroll-y scroll-with-animation :scroll-into-view="scrollIntoViewId">
<view class="visit-item" v-for="(item, idx) in visits" :key="item.id" :id="`visit-${item.id}`">
<view class="left">
<uni-icons type="close" size="20" :color="idx===0 ? '#cfcfcf' : '#c0392b'" @click="removeVisit(idx)"></uni-icons>
</view>
<view class="mid">
<text class="visit-text">{{ idx+1 }}.{{ defaultContent }}</text>
</view>
<view class="right" @click="pickDate(idx)">
<text class="date-text">{{ item.date }}</text>
<uni-icons type="right" size="20" color="#999"></uni-icons>
</view>
</view>
</scroll-view>
<!-- 添加随访日程按钮 -->
<view class="add-row" @click="addVisit">
<text class="plus"></text>
<text class="add-text">添加随访日程</text>
</view>
<!-- 提醒开关 -->
<view class="reminder-section">
<view class="reminder-item" @click="toggleRemindMe">
<text class="reminder-text">提醒我</text>
<view class="checkbox" :class="{ active: remindMe }">
<uni-icons v-if="remindMe" type="checkmarkempty" size="16" color="#ffffff"></uni-icons>
</view>
</view>
<view class="reminder-item" @click="toggleRemindPatient">
<text class="reminder-text">提醒患者</text>
<view class="checkbox" :class="{ active: remindPatient }">
<uni-icons v-if="remindPatient" type="checkmarkempty" size="16" color="#ffffff"></uni-icons>
</view>
</view>
</view>
</view>
</template>
<script setup>
import { ref,nextTick } from 'vue';
import { onShow } from "@dcloudio/uni-app";
const selectedPatient = ref('');
const defaultContent = '请近日来医院复诊、复查';
const visits = ref([
{ id: 1, date: formatDate(new Date()) },
{ id: 2, date: formatDate(addMonths(new Date(), 6)) },
{ id: 3, date: formatDate(addMonths(new Date(), 12)) },
{ id: 4, date: formatDate(addMonths(new Date(), 24)) }
]);
const remindMe = ref(false);
const remindPatient = ref(true);
const scrollIntoViewId = ref('');
function formatDate(d){
const y=d.getFullYear();
const m=`${d.getMonth()+1}`.padStart(2,'0');
const day=`${d.getDate()}`.padStart(2,'0');
const w=['日','一','二','三','四','五','六'][d.getDay()];
return `${y}.${m}.${day}(星期${w})`;
}
function addMonths(d, m){
const nd=new Date(d);
nd.setMonth(nd.getMonth()+m);
return nd;
}
const goBack=()=>uni.navigateBack();
const submitPlan=()=>{
uni.showToast({ title: '已提交', icon: 'success' });
setTimeout(()=>uni.navigateBack(),1000);
};
const selectPatient=()=>{
uni.showActionSheet({
itemList:['张三','李四','王五','赵六'],
success:(res)=>{ selectedPatient.value=['张三','李四','王五','赵六'][res.tapIndex]; }
});
};
const addVisit=()=>{
const id= Date.now();
visits.value.push({ id, date: formatDate(new Date()) });
//
nextTick(()=>{ scrollIntoViewId.value = `visit-${id}`; });
};
const removeVisit=(idx)=>{
if(idx===0) return; //
visits.value.splice(idx,1);
};
const pickDate=(idx)=>{
uni.showDatePicker({
mode:'date',
value:new Date().toISOString().split('T')[0],
success:(res)=>{
visits.value[idx].date = formatDate(new Date(res.value));
}
});
};
const toggleRemindMe=()=>{ remindMe.value=!remindMe.value; };
const toggleRemindPatient=()=>{ remindPatient.value=!remindPatient.value; };
onShow(()=>{});
</script>
<style lang="scss" scoped>
.content {
background-color: #f5f5f5;
min-height: 100vh;
}
.nav-right { display: flex; align-items: center; }
.submit-text { font-size: 32rpx; color: #8B2316; font-weight: 500; }
.form-section {
margin-top: 20rpx;
display: flex; align-items: center; justify-content: space-between;
padding: 30rpx; background: #ffffff; border-bottom: 1rpx solid #f0f0f0;
.section-label { width: 160rpx; flex-shrink: 0; }
.label-text { font-size: 32rpx; color: #8B2316; font-weight: 500; }
.section-content { display: flex; align-items: center; }
.content-text { font-size: 32rpx; color:#333; }
}
.title-bar { padding: 20rpx 30rpx; color:#8B2316; font-size: 32rpx; background:#ffffff; margin-top: 20rpx; border-top: 1rpx solid #f0f0f0; border-bottom: 1rpx solid #f0f0f0; }
.visit-list {
/* 让列表在可视区域内滚动 */
height: 400rpx;
background-color: #ffffff;
}
.visit-item { box-sizing:border-box;display:flex; align-items:center; padding: 26rpx 30rpx; border-bottom:1rpx solid #f0f0f0; }
.visit-item .left { width: 60rpx; display:flex; justify-content:center; }
.visit-item .mid { flex:1; }
.visit-text { font-size: 30rpx; color:#333; display: inline-block;white-space: nowrap;width:80%;overflow: hidden;}
.visit-item .right { flex:1;display:flex; align-items:center; }
.date-text { display: inline-block;white-space: nowrap; font-size: 30rpx; color:#333; margin-right: 10rpx; }
.add-row { display:flex; align-items:center; padding: 26rpx 30rpx; background:#ffffff; margin-top: 20rpx; }
.plus { color:#8B2316; font-size: 36rpx; margin-right: 14rpx; }
.add-text { color:#8B2316; font-size: 32rpx; }
.reminder-section { background:#ffffff; margin-top: 20rpx; }
.reminder-item { display:flex; align-items:center; justify-content:space-between; padding: 30rpx; border-bottom:1rpx solid #f0f0f0; }
.reminder-item:last-child { border-bottom:none; }
.reminder-text { font-size: 32rpx; color:#8B2316; font-weight: 500; }
.checkbox { width: 40rpx; height: 40rpx; border-radius: 50%; border: 2rpx solid #cccccc; display:flex; align-items:center; justify-content:center; background:#ffffff; }
.checkbox.active { background:#8B2316; border-color:#8B2316; }
</style>

BIN
static/icon_message_big.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/visit_data11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
static/visitplan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -1,3 +1,5 @@
## 2.0.112025-08-18
- 修复 图标点击事件返回
## 2.0.92024-01-12
fix: 修复图标大小默认值错误的问题
## 2.0.82023-12-14

View File

@ -85,8 +85,8 @@
}
},
methods: {
_onClick() {
this.$emit('click')
_onClick(e) {
this.$emit('click', e)
}
}
}
@ -107,4 +107,4 @@
text-decoration: none;
text-align: center;
}
</style>
</style>

View File

@ -1,7 +1,7 @@
{
"id": "uni-icons",
"displayName": "uni-icons 图标",
"version": "2.0.9",
"version": "2.0.11",
"description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
"keywords": [
"uni-ui",
@ -11,12 +11,14 @@
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": "^3.2.14"
"HBuilderX": "^3.2.14",
"uni-app": "^4.08",
"uni-app-x": "^4.61"
},
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
@ -34,55 +36,76 @@
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue"
"type": "component-vue",
"darkmode": "x",
"i18n": "x",
"widescreen": "x"
},
"uni_modules": {
"dependencies": ["uni-scss"],
"dependencies": [
"uni-scss"
],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
"tcb": "x",
"aliyun": "x",
"alipay": "x"
},
"client": {
"App": {
"app-vue": "y",
"app-nvue": "y",
"app-uvue": "y"
"uni-app": {
"vue": {
"vue2": "√",
"vue3": "√"
},
"web": {
"safari": "√",
"chrome": "√"
},
"app": {
"vue": "√",
"nvue": "√",
"android": {
"extVersion": "",
"minVersion": "29"
},
"ios": "√",
"harmony": "√"
},
"mp": {
"weixin": "√",
"alipay": "√",
"toutiao": "√",
"baidu": "√",
"kuaishou": "-",
"jd": "-",
"harmony": "-",
"qq": "√",
"lark": "-"
},
"quickapp": {
"huawei": "√",
"union": "√"
}
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "y",
"百度": "y",
"字节跳动": "y",
"QQ": "y",
"钉钉": "y",
"快手": "y",
"飞书": "y",
"京东": "y"
},
"快应用": {
"华为": "y",
"联盟": "y"
},
"Vue": {
"vue2": "y",
"vue3": "y"
"uni-app-x": {
"web": {
"safari": "√",
"chrome": "√"
},
"app": {
"android": {
"extVersion": "",
"minVersion": "29"
},
"ios": "√",
"harmony": "√"
},
"mp": {
"weixin": "√"
}
}
}
}
}
}
}