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;
overflow: hidden;
padding: 0 28rpx;
} }
.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,15 +1,8 @@
<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"
title="健康教育"
left-arrow
bind:go-back="handleBack"
/>
<view class="box_1">
<view class="box_3"> <view class="box_3">
<input class="text_2" value="{{searchKeyword}}" placeholder="请输入搜索关键词" bindinput="onSearchInput" bindconfirm="onSearch"></input> <input class="text_2" value="{{searchKeyword}}" placeholder="请输入搜索关键词" bindinput="onSearchInput" bindconfirm="onSearch"></input>
<view class="image-wrapper_1" bindtap="onSearch"> <view class="image-wrapper_1" bindtap="onSearch">
@ -23,7 +16,6 @@
<view class="box_7"></view> <view class="box_7"></view>
</view> </view>
</view> </view>
<!-- 加载状态和分页提示 --> <!-- 加载状态和分页提示 -->
<view class="loading-container" wx:if="{{loading}}"> <view class="loading-container" wx:if="{{loading}}">
<text class="loading-text">加载中...</text> <text class="loading-text">加载中...</text>
@ -35,5 +27,5 @@
<text class="empty-text">暂无相关文章</text> <text class="empty-text">暂无相关文章</text>
</view> </view>
</view> </view>
</scroll-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
}) })
console.log(options)
if(options.questionnaire_id != 0){
this.getDetail() 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,8 +1,21 @@
/* pages/clockIn/index.wxss */ /* pages/clockIn/index.wxss */
.clockin { .clockin {
padding: 28rpx; // padding-bottom: 130rpx;
padding-bottom: 130rpx;
position: relative; position: relative;
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 { .clockin-img {
position: absolute; position: absolute;
@ -11,9 +24,11 @@
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;
@ -22,6 +37,7 @@
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;
@ -34,14 +50,17 @@
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;
@ -53,27 +72,32 @@
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;
@ -84,6 +108,7 @@
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);
@ -106,6 +131,7 @@
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,12 +1,9 @@
<!-- 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"
title="随访计划"
/>
<view class="clockin-item" wx:for="{{dataList}}" wx:key="id"> <view class="clockin-item" wx:for="{{dataList}}" wx:key="id">
<view class="margin-16 success" wx:if="{{item.status == 2}}">已完成</view> <view class="margin-16 success" wx:if="{{item.status == 2}}">已完成</view>
<view class="margin-16" wx:if="{{item.status == 1}}">未开始</view> <view class="margin-16" wx:if="{{item.status == 1}}">未开始</view>
@ -16,23 +13,24 @@
</view> </view>
<view class="item-top"> <view class="item-top">
<text>{{item.plan_date}}</text> <text>{{item.plan_date}}</text>
</view> </view>
<view class="dose">{{item.plan_name}}</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 theme="primary" variant="outline" block bindtap="toQuestionnaire" data-item="{{item}}" wx:if="{{item.status == 2}}">
<t-button bindtap="toRegister" theme="primary" block wx:if="{{item.status == 3}}">预约挂号</t-button> 填写随访问卷
</t-button>
<t-button bindtap="toRegister" theme="primary" block wx:if="{{item.status == 3}}">
预约挂号
</t-button>
</view> </view>
</view>
</scroll-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>