|
|
@ -1,8 +1,8 @@ |
|
|
|
import dayjs from 'dayjs'; |
|
|
|
import dayjs from 'dayjs' |
|
|
|
const app = getApp<IAppOption>(); |
|
|
|
const app = getApp<IAppOption>() |
|
|
|
const licia = require('miniprogram-licia'); |
|
|
|
const licia = require('miniprogram-licia') |
|
|
|
|
|
|
|
|
|
|
|
let echarts: any = null; |
|
|
|
let echarts: any = null |
|
|
|
|
|
|
|
|
|
|
|
Page({ |
|
|
|
Page({ |
|
|
|
data: { |
|
|
|
data: { |
|
|
@ -109,39 +109,38 @@ Page({ |
|
|
|
app.zdGetTheme().then((res) => { |
|
|
|
app.zdGetTheme().then((res) => { |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
theme: res, |
|
|
|
theme: res, |
|
|
|
}); |
|
|
|
}) |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
async onShow() { |
|
|
|
async onShow() { |
|
|
|
echarts = await require.async('../../compontnts/echart/echarts.js'); |
|
|
|
echarts = await require.async('../../compontnts/echart/echarts.js') |
|
|
|
this.ecDataTrendComponent = this.selectComponent('#mychart-dom-bar'); |
|
|
|
this.ecDataTrendComponent = this.selectComponent('#mychart-dom-bar') |
|
|
|
this.ecDataHormoneComponent = this.selectComponent('#mychart-hormone'); |
|
|
|
this.ecDataHormoneComponent = this.selectComponent('#mychart-hormone') |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
calendarDate: dayjs().format('YYYY-MM'), |
|
|
|
calendarDate: dayjs().format('YYYY-MM'), |
|
|
|
}); |
|
|
|
}) |
|
|
|
this.handleChangeType(); |
|
|
|
this.handleChangeType() |
|
|
|
app.waitLogin().then(() => { |
|
|
|
app.waitLogin().then(() => { |
|
|
|
// 强制疾病患者以上身份
|
|
|
|
// 强制疾病患者以上身份
|
|
|
|
app.zdPermissionVerification(3, 0, `/gift/pages/myHealthRecord/index`).then(() => { |
|
|
|
app.zdPermissionVerification(3, 0, `/gift/pages/myHealthRecord/index`).then(() => { |
|
|
|
app.zdMpBehavior({ PageName: 'PG_PATIENTHEALTHRECORD' }); |
|
|
|
|
|
|
|
app.getZdUserInfo(this, true, (res) => { |
|
|
|
app.getZdUserInfo(this, true, (res) => { |
|
|
|
if (res.UserType != 4) { |
|
|
|
if (res.UserType != 4) { |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
tab: 2, |
|
|
|
tab: 2, |
|
|
|
}); |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
this.getCale(); |
|
|
|
this.getCale() |
|
|
|
this.handleTabCallBack(); |
|
|
|
this.handleTabCallBack() |
|
|
|
this.getMedicationAlertAdl(); |
|
|
|
this.getMedicationAlertAdl() |
|
|
|
}); |
|
|
|
}) |
|
|
|
}); |
|
|
|
}) |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleChangeInput() { |
|
|
|
handleChangeInput() { |
|
|
|
if (Number(this.data.Num) > 100) { |
|
|
|
if (Number(this.data.Num) > 100) { |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
Num: 100, |
|
|
|
Num: 100, |
|
|
|
}); |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
getCale() { |
|
|
|
getCale() { |
|
|
@ -152,44 +151,44 @@ Page({ |
|
|
|
Month: this.data.calendarDate, |
|
|
|
Month: this.data.calendarDate, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}).then((res) => { |
|
|
|
}).then((res) => { |
|
|
|
this.setCalendarTodos(res); |
|
|
|
this.setCalendarTodos(res) |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
setCalendarTodos({ adl = [], medication = [] }: { adl: any[]; medication: string[] }) { |
|
|
|
setCalendarTodos({ adl = [], medication = [] }: { adl: any[]; medication: string[] }) { |
|
|
|
const theme = this.data.theme; |
|
|
|
const theme = this.data.theme |
|
|
|
const calendar = this.selectComponent('#calendar').calendar; |
|
|
|
const calendar = this.selectComponent('#calendar').calendar |
|
|
|
const adlDate = adl.map((item) => item.Date); |
|
|
|
const adlDate = adl.map((item) => item.Date) |
|
|
|
const dates: any[] = []; |
|
|
|
const dates: any[] = [] |
|
|
|
const intersectDate = licia.intersect(adlDate, medication); |
|
|
|
const intersectDate = licia.intersect(adlDate, medication) |
|
|
|
const filterAdlDate = adl.filter((item) => !intersectDate.includes(item.Date)); |
|
|
|
const filterAdlDate = adl.filter((item) => !intersectDate.includes(item.Date)) |
|
|
|
const filterMedication = medication.filter((item) => !intersectDate.includes(item)); |
|
|
|
const filterMedication = medication.filter((item) => !intersectDate.includes(item)) |
|
|
|
const intersectAdlDate = adl.filter((item) => intersectDate.includes(item.Date)); |
|
|
|
const intersectAdlDate = adl.filter((item) => intersectDate.includes(item.Date)) |
|
|
|
const doc = theme === 'DRUG' ? 'doc' : ' '; |
|
|
|
const doc = theme === 'DRUG' ? 'doc' : ' ' |
|
|
|
filterMedication.forEach((Date: string) => { |
|
|
|
filterMedication.forEach((Date: string) => { |
|
|
|
dates.push({ |
|
|
|
dates.push({ |
|
|
|
year: Date.split('-')[0], |
|
|
|
year: Date.split('-')[0], |
|
|
|
month: Date.split('-')[1], |
|
|
|
month: Date.split('-')[1], |
|
|
|
date: Date.split('-')[2], |
|
|
|
date: Date.split('-')[2], |
|
|
|
class: doc, |
|
|
|
class: doc, |
|
|
|
}); |
|
|
|
}) |
|
|
|
}); |
|
|
|
}) |
|
|
|
intersectAdlDate.forEach(({ Date, TotalScore, LastTotalScore }) => { |
|
|
|
intersectAdlDate.forEach(({ Date, TotalScore, LastTotalScore }) => { |
|
|
|
dates.push({ |
|
|
|
dates.push({ |
|
|
|
year: Date.split('-')[0], |
|
|
|
year: Date.split('-')[0], |
|
|
|
month: Date.split('-')[1], |
|
|
|
month: Date.split('-')[1], |
|
|
|
date: Date.split('-')[2], |
|
|
|
date: Date.split('-')[2], |
|
|
|
class: TotalScore > 5 || TotalScore - LastTotalScore >= 2 ? `error ${doc}` : `primary ${doc}`, |
|
|
|
class: TotalScore > 5 || TotalScore - LastTotalScore >= 2 ? `error ${doc}` : `primary ${doc}`, |
|
|
|
}); |
|
|
|
}) |
|
|
|
}); |
|
|
|
}) |
|
|
|
filterAdlDate.forEach(({ Date, TotalScore, LastTotalScore }) => { |
|
|
|
filterAdlDate.forEach(({ Date, TotalScore, LastTotalScore }) => { |
|
|
|
dates.push({ |
|
|
|
dates.push({ |
|
|
|
year: Date.split('-')[0], |
|
|
|
year: Date.split('-')[0], |
|
|
|
month: Date.split('-')[1], |
|
|
|
month: Date.split('-')[1], |
|
|
|
date: Date.split('-')[2], |
|
|
|
date: Date.split('-')[2], |
|
|
|
class: TotalScore > 5 || TotalScore - LastTotalScore >= 2 ? 'error' : 'primary', |
|
|
|
class: TotalScore > 5 || TotalScore - LastTotalScore >= 2 ? 'error' : 'primary', |
|
|
|
}); |
|
|
|
}) |
|
|
|
}); |
|
|
|
}) |
|
|
|
calendar.setDateStyle(dates); |
|
|
|
calendar.setDateStyle(dates) |
|
|
|
}, |
|
|
|
}, |
|
|
|
getMedicationAlertAdl() { |
|
|
|
getMedicationAlertAdl() { |
|
|
|
wx.ajax({ |
|
|
|
wx.ajax({ |
|
|
@ -199,47 +198,37 @@ Page({ |
|
|
|
}).then((res) => { |
|
|
|
}).then((res) => { |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
alertAdl: res, |
|
|
|
alertAdl: res, |
|
|
|
}); |
|
|
|
}) |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleWhenChangeMonth(e: { detail: { next: any } }) { |
|
|
|
handleWhenChangeMonth(e: { detail: { next: any } }) { |
|
|
|
const current = e.detail.next; |
|
|
|
const current = e.detail.next |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
calendarDate: dayjs(`${current.year}-${current.month}`).format('YYYY-MM'), |
|
|
|
calendarDate: dayjs(`${current.year}-${current.month}`).format('YYYY-MM'), |
|
|
|
}); |
|
|
|
}) |
|
|
|
this.getCale(); |
|
|
|
this.getCale() |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleChangeType(e?: WechatMiniprogram.CustomEvent) { |
|
|
|
handleChangeType(e?: WechatMiniprogram.CustomEvent) { |
|
|
|
let type = ''; |
|
|
|
let type = '' |
|
|
|
let callback = true; |
|
|
|
let callback = true |
|
|
|
if (e) { |
|
|
|
if (e) { |
|
|
|
type = e.currentTarget.dataset.type; |
|
|
|
type = e.currentTarget.dataset.type |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
type = this.data.Type; |
|
|
|
type = this.data.Type |
|
|
|
callback = false; |
|
|
|
callback = false |
|
|
|
} |
|
|
|
} |
|
|
|
let EndMonth = ''; |
|
|
|
let EndMonth = '' |
|
|
|
let BeginMonth = ''; |
|
|
|
let BeginMonth = '' |
|
|
|
if (type == '1') { |
|
|
|
if (type == '1') { |
|
|
|
if (e) { |
|
|
|
EndMonth = dayjs().format('YYYY-MM-DD') |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDDAILYCURVE' }); |
|
|
|
BeginMonth = dayjs().subtract(6, 'd').format('YYYY-MM-DD') |
|
|
|
} |
|
|
|
|
|
|
|
EndMonth = dayjs().format('YYYY-MM-DD'); |
|
|
|
|
|
|
|
BeginMonth = dayjs().subtract(6, 'd').format('YYYY-MM-DD'); |
|
|
|
|
|
|
|
} else if (type == '2') { |
|
|
|
} else if (type == '2') { |
|
|
|
if (e) { |
|
|
|
EndMonth = dayjs().format('YYYY-MM') |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDMONTHLYCURVE' }); |
|
|
|
BeginMonth = dayjs().subtract(1, 'M').format('YYYY-MM') |
|
|
|
} |
|
|
|
|
|
|
|
EndMonth = dayjs().format('YYYY-MM'); |
|
|
|
|
|
|
|
BeginMonth = dayjs().subtract(1, 'M').format('YYYY-MM'); |
|
|
|
|
|
|
|
} else if (type == '3') { |
|
|
|
} else if (type == '3') { |
|
|
|
if (e) { |
|
|
|
EndMonth = dayjs().format('YYYY') |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDYEARLYCURVE' }); |
|
|
|
BeginMonth = dayjs().subtract(1, 'y').format('YYYY') |
|
|
|
} |
|
|
|
|
|
|
|
EndMonth = dayjs().format('YYYY'); |
|
|
|
|
|
|
|
BeginMonth = dayjs().subtract(1, 'y').format('YYYY'); |
|
|
|
|
|
|
|
} else if (type == '4' && e) { |
|
|
|
} else if (type == '4' && e) { |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDTIMECURVE' }); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
page: 0, |
|
|
|
page: 0, |
|
|
@ -247,52 +236,49 @@ Page({ |
|
|
|
Num: '5', |
|
|
|
Num: '5', |
|
|
|
EndMonth, |
|
|
|
EndMonth, |
|
|
|
BeginMonth, |
|
|
|
BeginMonth, |
|
|
|
}); |
|
|
|
}) |
|
|
|
if (callback) { |
|
|
|
if (callback) { |
|
|
|
this.handleTabCallBack(); |
|
|
|
this.handleTabCallBack() |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleChange() { |
|
|
|
handleChange() { |
|
|
|
this.handleTabCallBack(); |
|
|
|
this.handleTabCallBack() |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleTab(e) { |
|
|
|
handleTab(e) { |
|
|
|
const { index } = e.currentTarget.dataset; |
|
|
|
const { index } = e.currentTarget.dataset |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
tab: index, |
|
|
|
tab: index, |
|
|
|
}); |
|
|
|
}) |
|
|
|
if (index == 1) { |
|
|
|
if (index == 1) { |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDCOMPREHENSIVEREPORT' }); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (index == 2) { |
|
|
|
if (index == 2) { |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDDUALCOMPLIANCENOTES' }); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (index == 3) { |
|
|
|
if (index == 3) { |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDMEDICATIONRECORD' }); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
this.handleTabCallBack(); |
|
|
|
this.handleTabCallBack() |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleTabCallBack() { |
|
|
|
handleTabCallBack() { |
|
|
|
const tab = this.data.tab; |
|
|
|
const tab = this.data.tab |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
pagination: { |
|
|
|
pagination: { |
|
|
|
page: 1, |
|
|
|
page: 1, |
|
|
|
pages: 1, |
|
|
|
pages: 1, |
|
|
|
count: 1, |
|
|
|
count: 1, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}) |
|
|
|
if (tab == 1) { |
|
|
|
if (tab == 1) { |
|
|
|
this.getAllList(); |
|
|
|
this.getAllList() |
|
|
|
} |
|
|
|
} |
|
|
|
if (tab == 2) { |
|
|
|
if (tab == 2) { |
|
|
|
this.getList(); |
|
|
|
this.getList() |
|
|
|
} |
|
|
|
} |
|
|
|
if (tab == 3) { |
|
|
|
if (tab == 3) { |
|
|
|
this.getMedicationList(); |
|
|
|
this.getMedicationList() |
|
|
|
} |
|
|
|
} |
|
|
|
this.getChart(); |
|
|
|
this.getChart() |
|
|
|
}, |
|
|
|
}, |
|
|
|
getAllList(newPage = 1) { |
|
|
|
getAllList(newPage = 1) { |
|
|
|
const { BeginMonth, EndMonth, Type, Num } = this.data; |
|
|
|
const { BeginMonth, EndMonth, Type, Num } = this.data |
|
|
|
wx.ajax({ |
|
|
|
wx.ajax({ |
|
|
|
method: 'GET', |
|
|
|
method: 'GET', |
|
|
|
url: '?r=zd/adl/composite-list', |
|
|
|
url: '?r=zd/adl/composite-list', |
|
|
@ -305,22 +291,22 @@ Page({ |
|
|
|
page: newPage, |
|
|
|
page: newPage, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}).then((res) => { |
|
|
|
}).then((res) => { |
|
|
|
const list = res.list; |
|
|
|
const list = res.list |
|
|
|
list.map((item) => { |
|
|
|
list.map((item) => { |
|
|
|
let grade = 1; |
|
|
|
let grade = 1 |
|
|
|
if (item.TotalScore < 5) { |
|
|
|
if (item.TotalScore < 5) { |
|
|
|
grade = 1; |
|
|
|
grade = 1 |
|
|
|
} else if (item.TotalScore >= 5 && item.TotalScore < 15) { |
|
|
|
} else if (item.TotalScore >= 5 && item.TotalScore < 15) { |
|
|
|
grade = 2; |
|
|
|
grade = 2 |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
grade = 3; |
|
|
|
grade = 3 |
|
|
|
} |
|
|
|
} |
|
|
|
item.grade = grade; |
|
|
|
item.grade = grade |
|
|
|
item.fold = true; |
|
|
|
item.fold = true |
|
|
|
return item; |
|
|
|
return item |
|
|
|
}); |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const newList = res.page === 1 ? res.list : [...this.data.list, ...res.list]; |
|
|
|
const newList = res.page === 1 ? res.list : [...this.data.list, ...res.list] |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
list: newList, |
|
|
|
list: newList, |
|
|
|
pagination: { |
|
|
|
pagination: { |
|
|
@ -328,26 +314,26 @@ Page({ |
|
|
|
pages: res.pages, |
|
|
|
pages: res.pages, |
|
|
|
count: res.count, |
|
|
|
count: res.count, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}) |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
onReachBottom() { |
|
|
|
onReachBottom() { |
|
|
|
const { page, pages } = this.data.pagination; |
|
|
|
const { page, pages } = this.data.pagination |
|
|
|
const tab = this.data.tab; |
|
|
|
const tab = this.data.tab |
|
|
|
if (pages > page) { |
|
|
|
if (pages > page) { |
|
|
|
if (tab == 1) { |
|
|
|
if (tab == 1) { |
|
|
|
this.getAllList(page + 1); |
|
|
|
this.getAllList(page + 1) |
|
|
|
} |
|
|
|
} |
|
|
|
if (tab == 2) { |
|
|
|
if (tab == 2) { |
|
|
|
this.getList(page + 1); |
|
|
|
this.getList(page + 1) |
|
|
|
} |
|
|
|
} |
|
|
|
if (tab == 3) { |
|
|
|
if (tab == 3) { |
|
|
|
this.getMedicationList(page + 1); |
|
|
|
this.getMedicationList(page + 1) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
getList(newPage = 1) { |
|
|
|
getList(newPage = 1) { |
|
|
|
const { BeginMonth, EndMonth, Type, Num } = this.data; |
|
|
|
const { BeginMonth, EndMonth, Type, Num } = this.data |
|
|
|
wx.ajax({ |
|
|
|
wx.ajax({ |
|
|
|
method: 'GET', |
|
|
|
method: 'GET', |
|
|
|
url: '?r=zd/adl/list', |
|
|
|
url: '?r=zd/adl/list', |
|
|
@ -360,22 +346,22 @@ Page({ |
|
|
|
page: newPage, |
|
|
|
page: newPage, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}).then((res) => { |
|
|
|
}).then((res) => { |
|
|
|
const list = res.list; |
|
|
|
const list = res.list |
|
|
|
list.map((item) => { |
|
|
|
list.map((item) => { |
|
|
|
let grade = 1; |
|
|
|
let grade = 1 |
|
|
|
if (item.TotalScore < 5) { |
|
|
|
if (item.TotalScore < 5) { |
|
|
|
grade = 1; |
|
|
|
grade = 1 |
|
|
|
} else if (item.TotalScore >= 5 && item.TotalScore < 15) { |
|
|
|
} else if (item.TotalScore >= 5 && item.TotalScore < 15) { |
|
|
|
grade = 2; |
|
|
|
grade = 2 |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
grade = 3; |
|
|
|
grade = 3 |
|
|
|
} |
|
|
|
} |
|
|
|
item.grade = grade; |
|
|
|
item.grade = grade |
|
|
|
item.fold = true; |
|
|
|
item.fold = true |
|
|
|
item.Type = 1; |
|
|
|
item.Type = 1 |
|
|
|
return item; |
|
|
|
return item |
|
|
|
}); |
|
|
|
}) |
|
|
|
const newList = res.page === 1 ? res.list : [...this.data.list, ...res.list]; |
|
|
|
const newList = res.page === 1 ? res.list : [...this.data.list, ...res.list] |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
list: newList, |
|
|
|
list: newList, |
|
|
|
pagination: { |
|
|
|
pagination: { |
|
|
@ -383,11 +369,11 @@ Page({ |
|
|
|
pages: res.pages, |
|
|
|
pages: res.pages, |
|
|
|
count: res.count, |
|
|
|
count: res.count, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}) |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
getMedicationList(newPage = 1) { |
|
|
|
getMedicationList(newPage = 1) { |
|
|
|
const { BeginMonth, EndMonth, Type, Num } = this.data; |
|
|
|
const { BeginMonth, EndMonth, Type, Num } = this.data |
|
|
|
wx.ajax({ |
|
|
|
wx.ajax({ |
|
|
|
method: 'GET', |
|
|
|
method: 'GET', |
|
|
|
url: '?r=zd/medication/list', |
|
|
|
url: '?r=zd/medication/list', |
|
|
@ -400,22 +386,22 @@ Page({ |
|
|
|
page: newPage, |
|
|
|
page: newPage, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}).then((res) => { |
|
|
|
}).then((res) => { |
|
|
|
const list = res.list; |
|
|
|
const list = res.list |
|
|
|
list.map((item) => { |
|
|
|
list.map((item) => { |
|
|
|
let grade = 1; |
|
|
|
let grade = 1 |
|
|
|
if (item.TotalScore < 5) { |
|
|
|
if (item.TotalScore < 5) { |
|
|
|
grade = 1; |
|
|
|
grade = 1 |
|
|
|
} else if (item.TotalScore >= 5 && item.TotalScore < 15) { |
|
|
|
} else if (item.TotalScore >= 5 && item.TotalScore < 15) { |
|
|
|
grade = 2; |
|
|
|
grade = 2 |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
grade = 3; |
|
|
|
grade = 3 |
|
|
|
} |
|
|
|
} |
|
|
|
item.grade = grade; |
|
|
|
item.grade = grade |
|
|
|
item.fold = true; |
|
|
|
item.fold = true |
|
|
|
item.Type = 2; |
|
|
|
item.Type = 2 |
|
|
|
return item; |
|
|
|
return item |
|
|
|
}); |
|
|
|
}) |
|
|
|
const newList = res.page === 1 ? res.list : [...this.data.list, ...res.list]; |
|
|
|
const newList = res.page === 1 ? res.list : [...this.data.list, ...res.list] |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
list: newList, |
|
|
|
list: newList, |
|
|
|
pagination: { |
|
|
|
pagination: { |
|
|
@ -423,11 +409,11 @@ Page({ |
|
|
|
pages: res.pages, |
|
|
|
pages: res.pages, |
|
|
|
count: res.count, |
|
|
|
count: res.count, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}) |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
getChart() { |
|
|
|
getChart() { |
|
|
|
const { BeginMonth, EndMonth, Type, Num } = this.data; |
|
|
|
const { BeginMonth, EndMonth, Type, Num } = this.data |
|
|
|
wx.ajax({ |
|
|
|
wx.ajax({ |
|
|
|
method: 'GET', |
|
|
|
method: 'GET', |
|
|
|
url: '?r=zd/adl/list', |
|
|
|
url: '?r=zd/adl/list', |
|
|
@ -446,12 +432,12 @@ Page({ |
|
|
|
defaultList: res.list, |
|
|
|
defaultList: res.list, |
|
|
|
count: res.list.length, |
|
|
|
count: res.list.length, |
|
|
|
defaultListLast: res.list.at(-1), |
|
|
|
defaultListLast: res.list.at(-1), |
|
|
|
}); |
|
|
|
}) |
|
|
|
const chart1 = await this.initChart(res.list); |
|
|
|
const chart1 = await this.initChart(res.list) |
|
|
|
const chart2 = await this.initHormoneChart(res.list); |
|
|
|
const chart2 = await this.initHormoneChart(res.list) |
|
|
|
echarts.connect([chart1, chart2]); |
|
|
|
echarts.connect([chart1, chart2]) |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
if (Number(Type) != 4) { |
|
|
|
if (Number(Type) != 4) { |
|
|
|
wx.ajax({ |
|
|
|
wx.ajax({ |
|
|
|
method: 'GET', |
|
|
|
method: 'GET', |
|
|
@ -468,65 +454,65 @@ Page({ |
|
|
|
return { |
|
|
|
return { |
|
|
|
Date: item.InjectionDate, |
|
|
|
Date: item.InjectionDate, |
|
|
|
...item, |
|
|
|
...item, |
|
|
|
}; |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
const list = res.list; |
|
|
|
const list = res.list |
|
|
|
const newList: any[] = this.mergeArr(list, medication); |
|
|
|
const newList: any[] = this.mergeArr(list, medication) |
|
|
|
|
|
|
|
|
|
|
|
if (Number(Type) != 4) { |
|
|
|
if (Number(Type) != 4) { |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
defaultList: newList as never[], |
|
|
|
defaultList: newList as never[], |
|
|
|
defaultListLast: newList.at(-1), |
|
|
|
defaultListLast: newList.at(-1), |
|
|
|
count: list.length, |
|
|
|
count: list.length, |
|
|
|
}); |
|
|
|
}) |
|
|
|
const chart1 = await this.initChart(newList as never[]); |
|
|
|
const chart1 = await this.initChart(newList as never[]) |
|
|
|
const chart2 = await this.initHormoneChart(newList as never[]); |
|
|
|
const chart2 = await this.initHormoneChart(newList as never[]) |
|
|
|
echarts.connect([chart1, chart2]); |
|
|
|
echarts.connect([chart1, chart2]) |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
mergeArr(array1: any[] = [], array2: any[] = []) { |
|
|
|
mergeArr(array1: any[] = [], array2: any[] = []) { |
|
|
|
// 合并两个数组中相同Date字段的对象
|
|
|
|
// 合并两个数组中相同Date字段的对象
|
|
|
|
const mergedArray: any[] = []; |
|
|
|
const mergedArray: any[] = [] |
|
|
|
const mergedMap = new Map(); |
|
|
|
const mergedMap = new Map() |
|
|
|
|
|
|
|
|
|
|
|
array1.concat(array2).forEach((obj) => { |
|
|
|
array1.concat(array2).forEach((obj) => { |
|
|
|
const date = obj.Date; |
|
|
|
const date = obj.Date |
|
|
|
if (mergedMap.has(date)) { |
|
|
|
if (mergedMap.has(date)) { |
|
|
|
mergedMap.get(date).push(obj); |
|
|
|
mergedMap.get(date).push(obj) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
mergedMap.set(date, [obj]); |
|
|
|
mergedMap.set(date, [obj]) |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
mergedMap.forEach((objs: any) => { |
|
|
|
mergedMap.forEach((objs: any) => { |
|
|
|
if (objs.length === 1) { |
|
|
|
if (objs.length === 1) { |
|
|
|
mergedArray.push(objs[0]); |
|
|
|
mergedArray.push(objs[0]) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
const mergedObj = objs.reduce((acc, cur) => ({ ...acc, ...cur })); |
|
|
|
const mergedObj = objs.reduce((acc, cur) => ({ ...acc, ...cur })) |
|
|
|
mergedArray.push(mergedObj); |
|
|
|
mergedArray.push(mergedObj) |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// 按照Date字段对合并后的数组进行排序
|
|
|
|
// 按照Date字段对合并后的数组进行排序
|
|
|
|
mergedArray.sort((a, b) => { |
|
|
|
mergedArray.sort((a, b) => { |
|
|
|
return a.Date.localeCompare(b.Date); |
|
|
|
return a.Date.localeCompare(b.Date) |
|
|
|
}); |
|
|
|
}) |
|
|
|
return mergedArray; |
|
|
|
return mergedArray |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
initChart(defaultList = []) { |
|
|
|
initChart(defaultList = []) { |
|
|
|
const { theme } = this.data; |
|
|
|
const { theme } = this.data |
|
|
|
const list: any = defaultList; |
|
|
|
const list: any = defaultList |
|
|
|
return new Promise((reslove) => { |
|
|
|
return new Promise((reslove) => { |
|
|
|
this.ecDataTrendComponent.init((canvas, width, height, dpr) => { |
|
|
|
this.ecDataTrendComponent.init((canvas, width, height, dpr) => { |
|
|
|
const chart = echarts.init(canvas, null, { |
|
|
|
const chart = echarts.init(canvas, null, { |
|
|
|
width, |
|
|
|
width, |
|
|
|
height, |
|
|
|
height, |
|
|
|
devicePixelRatio: dpr, // new
|
|
|
|
devicePixelRatio: dpr, // new
|
|
|
|
}); |
|
|
|
}) |
|
|
|
canvas.setChart(chart); |
|
|
|
canvas.setChart(chart) |
|
|
|
|
|
|
|
|
|
|
|
const option: any = { |
|
|
|
const option: any = { |
|
|
|
tooltip: { |
|
|
|
tooltip: { |
|
|
@ -574,7 +560,7 @@ Page({ |
|
|
|
data: list.map((item) => dayjs(item.Date).format('MM-DD')), |
|
|
|
data: list.map((item) => dayjs(item.Date).format('MM-DD')), |
|
|
|
axisLabel: { |
|
|
|
axisLabel: { |
|
|
|
formatter() { |
|
|
|
formatter() { |
|
|
|
return ''; |
|
|
|
return '' |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
@ -647,7 +633,7 @@ Page({ |
|
|
|
endValue: 4, |
|
|
|
endValue: 4, |
|
|
|
filterMode: 'none', |
|
|
|
filterMode: 'none', |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (theme === 'DRUG') { |
|
|
|
if (theme === 'DRUG') { |
|
|
|
const markLineData = list |
|
|
|
const markLineData = list |
|
|
@ -669,8 +655,8 @@ Page({ |
|
|
|
color: '#25D9C8', |
|
|
|
color: '#25D9C8', |
|
|
|
offset: [60, 0], |
|
|
|
offset: [60, 0], |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
option.series.push({ |
|
|
|
option.series.push({ |
|
|
|
name: '用药', |
|
|
|
name: '用药', |
|
|
|
data: list.map((item) => (item.InjectionBottles ? 0 : null)), |
|
|
|
data: list.map((item) => (item.InjectionBottles ? 0 : null)), |
|
|
@ -693,7 +679,7 @@ Page({ |
|
|
|
symbol: ['none', 'none'], |
|
|
|
symbol: ['none', 'none'], |
|
|
|
data: markLineData, |
|
|
|
data: markLineData, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}) |
|
|
|
// option.series.push({
|
|
|
|
// option.series.push({
|
|
|
|
// name: "用药时间",
|
|
|
|
// name: "用药时间",
|
|
|
|
// data: list.map((item: any) => (item.InjectionBottles ? item.TotalScore : 0)),
|
|
|
|
// data: list.map((item: any) => (item.InjectionBottles ? item.TotalScore : 0)),
|
|
|
@ -715,23 +701,23 @@ Page({ |
|
|
|
// });
|
|
|
|
// });
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
chart.setOption(option); |
|
|
|
chart.setOption(option) |
|
|
|
reslove(chart); |
|
|
|
reslove(chart) |
|
|
|
return chart; |
|
|
|
return chart |
|
|
|
}); |
|
|
|
}) |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
initHormoneChart(defaultList = []) { |
|
|
|
initHormoneChart(defaultList = []) { |
|
|
|
const { theme } = this.data; |
|
|
|
const { theme } = this.data |
|
|
|
const list: any = defaultList; |
|
|
|
const list: any = defaultList |
|
|
|
return new Promise((reslove) => { |
|
|
|
return new Promise((reslove) => { |
|
|
|
this.ecDataHormoneComponent.init((canvas, width, height, dpr) => { |
|
|
|
this.ecDataHormoneComponent.init((canvas, width, height, dpr) => { |
|
|
|
const chart = echarts.init(canvas, null, { |
|
|
|
const chart = echarts.init(canvas, null, { |
|
|
|
width, |
|
|
|
width, |
|
|
|
height, |
|
|
|
height, |
|
|
|
devicePixelRatio: dpr, // new
|
|
|
|
devicePixelRatio: dpr, // new
|
|
|
|
}); |
|
|
|
}) |
|
|
|
canvas.setChart(chart); |
|
|
|
canvas.setChart(chart) |
|
|
|
|
|
|
|
|
|
|
|
const option: any = { |
|
|
|
const option: any = { |
|
|
|
tooltip: { |
|
|
|
tooltip: { |
|
|
@ -784,12 +770,12 @@ Page({ |
|
|
|
type: 'value', |
|
|
|
type: 'value', |
|
|
|
minInterval: 1, |
|
|
|
minInterval: 1, |
|
|
|
max(value) { |
|
|
|
max(value) { |
|
|
|
return value.max + 20 > 999 ? 999 : value.max + 20; |
|
|
|
return value.max + 20 > 999 ? 999 : value.max + 20 |
|
|
|
}, |
|
|
|
}, |
|
|
|
axisLabel: { |
|
|
|
axisLabel: { |
|
|
|
// width: 20,
|
|
|
|
// width: 20,
|
|
|
|
formatter(value: number) { |
|
|
|
formatter(value: number) { |
|
|
|
return value; |
|
|
|
return value |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
@ -811,7 +797,7 @@ Page({ |
|
|
|
color: '#18474e', |
|
|
|
color: '#18474e', |
|
|
|
z: 11, |
|
|
|
z: 11, |
|
|
|
formatter({ value }) { |
|
|
|
formatter({ value }) { |
|
|
|
return `${value}mg`; |
|
|
|
return `${value}mg` |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
itemStyle: { |
|
|
|
itemStyle: { |
|
|
@ -860,7 +846,7 @@ Page({ |
|
|
|
endValue: 4, |
|
|
|
endValue: 4, |
|
|
|
filterMode: 'none', |
|
|
|
filterMode: 'none', |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
} |
|
|
|
if (theme === 'DRUG') { |
|
|
|
if (theme === 'DRUG') { |
|
|
|
const markLineData = list |
|
|
|
const markLineData = list |
|
|
|
.filter((item) => item.InjectionBottles) |
|
|
|
.filter((item) => item.InjectionBottles) |
|
|
@ -880,9 +866,9 @@ Page({ |
|
|
|
color: '#25D9C8', |
|
|
|
color: '#25D9C8', |
|
|
|
offset: [60, 0], |
|
|
|
offset: [60, 0], |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
const maxValue = Math.max(...list.map((item) => item.SteroidDailyDose)); |
|
|
|
const maxValue = Math.max(...list.map((item) => item.SteroidDailyDose)) |
|
|
|
option.series.push({ |
|
|
|
option.series.push({ |
|
|
|
name: '用药', |
|
|
|
name: '用药', |
|
|
|
data: list.map((item) => (item.InjectionBottles ? 0 : null)), |
|
|
|
data: list.map((item) => (item.InjectionBottles ? 0 : null)), |
|
|
@ -905,7 +891,7 @@ Page({ |
|
|
|
symbol: ['none', 'none'], |
|
|
|
symbol: ['none', 'none'], |
|
|
|
data: markLineData, |
|
|
|
data: markLineData, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}) |
|
|
|
// option.series.push({
|
|
|
|
// option.series.push({
|
|
|
|
// name: "用药时间",
|
|
|
|
// name: "用药时间",
|
|
|
|
// data: list.map((item: any) => (item.InjectionBottles ? item.TotalScore : 0)),
|
|
|
|
// data: list.map((item: any) => (item.InjectionBottles ? item.TotalScore : 0)),
|
|
|
@ -927,68 +913,66 @@ Page({ |
|
|
|
// });
|
|
|
|
// });
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
chart.setOption(option); |
|
|
|
chart.setOption(option) |
|
|
|
reslove(chart); |
|
|
|
reslove(chart) |
|
|
|
return chart; |
|
|
|
return chart |
|
|
|
}); |
|
|
|
}) |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
touchend(e) { |
|
|
|
touchend(e) { |
|
|
|
const { type } = e.currentTarget.dataset; |
|
|
|
const { type } = e.currentTarget.dataset |
|
|
|
const { page, defaultList } = this.data; |
|
|
|
const { page, defaultList } = this.data |
|
|
|
if (type == 'left' && page > 0) { |
|
|
|
if (type == 'left' && page > 0) { |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
page: page - 1, |
|
|
|
page: page - 1, |
|
|
|
}); |
|
|
|
}) |
|
|
|
this.initChart(defaultList); |
|
|
|
this.initChart(defaultList) |
|
|
|
this.initHormoneChart(defaultList); |
|
|
|
this.initHormoneChart(defaultList) |
|
|
|
} else if (type == 'right' && page < defaultList.length / 5 - 1) { |
|
|
|
} else if (type == 'right' && page < defaultList.length / 5 - 1) { |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
page: page + 1, |
|
|
|
page: page + 1, |
|
|
|
}); |
|
|
|
}) |
|
|
|
this.initChart(defaultList); |
|
|
|
this.initChart(defaultList) |
|
|
|
this.initHormoneChart(defaultList); |
|
|
|
this.initHormoneChart(defaultList) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleFoldAll() { |
|
|
|
handleFoldAll() { |
|
|
|
const { list } = this.data; |
|
|
|
const { list } = this.data |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
list: list.map((item) => { |
|
|
|
list: list.map((item) => { |
|
|
|
item.fold = !this.data.foldAll; |
|
|
|
item.fold = !this.data.foldAll |
|
|
|
return item; |
|
|
|
return item |
|
|
|
}), |
|
|
|
}), |
|
|
|
foldAll: !this.data.foldAll, |
|
|
|
foldAll: !this.data.foldAll, |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleFold(e) { |
|
|
|
handleFold(e) { |
|
|
|
const { index } = e.currentTarget.dataset; |
|
|
|
const { index } = e.currentTarget.dataset |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
[`list[${index}].fold`]: !this.data.list[index].fold, |
|
|
|
[`list[${index}].fold`]: !this.data.list[index].fold, |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleDetail(e) { |
|
|
|
handleDetail(e) { |
|
|
|
const { id, isi } = e.currentTarget.dataset; |
|
|
|
const { id, isi } = e.currentTarget.dataset |
|
|
|
const tab = this.data.tab; |
|
|
|
const tab = this.data.tab |
|
|
|
if (isi == 1) { |
|
|
|
if (isi == 1) { |
|
|
|
return; |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
if (tab == 1) { |
|
|
|
if (tab == 1) { |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDREPORTLIST' }); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (tab == 2) { |
|
|
|
if (tab == 2) { |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDNOTESLIST' }); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
wx.navigateTo({ |
|
|
|
wx.navigateTo({ |
|
|
|
url: `/patient/pages/adlResult/index?id=${id}`, |
|
|
|
url: `/patient/pages/adlResult/index?id=${id}`, |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleDel(e) { |
|
|
|
handleDel(e) { |
|
|
|
const { id, index, isi } = e.currentTarget.dataset; |
|
|
|
const { id, index, isi } = e.currentTarget.dataset |
|
|
|
if (isi == 1) { |
|
|
|
if (isi == 1) { |
|
|
|
return; |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
if (index != 0) return; |
|
|
|
if (index != 0) return |
|
|
|
wx.showModal({ |
|
|
|
wx.showModal({ |
|
|
|
title: '确认删除?', |
|
|
|
title: '确认删除?', |
|
|
|
confirmColor: '#8c75d0', |
|
|
|
confirmColor: '#8c75d0', |
|
|
@ -1001,50 +985,48 @@ Page({ |
|
|
|
Id: id, |
|
|
|
Id: id, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}).then(() => { |
|
|
|
}).then(() => { |
|
|
|
this.handleTabCallBack(); |
|
|
|
this.handleTabCallBack() |
|
|
|
}); |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleAdd() { |
|
|
|
handleAdd() { |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDASSESSMENT' }); |
|
|
|
|
|
|
|
wx.navigateTo({ |
|
|
|
wx.navigateTo({ |
|
|
|
url: '/patient/pages/adl/index', |
|
|
|
url: '/patient/pages/adl/index', |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleAddDrug() { |
|
|
|
handleAddDrug() { |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDMEDICATION' }); |
|
|
|
|
|
|
|
wx.navigateTo({ |
|
|
|
wx.navigateTo({ |
|
|
|
url: '/patient/pages/drugRecord/index', |
|
|
|
url: '/patient/pages/drugRecord/index', |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleChartDetail() { |
|
|
|
handleChartDetail() { |
|
|
|
const that = this; |
|
|
|
const that = this |
|
|
|
wx.navigateTo({ |
|
|
|
wx.navigateTo({ |
|
|
|
url: '/gift/pages/myHealthRecordChart/index', |
|
|
|
url: '/gift/pages/myHealthRecordChart/index', |
|
|
|
success(res) { |
|
|
|
success(res) { |
|
|
|
res.eventChannel.emit('acceptDataFromOpenerPage', { |
|
|
|
res.eventChannel.emit('acceptDataFromOpenerPage', { |
|
|
|
list: that.data.defaultList, |
|
|
|
list: that.data.defaultList, |
|
|
|
selectLegends: that.data.selectLegends, |
|
|
|
selectLegends: that.data.selectLegends, |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleDetailDrug(e) { |
|
|
|
handleDetailDrug(e) { |
|
|
|
const { id, isi } = e.currentTarget.dataset; |
|
|
|
const { id, isi } = e.currentTarget.dataset |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDMEDICATIONLIST' }); |
|
|
|
|
|
|
|
if (isi == 1) { |
|
|
|
if (isi == 1) { |
|
|
|
return; |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
wx.navigateTo({ |
|
|
|
wx.navigateTo({ |
|
|
|
url: `/patient/pages/drugRecord/index?id=${id}`, |
|
|
|
url: `/patient/pages/drugRecord/index?id=${id}`, |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleDelDrug(e) { |
|
|
|
handleDelDrug(e) { |
|
|
|
const { id, isi } = e.currentTarget.dataset; |
|
|
|
const { id, isi } = e.currentTarget.dataset |
|
|
|
if (isi == 1) { |
|
|
|
if (isi == 1) { |
|
|
|
return; |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
wx.showModal({ |
|
|
|
wx.showModal({ |
|
|
|
title: '确认删除?', |
|
|
|
title: '确认删除?', |
|
|
@ -1058,34 +1040,33 @@ Page({ |
|
|
|
Id: id, |
|
|
|
Id: id, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}).then(() => { |
|
|
|
}).then(() => { |
|
|
|
this.handleTabCallBack(); |
|
|
|
this.handleTabCallBack() |
|
|
|
}); |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
toggleFold() { |
|
|
|
toggleFold() { |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
fold: !this.data.fold, |
|
|
|
fold: !this.data.fold, |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleShare() { |
|
|
|
handleShare() { |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDSHAREDUALCOMPLIANCEPOSTER' }); |
|
|
|
|
|
|
|
wx.navigateTo({ |
|
|
|
wx.navigateTo({ |
|
|
|
url: '/patient/pages/adlShare/index', |
|
|
|
url: '/patient/pages/adlShare/index', |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleBack() { |
|
|
|
handleBack() { |
|
|
|
wx.navigateBack({ |
|
|
|
wx.navigateBack({ |
|
|
|
fail() { |
|
|
|
fail() { |
|
|
|
wx.reLaunch({ url: '/patient/pages/index/index' }); |
|
|
|
wx.reLaunch({ url: '/patient/pages/index/index' }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
onShareAppMessage() { |
|
|
|
onShareAppMessage() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
title: 'MG-ADL测评表:评估重症肌无力患者症状对生活质量的影响', |
|
|
|
title: 'MG-ADL测评表:评估重症肌无力患者症状对生活质量的影响', |
|
|
|
path: '/patient/pages/adl/index', |
|
|
|
path: '/patient/pages/adl/index', |
|
|
|
}; |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}) |
|
|
|