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() {
console.log('loadMore');
if (this.data.hasMore && !this.data.loading) {
this.setData({
page: this.data.page + 1

View File

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

View File

@ -1,39 +1,31 @@
<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>
<t-navbar
t-class-placeholder="t-navbar-placeholder"
t-class-content="t-navbar-content"
class="block"
title="健康教育"
left-arrow
bind:go-back="handleBack"
/>
<view class="box_1">
<view class="box_3">
<input class="text_2" value="{{searchKeyword}}" placeholder="请输入搜索关键词" bindinput="onSearchInput" bindconfirm="onSearch"></input>
<view class="image-wrapper_1" bindtap="onSearch">
<text class="iconfont icon-sousuo thumbnail_1"></text>
<t-navbar t-class-placeholder="t-navbar-placeholder" t-class-content="t-navbar-content" class="block" title="健康教育" left-arrow bind:go-back="handleBack" />
<scroll-view scroll-y="{{true}}" class="box_1" bindscrolltolower="loadMore">
<view class="scroll-view-box">
<view class="box_3">
<input class="text_2" value="{{searchKeyword}}" placeholder="请输入搜索关键词" bindinput="onSearchInput" bindconfirm="onSearch"></input>
<view class="image-wrapper_1" bindtap="onSearch">
<text class="iconfont icon-sousuo thumbnail_1"></text>
</view>
</view>
<view class="box_5" wx:for="{{articles}}" wx:key="id" bind:tap="preview" data-index="{{index}}">
<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 class="box_5" wx:for="{{articles}}" wx:key="id" bind:tap="preview" data-index="{{index}}">
<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>
</scroll-view>
</view>

View File

@ -192,6 +192,7 @@ Page({
},
planId:'',
questionnaire_id: '',
async toQuestionnaire() {
let valid = true;
// 必填项校验
@ -225,7 +226,7 @@ Page({
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_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({
title: '提交成功',
icon: 'success',
@ -376,15 +377,19 @@ Page({
*/
onLoad(options) {
this.planId = options.planId
this.questionnaire_id = options.questionnaire_id
this.setData({
['form.follow_name']: options.name,
['form.follow_date']: options.time
})
this.getDetail()
console.log(options)
if(options.questionnaire_id != 0){
this.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
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(',') : []

View File

@ -101,15 +101,16 @@ Page({
},
toQuestionnaire(e) {
const { id, time, name } = e.currentTarget.dataset
const { item } = e.currentTarget.dataset
console.log(item)
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) {
const data = this.data.dataList[0]
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() {

View File

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

View File

@ -1,38 +1,36 @@
<!--pages/clockIn/index.wxml-->
<!-- pages/clockIn/index.wxml -->
<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>
<t-navbar
t-class-placeholder="t-navbar-placeholder"
t-class-content="t-navbar-content"
class="block"
title="随访计划"
/>
<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" wx:if="{{item.status == 1}}">未开始</view>
<view class="margin-16 primary" wx:if="{{item.status == 3}}">
待开始
<text>{{item.diffDays}}天后</text>
<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-class-placeholder="t-navbar-placeholder" t-class-content="t-navbar-content" class="block" title="随访计划" />
<scroll-view scroll-y="{{true}}">
<view class="scroll-view-box">
<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" wx:if="{{item.status == 1}}">未开始</view>
<view class="margin-16 primary" wx:if="{{item.status == 3}}">
待开始
<text>{{item.diffDays}}天后</text>
</view>
<view class="item-top">
<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 class="item-top">
<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>
</scroll-view>
<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>
添加随访
</view>
</view>
</view>
<view class="emergency-access" bindtap="toEmergency">
<text class="iconfont icon-xiaoxi1" ></text>
<text class="iconfont icon-xiaoxi1"></text>
</view>

View File

@ -1,16 +1,26 @@
/* pages/therapeuticRegimen/index.wxss */
pages{
height: 100vh;
overflow: hidden;
}
.therapeuticRegimen{
box-sizing: border-box;
padding: 24rpx;
// padding: 24rpx;
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{
padding: 28rpx;
background-color: #fff;
border-radius: 24rpx;
position: relative;
overflow: hidden;
margin-bottom: 28rpx;
.tab-text{
position: absolute;
top: 0;

View File

@ -1,21 +1,6 @@
<!--pages/therapeuticRegimen/index.wxml-->
<scroll-view class="therapeuticRegimen" scroll-y>
<!-- <view class="therapeuticRegimen-item">
<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="scroll-view-box">
<view class="therapeuticRegimen-item" wx:for="{{list}}" wx:key="index" data-index="{{index}}" bind:tap="toPathDetails">
<view class="time">
{{item.start_date}} 至 {{item.end_date}}
@ -38,4 +23,5 @@
<view class="btn-box">
<t-button block theme="primary" bindtap="toPath">新增用药方案</t-button>
</view>
</view>
</scroll-view>