qewwe
This commit is contained in:
parent
878525c143
commit
c36394383e
@ -1,8 +1,8 @@
|
||||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 4945922 */
|
||||
src: url('//at.alicdn.com/t/c/font_4945922_cpk575emof.woff2?t=1749563774878') format('woff2'),
|
||||
url('//at.alicdn.com/t/c/font_4945922_cpk575emof.woff?t=1749563774878') format('woff'),
|
||||
url('//at.alicdn.com/t/c/font_4945922_cpk575emof.ttf?t=1749563774878') format('truetype');
|
||||
src: url('//at.alicdn.com/t/c/font_4945922_srge2kps8c.woff2?t=1749628761058') format('woff2'),
|
||||
url('//at.alicdn.com/t/c/font_4945922_srge2kps8c.woff?t=1749628761058') format('woff'),
|
||||
url('//at.alicdn.com/t/c/font_4945922_srge2kps8c.ttf?t=1749628761058') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
@ -13,6 +13,22 @@
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-jiahao1:before {
|
||||
content: "\e727";
|
||||
}
|
||||
|
||||
.icon-jiahao:before {
|
||||
content: "\e783";
|
||||
}
|
||||
|
||||
.icon-dianzan:before {
|
||||
content: "\e694";
|
||||
}
|
||||
|
||||
.icon-bianji:before {
|
||||
content: "\e67b";
|
||||
}
|
||||
|
||||
.icon-shanchu1:before {
|
||||
content: "\e67d";
|
||||
}
|
||||
@ -20,3 +36,5 @@
|
||||
.icon-xiangji:before {
|
||||
content: "\e609";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -15,8 +15,8 @@ Page({
|
||||
"name": "",
|
||||
"dose": "",
|
||||
"frequency": "",
|
||||
"time": ""
|
||||
}],
|
||||
"time": "饭前"
|
||||
}],
|
||||
end_date: '',
|
||||
reminder: {
|
||||
"morning": "08:00",
|
||||
@ -41,7 +41,8 @@ Page({
|
||||
label: '每日3次',
|
||||
value: '3'
|
||||
}],
|
||||
|
||||
minute: '',
|
||||
startMinute: '2025-04-29 00:00:00',
|
||||
dateVisible: false,
|
||||
minuteVisible: false,
|
||||
date: new Date('2021-12-23').getTime(), // 支持时间戳传入
|
||||
@ -158,15 +159,27 @@ Page({
|
||||
mode2 = mode;
|
||||
this.setData({
|
||||
minuteVisible: true,
|
||||
timeData2: this.data.reminder[mode]
|
||||
timeData2: this.data.reminder[mode],
|
||||
minute: this.data.reminder[mode]
|
||||
});
|
||||
},
|
||||
onConfirm(e){
|
||||
this.setData({
|
||||
minuteVisible: false,
|
||||
[`reminder.${mode2}`]: e.detail.value,
|
||||
});
|
||||
},
|
||||
|
||||
hidePickerMinute(){
|
||||
this.setData({
|
||||
minuteVisible: false,
|
||||
});
|
||||
},
|
||||
onRadioChange(e){
|
||||
const { index } = e.currentTarget.dataset;
|
||||
this.setData({
|
||||
[`detail[${index}].time`]: e.detail.value
|
||||
})
|
||||
},
|
||||
handleSuccess(e) {
|
||||
console.log(e.detail)
|
||||
const { files } = e.detail;
|
||||
@ -187,7 +200,12 @@ Page({
|
||||
console.log(e.detail.file);
|
||||
},
|
||||
|
||||
|
||||
deleteItem(e){
|
||||
const { index } = e.currentTarget.dataset;
|
||||
this.setData({
|
||||
detail: this.data.detail.filter((item, i) => i !== index)
|
||||
})
|
||||
},
|
||||
|
||||
async addData(){
|
||||
const res = await request('/api/v1/patient/add_therapeutic_regimen','post',{
|
||||
|
||||
@ -13,5 +13,6 @@
|
||||
"t-picker": "tdesign-miniprogram/picker/picker",
|
||||
"t-picker-item": "tdesign-miniprogram/picker-item/picker-item"
|
||||
},
|
||||
"navigationBarTitleText": "用药方案"
|
||||
"navigationBarTitleText": "用药方案",
|
||||
"styleIsolation": "apply-shared"
|
||||
}
|
||||
@ -90,6 +90,11 @@
|
||||
.add-btn{
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
.add-btn-yp{
|
||||
text-align: center;
|
||||
color: var(--td-brand-color);
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.delete-btn{
|
||||
text-align: right;
|
||||
margin-bottom: 10rpx;
|
||||
@ -103,5 +108,23 @@
|
||||
line-height: 130rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.day-time{
|
||||
padding: 24rpx;
|
||||
padding-right: 0;
|
||||
}
|
||||
.day-time-item{
|
||||
height: 72rpx;
|
||||
background: rgba(0,91,162,0.1);
|
||||
border-radius: 12rpx;
|
||||
border: 2rpx solid rgba(0,91,162,0.2);
|
||||
line-height: 72rpx;
|
||||
padding: 0 24rpx;
|
||||
position: relative;
|
||||
.iconfont{
|
||||
font-size: 36rpx;
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
color: var(--td-brand-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -29,7 +29,7 @@
|
||||
<view class="yp-info" wx:for="{{detail}}" wx:key="index">
|
||||
<view class="title">
|
||||
<text>药品信息</text>
|
||||
<text class="iconfont icon-shanchu1"></text>
|
||||
<text class="iconfont icon-shanchu1" wx:if="{{detail.length > 1}}" data-index="{{index}}" bindtap="deleteItem"></text>
|
||||
</view>
|
||||
|
||||
<view class="yp-item">
|
||||
@ -37,40 +37,76 @@
|
||||
<t-input bind:change="onInput" data-index="{{index}}" data-mode="dose" label="单次用药剂量" placeholder="请输入" align="right" value="{{item.dose}}" />
|
||||
<!-- <t-input bind:change="onInput" data-index="{{index}}" data-mode="frequency" label="单次频次(每日次数)" placeholder="请输入" align="right" value="{{item.frequency}}" /> -->
|
||||
<t-cell class="{{item.frequency ? 'active':''}}" title="单次频次(每日次数)" arrow bind:click="showSelect" data-index="{{index}}" data-mode="frequency" data-list="{{frequencyList}}" note="{{item.frequency ? (frequencyList[item.frequency - 1].label) : '请选择'}}">
|
||||
</t-cell>
|
||||
</t-cell>
|
||||
|
||||
<view class="day-time">
|
||||
<t-row gutter="12">
|
||||
<t-col span="8">
|
||||
<view class="day-time-item" bindtap="showPickertime" data-mode="morning" >
|
||||
{{reminder.morning}}
|
||||
<text class="iconfont icon-bianji"></text>
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="8">
|
||||
<view class="day-time-item" bindtap="showPickertime" data-mode="noon">
|
||||
{{reminder.noon}}
|
||||
<text class="iconfont icon-bianji"></text>
|
||||
</view>
|
||||
|
||||
</t-col>
|
||||
<t-col span="8">
|
||||
<view class="day-time-item" bindtap="showPickertime" data-mode="evening">
|
||||
{{reminder.evening}}
|
||||
<text class="iconfont icon-bianji"></text>
|
||||
</view>
|
||||
|
||||
</t-col>
|
||||
</t-row>
|
||||
</view>
|
||||
|
||||
<view class="administration-time">
|
||||
<view>饭前/饭后</view>
|
||||
<view class="radio-group">
|
||||
<t-radio-group default-value="0" borderless t-class="box" value="{{item.time}}">
|
||||
<t-radio block="{{false}}" label="饭前" value="0" />
|
||||
<t-radio block="{{false}}" label="饭后" value="1" />
|
||||
<t-radio-group bindchange="onRadioChange" data-index="{{index}}" default-value="饭后" borderless t-class="box" value="{{item.time}}">
|
||||
<t-radio block="{{false}}" label="饭前" value="饭前" />
|
||||
<t-radio block="{{false}}" label="饭后" value="饭后" />
|
||||
</t-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<t-button wx:if="{{index == detail.length - 1}}" class="add-btn" theme="primary" content="" block bindtap="addItem">+添加用药</t-button>
|
||||
</view>
|
||||
<view class="therapeuticRegimen-item">
|
||||
<view class="title">用药时间提醒</view>
|
||||
<view class="reminder-time">
|
||||
<view class="label">早上</view>
|
||||
<t-input placeholder="请输入" bindtap="showPickertime" value="{{reminder.morning}}" size="small" borderless="{{true}}" style="{{style}}" data-mode="morning" suffixIcon="{{ { name: 'calendar-1', ariaLabel: '通讯录' } }}" />
|
||||
</view>
|
||||
<view class="reminder-time">
|
||||
<view class="label">中午</view>
|
||||
<t-input placeholder="请输入" bindtap="showPickertime" value="{{reminder.noon}}" size="small" borderless="{{true}}" style="{{style}}" data-mode="noon" suffixIcon="{{ { name: 'calendar-1', ariaLabel: '通讯录' } }}" />
|
||||
</view>
|
||||
<view class="reminder-time">
|
||||
<view class="label">晚上</view>
|
||||
<t-input placeholder="请输入" bindtap="showPickertime" value="{{reminder.evening}}" size="small" borderless="{{true}}" style="{{style}}" data-mode="evening" suffixIcon="{{ { name: 'calendar-1', ariaLabel: '通讯录' } }}" />
|
||||
</view>
|
||||
<view class="add-btn-yp" wx:if="{{index == detail.length - 1}}" bindtap="addItem"><text class="iconfont icon-jiahao"></text>添加用药</view>
|
||||
<!-- <t-button class="add-btn" theme="primary" content="" block bindtap="addItem">+添加用药</t-button> -->
|
||||
</view>
|
||||
|
||||
<t-button class="add-btn" theme="primary" content="" block bind:tap="saveData">保存</t-button>
|
||||
<t-date-time-picker auto-close bind:cancel="hidePicker" bind:change="onPickerChange" cancelBtn="取消" confirmBtn="确认" data-mode="birth" defaultValue="{{timeData}}" end="{{birthEnd}}" filter="{{birthFilter}}" format="YYYY-MM-DD" mode="date" popup-props="{{ { usingCustomNavbar: true } }}" start="{{birthStart}}" title="选择日期" value="{{timeData}}" visible="{{birthVisible}}" />
|
||||
<t-date-time-picker
|
||||
auto-close
|
||||
bind:cancel="hidePicker"
|
||||
bind:change="onPickerChange"
|
||||
cancelBtn="取消"
|
||||
confirmBtn="确认"
|
||||
data-mode="birth"
|
||||
defaultValue="{{timeData}}"
|
||||
end="{{birthEnd}}"
|
||||
filter="{{birthFilter}}"
|
||||
format="YYYY-MM-DD"
|
||||
mode="date"
|
||||
popup-props="{{ { usingCustomNavbar: true } }}"
|
||||
start="{{birthStart}}"
|
||||
title="选择日期" value="{{timeData}}" visible="{{birthVisible}}" />
|
||||
|
||||
<!-- 时分 -->
|
||||
<t-date-time-picker title="选择时间" visible="{{minuteVisible}}" mode="{{['null', 'minute']}}" start="{{start}}" value="{{minute}}" defaultValue="{{timeData2}}" format="HH:mm" bindchange="onConfirm" bindpick="onColumnChange" bindcancel="hidePicker" />
|
||||
<t-date-time-picker
|
||||
title="选择时间"
|
||||
visible="{{minuteVisible}}"
|
||||
mode="{{['null', 'minute']}}"
|
||||
start="{{startMinute}}"
|
||||
value="{{minute}}"
|
||||
defaultValue="{{timeData2}}"
|
||||
format="HH:mm"
|
||||
bindchange="onConfirm"
|
||||
bindpick="onColumnChange"
|
||||
bindcancel="hidePickerMinute" />
|
||||
|
||||
<!-- 下拉选择 -->
|
||||
<t-picker
|
||||
|
||||
189
pages/followUp copy/index.js
Normal file
189
pages/followUp copy/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: 1,
|
||||
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 copy/index.json
Normal file
15
pages/followUp copy/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 copy/index.less
Normal file
42
pages/followUp copy/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;
|
||||
}
|
||||
}
|
||||
47
pages/followUp copy/index.wxml
Normal file
47
pages/followUp copy/index.wxml
Normal file
@ -0,0 +1,47 @@
|
||||
<!--pages/followUp/index.wxml-->
|
||||
<view class="follow-up">
|
||||
|
||||
<view class="follow-item">
|
||||
<view>胆囊</view>
|
||||
|
||||
<view class="wrapper">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 请裁剪原始超声图像,使胆囊在画面中尽可能充满整个图像,如右图所示</view>
|
||||
</view>
|
||||
<t-upload media-type="{{['image']}}" max="{{1}}" files="{{originFiles}}" gridConfig="{{gridConfig}}" removeBtn="{{false}}" bind:success="handleSuccess" bind:remove="handleRemove" bind:click="handleClick" bind:sort-end="handleSortEnd" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="follow-item">
|
||||
<view>
|
||||
门静脉左右分支</view>
|
||||
|
||||
<view class="wrapper">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 请裁剪原始超声图像,使门静脉(cord sign)的左右分支或其潜在区域在画面中最大化填充,如右图所示</view>
|
||||
</view>
|
||||
<t-upload media-type="{{['image']}}" max="{{1}}" files="{{originFiles}}" gridConfig="{{gridConfig}}" removeBtn="{{false}}" bind:success="handleSuccess" bind:remove="handleRemove" bind:click="handleClick" bind:sort-end="handleSortEnd" />
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
<view class="follow-item">
|
||||
<view>
|
||||
门静脉右支横截</view>
|
||||
|
||||
<view class="wrapper">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label"> 请裁剪原始超声图像,使肝门区(cord sign)的横切面或其潜在区域在画面中最大化填充,如右图所示</view>
|
||||
</view>
|
||||
<t-upload media-type="{{['image']}}" max="{{1}}" 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>
|
||||
|
||||
|
||||
</view>
|
||||
Loading…
x
Reference in New Issue
Block a user