|
|
|
|
@ -53,6 +53,8 @@ Page({
@@ -53,6 +53,8 @@ Page({
|
|
|
|
|
followLatest: null as any, |
|
|
|
|
|
|
|
|
|
options: {} as any, |
|
|
|
|
|
|
|
|
|
enterJump: false, |
|
|
|
|
}, |
|
|
|
|
onLoad(options) { |
|
|
|
|
const systemInfo = wx.getSystemInfoSync() |
|
|
|
|
@ -72,8 +74,7 @@ Page({
@@ -72,8 +74,7 @@ Page({
|
|
|
|
|
|
|
|
|
|
if (options.jump == '1') { |
|
|
|
|
this.setData({ |
|
|
|
|
toastShow: true, |
|
|
|
|
toastType: 'guideEnterInfoJump', |
|
|
|
|
enterJump: true, |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -116,8 +117,26 @@ Page({
@@ -116,8 +117,26 @@ Page({
|
|
|
|
|
}, |
|
|
|
|
async getPopup() { |
|
|
|
|
// https://fa0ci3qr2z.feishu.cn/wiki/EBX6woN7xiaartkYkBpcfbYQnfn
|
|
|
|
|
if (this.data.toastShow) |
|
|
|
|
if (this.data.toastShow) return |
|
|
|
|
|
|
|
|
|
if (app.globalData.scanDoctor) { |
|
|
|
|
this.setData({ |
|
|
|
|
toastShow: true, |
|
|
|
|
toastType: 'followGuide', |
|
|
|
|
toastParams: { close: true, scanDoctor: true }, |
|
|
|
|
}) |
|
|
|
|
app.globalData.scanDoctor = false |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (this.data.enterJump) { |
|
|
|
|
this.setData({ |
|
|
|
|
toastShow: true, |
|
|
|
|
toastType: 'guideEnterInfoJump', |
|
|
|
|
enterJump: false, |
|
|
|
|
}) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const data4 = await wx.ajax({ |
|
|
|
|
method: 'GET', |
|
|
|
|
@ -126,6 +145,7 @@ Page({
@@ -126,6 +145,7 @@ Page({
|
|
|
|
|
type: 1, |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
if (data4.showAlert) { |
|
|
|
|
this.setData({ |
|
|
|
|
toastShow: data4.showAlert, |
|
|
|
|
@ -208,7 +228,8 @@ Page({
@@ -208,7 +228,8 @@ Page({
|
|
|
|
|
method: 'GET', |
|
|
|
|
url: '?r=xd/follow-up-reminder/latest', |
|
|
|
|
data: {}, |
|
|
|
|
}).then((res: any) => { |
|
|
|
|
}) |
|
|
|
|
.then((res: any) => { |
|
|
|
|
if (res && res.nextVisitTime) { |
|
|
|
|
const date = dayjs(res.nextVisitTime) |
|
|
|
|
const year = date.format('YYYY') |
|
|
|
|
@ -223,11 +244,11 @@ Page({
@@ -223,11 +244,11 @@ Page({
|
|
|
|
|
week: date.format('dddd'), |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
} else { |
|
|
|
|
this.setData({ followLatest: null }) |
|
|
|
|
} |
|
|
|
|
}).catch(() => { |
|
|
|
|
}) |
|
|
|
|
.catch(() => { |
|
|
|
|
this.setData({ followLatest: null }) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
@ -276,13 +297,11 @@ Page({
@@ -276,13 +297,11 @@ Page({
|
|
|
|
|
// 设置显示状态
|
|
|
|
|
if (code === 'medicalInsurance' && showStatus == 1) { |
|
|
|
|
statusMap.medicalInsuranceShow = true |
|
|
|
|
if (openStatus == 1) |
|
|
|
|
statusMap.medicalInsuranceJump = true |
|
|
|
|
if (openStatus == 1) statusMap.medicalInsuranceJump = true |
|
|
|
|
} |
|
|
|
|
if (code === 'hospitalMap' && showStatus == 1) { |
|
|
|
|
statusMap.hospitalMapShow = true |
|
|
|
|
if (openStatus == 1) |
|
|
|
|
statusMap.hospitalMapJump = true |
|
|
|
|
if (openStatus == 1) statusMap.hospitalMapJump = true |
|
|
|
|
} |
|
|
|
|
if (code === 'adl' && showStatus == 1) { |
|
|
|
|
statusMap.qolShow = true |
|
|
|
|
@ -402,8 +421,7 @@ Page({
@@ -402,8 +421,7 @@ Page({
|
|
|
|
|
}) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (!url) |
|
|
|
|
return |
|
|
|
|
if (!url) return |
|
|
|
|
if (code === 'doctor') { |
|
|
|
|
app.mpBehavior({ PageName: 'BTN_PatientHomeDoctorCard' }) |
|
|
|
|
} |
|
|
|
|
@ -437,8 +455,8 @@ Page({
@@ -437,8 +455,8 @@ Page({
|
|
|
|
|
}, |
|
|
|
|
handleAddQol() { |
|
|
|
|
const { qolDetail } = this.data |
|
|
|
|
const url |
|
|
|
|
= qolDetail.Id && qolDetail.isTodayRecord |
|
|
|
|
const url = |
|
|
|
|
qolDetail.Id && qolDetail.isTodayRecord |
|
|
|
|
? `/patient/pages/qolAdd/index?id=${qolDetail.Id}&edit=1` |
|
|
|
|
: `/patient/pages/qol/index` |
|
|
|
|
wx.navigateTo({ |
|
|
|
|
@ -459,8 +477,7 @@ Page({
@@ -459,8 +477,7 @@ Page({
|
|
|
|
|
wx.navigateTo({ |
|
|
|
|
url: `/patient/pages/hormones/index?id=${hormoneDetail.recordId}`, |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
} else { |
|
|
|
|
wx.navigateTo({ |
|
|
|
|
url: '/patient/pages/hormonesStart/index', |
|
|
|
|
}) |
|
|
|
|
@ -470,20 +487,18 @@ Page({
@@ -470,20 +487,18 @@ Page({
|
|
|
|
|
app.zdPermissionVerification(3, 0, '') |
|
|
|
|
}, |
|
|
|
|
handleToastOk() { |
|
|
|
|
const { toastType } = this.data |
|
|
|
|
const { toastType, toastParams } = this.data |
|
|
|
|
if (toastType === 'ndrlAldAlert') { |
|
|
|
|
wx.navigateTo({ |
|
|
|
|
url: '/patient/pages/adl/index?nrdl=1', |
|
|
|
|
}) |
|
|
|
|
this.handleToastCancel() |
|
|
|
|
} |
|
|
|
|
else if (toastType === 'doubleStandards') { |
|
|
|
|
} else if (toastType === 'doubleStandards') { |
|
|
|
|
wx.navigateTo({ |
|
|
|
|
url: '/patient/pages/adl/index', |
|
|
|
|
}) |
|
|
|
|
this.handleToastCancel() |
|
|
|
|
} |
|
|
|
|
else if (toastType === 'dedicatedDoctor') { |
|
|
|
|
} else if (toastType === 'dedicatedDoctor') { |
|
|
|
|
wx.ajax({ |
|
|
|
|
method: 'POST', |
|
|
|
|
url: '?r=zd/popup/close-popup', |
|
|
|
|
@ -496,8 +511,7 @@ Page({
@@ -496,8 +511,7 @@ Page({
|
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
this.handleToastCancel(null, false) |
|
|
|
|
} |
|
|
|
|
else if (toastType === 'medical-guide') { |
|
|
|
|
} else if (toastType === 'medical-guide') { |
|
|
|
|
wx.ajax({ |
|
|
|
|
method: 'POST', |
|
|
|
|
url: '?r=zd/popup/add-record', |
|
|
|
|
@ -508,8 +522,7 @@ Page({
@@ -508,8 +522,7 @@ Page({
|
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
this.handleToastCancel(null, false) |
|
|
|
|
} |
|
|
|
|
else if (toastType === 'guideEnterInfo') { |
|
|
|
|
} else if (toastType === 'guideEnterInfo') { |
|
|
|
|
wx.ajax({ |
|
|
|
|
method: 'POST', |
|
|
|
|
url: '?r=zd/popup/close-need-popup', |
|
|
|
|
@ -520,14 +533,13 @@ Page({
@@ -520,14 +533,13 @@ Page({
|
|
|
|
|
}) |
|
|
|
|
this.handleToastCancel(null, false) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
else if (toastType === 'guideEnterInfoJump') { |
|
|
|
|
} else if (toastType === 'guideEnterInfoJump') { |
|
|
|
|
wx.navigateTo({ |
|
|
|
|
url: '/patient/pages/personalInformation/index', |
|
|
|
|
}) |
|
|
|
|
this.handleToastCancel(null, false) |
|
|
|
|
} |
|
|
|
|
else if (toastType === 'followGuide') { |
|
|
|
|
} else if (toastType === 'followGuide') { |
|
|
|
|
if (!toastParams.scanDoctor) { |
|
|
|
|
wx.ajax({ |
|
|
|
|
method: 'POST', |
|
|
|
|
url: '?r=zd/popup/add-record', |
|
|
|
|
@ -537,11 +549,16 @@ Page({
@@ -537,11 +549,16 @@ Page({
|
|
|
|
|
url: '/patient/pages/followForm/index', |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
wx.navigateTo({ |
|
|
|
|
url: '/patient/pages/followForm/index', |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
this.handleToastCancel(null, false) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
handleToastCancel(_e = null, sure = true) { |
|
|
|
|
const { toastType } = this.data |
|
|
|
|
const { toastType, toastParams } = this.data |
|
|
|
|
if (toastType === 'doubleStandards' && sure) { |
|
|
|
|
wx.ajax({ |
|
|
|
|
method: 'POST', |
|
|
|
|
@ -550,8 +567,7 @@ Page({
@@ -550,8 +567,7 @@ Page({
|
|
|
|
|
Type: 5, |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
else if (toastType === 'dedicatedDoctor' && sure) { |
|
|
|
|
} else if (toastType === 'dedicatedDoctor' && sure) { |
|
|
|
|
wx.ajax({ |
|
|
|
|
method: 'POST', |
|
|
|
|
url: '?r=zd/popup/close-popup', |
|
|
|
|
@ -559,22 +575,19 @@ Page({
@@ -559,22 +575,19 @@ Page({
|
|
|
|
|
Type: 6, |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
else if (toastType === 'medical-guide' && sure) { |
|
|
|
|
} else if (toastType === 'medical-guide' && sure) { |
|
|
|
|
wx.ajax({ |
|
|
|
|
method: 'POST', |
|
|
|
|
url: '?r=zd/popup/add-record', |
|
|
|
|
data: { type: 3 }, |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
else if (toastType === 'guideEnterInfo' && sure) { |
|
|
|
|
} else if (toastType === 'guideEnterInfo' && sure) { |
|
|
|
|
wx.ajax({ |
|
|
|
|
method: 'POST', |
|
|
|
|
url: '?r=zd/popup/close-need-popup', |
|
|
|
|
data: { type: 1 }, |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
else if (toastType === 'followGuide' && sure) { |
|
|
|
|
} else if (toastType === 'followGuide' && sure && !toastParams.scanDoctor) { |
|
|
|
|
wx.ajax({ |
|
|
|
|
method: 'POST', |
|
|
|
|
url: '?r=zd/popup/add-record', |
|
|
|
|
@ -617,8 +630,7 @@ Page({
@@ -617,8 +630,7 @@ Page({
|
|
|
|
|
infoList: list, |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
} else { |
|
|
|
|
wx.ajax({ |
|
|
|
|
method: 'POST', |
|
|
|
|
url: '?r=zd/pic-text/collection', |
|
|
|
|
|