diff --git a/project.private.config.json b/project.private.config.json index c52ab6e..269ed1a 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -23,15 +23,22 @@ "miniprogram": { "list": [ { - "name": "患者-qol评估报告", - "pathName": "patient/pages/qolReport/index", - "query": "", + "name": "医生-患者详情", + "pathName": "pages/d_patientDetail/index", + "query": "id=21", "scene": null, "launchMode": "default" }, { "name": "患者-qol结果", "pathName": "patient/pages/qolResult/index", + "query": "id=6", + "launchMode": "default", + "scene": null + }, + { + "name": "患者-qol评估报告", + "pathName": "patient/pages/qolReport/index", "query": "", "launchMode": "default", "scene": null @@ -86,13 +93,6 @@ "scene": null }, { - "name": "医生-患者详情", - "pathName": "pages/d_patientDetail/index", - "query": "id=10", - "launchMode": "default", - "scene": null - }, - { "name": "患者-直播结果页", "pathName": "patient/pages/liveResult/index", "query": "id=5", diff --git a/src/pages/d_interactiveDoctor/index.scss b/src/pages/d_interactiveDoctor/index.scss index b7e1216..6b23bb9 100644 --- a/src/pages/d_interactiveDoctor/index.scss +++ b/src/pages/d_interactiveDoctor/index.scss @@ -343,36 +343,40 @@ page { } } .adl { + position: relative; margin-bottom: 32rpx; - padding: 32rpx 156rpx 34rpx 30rpx; - border-radius: 32rpx; - background: linear-gradient(141deg, #edfcff 0%, #d4f3f9 100%); + padding: 32rpx; + border-radius: 24rpx; + background: linear-gradient(180deg, #f6efff 0%, #ffffff 100%); border: 2rpx solid #fff; .title { - width: 324rpx; - height: 40rpx; + font-size: 36rpx; + color: #211d2e; + font-weight: bold; } .sub-title { - margin-top: 18rpx; - line-height: 1; + margin-top: 10rpx; + margin-right: 222rpx; font-size: 28rpx; - color: rgba(255, 255, 255, 0.8); + color: #211d2e; } .btn { - margin-top: 20rpx; - width: 220rpx; - height: 56rpx; + margin-top: 18rpx; + width: 224rpx; + height: 64rpx; text-align: center; - line-height: 56rpx; + line-height: 64rpx; font-size: 28rpx; - color: #e04775; - background: #ffffff; + color: #ffffff; + background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%); border-radius: 102rpx 102rpx 102rpx 102rpx; } - .tip { - margin-top: 10rpx; - font-size: 24rpx; - color: #fff; + .photo { + position: absolute; + bottom: 30rpx; + right: 0; + width: 214rpx; + height: 212rpx; } } .audio { diff --git a/src/pages/d_interactiveDoctor/index.wxml b/src/pages/d_interactiveDoctor/index.wxml index eb9fd4e..7293342 100644 --- a/src/pages/d_interactiveDoctor/index.wxml +++ b/src/pages/d_interactiveDoctor/index.wxml @@ -93,19 +93,11 @@ - - - ADL+激素双达标 - 点击进入ADL - 建议您定期做ADL测评 + + GO-QOL生活质量评分 + 可从主观感受变化反馈治疗效果,建议您每月定期测评 + 点击开始自评 + () +let echarts: any = null Page({ data: { @@ -161,7 +162,14 @@ Page({ count: 1, }, }, + chartComponent1: null as any, + chartComponent2: null as any, + chartComponent3: 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.setData({ id: option.id, }) @@ -169,6 +177,7 @@ Page({ app.waitLogin({ type: [2] }).then(async (_res) => { app.mpBehavior({ PageName: 'PG_DoctorPatientDetail' }) this.getDoctorDetail() + this.handleTypeChange() await this.getDetail() app.getUserInfo(2).then((userInfo) => { this.setData({ @@ -215,8 +224,11 @@ Page({ }) }, handleTypeChange(e) { - const index = e.detail.value - const { typeRange, nav } = this.data + let index = 0 + if (e) { + index = e.detail.value + } + const { typeRange } = this.data const type = typeRange[index].id const typeName = typeRange[index].value let EndDate = '' @@ -237,228 +249,47 @@ Page({ EndDate, StartDate, }) - if (nav === '0') { - this.getGraph() - } else { - this.getAdlList() - } - }, - handleChange() { - const { nav } = this.data - if (nav === '0') { - this.getGraph() - } else { - this.getAdlList() - } + this.getGraph() }, getGraph() { + const { type, StartDate, EndDate } = this.data wx.ajax({ method: 'GET', - url: '?r=zd/doctor/patient/adl-graph', + url: '?r=xd/doctor/qol/graph', data: { - patientId: this.data.id, - StartDate: this.data.StartDate, - EndDate: this.data.EndDate, - DateType: this.data.type, + DateType: type, + StartDate: StartDate, + EndDate: EndDate, count: 0, + PatientId: this.data.id, }, - }).then(async (res) => { - this.initChart1(res.adlSummary) - this.initChart2(res.adlSummary) - - const medication = res.medication.map((item) => { - return { - Date: item.InjectionDate, - ...item, - } - }) - const list = res.list - const newList: any[] = this.mergeArr(list, medication) - const chart3 = await this.initChart3(newList as never[]) - const chart4 = await this.initChart4(newList as never[]) - echarts.connect([chart3, chart4]) - }) - }, - mergeArr(array1: any[] = [], array2: any[] = []) { - // 合并两个数组中相同Date字段的对象 - const mergedArray: any[] = [] - const mergedMap = new Map() - - array1.concat(array2).forEach((obj) => { - const date = obj.Date - if (mergedMap.has(date)) { - mergedMap.get(date).push(obj) - } else { - mergedMap.set(date, [obj]) - } - }) - - mergedMap.forEach((objs: any) => { - if (objs.length === 1) { - mergedArray.push(objs[0]) - } else { - const mergedObj = objs.reduce((acc, cur) => ({ ...acc, ...cur })) - mergedArray.push(mergedObj) - } - }) - - // 按照Date字段对合并后的数组进行排序 - mergedArray.sort((a, b) => { - return a.Date.localeCompare(b.Date) - }) - return mergedArray - }, - initChart1(adlSummary = {}) { - this.ecDataTrendComponent1.init((canvas, width, height, dpr) => { - const chart = echarts.init(canvas, null, { - width, - height, - devicePixelRatio: dpr, // new - }) - canvas.setChart(chart) - - const option = { - tooltip: { - trigger: 'item', - formatter: '{b} \n {c}次,{d}%', - }, - legend: { - show: false, - }, - color: ['rgba(226, 219, 65, 1)', 'rgba(215, 108, 108, 1)', 'rgba(98, 190, 208, 1)'], - series: [ - { - name: '全部患者', - type: 'pie', - radius: ['40%', '60%'], - center: ['50%', '50%'], - label: { - show: true, - width: 80, - alignTo: 'edge', - minMargin: 5, - edgeDistance: 10, - lineHeight: 15, - formatter: '{b} \n{time|{d}%}', - rich: { - time: { - fontSize: 10, - color: '#999', - }, - }, - }, - labelLine: { - length: 15, - length2: 0, - maxSurfaceAngle: 80, - }, - labelLayout(params) { - const isLeft = params.labelRect.x < chart.getWidth() / 2 - const points = params.labelLinePoints - // Update the end point. - points[2][0] = isLeft ? params.labelRect.x : params.labelRect.x + params.labelRect.width - return { - labelLinePoints: points, - } - }, - data: [ - { value: adlSummary.adlNearNum, name: 'ADL接近达标' }, - { value: adlSummary.adlUnStandardNum, name: 'ADL未达标' }, - { value: adlSummary.adlStandardNum, name: 'ADL达标' }, - ], - emphasis: { - itemStyle: { - shadowBlur: 10, - shadowOffsetX: 0, - shadowColor: 'rgba(0, 0, 0, 0.5)', - }, - }, - }, - ], - } - - chart.setOption(option) - return chart - }) - }, - initChart2(adlSummary = {}) { - this.ecDataTrendComponent2.init((canvas, width, height, dpr) => { - const chart = echarts.init(canvas, null, { - width, - height, - devicePixelRatio: dpr, // new + }).then((res) => { + const list0: any[] = [] + const list1: any[] = [] + const list2: any[] = [] + res.list.forEach((item: any) => { + list0.push({ + Date: item.Date, + value: item.TotalScore, + }) + list1.push({ + Date: item.Date, + value: item.VisionScore, + }) + list2.push({ + Date: item.Date, + value: item.AppearanceScore, + }) }) - canvas.setChart(chart) - const option = { - tooltip: { - trigger: 'item', - formatter: '{b} \n {c}次,{d}%', - }, - legend: { - show: false, - }, - color: ['rgba(215, 108, 108, 1)', 'rgba(98, 190, 208, 1)'], - series: [ - { - name: '全部患者', - type: 'pie', - radius: ['40%', '60%'], - center: ['50%', '50%'], - label: { - show: true, - width: 80, - alignTo: 'edge', - minMargin: 5, - edgeDistance: 10, - lineHeight: 15, - formatter: '{b} \n{time|{d}%}', - rich: { - time: { - fontSize: 10, - color: '#999', - }, - }, - }, - labelLine: { - length: 15, - length2: 0, - maxSurfaceAngle: 80, - }, - labelLayout(params) { - const isLeft = params.labelRect.x < chart.getWidth() / 2 - const points = params.labelLinePoints - // Update the end point. - points[2][0] = isLeft ? params.labelRect.x : params.labelRect.x + params.labelRect.width - return { - labelLinePoints: points, - } - }, - data: [ - { value: adlSummary.SteroidDailyDoseUnStandardNum, name: '激素未达标' }, - { value: adlSummary.SteroidDailyDoseStandardNum, name: '激素达标' }, - ], - emphasis: { - itemStyle: { - shadowBlur: 10, - shadowOffsetX: 0, - shadowColor: 'rgba(0, 0, 0, 0.5)', - }, - }, - }, - ], - } - - chart.setOption(option) - return chart + this.initChart(list0, 'chartComponent1') + this.initChart(list1, 'chartComponent2') + this.initChart(list2, 'chartComponent3') }) }, - - initChart3(defaultList = []) { - const { userInfo } = this.data - const list: any = defaultList + initChart(defaultList = [] as any[], key) { return new Promise((reslove) => { - this.ecDataTrendComponent3.init((canvas, width, height, dpr) => { + this[key].init((canvas, width, height, dpr) => { const chart = echarts.init(canvas, null, { width, height, @@ -492,7 +323,7 @@ Page({ { type: 'category', axisTick: { - show: true, + show: false, inside: true, length: 1, alignWithLabel: true, @@ -509,258 +340,63 @@ Page({ type: 'dashed', }, }, - data: list.map((item) => dayjs(item.Date).format('MM-DD')), - axisLabel: { - formatter() { - return '' + 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: 1, - }, - ], - series: [ - { - name: '总分', - data: list.length ? list.map((item) => item.TotalScore) : [25], - barWidth: '16', - label: { - show: true, - position: 'top', - color: '#CF5375', - }, - type: 'line', - symbol: 'circle', - symbolSize: 8, - showSymbol: list.length >= 1, - connectNulls: true, - z: 10, - itemStyle: { - color: '#CF5375', - }, - markLine: { - symbol: ['none', 'none'], - data: [ - { - name: '达标区(1分)', - yAxis: 1, - label: { - formatter: '{b}', - position: 'insideMiddle', - color: '#24D8C8', - fontSize: '10', - }, - lineStyle: { - cap: '', - color: '#34D7C7', - type: 'dashed', - }, - }, - ], - }, - markArea: { - itemStyle: { - color: 'rgba(37,217,200,0.19)', - }, - data: [ - [ - { - yAxis: 0, - }, - { - yAxis: 1, - }, - ], - ], - }, - }, - ], - dataZoom: { - type: 'inside', // 有type这个属性,滚动条在最下面,也可以不行,写y:36,这表示距离顶端36px,一般就是在图上面。 - startValue: list.length - 5, - endValue: list.length - 1, - filterMode: 'none', - }, - } - - if (this.data.detail.UserType === 4) { - const markLineData = list - .filter((item) => item.InjectionBottles) - .map((item) => { - return { - name: '', - xAxis: dayjs(item.Date).format('MM-DD'), + minInterval: 20, + max: 100, + axisLine: { + show: false, lineStyle: { - color: 'rgba(37, 217, 200,0.5)', - cap: '', type: 'solid', + color: 'rgba(161, 164, 172, 1)', }, - - label: { - formatter: '', - position: 'insideEndBottom', - rotate: 0, - color: '#25D9C8', - offset: [60, 0], - }, - } - }) - option.series.push({ - name: '用药', - data: list.map((item) => (item.InjectionBottles ? 0 : null)), - type: 'line', - symbol: - 'image://data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAABACAYAAABhspUgAAAAAXNSR0IArs4c6QAACAVJREFUaEPtmltsHFcZx/9nZu92bMdJSMitzoWkoXVKUrVV8wKk4gHxgJTwgKA8lhfgCZBoUJEqUYGA0AhRQUSpFJQIHlyqogZFIipUoKiAKJAYQkp9qR1ir9fe6+zuXM4FfWf2MrOJY+/aS0zlkRxZzsw5v/nP/3znO+c7DItcl4vFTWVl/7wg5EctKSK2knCVBFcKcrGH7vL3MvfwVnYeGbsaustgAAODCSDCDLU1Hp/Ym+o7fnrvB9+9U3NssT5ezWe+k5X8qwvCQ0FwVKSEswJg6sfmHH+cm2l0SZ3Tj8F84ChjiDID+1I9ly4ceuTjbQFfyM2MpDk/meEu8oKjJIUG9khh1YHEtUeupgPAWl3AAENEwzLEmIGd8dToq8OPDbcF/OLCrZFZ7p5Mcxc5wVEUAmQLT8mOLFHvfCwzF7ZEC3CcGdiRSIxeHD7WHvDZhZsjM56ngbMELDlsWVO4c4ExOd8E9i1R969vhzhj2BFPjv76cJvApPCtkMK8YYkVOALLUXh7PNE+8M/Iw553MiN8S1ii6eGVAI+mZ0PfhzHoAWfWBlyMMWyPJ0dfG368PUu8nJ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O0NsXi13b1DDz5/H0Hxv8Lo3UyF0Y2DrcAAAAASUVORK5CYII=', - symbolSize: [11, 16], - symbolOffset: [0, 0], - itemStyle: { - color: '#25D9C8', - }, - lineStyle: { - width: 0, - }, - tooltip: { - show: false, - }, - z: 11, - markLine: { - symbol: ['none', 'none'], - data: markLineData, - }, - }) - // option.series.push({ - // name: "用药时间", - // data: list.map((item: any) => (item.InjectionBottles ? item.TotalScore : 0)), - // type: "line", - // symbol: - // "image://data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAABACAYAAABhspUgAAAAAXNSR0IArs4c6QAACAVJREFUaEPtmltsHFcZx/9nZu92bMdJSMitzoWkoXVKUrVV8wKk4gHxgJTwgKA8lhfgCZBoUJEqUYGA0AhRQUSpFJQIHlyqogZFIipUoKiAKJAYQkp9qR1ir9fe6+zuXM4FfWf2MrOJY+/aS0zlkRxZzsw5v/nP/3znO+c7DItcl4vFTWVl/7wg5EctKSK2knCVBFcKcrGH7vL3MvfwVnYeGbsaustgAAODCSDCDLU1Hp/Ym+o7fnrvB9+9U3NssT5ezWe+k5X8qwvCQ0FwVKSEswJg6sfmHH+cm2l0SZ3Tj8F84ChjiDID+1I9ly4ceuTjbQFfyM2MpDk/meEu8oKjJIUG9khh1YHEtUeupgPAWl3AAENEwzLEmIGd8dToq8OPDbcF/OLCrZFZ7p5Mcxc5wVEUAmQLT8mOLFHvfCwzF7ZEC3CcGdiRSIxeHD7WHvDZhZsjM56ngbMELDlsWVO4c4ExOd8E9i1R969vhzhj2BFPjv76cJvApPCtkMK8YYkVOALLUXh7PNE+8M/Iw553MiN8S1ii6eGVAI+mZ0PfhzHoAWfWBlyMMWyPJ0dfG368PUu8nJ8bWRD8ZPYOUWIlwH+YmQ4Dg8FoAPu22J5Ijb7ywKPtAV8uZZ/LC36qIH11q7UIIZRCp8CW5+Ly7M3bgVkzUlC0ONC74VcvHTj6ybaiBN38RmVhV9YxTBs2nrl08VTRrjy1gvEGZRh+HGu5epOp808ceehM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952ARHVDWXQQVuYbqaWQ2rLtrGVJmhEljR6pyRFqS1fIKS+LjB/JmuNQ7vlrMYUs1dxp3udRwrvdJV4GedJ3BDbl6yj1UFdgsJVNMbQp0mt5UQ67OXBLknwOO/OILi2KYQXN++Bez99F/XJvA75x+G9e7GEFzvfTnsf/Iv68CNKhFla50OujWtsD3fA2tyMPSpM3/eBSebCv0tPljBlkfCm9i9Q1kkNofXiF0fdJO/HEb++tYlvXmnGwYOpTF04lrov7oOPDFyGIUb7+sIuP9gBns+Fd6zXgdunen+7xT+z28OIPOn3R1ZYsujU9jxsbf/tx6m3pQMVxzGLhyFNdUycezOYd9n3wrBMeP23c+ue/hO0q7pOLwOfC/Sy1uvfwDZa9tC4g8Oz2L78X8vOTjviYeXpLrLDSsC3qqy2KZyjeYH3EnsKf92JTxLPvti9UOYkv233eefWKEqE52rWGSJFNx9pxbu9Wbge2/VvOYVru/Ar+UN7cb+8FosGTRrz35RpulhE+zrs1TjoKKMf5BuIzN1cTFYRcpwD6NOd2scxRIVZZqbN/q0la7sN6tIumTwjdlxXUWqCAIW6KeiTMtxxXnh4boTPoK4ZJxq84ZssQgvAEwl3HpVXyusK0kG2HNzk/mSEP0VJfS5NCosKjq7USuAU15lKYkbXa4i3czlwOkUQe0KAtfrzf2RqMVOZ6Z+VxD8w1RUJEtElV9JDx4Ipd8nXFtX+btxOULg7ay/d9eohDL/tFX9PCZB70qk3mQ/ys0M5T3nWlXKXqrYcyaRpFtrRw7qiPQyRa3Aso8JLevdqAg/mptHwW1uZ9XPYxIwiUc/GyLRyuH+LcO6d4KuCv5SRYojrpQDFIcjMLTp60dcdMJel6D1YM+y0MI3uUIg57n4RyGLoueGE/xar2SLHsO0NsXi13b1DDz5/H0Hxv8Lo3UyF0Y2DrcAAAAASUVORK5CYII=", - // symbolSize: [11, 16], - // symbolOffset: [0, "100%"], - // itemStyle: { - // color: "#25D9C8", - // }, - // tooltip: { - // show: false, - // }, - // lineStyle: { - // width: 0, - // }, - // z: 1, - // }); - } - - chart.setOption(option) - reslove(chart) - return chart - }) - }) - }, - initChart4(defaultList = []) { - const { userInfo } = this.data - const list: any = defaultList - return new Promise((reslove) => { - this.ecDataTrendComponent4.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: { + }, + splitLine: { show: true, - inside: true, - length: 1, - alignWithLabel: true, + showMinLine: false, lineStyle: { type: 'dotted', - color: '#D8D8D8', - width: 4, - cap: 'round', - }, - }, - axisLine: { - lineStyle: { - color: '#8C8C8C', - type: 'dashed', - }, - }, - data: list.map((item) => dayjs(item.Date).format('MM-DD')), - }, - ], - yAxis: [ - { - type: 'value', - minInterval: 1, - max(value) { - return value.max + 20 > 999 ? 999 : value.max + 20 - }, - axisLabel: { - // width: 20, - formatter(value: number) { - return value + color: 'rgba(137, 141, 151, 0.23)', }, }, }, ], series: [ { - name: '激素用量', - data: list.length ? list.map((item) => item.SteroidDailyDose) : [20], + name: '总分', + data: defaultList.length ? defaultList.map((item) => item.value) : [25], barWidth: '16', - type: 'line', - symbol: 'circle', - symbolSize: 8, - connectNulls: true, - showSymbol: list.length >= 1, - z: 10, label: { show: true, position: 'top', - color: '#18474e', - z: 11, - formatter({ value }) { - return `${value}mg` - }, + color: '#B982FF', }, + type: 'line', + symbolSize: 4, + showSymbol: defaultList.length >= 1, + connectNulls: true, + z: 10, itemStyle: { - color: '#3192A1', + color: '#B982FF', }, markLine: { symbol: ['none', 'none'], data: [ { - name: '达标区(5mg)', - yAxis: 5, + name: '达标区', + yAxis: 80, label: { formatter: '{b}', position: 'insideMiddle', @@ -773,21 +409,6 @@ Page({ type: 'dashed', }, }, - { - name: '20', - yAxis: 20, - label: { - formatter: '{b}', - position: 'start', - color: '#D76C6C', - distance: 8, - }, - lineStyle: { - cap: '', - color: '#D76C6C', - type: 'dashed', - }, - }, ], }, markArea: { @@ -797,10 +418,10 @@ Page({ data: [ [ { - yAxis: 0, + yAxis: 80, }, { - yAxis: 5, + yAxis: 100, }, ], ], @@ -809,76 +430,11 @@ Page({ ], dataZoom: { type: 'inside', // 有type这个属性,滚动条在最下面,也可以不行,写y:36,这表示距离顶端36px,一般就是在图上面。 - startValue: list.length - 5, - endValue: list.length - 1, + startValue: 0, + endValue: 4, filterMode: 'none', }, } - if (this.data.detail.UserType === 4) { - const markLineData = list - .filter((item) => item.InjectionBottles) - .map((item) => { - return { - name: '', - xAxis: dayjs(item.Date).format('MM-DD'), - lineStyle: { - color: 'rgba(37, 217, 200,0.5)', - cap: '', - type: 'solid', - }, - label: { - formatter: '', - position: 'insideEndBottom', - rotate: 0, - color: '#25D9C8', - offset: [60, 0], - }, - } - }) - const maxValue = Math.max(...list.map((item) => item.SteroidDailyDose)) - option.series.push({ - name: '用药', - data: list.map((item) => (item.InjectionBottles ? 0 : null)), - type: 'line', - symbol: - 'image://data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAABACAYAAABhspUgAAAAAXNSR0IArs4c6QAACAVJREFUaEPtmltsHFcZx/9nZu92bMdJSMitzoWkoXVKUrVV8wKk4gHxgJTwgKA8lhfgCZBoUJEqUYGA0AhRQUSpFJQIHlyqogZFIipUoKiAKJAYQkp9qR1ir9fe6+zuXM4FfWf2MrOJY+/aS0zlkRxZzsw5v/nP/3znO+c7DItcl4vFTWVl/7wg5EctKSK2knCVBFcKcrGH7vL3MvfwVnYeGbsaustgAAODCSDCDLU1Hp/Ym+o7fnrvB9+9U3NssT5ezWe+k5X8qwvCQ0FwVKSEswJg6sfmHH+cm2l0SZ3Tj8F84ChjiDID+1I9ly4ceuTjbQFfyM2M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U15lKYkbXa4i3czlwOkUQe0KAtfrzf2RqMVOZ6Z+VxD8w1RUJEtElV9JDx4Ipd8nXFtX+btxOULg7ay/d9eohDL/tFX9PCZB70qk3mQ/ys0M5T3nWlXKXqrYcyaRpFtrRw7qiPQyRa3Aso8JLevdqAg/mptHwW1uZ9XPYxIwiUc/GyLRyuH+LcO6d4KuCv5SRYojrpQDFIcjMLTp60dcdMJel6D1YM+y0MI3uUIg57n4RyGLoueGE/xar2SLHsO0NsXi13b1DDz5/H0Hxv8Lo3UyF0Y2DrcAAAAASUVORK5CYII=', - symbolSize: [11, 16], - symbolOffset: [0, 0], - itemStyle: { - color: '#25D9C8', - }, - lineStyle: { - width: 0, - }, - tooltip: { - show: false, - }, - z: 11, - markLine: { - symbol: ['none', 'none'], - data: markLineData, - }, - }) - // option.series.push({ - // name: "用药时间", - // data: list.map((item: any) => (item.InjectionBottles ? item.TotalScore : 0)), - // type: "line", - // symbol: - // "image://data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAABACAYAAABhspUgAAAAAXNSR0IArs4c6QAACAVJREFUaEPtmltsHFcZx/9nZu92bMdJSMitzoWkoXVKUrVV8wKk4gHxgJTwgKA8lhfgCZBoUJEqUYGA0AhRQUSpFJQIHlyqogZFIipUoKiAKJAYQkp9qR1ir9fe6+zuXM4FfWf2MrOJY+/aS0zlkRxZzsw5v/nP/3znO+c7DItcl4vFTWVl/7wg5EctKSK2knCVBFcKcrGH7vL3MvfwVnYeGbsaustgAAODCSDCDLU1Hp/Ym+o7fnrvB9+9U3NssT5ezWe+k5X8qwvCQ0FwVKSEswJg6sfmHH+cm2l0SZ3Tj8F84ChjiDID+1I9ly4ceuTjbQFfyM2MpDk/meEu8oKjJIUG9khh1YHEtUeupgPAWl3AAENEwzLEmIGd8dToq8OPDbcF/OLCrZFZ7p5Mcxc5wVEUAmQLT8mOLFHvfCwzF7ZEC3CcGdiRSIxeHD7WHvDZhZsjM56ngbMELDlsWVO4c4ExOd8E9i1R969vh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wW1uZ9XPYxIwiUc/GyLRyuH+LcO6d4KuCv5SRYojrpQDFIcjMLTp60dcdMJel6D1YM+y0MI3uUIg57n4RyGLoueGE/xar2SLHsO0NsXi13b1DDz5/H0Hxv8Lo3UyF0Y2DrcAAAAASUVORK5CYII=", - // symbolSize: [11, 16], - // symbolOffset: [0, "100%"], - // itemStyle: { - // color: "#25D9C8", - // }, - // tooltip: { - // show: false, - // }, - // lineStyle: { - // width: 0, - // }, - // z: 1, - // }); - } chart.setOption(option) reslove(chart) @@ -975,17 +531,6 @@ Page({ }) }, - handleNav(e, mp = true) { - const { index } = e.currentTarget.dataset - if (index == 0 && mp) { - } - if (index == 1 && mp) { - } - this.setData({ - nav: index, - }) - this.handleTypeChange({ detail: { value: '2' } }) - }, getAdlList(newPage = 1) { const { detail, EndDate, StartDate, type } = this.data wx.ajax({ @@ -1024,13 +569,6 @@ Page({ }) }) }, - onReachBottom() { - const { page, pages } = this.data.pagination - const nav = this.data.nav - if (pages > page && nav === '1') { - this.getAdlList(page + 1) - } - }, handleFold(e) { const { index } = e.currentTarget.dataset this.setData({ diff --git a/src/pages/d_patientDetail/index.wxml b/src/pages/d_patientDetail/index.wxml index 61e03f0..c2c5e5f 100644 --- a/src/pages/d_patientDetail/index.wxml +++ b/src/pages/d_patientDetail/index.wxml @@ -60,6 +60,57 @@ 发消息 备注 + + GO-QOL生活质量评估报告 + + + {{typeName}} + + + + + {{StartDate}} + + ~ + + {{EndDate}} + + + + + + GO-QOL整体记录曲线 + + + + + + GO-QOL视觉功能影响记录曲线 + + + + + + GO-QOL外观影响记录曲线 + + + + + { - const newRecord = res.newRecord this.setData({ - adlList: res.list, - adlNum: res.count, - adlNewRecord: { - days: dayjs().diff(newRecord.CreateTime, 'day'), - ...newRecord, - newCreateTime: dayjs(newRecord.CreateTime).format('YYYY-MM-DD'), + qolDetail: { + ...res.newRecord, + CreateDate: dayjs(res.newRecord.CreateTime).format('YYYY-MM-DD'), }, }) }) diff --git a/src/patient/pages/index/index.wxml b/src/patient/pages/index/index.wxml index 9910604..62b0d44 100644 --- a/src/patient/pages/index/index.wxml +++ b/src/patient/pages/index/index.wxml @@ -39,9 +39,6 @@ {{unreadCount ? '去看看':'去咨询'}} - - 最近一次评测 xxxx-xx-xx - + + 最近一次评测 {{qolDetail.CreateDate}} + {{card.name}} diff --git a/src/patient/pages/interactivePatient/index.ts b/src/patient/pages/interactivePatient/index.ts index c2a6b76..2840a2f 100644 --- a/src/patient/pages/interactivePatient/index.ts +++ b/src/patient/pages/interactivePatient/index.ts @@ -127,18 +127,6 @@ Page({ nextMsgId, }, }).then((res) => { - res.messageList.push({ - msgId: '112', - msgContentType: '3', - msgContent: - '你好,我是你的专属医生kola医生,我们可以在TED关爱中心上进行简单的互动啦!如果你需要了解我的出诊时间,或者有症状反复、需要调药的情况,可以给我留言。\r\n甲状腺眼突通过合理的治疗,是可以达到期待的状态的,放松心情,规范管理,加油。', - welcomeMsg: '', - msgVisitTimeType: '0', - msgVisitTime: '', - msgFromType: '2', - ReVisitInfo: '', - msgCreateTime: '2025-08-21 11:12:58', - }) res.messageList.map((item) => { if (item.msgContentType === '4') { item.msgContent = JSON.parse(item.msgContent) @@ -374,6 +362,11 @@ Page({ ], }) }, + handleQol() { + wx.navigateTo({ + url: '/patient/pages/qol/index', + }) + }, handleBack() { wx.navigateBack({ fail() { diff --git a/src/patient/pages/interactivePatient/index.wxml b/src/patient/pages/interactivePatient/index.wxml index d033955..9fac853 100644 --- a/src/patient/pages/interactivePatient/index.wxml +++ b/src/patient/pages/interactivePatient/index.wxml @@ -66,10 +66,10 @@ - + GO-QOL生活质量评分 可从主观感受变化反馈治疗效果,建议您每月定期测评 - 点击开始自评 + 点击开始自评 () +const app = getApp() Page({ data: {}, - onLoad() {}, + onLoad() { + app.waitLogin({ type: [0, 1] }).then(() => {}) + }, handleAdd() { wx.navigateTo({ url: '/patient/pages/qolAdd/index', }) }, + handleBack() { + wx.navigateBack() + }, }) export {} diff --git a/src/patient/pages/qol/index.wxml b/src/patient/pages/qol/index.wxml index ab2f433..e041503 100644 --- a/src/patient/pages/qol/index.wxml +++ b/src/patient/pages/qol/index.wxml @@ -1,4 +1,6 @@ - + + + - + diff --git a/src/patient/pages/qolAdd/index.scss b/src/patient/pages/qolAdd/index.scss index ac5e8b9..58fcd37 100644 --- a/src/patient/pages/qolAdd/index.scss +++ b/src/patient/pages/qolAdd/index.scss @@ -1,5 +1,5 @@ page { - background-color: #f6f8f9; + background-color: #ffffff; } .page { @@ -65,7 +65,8 @@ page { gap: 24rpx; .s-item1, .s-item2, - .s-item3 { + .s-item3, + .s-item4 { padding: 18rpx; font-size: 32rpx; color: #69686e; @@ -74,17 +75,33 @@ page { background-color: #f6f8f9; border-radius: 16rpx; } - .s-item1.active { - background-color: #dafdee; - color: #1ec580; + .s-item4 { + order: 1; + &.active { + background-color: #dafdee; + color: #1ec580; + } } - .s-item2.active { - background-color: #fff4e0; - color: #ffa300; + .s-item3 { + order: 2; + &.active { + background-color: #dafdee; + color: #1ec580; + } } - .s-item3.active { - background-color: #ffe7e7; - color: #ef3939; + .s-item2 { + order: 3; + &.active { + background-color: #fff4e0; + color: #ffa300; + } + } + .s-item1 { + order: 4; + &.active { + background-color: #ffe7e7; + color: #ef3939; + } } } } diff --git a/src/patient/pages/qolAdd/index.ts b/src/patient/pages/qolAdd/index.ts index 2b65ada..4333a66 100644 --- a/src/patient/pages/qolAdd/index.ts +++ b/src/patient/pages/qolAdd/index.ts @@ -1,10 +1,202 @@ -const _app = getApp() +const app = getApp() Page({ data: { + id: '', step: 0, + qolList0: [ + { + title: '1. 骑自行车或电动车', + answer: '', + answerList: { + 4: '没学过', + 3: '无影响', + 2: '有点影响', + 1: '严重影响', + }, + }, + { + title: '2. 开车', + answer: '', + answerList: { + 4: '没学过', + 3: '无影响', + 2: '有点影响', + 1: '严重影响', + }, + }, + { + title: '3. 室内走动', + answer: '', + answerList: { + 3: '无影响', + 2: '有点影响', + 1: '严重影响', + }, + }, + { + title: '4. 室外走动', + answer: '', + answerList: { + 3: '无影响', + 2: '有点影响', + 1: '严重影响', + }, + }, + { + title: '5. 看书看报', + answer: '', + answerList: { + 3: '无影响', + 2: '有点影响', + 1: '严重影响', + }, + }, + { + title: '6. 看电视', + answer: '', + answerList: { + 3: '无影响', + 2: '有点影响', + 1: '严重影响', + }, + }, + { + title: '7. 兴趣爱好及平时娱乐', + answer: '', + answerList: { + 3: '无影响', + 2: '有点影响', + 1: '严重影响', + }, + }, + { + title: '8. 过去的1周内,您是否觉得甲状腺相关眼病会阻碍您去做您想做的事', + answer: '', + answerList: { + 3: '无影响', + 2: '有点影响', + 1: '严重影响', + }, + }, + ], + qolList1: [ + { + title: '9. 您是否感觉到甲状腺相关眼病改变您的外表?', + answer: '', + answerList: { + 3: '不,没有', + 2: '是的,有点', + 1: '是的,严重', + }, + }, + { + title: '10. 您是否感觉到甲状腺相关眼病使您受到了别人的注视?', + answer: '', + answerList: { + 3: '不,没有', + 2: '是的,有点', + 1: '是的,严重', + }, + }, + { + title: '11. 您是否感觉到别人因为甲状腺相关眼病对您不友善?', + answer: '', + answerList: { + 3: '不,没有', + 2: '是的,有点', + 1: '是的,严重', + }, + }, + { + title: '12. 您是否感觉到甲状腺相关眼病影响您的自信心?', + answer: '', + answerList: { + 3: '不,没有', + 2: '是的,有点', + 1: '是的,严重', + }, + }, + { + title: '13. 您是否感觉到甲状腺相关眼病影响您结交新朋友?', + answer: '', + answerList: { + 3: '无影响', + 2: '有点影响', + 1: '严重影响', + }, + }, + { + title: '14. 您是否感觉到甲状腺相关眼病使您收到了社会孤立?', + answer: '', + answerList: { + 3: '不,没有', + 2: '是的,有点', + 1: '是的,严重', + }, + }, + { + title: '15. 您是否感觉到甲状腺相关眼病使您拍照的次数减少了?', + answer: '', + answerList: { + 3: '不,没有', + 2: '是的,有点', + 1: '是的,严重', + }, + }, + { + title: '16. 您是否会试图掩饰甲状腺相关眼病给您带来的外貌变化?', + answer: '', + answerList: { + 3: '不,没有', + 2: '是的,有点', + 1: '是的,严重', + }, + }, + ], + }, + onLoad(options) { + this.setData({ + id: options.id, + }) + app.waitLogin({ type: [1] }).then(() => { + if (options.id) { + this.getDetail() + } + }) + }, + getDetail() { + const { qolList0, qolList1 } = this.data + wx.ajax({ + method: 'GET', + url: '?r=xd/qol/view', + data: { + Id: this.data.id, + }, + }).then((res) => { + this.setData({ + detail: res, + }) + qolList0.forEach((item, index) => { + item.answer = res[`Question${index + 1}`] + }) + qolList1.forEach((item, index) => { + item.answer = res[`Question${index + 9}`] + }) + this.setData({ + qolList0, + qolList1, + }) + }) + }, + handleSelect(e) { + const { id } = this.data + if (id) return + const { list, key, index } = e.currentTarget.dataset + this.setData({ + [`${list}[${index}].answer`]: key, + }) }, - onLoad() {}, handleNext() { this.setData({ step: 1, @@ -13,9 +205,37 @@ Page({ scrollTop: 0, }) }, + handleReset() { + wx.redirectTo({ + url: '/patient/pages/qolAdd/index', + }) + }, handleSubmit() { - wx.navigateTo({ - url: '/patient/pages/qolResult/index', + const { qolList0, qolList1 } = this.data + const arr = [...qolList0, ...qolList1] + const form = {} + for (let i = 0; i < arr.length; i++) { + const item = arr[i] + const order = item.title.split('.')[0] + if (!item.answer) { + wx.showToast({ + title: `请填写第${order}题`, + icon: 'none', + }) + return + } + form[`Question${order}`] = item.answer + } + wx.ajax({ + method: 'POST', + url: '?r=xd/qol/create', + data: { + ...form, + }, + }).then((res) => { + wx.navigateTo({ + url: `/patient/pages/qolResult/index?id=${res.Id}`, + }) }) }, handlePrev() { diff --git a/src/patient/pages/qolAdd/index.wxml b/src/patient/pages/qolAdd/index.wxml index 9ac9f06..320df37 100644 --- a/src/patient/pages/qolAdd/index.wxml +++ b/src/patient/pages/qolAdd/index.wxml @@ -18,28 +18,47 @@ 过去一周内,甲状腺相关眼病是否影响您做以下的事情?根据您的实际情况选择。 - - 1.骑自行车或电动车 + + {{item.title}} - 没学过 - 没学过 - 没学过 - 没学过 + + {{answerItem}} + 下一页(1/2) - - 1.骑自行车或电动车 + + {{item.title}} - 没学过 - 没学过 - 没学过 - 没学过 + + {{answerItem}} + - 提交(2/2) + 重新测评 + 提交(2/2) 上一步 diff --git a/src/patient/pages/qolReport/index.scss b/src/patient/pages/qolReport/index.scss index 6d64995..43f3bc3 100644 --- a/src/patient/pages/qolReport/index.scss +++ b/src/patient/pages/qolReport/index.scss @@ -3,6 +3,7 @@ page { } .page { + padding-bottom: 200rpx; .page-header { background-color: #fff; .form { @@ -42,7 +43,6 @@ page { } .list { margin: 28rpx 40rpx 0; - padding-bottom: 32rpx; .list-title { font-size: 36rpx; color: #211d2e; diff --git a/src/patient/pages/qolReport/index.ts b/src/patient/pages/qolReport/index.ts index ded28e7..37c5684 100644 --- a/src/patient/pages/qolReport/index.ts +++ b/src/patient/pages/qolReport/index.ts @@ -1,5 +1,5 @@ import dayjs from 'dayjs' -const _app = getApp() +const app = getApp() let echarts: any = null Page({ @@ -7,27 +7,34 @@ Page({ type: '1', BeginMonth: '', EndMonth: '', + + list: [], + pagination: { + page: 1, + pages: 1, + count: 1, + }, }, chartComponent1: null as any, chartComponent2: null as any, chartComponent3: null as any, async onLoad() { - this.handleChangeType() 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.initChart() - }, + app.waitLogin({ type: [1] }).then(() => { + this.handleChangeType() + this.getList() + }) + }, handleChangeType(e?: WechatMiniprogram.CustomEvent) { let type = '' - let callback = true if (e) { - type = e.currentTarget.dataset.type + type = e.detail.index + 1 } else { type = this.data.type - callback = false } let EndMonth = '' let BeginMonth = '' @@ -49,27 +56,46 @@ Page({ EndMonth, BeginMonth, }) - if (callback) { - this.handleTabCallBack() - } + this.getChatData() }, - initChart(defaultList = []) { - const list: any = [ - { - Date: '2025-09-04', - TotalScore: '5', - }, - { - Date: '2025-09-05', - TotalScore: '5', + getChatData() { + const { type, BeginMonth, EndMonth } = this.data + wx.ajax({ + method: 'GET', + url: '?r=xd/qol/graph', + data: { + DateType: type, + StartDate: BeginMonth, + EndDate: EndMonth, + count: 0, }, - { - Date: '2025-09-06', - TotalScore: '5', - }, - ] + }).then((res) => { + const list0: any[] = [] + const list1: any[] = [] + const list2: any[] = [] + res.list.forEach((item: any) => { + list0.push({ + Date: item.Date, + value: item.TotalScore, + }) + list1.push({ + Date: item.Date, + value: item.VisionScore, + }) + list2.push({ + Date: item.Date, + value: item.AppearanceScore, + }) + }) + + this.initChart(list0, 'chartComponent1') + this.initChart(list1, 'chartComponent2') + this.initChart(list2, 'chartComponent3') + }) + }, + initChart(defaultList = [] as any[], key) { return new Promise((reslove) => { - this.chartComponent1.init((canvas, width, height, dpr) => { + this[key].init((canvas, width, height, dpr) => { const chart = echarts.init(canvas, null, { width, height, @@ -128,7 +154,7 @@ Page({ color: 'rgba(137, 141, 151, 0.23)', }, }, - data: list.map((item) => dayjs(item.Date).format('MM-DD')), + data: defaultList.map((item) => dayjs(item.Date).format('MM-DD')), }, ], yAxis: [ @@ -156,7 +182,7 @@ Page({ series: [ { name: '总分', - data: list.length ? list.map((item) => item.TotalScore) : [25], + data: defaultList.length ? defaultList.map((item) => item.value) : [25], barWidth: '16', label: { show: true, @@ -165,7 +191,7 @@ Page({ }, type: 'line', symbolSize: 4, - showSymbol: list.length >= 1, + showSymbol: defaultList.length >= 1, connectNulls: true, z: 10, itemStyle: { @@ -222,6 +248,67 @@ Page({ }) }) }, + getList(newPage = 1) { + wx.ajax({ + method: 'GET', + url: '?r=xd/qol/list', + data: { + page: newPage, + }, + }).then((res) => { + let list = res.page == 1 ? res.list : [...this.data.list, ...res.list] + this.setData({ + list: list, + pagination: { + page: res.page, + pages: res.pages, + count: res.count, + }, + }) + }) + }, + onReachBottom() { + const { page, pages } = this.data.pagination + if (pages > page) { + this.getList(page + 1) + } + }, + handleDelete(e) { + const { id, index } = e.currentTarget.dataset + const { list } = this.data + wx.showModal({ + title: '确认删除吗?', + success: (res) => { + if (res.confirm) { + wx.ajax({ + method: 'POST', + url: '?r=xd/qol/delete', + data: { + Id: id, + }, + }).then(() => { + this.setData({ + list: list.filter((_item, i) => i !== index), + }) + }) + } + }, + }) + }, + handleDetail(e) { + const { id } = e.currentTarget.dataset + wx.navigateTo({ + url: `/patient/pages/qolAdd/index?id=${id}`, + }) + }, + handleQol() { + wx.navigateTo({ + url: '/patient/pages/qol/index', + }) + }, + handleBack() { + wx.navigateBack() + }, }) export {} diff --git a/src/patient/pages/qolReport/index.wxml b/src/patient/pages/qolReport/index.wxml index 66adae5..9d80c18 100644 --- a/src/patient/pages/qolReport/index.wxml +++ b/src/patient/pages/qolReport/index.wxml @@ -1,4 +1,6 @@ - + + + @@ -66,39 +68,50 @@ 我的历史测评报告 - + - 评估日期:2025-09-02 + 评估日期:{{item.Date}} - 100 + {{item.TotalScore}} - 轻度影响 + 轻度影响 + 中度影响 + 重度影响 TED生活质量评分 视觉功能 - 30分 + {{item.VisionScore}}分 - 视觉功能 - 30分 + 外观 + {{item.AppearanceScore}}分 + - 评测 + 评测 diff --git a/src/patient/pages/qolResult/index.scss b/src/patient/pages/qolResult/index.scss index f48fb73..6440205 100644 --- a/src/patient/pages/qolResult/index.scss +++ b/src/patient/pages/qolResult/index.scss @@ -152,7 +152,8 @@ page { bottom: -12rpx; left: 50%; transform: translate(-50%, 100%); - width: 52rpx; + padding: 0 10rpx; + min-width: 52rpx; height: 32rpx; font-size: 32rpx; color: #b982ff; diff --git a/src/patient/pages/qolResult/index.ts b/src/patient/pages/qolResult/index.ts index 2b3ad32..5f7aec9 100644 --- a/src/patient/pages/qolResult/index.ts +++ b/src/patient/pages/qolResult/index.ts @@ -1,8 +1,31 @@ -const _app = getApp() +const app = getApp() Page({ - data: {}, - onLoad() {}, + data: { + id: '', + detail: {}, + }, + onLoad(options) { + this.setData({ + id: options.id, + }) + app.waitLogin({ type: [1] }).then(() => { + this.getDetail() + }) + }, + getDetail() { + wx.ajax({ + method: 'GET', + url: '?r=xd/qol/view', + data: { + Id: this.data.id, + }, + }).then((res) => { + this.setData({ + detail: res, + }) + }) + }, handleReport() { wx.navigateTo({ url: '/patient/pages/qolReport/index', diff --git a/src/patient/pages/qolResult/index.wxml b/src/patient/pages/qolResult/index.wxml index b084ae4..5fe401c 100644 --- a/src/patient/pages/qolResult/index.wxml +++ b/src/patient/pages/qolResult/index.wxml @@ -1,20 +1,22 @@ - 1 - 重度影响 + {{detail.TotalScore}} + 轻度影响 + 中度影响 + 重度影响 本次TED生活质量评分 - - - + + + @@ -23,8 +25,10 @@ 视觉功能 - 当前分数:1 - 重度影响 + 当前分数:{{detail.VisionScore}} + 轻度影响 + 中度影响 + 重度影响 @@ -48,9 +52,9 @@ - + - 2 + {{detail.VisionScore}} @@ -60,8 +64,10 @@ 外观 - 当前分数:1 - 重度影响 + 当前分数:{{detail.AppearanceScore}} + 轻度影响 + 中度影响 + 重度影响 @@ -85,16 +91,18 @@ - + - 2 + {{detail.AppearanceScore}} 分数越低, 对生活质量影响越严重 - 建议前往眼科中心 及时就诊 + 建议保持定期监测,保持良好生活习惯 + 建议就诊检查,评估是否需要调整治疗 + 建议前往眼科中心 及时就诊