Browse Source

qol功能开发

qol
kola-web 2 days ago
parent
commit
57988c941a
  1. 20
      project.private.config.json
  2. 40
      src/pages/d_interactiveDoctor/index.scss
  3. 18
      src/pages/d_interactiveDoctor/index.wxml
  4. 61
      src/pages/d_patientDetail/index.scss
  5. 612
      src/pages/d_patientDetail/index.ts
  6. 51
      src/pages/d_patientDetail/index.wxml
  7. 18
      src/patient/pages/index/index.ts
  8. 12
      src/patient/pages/index/index.wxml
  9. 17
      src/patient/pages/interactivePatient/index.ts
  10. 4
      src/patient/pages/interactivePatient/index.wxml
  11. 9
      src/patient/pages/qol/index.ts
  12. 6
      src/patient/pages/qol/index.wxml
  13. 39
      src/patient/pages/qolAdd/index.scss
  14. 228
      src/patient/pages/qolAdd/index.ts
  15. 45
      src/patient/pages/qolAdd/index.wxml
  16. 2
      src/patient/pages/qolReport/index.scss
  17. 143
      src/patient/pages/qolReport/index.ts
  18. 33
      src/patient/pages/qolReport/index.wxml
  19. 3
      src/patient/pages/qolResult/index.scss
  20. 29
      src/patient/pages/qolResult/index.ts
  21. 38
      src/patient/pages/qolResult/index.wxml

20
project.private.config.json

@ -23,15 +23,22 @@ @@ -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 @@ @@ -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",

40
src/pages/d_interactiveDoctor/index.scss

@ -343,36 +343,40 @@ page { @@ -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 {

18
src/pages/d_interactiveDoctor/index.wxml

@ -93,19 +93,11 @@ @@ -93,19 +93,11 @@
</block>
</view>
</view>
<view
class="adl"
wx:elif="{{message.msgContentType==='3'}}"
style="padding-top: {{top+25}}px;background: url({{imageUrl}}za-images/doctor/d_interactive-adl-bg.png?t={{Timestamp}}) no-repeat bottom right / 268rpx 222rpx,#D74D75;"
>
<image
class="title"
src="{{imageUrl}}za-images/doctor/d_interactiveTitle1.png?t={{Timestamp}}"
mode="aspectFit"
></image>
<view class="sub-title">ADL+激素双达标</view>
<view class="btn" bind:tap="handleAdl">点击进入ADL</view>
<view class="tip">建议您定期做ADL测评</view>
<view class="adl" wx:elif="{{message.msgContentType==='10'}}">
<view class="title">GO-QOL生活质量评分</view>
<view class="sub-title">可从主观感受变化反馈治疗效果,建议您每月定期测评</view>
<view class="btn">点击开始自评</view>
<image class="photo" src="/images/bg17.png"></image>
</view>
<view
class="audio"

61
src/pages/d_patientDetail/index.scss

@ -388,6 +388,65 @@ page { @@ -388,6 +388,65 @@ page {
border: 2rpx solid #b982ff;
}
}
.chart-list {
padding: 32rpx 40rpx 0;
.chart-title {
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;
}
}
}
.chart-card {
margin-bottom: 24rpx;
padding: 32rpx;
background-color: #fff;
border-radius: 24rpx;
.title {
font-size: 32rpx;
color: #211d2e;
font-weight: bold;
}
.chart {
height: 420rpx;
}
}
}
}
.popup-remark {
@ -416,7 +475,7 @@ page { @@ -416,7 +475,7 @@ page {
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient( 197deg, #FFBCF9 0%, #B982FF 100%);
background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%);
font-size: 36rpx;
color: #fff;
border-radius: 64rpx 64rpx 64rpx 64rpx;

612
src/pages/d_patientDetail/index.ts

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
import dayjs from 'dayjs'
const app = getApp<IAppOption>()
let echarts: any = null
Page({
data: {
@ -161,7 +162,14 @@ Page({ @@ -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({ @@ -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({ @@ -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({ @@ -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({ @@ -492,7 +323,7 @@ Page({
{
type: 'category',
axisTick: {
show: true,
show: false,
inside: true,
length: 1,
alignWithLabel: true,
@ -509,258 +340,63 @@ Page({ @@ -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,iVBORw0KGgoAAAANSUhEUgAAAC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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, 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+zuXM4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EqE52rWGSJFNx9pxbu9Wbge2/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({ @@ -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({ @@ -797,10 +418,10 @@ Page({
data: [
[
{
yAxis: 0,
yAxis: 80,
},
{
yAxis: 5,
yAxis: 100,
},
],
],
@ -809,76 +430,11 @@ Page({ @@ -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+1I9ly4ceuTjbQFfyM2MpDk/meEu8oKjJIUG9khh1YHEtUeupgPAWl3AAENEwzLEmIGd8dToq8OPDbcF/OLCrZFZ7p5Mcxc5wVEUAmQLT8mOLFHvfCwzF7ZEC3CcGdiRSIxeHD7WHvDZhZsjM56ngbMELDlsWVO4c4ExOd8E9i1R969vhzhj2BFPjv76cJvApPCtkMK8YYkVOALLUXh7PNE+8M/Iw553MiN8S1ii6eGVAI+mZ0PfhzHoAWfWBlyMMWyPJ0dfG368PUu8nJ8bWRD8ZPYOUWIlwH+YmQ4Dg8FoAPu22J5Ijb7ywKPtAV8uZZ/LC36qIH11q7UIIZRCp8CW5+Ly7M3bgVkzUlC0ONC74VcvHTj6ybaiBN38RmVhV9YxTBs2nrl08VTRrjy1gvEGZRh+HGu5epOp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C93LieO952ARHVDWXQQVuYbqaWQ2rLtrGVJmhEljR6pyRFqS1fIKS+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, 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+HGu5epOp808ceehMFFEkDYN/f++Df1+sn0UnjtYHjB9+63tQ6ssrAV70WcZOyy8+/ZXltL0o8Hfzk3u4jc94Bh7nSm0uOZWNruvFozBMkzEG+iF3KGm5XJTAZFVIxRXCjnGkNB0pIwXPTWYcu6/MeYLAgh1HozHeE48VE6Y5vyFi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Tnsf/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)
@ -975,17 +531,6 @@ Page({ @@ -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({ @@ -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({

51
src/pages/d_patientDetail/index.wxml

@ -60,6 +60,57 @@ @@ -60,6 +60,57 @@
<view class="btn" bind:tap="handleSend">发消息</view>
<view class="btn" bind:tap="handleRemark">备注</view>
</view>
<view class="chart-list">
<view class="chart-title">GO-QOL生活质量评估报告</view>
<view class="chart-filter">
<picker class="type" mode="selector" range="{{typeRange}}" range-key="value" bind:change="handleTypeChange">
{{typeName}}
<image class="icon" src="{{imageUrl}}za-images/doctor/triangle-down.png?t={{Timestamp}}"></image>
</picker>
<view class="range">
<picker
mode="date"
end="{{EndDate}}"
fields="{{fields[type]}}"
mode="date"
model:value="{{StartDate}}"
bindchange="handleChange"
>
{{StartDate}}
</picker>
~
<picker
mode="date"
start="{{StartDate}}"
fields="{{fields[type]}}"
mode="date"
model:value="{{EndDate}}"
bindchange="handleChange"
>
{{EndDate}}
</picker>
<image class="icon" src="{{imageUrl}}za-images/doctor/triangle-down.png?t={{Timestamp}}"></image>
</view>
</view>
<view class="chart-card">
<view class="title">GO-QOL整体记录曲线</view>
<view class="chart">
<ec-canvas id="chart1" ec="{{ ec }}"></ec-canvas>
</view>
</view>
<view class="chart-card">
<view class="title">GO-QOL视觉功能影响记录曲线</view>
<view class="chart">
<ec-canvas id="chart2" ec="{{ ec }}"></ec-canvas>
</view>
</view>
<view class="chart-card">
<view class="title">GO-QOL外观影响记录曲线</view>
<view class="chart">
<ec-canvas id="chart3" ec="{{ ec }}"></ec-canvas>
</view>
</view>
</view>
</view>
<van-popup

18
src/patient/pages/index/index.ts

@ -14,6 +14,8 @@ Page({ @@ -14,6 +14,8 @@ Page({
regGuide: true,
isLogin: 1,
qolDetail: {},
adlList: [],
adlNum: '',
adlNewRecord: {} as any,
@ -194,7 +196,7 @@ Page({ @@ -194,7 +196,7 @@ Page({
this.getStoryList(item.configId)
}
if (item.code == 'adl') {
this.getAdl()
this.getQol()
}
if (item.code == 'activity2') {
this.getActivity(item.configId, item.showNum, 'liveList')
@ -250,20 +252,16 @@ Page({ @@ -250,20 +252,16 @@ Page({
})
})
},
getAdl() {
getQol() {
wx.ajax({
method: 'GET',
url: '?r=zd/adl/index',
url: '?r=xd/qol/index',
data: {},
}).then((res) => {
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'),
},
})
})

12
src/patient/pages/index/index.wxml

@ -39,9 +39,6 @@ @@ -39,9 +39,6 @@
</view>
<view class="btn">{{unreadCount ? '去看看':'去咨询'}}</view>
</view>
<view class="qol" style="background: url('/images/bg14.png') no-repeat top center/100%" bind:tap="routerTo" data-url="/patient/pages/qol/index">
<view class="date">最近一次评测 xxxx-xx-xx</view>
</view>
<block wx:for="{{configList}}" wx:key="index" wx:for-item="card" wx:for-index="cIndex">
<view
class="banner"
@ -78,6 +75,15 @@ @@ -78,6 +75,15 @@
</swiper-item>
</swiper>
</view>
<view
class="qol"
wx:if="{{card.code == 'adl' && card.showStatus == 1}}"
style="background: url('/images/bg14.png') no-repeat top center/100%"
bind:tap="routerTo"
data-url="/patient/pages/qol/index"
>
<view class="date" wx:if="{{qolDetail.CreateTime}}">最近一次评测 {{qolDetail.CreateDate}}</view>
</view>
<view class="live-up-new" wx:if="{{card.code == 'activity2' && card.showStatus == 1 }}">
<view class="header" wx:if="{{card.name}}">
<view class="title">{{card.name}}</view>

17
src/patient/pages/interactivePatient/index.ts

@ -127,18 +127,6 @@ Page({ @@ -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({ @@ -374,6 +362,11 @@ Page({
],
})
},
handleQol() {
wx.navigateTo({
url: '/patient/pages/qol/index',
})
},
handleBack() {
wx.navigateBack({
fail() {

4
src/patient/pages/interactivePatient/index.wxml

@ -66,10 +66,10 @@ @@ -66,10 +66,10 @@
</block>
</view>
</view>
<view class="adl" wx:elif="{{message.msgContentType==='3'}}">
<view class="adl" wx:elif="{{message.msgContentType==='10'}}" bind:tap="handleQol">
<view class="title">GO-QOL生活质量评分</view>
<view class="sub-title">可从主观感受变化反馈治疗效果,建议您每月定期测评</view>
<view class="btn" bind:tap="handleAdl">点击开始自评</view>
<view class="btn">点击开始自评</view>
<image class="photo" src="/images/bg17.png"></image>
</view>
<view

9
src/patient/pages/qol/index.ts

@ -1,13 +1,18 @@ @@ -1,13 +1,18 @@
const _app = getApp<IAppOption>()
const app = getApp<IAppOption>()
Page({
data: {},
onLoad() {},
onLoad() {
app.waitLogin({ type: [0, 1] }).then(() => {})
},
handleAdd() {
wx.navigateTo({
url: '/patient/pages/qolAdd/index',
})
},
handleBack() {
wx.navigateBack()
},
})
export {}

6
src/patient/pages/qol/index.wxml

@ -1,4 +1,6 @@ @@ -1,4 +1,6 @@
<navbar custom-style="background:{{background}}" fixed></navbar>
<navbar custom-style="background:{{background}}" fixed>
<van-icon name="arrow-left" slot="left" size="18px" color="#000" bind:tap="handleBack" />
</navbar>
<view
class="page"
style="background: url('/images/bg15.png') no-repeat top center/100% 518rpx;padding-top:{{pageTop}}px;"
@ -16,7 +18,7 @@ @@ -16,7 +18,7 @@
<view class="progress">
<view class="row">
<view class="aside">
<view class="line-top" style="opacity: 0;"></view>
<view class="line-top" style="opacity: 0"></view>
<view class="side"></view>
<view class="line"></view>
</view>

39
src/patient/pages/qolAdd/index.scss

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
page {
background-color: #f6f8f9;
background-color: #ffffff;
}
.page {
@ -65,7 +65,8 @@ 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 { @@ -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;
}
}
}
}

228
src/patient/pages/qolAdd/index.ts

@ -1,10 +1,202 @@ @@ -1,10 +1,202 @@
const _app = getApp<IAppOption>()
const app = getApp<IAppOption>()
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({ @@ -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() {

45
src/patient/pages/qolAdd/index.wxml

@ -18,28 +18,47 @@ @@ -18,28 +18,47 @@
<view class="content">过去一周内,甲状腺相关眼病是否影响您做以下的事情?根据您的实际情况选择。</view>
</view>
<view class="module" wx:if="{{step==0}}">
<view class="row" wx:for="{{8}}" wx:key="index">
<view class="title">1.骑自行车或电动车</view>
<view class="row" wx:for="{{qolList0}}" wx:key="index">
<view class="title">{{item.title}}</view>
<view class="select">
<view class="s-item1 active">没学过</view>
<view class="s-item1 active">没学过</view>
<view class="s-item2 active">没学过</view>
<view class="s-item3 active">没学过</view>
<view
class="s-item{{answerKey}} {{item.answer == answerKey && 'active'}}"
wx:for="{{item.answerList}}"
wx:key="index"
wx:for-item="answerItem"
wx:for-index="answerKey"
bind:tap="handleSelect"
data-list="qolList0"
data-index="{{index}}"
data-key="{{answerKey}}"
>
{{answerItem}}
</view>
</view>
</view>
<view class="btn" bind:tap="handleNext">下一页(1/2)</view>
</view>
<view class="module" wx:if="{{step==1}}">
<view class="row" wx:for="{{8}}" wx:key="index">
<view class="title">1.骑自行车或电动车</view>
<view class="row" wx:for="{{qolList1}}" wx:key="index">
<view class="title">{{item.title}}</view>
<view class="select">
<view class="s-item1 active">没学过</view>
<view class="s-item1 active">没学过</view>
<view class="s-item2 active">没学过</view>
<view class="s-item3 active">没学过</view>
<view
class="s-item{{answerKey}} {{item.answer == answerKey && 'active'}}"
wx:for="{{item.answerList}}"
wx:key="index"
wx:for-item="answerItem"
wx:for-index="answerKey"
bind:tap="handleSelect"
data-list="qolList1"
data-index="{{index}}"
data-key="{{answerKey}}"
>
{{answerItem}}
</view>
</view>
</view>
<view class="btn" bind:tap="handleSubmit">提交(2/2)</view>
<view class="btn" wx:if="{{id}}" bind:tap="handleReset">重新测评</view>
<view class="btn" wx:else bind:tap="handleSubmit">提交(2/2)</view>
<view class="prev" bind:tap="handlePrev">上一步</view>
</view>
</view>

2
src/patient/pages/qolReport/index.scss

@ -3,6 +3,7 @@ page { @@ -3,6 +3,7 @@ page {
}
.page {
padding-bottom: 200rpx;
.page-header {
background-color: #fff;
.form {
@ -42,7 +43,6 @@ page { @@ -42,7 +43,6 @@ page {
}
.list {
margin: 28rpx 40rpx 0;
padding-bottom: 32rpx;
.list-title {
font-size: 36rpx;
color: #211d2e;

143
src/patient/pages/qolReport/index.ts

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
import dayjs from 'dayjs'
const _app = getApp<IAppOption>()
const app = getApp<IAppOption>()
let echarts: any = null
Page({
@ -7,27 +7,34 @@ 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({ @@ -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({ @@ -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({ @@ -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({ @@ -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({ @@ -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 {}

33
src/patient/pages/qolReport/index.wxml

@ -1,4 +1,6 @@ @@ -1,4 +1,6 @@
<navbar custom-style="background:{{background}}" fixed></navbar>
<navbar custom-style="background:{{background}}" fixed>
<van-icon name="arrow-left" slot="left" size="18px" color="#000" bind:tap="handleBack" />
</navbar>
<view class="page">
<view class="page-header">
<van-tabs
@ -8,7 +10,7 @@ @@ -8,7 +10,7 @@
line-height="8rpx"
title-active-color="#211D2E"
title-inactive-color="#69686E"
bind:change="onChange"
bind:change="handleChangeType"
>
<van-tab title="日"></van-tab>
<van-tab title="月度"></van-tab>
@ -66,39 +68,50 @@ @@ -66,39 +68,50 @@
<view class="list">
<view class="list-title">我的历史测评报告</view>
<view class="list-container">
<view class="row" wx:for="{{2}}" wx:key="index">
<view
class="row"
wx:for="{{list}}"
wx:key="index"
bind:tap="handleDetail"
data-id="{{item.Id}}"
data-index="{{index}}"
bind:longpress="handleDelete"
>
<view class="aside">
<view class="line-top" style="opacity: 0"></view>
<view class="side"></view>
<view class="line"></view>
</view>
<view class="r-container">
<view class="date">评估日期:2025-09-02</view>
<view class="date">评估日期:{{item.Date}}</view>
<view class="r-card">
<view class="wrap">
<view class="num">100</view>
<view class="num">{{item.TotalScore}}</view>
<view class="inner">
<view class="label">轻度影响</view>
<view class="label" wx:if="{{item.TotalScore >= 80}}">轻度影响</view>
<view class="label" wx:elif="{{item.TotalScore >= 40}}">中度影响</view>
<view class="label" wx:else>重度影响</view>
<view class="name">TED生活质量评分</view>
</view>
</view>
<view class="stat">
<view class="s-item">
视觉功能
<view class="score">30分</view>
<view class="score">{{item.VisionScore}}分</view>
</view>
<view class="s-item">
视觉功能
<view class="score">30分</view>
外观
<view class="score">{{item.AppearanceScore}}分</view>
</view>
</view>
</view>
</view>
</view>
<pagination pagination="{{pagination}}"></pagination>
</view>
</view>
<view class="page-footer">
<view class="btn">评测</view>
<view class="btn" bind:tap="handleQol">评测</view>
</view>
</view>

3
src/patient/pages/qolResult/index.scss

@ -152,7 +152,8 @@ page { @@ -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;

29
src/patient/pages/qolResult/index.ts

@ -1,8 +1,31 @@ @@ -1,8 +1,31 @@
const _app = getApp<IAppOption>()
const app = getApp<IAppOption>()
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',

38
src/patient/pages/qolResult/index.wxml

@ -1,20 +1,22 @@ @@ -1,20 +1,22 @@
<navbar custom-style="background:{{background}}" fixed></navbar>
<view
class="page status3"
class="page {{detail.TotalScore>0 && 'status1'}} {{detail.TotalScore>=40 && 'status2'}} {{detail.TotalScore>=80 && 'status3'}}"
style="background: url('/images/bg15.png') no-repeat top center/100% 518rpx;padding-top:{{pageTop+20}}px;"
>
<view class="container">
<view class="info">
<view class="wrap">
<view class="w-header">
<view class="num">1</view>
<view class="label">重度影响</view>
<view class="num">{{detail.TotalScore}}</view>
<view class="label" wx:if="{{detail.TotalScore >= 80}}">轻度影响</view>
<view class="label" wx:elif="{{detail.TotalScore >= 40}}">中度影响</view>
<view class="label" wx:else>重度影响</view>
</view>
<view class="tip">本次TED生活质量评分</view>
</view>
<image class="status" src="/images/icon70.png"></image>
<!-- <image class="status" src="/images/icon71.png"></image> -->
<!-- <image class="status" src="/images/icon72.png"></image> -->
<image class="status" wx:if="{{detail.TotalScore >= 80}}" src="/images/icon72.png"></image>
<image class="status" wx:elif="{{detail.TotalScore >= 40}}" src="/images/icon71.png"></image>
<image class="status" wx:else src="/images/icon70.png"></image>
</view>
<view class="c-line"></view>
<view class="card">
@ -23,8 +25,10 @@ @@ -23,8 +25,10 @@
视觉功能
</view>
<view class="c-content">
当前分数:1
<view class="label">重度影响</view>
当前分数:{{detail.VisionScore}}
<view class="label" wx:if="{{detail.VisionScore >= 80}}">轻度影响</view>
<view class="label" wx:elif="{{detail.VisionScore >= 40}}">中度影响</view>
<view class="label" wx:else>重度影响</view>
</view>
<view class="progress">
<view class="p-item">
@ -48,9 +52,9 @@ @@ -48,9 +52,9 @@
</view>
<view class="line3"></view>
</view>
<view class="slide">
<view class="slide" style="left:{{detail.VisionScore - 5}}%">
<view class="circle"></view>
<view class="num">2</view>
<view class="num">{{detail.VisionScore}}</view>
</view>
</view>
</view>
@ -60,8 +64,10 @@ @@ -60,8 +64,10 @@
外观
</view>
<view class="c-content">
当前分数:1
<view class="label">重度影响</view>
当前分数:{{detail.AppearanceScore}}
<view class="label" wx:if="{{detail.AppearanceScore >= 80}}">轻度影响</view>
<view class="label" wx:elif="{{detail.AppearanceScore >= 40}}">中度影响</view>
<view class="label" wx:else>重度影响</view>
</view>
<view class="progress">
<view class="p-item">
@ -85,16 +91,18 @@ @@ -85,16 +91,18 @@
</view>
<view class="line3"></view>
</view>
<view class="slide">
<view class="slide" style="left:{{detail.AppearanceScore - 5}}%">
<view class="circle"></view>
<view class="num">2</view>
<view class="num">{{detail.AppearanceScore}}</view>
</view>
</view>
</view>
<view class="effect">分数越低, 对生活质量影响越严重</view>
</view>
<view class="page-effect-wrap">
<view class="page-effect">建议前往眼科中心 及时就诊</view>
<view class="page-effect" wx:if="{{detail.TotalScore >= 80}}">建议保持定期监测,保持良好生活习惯</view>
<view class="page-effect" wx:elif="{{detail.TotalScore >= 40}}">建议就诊检查,评估是否需要调整治疗</view>
<view class="page-effect" wx:else>建议前往眼科中心 及时就诊</view>
</view>
<view class="report" bind:tap="handleReport">

Loading…
Cancel
Save