diff --git a/project.private.config.json b/project.private.config.json index 64cb977..a89a168 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -23,16 +23,23 @@ "miniprogram": { "list": [ { - "name": "patient/pages/liveDetail/index", - "pathName": "patient/pages/liveDetail/index", - "query": "id=35", + "name": "医生-患者量表", + "pathName": "pages/d_qolDetail/index", + "query": "id=178", "scene": null, "launchMode": "default" }, { + "name": "医生-患者详情", + "pathName": "pages/d_patientDetail/index", + "query": "id=178", + "launchMode": "default", + "scene": null + }, + { "name": "医保-详情", "pathName": "patient/pages/medicalDetail/index", - "query": "", + "query": "id=3", "launchMode": "default", "scene": null }, diff --git a/src/app.json b/src/app.json index 1933a37..37b37b3 100644 --- a/src/app.json +++ b/src/app.json @@ -15,7 +15,8 @@ "pages/d_userInfo/index", "pages/d_invite/index", "pages/d_patient/index", - "pages/d_patientHormones/index" + "pages/d_patientHormones/index", + "pages/d_qolDetail/index" ], "subPackages": [ { diff --git a/src/app.ts b/src/app.ts index 7526be7..0e3c7b3 100644 --- a/src/app.ts +++ b/src/app.ts @@ -14,6 +14,7 @@ dayjs.extend(relativeTime) App({ globalData: { + version: '2.0', // 在数据请求里面发送给后端的版本号[X-MP-Version] // 测试号 wx2b0bb13edf717c1d // dev // appid:wxf9ce8010f1ad24aa @@ -111,7 +112,7 @@ App({ Page = page as WechatMiniprogram.Page.Constructor Component = component as WechatMiniprogram.Component.Constructor - wx.ajax = licia.curry(request)({ gUrl: this.globalData.url }) + wx.ajax = licia.curry(request)({ gUrl: this.globalData.url, version: this.globalData.version }) this.startLogin() diff --git a/src/components/popup/index.scss b/src/components/popup/index.scss index a95a6cc..091038d 100644 --- a/src/components/popup/index.scss +++ b/src/components/popup/index.scss @@ -155,19 +155,19 @@ } .contaienr { margin-top: -80rpx; - padding: 96rpx 0 0; + padding: 122rpx 0 0; width: 540rpx; border-radius: 24rpx; box-sizing: border-box; background: linear-gradient(353deg, #ffffff 0%, #f5eeff 100%); box-shadow: inset 0rpx -1rpx 0rpx 0rpx #e5e6eb; .content { - font-size: 28rpx; + font-size: 36rpx; color: #adacb2; text-align: center; } .footer { - margin-top: 40rpx; + margin-top: 66rpx; border-top: 1px solid #e5e6eb; display: flex; .sure, @@ -439,6 +439,46 @@ } } +.popup14 { + .badge { + position: relative; + z-index: 1; + display: block; + width: 198rpx; + height: 198rpx; + margin: 0 auto -110rpx; + text-align: center; + } + .popup-container { + width: 670rpx; + box-sizing: border-box; + padding: 130rpx 58rpx 56rpx; + border-radius: 32rpx; + background: linear-gradient(180deg, #f1e6ff 0%, #ffffff 29.75%, #ffffff 100%); + .title { + font-size: 40rpx; + color: #211d2e; + font-weight: bold; + } + .content { + margin-top: 28rpx; + font-size: 36rpx; + color: #69686e; + line-height: 48rpx; + } + .btn { + margin-top: 56rpx; + height: 88rpx; + line-height: 88rpx; + text-align: center; + font-size: 36rpx; + color: #ffffff; + background: linear-gradient(344deg, #ffbcf9 0%, #b982ff 100%); + border-radius: 100rpx; + } + } +} + .close { margin: 48rpx auto 0; display: block; diff --git a/src/components/popup/index.wxml b/src/components/popup/index.wxml index 2d215d1..49bb444 100644 --- a/src/components/popup/index.wxml +++ b/src/components/popup/index.wxml @@ -106,13 +106,16 @@ - + - + 客服小张 - + 长按识别二维码 @@ -192,6 +195,14 @@ 了解更多详情 + + + + 访问直播活动页需切换至患者端 + 请问是否继续 + 继续 + + + + + + 医保政策轻松查询 + 立即查询 + + + + + + 生活质量自评 + {{params.content}} + + + + + + 访问直播活动页需切换至患者端 + 请问是否继续 + 继续 + + + + + + 访问直播活动页需切换至患者端 + 请问是否继续 + 继续 + + + + diff --git a/src/images/icon64.png b/src/images/icon64.png index 09cb576..8f2ffc0 100644 Binary files a/src/images/icon64.png and b/src/images/icon64.png differ diff --git a/src/images/icon65.png b/src/images/icon65.png index 3dfce2f..d3acdda 100644 Binary files a/src/images/icon65.png and b/src/images/icon65.png differ diff --git a/src/pages/d_patientDetail/index.scss b/src/pages/d_patientDetail/index.scss index 233b6c0..03eea70 100644 --- a/src/pages/d_patientDetail/index.scss +++ b/src/pages/d_patientDetail/index.scss @@ -7,430 +7,343 @@ page { min-height: 100vh; padding-bottom: 220rpx; .banner { - margin: 40rpx 30rpx 0; - padding: 0 20rpx; - background: linear-gradient(53deg, #ffffff 0%, rgba(255, 255, 255, 0.46) 100%); - border-radius: 24rpx 24rpx 24rpx 24rpx; - border: 2rpx solid #ffffff; - border-radius: 24rpx 24rpx 24rpx 24rpx; position: relative; - .watermark { + margin: 0 30rpx; + padding: 32rpx; + background: linear-gradient(180deg, #f3e9ff 0%, #ffffff 27.75%, #ffffff 100%); + border: 2rpx solid #ffffff; + border-radius: 86rpx 24rpx 24rpx 24rpx; + &::before { position: absolute; - top: 80rpx; - z-index: 2; - font-size: 36rpx; - line-height: 58rpx; - color: rgba(0, 0, 0, 0.05); - transform: rotate(-12deg); - text-align: center; - .p { - white-space: wrap; - } + top: 24rpx; + right: 24rpx; + content: ''; + width: 32rpx; + height: 32rpx; + border-radius: 50%; + background: #eadef9; } - .banner-container { - position: relative; - z-index: 3; - padding: 120rpx 0 38rpx; + .user { + display: flex; + gap: 24rpx; .avatar { - position: absolute; - left: 50%; - top: 0; - transform: translate(-50%, -50%); - .avatar-img { - width: 174rpx; - height: 174rpx; + position: relative; + width: 124rpx; + height: 124rpx; + .a-img { + width: 100%; + height: 100%; border-radius: 50%; } .icon { position: absolute; - bottom: 10rpx; - right: 10rpx; - width: 40rpx; - height: 40rpx; + bottom: 0; + right: 0; + width: 32rpx; + height: 32rpx; } } - .w-header { - text-align: center; + .wrap { + flex: 1; + padding-top: 14rpx; .name { - font-size: 48rpx; - color: rgba(33, 29, 46, 1); + font-size: 40rpx; + color: #211d2e; font-weight: bold; + } + .content { + margin-top: 12rpx; + line-height: 36rpx; .age { - margin-left: 10rpx; - display: inline; - color: rgba(173, 172, 178, 1); - font-weight: normal; + margin-right: 16rpx; + padding-right: 16rpx; + display: inline-block; font-size: 28rpx; + color: #211d2e; + border-right: 1px solid rgba(173, 172, 178, 0.35); + } + .tel { + margin-right: 20rpx; + display: inline-block; + font-size: 28rpx; + color: #211d2e; + } + .tel-icon { + width: 36rpx; + height: 36rpx; } } - .tel { - margin-top: 28rpx; + .reg-date { + margin-top: 20rpx; font-size: 28rpx; - color: rgba(33, 29, 46, 1); + color: #211d2e; + } + .options { + margin-top: 24rpx; display: flex; align-items: center; - justify-content: center; - .tel-icon { - margin-left: 10rpx; - width: 40rpx; - height: 40rpx; + gap: 18rpx; + .o-item { + text-align: center; + flex: 1; + padding: 2rpx 0; + font-size: 32rpx; + color: #b982ff; + line-height: 48rpx; + background: #ffffff; + border-radius: 48rpx 48rpx 48rpx 48rpx; + border: 2rpx solid rgba(185, 130, 255, 0.23); } } - .date { - margin-top: 28rpx; - font-size: 28rpx; - color: rgba(105, 104, 110, 1); + } + } + .b-container { + padding: 0 32rpx; + margin-top: 48rpx; + background: #f6f8f9; + border-radius: 24rpx; + .row { + padding: 32rpx; + display: flex; + font-size: 32rpx; + color: #211d2e; + border-bottom: 1px solid rgba(173, 172, 178, 0.1); + &:last-of-type { + border: none; } - .send { - margin-left: 32rpx; - width: 92rpx; - height: 32rpx; - font-size: 22rpx; - color: rgba(103, 186, 202, 1); - text-align: center; - border: 1px solid #67baca; - border-radius: 58rpx 58rpx 58rpx 58rpx; + .label { + flex-shrink: 0; + width: 340rpx; + } + .c-item:not(:last-of-type)::after { + display: inline; + content: ','; } } - .user { - .wrap { - padding-left: 20rpx; - .w-tags { - margin-top: 28rpx; - display: flex; - flex-wrap: wrap; - align-items: center; - gap: 12rpx; - .label { - width: 164rpx; - height: 40rpx; - } - .tag { - padding: 6rpx 16rpx; - font-size: 24rpx; - line-height: 28rpx; - color: rgba(103, 113, 114, 1); - background-color: rgba(242, 244, 245, 1); - border-radius: 8rpx; - } + } + } + .edc-card { + margin: 24rpx 30rpx 0; + padding: 30rpx 32rpx; + display: flex; + align-items: center; + gap: 24rpx; + background-color: #fff; + border-radius: 24rpx; + .icon { + width: 48rpx; + height: 48rpx; + } + .content { + font-size: 32rpx; + color: rgba(33, 29, 46, 1); + font-weight: bold; + } + } + .kkd { + margin: 48rpx 30rpx 0; + .k-title { + display: flex; + align-items: center; + gap: 12rpx; + font-size: 36rpx; + color: #211d2e; + font-weight: bold; + &::before { + content: ''; + width: 8rpx; + height: 36rpx; + background: #b982ff; + border-radius: 2rpx; + } + .sub { + align-self: flex-end; + font-size: 32rpx; + color: #adacb2; + font-weight: normal; + } + } + .k-container { + margin-top: 24rpx; + display: flex; + gap: 30rpx; + .k-qol { + flex: 1; + padding: 32rpx 24rpx 24rpx; + background: linear-gradient( + 180deg, + rgba(239, 226, 255, 0.52) 0%, + rgba(255, 255, 255, 0.96) 26.03%, + #ffffff 100% + ); + border-radius: 32rpx 32rpx 32rpx 32rpx; + border: 2rpx solid #ffffff; + .title { + font-size: 32rpx; + color: #211d2e; + line-height: 40rpx; + font-weight: bold; + .k-question { + width: 24rpx; + height: 24rpx; } } - } - .adl { - margin-top: 32rpx; - background: #ffffff; - box-shadow: 0rpx 8rpx 32rpx 0rpx rgba(40, 48, 49, 0.04); - border-radius: 24rpx 24rpx 24rpx 24rpx; - border: 2rpx solid #f8f9f9; - .a-header { + .content { + margin-top: 18rpx; display: flex; - align-items: flex-start; - flex-direction: column; - .content { - position: relative; - .sub-content1 { - position: relative; - z-index: 1; - border-radius: 24rpx 0 24rpx 0; - padding: 14rpx 28rpx; - font-size: 28rpx; - color: rgba(98, 190, 208, 1); - background-color: rgba(242, 248, 249, 1); - } - .sub-content2 { - position: absolute; - right: 20rpx; - top: 0; - transform: translateX(100%); - border-radius: 0 0 24rpx 0; - padding: 14rpx 28rpx 14rpx 40rpx; + align-self: baseline; + justify-content: space-between; + .num { + white-space: nowrap; + font-size: 64rpx; + color: #ffa300; + font-weight: bold; + .sub { + margin-left: -10rpx; font-size: 28rpx; - color: #e59a29; - background-color: #fff5df; + color: #69686e; + font-weight: normal; } } - .box { - width: 40rpx; - height: 40rpx; - background-color: rgba(242, 248, 249, 1); + .icon { + width: 92rpx; + height: 92rpx; } } - .a-content { - position: relative; - z-index: 1; - margin-top: -40rpx; - padding: 32rpx 30rpx; - background-color: #fff; - border-radius: 24rpx; - .row { + .row { + margin-top: 24rpx; + padding: 16rpx 24rpx; + background-color: #f6f8f9; + border-radius: 16rpx; + .col { display: flex; align-items: center; - gap: 20rpx; - &:first-of-type { - margin-bottom: 24rpx; - } + gap: 10rpx; + line-height: 48rpx; .label { - flex-shrink: 0; font-size: 28rpx; - color: rgba(154, 161, 162, 1); - width: 6em; + color: #211d2e; } .num { - min-width: 3em; font-size: 28rpx; - color: rgba(40, 48, 49, 1); - } - .tag { - display: flex; - align-items: center; - background-color: rgba(232, 245, 248, 1); - border-radius: 12rpx; - .t-label { - padding: 8rpx 12rpx; - font-size: 24rpx; - color: rgba(255, 255, 255, 1); - background-color: rgba(103, 186, 202, 1); - border-radius: 12rpx; - display: flex; - align-items: center; - gap: 8rpx; - flex-shrink: 0; - .icon { - width: 24rpx; - height: 24rpx; - } - } - .t-content { - padding: 0 16rpx 0 8rpx; - display: flex; - align-items: center; - font-size: 28rpx; - color: rgba(103, 186, 202, 1); - display: flex; - align-items: center; - gap: 4rpx; - flex-shrink: 0; - .icon { - width: 24rpx; - height: 28rpx; - } - } - &.tag-warn { - background-color: rgba(227, 220, 64, 0.1); - .t-label { - background-color: rgba(225, 217, 45, 1); - } - .t-content { - color: rgba(225, 217, 45, 1); - } - } - &.tag-error { - background-color: rgba(248, 234, 234, 1); - .t-label { - background-color: rgba(215, 108, 108, 1); - } - .t-content { - color: rgba(215, 108, 108, 1); - } - } + color: #1ec580; } } - .d-row { - margin-top: 22rpx; - display: flex; - gap: 20rpx; - .label { - flex-shrink: 0; - width: 6em; - font-size: 28rpx; - color: rgba(154, 161, 162, 1); - } - .content { - min-width: 3em; - font-size: 28rpx; - color: rgba(40, 48, 49, 1); - } + } + .k-footer { + margin-top: 34rpx; + display: flex; + align-items: center; + justify-content: space-between; + .date { + font-size: 32rpx; + color: #69686e; + } + .add { + flex-shrink: 0; + width: 76rpx; + height: 76rpx; } } + .none { + margin: 80rpx -32rpx 0; + width: 318rpx; + height: 170rpx; + display: block; + } } - .info-card { + .k-hormones { position: relative; - margin-top: 16rpx; - padding: 32rpx 30rpx; - border-radius: 24rpx; - box-shadow: 0rpx 8rpx 32rpx 0rpx rgba(40, 48, 49, 0.04); - border: 2rpx solid #f8f9f9; - background-color: #fff; - display: grid; - gap: 32rpx 22rpx; - grid-template-columns: repeat(auto-fit, minmax(40%, 1fr)); - .ic-item { + flex: 1; + padding: 32rpx 24rpx 24rpx; + background: linear-gradient( + 180deg, + rgba(239, 226, 255, 0.52) 0%, + rgba(255, 255, 255, 0.96) 26.03%, + #ffffff 100% + ); + border-radius: 32rpx 32rpx 32rpx 32rpx; + border: 2rpx solid #ffffff; + .title { + position: relative; + z-index: 1; + font-size: 32rpx; + color: #211d2e; + line-height: 40rpx; + font-weight: bold; + } + .content { + margin-top: 18rpx; display: flex; - .label { - font-size: 28rpx; - color: #9aa1a2; + align-self: baseline; + justify-content: space-between; + .num { white-space: nowrap; + font-size: 64rpx; + color: #b982ff; + font-weight: bold; + .sub { + font-size: 28rpx; + color: #69686e; + font-weight: normal; + } } - .content { + } + .row { + margin-top: 24rpx; + padding: 16rpx 24rpx; + background-color: #f6f8f9; + border-radius: 16rpx; + line-height: 48rpx; + .col1 { font-size: 28rpx; - color: #283031; - white-space: nowrap; + color: #211d2e; } - } - .edit { - position: absolute; - bottom: 0; - right: 0; - padding: 6rpx 18rpx; - display: flex; - align-items: center; - font-size: 28rpx; - color: #fff; - border-radius: 32rpx 0 24rpx 0; - background-color: #67baca; - .icon { - width: 32rpx; - height: 32rpx; + .col2 { + font-size: 28rpx; + color: #b982ff; } } - } - .b-footer { - margin: 32rpx auto 0; - display: flex; - align-items: center; - justify-content: center; - .send { - margin: 0 42rpx; - width: 200rpx; - height: 60rpx; - font-size: 32rpx; - color: rgba(98, 190, 208, 1); + .k-footer { + margin-top: 34rpx; display: flex; align-items: center; - justify-content: center; - background: #ffffff; - border-radius: 64rpx 64rpx 64rpx 64rpx; - border: 2rpx solid #62bed0; + justify-content: space-between; + .date { + font-size: 32rpx; + color: #69686e; + } + .add { + flex-shrink: 0; + width: 76rpx; + height: 76rpx; + } } - .remark { - width: 200rpx; - height: 60rpx; - font-size: 32rpx; - color: rgba(98, 190, 208, 1); - display: flex; - align-items: center; - justify-content: center; - background: #ffffff; - border-radius: 64rpx 64rpx 64rpx 64rpx; - border: 2rpx solid #62bed0; + .none { + margin: 80rpx -32rpx 0; + width: 318rpx; + height: 170rpx; + display: block; } } } } - .info-card { - margin: 24rpx 30rpx 0; - padding: 0 32rpx; - background: linear-gradient(53deg, #ffffff 0%, rgba(255, 255, 255, 0.87) 100%); - border-radius: 24rpx 24rpx 24rpx 24rpx; - border: 2rpx solid #ffffff; - .row { - padding: 32rpx; - display: flex; - align-items: center; - border-bottom: 1px solid rgba(173, 172, 178, 0.1); - &:last-of-type { - border: none; - } - .label { - width: 11em; - font-size: 32rpx; - color: rgba(173, 172, 178, 1); - } - .content { - font-size: 32rpx; - color: rgba(33, 29, 46, 1); - white-space: pre-line; - } - } - } - .edc-card { - margin: 24rpx 30rpx 0; - padding: 30rpx 32rpx; - display: flex; - align-items: center; - gap: 24rpx; - background-color: #fff; - border-radius: 24rpx; - .icon { - width: 48rpx; - height: 48rpx; - } - .content { - font-size: 32rpx; - color: rgba(33, 29, 46, 1); - font-weight: bold; - } - } - .footer { - margin: 60rpx 30rpx 0; - display: flex; - align-items: center; - gap: 26rpx; - .btn { - flex: 1; - height: 88rpx; - background: #ffffff; - font-size: 32rpx; - color: rgba(185, 130, 255, 1); - display: flex; - align-items: center; - justify-content: center; - border-radius: 48rpx 48rpx 48rpx 48rpx; - border: 2rpx solid #b982ff; - } - } .chart-list { - padding: 48rpx 40rpx 0; + padding: 48rpx 30rpx 0; .chart-title { + margin-bottom: 32rpx; font-size: 36rpx; color: #211d2e; font-weight: bold; - } - .chart-filter { - margin-bottom: 24rpx; - position: relative; - z-index: 3; - margin-top: 32rpx; display: flex; - gap: 16rpx; align-items: center; - border-radius: 80rpx 80rpx 80rpx 80rpx; - .type { - padding: 10rpx 32rpx; - display: flex; - align-items: center; - justify-content: center; - font-size: 32rpx; - color: #69686e; - background-color: #ffffff; - border-radius: 34rpx; - .icon { - width: 24rpx; - height: 24rpx; - } - } - .range { - padding: 10rpx 32rpx; - display: flex; - align-items: center; - font-size: 32rpx; - color: #69686e; - border-radius: 34rpx; - background-color: #ffffff; - .icon { - width: 24rpx; - height: 24rpx; - } + &::before { + content: ''; + margin-right: 12rpx; + width: 8rpx; + height: 36rpx; + background: #b982ff; + border-radius: 2rpx 2rpx 2rpx 2rpx; } } .chart-card { @@ -443,6 +356,60 @@ page { padding-top: 40rpx; } } + .chart-card-title { + margin-bottom: 24rpx; + margin-left: -32rpx; + font-size: 36rpx; + color: #211d2e; + font-weight: bold; + display: flex; + align-items: center; + &::before { + content: ''; + margin-right: 12rpx; + width: 8rpx; + height: 36rpx; + background: rgba(185, 130, 255, 0.45); + border-radius: 2rpx 2rpx 2rpx 2rpx; + } + } + .chart-filter { + margin-bottom: 48rpx; + position: relative; + z-index: 3; + margin-top: 32rpx; + display: flex; + gap: 16rpx; + align-items: center; + border-radius: 80rpx 80rpx 80rpx 80rpx; + .type { + padding: 10rpx 32rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 32rpx; + color: #69686e; + background-color: #f6f8f9; + border-radius: 34rpx; + .icon { + width: 24rpx; + height: 24rpx; + } + } + .range { + padding: 10rpx 32rpx; + display: flex; + align-items: center; + font-size: 32rpx; + color: #69686e; + border-radius: 34rpx; + background-color: #f6f8f9; + .icon { + width: 24rpx; + height: 24rpx; + } + } + } .title { font-size: 32rpx; color: #211d2e; @@ -487,15 +454,31 @@ page { padding: 20rpx 40rpx calc(env(safe-area-inset-bottom) + 20rpx); box-sizing: border-box; background-color: #fff; - .pf-btn { + display: flex; + align-items: center; + gap: 26rpx; + .btn1 { + flex: 1; + font-size: 32rpx; + color: #b982ff; + border: 1px solid #b982ff; height: 88rpx; + box-sizing: border-box; display: flex; align-items: center; justify-content: center; + border-radius: 48rpx 48rpx 48rpx 48rpx; + } + .btn2 { + flex: 1; + height: 88rpx; font-size: 32rpx; - color: #ffffff; - background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%); - border-radius: 100rpx 100rpx 100rpx 100rpx; + color: #fff; + display: flex; + align-items: center; + justify-content: center; + background: linear-gradient(344deg, #ffbcf9 0%, #b982ff 100%); + border-radius: 48rpx 48rpx 48rpx 48rpx; } } diff --git a/src/pages/d_patientDetail/index.ts b/src/pages/d_patientDetail/index.ts index 9e65e33..3f750be 100644 --- a/src/pages/d_patientDetail/index.ts +++ b/src/pages/d_patientDetail/index.ts @@ -9,6 +9,8 @@ Page({ doctor: {}, hospital: {}, + qolDetail: {}, + hormoneDetail: {}, id: '', remark: '', @@ -17,7 +19,6 @@ Page({ lazyLoad: true, }, fields: { - 1: 'day', 2: 'month', 3: 'year', }, @@ -26,10 +27,6 @@ Page({ EndDate: '', typeRange: [ { - id: '1', - value: '按天', - }, - { id: '2', value: '按月', }, @@ -38,8 +35,15 @@ Page({ value: '按年', }, ], - type: '3', - typeName: '按年', + type: '2', + typeName: '按月', + + // 激素图表的独立日期范围选择器 + hormoneStartDate: '', + hormoneEndDate: '', + hormoneType: '2', + hormoneTypeName: '按月', + userInfo: {}, popupRemarkShow: false, @@ -183,11 +187,17 @@ Page({ this.setData({ id: option.id, }) + if (option.anchor) { + this.handleAnchor(option.anchor) + } app.waitLogin({ type: [2] }).then(async (_res) => { app.mpBehavior({ doctor: true, PageName: 'PG_DoctorPatientDetail' }) this.getDoctorDetail() this.handleTypeChange() + this.handleHormoneTypeChange() + this.getQolDetail() + this.getHormoneDetail() await this.getDetail() app.getUserInfo(2).then((userInfo) => { this.setData({ @@ -196,6 +206,46 @@ Page({ }) }) }, + handleAnchor(anchor) { + if (anchor == 'qol') { + wx.pageScrollTo({ scrollTop: 700 }) + } + if (anchor == 'hormone') { + wx.pageScrollTo({ scrollTop: 1550 }) + } + }, + getQolDetail() { + wx.ajax({ + method: 'GET', + url: '?r=xd/doctor/qol/get-last-record', + data: { + patientId: this.data.id, + }, + }).then((res) => { + this.setData({ + qolDetail: { + ...res, + CreateTime: dayjs(res.CreateTime).format('YYYY-MM-DD'), + }, + }) + }) + }, + getHormoneDetail() { + wx.ajax({ + method: 'GET', + url: '?r=xd/doctor/hormone-dosage/get-last-record', + data: { + patientId: this.data.id, + }, + }).then((res) => { + this.setData({ + hormoneDetail: { + ...res, + createTime: dayjs(res.createTime).format('YYYY-MM-DD'), + }, + }) + }) + }, getDoctorDetail() { wx.ajax({ method: 'GET', @@ -236,6 +286,8 @@ Page({ }, handleChange() { this.getGraph() + }, + handleHormoneChange() { this.getHormoneData() }, handleTypeChange(e = '') { @@ -248,11 +300,7 @@ Page({ const typeName = typeRange[index].value let EndDate = '' let StartDate = '' - if (type === '1') { - EndDate = dayjs().format('YYYY-MM-DD') - StartDate = dayjs().subtract(6, 'd').format('YYYY-MM-DD') - } - else if (type === '2') { + if (type === '2') { EndDate = dayjs().format('YYYY-MM') StartDate = dayjs().subtract(1, 'M').format('YYYY-MM') } @@ -267,6 +315,31 @@ Page({ StartDate, }) this.getGraph() + }, + handleHormoneTypeChange(e = '') { + let index = 0 + if (e) { + index = (e as any).detail.value + } + const { typeRange } = this.data + const hormoneType = typeRange[index].id + const hormoneTypeName = typeRange[index].value + let hormoneEndDate = '' + let hormoneStartDate = '' + if (hormoneType === '2') { + hormoneEndDate = dayjs().format('YYYY-MM') + hormoneStartDate = dayjs().subtract(1, 'M').format('YYYY-MM') + } + else if (hormoneType === '3') { + hormoneEndDate = dayjs().format('YYYY') + hormoneStartDate = dayjs().subtract(1, 'y').format('YYYY') + } + this.setData({ + hormoneType, + hormoneTypeName, + hormoneEndDate, + hormoneStartDate, + }) this.getHormoneData() }, getGraph() { @@ -306,14 +379,14 @@ Page({ }) }, getHormoneData() { - const { type, StartDate, EndDate } = this.data + const { hormoneType, hormoneStartDate, hormoneEndDate } = this.data wx.ajax({ method: 'GET', url: '?r=xd/doctor/hormone-dosage/graph', data: { - DateType: type, - StartDate, - EndDate, + DateType: hormoneType, + StartDate: hormoneStartDate, + EndDate: hormoneEndDate, PatientId: this.data.id, count: 0, }, @@ -806,4 +879,9 @@ Page({ url: `/pages/d_patientHormones/index?id=${this.data.detail.PatientId}&name=${this.data.detail.Name}`, }) }, + hadnleQolDetail() { + wx.navigateTo({ + url: `/pages/d_qolDetail/index?id=${this.data.detail.PatientId}`, + }) + }, }) diff --git a/src/pages/d_patientDetail/index.wxml b/src/pages/d_patientDetail/index.wxml index 425e1c0..de94919 100644 --- a/src/pages/d_patientDetail/index.wxml +++ b/src/pages/d_patientDetail/index.wxml @@ -4,51 +4,59 @@