diff --git a/project.config.json b/project.config.json
index 625d498..1d8faf4 100644
--- a/project.config.json
+++ b/project.config.json
@@ -71,5 +71,5 @@
}
]
},
- "appid": "wxf9ce8010f1ad24aa"
+ "appid": "wx71ac9c27c3c3e3f4"
}
\ No newline at end of file
diff --git a/project.private.config.json b/project.private.config.json
index 6d917db..703c707 100644
--- a/project.private.config.json
+++ b/project.private.config.json
@@ -24,8 +24,8 @@
"list": [
{
"name": "patient/pages/hormonesResult/index",
- "pathName": "patient/pages/hormonesResult/index",
- "query": "medicationMethod=1&oralMonth=2&injectionWeek=0&injectionTimes=0&dosage=5",
+ "pathName": "patient/pages/hormonesStart/index",
+ "query": "",
"scene": null,
"launchMode": "default"
},
diff --git a/src/images/bg36.png b/src/images/bg36.png
index f38bd15..8de8f28 100644
Binary files a/src/images/bg36.png and b/src/images/bg36.png differ
diff --git a/src/pages/d_patientDetail/index.ts b/src/pages/d_patientDetail/index.ts
index f278cb8..9e65e33 100644
--- a/src/pages/d_patientDetail/index.ts
+++ b/src/pages/d_patientDetail/index.ts
@@ -156,6 +156,10 @@ Page({
},
],
+ list4Show: true,
+ list5Show: true,
+ list6Show: true,
+
pagination: {
page: 1,
pages: 1,
@@ -317,7 +321,21 @@ Page({
const list4: any[] = []
const list5: any[] = []
const list6: any[] = []
+ let list4Show = false
+ let list5Show = false
+ let list6Show = false
res.forEach((item: any) => {
+ if (item.dosage) {
+ if (item.medicationMethod == 1) {
+ list4Show = true
+ }
+ if (item.medicationMethod == 2) {
+ list5Show = true
+ }
+ if (item.medicationMethod == 3) {
+ list6Show = true
+ }
+ }
list4.push({
Date: item.recordDate,
value: item.medicationMethod == 1 ? item.dosage : '',
@@ -331,6 +349,11 @@ Page({
value: item.medicationMethod == 3 ? item.dosage : '',
})
})
+ this.setData({
+ list4Show,
+ list5Show,
+ list6Show,
+ })
this.initChartHormone(list4, 'chartComponent4', '#1ec580')
this.initChartHormone(list5, 'chartComponent5', '#B982FF')
diff --git a/src/pages/d_patientDetail/index.wxml b/src/pages/d_patientDetail/index.wxml
index 1fdaf4e..425e1c0 100644
--- a/src/pages/d_patientDetail/index.wxml
+++ b/src/pages/d_patientDetail/index.wxml
@@ -110,23 +110,23 @@
-
+
我的激素周用量记录曲线
-
+
口服
-
+
大剂量冲击治疗
-
+
眶内或眼睑局部注射
diff --git a/src/pages/d_patientHormones/index.scss b/src/pages/d_patientHormones/index.scss
index 96a4565..e8d6c68 100644
--- a/src/pages/d_patientHormones/index.scss
+++ b/src/pages/d_patientHormones/index.scss
@@ -19,7 +19,7 @@ page {
flex-direction: column;
align-items: center;
.line-top {
- height: 58rpx;
+ height: 52rpx;
border-right: 1px dashed rgba(185, 130, 255, 0.29);
}
.side {
diff --git a/src/pages/d_patientHormones/index.wxml b/src/pages/d_patientHormones/index.wxml
index 32da269..b033389 100644
--- a/src/pages/d_patientHormones/index.wxml
+++ b/src/pages/d_patientHormones/index.wxml
@@ -12,7 +12,7 @@
bind:longpress="handleDelete"
>
-
+
diff --git a/src/pages/my/index.ts b/src/pages/my/index.ts
index 30f304a..93bf50b 100644
--- a/src/pages/my/index.ts
+++ b/src/pages/my/index.ts
@@ -15,7 +15,7 @@ Page({
},
onShow() {
app.waitLogin({ type: [2] }).then(() => {
- app.mpBehavior({ doctor:true, PageName: 'PG_DoctorPersonalCenter' })
+ app.mpBehavior({ doctor: true, PageName: 'PG_DoctorPersonalCenter' })
this.getUserInfo()
})
},
@@ -120,7 +120,7 @@ Page({
})
},
handleUserInfo() {
- app.mpBehavior({ doctor:true, PageName: 'BTN_DoctorPersonalCenterInfo' })
+ app.mpBehavior({ doctor: true, PageName: 'BTN_DoctorPersonalCenterInfo' })
wx.navigateTo({
url: '/pages/d_userInfo/index',
})
@@ -131,7 +131,7 @@ Page({
})
},
handleInvite() {
- app.mpBehavior({ doctor:true, PageName: 'BTN_DoctorPersonalCenterCode' })
+ app.mpBehavior({ doctor: true, PageName: 'BTN_DoctorPersonalCenterCode' })
wx.navigateTo({
url: '/pages/d_invite/index',
})
diff --git a/src/patient/pages/hormones/index.scss b/src/patient/pages/hormones/index.scss
index 0a05e58..79a656a 100644
--- a/src/patient/pages/hormones/index.scss
+++ b/src/patient/pages/hormones/index.scss
@@ -30,6 +30,12 @@ page {
text-align: center;
line-height: 68rpx;
}
+ .title-tip{
+ margin-top: 16rpx;
+ font-size: 32rpx;
+ color: #211D2E;
+ text-align: center;
+ }
.spread {
flex: 1;
.num {
@@ -129,23 +135,22 @@ page {
display: flex;
align-items: center;
justify-content: center;
- gap: 32rpx;
+ gap: 16rpx;
line-height: 108rpx;
.input {
padding: 0;
height: 108rpx;
text-align: center;
- min-width: 3em;
- max-width: 4em;
- color: #211D2E;
+ width: 3em;
+ color: #B982FF;
font-size: 40rpx;
}
- .palce-input{
- color: #ADACB2;
+ .palce-input {
+ color: #adacb2;
}
- .sub{
+ .sub {
font-size: 40rpx;
- color: #211D2E;
+ color: #211d2e;
}
}
.description {
@@ -203,14 +208,14 @@ page {
}
.popup {
- padding: 44rpx 40rpx;
+ padding: 44rpx 40rpx 120rpx;
.p-title {
- font-size: 32rpx;
+ font-size: 40rpx;
color: #333333;
font-weight: bold;
}
.input-wrap {
- margin-top: 28rpx;
+ margin-top: 32rpx;
padding: 0 20rpx;
display: flex;
align-items: center;
@@ -219,16 +224,20 @@ page {
.input {
flex: 1;
height: 84rpx;
- font-size: 28rpx;
+ font-size: 40rpx;
+ color: #B982FF;
+ }
+ .input-place{
+ color: #ccc;
}
.sub {
flex-shrink: 0;
- font-size: 28rpx;
- color: #cccccc;
+ font-size: 32rpx;
+ color: #211d2e;
}
}
.p-footer {
- margin-top: 38rpx;
+ margin-top: 68rpx;
padding: 0 24rpx;
display: flex;
align-items: center;
diff --git a/src/patient/pages/hormones/index.ts b/src/patient/pages/hormones/index.ts
index 3d3728b..c252f29 100644
--- a/src/patient/pages/hormones/index.ts
+++ b/src/patient/pages/hormones/index.ts
@@ -1,3 +1,5 @@
+import { isExpressionWithTypeArguments } from 'typescript'
+
const app = getApp()
Page({
@@ -17,6 +19,10 @@ Page({
injectionWeek: '',
injectionTimes: '',
dosage: '',
+
+ custom_injectionWeek: '',
+ custom_injectionTimes: '',
+ custom_dosage: '',
},
question: {
nav0: {
@@ -29,17 +35,19 @@ Page({
},
nav12: {
key: 'dosage',
+ custom_key: 'custom_dosage',
list: {
5: '1片',
10: '2片',
15: '3片',
20: '4片',
25: '5片',
- other: '其他',
+ other: '自定义',
},
},
nav21: {
key: 'injectionWeek',
+ custom_key: 'custom_injectionWeek',
list: {
1: '1周',
2: '2周',
@@ -51,6 +59,7 @@ Page({
},
nav22: {
key: 'dosage',
+ custom_key: 'custom_dosage',
list: {
250: '250mg',
500: '500mg',
@@ -60,6 +69,7 @@ Page({
},
nav31: {
key: 'injectionTimes',
+ custom_key: 'custom_injectionTimes',
list: {
1: '1次',
2: '2次',
@@ -68,6 +78,7 @@ Page({
},
nav32: {
key: 'dosage',
+ custom_key: 'custom_dosage',
list: {
20: '20mg',
30: '30mg',
@@ -83,7 +94,6 @@ Page({
focus: false,
},
onLoad(options) {
- console.log("DEBUGPRINT[139]: index.ts:85: options=", options)
app.waitLogin({ type: [1] }).then(() => {
this.getBaseInfo()
if (Number(options.id) > 0) {
@@ -110,6 +120,7 @@ Page({
})
},
getDetail(id) {
+ const { question } = this.data
wx.ajax({
method: 'GET',
url: '?r=xd/hormone-dosage/get-record',
@@ -117,12 +128,34 @@ Page({
recordId: id,
},
}).then((res) => {
+ let custom_injectionWeek = ''
+ let custom_injectionTimes = ''
+ let custom_dosage = ''
+ if (res.medicationMethod == 2) {
+ if (!Object.keys(question.nav21.list).includes(res.injectionWeek)) {
+ custom_injectionWeek = res.injectionWeek
+ }
+ if (!Object.keys(question.nav22.list).includes(res.dosage)) {
+ custom_dosage = res.dosage
+ }
+ }
+ if (res.medicationMethod == 3) {
+ if (!Object.keys(question.nav31.list).includes(res.injectionTimes)) {
+ custom_injectionTimes = res.injectionTimes
+ }
+ if (!Object.keys(question.nav32.list).includes(res.dosage)) {
+ custom_dosage = res.dosage
+ }
+ }
const form = {
medicationMethod: res.medicationMethod,
- oralMonth: res.oralMonth,
- injectionWeek: res.injectionWeek,
- injectionTimes: res.injectionTimes,
+ oralMonth: res.oralMonth > 0 ? res.oralMonth : '',
+ injectionWeek: res.injectionWeek > 0 ? res.injectionWeek : '',
+ injectionTimes: res.injectionTimes > 0 ? res.injectionTimes : '',
dosage: res.dosage,
+ custom_injectionWeek,
+ custom_injectionTimes,
+ custom_dosage,
}
this.setData({
id,
@@ -131,19 +164,30 @@ Page({
})
},
handleSelect(e) {
- const { key, value } = e.currentTarget.dataset
+ const { key, value, custom } = e.currentTarget.dataset
const { nav } = this.data
+ if (key === 'medicationMethod' && value !== this.data.form.medicationMethod) {
+ this.setData({
+ 'form.dosage': '',
+ 'form.custom_dosage': '',
+ })
+ }
if (value == 'other') {
this.setData({
popupShow: true,
- popupFocus: true,
})
+ setTimeout(() => {
+ this.setData({
+ popupFocus: true,
+ })
+ }, 300)
return
}
this.setData({
[`form.${key}`]: value,
+ [`form.${custom}`]: '',
})
setTimeout(() => {
this.setData({
@@ -162,6 +206,25 @@ Page({
nav: nav - 1,
})
},
+ handleNext() {
+ const { nav } = this.data
+ this.setData({
+ nav: nav + 1,
+ })
+ },
+ handleInput(e) {
+ const { length, key } = e.currentTarget.dataset
+ const value = e.detail.value
+ if (value.length > length) {
+ wx.showToast({
+ icon: 'none',
+ title: '输入数字已超限',
+ })
+ this.setData({
+ [`form.custom_${key}`]: value.slice(0, length),
+ })
+ }
+ },
handleBlur(e) {
const { nav } = this.data
const { key } = e.currentTarget.dataset
@@ -200,11 +263,28 @@ Page({
})
},
handleBack() {
- wx.navigateBack({
- fail() {
- wx.reLaunch({
- url: '/patient/pages/index/index',
- })
+ const { id, form } = this.data
+ const isEmpry = Object.values(form).every(item => !item)
+ if (isEmpry || id) {
+ wx.navigateBack()
+ return
+ }
+ wx.showModal({
+ content: '已答问题将被清空,是否放弃自评?',
+ confirmColor: '#8c75d0',
+ cancelColor: '#141515',
+ cancelText: '放弃',
+ confirmText: '继续',
+ success: (e) => {
+ if (e.cancel) {
+ wx.navigateBack({
+ fail() {
+ wx.reLaunch({
+ url: '/patient/pages/index/index',
+ })
+ },
+ })
+ }
},
})
},
diff --git a/src/patient/pages/hormones/index.wxml b/src/patient/pages/hormones/index.wxml
index c94aef1..2a2c102 100644
--- a/src/patient/pages/hormones/index.wxml
+++ b/src/patient/pages/hormones/index.wxml
@@ -29,6 +29,9 @@
+
+ 下一页
+
@@ -57,7 +60,10 @@
- 上一页
+
+ 上一页
+ 下一页
+
@@ -80,8 +86,9 @@
@@ -96,7 +103,7 @@
- 上一步
+ 上一页
提交
@@ -121,6 +128,7 @@
wx:key="index"
class="lt-item {{form[question['nav21'].key]==index && 'active'}}"
data-key="{{question['nav21'].key}}"
+ data-custom="{{question['nav21'].custom_key}}"
data-value="{{index}}"
bind:tap="handleSelect"
>
@@ -133,17 +141,21 @@
class="input"
placeholder-class="palce-input"
confirm-type="done"
- maxlength="{{2}}"
- placeholder="请输入"
+ data-length="{{2}}"
+ bind:input="handleInput"
+ placeholder="自定义"
cursor-spacing="{{140}}"
data-key="{{question['nav21'].key}}"
- value="{{form[question['nav21'].key]}}"
+ value="{{form[question['nav21'].custom_key]}}"
bindblur="handleBlur"
/>
周
- 上一页
+
+ 上一页
+ 下一页
+
@@ -152,11 +164,7 @@
class="container"
style="background: url('{{imageUrl}}bg38.png?t={{Timestamp}}') no-repeat top center/100%"
>
-
- 最近一周
-
- 您的激素用量
-
+ 最近一周您的激素用量
@@ -176,18 +185,20 @@
class="input"
placeholder-class="palce-input"
confirm-type="done"
- maxlength="{{4}}"
- placeholder="请输入"
+ data-length="{{4}}"
+ bind:input="handleInput"
+ placeholder="自定义"
cursor-spacing="{{140}}"
- value="{{form[question['nav22'].key]}}"
+ value="{{form[question['nav22'].custom_key]}}"
bindblur="handleBlur"
data-key="{{question['nav22'].key}}"
/>
mg
+ 说明:此处按曲安奈德注射剂量计算
- 上一步
+ 上一页
提交
@@ -208,6 +219,7 @@
wx:key="index"
class="l-item {{form[question['nav31'].key]==index && 'active'}}"
data-key="{{question['nav31'].key}}"
+ data-custom="{{question['nav31'].custom_key}}"
data-value="{{index}}"
bind:tap="handleSelect"
>
@@ -220,17 +232,21 @@
class="input"
placeholder-class="palce-input"
confirm-type="done"
- maxlength="{{2}}"
- placeholder="请输入"
+ data-length="{{2}}"
+ bind:input="handleInput"
+ placeholder="自定义"
cursor-spacing="{{140}}"
data-key="{{question['nav31'].key}}"
- value="{{form[question['nav31'].key]}}"
+ value="{{form[question['nav31'].custom_key]}}"
bindblur="handleBlur"
/>
次
- 上一页
+
+ 上一页
+ 下一页
+
@@ -247,6 +263,7 @@
wx:key="index"
class="l-item {{form[question['nav32'].key]==index && 'active'}}"
data-key="{{question['nav32'].key}}"
+ data-custom="{{question['nav32'].custom_key}}"
data-value="{{index}}"
bind:tap="handleSelect"
>
@@ -259,18 +276,20 @@
class="input"
placeholder-class="palce-input"
confirm-type="done"
- maxlength="{{3}}"
- placeholder="请输入"
+ data-length="{{3}}"
+ bind:input="handleInput"
+ placeholder="自定义"
cursor-spacing="{{140}}"
- value="{{form[question['nav32'].key]}}"
+ value="{{form[question['nav32'].custom_key]}}"
bindblur="handleBlur"
data-key="{{question['nav32'].key}}"
/>
mg
+ 说明:此处按曲安奈德注射剂量计算
- 上一步
+ 上一页
提交
@@ -281,19 +300,22 @@