|
|
|
@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
|
|
|
|
|
import dayjs from 'dayjs' |
|
|
|
|
const app = getApp<IAppOption>() |
|
|
|
|
import dayjs from 'dayjs'; |
|
|
|
|
const app = getApp<IAppOption>(); |
|
|
|
|
|
|
|
|
|
Page({ |
|
|
|
|
data: { |
|
|
|
@ -69,19 +69,19 @@ Page({
@@ -69,19 +69,19 @@ Page({
|
|
|
|
|
unreadCount: 0, |
|
|
|
|
}, |
|
|
|
|
onLoad(options) { |
|
|
|
|
console.log(options) |
|
|
|
|
console.log(options); |
|
|
|
|
app.zdGetTheme().then((res) => { |
|
|
|
|
this.setData({ |
|
|
|
|
theme: res, |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const SystemInfo = app.globalSystemInfo |
|
|
|
|
const SystemInfo = app.globalSystemInfo; |
|
|
|
|
if (SystemInfo) { |
|
|
|
|
const { bottom } = SystemInfo.capsulePosition |
|
|
|
|
const { bottom } = SystemInfo.capsulePosition; |
|
|
|
|
this.setData({ |
|
|
|
|
bottom, |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
this.setData({ |
|
|
|
|
id: options.id, |
|
|
|
@ -90,27 +90,27 @@ Page({
@@ -90,27 +90,27 @@ Page({
|
|
|
|
|
nrdl: options.nrdl, |
|
|
|
|
sendWeiYi: options.wy === '1', |
|
|
|
|
idafa: options.idafa === '1', |
|
|
|
|
}) |
|
|
|
|
app.zdWaitLogin({ loginPage: true }).then(() => { |
|
|
|
|
app.zdMpBehavior({ PageName: 'PG_PATIENTASSESSMENTRESULTS' }) |
|
|
|
|
app.getZdUserInfo(this, false) |
|
|
|
|
this.getUnreadCount() |
|
|
|
|
this.getDetail() |
|
|
|
|
this.getQrCode() |
|
|
|
|
}); |
|
|
|
|
app.waitLogin({ type: [0, 1] }).then(() => { |
|
|
|
|
app.zdMpBehavior({ PageName: 'PG_PATIENTASSESSMENTRESULTS' }); |
|
|
|
|
app.getZdUserInfo(this, false); |
|
|
|
|
this.getUnreadCount(); |
|
|
|
|
this.getDetail(); |
|
|
|
|
this.getQrCode(); |
|
|
|
|
if (options.nrdl === '1') { |
|
|
|
|
this.getOpenPatientList() |
|
|
|
|
this.getOpenPatientList(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const pages = getCurrentPages() //获取当前页面js里面的pages里的所有信息。
|
|
|
|
|
const prevPage = pages[pages.length - 2] |
|
|
|
|
const adlResultInfo = wx.getStorageSync('adlResultInfo') |
|
|
|
|
console.log(options.idafa === '1') |
|
|
|
|
const pages = getCurrentPages(); //获取当前页面js里面的pages里的所有信息。
|
|
|
|
|
const prevPage = pages[pages.length - 2]; |
|
|
|
|
const adlResultInfo = wx.getStorageSync('adlResultInfo'); |
|
|
|
|
console.log(options.idafa === '1'); |
|
|
|
|
if (options.idafa === '1') { |
|
|
|
|
this.setData({ |
|
|
|
|
toastShow: true, |
|
|
|
|
toastType: 'adlLevelUp', |
|
|
|
|
toastParams: {}, |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
} else if (adlResultInfo && prevPage.route == 'pages/adl/index' && !Array.isArray(adlResultInfo)) { |
|
|
|
|
this.setData({ |
|
|
|
|
toastShow: true, |
|
|
|
@ -119,10 +119,10 @@ Page({
@@ -119,10 +119,10 @@ Page({
|
|
|
|
|
...adlResultInfo, |
|
|
|
|
Records: adlResultInfo.Records?.reverse(), |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
wx.removeStorageSync('adlResultInfo') |
|
|
|
|
}); |
|
|
|
|
wx.removeStorageSync('adlResultInfo'); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getQrCode() { |
|
|
|
|
wx.ajax({ |
|
|
|
@ -132,8 +132,8 @@ Page({
@@ -132,8 +132,8 @@ Page({
|
|
|
|
|
}).then((res) => { |
|
|
|
|
this.setData({ |
|
|
|
|
qrcode: res.src, |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getUnreadCount() { |
|
|
|
|
wx.ajax({ |
|
|
|
@ -143,11 +143,11 @@ Page({
@@ -143,11 +143,11 @@ Page({
|
|
|
|
|
}).then((res) => { |
|
|
|
|
this.setData({ |
|
|
|
|
unreadCount: res, |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getDetail() { |
|
|
|
|
const { id } = this.data |
|
|
|
|
const { id } = this.data; |
|
|
|
|
wx.ajax({ |
|
|
|
|
method: 'GET', |
|
|
|
|
url: '?r=zd/adl/view', |
|
|
|
@ -155,21 +155,21 @@ Page({
@@ -155,21 +155,21 @@ Page({
|
|
|
|
|
Id: id, |
|
|
|
|
}, |
|
|
|
|
}).then((res) => { |
|
|
|
|
let grade = 1 |
|
|
|
|
let grade = 1; |
|
|
|
|
if (res.TotalScore < 5) { |
|
|
|
|
grade = 1 |
|
|
|
|
grade = 1; |
|
|
|
|
} else if (res.TotalScore >= 5 && res.TotalScore < 15) { |
|
|
|
|
grade = 2 |
|
|
|
|
grade = 2; |
|
|
|
|
} else { |
|
|
|
|
grade = 3 |
|
|
|
|
grade = 3; |
|
|
|
|
} |
|
|
|
|
this.setData({ |
|
|
|
|
detail: res, |
|
|
|
|
grade, |
|
|
|
|
LastCreateDate: dayjs(res.LastCreateTime).format('MM月DD日'), |
|
|
|
|
dateDiff: dayjs(res.CreateTime).from(res.LastCreateTime).replace(' ', ''), |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getOpenPatientList() { |
|
|
|
|
wx.ajax({ |
|
|
|
@ -179,24 +179,24 @@ Page({
@@ -179,24 +179,24 @@ Page({
|
|
|
|
|
}).then((res) => { |
|
|
|
|
this.setData({ |
|
|
|
|
patientInfo: res, |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleDetail() { |
|
|
|
|
const { scurt, noFinish } = this.data |
|
|
|
|
if (noFinish) return |
|
|
|
|
const { scurt, noFinish } = this.data; |
|
|
|
|
if (noFinish) return; |
|
|
|
|
this.setData({ |
|
|
|
|
scurt: (scurt + 1) % 2, |
|
|
|
|
noFinish: true, |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleDetailFinish() { |
|
|
|
|
this.setData({ |
|
|
|
|
noFinish: false, |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleReset() { |
|
|
|
|
const id = this.data.id |
|
|
|
|
const id = this.data.id; |
|
|
|
|
wx.showModal({ |
|
|
|
|
title: '确认重新测试?', |
|
|
|
|
content: '重新测试后,此次评测结果将自动删除', |
|
|
|
@ -212,61 +212,61 @@ Page({
@@ -212,61 +212,61 @@ Page({
|
|
|
|
|
}).then(() => { |
|
|
|
|
wx.redirectTo({ |
|
|
|
|
url: '/patient/pages/adlTest/index', |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleSave() { |
|
|
|
|
app.zdPermissionVerification(3, 2, ``).then(() => {}) |
|
|
|
|
app.zdPermissionVerification(3, 2, ``).then(() => {}); |
|
|
|
|
}, |
|
|
|
|
handleMyHealth() { |
|
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTGETNOTES' }) |
|
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTGETNOTES' }); |
|
|
|
|
wx.navigateTo({ |
|
|
|
|
url: '/gift/patient/pages/myHealthRecord/index', |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleShare() { |
|
|
|
|
wx.navigateTo({ |
|
|
|
|
url: '/patient/pages/adlShare/index', |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleToastOk() { |
|
|
|
|
if (this.data.toastType === 'adlLevelUp') { |
|
|
|
|
wx.navigateTo({ |
|
|
|
|
url: '/patient/pages/webview/index', |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
this.handleToastCancel() |
|
|
|
|
this.handleToastCancel(); |
|
|
|
|
}, |
|
|
|
|
handleToastCancel() { |
|
|
|
|
this.setData({ |
|
|
|
|
toastShow: false, |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleBack() { |
|
|
|
|
wx.navigateBack() |
|
|
|
|
wx.navigateBack(); |
|
|
|
|
}, |
|
|
|
|
routerTo(e) { |
|
|
|
|
const { url } = e.currentTarget.dataset |
|
|
|
|
const { url } = e.currentTarget.dataset; |
|
|
|
|
if (url === '/patient/pages/interactivePatient/index') { |
|
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTDOCTORCARD' }) |
|
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTDOCTORCARD' }); |
|
|
|
|
} |
|
|
|
|
if (url === '/patient/pages/webview/index') { |
|
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTAPPLYINSURANCE' }) |
|
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTAPPLYINSURANCE' }); |
|
|
|
|
} |
|
|
|
|
wx.navigateTo({ |
|
|
|
|
url, |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
hanldeCodeLong() { |
|
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTQRCODELONGPRESS' }) |
|
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTQRCODELONGPRESS' }); |
|
|
|
|
}, |
|
|
|
|
onShareAppMessage() { |
|
|
|
|
return { |
|
|
|
|
title: 'MG-ADL测评表:评估重症肌无力患者症状对生活质量的影响', |
|
|
|
|
path: '/patient/pages/adl/index', |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|