This commit is contained in:
左哥 2025-07-16 22:22:55 +08:00
parent b19ebb14ea
commit a74c9750e6
9 changed files with 143 additions and 116 deletions

View File

@ -77,6 +77,7 @@ Page({
// 加载更多数据 // 加载更多数据
async loadMore() { async loadMore() {
console.log('loadMore');
if (this.data.hasMore && !this.data.loading) { if (this.data.hasMore && !this.data.loading) {
this.setData({ this.setData({
page: this.data.page + 1 page: this.data.page + 1

View File

@ -1,8 +1,9 @@
.page { .page {
background-color: rgba(248,248,248,1.000000); background-color: rgba(248,248,248,1.000000);
position: relative; position: relative;
height: 100vh;
padding: 0 28rpx; overflow: hidden;
} }
.image_3 { .image_3 {
@ -14,10 +15,17 @@
z-index: 0; z-index: 0;
} }
.box_1 { .box_1 {
background-size: 100% 100%; // background-size: 100% 100%;
padding-bottom: 60rpx; // padding-bottom: 60rpx;
box-sizing: border-box;
position: relative; position: relative;
z-index: 1; z-index: 1;
height: 100%;
padding-top: 12rpx;
.scroll-view-box{
padding: 0 28rpx;
padding-bottom: 160rpx;
}
} }
.image_1 { .image_1 {
height: 88rpx; height: 88rpx;
@ -45,7 +53,6 @@
.box_3 { .box_3 {
background-color: rgba(255,255,255,1.000000); background-color: rgba(255,255,255,1.000000);
border-radius: 40rpx; border-radius: 40rpx;
margin-top: 36rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 10rpx 10rpx 10rpx 24rpx; padding: 10rpx 10rpx 10rpx 24rpx;
@ -197,11 +204,12 @@ border-radius: 30rpx;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
padding: 40rpx 0; padding: 40rpx 0;
padding-top: 26rpx;
} }
.no-more-text { .no-more-text {
color: rgba(96,98,102,1); color: rgba(96,98,102,1);
font-size: 28rpx; font-size: 24rpx;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
} }

View File

@ -1,39 +1,31 @@
<view class="page"> <view class="page">
<image src="https://image-fudan.oss-cn-beijing.aliyuncs.com/mini_images/my/my-top-bg.png" class="image_3" mode="widthFix"></image> <image src="https://image-fudan.oss-cn-beijing.aliyuncs.com/mini_images/my/my-top-bg.png" class="image_3" mode="widthFix"></image>
<t-navbar <t-navbar t-class-placeholder="t-navbar-placeholder" t-class-content="t-navbar-content" class="block" title="健康教育" left-arrow bind:go-back="handleBack" />
t-class-placeholder="t-navbar-placeholder" <scroll-view scroll-y="{{true}}" class="box_1" bindscrolltolower="loadMore">
t-class-content="t-navbar-content" <view class="scroll-view-box">
class="block" <view class="box_3">
title="健康教育" <input class="text_2" value="{{searchKeyword}}" placeholder="请输入搜索关键词" bindinput="onSearchInput" bindconfirm="onSearch"></input>
left-arrow <view class="image-wrapper_1" bindtap="onSearch">
bind:go-back="handleBack" <text class="iconfont icon-sousuo thumbnail_1"></text>
/> </view>
<view class="box_1"> </view>
<view class="box_5" wx:for="{{articles}}" wx:key="id" bind:tap="preview" data-index="{{index}}">
<view class="box_3"> <view lines="1" class="text_5">{{item.title}}</view>
<input class="text_2" value="{{searchKeyword}}" placeholder="请输入搜索关键词" bindinput="onSearchInput" bindconfirm="onSearch"></input> <view class="box_6">
<view class="image-wrapper_1" bindtap="onSearch"> <text lines="1" decode="true" class="text_6">{{item.contentText}}</text>
<text class="iconfont icon-sousuo thumbnail_1"></text> <view class="box_7"></view>
</view>
</view>
<!-- 加载状态和分页提示 -->
<view class="loading-container" wx:if="{{loading}}">
<text class="loading-text">加载中...</text>
</view>
<view class="no-more-container" wx:if="{{!hasMore && articles.length > 0}}">
<text class="no-more-text">没有更多数据了</text>
</view>
<view class="empty-container" wx:if="{{!loading && articles.length === 0}}">
<text class="empty-text">暂无相关文章</text>
</view> </view>
</view> </view>
<view class="box_5" wx:for="{{articles}}" wx:key="id" bind:tap="preview" data-index="{{index}}"> </scroll-view>
<view lines="1" class="text_5">{{item.title}}</view>
<view class="box_6">
<text lines="1" decode="true" class="text_6">{{item.contentText}}</text>
<view class="box_7"></view>
</view>
</view>
<!-- 加载状态和分页提示 -->
<view class="loading-container" wx:if="{{loading}}">
<text class="loading-text">加载中...</text>
</view>
<view class="no-more-container" wx:if="{{!hasMore && articles.length > 0}}">
<text class="no-more-text">没有更多数据了</text>
</view>
<view class="empty-container" wx:if="{{!loading && articles.length === 0}}">
<text class="empty-text">暂无相关文章</text>
</view>
</view>
</view> </view>

View File

@ -192,6 +192,7 @@ Page({
}, },
planId:'', planId:'',
questionnaire_id: '',
async toQuestionnaire() { async toQuestionnaire() {
let valid = true; let valid = true;
// 必填项校验 // 必填项校验
@ -225,7 +226,7 @@ Page({
data.nutritional_indicator_image = data.nutritional_indicator_image.length > 0 ? data.nutritional_indicator_image.join(',') : '' data.nutritional_indicator_image = data.nutritional_indicator_image.length > 0 ? data.nutritional_indicator_image.join(',') : ''
data.is_have_cyst = data.is_have_cyst ? Number(data.is_have_cyst) : 0 data.is_have_cyst = data.is_have_cyst ? Number(data.is_have_cyst) : 0
data.is_have_ascites = data.is_have_ascites ? Number(data.is_have_ascites) : 0 data.is_have_ascites = data.is_have_ascites ? Number(data.is_have_ascites) : 0
await request('patient/follow_questionnaire', 'post',{plan_id: Number(this.planId), questionnaire_id: Number(this.planId), ...data}) await request('patient/follow_questionnaire', 'post',{plan_id: Number(this.planId), questionnaire_id: Number(this.questionnaire_id), ...data})
wx.showToast({ wx.showToast({
title: '提交成功', title: '提交成功',
icon: 'success', icon: 'success',
@ -376,15 +377,19 @@ Page({
*/ */
onLoad(options) { onLoad(options) {
this.planId = options.planId this.planId = options.planId
this.questionnaire_id = options.questionnaire_id
this.setData({ this.setData({
['form.follow_name']: options.name, ['form.follow_name']: options.name,
['form.follow_date']: options.time ['form.follow_date']: options.time
}) })
this.getDetail() console.log(options)
if(options.questionnaire_id != 0){
this.getDetail()
}
}, },
async getDetail(){ async getDetail(){
const res = await request('patient/questionnaire_info', 'post',{patient_id : 0, questionnaire_id: Number(this.planId)}) const res = await request('patient/questionnaire_info', 'post',{patient_id : 0, questionnaire_id: Number(this.questionnaire_id)})
const data = res const data = res
data.liver_function_image = data.liver_function_image ? data.liver_function_image.split(',') : [] data.liver_function_image = data.liver_function_image ? data.liver_function_image.split(',') : []
data.b_mode_image = data.b_mode_image ? data.b_mode_image.split(',') : [] data.b_mode_image = data.b_mode_image ? data.b_mode_image.split(',') : []

View File

@ -101,15 +101,16 @@ Page({
}, },
toQuestionnaire(e) { toQuestionnaire(e) {
const { id, time, name } = e.currentTarget.dataset const { item } = e.currentTarget.dataset
console.log(item)
wx.navigateTo({ wx.navigateTo({
url: `/pages/followUp/index?planId=${id}&name=${name}&time=${time}` , url: `/pages/followUp/index?planId=${item.id}&name=${item.plan_name}&time=${item.plan_date}&questionnaire_id=${item.questionnaire_id}` ,
}) })
}, },
goQuestionnaire(e) { goQuestionnaire(e) {
const data = this.data.dataList[0] const data = this.data.dataList[0]
wx.navigateTo({ wx.navigateTo({
url: `/pages/followUp/index?planId=${data.id}&name=${data.plan_name}&time=${data.plan_date}` , url: `/pages/followUp/index?planId=${data.id}&name=${data.plan_name}&time=${data.plan_date}&questionnaire_id=${data.questionnaire_id}` ,
}) })
}, },
toRegister() { toRegister() {

View File

@ -1,9 +1,22 @@
/* pages/clockIn/index.wxss */ /* pages/clockIn/index.wxss */
.clockin{ .clockin {
padding: 28rpx; // padding-bottom: 130rpx;
padding-bottom: 130rpx;
position: relative; position: relative;
.clockin-img{ height: 100vh;
overflow: hidden;
scroll-view {
height: 100%;
box-sizing: border-box;
padding-top: 12rpx;
.scroll-view-box {
padding: 28rpx;
padding-top: 0px;
padding-bottom: 280rpx;
}
}
.clockin-img {
position: absolute; position: absolute;
width: 100%; width: 100%;
@ -11,10 +24,12 @@
top: 0; top: 0;
left: 0; left: 0;
} }
.new-time{
.new-time {
font-size: 28rpx; font-size: 28rpx;
} }
.clockin-item{
.clockin-item {
margin-bottom: 28rpx; margin-bottom: 28rpx;
background-color: #fff; background-color: #fff;
border-radius: 20rpx; border-radius: 20rpx;
@ -22,7 +37,8 @@
position: relative; position: relative;
overflow: hidden; overflow: hidden;
z-index: 1; z-index: 1;
.margin-16{
.margin-16 {
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
@ -34,57 +50,66 @@
padding: 0 24rpx; padding: 0 24rpx;
font-size: 26rpx; font-size: 26rpx;
} }
.success{
.success {
color: #00B095; color: #00B095;
background: rgba(0, 176, 149, 0.1); background: rgba(0, 176, 149, 0.1);
} }
.primary{
.primary {
color: var(--td-brand-color); color: var(--td-brand-color);
background: rgba(237, 243, 248, 1); background: rgba(237, 243, 248, 1);
} }
.item-top{
.item-top {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 10rpx; margin-bottom: 10rpx;
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
.active{ .active {
color: var(--td-brand-color); color: var(--td-brand-color);
} }
} }
.medicine-name{
.medicine-name {
font-weight: bold; font-weight: bold;
margin-bottom: 12rpx; margin-bottom: 12rpx;
} }
.dose{
.dose {
font-size: 28rpx; font-size: 28rpx;
// margin-bottom: 30rpx; // margin-bottom: 30rpx;
color: #909399; color: #909399;
} }
.t-button{
.t-button {
margin-top: 30rpx; margin-top: 30rpx;
} }
} }
.footer-example{
.footer-example {
position: fixed; position: fixed;
bottom: 40rpx; bottom: 30rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
width: 100%; width: 100%;
left: 0; left: 0;
z-index: 2; z-index: 2;
view{
view {
width: 246rpx; width: 246rpx;
height: 82rpx; height: 82rpx;
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0rpx 2rpx 14rpx 0rpx rgba(0,91,162,0.08); box-shadow: 0rpx 2rpx 14rpx 0rpx rgba(0, 91, 162, 0.08);
border-radius: 40rpx; border-radius: 40rpx;
line-height: 82rpx; line-height: 82rpx;
text-align: center; text-align: center;
font-size: 30rpx; font-size: 30rpx;
color: #222222; color: #222222;
text{
text {
font-size: 40rpx; font-size: 40rpx;
color: var(--td-brand-color); color: var(--td-brand-color);
vertical-align: middle; vertical-align: middle;
@ -104,9 +129,10 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background: linear-gradient( 152deg, #FF7954 0%, #D43030 100%); background: linear-gradient(152deg, #FF7954 0%, #D43030 100%);
box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(236,89,68,0.21); box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(236, 89, 68, 0.21);
text{
text {
color: #fff; color: #fff;
font-size: 48rpx; font-size: 48rpx;
} }

View File

@ -1,38 +1,36 @@
<!--pages/clockIn/index.wxml--> <!-- pages/clockIn/index.wxml -->
<view class="clockin"> <view class="clockin">
<image src="https://image-fudan.oss-cn-beijing.aliyuncs.com/mini_images/my/my-top-bg.png" mode="aspectFill" class="clockin-img"></image> <image src="https://image-fudan.oss-cn-beijing.aliyuncs.com/mini_images/my/my-top-bg.png" mode="aspectFill" class="clockin-img"></image>
<t-navbar <t-navbar t-class-placeholder="t-navbar-placeholder" t-class-content="t-navbar-content" class="block" title="随访计划" />
t-class-placeholder="t-navbar-placeholder" <scroll-view scroll-y="{{true}}">
t-class-content="t-navbar-content" <view class="scroll-view-box">
class="block" <view class="clockin-item" wx:for="{{dataList}}" wx:key="id">
title="随访计划" <view class="margin-16 success" wx:if="{{item.status == 2}}">已完成</view>
/> <view class="margin-16" wx:if="{{item.status == 1}}">未开始</view>
<view class="clockin-item" wx:for="{{dataList}}" wx:key="id"> <view class="margin-16 primary" wx:if="{{item.status == 3}}">
<view class="margin-16 success" wx:if="{{item.status == 2}}">已完成</view> 待开始
<view class="margin-16" wx:if="{{item.status == 1}}">未开始</view> <text>{{item.diffDays}}天后</text>
<view class="margin-16 primary" wx:if="{{item.status == 3}}"> </view>
待开始 <view class="item-top">
<text>{{item.diffDays}}天后</text> <text>{{item.plan_date}}</text>
</view>
<view class="dose">{{item.plan_name}}</view>
<t-button theme="primary" variant="outline" block bindtap="toQuestionnaire" data-item="{{item}}" wx:if="{{item.status == 2}}">
填写随访问卷
</t-button>
<t-button bindtap="toRegister" theme="primary" block wx:if="{{item.status == 3}}">
预约挂号
</t-button>
</view>
</view> </view>
<view class="item-top"> </scroll-view>
<text>{{item.plan_date}}</text>
</view>
<view class="dose">{{item.plan_name}}</view>
<t-button theme="primary" variant="outline" block bindtap="toQuestionnaire" data-id="{{item.id}}" data-time="{{item.plan_date}}" data-name="{{item.plan_name}}" wx:if="{{item.status == 2}}">填写随访问卷</t-button>
<t-button bindtap="toRegister" theme="primary" block wx:if="{{item.status == 3}}">预约挂号</t-button>
</view>
<view class="footer-example" wx:if="{{planId}}"> <view class="footer-example" wx:if="{{planId}}">
<view bindtap="goQuestionnaire" data-id="{{planId}}" > <view bindtap="goQuestionnaire" data-id="{{planId}}">
<text class="iconfont icon-zengjiatianjiajiahao"></text> <text class="iconfont icon-zengjiatianjiajiahao"></text>
添加随访 添加随访
</view> </view>
</view> </view>
</view> </view>
<view class="emergency-access" bindtap="toEmergency"> <view class="emergency-access" bindtap="toEmergency">
<text class="iconfont icon-xiaoxi1" ></text> <text class="iconfont icon-xiaoxi1"></text>
</view> </view>

View File

@ -1,16 +1,26 @@
/* pages/therapeuticRegimen/index.wxss */ /* pages/therapeuticRegimen/index.wxss */
pages{
height: 100vh;
overflow: hidden;
}
.therapeuticRegimen{ .therapeuticRegimen{
box-sizing: border-box; box-sizing: border-box;
padding: 24rpx; // padding: 24rpx;
position: relative; position: relative;
height: calc(100vh - 110rpx); height: calc(100vh - 120rpx);
.scroll-view-box {
padding: 28rpx;
padding-bottom: 0;
// padding-top: 20rpx;
// padding-bottom: 280rpx;
}
.therapeuticRegimen-item{ .therapeuticRegimen-item{
padding: 28rpx; padding: 28rpx;
background-color: #fff; background-color: #fff;
border-radius: 24rpx; border-radius: 24rpx;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
margin-bottom: 28rpx;
.tab-text{ .tab-text{
position: absolute; position: absolute;
top: 0; top: 0;

View File

@ -1,21 +1,6 @@
<!--pages/therapeuticRegimen/index.wxml--> <!--pages/therapeuticRegimen/index.wxml-->
<scroll-view class="therapeuticRegimen" scroll-y> <scroll-view class="therapeuticRegimen" scroll-y>
<!-- <view class="therapeuticRegimen-item"> <view class="scroll-view-box">
<view class="time">
2024.10.01 至 2024.10.31
</view>
<text class="tab-text primary">进行中</text>
<view class="item-box">
<view class="image-box"></view>
<view class="details">
<view class="name">优思弗</view>
<view class="text">每日2次饭后服用</view>
</view>
<view class="yw-jl">500mg</view>
</view>
</view> -->
<view class="therapeuticRegimen-item" wx:for="{{list}}" wx:key="index" data-index="{{index}}" bind:tap="toPathDetails"> <view class="therapeuticRegimen-item" wx:for="{{list}}" wx:key="index" data-index="{{index}}" bind:tap="toPathDetails">
<view class="time"> <view class="time">
{{item.start_date}} 至 {{item.end_date}} {{item.start_date}} 至 {{item.end_date}}
@ -38,4 +23,5 @@
<view class="btn-box"> <view class="btn-box">
<t-button block theme="primary" bindtap="toPath">新增用药方案</t-button> <t-button block theme="primary" bindtap="toPath">新增用药方案</t-button>
</view> </view>
</view>
</scroll-view> </scroll-view>