23
This commit is contained in:
parent
9364c8927d
commit
171f731c3b
24
app.json
24
app.json
@ -28,6 +28,30 @@
|
||||
"root": "pages/forGetPassword",
|
||||
"name": "forGetPassword",
|
||||
"pages": ["index"]
|
||||
},
|
||||
{
|
||||
"root": "pages/clockIn",
|
||||
"name": "clockIn",
|
||||
"pages": ["index"]
|
||||
}
|
||||
,
|
||||
{
|
||||
"root": "pages/medicationRecord",
|
||||
"name": "medicationRecord",
|
||||
"pages": ["index"]
|
||||
},
|
||||
{
|
||||
"root": "pages/followUp",
|
||||
"name": "followUp",
|
||||
"pages": ["index"]
|
||||
},{
|
||||
"root": "pages/register",
|
||||
"name": "register",
|
||||
"pages": ["index"]
|
||||
},{
|
||||
"root": "pages/emergency",
|
||||
"name": "emergency",
|
||||
"pages": ["index"]
|
||||
}
|
||||
],
|
||||
"window": {
|
||||
|
||||
84
pages/clockIn/index.js
Normal file
84
pages/clockIn/index.js
Normal file
@ -0,0 +1,84 @@
|
||||
// pages/clockIn/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
newTime: ''
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
const now = new Date()
|
||||
const year = now.getFullYear()
|
||||
const month = now.getMonth() + 1
|
||||
const day = now.getDate()
|
||||
const hours = now.getHours()
|
||||
const minutes = now.getMinutes()
|
||||
const seconds = now.getSeconds()
|
||||
|
||||
const formattedTime = `${year}年${month.toString().padStart(2, '0')}月${day.toString().padStart(2, '0')}日`
|
||||
|
||||
this.setData({
|
||||
newTime: formattedTime
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
},
|
||||
toRecord() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/medicationRecord/index',
|
||||
})
|
||||
}
|
||||
})
|
||||
8
pages/clockIn/index.json
Normal file
8
pages/clockIn/index.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"t-button": "tdesign-miniprogram/button/button",
|
||||
"t-tag": "tdesign-miniprogram/tag/tag"
|
||||
},
|
||||
"navigationStyle": "default",
|
||||
"navigationBarTitleText": "服药打卡"
|
||||
}
|
||||
44
pages/clockIn/index.less
Normal file
44
pages/clockIn/index.less
Normal file
@ -0,0 +1,44 @@
|
||||
/* pages/clockIn/index.wxss */
|
||||
.clockin{
|
||||
padding: 36rpx;
|
||||
padding-bottom: 120rpx;
|
||||
.new-time{
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.clockin-item{
|
||||
margin-top: 36rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 28rpx;
|
||||
.t-button{
|
||||
}
|
||||
.item-top{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 28rpx;
|
||||
.active{
|
||||
color: var(--td-brand-color);
|
||||
}
|
||||
}
|
||||
.medicine-name{
|
||||
font-weight: bold;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
.dose{
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
}
|
||||
.footer-example{
|
||||
position: fixed;
|
||||
bottom: 42rpx;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
text-align: center;
|
||||
color: var(--td-brand-color);
|
||||
font-size: 28rpx;
|
||||
line-height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
}
|
||||
17
pages/clockIn/index.wxml
Normal file
17
pages/clockIn/index.wxml
Normal file
@ -0,0 +1,17 @@
|
||||
<!--pages/clockIn/index.wxml-->
|
||||
<view class="clockin">
|
||||
<view class="new-time">{{newTime}}</view>
|
||||
|
||||
<view class="clockin-item">
|
||||
<view class="item-top">
|
||||
<text>早上</text>
|
||||
<t-tag class="margin-16" variant="light" theme="success">已完成</t-tag>
|
||||
</view>
|
||||
<view class="medicine-name">优思弗</view>
|
||||
<view class="dose">1片 饭后服用</view>
|
||||
<t-button bindtap="clockIn" theme="primary" block>打卡</t-button>
|
||||
</view>
|
||||
<view class="footer-example">
|
||||
<text bindtap="toRecord">历史服药记录 ></text>
|
||||
</view>
|
||||
</view>
|
||||
109
pages/emergency/index.js
Normal file
109
pages/emergency/index.js
Normal file
@ -0,0 +1,109 @@
|
||||
// pages/emergency/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
visible: false,
|
||||
current: ['checkbox1', 'checkbox2'],
|
||||
options: [
|
||||
|
||||
{
|
||||
label: '发热',
|
||||
value: 'checkbox1',
|
||||
content: '体温≥38°',
|
||||
maxContentRow: 2,
|
||||
icon: "rectangle"
|
||||
},
|
||||
{
|
||||
label: '白色或陶土样大便',
|
||||
value: 'checkbox2',
|
||||
content: '排便颜色异常',
|
||||
maxContentRow: 2,
|
||||
// defaultChecked: ' default-checked',
|
||||
icon: "rectangle"
|
||||
},
|
||||
{
|
||||
label: '腹胀/食欲下降',
|
||||
value: 'checkbox3',
|
||||
content: '消化系统不适',
|
||||
maxContentRow: 2,
|
||||
icon: "rectangle"
|
||||
},
|
||||
{
|
||||
label: '消化道出血',
|
||||
value: 'checkbox4',
|
||||
content: '血便或黑便',
|
||||
maxContentRow: 2,
|
||||
icon: "rectangle"
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
openFlow(){
|
||||
this.setData({
|
||||
visible: true
|
||||
})
|
||||
},
|
||||
closeFlow(){
|
||||
this.setData({
|
||||
visible: false
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
10
pages/emergency/index.json
Normal file
10
pages/emergency/index.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"t-checkbox": "tdesign-miniprogram/checkbox/checkbox",
|
||||
"t-checkbox-group": "tdesign-miniprogram/checkbox-group/checkbox-group",
|
||||
"t-button": "tdesign-miniprogram/button/button",
|
||||
"t-popup": "tdesign-miniprogram/popup/popup",
|
||||
"t-icon": "tdesign-miniprogram/icon/icon"
|
||||
},
|
||||
"navigationBarTitleText": "紧急通道"
|
||||
}
|
||||
50
pages/emergency/index.less
Normal file
50
pages/emergency/index.less
Normal file
@ -0,0 +1,50 @@
|
||||
/* pages/emergency/index.wxss */
|
||||
|
||||
.emergency{
|
||||
padding: 28rpx;
|
||||
.checkbox-group{
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
margin-top: 28rpx;
|
||||
margin-bottom: 28rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.t-overlay{
|
||||
top: 0!important;
|
||||
}
|
||||
.block {
|
||||
color: var(--td-text-color-secondary);
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
// justify-content: center;
|
||||
}
|
||||
.block--center{
|
||||
width: 90vw;
|
||||
height: 580rpx;
|
||||
padding: 50rpx;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
.waring-icon{
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 100rpx;
|
||||
color: #f6685d;
|
||||
background-color: #ffd8d2;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 20rpx auto;
|
||||
margin-bottom: 28rpx;
|
||||
}
|
||||
.block-desp{
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 50rpx;
|
||||
font-size: 28rpx;
|
||||
color: #5e5e5e;
|
||||
}
|
||||
.block-btn{
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
}
|
||||
26
pages/emergency/index.wxml
Normal file
26
pages/emergency/index.wxml
Normal file
@ -0,0 +1,26 @@
|
||||
<!--pages/emergency/index.wxml-->
|
||||
<view class="emergency">
|
||||
|
||||
<view>症状自检</view>
|
||||
<view class="checkbox-group">
|
||||
<t-checkbox-group icon="rectangle" default-checked value="{{current}}" bind:change="handleGroupChange" options="{{options}}" />
|
||||
</view>
|
||||
<t-button bindtap="clockIn" theme="primary" block bindtap="openFlow">提交</t-button>
|
||||
</view>
|
||||
|
||||
<t-popup
|
||||
visible="{{visible}}"
|
||||
usingCustomNavbar
|
||||
bind:visible-change="onVisibleChange"
|
||||
placement="center"
|
||||
>
|
||||
<view class="block block--center">
|
||||
<view class="waring-icon">
|
||||
<t-icon name="error-triangle-filled" size="48rpx" />
|
||||
</view>
|
||||
<view class="block-tip">高危预警</view>
|
||||
<view class="block-desp">您的症状组合提示可能存在胆管炎风险</view>
|
||||
<t-button class="block-btn" theme="danger" block>立即联系医生</t-button>
|
||||
<t-button block bind:tap="closeFlow">暂不处理</t-button>
|
||||
</view>
|
||||
</t-popup>
|
||||
189
pages/followUp/index.js
Normal file
189
pages/followUp/index.js
Normal file
@ -0,0 +1,189 @@
|
||||
// pages/followUp/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
style: 'border: 2rpx solid #efefef;border-radius: 12rpx;',
|
||||
personInfo: {
|
||||
name: '',
|
||||
gender: 0,
|
||||
birth: '',
|
||||
address: [],
|
||||
introduction: '',
|
||||
yearType: 0,
|
||||
|
||||
// photos: [],
|
||||
},
|
||||
mode: '',
|
||||
dateVisible: false,
|
||||
date: new Date('2021-12-23').getTime(), // 支持时间戳传入
|
||||
dateText: '',
|
||||
filter(type, options) {
|
||||
if (type === 'year') {
|
||||
return options.sort((a, b) => b.value - a.value);
|
||||
}
|
||||
return options;
|
||||
},
|
||||
popupProps: {
|
||||
usingCustomNavbar: true,
|
||||
},
|
||||
|
||||
formatter(item, index) {
|
||||
if (index === 1) {
|
||||
const label = item.label.slice(0, -1);
|
||||
return {
|
||||
value: item.value,
|
||||
label: calendarMonth[Number(label) - 1],
|
||||
};
|
||||
}
|
||||
if (index === 2) {
|
||||
const [dateValue, weekValue] = item.label.split(' ');
|
||||
const dateSuffixes = {
|
||||
1: 'st',
|
||||
2: 'nd',
|
||||
3: 'rd',
|
||||
};
|
||||
const weekMap = {
|
||||
周一: 'Mon.',
|
||||
周二: 'Tues.',
|
||||
周三: 'Wed.',
|
||||
周四: 'Thurs.',
|
||||
周五: 'Fri.',
|
||||
周六: 'Sat.',
|
||||
周日: 'Sun.',
|
||||
};
|
||||
const label = dateValue.slice(0, -1);
|
||||
|
||||
return {
|
||||
value: item.value,
|
||||
label: `${label}${dateSuffixes[label] || 'th'} ${weekMap[weekValue]}`,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
value: item.value,
|
||||
label: item.label.slice(0, -1),
|
||||
};
|
||||
},
|
||||
|
||||
originFiles: [
|
||||
{
|
||||
url: 'https://tdesign.gtimg.com/mobile/demos/example4.png',
|
||||
name: 'uploaded1.png',
|
||||
type: 'image',
|
||||
removeBtn: true,
|
||||
},
|
||||
{
|
||||
url: 'https://tdesign.gtimg.com/mobile/demos/example6.png',
|
||||
name: 'uploaded2.png',
|
||||
type: 'image',
|
||||
removeBtn: true,
|
||||
},
|
||||
{
|
||||
url: 'https://tdesign.gtimg.com/mobile/demos/example5.png',
|
||||
name: 'uploaded3.png',
|
||||
type: 'image',
|
||||
removeBtn: true,
|
||||
},
|
||||
],
|
||||
gridConfig: {
|
||||
column: 4,
|
||||
width: 160,
|
||||
height: 160,
|
||||
},
|
||||
config: {
|
||||
count: 1,
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
showPicker(e) {
|
||||
const { mode } = e.currentTarget.dataset;
|
||||
this.setData({
|
||||
[`${mode}Visible`]: true,
|
||||
});
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
handleSuccess(e) {
|
||||
console.log(e.detail)
|
||||
const { files } = e.detail;
|
||||
this.setData({
|
||||
originFiles: files,
|
||||
});
|
||||
},
|
||||
handleRemove(e) {
|
||||
console.log(e.detail.file);
|
||||
const { index } = e.detail;
|
||||
const { originFiles } = this.data;
|
||||
originFiles.splice(index, 1);
|
||||
this.setData({
|
||||
originFiles,
|
||||
});
|
||||
},
|
||||
handleClick(e) {
|
||||
console.log(e.detail.file);
|
||||
},
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
15
pages/followUp/index.json
Normal file
15
pages/followUp/index.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"t-cell": "tdesign-miniprogram/cell/cell",
|
||||
"t-input": "tdesign-miniprogram/input/input",
|
||||
"t-date-time-picker": "tdesign-miniprogram/date-time-picker/date-time-picker",
|
||||
"t-row": "tdesign-miniprogram/row/row",
|
||||
"t-col": "tdesign-miniprogram/col/col",
|
||||
"t-button": "tdesign-miniprogram/button/button",
|
||||
"t-upload": "tdesign-miniprogram/upload/upload",
|
||||
"t-radio": "tdesign-miniprogram/radio/radio",
|
||||
"t-radio-group": "tdesign-miniprogram/radio-group/radio-group"
|
||||
},
|
||||
"navigationStyle": "default",
|
||||
"navigationBarTitleText": "填写随访问卷"
|
||||
}
|
||||
42
pages/followUp/index.less
Normal file
42
pages/followUp/index.less
Normal file
@ -0,0 +1,42 @@
|
||||
/* pages/followUp/index.wxss */
|
||||
.follow-up{
|
||||
padding: 28rpx;
|
||||
padding-bottom: 56rpx;
|
||||
.follow-item{
|
||||
background-color: #fff;
|
||||
padding: 28rpx;
|
||||
margin-bottom: 28rpx;
|
||||
border-radius: 20rpx;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
.custom-label {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.custom-label::after, .input-example__label::after {
|
||||
content: '*';
|
||||
color: red;
|
||||
font-size: 32rpx;
|
||||
margin-left: 4rpx;
|
||||
}
|
||||
.t-overlay{
|
||||
top: 0!important;
|
||||
}
|
||||
.input-example {
|
||||
// background-color: var(--bg-color-demo);
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
|
||||
.input-example__label {
|
||||
color: var(--td-text-color-primary);
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
margin: 0 8rpx 16rpx;
|
||||
}
|
||||
.box{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
padding-right: 60rpx;
|
||||
}
|
||||
}
|
||||
379
pages/followUp/index.wxml
Normal file
379
pages/followUp/index.wxml
Normal file
@ -0,0 +1,379 @@
|
||||
<!--pages/followUp/index.wxml-->
|
||||
<view class="follow-up">
|
||||
<view class="follow-item">
|
||||
<view>随访信息</view>
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 随访名称</view>
|
||||
<t-input placeholder="请输入" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 随访日期</view>
|
||||
<t-input placeholder="请输入" bindtap="showPicker" size="small" borderless="{{true}}" style="{{style}}" data-mode="birth" suffixIcon="{{ { name: 'calendar-1', ariaLabel: '通讯录' } }}" />
|
||||
|
||||
</view>
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 随访医院</view>
|
||||
<t-input placeholder="请输入" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="follow-item">
|
||||
<view>生长指数</view>
|
||||
|
||||
<t-row gutter="12">
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 身高(cm) </view>
|
||||
<t-input placeholder="请输入" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 体重(kg) </view>
|
||||
<t-input placeholder="请输入" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 头围(cm) </view>
|
||||
<t-input placeholder="请输入" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 上臀围(cm) </view>
|
||||
<t-input placeholder="请输入" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
</t-row>
|
||||
</view>
|
||||
<view class="follow-item">
|
||||
<view>肝功能</view>
|
||||
|
||||
<view class="wrapper">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 上传肝功能检查报告(支持OCR识别)</view>
|
||||
</view>
|
||||
<t-upload media-type="{{['image']}}" files="{{originFiles}}" gridConfig="{{gridConfig}}" removeBtn="{{false}}" bind:success="handleSuccess" bind:remove="handleRemove" bind:click="handleClick" bind:sort-end="handleSortEnd" />
|
||||
</view>
|
||||
|
||||
<t-row gutter="12">
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 总胆红素(µmol/L) </view>
|
||||
<t-input placeholder="请输入" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 总胆红素(µmol/L) </view>
|
||||
<t-input placeholder="请输入" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 总胆汁酸(g/L) </view>
|
||||
<t-input placeholder="请输入" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 白蛋白(g/L) </view>
|
||||
<t-input placeholder="请输入" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 谷草(U/L)</view>
|
||||
<t-input placeholder="请输入" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 谷丙(U/L)</view>
|
||||
<t-input placeholder="请输入" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> GGT(U/L)</view>
|
||||
<t-input placeholder="请输入" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> ALP(U/L)</view>
|
||||
<t-input placeholder="请输入" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
</t-row>
|
||||
</view>
|
||||
<view class="follow-item">
|
||||
<view>
|
||||
凝血功能</view>
|
||||
|
||||
<view class="wrapper">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 上传凝血功能检查报告(支持OCR识别)</view>
|
||||
</view>
|
||||
<t-upload media-type="{{['image']}}" files="{{originFiles}}" gridConfig="{{gridConfig}}" removeBtn="{{false}}" bind:success="handleSuccess" bind:remove="handleRemove" bind:click="handleClick" bind:sort-end="handleSortEnd" />
|
||||
</view>
|
||||
|
||||
<t-row gutter="12">
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 凝血酶原时间(s)</view>
|
||||
<t-input placeholder="请输入" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 国际标准化比</view>
|
||||
<t-input placeholder="请输入" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="13">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 活化的部分凝血酶时间(s)</view>
|
||||
<t-input placeholder="请输入" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</t-col>
|
||||
|
||||
</t-row>
|
||||
</view>
|
||||
<view class="follow-item">
|
||||
<view>
|
||||
血常规</view>
|
||||
|
||||
<view class="wrapper">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 上传血常规检查报告(支持OCR识别)</view>
|
||||
</view>
|
||||
<t-upload media-type="{{['image']}}" files="{{originFiles}}" gridConfig="{{gridConfig}}" removeBtn="{{false}}" bind:success="handleSuccess" bind:remove="handleRemove" bind:click="handleClick" bind:sort-end="handleSortEnd" />
|
||||
</view>
|
||||
|
||||
<t-row gutter="12">
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 血小板(10^9/L) </view>
|
||||
<t-input placeholder="请输入" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 血红蛋白(g/L)</view>
|
||||
<t-input placeholder="请输入" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 白细胞(10^9/L)</view>
|
||||
<t-input placeholder="请输入" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</t-col>
|
||||
|
||||
</t-row>
|
||||
</view>
|
||||
<view class="follow-item">
|
||||
<view>
|
||||
营养指标</view>
|
||||
|
||||
<view class="wrapper">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 上传营养指标检查报告(支持OCR识别)</view>
|
||||
</view>
|
||||
<t-upload media-type="{{['image']}}" files="{{originFiles}}" gridConfig="{{gridConfig}}" removeBtn="{{false}}" bind:success="handleSuccess" bind:remove="handleRemove" bind:click="handleClick" bind:sort-end="handleSortEnd" />
|
||||
</view>
|
||||
|
||||
<t-row gutter="12">
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 25(OH)D3 (ng/ml) </view>
|
||||
<t-input placeholder="请输入" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 维生素A (ng/ml)</view>
|
||||
<t-input placeholder="请输入" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 维生素K (ng/ml)</view>
|
||||
<t-input placeholder="请输入" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 维生素E (ng/ml)</view>
|
||||
<t-input placeholder="请输入" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</t-col>
|
||||
</t-row>
|
||||
</view>
|
||||
<view class="follow-item">
|
||||
<view>
|
||||
B超</view>
|
||||
|
||||
<view class="wrapper">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 上传B超报告(支持OCR识别)</view>
|
||||
</view>
|
||||
<t-upload media-type="{{['image']}}" files="{{originFiles}}" gridConfig="{{gridConfig}}" removeBtn="{{false}}" bind:success="handleSuccess" bind:remove="handleRemove" bind:click="handleClick" bind:sort-end="handleSortEnd" />
|
||||
</view>
|
||||
|
||||
<t-row gutter="12">
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 肝肋下(mm)肝肋下(mm)</view>
|
||||
<t-input placeholder="请输入" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 肝剑突下(mm)</view>
|
||||
<t-input placeholder="请输入" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 脾肋下(mm)</view>
|
||||
<t-input placeholder="请输入" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 门静脉主干(mm)</view>
|
||||
<t-input placeholder="请输入" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 门静脉流速</view>
|
||||
<t-input placeholder="请输入" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 肝弹性值</view>
|
||||
<t-input placeholder="请输入" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 有无肝囊肿</view>
|
||||
<t-radio-group default-value="0" borderless t-class="box">
|
||||
<t-radio block="{{false}}" label="有" value="0" />
|
||||
<t-radio block="{{false}}" label="无" value="1" />
|
||||
</t-radio-group>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 有无腹水</view>
|
||||
<t-radio-group default-value="0" borderless t-class="box">
|
||||
<t-radio block="{{false}}" label="有" value="0" />
|
||||
<t-radio block="{{false}}" label="无" value="1" />
|
||||
</t-radio-group>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</t-col>
|
||||
</t-row>
|
||||
</view>
|
||||
<view class="follow-item">
|
||||
<view>
|
||||
MDT电子病历</view>
|
||||
|
||||
<view class="wrapper">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 上传本次随访的电子病历</view>
|
||||
</view>
|
||||
<t-upload media-type="{{['image']}}" files="{{originFiles}}" gridConfig="{{gridConfig}}" removeBtn="{{false}}" bind:success="handleSuccess" bind:remove="handleRemove" bind:click="handleClick" bind:sort-end="handleSortEnd" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<t-button bindtap="clockIn" theme="primary" block bindtap="toQuestionnaire">提交</t-button>
|
||||
|
||||
|
||||
|
||||
<t-date-time-picker auto-close bind:cancel="hidePicker" bind:change="onPickerChange" cancelBtn="取消" confirmBtn="确认" data-mode="birth" defaultValue="{{personInfo.birth}}" end="{{birthEnd}}" filter="{{birthFilter}}" format="YYYY-MM-DD" mode="date" popup-props="{{ { usingCustomNavbar: true } }}" start="{{birthStart}}" title="选择生日" value="{{personInfo.birth}}" visible="{{birthVisible}}" />
|
||||
</view>
|
||||
@ -157,5 +157,12 @@ Page({
|
||||
},
|
||||
|
||||
onReady() {
|
||||
},
|
||||
|
||||
toClockIn(){
|
||||
console.log(232)
|
||||
wx.navigateTo({
|
||||
url: '/pages/clockIn/index',
|
||||
})
|
||||
}
|
||||
});
|
||||
@ -9,6 +9,7 @@
|
||||
"t-pull-down-refresh": "tdesign-miniprogram/pull-down-refresh/pull-down-refresh",
|
||||
"t-message": "tdesign-miniprogram/message/message",
|
||||
"t-button": "tdesign-miniprogram/button/button",
|
||||
"t-icon": "tdesign-miniprogram/icon/icon",
|
||||
"nav": "/components/nav",
|
||||
"card": "/components/card",
|
||||
"ec-canvas": "../../ec-canvas/ec-canvas"
|
||||
|
||||
@ -100,3 +100,18 @@
|
||||
|
||||
}
|
||||
|
||||
.emergency-access{
|
||||
position: fixed;
|
||||
right: 40rpx;
|
||||
bottom: 220rpx;
|
||||
background-color: red;
|
||||
color: #fff;
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
z-index: 9999;
|
||||
border-radius: 120rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0px 12px 32px 4px rgba(0, 0, 0, .04), 0px 8px 20px rgba(0, 0, 0, .08) ;
|
||||
}
|
||||
@ -18,7 +18,7 @@
|
||||
</view>
|
||||
<view class="item-content">
|
||||
<view class="item-title">每日用药提醒
|
||||
<view class="item-title-right-text">
|
||||
<view class="item-title-right-text" bindtap="toClockIn">
|
||||
更多
|
||||
</view>
|
||||
</view>
|
||||
@ -86,4 +86,8 @@
|
||||
发布
|
||||
</t-button>
|
||||
</view> -->
|
||||
<!-- <t-message id="t-message" /> -->
|
||||
<!-- <t-message id="t-message" /> -->
|
||||
|
||||
<view class="emergency-access">
|
||||
<t-icon name="call-1-filled" size="42rpx" bind:click="onIconTap" />
|
||||
</view>
|
||||
87
pages/medicationRecord/index.js
Normal file
87
pages/medicationRecord/index.js
Normal file
@ -0,0 +1,87 @@
|
||||
// pages/clockIn/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
newTime: '',
|
||||
timeType: 1
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
const now = new Date()
|
||||
const year = now.getFullYear()
|
||||
const month = now.getMonth() + 1
|
||||
const day = now.getDate()
|
||||
const hours = now.getHours()
|
||||
const minutes = now.getMinutes()
|
||||
const seconds = now.getSeconds()
|
||||
|
||||
const formattedTime = `${year}年${month.toString().padStart(2, '0')}月${day.toString().padStart(2, '0')}日`
|
||||
|
||||
this.setData({
|
||||
newTime: formattedTime
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
},
|
||||
changeBtn(e) {
|
||||
this.setData({
|
||||
timeType: e.target.dataset.index
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
10
pages/medicationRecord/index.json
Normal file
10
pages/medicationRecord/index.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"t-button": "tdesign-miniprogram/button/button",
|
||||
"t-tag": "tdesign-miniprogram/tag/tag",
|
||||
"t-col": "tdesign-miniprogram/col/col",
|
||||
"t-row": "tdesign-miniprogram/row/row"
|
||||
},
|
||||
"navigationStyle": "default",
|
||||
"navigationBarTitleText": "历史服药记录"
|
||||
}
|
||||
54
pages/medicationRecord/index.less
Normal file
54
pages/medicationRecord/index.less
Normal file
@ -0,0 +1,54 @@
|
||||
/* pages/clockIn/index.wxss */
|
||||
.clockin{
|
||||
padding: 28rpx;
|
||||
padding-bottom: 120rpx;
|
||||
.tip{
|
||||
font-size: 28rpx;
|
||||
color: var(--td-error-color, #e34d59);
|
||||
}
|
||||
.btn-item{
|
||||
margin: 30rpx 0;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 28rpx;
|
||||
|
||||
}
|
||||
.new-time{
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.clockin-item{
|
||||
margin-top: 28rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 28rpx;
|
||||
.t-button{
|
||||
}
|
||||
.item-top{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 28rpx;
|
||||
.active{
|
||||
color: var(--td-brand-color);
|
||||
}
|
||||
}
|
||||
.medicine-name{
|
||||
font-weight: bold;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
.dose{
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
}
|
||||
.footer-example{
|
||||
position: fixed;
|
||||
bottom: 42rpx;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
text-align: center;
|
||||
color: var(--td-brand-color);
|
||||
font-size: 28rpx;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
}
|
||||
34
pages/medicationRecord/index.wxml
Normal file
34
pages/medicationRecord/index.wxml
Normal file
@ -0,0 +1,34 @@
|
||||
<!--pages/clockIn/index.wxml-->
|
||||
<view class="clockin">
|
||||
<view class="tip">
|
||||
只展示近90天内的服药记录
|
||||
</view>
|
||||
|
||||
<view class="btn-item">
|
||||
<t-row gutter="12">
|
||||
<t-col span="8">
|
||||
<t-button block size="small" theme="{{timeType == 1? 'primary': ''}}" data-index="{{1}}" bindtap="changeBtn">近 7 天</t-button>
|
||||
</t-col>
|
||||
<t-col span="8">
|
||||
<t-button block size="small" theme="{{timeType == 2? 'primary': ''}}" data-index="{{2}}" bindtap="changeBtn">近 30 天</t-button>
|
||||
</t-col>
|
||||
|
||||
<t-col span="8">
|
||||
<t-button block size="small" theme="{{timeType == 3? 'primary': ''}}" data-index="{{3}}" bindtap="changeBtn">近 90 天</t-button>
|
||||
</t-col>
|
||||
</t-row>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="new-time">{{newTime}}</view>
|
||||
|
||||
<view class="clockin-item">
|
||||
<view class="item-top">
|
||||
<text>早上</text>
|
||||
<t-tag class="margin-16" variant="light" theme="success">已完成</t-tag>
|
||||
</view>
|
||||
<view class="medicine-name">优思弗</view>
|
||||
<view class="dose">1片 饭后服用</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@ -1,108 +1,89 @@
|
||||
// pages/message/message.js
|
||||
import { fetchMessageList, markMessagesRead } from '~/mock/chat';
|
||||
|
||||
const app = getApp();
|
||||
const { socket } = app.globalData; // 获取已连接的 socketTask
|
||||
let currentUser = null; // 当前打开的聊天用户 { userId, eventChannel }
|
||||
|
||||
// pages/clockIn/index.js
|
||||
Page({
|
||||
/** 页面的初始数据 */
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
messageList: [], // 完整消息列表 { userId, name, avatar, messages }
|
||||
loading: true, // 是否正在加载(用于下拉刷新)
|
||||
|
||||
newTime: ''
|
||||
},
|
||||
|
||||
/** 生命周期函数--监听页面加载 */
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
this.getMessageList();
|
||||
// 处理接收到的数据
|
||||
socket.onMessage((data) => {
|
||||
data = JSON.parse(data);
|
||||
if (data.type === 'message') {
|
||||
const { userId, message } = data.data;
|
||||
const { user, index } = this.getUserById(userId);
|
||||
this.data.messageList.splice(index, 1);
|
||||
this.data.messageList.unshift(user);
|
||||
user.messages.push(message);
|
||||
if (currentUser && userId === currentUser.userId) {
|
||||
this.setMessagesRead(userId);
|
||||
currentUser.eventChannel.emit('update', user);
|
||||
}
|
||||
this.setData({ messageList: this.data.messageList });
|
||||
app.setUnreadNum(this.computeUnreadNum());
|
||||
}
|
||||
});
|
||||
const now = new Date()
|
||||
const year = now.getFullYear()
|
||||
const month = now.getMonth() + 1
|
||||
const day = now.getDate()
|
||||
const hours = now.getHours()
|
||||
const minutes = now.getMinutes()
|
||||
const seconds = now.getSeconds()
|
||||
|
||||
const formattedTime = `${year}年${month.toString().padStart(2, '0')}月${day.toString().padStart(2, '0')}日`
|
||||
|
||||
this.setData({
|
||||
newTime: formattedTime
|
||||
})
|
||||
},
|
||||
|
||||
/** 生命周期函数--监听页面初次渲染完成 */
|
||||
onReady() {},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
/** 生命周期函数--监听页面显示 */
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
currentUser = null;
|
||||
|
||||
},
|
||||
|
||||
/** 生命周期函数--监听页面隐藏 */
|
||||
onHide() {},
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
/** 生命周期函数--监听页面卸载 */
|
||||
onUnload() {},
|
||||
|
||||
/** 页面相关事件处理函数--监听用户下拉动作 */
|
||||
onPullDownRefresh() {},
|
||||
|
||||
/** 页面上拉触底事件的处理函数 */
|
||||
onReachBottom() {},
|
||||
|
||||
/** 用户点击右上角分享 */
|
||||
onShareAppMessage() {},
|
||||
|
||||
/** 获取完整消息列表 */
|
||||
getMessageList() {
|
||||
fetchMessageList().then(({ data }) => {
|
||||
this.setData({ messageList: data, loading: false });
|
||||
});
|
||||
},
|
||||
|
||||
/** 通过 userId 获取 user 对象和下标 */
|
||||
getUserById(userId) {
|
||||
let index = 0;
|
||||
while (index < this.data.messageList.length) {
|
||||
const user = this.data.messageList[index];
|
||||
if (user.userId === userId) return { user, index };
|
||||
index += 1;
|
||||
}
|
||||
// TODO:处理 userId 在列表中不存在的情况()
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/** 计算未读消息数量 */
|
||||
computeUnreadNum() {
|
||||
let unreadNum = 0;
|
||||
this.data.messageList.forEach(({ messages }) => {
|
||||
unreadNum += messages.filter((item) => !item.read).length;
|
||||
});
|
||||
return unreadNum;
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/** 打开对话页 */
|
||||
toChat(event) {
|
||||
const { userId } = event.currentTarget.dataset;
|
||||
wx.navigateTo({ url: `/pages/chat/index?userId${userId}` }).then(({ eventChannel }) => {
|
||||
currentUser = { userId, eventChannel };
|
||||
const { user } = this.getUserById(userId);
|
||||
eventChannel.emit('update', user);
|
||||
});
|
||||
this.setMessagesRead(userId);
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/** 将用户的所有消息标记为已读 */
|
||||
setMessagesRead(userId) {
|
||||
const { user } = this.getUserById(userId);
|
||||
user.messages.forEach((message) => {
|
||||
message.read = true;
|
||||
});
|
||||
this.setData({ messageList: this.data.messageList });
|
||||
app.setUnreadNum(this.computeUnreadNum());
|
||||
markMessagesRead(userId);
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
},
|
||||
});
|
||||
toQuestionnaire() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/followUp/index',
|
||||
})
|
||||
},
|
||||
toRegister() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/register/index',
|
||||
})
|
||||
}
|
||||
})
|
||||
@ -1,11 +1,8 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"t-navbar": "tdesign-miniprogram/navbar/navbar",
|
||||
"t-icon": "tdesign-miniprogram/icon/icon",
|
||||
"t-cell": "tdesign-miniprogram/cell/cell",
|
||||
"t-badge": "tdesign-miniprogram/badge/badge",
|
||||
"nav": "/components/nav"
|
||||
"t-button": "tdesign-miniprogram/button/button",
|
||||
"t-tag": "tdesign-miniprogram/tag/tag"
|
||||
},
|
||||
"navigationStyle": "custom",
|
||||
"disableScroll": true
|
||||
}
|
||||
"navigationStyle": "default",
|
||||
"navigationBarTitleText": "随访计划"
|
||||
}
|
||||
@ -1,32 +1,49 @@
|
||||
/* pages/message/message.wxss */
|
||||
page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
height: 100vh;
|
||||
padding-bottom: calc(env(safe-area-inset-bottom) + 112rpx);
|
||||
}
|
||||
|
||||
.nav-bar {
|
||||
border-bottom: 1rpx solid #e7e7e7;
|
||||
}
|
||||
|
||||
.message-list {
|
||||
height: 0;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
border-radius: 50% !important;
|
||||
}
|
||||
|
||||
.content > view {
|
||||
width: 560rpx;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.content.unread > view {
|
||||
width: 510rpx;
|
||||
}
|
||||
/* pages/clockIn/index.wxss */
|
||||
.clockin{
|
||||
padding: 28rpx;
|
||||
padding-bottom: 200rpx;
|
||||
.new-time{
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.clockin-item{
|
||||
margin-bottom: 28rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 28rpx;
|
||||
.t-button{
|
||||
}
|
||||
.item-top{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
.active{
|
||||
color: var(--td-brand-color);
|
||||
}
|
||||
}
|
||||
.medicine-name{
|
||||
font-weight: bold;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
.dose{
|
||||
font-size: 28rpx;
|
||||
// margin-bottom: 30rpx;
|
||||
}
|
||||
.t-button{
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
}
|
||||
.footer-example{
|
||||
// position: fixed;
|
||||
// bottom: 202rpx;
|
||||
// width: 100%;
|
||||
// left: 0;
|
||||
// text-align: center;
|
||||
// color: var(--td-brand-color);
|
||||
// font-size: 28rpx;
|
||||
// line-height: 60rpx;
|
||||
// line-height: 60rpx;
|
||||
margin-top: 28rpx;
|
||||
}
|
||||
}
|
||||
@ -1,25 +1,43 @@
|
||||
<wxs src="./index.wxs" module="utils" />
|
||||
|
||||
<nav nav-type="title" title-text="全部消息"></nav>
|
||||
<scroll-view
|
||||
class="message-list"
|
||||
scroll-y
|
||||
refresher-enabled
|
||||
refresher-triggered="{{ loading }}"
|
||||
bindrefresherrefresh="getMessageList"
|
||||
>
|
||||
<!-- <t-cell
|
||||
wx:for="{{ messageList }}"
|
||||
wx:key="index"
|
||||
t-class-image="avatar"
|
||||
t-class-description="content {{ utils.isRead(item.messages) ? '' : 'unread' }}"
|
||||
image="{{ item.avatar }}"
|
||||
title="{{ item.name }}"
|
||||
description="{{ item.messages[item.messages.length - 1].content }}"
|
||||
hover
|
||||
bind:tap="toChat"
|
||||
data-user-id="{{ item.userId }}"
|
||||
>
|
||||
<t-badge slot="right-icon" count="{{ utils.computeUnreadNum(item.messages) }}" class="wrapper" />
|
||||
</t-cell> -->
|
||||
</scroll-view>
|
||||
<!--pages/clockIn/index.wxml-->
|
||||
<view class="clockin">
|
||||
<view class="clockin-item">
|
||||
<view class="item-top">
|
||||
<text>术后1个月随访</text>
|
||||
<t-tag class="margin-16" variant="light" theme="success">已完成</t-tag>
|
||||
</view>
|
||||
<view class="dose">随访时间:2025年5月20日</view>
|
||||
<t-button theme="primary" block bindtap="toQuestionnaire">填写随访问卷</t-button>
|
||||
</view>
|
||||
<view class="clockin-item">
|
||||
<view class="item-top">
|
||||
<text>术后2个月随访</text>
|
||||
<t-tag class="margin-16" variant="light" theme="primary">待开始</t-tag>
|
||||
</view>
|
||||
<view class="dose">随访时间:2025年5月20日</view>
|
||||
<t-button bindtap="toRegister" theme="primary" block>预约挂号</t-button>
|
||||
</view>
|
||||
<view class="clockin-item">
|
||||
<view class="item-top">
|
||||
<text>术后3个月随访</text>
|
||||
<t-tag class="margin-16" variant="light">未开始</t-tag>
|
||||
</view>
|
||||
<view class="dose">随访时间:2025年5月20日</view>
|
||||
</view>
|
||||
<view class="clockin-item">
|
||||
<view class="item-top">
|
||||
<text>术后4个月随访</text>
|
||||
<t-tag class="margin-16" variant="light">未开始</t-tag>
|
||||
</view>
|
||||
<view class="dose">随访时间:2025年5月20日</view>
|
||||
</view>
|
||||
<view class="clockin-item">
|
||||
<view class="item-top">
|
||||
<text>术后1年随访</text>
|
||||
<t-tag class="margin-16" variant="light">未开始</t-tag>
|
||||
</view>
|
||||
<view class="dose">随访时间:2025年5月20日</view>
|
||||
</view>
|
||||
<view class="footer-example">
|
||||
<t-button theme="primary" block bindtap="toQuestionnaire">添加随访</t-button>
|
||||
</view>
|
||||
</view>
|
||||
@ -1,17 +0,0 @@
|
||||
/** 计算某个用户的未读消息数量 */
|
||||
function computeUnreadNum(messages) {
|
||||
var cnt = 0;
|
||||
for (var i = 0; i < messages.length; i++) if (!messages[i].read) cnt++;
|
||||
return cnt;
|
||||
}
|
||||
|
||||
/** 某个用户的消息是否全部已读 */
|
||||
function isRead(messages) {
|
||||
for (var i = 0; i < messages.length; i++) if (!messages[i].read) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
computeUnreadNum: computeUnreadNum,
|
||||
isRead: isRead,
|
||||
};
|
||||
@ -1,27 +0,0 @@
|
||||
/* pages/message/message.wxss */
|
||||
page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
height: 100vh;
|
||||
padding-bottom: calc(env(safe-area-inset-bottom) + 112rpx);
|
||||
}
|
||||
.nav-bar {
|
||||
border-bottom: 1rpx solid #e7e7e7;
|
||||
}
|
||||
.message-list {
|
||||
height: 0;
|
||||
flex-grow: 1;
|
||||
}
|
||||
.avatar {
|
||||
border-radius: 50% !important;
|
||||
}
|
||||
.content > view {
|
||||
width: 560rpx;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.content.unread > view {
|
||||
width: 510rpx;
|
||||
}
|
||||
@ -1,114 +0,0 @@
|
||||
export const areaList = {
|
||||
provinces: {
|
||||
110000: '北京市',
|
||||
350000: '福建省',
|
||||
330000: '浙江省',
|
||||
440000: '广东省',
|
||||
530000: '云南省',
|
||||
460000: '海南省',
|
||||
210000: '辽宁省',
|
||||
320000: '江苏省',
|
||||
410000: '河南省',
|
||||
510000: '四川省',
|
||||
610000: '陕西省',
|
||||
},
|
||||
cities: {
|
||||
110100: '北京市',
|
||||
440100: '广州市',
|
||||
440200: '韶关市',
|
||||
440300: '深圳市',
|
||||
440400: '珠海市',
|
||||
440500: '汕头市',
|
||||
440600: '佛山市',
|
||||
350100: '福州市',
|
||||
350200: '厦门市',
|
||||
350300: '莆田市',
|
||||
350400: '三明市',
|
||||
350500: '泉州市',
|
||||
350600: '漳州市',
|
||||
350700: '南平市',
|
||||
350800: '龙岩市',
|
||||
350900: '宁德市',
|
||||
330100: '杭州市',
|
||||
330200: '宁波市',
|
||||
330300: '温州市',
|
||||
330400: '嘉兴市',
|
||||
330500: '湖州市',
|
||||
330600: '绍兴市',
|
||||
330700: '金华市',
|
||||
330800: '衢州市',
|
||||
330900: '舟山市',
|
||||
331000: '台州市',
|
||||
331100: '丽水市',
|
||||
530100: '昆明市',
|
||||
530300: '曲靖市',
|
||||
530400: '玉溪市',
|
||||
530500: '保山市',
|
||||
530600: '昭通市',
|
||||
530700: '丽江市',
|
||||
530800: '普洱市',
|
||||
530900: '临沧市',
|
||||
532300: '楚雄彝族自治州',
|
||||
532500: '红河哈尼族彝族自治州',
|
||||
460100: '海口市',
|
||||
460200: '三亚市',
|
||||
460300: '三沙市',
|
||||
460400: '儋州市',
|
||||
469001: '五指山市',
|
||||
469002: '琼海市',
|
||||
469003: '文昌市',
|
||||
469004: '万宁市',
|
||||
469005: '东方市',
|
||||
469025: '定安县',
|
||||
210100: '沈阳市',
|
||||
210200: '大连市',
|
||||
210300: '鞍山市',
|
||||
210400: '抚顺市',
|
||||
210500: '本溪市',
|
||||
210600: '丹东市',
|
||||
210700: '锦州市',
|
||||
210800: '营口市',
|
||||
210900: '阜新市',
|
||||
211000: '辽阳市',
|
||||
320100: '南京市',
|
||||
320200: '无锡市',
|
||||
320300: '徐州市',
|
||||
320400: '常州市',
|
||||
320500: '苏州市',
|
||||
320600: '南通市',
|
||||
320700: '连云港市',
|
||||
320800: '淮安市',
|
||||
320900: '盐城市',
|
||||
321000: '扬州市',
|
||||
410100: '郑州市',
|
||||
410200: '开封市',
|
||||
410300: '洛阳市',
|
||||
410400: '平顶山市',
|
||||
410500: '安阳市',
|
||||
410600: '鹤壁市',
|
||||
410700: '新乡市',
|
||||
410800: '焦作市',
|
||||
410900: '濮阳市',
|
||||
411000: '许昌市',
|
||||
510100: '成都市',
|
||||
510300: '自贡市',
|
||||
510400: '攀枝花市',
|
||||
510500: '泸州市',
|
||||
510600: '德阳市',
|
||||
510700: '绵阳市',
|
||||
510800: '广元市',
|
||||
510900: '遂宁市',
|
||||
511000: '内江市',
|
||||
511100: '乐山市',
|
||||
610100: '西安市',
|
||||
610200: '铜川市',
|
||||
610300: '宝鸡市',
|
||||
610400: '咸阳市',
|
||||
610500: '渭南市',
|
||||
610600: '延安市',
|
||||
610700: '汉中市',
|
||||
610800: '榆林市',
|
||||
610900: '安康市',
|
||||
611000: '商洛市',
|
||||
},
|
||||
};
|
||||
@ -1,5 +1,4 @@
|
||||
import request from '~/api/request';
|
||||
import { areaList } from './areaData.js';
|
||||
|
||||
Page({
|
||||
data: {
|
||||
@ -53,24 +52,10 @@ Page({
|
||||
|
||||
onLoad() {
|
||||
// this.initAreaData();
|
||||
// this.getPersonalInfo();
|
||||
|
||||
},
|
||||
|
||||
getPersonalInfo() {
|
||||
request('/api/genPersonalInfo').then((res) => {
|
||||
this.setData(
|
||||
{
|
||||
personInfo: res.data.data,
|
||||
},
|
||||
() => {
|
||||
const { personInfo } = this.data;
|
||||
this.setData({
|
||||
addressText: `${areaList.provinces[personInfo.address[0]]} ${areaList.cities[personInfo.address[1]]}`,
|
||||
});
|
||||
},
|
||||
);
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
getAreaOptions(data, filter) {
|
||||
const res = Object.keys(data).map((key) => ({ value: key, label: data[key] }));
|
||||
@ -106,10 +91,7 @@ Page({
|
||||
this.setData({
|
||||
[`${mode}Visible`]: true,
|
||||
});
|
||||
if (mode === 'address') {
|
||||
const cities = this.getCities(this.data.personInfo.address[0]);
|
||||
this.setData({ cities });
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
hidePicker(e) {
|
||||
|
||||
@ -58,19 +58,3 @@
|
||||
visible="{{birthVisible}}"
|
||||
/>
|
||||
|
||||
<t-picker
|
||||
bind:cancel="hidePicker"
|
||||
bind:change="onPickerChange"
|
||||
bind:close="hidePicker"
|
||||
bind:pick="onAreaPick"
|
||||
cancelBtn="取消"
|
||||
confirmBtn="确认"
|
||||
data-mode="address"
|
||||
mode="address"
|
||||
title="选择地址"
|
||||
value="{{personInfo.address}}"
|
||||
visible="{{addressVisible}}"
|
||||
>
|
||||
<t-picker-item options="{{provinces}}" />
|
||||
<t-picker-item options="{{cities}}" />
|
||||
</t-picker>
|
||||
|
||||
66
pages/register/index.js
Normal file
66
pages/register/index.js
Normal file
@ -0,0 +1,66 @@
|
||||
// pages/register/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
imageSrc: 'https://tdesign.gtimg.com/mobile/demos/image1.jpeg',
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
6
pages/register/index.json
Normal file
6
pages/register/index.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"t-image": "tdesign-miniprogram/image/image"
|
||||
},
|
||||
"navigationBarTitleText": "预约挂号"
|
||||
}
|
||||
12
pages/register/index.less
Normal file
12
pages/register/index.less
Normal file
@ -0,0 +1,12 @@
|
||||
/* pages/register/index.wxss */
|
||||
.register{
|
||||
padding: 40rpx;
|
||||
text-align: center;
|
||||
text{
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
.t-image{
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
}
|
||||
6
pages/register/index.wxml
Normal file
6
pages/register/index.wxml
Normal file
@ -0,0 +1,6 @@
|
||||
<!--pages/register/index.wxml-->
|
||||
<view class="register">
|
||||
<text>扫描或识别下方二维码进行预约挂号:</text>
|
||||
|
||||
<t-image src="{{imageSrc}}" mode="aspectFill" width="200" height="200" aria-label="一个放置在墙角的黄色行李箱" />
|
||||
</view>
|
||||
95
project.private.config.json
Normal file
95
project.private.config.json
Normal file
@ -0,0 +1,95 @@
|
||||
{
|
||||
"condition": {
|
||||
"miniprogram": {
|
||||
"list": [
|
||||
{
|
||||
"name": "pages/emergency/index",
|
||||
"pathName": "pages/emergency/index",
|
||||
"query": "",
|
||||
"scene": null,
|
||||
"launchMode": "default"
|
||||
},
|
||||
{
|
||||
"name": "pages/register/index",
|
||||
"pathName": "pages/register/index",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "pages/followUp/index",
|
||||
"pathName": "pages/followUp/index",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "pages/message/index",
|
||||
"pathName": "pages/message/index",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "pages/medicationRecord/index",
|
||||
"pathName": "pages/medicationRecord/index",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "pages/clockIn/index",
|
||||
"pathName": "pages/clockIn/index",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "login",
|
||||
"pathName": "pages/login/login",
|
||||
"query": "",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "loginCode",
|
||||
"pathName": "pages/loginCode/loginCode",
|
||||
"query": "",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "my",
|
||||
"pathName": "pages/my/index",
|
||||
"query": "",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "info-edit",
|
||||
"pathName": "pages/my/info-edit/index",
|
||||
"query": "",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "dataCenter",
|
||||
"pathName": "pages/dataCenter/index",
|
||||
"query": "",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "release",
|
||||
"pathName": "pages/release/index",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "setting",
|
||||
"pathName": "pages/setting/index",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"libVersion": "3.8.5"
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user