From 853c69aa7b0783ec7411318925a858be87327c42 Mon Sep 17 00:00:00 2001 From: kola-web Date: Tue, 30 Dec 2025 14:18:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BF=80=E7=B4=A0=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + README.md | 14 +- project.private.config.json | 28 + src/app.json | 13 +- src/pages/d_patientDetail/index.scss | 58 +- src/pages/d_patientDetail/index.ts | 210 ++++++- src/pages/d_patientDetail/index.wxml | 27 + src/pages/d_patientHormones/index.ts | 23 +- src/pages/d_patientHormones/index.wxml | 23 +- src/patient/pages/adl/index.json | 6 - src/patient/pages/adl/index.scss | 223 ------- src/patient/pages/adl/index.ts | 110 ---- src/patient/pages/adl/index.wxml | 74 --- src/patient/pages/adlResult/index.json | 8 - src/patient/pages/adlResult/index.scss | 614 ------------------- src/patient/pages/adlResult/index.ts | 272 --------- src/patient/pages/adlResult/index.wxml | 371 ------------ src/patient/pages/adlShare/index.json | 7 - src/patient/pages/adlShare/index.scss | 35 -- src/patient/pages/adlShare/index.ts | 134 ----- src/patient/pages/adlShare/index.wxml | 14 - src/patient/pages/adlTest/index.json | 11 - src/patient/pages/adlTest/index.scss | 334 ----------- src/patient/pages/adlTest/index.ts | 412 ------------- src/patient/pages/adlTest/index.wxml | 101 ---- src/patient/pages/doctorDetail/index.ts | 75 +-- src/patient/pages/hormones/index.json | 5 +- src/patient/pages/hormones/index.scss | 257 ++++++++ src/patient/pages/hormones/index.ts | 213 ++++++- src/patient/pages/hormones/index.wxml | 307 +++++++++- src/patient/pages/hormonesResult/index.scss | 12 +- src/patient/pages/hormonesResult/index.ts | 39 +- src/patient/pages/hormonesResult/index.wxml | 127 ++-- src/patient/pages/index/index.scss | 34 ++ src/patient/pages/index/index.ts | 18 + src/patient/pages/index/index.wxml | 16 + src/patient/pages/nrdl/index.json | 13 - src/patient/pages/nrdl/index.scss | 286 --------- src/patient/pages/nrdl/index.ts | 446 -------------- src/patient/pages/nrdl/index.wxml | 248 -------- src/patient/pages/nrdlDetail/index.json | 7 - src/patient/pages/nrdlDetail/index.scss | 10 - src/patient/pages/nrdlDetail/index.ts | 94 --- src/patient/pages/nrdlDetail/index.wxml | 21 - src/patient/pages/nrdlTable/index.json | 7 - src/patient/pages/nrdlTable/index.scss | 63 -- src/patient/pages/nrdlTable/index.ts | 876 ---------------------------- src/patient/pages/nrdlTable/index.wxml | 29 - src/patient/pages/qolReport/index.scss | 71 +++ src/patient/pages/qolReport/index.ts | 173 +++++- src/patient/pages/qolReport/index.wxml | 68 ++- 51 files changed, 1625 insertions(+), 5013 deletions(-) delete mode 100644 src/patient/pages/adl/index.json delete mode 100644 src/patient/pages/adl/index.scss delete mode 100644 src/patient/pages/adl/index.ts delete mode 100644 src/patient/pages/adl/index.wxml delete mode 100644 src/patient/pages/adlResult/index.json delete mode 100644 src/patient/pages/adlResult/index.scss delete mode 100644 src/patient/pages/adlResult/index.ts delete mode 100644 src/patient/pages/adlResult/index.wxml delete mode 100644 src/patient/pages/adlShare/index.json delete mode 100644 src/patient/pages/adlShare/index.scss delete mode 100644 src/patient/pages/adlShare/index.ts delete mode 100644 src/patient/pages/adlShare/index.wxml delete mode 100644 src/patient/pages/adlTest/index.json delete mode 100644 src/patient/pages/adlTest/index.scss delete mode 100644 src/patient/pages/adlTest/index.ts delete mode 100644 src/patient/pages/adlTest/index.wxml delete mode 100644 src/patient/pages/nrdl/index.json delete mode 100644 src/patient/pages/nrdl/index.scss delete mode 100644 src/patient/pages/nrdl/index.ts delete mode 100644 src/patient/pages/nrdl/index.wxml delete mode 100644 src/patient/pages/nrdlDetail/index.json delete mode 100644 src/patient/pages/nrdlDetail/index.scss delete mode 100644 src/patient/pages/nrdlDetail/index.ts delete mode 100644 src/patient/pages/nrdlDetail/index.wxml delete mode 100644 src/patient/pages/nrdlTable/index.json delete mode 100644 src/patient/pages/nrdlTable/index.scss delete mode 100644 src/patient/pages/nrdlTable/index.ts delete mode 100644 src/patient/pages/nrdlTable/index.wxml diff --git a/.gitignore b/.gitignore index f0f94c2..c227783 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ node_modules src/images/.svn +src/images/ .idea .DS_Store diff --git a/README.md b/README.md index 0e49e6d..c318e3a 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,13 @@ svn://39.106.86.127:28386/projects/xd/proj_src/shop/frontend/web/xd svn://39.106.86.127:28386/projects/xd/proj_src/branches/dev_v2.0/shop/frontend/web/xd/ ## vscode -(/images/)(\S*(?=["|'])) + +(/images/)(\S\*(?=["|'])) {{imageUrl}}$2?t={{Timestamp}} ## neovim -(/images/)([^\"|']*) + +(/images/)([^\"|']\*) {{imageUrl}}$2?t={{Timestamp}} ui问题 @@ -34,3 +36,11 @@ wx.showModal({ 审核账号 18910233000 1111 + +正整数 3 + +正整数 2 +正整数 4 + +正整数 2 +正整数 3 diff --git a/project.private.config.json b/project.private.config.json index 82e04cc..6d917db 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -23,6 +23,34 @@ "miniprogram": { "list": [ { + "name": "patient/pages/hormonesResult/index", + "pathName": "patient/pages/hormonesResult/index", + "query": "medicationMethod=1&oralMonth=2&injectionWeek=0&injectionTimes=0&dosage=5", + "scene": null, + "launchMode": "default" + }, + { + "name": "医生-激素用药详情", + "pathName": "pages/d_patientHormones/index", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "激素量表-结果页", + "pathName": "patient/pages/hormonesResult/index", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "激素量表", + "pathName": "patient/pages/hormones/index", + "query": "", + "launchMode": "default", + "scene": null + }, + { "name": "药房", "pathName": "gift/pages/dtpDurg/index", "query": "id=10", diff --git a/src/app.json b/src/app.json index 1644d3c..49a5b8d 100644 --- a/src/app.json +++ b/src/app.json @@ -14,7 +14,8 @@ "pages/d_patientDetail/index", "pages/d_userInfo/index", "pages/d_invite/index", - "pages/d_patient/index" + "pages/d_patient/index", + "pages/d_patientHormones/index" ], "subPackages": [ { @@ -52,10 +53,6 @@ "pages/liveResult/index", "pages/liveDetailVideo/index", "pages/signIn/index", - "pages/adl/index", - "pages/adlShare/index", - "pages/adlTest/index", - "pages/adlResult/index", "pages/smallPage/index", "pages/hospital/index", "pages/doctor/index", @@ -63,16 +60,14 @@ "pages/drugRecord/index", "pages/comIns/index", "pages/webview/index", - "pages/nrdl/index", - "pages/nrdlDetail/index", "pages/infusionCenter/index", - "pages/nrdlTable/index", "pages/interactivePatient/index", "pages/qol/index", "pages/qolAdd/index", "pages/qolResult/index", "pages/qolReport/index", - "pages/hormones/index" + "pages/hormones/index", + "pages/hormonesResult/index" ] }, { diff --git a/src/pages/d_patientDetail/index.scss b/src/pages/d_patientDetail/index.scss index 62da153..233b6c0 100644 --- a/src/pages/d_patientDetail/index.scss +++ b/src/pages/d_patientDetail/index.scss @@ -5,6 +5,7 @@ page { width: 100vw; overflow-x: hidden; min-height: 100vh; + padding-bottom: 220rpx; .banner { margin: 40rpx 30rpx 0; padding: 0 20rpx; @@ -410,8 +411,8 @@ page { align-items: center; justify-content: center; font-size: 32rpx; - color: #69686E; - background-color: #FFFFFF; + color: #69686e; + background-color: #ffffff; border-radius: 34rpx; .icon { width: 24rpx; @@ -423,9 +424,9 @@ page { display: flex; align-items: center; font-size: 32rpx; - color: #69686E; + color: #69686e; border-radius: 34rpx; - background-color: #FFFFFF; + background-color: #ffffff; .icon { width: 24rpx; height: 24rpx; @@ -437,17 +438,66 @@ page { padding: 32rpx; background-color: #fff; border-radius: 24rpx; + &.chart-card-legend { + .chart { + padding-top: 40rpx; + } + } .title { font-size: 32rpx; color: #211d2e; font-weight: bold; } .chart { + position: relative; height: 420rpx; + .legend { + position: absolute; + top: 0; + right: 0; + display: flex; + align-items: center; + gap: 12rpx; + justify-content: flex-end; + .dot { + width: 18rpx; + height: 18rpx; + border-radius: 50%; + &.dot4 { + background-color: #1ec580; + } + &.dot5 { + background-color: #b982ff; + } + &.dot6 { + background-color: #ffa300; + } + } + } } } } } +.page-footer { + position: fixed; + bottom: 0; + left: 0; + z-index: 10; + width: 100%; + padding: 20rpx 40rpx calc(env(safe-area-inset-bottom) + 20rpx); + box-sizing: border-box; + background-color: #fff; + .pf-btn { + height: 88rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 32rpx; + color: #ffffff; + background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%); + border-radius: 100rpx 100rpx 100rpx 100rpx; + } +} .popup-remark { padding: 32rpx 30rpx 84rpx; diff --git a/src/pages/d_patientDetail/index.ts b/src/pages/d_patientDetail/index.ts index f70af37..f5c7726 100644 --- a/src/pages/d_patientDetail/index.ts +++ b/src/pages/d_patientDetail/index.ts @@ -165,11 +165,17 @@ Page({ chartComponent1: null as any, chartComponent2: null as any, chartComponent3: null as any, + chartComponent4: null as any, + chartComponent5: null as any, + chartComponent6: null as any, async onLoad(option) { echarts = await require.async('../../gift/compontnts/echart/echarts.js') this.chartComponent1 = this.selectComponent('#chart1') this.chartComponent2 = this.selectComponent('#chart2') this.chartComponent3 = this.selectComponent('#chart3') + this.chartComponent4 = this.selectComponent('#chart4') + this.chartComponent5 = this.selectComponent('#chart5') + this.chartComponent6 = this.selectComponent('#chart6') this.setData({ id: option.id, }) @@ -210,8 +216,8 @@ Page({ res.LastAdlTimeName = dayjs(res.LastAdlTime).from(dayjs().format('YYYY-MM-DD')).replace(' ', '') } if (res.LastUseDrugsTime) { - res.LastUseDrugsTimeName = - dayjs().format('YYYY-MM-DD') === res.LastUseDrugsTime + res.LastUseDrugsTimeName + = dayjs().format('YYYY-MM-DD') === res.LastUseDrugsTime ? '' : dayjs(res.LastUseDrugsTime).from(dayjs().format('YYYY-MM-DD')).replace(' ', '') } @@ -240,10 +246,12 @@ Page({ if (type === '1') { EndDate = dayjs().format('YYYY-MM-DD') StartDate = dayjs().subtract(6, 'd').format('YYYY-MM-DD') - } else if (type === '2') { + } + else if (type === '2') { EndDate = dayjs().format('YYYY-MM') StartDate = dayjs().subtract(1, 'M').format('YYYY-MM') - } else if (type === '3') { + } + else if (type === '3') { EndDate = dayjs().format('YYYY') StartDate = dayjs().subtract(1, 'y').format('YYYY') } @@ -254,6 +262,7 @@ Page({ StartDate, }) this.getGraph() + this.getHormoneData() }, getGraph() { const { type, StartDate, EndDate } = this.data @@ -262,8 +271,8 @@ Page({ url: '?r=xd/doctor/qol/graph', data: { DateType: type, - StartDate: StartDate, - EndDate: EndDate, + StartDate, + EndDate, count: 0, PatientId: this.data.id, }, @@ -291,6 +300,42 @@ Page({ this.initChart(list2, 'chartComponent3') }) }, + getHormoneData() { + const { type, StartDate, EndDate } = this.data + wx.ajax({ + method: 'GET', + url: '?r=xd/doctor/hormone-dosage/graph', + data: { + DateType: type, + StartDate, + EndDate, + PatientId: this.data.id, + count: 0, + }, + }).then((res) => { + const list4: any[] = [] + const list5: any[] = [] + const list6: any[] = [] + res.forEach((item: any) => { + list4.push({ + Date: item.recordDate, + value: item.medicationMethod == 1 ? item.dosage : '', + }) + list5.push({ + Date: item.recordDate, + value: item.medicationMethod == 2 ? item.dosage : '', + }) + list6.push({ + Date: item.recordDate, + value: item.medicationMethod == 3 ? item.dosage : '', + }) + }) + + this.initChartHormone(list4, 'chartComponent4', '#1ec580') + this.initChartHormone(list5, 'chartComponent5', '#B982FF') + this.initChartHormone(list6, 'chartComponent6', '#FFA300') + }) + }, initChart(defaultList = [] as any[], key) { return new Promise((reslove) => { this[key].init((canvas, width, height, dpr) => { @@ -352,7 +397,7 @@ Page({ color: 'rgba(137, 141, 151, 0.23)', }, }, - data: defaultList.map((item) => dayjs(item.Date).format('MM-DD')), + data: defaultList.map(item => dayjs(item.Date).format('MM-DD')), }, ], yAxis: [ @@ -380,7 +425,7 @@ Page({ series: [ { name: '总分', - data: defaultList.length ? defaultList.map((item) => item.value) : [25], + data: defaultList.length ? defaultList.map(item => item.value) : [25], barWidth: '16', label: { show: true, @@ -446,6 +491,127 @@ Page({ }) }) }, + initChartHormone(defaultList = [] as any[], key, color) { + return new Promise((reslove) => { + this[key].init((canvas, width, height, dpr) => { + const chart = echarts.init(canvas, null, { + width, + height, + devicePixelRatio: dpr, // new + }) + canvas.setChart(chart) + + const option: any = { + tooltip: { + show: false, + trigger: 'axis', + axisPointer: { + type: 'shadow', + }, + confine: true, + backgroundColor: 'rgba(0, 0, 0, 0.5)', + textStyle: { + color: '#fff', + fontSize: 10, + }, + order: 'seriesDesc', + }, + grid: { + top: '30', + left: '0', + right: '0', + bottom: '10', + containLabel: true, + }, + xAxis: [ + { + type: 'category', + axisTick: { + show: false, + inside: true, + length: 1, + alignWithLabel: true, + lineStyle: { + type: 'dotted', + color: '#D8D8D8', + width: 4, + cap: 'round', + }, + }, + axisLine: { + lineStyle: { + color: '#8C8C8C', + type: 'dashed', + }, + }, + splitLine: { + show: true, + showMinLine: false, + lineStyle: { + type: 'dotted', + color: 'rgba(137, 141, 151, 0.23)', + }, + }, + data: defaultList.map(item => dayjs(item.Date).format('MM-DD')), + }, + ], + yAxis: [ + { + type: 'value', + minInterval: 20, + min: 0, + axisLine: { + show: false, + lineStyle: { + type: 'solid', + color: 'rgba(161, 164, 172, 1)', + }, + }, + splitLine: { + show: true, + showMinLine: false, + lineStyle: { + type: 'dotted', + color: 'rgba(137, 141, 151, 0.23)', + }, + }, + }, + ], + series: [ + { + name: '总分', + data: defaultList.length ? defaultList.map(item => item.value) : [25], + barWidth: '16', + label: { + show: true, + position: 'top', + color, + fontSize: 14, + }, + type: 'line', + symbolSize: 4, + showSymbol: defaultList.length >= 1, + connectNulls: true, + z: 10, + itemStyle: { + color, + }, + }, + ], + dataZoom: { + type: 'inside', // 有type这个属性,滚动条在最下面,也可以不行,写y:36,这表示距离顶端36px,一般就是在图上面。 + startValue: 0, + endValue: 4, + filterMode: 'none', + }, + } + + chart.setOption(option) + reslove(chart) + return chart + }) + }) + }, handleRemark() { this.setData({ popupRemarkShow: true, @@ -510,12 +676,12 @@ Page({ method: 'POST', url: '?r=zd/doctor/patient/update', data: { - PatientId: detail.PatientId, //患者Id - AntibodyType: detail.AntibodyType, //抗体类型 1:AChR 2:Musk 3:LRP4 4:RYR - ThyroidAbnormal: detail.ThyroidAbnormal, //胸腺异常 1:是 2:否 - PreviousConvulsion: detail.PreviousConvulsion, //既往发生危象 1:是 2:否 - TraditionalImmunosuppressant: detail.TraditionalImmunosuppressant, //传统免疫抑制剂 1:特克莫苏 2:硫唑嘌呤 3:马替麦考酚酯 4:其他 - MedicalInsuranceType: detail.MedicalInsuranceType, //医保类型 1:城市职工 2:城市居民 3:新农合 + PatientId: detail.PatientId, // 患者Id + AntibodyType: detail.AntibodyType, // 抗体类型 1:AChR 2:Musk 3:LRP4 4:RYR + ThyroidAbnormal: detail.ThyroidAbnormal, // 胸腺异常 1:是 2:否 + PreviousConvulsion: detail.PreviousConvulsion, // 既往发生危象 1:是 2:否 + TraditionalImmunosuppressant: detail.TraditionalImmunosuppressant, // 传统免疫抑制剂 1:特克莫苏 2:硫唑嘌呤 3:马替麦考酚酯 4:其他 + MedicalInsuranceType: detail.MedicalInsuranceType, // 医保类型 1:城市职工 2:城市居民 3:新农合 }, }).then(() => { wx.showToast({ @@ -552,9 +718,11 @@ Page({ let grade = 1 if (item.TotalScore < 5) { grade = 1 - } else if (item.TotalScore >= 5 && item.TotalScore < 15) { + } + else if (item.TotalScore >= 5 && item.TotalScore < 15) { grade = 2 - } else { + } + else { grade = 3 } item.grade = grade @@ -589,7 +757,6 @@ Page({ wx.navigateBack() }, handleToggleTel() { - console.log(11111) this.setData({ showTel: !this.data.showTel, }) @@ -600,9 +767,9 @@ Page({ method: 'POST', url: '?r=zd/doctor/patient/set-edc', data: { patientId: this.data.detail.PatientId }, - }).then((res) => { + }).then(() => { this.setData({ - ['detail.IsEDC']: this.data.detail.IsEDC == 1 ? 2 : 1, + 'detail.IsEDC': this.data.detail.IsEDC == 1 ? 2 : 1, }) wx.showToast({ icon: 'none', @@ -610,4 +777,9 @@ Page({ }) }) }, + handleHormones() { + wx.navigateTo({ + url: `/pages/d_patientHormones/index?id=${this.data.detail.PatientId}&name=${this.data.detail.Name}`, + }) + }, }) diff --git a/src/pages/d_patientDetail/index.wxml b/src/pages/d_patientDetail/index.wxml index e904853..1fdaf4e 100644 --- a/src/pages/d_patientDetail/index.wxml +++ b/src/pages/d_patientDetail/index.wxml @@ -110,8 +110,35 @@ + + 我的激素周用量记录曲线 + + + + 口服 + + + + + + + 大剂量冲击治疗 + + + + + + + 眶内或眼睑局部注射 + + + + + + 查看激素用药详情 + () +const app = getApp() Page({ data: { - list: [ - { - date: '2025-09-02', - }, - ], + id: '', + name: '', + list: [], pagination: { page: 1, pages: 1, count: 1, }, }, - onLoad() {}, + onLoad(options) { + app.waitLogin({ type: [2] }).then(async (_res) => { + this.setData({ + id: options.id, + name: options.name, + }) + this.getList() + }) + }, getList(newPage = 1) { wx.ajax({ method: 'GET', - url: '?r=xd/qol/list', + url: '?r=xd/doctor/hormone-dosage/list', data: { + patientId: this.data.id, page: newPage, }, }).then((res) => { diff --git a/src/pages/d_patientHormones/index.wxml b/src/pages/d_patientHormones/index.wxml index 972673b..896359c 100644 --- a/src/pages/d_patientHormones/index.wxml +++ b/src/pages/d_patientHormones/index.wxml @@ -1,6 +1,6 @@ - xxx的激素用药详情 + {{name}}的激素用药详情 - {{item.date}} + {{item.recordDate}} 最近一周激素治疗方式 - 口服 + {{item.medicationMethodName}} 每日用药量 - 30mg + {{item.dosage}}mg - - 已进行的治疗疗程 - 3周 + + + 已持续口服 + {{item.oralMonthName}} + + +
已进行的治疗疗程
+ {{item.injectionWeek}}周 +
+ +
已注射次数
+ {{item.injectionTimes}}次
diff --git a/src/patient/pages/adl/index.json b/src/patient/pages/adl/index.json deleted file mode 100644 index eced12c..0000000 --- a/src/patient/pages/adl/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "usingComponents": { - "navBar": "/components/zd-navBar/navBar", - "free-audio": "/components/freeAudio/index" - } -} diff --git a/src/patient/pages/adl/index.scss b/src/patient/pages/adl/index.scss deleted file mode 100644 index 95615b2..0000000 --- a/src/patient/pages/adl/index.scss +++ /dev/null @@ -1,223 +0,0 @@ -.page { - background-color: #fafafa; - .page-container { - padding: 20rpx 50rpx 40rpx; - .title { - font-size: 45rpx; - color: #e04775; - font-weight: bold; - line-height: 60rpx; - } - .sub-title { - font-size: 34rpx; - color: #484848; - line-height: 60rpx; - font-weight: bold; - } - .banner { - margin-top: 10rpx; - width: 100%; - height: 246rpx; - } - .rule { - position: relative; - z-index: 1; - margin-top: 20rpx; - border-radius: 24rpx; - background-color: #fff; - border: 1rpx solid rgba(39, 58, 101, 0.1); - .r-header { - padding-left: 30rpx; - width: 670rpx; - height: 69rpx; - display: flex; - align-items: center; - font-size: 32rpx; - color: #ffffff; - background: linear-gradient(278deg, rgba(242, 125, 173, 0) 0%, #e04775 100%); - border-radius: 24rpx 24rpx 0rpx 0rpx; - } - .r-container { - .row { - padding: 22rpx; - display: flex; - .icon { - width: 62rpx; - height: 62rpx; - } - .wrap { - padding-left: 7rpx; - .w-title { - font-size: 30rpx; - color: #cf5375; - font-weight: bold; - } - .w-content { - font-size: 24rpx; - color: #999999; - .blod { - color: #484848; - } - } - } - } - .line { - margin: 0 auto; - width: 610rpx; - height: 1rpx; - background-color: #e0e3e9; - opacity: 0.8; - } - } - } - .page-tip { - margin-top: -20rpx; - padding: 30rpx 10rpx 10rpx; - text-align: center; - font-size: 28rpx; - color: rgba(161, 85, 10, 1); - background: linear-gradient(90deg, #fff4cf 0%, rgba(255, 244, 207, 0.76) 100%); - border-radius: 0 0 24rpx 24rpx; - } - .question { - padding: 25rpx; - margin-top: 20rpx; - border-radius: 24rpx; - border: 1px solid rgba(39, 58, 101, 0.1); - background-color: #fff; - .poster { - position: relative; - width: 100%; - height: 348rpx; - border-radius: 24rpx; - } - .play { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - width: 80rpx; - height: 80rpx; - } - .q-title { - margin-top: 24rpx; - text-align: center; - font-size: 28rpx; - color: #464646; - } - } - .module { - padding: 17rpx; - display: grid; - grid-template-columns: repeat(4, 1fr); - gap: 15rpx; - background-color: rgba(255, 255, 255, 0.9); - border-radius: 24rpx; - border: 1px solid #d5dce1; - .item { - text-align: center; - .icon { - width: 96rpx; - height: 96rpx; - } - .name { - font-size: 24rpx; - color: #aaaaaa; - } - } - } - .container { - margin-top: 40rpx; - padding: 49rpx 32rpx; - background-color: rgba(255, 255, 255, 0.9); - border: 1px solid #d5dce1; - border-radius: 24rpx; - .content { - margin-top: 33rpx; - padding-left: 40rpx; - font-size: 24rpx; - color: #aaaaaa; - } - } - .footer { - padding-top: 40rpx; - display: flex; - .share { - width: 176rpx; - height: 80rpx; - font-size: 34rpx; - font-weight: bold; - color: #cf5375; - border-radius: 24rpx 24rpx 24rpx 24rpx; - opacity: 1; - border: 2rpx solid #e04775; - text-align: center; - box-sizing: border-box; - line-height: 78rpx; - background-color: transparent; - margin: 0; - margin-right: 32rpx; - &::after { - border: none; - outline: none; - } - } - .test { - position: relative; - flex: 1; - height: 80rpx; - font-size: 34rpx; - color: #ffffff; - text-align: center; - line-height: 80rpx; - background: #cf5375; - border-radius: 24rpx 24rpx 24rpx 24rpx; - .money { - padding: 0 20rpx; - position: absolute; - top: -5rpx; - left: 50%; - transform: translate(-50%, -100%); - background-color: #ffefd0; - font-size: 24rpx; - color: #f5ad1d; - line-height: 50rpx; - display: flex; - align-items: center; - justify-content: center; - border-radius: 12rpx; - .icon { - margin-right: 10rpx; - width: 34rpx; - height: 36rpx; - } - &::after { - position: absolute; - bottom: 0; - left: 50%; - transform: translate(-50%, 100%); - content: ''; - width: 0; - height: 0; - border-style: solid; - border-width: 10rpx 10rpx 0 10rpx; - border-color: #ffefd0 transparent transparent transparent; - } - } - } - } - .footer-tip { - margin-top: 40rpx; - text-align: center; - font-size: 24rpx; - color: #aaaaaa; - } - } -} - -.video { - position: relative; - width: 100%; - height: 0; - border-radius: 24rpx; -} diff --git a/src/patient/pages/adl/index.ts b/src/patient/pages/adl/index.ts deleted file mode 100644 index 9afcf05..0000000 --- a/src/patient/pages/adl/index.ts +++ /dev/null @@ -1,110 +0,0 @@ -const app = getApp(); - -Page({ - data: { - pageShow: false, - audio: { - url: 'https://voice-hb.oss-cn-beijing.aliyuncs.com/zaiding/voice_1690445548-5.mp3', - size: 50, - }, - zdUserInfo: {}, - - m_d: '', - nrdl: '', - - rewardScore: undefined, - - bottom: wx.getMenuButtonBoundingClientRect().bottom, - }, - videoContext: null as WechatMiniprogram.VideoContext | null, - async onLoad(options) { - await this.handleScene(options); - - this.videoContext = wx.createVideoContext('video'); - - this.setData({ - m_d: options.m_d, - nrdl: options.nrdl, - }); - app.waitLogin({ type: [0, 1] }).then(() => { - - app.getZdUserInfo(this, true); - this.getAdlScore(); - if (options.adlPushId) { - wx.ajax({ - method: 'POST', - url: '?r=zd/push-click/adl-push-click', - data: { adlPushId: options.adlPushId }, - }); - } - if (options.es === '201502') { - app.globalData.IsAliQiWei = 1; - - } - }); - }, - // 拦截通过小程序码进入的场景 - handleScene(options: any) { - return new Promise((resolve) => { - console.log(options); - const { scene, ...reset } = wx.getLaunchOptionsSync(); - console.log(scene); - console.log(reset); - if ( - [1047, 1048, 1049, 1089].includes(scene) && - options.scene?.includes('doctorId') && - options.scene?.includes('inviteChan') - ) { - app.zdPermissionVerification(3, 15, `/patient/pages/index/index`).then(() => { - wx.reLaunch({ - url: '/patient/pages/index/index', - }); - }); - } else { - resolve(true); - } - }); - }, - getAdlScore() { - wx.ajax({ - method: 'GET', - url: '?r=zd/adl/get-score', - data: {}, - }).then((res) => { - this.setData({ - rewardScore: res.rewardScore, - }); - }); - }, - handlePlay() { - this.videoContext?.play(); - this.videoContext?.requestFullScreen({}); - }, - handleFullScreen(e) { - if (!e.detail.fullScreen) { - this.videoContext?.pause(); - this.videoContext?.seek(0); - } - }, - handleShare() { - - wx.navigateTo({ - url: '/patient/pages/adlShare/index', - }); - }, - handleTest() { - - wx.navigateTo({ - url: `/patient/pages/adlTest/index?m_d=${this.data.m_d}&nrdl=${this.data.nrdl}`, - }); - }, - handleBack() { - wx.navigateBack(); - }, - onShareAppMessage() { - return { - title: 'MG-ADL测评表:评估重症肌无力患者症状对生活质量的影响', - path: '/patient/pages/adl/index', - }; - }, -}); diff --git a/src/patient/pages/adl/index.wxml b/src/patient/pages/adl/index.wxml deleted file mode 100644 index 18a1ff1..0000000 --- a/src/patient/pages/adl/index.wxml +++ /dev/null @@ -1,74 +0,0 @@ - - - - 国际权威机构建议 - 重症肌无力治疗追求“双达标” - - - 什么是“双达标” - - - - - 疗效达标 - - MG-ADL评分为0或1 - 疾病症状达到最小症状表达 - - - - - - - - 安全性达标 - - 治疗相关副作用≤1级 - 如口服泼尼松当量≤5mg/天 - - - - - - ADL测评可以如实反馈您过去1周的整体平均状况 - - - - - - - - - - - - +{{rewardScore}}能量 - - 开始评测 - - - - 建议您至少每周更新1次测评 - 您提交的测评信息仅用于生成您的健康记录和报告 - - - - - diff --git a/src/patient/pages/adlResult/index.json b/src/patient/pages/adlResult/index.json deleted file mode 100644 index 07ff565..0000000 --- a/src/patient/pages/adlResult/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "usingComponents": { - "navBar": "/components/zd-navBar/navBar", - "van-icon": "@vant/weapp/icon/index", - "van-transition": "@vant/weapp/transition/index", - "toast": "/components/toast/index" - } -} diff --git a/src/patient/pages/adlResult/index.scss b/src/patient/pages/adlResult/index.scss deleted file mode 100644 index ff0f0bf..0000000 --- a/src/patient/pages/adlResult/index.scss +++ /dev/null @@ -1,614 +0,0 @@ -.page { - background-color: #fafafa; - min-height: 100vh; - padding-bottom: 240rpx; - .page-container { - .card-status { - position: relative; - margin: 0 6rpx; - height: 316rpx; - .card-icon { - position: absolute; - top: 71rpx; - left: 45rpx; - width: 217rpx; - height: 198rpx; - &.card-icon2 { - width: 197rpx; - height: 199rpx; - } - &.card-icon3 { - width: 197rpx; - height: 199rpx; - } - } - .content { - position: absolute; - top: 90rpx; - right: 76rpx; - .row { - display: flex; - align-items: center; - .name { - margin-right: 33rpx; - width: 5em; - font-size: 32rpx; - color: #333333; - } - .ststus { - padding: 0 0 0 24rpx; - display: flex; - align-items: center; - justify-content: space-between; - font-size: 28rpx; - width: 170rpx; - height: 45rpx; - color: #fff; - background-color: #24d8c8; - font-weight: bold; - border-radius: 27rpx; - box-sizing: border-box; - .icon { - width: 52rpx; - height: 52rpx; - } - &.status-warn { - color: #cf5375; - background: #f0ccd6; - } - } - } - .line { - margin: 24rpx 0; - width: 365rpx; - height: 1px; - background-color: rgba(255, 255, 255, 0.85); - } - } - } - .pass-line { - margin: 0 40rpx; - display: flex; - align-items: center; - .icon { - width: 180rpx; - height: 180rpx; - } - .content { - padding-left: 16rpx; - .row { - margin-bottom: 20rpx; - line-height: 45rpx; - font-size: 32rpx; - color: #ffffff; - .name { - display: inline-block; - width: 6em; - } - } - } - } - .doctor { - margin: 0 40rpx 40rpx; - padding: 72rpx 32rpx 32rpx; - height: 240rpx; - box-sizing: border-box; - display: flex; - align-items: center; - justify-content: space-between; - .avatar { - width: 96rpx; - height: 96rpx; - .a-img { - width: 100%; - height: 100%; - border-radius: 50%; - } - } - .wrap { - padding: 0 16rpx; - flex: 1; - .name-wrap { - display: flex; - .name { - position: relative; - font-size: 36rpx; - color: rgba(51, 51, 51, 1); - font-weight: bold; - .n-content { - max-width: 8em; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - .bubble { - position: absolute; - top: -10rpx; - right: 0; - padding: 0 5rpx; - transform: translateX(100%); - min-width: 32rpx; - height: 32rpx; - box-sizing: border-box; - text-align: center; - line-height: 28rpx; - font-size: 22rpx; - color: rgba(255, 255, 255, 1); - background: #cf5375; - border: 2rpx solid #ffffff; - border-radius: 32rpx 32rpx 32rpx 0; - } - } - } - .content { - margin-top: 5rpx; - font-size: 24rpx; - color: rgba(207, 83, 117, 1); - } - } - .btn { - width: 158rpx; - height: 56rpx; - font-size: 28rpx; - color: rgba(207, 83, 117, 1); - background: linear-gradient(136deg, #e9f0ff 0%, #fee4ed 100%); - border-radius: 420rpx 420rpx 420rpx 420rpx; - display: flex; - align-items: center; - justify-content: center; - } - } - .banner { - position: relative; - margin: 0 40rpx 0; - background-color: #fff; - border: 1px solid #dfe2e7; - border-radius: 24rpx; - box-shadow: 0rpx 4rpx 32rpx 10rpx rgba(207, 83, 116, 0.2); - min-height: 323rpx; - line-height: 1; - .status-icon { - position: absolute; - top: 165rpx; - right: -10rpx; - width: 124rpx; - height: 124rpx; - } - .b-header { - display: flex; - padding: 19rpx 20rpx 0rpx 182rpx; - .num { - flex-shrink: 0; - display: flex; - align-items: baseline; - font-size: 104rpx; - color: #ffffff; - font-weight: bold; - text-shadow: 8px 8px 16px rgba(143, 217, 226, 0.1); - background: linear-gradient(180deg, #ffffff 0%, #ffffff 50%, rgba(255, 255, 255, 0.5) 100%); - -webkit-background-clip: text; - -webkit-text-fill-color: transparent; - .sub { - font-size: 24rpx; - color: #ffffff; - } - } - .verline { - margin: 10rpx 40rpx 0; - height: 76rpx; - border-right: 2rpx dotted #ffffff; - } - .num-detail { - flex: 1; - display: flex; - .n-item { - flex: 1; - &.active { - .box { - background-color: #cf5375; - } - } - .box { - margin: 0 auto; - width: 45rpx; - height: 45rpx; - text-align: center; - line-height: 45rpx; - background-color: #333333; - border-radius: 12rpx; - color: #ffffff; - font-size: 32rpx; - } - .name { - text-align: center; - font-size: 24rpx; - line-height: 48rpx; - color: #333333; - } - } - } - } - .b-tip { - padding: 4rpx 50rpx; - text-align: center; - font-size: 22rpx; - color: #ffffff; - line-height: 36rpx; - background: linear-gradient(90deg, #e04775 0%, #e04775 20%, #5eaeaf 100%); - display: flex; - justify-content: space-between; - } - .b-body { - padding: 16rpx 120rpx 16rpx 54rpx; - background-color: #fff; - border-radius: 0 0 24rpx 24rpx; - min-height: 124rpx; - .line { - font-size: 24rpx; - color: #666666; - line-height: 36rpx; - .red { - color: #cf5375; - } - .green { - color: #25d9c8; - } - } - } - .b-container { - padding: 16rpx 23rpx; - .c-header { - display: flex; - justify-content: flex-end; - font-size: 24rpx; - color: #cccccc; - } - .swiper { - margin: 19rpx 24rpx; - .scurt { - width: 100%; - border: 1px solid rgba(0, 0, 0, 0.1); - box-sizing: border-box; - .s-header { - display: flex; - height: 40rpx; - margin-bottom: -1px; - border-bottom: 1rpx solid rgba(0, 0, 0, 0.1); - .none { - flex-shrink: 0; - width: 226rpx; - background-color: rgba(228, 228, 228, 1); - } - .bar { - flex: 1; - display: flex; - .num { - flex: 1; - text-align: center; - font-size: 24rpx; - color: #fff; - line-height: 40rpx; - } - } - } - .s-body { - display: flex; - .s-aside { - width: 28rpx; - background-color: rgba(102, 102, 102, 0.15); - flex-shrink: 0; - .sa-item { - display: flex; - text-align: center; - justify-content: center; - align-items: center; - font-size: 18rpx; - color: rgba(102, 102, 102, 1); - line-height: 1; - overflow: hidden; - &:not(:last-of-type) { - margin-bottom: -1px; - border-bottom: 1px solid rgba(0, 0, 0, 0.1); - } - } - .sa-item1 { - height: 158rpx; - } - .sa-item2 { - height: 54rpx; - } - .sa-item3 { - height: 106rpx; - } - .sa-item4 { - height: 108rpx; - } - } - .s-container { - flex: 1; - .sc-row { - display: flex; - height: 54rpx; - overflow: hidden; - .sc-title { - width: 198rpx; - font-size: 18rpx; - color: rgba(102, 102, 102, 1); - text-align: center; - line-height: 53rpx; - } - .sc-col { - margin-left: -1px; - border-left: 1px solid rgba(0, 0, 0, 0.1); - flex: 1; - text-align: center; - .icon { - margin-top: 11rpx; - width: 32rpx; - height: 32rpx; - } - } - } - .sc-row:not(:last-of-type) { - margin-bottom: -1px; - border-bottom: 1px solid rgba(0, 0, 0, 0.1); - } - .sc-row:nth-of-type(2n-1) { - background-color: rgba(217, 217, 217, 0.2); - } - } - } - } - .scurt-detail { - width: 100%; - .scurt-detail-img { - width: 100%; - } - } - } - // .detail { - // margin: 19rpx 24rpx; - // border: 1rpx solid rgba(0, 0, 0, 0.1); - // .d-header { - // display: flex; - // height: 40rpx; - // border-bottom: 1rpx solid rgba(0, 0, 0, 0.1); - // .none { - // flex-shrink: 0; - // width: 125rpx; - // background-color: rgba(228, 228, 228, 1); - // } - // .bar { - // flex: 1; - // display: flex; - // .num-normal { - // width: 64rpx; - // text-align: center; - // font-size: 24rpx; - // color: #fff; - // line-height: 40rpx; - // } - // .num { - // flex: 1; - // text-align: center; - // font-size: 24rpx; - // color: #fff; - // line-height: 40rpx; - // } - // } - // } - // .d-body { - // display: flex; - // .d-aside { - // width: 28rpx; - // background-color: rgba(102, 102, 102, 0.15); - // flex-shrink: 0; - // .da-item { - // display: flex; - // text-align: center; - // justify-content: center; - // align-items: center; - // font-size: 18rpx; - // color: rgba(102, 102, 102, 1); - // line-height: 1; - // border-bottom: 1rpx solid rgba(0, 0, 0, 0.1); - // } - // .da-item1 { - // height: 293rpx; - // } - // .da-item2 { - // height: 96rpx; - // } - // .da-item3 { - // height: 194rpx; - // } - // .da-item4 { - // height: 194rpx; - // } - // } - // .d-container { - // flex: 1; - // .dc-row { - // display: flex; - // height: 96rpx; - // border-bottom: 1rpx solid rgba(0, 0, 0, 0.1); - // line-height: 24rpx; - // .dc-title { - // padding: 12rpx; - // width: 97rpx; - // font-size: 18rpx; - // color: rgba(102, 102, 102, 1); - // box-sizing: border-box; - // } - // .dc-sub-title { - // border-left: 1rpx solid rgba(0, 0, 0, 0.1); - // width: 64rpx; - // text-align: center; - // font-size: 18rpx; - // color: rgba(102, 102, 102, 1); - // padding: 12rpx; - // box-sizing: border-box; - // } - // .dc-col { - // padding: 0 12rpx; - // border-left: 1rpx solid rgba(0, 0, 0, 0.1); - // flex: 1; - // font-size: 18rpx; - // color: rgba(102, 102, 102, 1); - // } - // } - // .dc-row:nth-of-type(2n-1) { - // background-color: rgba(217, 217, 217, 0.2); - // } - // } - // } - // } - } - } - .hormone { - position: relative; - margin: 40rpx; - background-color: #fff; - border: 1px solid #dfe2e7; - border-radius: 24rpx; - box-shadow: 0rpx 4rpx 32rpx 10rpx rgba(207, 83, 116, 0.2); - .status-icon { - position: absolute; - top: 100rpx; - right: -10rpx; - width: 124rpx; - height: 124rpx; - &.status-icon-max { - width: 162rpx; - } - } - .h-header { - padding: 24rpx; - display: flex; - align-items: center; - justify-content: space-between; - background: linear-gradient(95deg, #26dac9 7%, rgba(143, 217, 226, 0) 100%); - box-shadow: 8rpx 8rpx 17rpx 0rpx rgba(143, 217, 226, 0.1); - border-radius: 24rpx 24rpx 0 0; - .title { - font-size: 30rpx; - color: #ffffff; - } - .content { - font-size: 22rpx; - color: #787878; - .red { - color: #e04775; - } - } - } - .h-container { - padding: 25rpx 25rpx 50rpx; - font-size: 24rpx; - color: #666666; - } - } - .no-solve { - margin: 40rpx auto 0; - font-size: 24rpx; - color: #666666; - width: 404rpx; - height: 48rpx; - text-align: center; - line-height: 48rpx; - border-radius: 24rpx; - background: #eeeeee; - } - .footer { - margin: 46rpx 40rpx; - display: flex; - .share { - width: 176rpx; - height: 80rpx; - font-size: 34rpx; - font-weight: bold; - color: #cf5375; - border-radius: 24rpx 24rpx 24rpx 24rpx; - opacity: 1; - border: 2rpx solid #e04775; - text-align: center; - box-sizing: border-box; - line-height: 78rpx; - background-color: transparent; - margin: 0; - margin-right: 32rpx; - &::after { - border: none; - outline: none; - } - } - .test { - flex: 1; - height: 80rpx; - font-size: 30rpx; - color: #ffffff; - text-align: center; - line-height: 80rpx; - background: #cf5375; - border-radius: 24rpx 24rpx 24rpx 24rpx; - } - } - } -} - -.code-wrap { - .code-boder { - margin: 0 auto; - padding: 18rpx; - width: 352rpx; - height: 352rpx; - box-sizing: border-box; - .code { - width: 100%; - height: 100%; - } - } - .code-tip { - margin-top: 24rpx; - padding-bottom: 80rpx; - text-align: center; - font-size: 28rpx; - color: rgba(102, 102, 102, 1); - } -} - -.navback { - padding: 32rpx; - position: fixed; - bottom: 0; - left: 0; - width: 100%; - font-size: 40rpx; - color: #ffffff; - font-weight: bold; - text-align: center; - background: #cf5375; - box-sizing: border-box; - box-shadow: 0rpx 4rpx 36rpx 0rpx rgba(0, 0, 0, 0.27); - border-radius: 24rpx 24rpx 0rpx 0rpx; - .sub { - font-size: 24rpx; - } -} - -.shangbao-footer { - padding: 26rpx 0; - position: fixed; - bottom: 0; - left: 0; - width: 100%; - background-color: #fff; - display: flex; - justify-content: center; - box-shadow: 0rpx -32rpx 32rpx 0rpx rgba(0, 0, 0, 0.09); - border-radius: 24rpx 24rpx 0 0; - .btn { - width: 670rpx; - height: 157rpx; - } -} diff --git a/src/patient/pages/adlResult/index.ts b/src/patient/pages/adlResult/index.ts deleted file mode 100644 index 42fd778..0000000 --- a/src/patient/pages/adlResult/index.ts +++ /dev/null @@ -1,272 +0,0 @@ -import dayjs from 'dayjs'; -const app = getApp(); - -Page({ - data: { - id: '', - reset: '', - qrcode: '', - detail: {}, - scurt: 0, - noFinish: false, - grade: 1, - tableData: [ - { - title: '说话', - key: 'TalkingScore', - }, - { - title: '咀嚼', - key: 'ChewScore', - }, - { - title: '吞咽', - key: 'SwallowScore', - }, - { - title: '呼吸', - key: 'BreathScore', - }, - { - title: '刷牙梳头能力受损', - key: 'BrushTeethAndCombHairScore', - }, - { - title: '从椅子上起身能力受损', - key: 'GetUpFromChairScore', - }, - { - title: '复视/重影', - key: 'DoubleVisionScore', - }, - { - title: '眼睑下垂', - key: 'DroopyEyelidsScore', - }, - ], - LastCreateDate: '', - dateDiff: '', - - m_d: '', - nrdl: '', - sendWeiYi: false, - - toastShow: false, - // toastType: 'adlProgresss', - // toastType: "adlProgresssEnd", - toastType: 'adlLevelUp', - toastParams: { - // ContinuousTimes: 2, - // RewardScore: "500", - // Records: [ - // { Id: "6", ContinuousTimes: "2", RewardScore: "500" }, - // { Id: "3", ContinuousTimes: "1", RewardScore: "500" }, - // ], - // PatientScore: "500", - // PatientScoreExtra: "200", - // PatientScoreExtra2: "500", - } as any, - unreadCount: 0, - }, - onLoad(options) { - console.log(options); - app.zdGetTheme().then((res) => { - this.setData({ - theme: res, - }); - }); - - const SystemInfo = app.globalSystemInfo; - if (SystemInfo) { - const { bottom } = SystemInfo.capsulePosition; - this.setData({ - bottom, - }); - } - this.setData({ - id: options.id, - reset: options.reset, - m_d: options.m_d, - nrdl: options.nrdl, - sendWeiYi: options.wy === '1', - idafa: options.idafa === '1', - }); - app.waitLogin({ type: [0, 1] }).then(() => { - - app.getZdUserInfo(this, false); - this.getUnreadCount(); - this.getDetail(); - this.getQrCode(); - if (options.nrdl === '1') { - this.getOpenPatientList(); - } - - const pages = getCurrentPages(); //获取当前页面js里面的pages里的所有信息。 - const prevPage = pages[pages.length - 2]; - const adlResultInfo = wx.getStorageSync('adlResultInfo'); - console.log(options.idafa === '1'); - if (options.idafa === '1') { - this.setData({ - toastShow: true, - toastType: 'adlLevelUp', - toastParams: {}, - }); - } else if (adlResultInfo && prevPage.route == 'pages/adl/index' && !Array.isArray(adlResultInfo)) { - this.setData({ - toastShow: true, - toastType: 'adlProgresss', - toastParams: { - ...adlResultInfo, - Records: adlResultInfo.Records?.reverse(), - }, - }); - wx.removeStorageSync('adlResultInfo'); - } - }); - }, - getQrCode() { - wx.ajax({ - method: 'GET', - url: '?r=zd/adl/qrcode', - data: {}, - }).then((res) => { - this.setData({ - qrcode: res.src, - }); - }); - }, - getUnreadCount() { - wx.ajax({ - method: 'GET', - url: '?r=zd/message-interact/get-unread-count', - data: {}, - }).then((res) => { - this.setData({ - unreadCount: res, - }); - }); - }, - getDetail() { - const { id } = this.data; - wx.ajax({ - method: 'GET', - url: '?r=zd/adl/view', - data: { - Id: id, - }, - }).then((res) => { - let grade = 1; - if (res.TotalScore < 5) { - grade = 1; - } else if (res.TotalScore >= 5 && res.TotalScore < 15) { - grade = 2; - } else { - grade = 3; - } - this.setData({ - detail: res, - grade, - LastCreateDate: dayjs(res.LastCreateTime).format('MM月DD日'), - dateDiff: dayjs(res.CreateTime).from(res.LastCreateTime).replace(' ', ''), - }); - }); - }, - getOpenPatientList() { - wx.ajax({ - method: 'GET', - url: '?r=zd/nrdl/open-patient-list', - data: {}, - }).then((res) => { - this.setData({ - patientInfo: res, - }); - }); - }, - handleDetail() { - const { scurt, noFinish } = this.data; - if (noFinish) return; - this.setData({ - scurt: (scurt + 1) % 2, - noFinish: true, - }); - }, - handleDetailFinish() { - this.setData({ - noFinish: false, - }); - }, - handleReset() { - const id = this.data.id; - wx.showModal({ - title: '确认重新测试?', - content: '重新测试后,此次评测结果将自动删除', - confirmColor: '#8c75d0', - success(res) { - if (res.confirm) { - wx.ajax({ - method: 'POST', - url: '?r=zd/adl/delete', - data: { - Id: id, - }, - }).then(() => { - wx.redirectTo({ - url: '/patient/pages/adlTest/index', - }); - }); - } - }, - }); - }, - handleSave() { - app.zdPermissionVerification(3, 2, ``).then(() => {}); - }, - handleMyHealth() { - - wx.navigateTo({ - url: '/patient/pages/myHealthRecord/index', - }); - }, - handleShare() { - wx.navigateTo({ - url: '/patient/pages/adlShare/index', - }); - }, - handleToastOk() { - if (this.data.toastType === 'adlLevelUp') { - wx.navigateTo({ - url: '/patient/pages/webview/index', - }); - } - this.handleToastCancel(); - }, - handleToastCancel() { - this.setData({ - toastShow: false, - }); - }, - handleBack() { - wx.navigateBack(); - }, - routerTo(e) { - const { url } = e.currentTarget.dataset; - if (url === '/patient/pages/interactivePatient/index') { - - } - if (url === '/patient/pages/webview/index') { - - } - wx.navigateTo({ - url, - }); - }, - hanldeCodeLong() { - - }, - onShareAppMessage() { - return { - title: 'MG-ADL测评表:评估重症肌无力患者症状对生活质量的影响', - path: '/patient/pages/adl/index', - }; - }, -}); diff --git a/src/patient/pages/adlResult/index.wxml b/src/patient/pages/adlResult/index.wxml deleted file mode 100644 index a899896..0000000 --- a/src/patient/pages/adlResult/index.wxml +++ /dev/null @@ -1,371 +0,0 @@ - - - - - - - - ADL评分 - - 已达标 - - - - - - - 激素日用量 - - 已达标 - - - - - - - - - - - ADL评分 - - 已达标 - - - - 待达标 - - - - - - - 激素日用量 - - 已达标 - - - - 待达标 - - - - - - - - - - - ADL评分 - - 待达标 - - - - - - - 激素日用量 - - 待达标 - - - - - - - - - - - - - - - {{zdUserInfo.ExclusiveDoctorName}} - {{unreadCount}} - - - - 您的ADL评分≥5分,且较上次增加了2分以上 - ,激素用量超过了20mg, - 建议定期复诊 - - - 您的ADL较上次增加了2分以上 - ,激素用量超过了20mg, - 建议定期复诊 - - - 您的ADL评分≥5分 - ,激素用量超过了20mg, - 建议定期复诊 - - 您的激素用量超过了20mg,建议定期复诊 - - - {{unreadCount ? '去看看':'去咨询'}} - - - - - - - - - - 激素用量 - - 本次激素用量为 - {{detail.SteroidDailyDose}}mg - /天 - - - 恭喜达标,您的激素用量已少于95% 的患友 - 距离达标还需努力,请遵医嘱规律治疗 - - 坚持每周测评,敏锐识别症状变化 - - 保存测评结果 - 点击获取我的双达标笔记 - - - - - - - - 扫码关注公众号 - - 开启每周ADL测评提醒 - - - - - - - - - - 立即查看医保报销详细解读 - - {{patientInfo.PatientNum}}人正在关注 - - - diff --git a/src/patient/pages/adlShare/index.json b/src/patient/pages/adlShare/index.json deleted file mode 100644 index ae38c17..0000000 --- a/src/patient/pages/adlShare/index.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "usingComponents": { - "navBar": "/components/zd-navBar/navBar", - "free-audio": "/components/freeAudio/index", - "customPoster": "/components/customPoster/index" - } -} diff --git a/src/patient/pages/adlShare/index.scss b/src/patient/pages/adlShare/index.scss deleted file mode 100644 index db1a942..0000000 --- a/src/patient/pages/adlShare/index.scss +++ /dev/null @@ -1,35 +0,0 @@ -.page { - background-color: #fafafa; - min-height: 100vh; - .page-container { - position: relative; - .poster { - display: block; - width: 100%; - } - .download { - position: absolute; - top: 1450rpx; - left: 50%; - transform: translateX(-50%); - width: 482rpx; - height: 80rpx; - background: #cf5375; - border-radius: 40rpx; - text-align: center; - font-size: 28rpx; - color: #FFFFFF; - line-height: 80rpx; - .icon { - width: 48rpx; - height: 48rpx; - vertical-align: middle; - } - } - } -} - -.poster { - display: block; - width: 100%; -} diff --git a/src/patient/pages/adlShare/index.ts b/src/patient/pages/adlShare/index.ts deleted file mode 100644 index d579030..0000000 --- a/src/patient/pages/adlShare/index.ts +++ /dev/null @@ -1,134 +0,0 @@ -const app = getApp() - -Page({ - data: { - poster: '', - params: {}, - zdUserInfo: {} as any, - posterUrl: '', - }, - onLoad() { - const SystemInfo = app.globalSystemInfo - wx.showLoading({ - title: '加载中', - }) - if (SystemInfo) { - const { bottom } = SystemInfo.capsulePosition - this.setData({ - bottom, - }) - } - app.zdWaitLogin({ loginPage: true }).then(() => { - - app.getZdUserInfo(this, true, () => { - this.getPoster() - }) - }) - }, - getPoster() { - wx.ajax({ - method: 'POST', - url: '?r=poster/prepare', - data: { - posterId: 'adl2-invite', - userId: this.data.zdUserInfo.UserId, - }, - }).then((res) => { - this.setData({ - params: res, - }) - }) - }, - handlePosterFinish(e) { - this.setData({ - posterUrl: e.detail, - }) - wx.hideLoading() - }, - handleDownload() { - const that = this - - wx.getSetting({ - success(res) { - console.log(res) - if ( - res.authSetting['scope.writePhotosAlbum'] != undefined && - res.authSetting['scope.writePhotosAlbum'] == true - ) { - //获取当前位置 - that.saveImage() - } else if (res.authSetting['scope.writePhotosAlbum'] == undefined) { - //获取当前位置 - that.saveImage() - } else { - wx.showModal({ - title: '请求授权相册权限', - content: '需要保存海报到相册,请确认授权', - confirmColor: '#8c75d0', - success (res) { - if (res.cancel) { - //取消授权 - wx.showToast({ - title: '拒绝授权', - icon: 'none', - duration: 1000, - }) - } else if (res.confirm) { - //确定授权,通过wx.openSetting发起授权请求 - wx.openSetting({ - success (res) { - if (res.authSetting['scope.writePhotosAlbum'] == true) { - // wx.showToast({ - // title: '授权成功', - // icon: 'success', - // duration: 1000 - // }) - //再次授权,调用wx.getLocation的API - that.saveImage() - } else { - // wx.showToast({ - // title: '授权失败', - // icon: 'none', - // duration: 1000 - // }) - } - }, - }) - } - }, - }) - } - }, - }) - }, - saveImage() { - wx.showLoading({ - title: '加载中', - }) - wx.saveImageToPhotosAlbum({ - filePath: this.data.posterUrl, - success: () => { - wx.hideLoading() - wx.showToast({ - title: '保存成功,请到相册中查看', - }) - }, - fail: () => { - wx.hideLoading() - wx.showToast({ - icon: 'none', - title: '保存失败,请稍后重试', - }) - }, - }) - }, - handleBack() { - wx.navigateBack() - }, - onShareAppMessage() { - return { - title: 'MG-ADL测评表:重症肌无力患者评估表', - path: '/patient/pages/adl/index', - } - }, -}) diff --git a/src/patient/pages/adlShare/index.wxml b/src/patient/pages/adlShare/index.wxml deleted file mode 100644 index 9d1e1d4..0000000 --- a/src/patient/pages/adlShare/index.wxml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - 点击下载海报到本地 - - - - - - - diff --git a/src/patient/pages/adlTest/index.json b/src/patient/pages/adlTest/index.json deleted file mode 100644 index 667f871..0000000 --- a/src/patient/pages/adlTest/index.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "navigationStyle": "custom", - "usingComponents": { - "navBar": "/components/zd-navBar/navBar", - "free-audio": "/components/freeAudio/index", - "van-transition": "@vant/weapp/transition/index", - "customTable": "/components/customTable/index", - "van-icon": "@vant/weapp/icon/index", - "van-popup": "@vant/weapp/popup/index" - } -} diff --git a/src/patient/pages/adlTest/index.scss b/src/patient/pages/adlTest/index.scss deleted file mode 100644 index fc30f97..0000000 --- a/src/patient/pages/adlTest/index.scss +++ /dev/null @@ -1,334 +0,0 @@ -.page { - background-color: #fafafa; - min-height: 100vh; - .page-container { - margin-top: 40rpx; - .nav { - margin: 0rpx 40rpx; - padding: 16rpx 23rpx; - background-color: #fff; - border: 1px solid #dfe2e7; - border-radius: 24rpx; - box-shadow: 0rpx 4rpx 32rpx 10rpx #f2dee3; - .nav-title { - text-align: center; - font-size: 28rpx; - color: #999999; - } - .nav-wrap { - display: flex; - .nav-item { - flex: 1; - margin: 0 10rpx; - height: 6rpx; - background: #cf5375; - opacity: 0.3; - border-radius: 0rpx 0rpx 0rpx 0rpx; - &.active { - opacity: 1; - } - } - } - } - .custom-class { - position: absolute; - width: 100%; - } - .van-enter-active-class, - .van-leave-active-class { - transition-property: background-color, transform; - } - - .van-enter-class { - transform: translateX(1000rpx); - opacity: 0; - } - .van-leave-to-class { - transform: translateX(-1000rpx); - opacity: 0; - } - .swiper { - height: 1400rpx; - } - .container { - padding: 64rpx 48rpx; - margin: 21rpx 40rpx 0; - width: calc(100% - 172rpx); - background-color: #fff; - border: 1px solid #dfe2e7; - border-radius: 24rpx; - box-shadow: 0rpx 4rpx 32rpx 10rpx #f2dee3; - .c-icon { - display: block; - margin: 0 auto; - width: 144rpx; - height: 144rpx; - } - .title { - margin-top: 44rpx; - font-size: 48rpx; - color: #333333; - font-weight: bold; - text-align: center; - } - .en-title { - margin-top: 10rpx; - font-size: 24rpx; - color: #cccccc; - text-align: center; - } - .question { - margin-top: 76rpx; - .question-item { - margin-bottom: 40rpx; - padding: 24rpx 32rpx; - display: flex; - align-items: center; - border-radius: 24rpx; - background-color: #f2f2f2; - .label { - flex-shrink: 0; - margin-right: 24rpx; - width: 40rpx; - height: 40rpx; - border-radius: 50%; - background: rgba(77, 77, 77, 0.07); - .icon { - margin: 11rpx 0 0 7rpx; - display: none; - width: 26rpx; - height: 21rpx; - } - } - .content { - font-size: 32rpx; - color: #666666; - font-weight: bold; - line-height: 48rpx; - } - &.active { - background-color: #cf5375; - .label { - background-color: #ffffff; - .icon { - display: block; - } - } - .content { - color: #fefefe; - } - } - } - } - } - .intense-dose { - padding: 64rpx 48rpx; - margin: 21rpx 40rpx 0; - width: calc(100% - 172rpx); - background-color: #fff; - border: 1px solid #dfe2e7; - border-radius: 24rpx; - box-shadow: 0rpx 4rpx 32rpx 10rpx #f2dee3; - .c-icon { - display: block; - margin: 0 auto; - width: 144rpx; - height: 144rpx; - } - .title { - margin-top: 44rpx; - font-size: 48rpx; - color: #333333; - font-weight: bold; - text-align: center; - } - .en-title { - margin-top: 10rpx; - font-size: 24rpx; - color: #cccccc; - text-align: center; - } - .tip { - margin: 28rpx auto 0; - font-size: 28rpx; - color: #333333; - width: 502rpx; - height: 74rpx; - display: flex; - align-items: center; - justify-content: center; - background: #f2f2f2; - border-radius: 38rpx; - } - .wrap { - margin-top: 40rpx; - .w-title { - font-size: 32rpx; - color: #333333; - font-weight: bold; - text-align: center; - } - .w-num { - margin-top: 20rpx; - text-align: center; - font-size: 72rpx; - color: #333333; - font-weight: bold; - .sub { - font-size: 36rpx; - } - } - } - .select { - margin-top: 30rpx; - display: flex; - gap: 14rpx; - .item { - position: relative; - flex-shrink: 0; - padding: 20rpx 10rpx 8rpx; - width: 64rpx; - text-align: center; - background: #f2f2f2; - border-radius: 16rpx; - display: flex; - flex-direction: column; - justify-content: space-between; - align-items: center; - .i-icon { - width: 48rpx; - height: 48rpx; - } - .input { - font-size: 16rpx; - line-height: 24rpx; - height: 48rpx; - overflow: hidden; - color: #cccccc; - } - .name { - font-size: 28rpx; - color: #666666; - } - .i-active { - position: absolute; - right: -14rpx; - top: -14rpx; - width: 28rpx; - height: 28rpx; - background-color: #e04775; - border-radius: 50%; - color: #fff; - font-size: 20rpx; - } - } - } - .s-tip { - margin-top: 30rpx; - font-size: 22rpx; - color: #cccccc; - } - } - .footer { - position: fixed; - bottom: 0; - left: 0; - width: 100%; - padding: 20rpx 40rpx calc(env(safe-area-inset-bottom) + 20rpx); - box-sizing: border-box; - display: flex; - align-items: center; - justify-content: center; - background-color: #fff; - box-shadow: 0 -10rpx 10rpx #faf1f3; - .prev { - margin: 0 45rpx; - display: flex; - align-content: inherit; - justify-content: center; - .icon { - margin-right: 20rpx; - width: 56rpx; - height: 56rpx; - vertical-align: middle; - } - .name { - font-size: 30rpx; - line-height: 50rpx; - color: #cf5375; - font-weight: bold; - } - } - .submit { - flex: 1; - height: 80rpx; - background: #cf5375; - border-radius: 24rpx 24rpx 24rpx 24rpx; - text-align: center; - line-height: 80rpx; - font-size: 34rpx; - color: #ffffff; - font-weight: bold; - } - } - } -} - -.popup { - padding: 44rpx 40rpx; - .p-title { - font-size: 32rpx; - color: #333333; - font-weight: bold; - } - .input-wrap { - margin-top: 28rpx; - padding: 0 20rpx; - display: flex; - align-items: center; - border-radius: 24rpx; - border: 1rpx solid #d7d7d7; - .input { - flex: 1; - height: 84rpx; - font-size: 28rpx; - } - .sub { - flex-shrink: 0; - font-size: 28rpx; - color: #cccccc; - } - } - .p-footer { - margin-top: 38rpx; - padding: 0 24rpx; - display: flex; - align-items: center; - justify-content: space-between; - .cancel { - width: 294rpx; - height: 80rpx; - font-size: 34rpx; - color: #cf5375; - display: flex; - align-items: center; - justify-content: center; - font-weight: bold; - border-radius: 24rpx; - border: 2rpx solid #cf5375; - } - .sure { - width: 294rpx; - height: 80rpx; - font-size: 34rpx; - color: #fff; - display: flex; - align-items: center; - justify-content: center; - font-weight: bold; - border-radius: 24rpx; - border: 2rpx solid #CF5375; - background-color: #CF5375; - } - } -} diff --git a/src/patient/pages/adlTest/index.ts b/src/patient/pages/adlTest/index.ts deleted file mode 100644 index 3d51007..0000000 --- a/src/patient/pages/adlTest/index.ts +++ /dev/null @@ -1,412 +0,0 @@ -const app = getApp(); - -Page({ - data: { - nav: 0, - showSubmit: false, - popupShow: false, - popupFocus: false, - SteroidDailyDose: 0, - popupHormone: '', - question: [ - { - title: '第一题:说话', - key: 'TalkingScore', - type: 'question', - icon: '1', - list: [ - { - id: '1', - title: '正常', - }, - { - id: '2', - title: '间或有点含糊或有鼻音', - }, - { - id: '3', - title: '经常含糊不清或者有鼻音,但是别人还能听懂', - }, - { - id: '4', - title: '别人听不太懂', - }, - ], - }, - { - title: '第二题:咀嚼', - key: 'ChewScore', - type: 'question', - icon: '2', - list: [ - { - id: '1', - title: '正常', - }, - { - id: '2', - title: '咀嚼固体食物会感到疲劳', - }, - { - id: '3', - title: '咀嚼松软食物会感到疲劳', - }, - { - id: '4', - title: '使用喂食管进食,如鼻胃管胃肠管等', - }, - ], - }, - { - title: '第三题:吞咽', - key: 'SwallowScore', - type: 'question', - icon: '4', - list: [ - { - id: '1', - title: '正常', - }, - { - id: '2', - title: '偶尔会噎到', - }, - { - id: '3', - title: '经常会噎到,因而需要改变饮食习惯', - }, - { - id: '4', - title: '使用喂食管进食,如鼻胃管胃肠管等', - }, - ], - }, - { - title: '第四题:呼吸', - key: 'BreathScore', - type: 'question', - icon: '5', - list: [ - { - id: '1', - title: '正常', - }, - { - id: '2', - title: '劳累后感到气促或呼吸不畅', - }, - { - id: '3', - title: '静止时感到气促或呼吸不畅', - }, - { - id: '4', - title: '依赖呼吸机', - }, - ], - }, - { - title: '第五题 刷牙或梳头的能力受损', - key: 'BrushTeethAndCombHairScore', - type: 'question', - icon: '6', - list: [ - { - id: '1', - title: '正常', - }, - { - id: '2', - title: '需要多费些力气但是不需要停下来', - }, - { - id: '3', - title: '需要停下来休息才能完成', - }, - { - id: '4', - title: '无法自己完成', - }, - ], - }, - { - title: '第六题 从椅子上起身能力受损', - key: 'GetUpFromChairScore', - type: 'question', - icon: '3', - list: [ - { - id: '1', - title: '正常', - }, - { - id: '2', - title: '轻度受损,有时需要用手帮忙', - }, - { - id: '3', - title: '中度受损,总是需要用手帮忙', - }, - { - id: '4', - title: '严重受损,需要他人帮助', - }, - ], - }, - { - title: '第七题:复视/重影', - key: 'DoubleVisionScore', - type: 'question', - icon: '7', - list: [ - { - id: '1', - title: '正常', - }, - { - id: '2', - title: '有,但不是每天', - }, - { - id: '3', - title: '每天,但不是持续一整天', - }, - { - id: '4', - title: '持续有', - }, - ], - }, - { - title: '第八题:眼睑下垂', - key: 'DroopyEyelidsScore', - type: 'question', - icon: '8', - list: [ - { - id: '1', - title: '正常', - }, - { - id: '2', - title: '有,但不是每天', - }, - { - id: '3', - title: '每天,但不是持续一整天', - }, - { - id: '4', - title: '持续有', - }, - ], - }, - { - title: '第九题:激素用量', - key: 'SteroidDailyDose', - type: 'intenseDose', - icon: '9', - }, - ] as { - title: string; - key: string; - icon: string; - type: string; - list: { - id: string; - title: string; - active?: boolean; - }[]; - }[], - params: {}, - - m_d: '', - nrdl: '', - - focus: false, - }, - onLoad(options) { - const SystemInfo = app.globalSystemInfo; - if (SystemInfo) { - const { bottom } = SystemInfo.capsulePosition; - this.setData({ - bottom, - }); - } - this.setData({ - m_d: options.m_d, - nrdl: options.nrdl, - }); - - app.waitLogin({ type: [0, 1] }).then(() => { - this.handleMp(this.data.nav); - }); - }, - handleSelect(e) { - const { index } = e.currentTarget.dataset; - const { nav, question } = this.data; - const questionItem = question[nav]; - questionItem.list = questionItem.list.map((item, i) => { - if (index == i) { - item.active = true; - } else { - item.active = false; - } - return item; - }); - this.setData({ - [`question[${nav}]`]: questionItem, - }); - setTimeout(() => { - this.setData({ - nav: nav == 8 ? 8 : nav + 1, - showSubmit: nav == 8, - }); - this.handleMp(this.data.nav); - }, 500); - }, - stopTouchMove() { - return false; - }, - bindtransition() { - this.setData({ - nav: this.data.nav, - }); - }, - handlePrev() { - const { nav } = this.data; - this.setData({ - nav: nav - 1, - }); - }, - handleSubmit() { - - wx.showLoading({ - title: '提交中', - }); - const { question } = this.data; - const params = {}; - question.forEach((item) => { - if (item.type === 'intenseDose') { - params[item.key] = this.data[item.key]; - } else { - params[item.key] = item.list.findIndex((subItem) => subItem.active); - } - }); - this.setData({ - params, - }); - }, - handleFinish(e) { - const that = this; - const url = `${app.globalData.upFileUrl}?r=file-service/upload-img`; - wx.uploadFile({ - filePath: e.detail, - name: 'file', - url, - success(res) { - const data = JSON.parse(res.data); - that.submitCreate(data.data.Url); - }, - }); - }, - handleHorSelect(e) { - const { id } = e.currentTarget.dataset; - const { SteroidDailyDose } = this.data; - if (!id) { - this.setData({ - popupHormone: SteroidDailyDose > 0 ? SteroidDailyDose : '', - popupShow: true, - }); - setTimeout(() => { - this.setData({ - popupFocus: true, - }); - }, 300); - return; - } - this.setData({ - SteroidDailyDose: id * 1, - showSubmit: Boolean(id), - }); - }, - handlePopupCancel() { - this.setData({ - popupShow: false, - popupFocus: false, - }); - }, - handlePopupSure() { - // if (!Number(this.data.popupHormone)) { - // wx.showToast({ - // icon: "none", - // title: "请输入激素用量", - // }); - // return; - // } - this.setData({ - SteroidDailyDose: Number(this.data.popupHormone), - showSubmit: true, - }); - this.handlePopupCancel(); - }, - submitCreate(Url) { - const params = this.data.params; - wx.ajax({ - method: 'POST', - url: '?r=zd/adl/create', - data: params, - }).then((res) => { - this.updateAdlImg(res.Id, Url, res); - }); - }, - updateAdlImg(id, Url, params) { - const { m_d, nrdl } = this.data; - wx.ajax({ - method: 'POST', - url: '?r=zd/adl/update-img', - data: { - Id: id, - ImgUrl: Url, - }, - }).then(() => { - wx.hideLoading(); - wx.setStorageSync('adlResultInfo', params.ScoreInfo); - wx.redirectTo({ - url: `/patient/pages/adlResult/index?id=${id}&reset=1&m_d=${m_d}&nrdl=${nrdl}&wy=${Number(params.sendWeiYi)}&idafa=${Number(params.inviteDoctorAndFirstAdl)}`, - }); - }); - }, - handleInput(e) { - if (e.detail.value) { - this.setData({ - // eslint-disable-next-line regexp/optimal-quantifier-concatenation - popupHormone: e.detail.value.replace(/^(-)?(\d{0,3})(\.\d?)?.*$/, '$1$2$3'), - }); - } - }, - handleBack() { - wx.navigateBack(); - }, - onShareAppMessage() { - return { - title: 'MG-ADL测评表:评估重症肌无力患者症状对生活质量的影响', - path: '/patient/pages/adl/index', - }; - }, - - handleMp(index) { - const PageName = { - 0: 'PG_PATIENTASSESSMENTQ1', - 1: 'PG_PATIENTASSESSMENTQ2', - 2: 'PG_PATIENTASSESSMENTQ3', - 3: 'PG_PATIENTASSESSMENTQ4', - 4: 'PG_PATIENTASSESSMENTQ5', - 5: 'PG_PATIENTASSESSMENTQ6', - 6: 'PG_PATIENTASSESSMENTQ7', - 7: 'PG_PATIENTASSESSMENTQ8', - 8: 'PG_PATIENTASSESSMENTQ9', - }[index]; - - }, -}); diff --git a/src/patient/pages/adlTest/index.wxml b/src/patient/pages/adlTest/index.wxml deleted file mode 100644 index 8c3cd28..0000000 --- a/src/patient/pages/adlTest/index.wxml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - 测评{{nav+1}}/9 - - - - - - - - - - {{questionItem.title}} - Please answer the question below - - - - - - {{item.title}} - - - - - - {{questionItem.title}} - Please answer the question below - - 请选择您最近每天的激素用量 - - {{SteroidDailyDose}} - mg - - - - - - {{item+1}}片 - - - - {{SteroidDailyDose || '请输入其它毫克'}} - 其它 - - - - - - - 说明:此处按醋酸泼尼松片用量计算,每片为5mg - 若其它激素药物根据规格做等量换算,如5mg醋酸泼尼松 =4mg 甲泼尼龙* - - - - - - - - 上一题 - - 完成 - - - - - - - - - 请输入当天的激素用量 - - - mg/天 - - - 取消 - 确认 - - - diff --git a/src/patient/pages/doctorDetail/index.ts b/src/patient/pages/doctorDetail/index.ts index e05d62a..e3f1987 100644 --- a/src/patient/pages/doctorDetail/index.ts +++ b/src/patient/pages/doctorDetail/index.ts @@ -17,75 +17,7 @@ Page({ this.setData({ id: options.id, }) - this.handleToggleSite() - }) - }, - handleToggleSite() { - const that = this - if (!this.data.LNG) { - wx.getSetting({ - success(res) { - if ( - res.authSetting['scope.userFuzzyLocation'] != undefined && - res.authSetting['scope.userFuzzyLocation'] == true - ) { - //获取当前位置 - that.getFuzzyLocation() - } else if (res.authSetting['scope.userFuzzyLocation'] == undefined) { - //获取当前位置 - that.getFuzzyLocation() - } else { - wx.showModal({ - title: '请求授权当前位置', - content: '需要获取您的地理位置,请确认授权', - confirmColor: '#8c75d0', - success(res) { - if (res.cancel) { - //取消授权 - wx.showToast({ - title: '拒绝授权', - icon: 'none', - duration: 1000, - }) - that.getFuzzyLocation() - } else if (res.confirm) { - //确定授权,通过wx.openSetting发起授权请求 - wx.openSetting({ - success(res) { - if (res.authSetting['scope.userFuzzyLocation'] == true) { - that.getFuzzyLocation() - } else { - that.getFuzzyLocation() - } - }, - }) - } - }, - }) - } - }, - }) - } else { - that.setData({ - LNG: '', - LAT: '', - }) this.getDetail() - } - }, - getFuzzyLocation() { - const that = this - wx.getFuzzyLocation({ - success(res) { - that.setData({ - LNG: res.longitude, - LAT: res.latitude, - }) - that.getDetail() - }, - fail(_err) { - that.getDetail() - }, }) }, getDetail() { @@ -94,16 +26,15 @@ Page({ url: '?r=zd/doctor/detail', data: { Id: this.data.id, - lng: this.data.LNG, - lat: this.data.LAT, }, }).then((res) => { let weekName = '' if (res.ClinicType == 2) { weekName = res.Clinic - } else { + } + else { weekName = (res.Clinic ? res.Clinic : []) - .map((subItem: { weekday: string | number; timeType: string | number }) => { + .map((subItem: { weekday: string | number, timeType: string | number }) => { const week = ['周一', '周二', '周三', '周四', '周五', '周六', '周日'] const timeDay = { 1: '上午', 2: '下午' } return `${week[Number(subItem.weekday) - 1]}${timeDay[subItem.timeType]}` diff --git a/src/patient/pages/hormones/index.json b/src/patient/pages/hormones/index.json index a97367d..520a2b9 100644 --- a/src/patient/pages/hormones/index.json +++ b/src/patient/pages/hormones/index.json @@ -1,3 +1,6 @@ { - "usingComponents": {} + "usingComponents": { + "navbar": "/components/navbar/index", + "van-popup": "@vant/weapp/popup/index" + } } diff --git a/src/patient/pages/hormones/index.scss b/src/patient/pages/hormones/index.scss index e69de29..ce973c8 100644 --- a/src/patient/pages/hormones/index.scss +++ b/src/patient/pages/hormones/index.scss @@ -0,0 +1,257 @@ +page { + background-color: #f7f1ff; +} + +.nav-back { + color: #fff; + font-size: 36rpx; +} +.nav-title { + color: #fff; +} +.page { + height: 100vh; + box-sizing: border-box; + .swiper { + height: 1272rpx; + .container { + padding: 182rpx 94rpx 100rpx; + width: 100%; + height: 1272rpx; + box-sizing: border-box; + display: flex; + flex-direction: column; + justify-content: space-between; + .title { + flex-shrink: 0; + font-size: 48rpx; + color: #211d2e; + font-weight: bold; + text-align: center; + line-height: 68rpx; + } + .spread { + flex: 1; + .num { + margin-top: 10rpx; + display: flex; + justify-content: center; + align-items: baseline; + font-size: 104rpx; + color: #211d2e; + font-weight: bold; + .sub { + font-size: 48rpx; + color: #211d2e; + font-weight: normal; + } + } + .list { + margin-top: 136rpx; + .l-item { + margin-bottom: 32rpx; + padding: 26rpx; + font-size: 40rpx; + color: #211d2e; + text-align: center; + background: linear-gradient(7deg, #ffffff 0%, #f8f2ff 100%); + box-shadow: 0rpx 4rpx 24rpx 0rpx rgba(0, 0, 0, 0.06); + border-radius: 24rpx 24rpx 24rpx 24rpx; + border: 2rpx solid #ffffff; + &.active { + background: #b982ff; + color: #fff; + } + } + } + .list-two { + margin-top: 56rpx; + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 32rpx 26rpx; + .lt-item { + padding: 26rpx; + font-size: 40rpx; + color: #211d2e; + text-align: center; + background: linear-gradient(7deg, #ffffff 0%, #f8f2ff 100%); + box-shadow: 0rpx 4rpx 24rpx 0rpx rgba(0, 0, 0, 0.06); + border-radius: 24rpx 24rpx 24rpx 24rpx; + border: 2rpx solid #ffffff; + &.active { + background: #b982ff; + color: #fff; + } + } + } + .list-mg { + margin-top: 40rpx; + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 36rpx 16rpx; + .lm-item { + position: relative; + padding: 60rpx 26rpx 20rpx; + font-size: 36rpx; + color: #211d2e; + line-height: 1; + text-align: center; + background: linear-gradient(7deg, #ffffff 0%, #f8f2ff 100%); + box-shadow: 0rpx 4rpx 24rpx 0rpx rgba(0, 0, 0, 0.06); + border-radius: 24rpx 24rpx 24rpx 24rpx; + border: 2rpx solid #ffffff; + .icon { + position: absolute; + top: -28rpx; + left: 50%; + transform: translateX(-50%); + width: 76rpx; + height: 76rpx; + } + &.other { + padding: 40rpx 26rpx; + .icon { + display: none; + } + } + &.active { + background: #b982ff; + color: #fff; + } + } + } + .custom-input { + margin-top: 32rpx; + background: linear-gradient(7deg, #ffffff 0%, #f8f2ff 100%); + box-shadow: 0rpx 4rpx 24rpx 0rpx rgba(0, 0, 0, 0.06); + border-radius: 24rpx 24rpx 24rpx 24rpx; + border: 2rpx solid #ffffff; + display: flex; + align-items: center; + justify-content: center; + gap: 32rpx; + line-height: 108rpx; + .input { + padding: 0; + height: 108rpx; + text-align: center; + min-width: 3em; + max-width: 4em; + color: #211D2E; + } + .palce-input{ + color: #ADACB2; + } + } + .description { + margin-top: 32rpx; + font-size: 28rpx; + color: #211d2e; + line-height: 38rpx; + } + } + .pre-btn { + flex-shrink: 0; + margin-top: 100rpx; + height: 108rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 40rpx; + color: #b982ff; + background: #ffffff; + border-radius: 100rpx 100rpx 100rpx 100rpx; + border: 2rpx solid #b982ff; + } + .end { + flex-shrink: 0; + margin-top: 52rpx; + display: flex; + gap: 28rpx; + .pre { + flex: 1; + display: flex; + align-items: center; + justify-content: center; + height: 108rpx; + font-size: 40rpx; + color: #b982ff; + background: #ffffff; + border-radius: 100rpx 100rpx 100rpx 100rpx; + border: 2rpx solid #b982ff; + box-sizing: border-box; + } + .submit { + flex: 1; + display: flex; + align-items: center; + justify-content: center; + height: 108rpx; + font-size: 40rpx; + color: #ffffff; + background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%); + border-radius: 100rpx 100rpx 100rpx 100rpx; + } + } + } + } +} + +.popup { + padding: 44rpx 40rpx; + .p-title { + font-size: 32rpx; + color: #333333; + font-weight: bold; + } + .input-wrap { + margin-top: 28rpx; + padding: 0 20rpx; + display: flex; + align-items: center; + border-radius: 24rpx; + border: 1rpx solid #d7d7d7; + .input { + flex: 1; + height: 84rpx; + font-size: 28rpx; + } + .sub { + flex-shrink: 0; + font-size: 28rpx; + color: #cccccc; + } + } + .p-footer { + margin-top: 38rpx; + padding: 0 24rpx; + display: flex; + align-items: center; + justify-content: space-between; + .cancel { + width: 294rpx; + height: 88rpx; + font-size: 36rpx; + color: #b982ff; + display: flex; + align-items: center; + justify-content: center; + font-weight: bold; + border-radius: 100rpx; + border: 2rpx solid #b982ff; + box-sizing: border-box; + } + .sure { + width: 294rpx; + height: 88rpx; + font-size: 34rpx; + color: #fff; + display: flex; + align-items: center; + justify-content: center; + font-weight: bold; + border-radius: 100rpx; + background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%); + } + } +} diff --git a/src/patient/pages/hormones/index.ts b/src/patient/pages/hormones/index.ts index 067b6bb..fdc1913 100644 --- a/src/patient/pages/hormones/index.ts +++ b/src/patient/pages/hormones/index.ts @@ -1,8 +1,213 @@ -const _app = getApp(); +const app = getApp() Page({ - data: {}, - onLoad() {}, -}); + data: { + id: '', + + type: 1, + nav: 0, + popupShow: false, + popupFocus: false, + + popupHormone: '', + + form: { + medicationMethod: '', + oralMonth: '', + injectionWeek: '', + injectionTimes: '', + dosage: '', + }, + question: { + nav0: { + key: 'medicationMethod', + list: {}, + }, + nav11: { + key: 'oralMonth', + list: {}, + }, + nav12: { + key: 'dosage', + list: { + 5: '1片', + 10: '2片', + 15: '3片', + 20: '4片', + 25: '5片', + other: '其他', + }, + }, + nav21: { + key: 'injectionWeek', + list: { + 1: '1周', + 2: '2周', + 3: '3周', + 4: '4周', + 5: '5周', + 6: '6周', + }, + }, + nav22: { + key: 'dosage', + list: { + 250: '250mg', + 500: '500mg', + 750: '750mg', + 1000: '1000mg', + }, + }, + nav31: { + key: 'injectionTimes', + list: { + 1: '1次', + 2: '2次', + 3: '3次', + }, + }, + nav32: { + key: 'dosage', + list: { + 20: '20mg', + 30: '30mg', + 40: '40mg', + }, + }, + }, + params: {}, + + medicationMethodList: {}, + monthList: {}, + + focus: false, + }, + onLoad(options) { + app.waitLogin({ type: [1] }).then(() => { + this.getBaseInfo() + if (Number(options.id) > 0) { + this.getDetail(options.id) + wx.showToast({ + icon: 'none', + title: '每日仅录入1次,您可修改已录信息', + }) + } + }) + }, + getBaseInfo() { + const { question } = this.data + wx.ajax({ + method: 'GET', + url: '?r=xd/hormone-dosage/base-info', + data: {}, + }).then((res) => { + question.nav0.list = res.medicationMethodList + question.nav11.list = res.monthList + this.setData({ + question, + }) + }) + }, + getDetail(id) { + wx.ajax({ + method: 'GET', + url: '?r=xd/hormone-dosage/get-record', + data: { + recordId: id, + }, + }).then((res) => { + const form = { + medicationMethod: res.medicationMethod, + oralMonth: res.oralMonth, + injectionWeek: res.injectionWeek, + injectionTimes: res.injectionTimes, + dosage: res.dosage, + } + this.setData({ + id, + form, + }) + }) + }, + handleSelect(e) { + const { key, value } = e.currentTarget.dataset + const { nav } = this.data + + if (value == 'other') { + this.setData({ + popupShow: true, + popupFocus: true, + }) + return + } + + this.setData({ + [`form.${key}`]: value, + }) + setTimeout(() => { + this.setData({ + nav: nav == 2 ? 2 : nav + 1, + }) + }, 500) + }, + bindtransition() { + this.setData({ + nav: this.data.nav, + }) + }, + handlePrev() { + const { nav } = this.data + this.setData({ + nav: nav - 1, + }) + }, + handleBlur(e) { + console.log('DEBUGPRINT[133]: index.ts:160: e=', e) + const { nav } = this.data + const { key } = e.currentTarget.dataset + this.setData({ + [`form.${key}`]: e.detail.value, + }) + setTimeout(() => { + this.setData({ + nav: nav == 2 ? 2 : nav + 1, + }) + }, 500) + }, + handlePopupCancel() { + this.setData({ + popupShow: false, + popupFocus: false, + }) + }, + handlePopupSure() { + this.handlePopupCancel() + }, + handleSubmit() { + const { id, form, question } = this.data + wx.ajax({ + method: 'POST', + url: id ? '?r=xd/hormone-dosage/update' : '?r=xd/hormone-dosage/create', + data: { + recordId: id, + ...form, + }, + loading: true, + }).then(() => { + wx.redirectTo({ + url: `/patient/pages/hormonesResult/index?medicationMethod=${form.medicationMethod}&oralMonth=${question.nav11.list[form.oralMonth]}&injectionWeek=${form.injectionWeek}&injectionTimes=${form.injectionTimes}&dosage=${Number(form.medicationMethod) == 1 ? Number(form.dosage) * 7 : form.dosage}`, + }) + }) + }, + handleBack() { + wx.navigateBack({ + fail() { + wx.reLaunch({ + url: '/patient/pages/index/index', + }) + }, + }) + }, +}) export {} diff --git a/src/patient/pages/hormones/index.wxml b/src/patient/pages/hormones/index.wxml index a10af0e..c94aef1 100644 --- a/src/patient/pages/hormones/index.wxml +++ b/src/patient/pages/hormones/index.wxml @@ -1,2 +1,305 @@ - -pages/story/index.wxml + + + 激素量表 + + + + + + + + 最近一周 + + 您的激素用药方式 + + + + + {{item}} + + + + + + + + + + + 您已持续 + + 口服激素 + + + + + {{item}} + + + + 上一页 + + + + + + + 最近一周 + + 您每天的激素用量 + + + + {{form.dosage}} + mg + + + + + {{item}} + + + + 说明: + 此处按醋酸泼尼松片用量计算,每片为5mg + 若其它激素药物根据规格做等量换算,如5mg醋酸泼尼松 =4mg甲泼尼龙* + + + + 上一步 + 提交 + + + + + + + + + + 当前疗程内 + + 您已输注 + + + + + {{item}} + + + + + + + + 上一页 + + + + + + + 最近一周 + + 您的激素用量 + + + + + {{item}} + + + + + mg + + + + 上一步 + 提交 + + + + + + + + + 当前疗程内,您已输注 + + + + {{item}} + + + + + + + + 上一页 + + + + + + 最近一周您的激素用量 + + + + {{item}} + + + + + mg + + + + 上一步 + 提交 + + + + + + + + + + 请输入当天的激素用量 + + + mg/天 + + + 取消 + 确认 + + + diff --git a/src/patient/pages/hormonesResult/index.scss b/src/patient/pages/hormonesResult/index.scss index 09460c0..018fd61 100644 --- a/src/patient/pages/hormonesResult/index.scss +++ b/src/patient/pages/hormonesResult/index.scss @@ -41,7 +41,7 @@ page { } } .footer { - margin-top: 22rpx; + margin-top: 12rpx; border-top: 1px solid rgba(255, 255, 255, 0.44); padding-top: 22rpx; font-size: 32rpx; @@ -108,6 +108,9 @@ page { .content { font-size: 36rpx; color: #211d2e; + .a { + color: #b982ff; + } } .container { margin-top: 32rpx; @@ -153,6 +156,11 @@ page { } } } + .link { + margin-top: 32rpx; + font-size: 36rpx; + color: #b982ff; + } .t-footer { margin-top: 34rpx; font-size: 32rpx; @@ -172,7 +180,7 @@ page { .btn { height: 88rpx; font-size: 32rpx; - color: #FFFFFF; + color: #ffffff; display: flex; align-items: center; justify-content: center; diff --git a/src/patient/pages/hormonesResult/index.ts b/src/patient/pages/hormonesResult/index.ts index 054c75d..b55247c 100644 --- a/src/patient/pages/hormonesResult/index.ts +++ b/src/patient/pages/hormonesResult/index.ts @@ -1,13 +1,46 @@ -const _app = getApp() +const app = getApp() Page({ - data: {}, - onLoad() {}, + data: { + picText: { + picTextId: '', + }, + report: false, + }, + onLoad(options) { + this.setData({ + medicationMethod: options.medicationMethod, + oralMonth: options.oralMonth, + injectionWeek: options.injectionWeek, + injectionTimes: options.injectionTimes, + dosage: options.dosage, + report: options.report == '1', + }) + app.waitLogin({ type: [1] }).then(() => { + this.getPicText(options.medicationMethod) + }) + }, + getPicText(mid) { + wx.ajax({ + method: 'GET', + url: '?r=xd/hormone-dosage/get-pic-text', + data: { medicationMethod: mid }, + }).then((res) => { + this.setData({ + picText: res, + }) + }) + }, handleReport() { wx.redirectTo({ url: '/patient/pages/qolReport/index', }) }, + handlePic() { + wx.navigateTo({ + url: `/patient/pages/repositoryDetail/index?id=${this.data.picText.picTextId}`, + }) + }, handleBack() { wx.navigateBack({ fail() { diff --git a/src/patient/pages/hormonesResult/index.wxml b/src/patient/pages/hormonesResult/index.wxml index 105bf44..77b08b5 100644 --- a/src/patient/pages/hormonesResult/index.wxml +++ b/src/patient/pages/hormonesResult/index.wxml @@ -7,72 +7,107 @@ class="page" style="background: url('{{imageUrl}}bg10.png?t={{Timestamp}}') no-repeat top center/100% 610rpx;padding-top:{{pageTop+22}}px;" > -