|
|
|
@ -229,11 +229,13 @@ Page({ |
|
|
|
|
|
|
|
|
|
|
|
// 获取日/月度邀约患者统计数据(按日期筛选)
|
|
|
|
// 获取日/月度邀约患者统计数据(按日期筛选)
|
|
|
|
getPatientStatistics() { |
|
|
|
getPatientStatistics() { |
|
|
|
|
|
|
|
// 根据统计类型选择日期格式
|
|
|
|
|
|
|
|
const statDate = this.data.statType === 'month' ? this.data.startMonth : this.data.startDate |
|
|
|
wx.ajax({ |
|
|
|
wx.ajax({ |
|
|
|
method: 'GET', |
|
|
|
method: 'GET', |
|
|
|
url: '/app/promoter/promoter/patient-statistics', |
|
|
|
url: '/app/promoter/promoter/patient-statistics', |
|
|
|
data: { |
|
|
|
data: { |
|
|
|
statDate: this.data.startDate, |
|
|
|
statDate, |
|
|
|
type: this.data.statType, |
|
|
|
type: this.data.statType, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}).then((res: any) => { |
|
|
|
}).then((res: any) => { |
|
|
|
@ -248,13 +250,16 @@ Page({ |
|
|
|
|
|
|
|
|
|
|
|
// 获取邀约患者统计图表(使用 chart1 的日期)
|
|
|
|
// 获取邀约患者统计图表(使用 chart1 的日期)
|
|
|
|
getPatientChart() { |
|
|
|
getPatientChart() { |
|
|
|
|
|
|
|
// 根据统计类型选择日期格式
|
|
|
|
|
|
|
|
const startDate = this.data.statType === 'month' ? this.data.chart1StartMonth : this.data.chart1StartDate |
|
|
|
|
|
|
|
const endDate = this.data.statType === 'month' ? this.data.chart1EndMonth : this.data.chart1EndDate |
|
|
|
wx.ajax({ |
|
|
|
wx.ajax({ |
|
|
|
method: 'GET', |
|
|
|
method: 'GET', |
|
|
|
url: '/app/promoter/promoter/patient-chart', |
|
|
|
url: '/app/promoter/promoter/patient-chart', |
|
|
|
data: { |
|
|
|
data: { |
|
|
|
type: this.data.statType, |
|
|
|
type: this.data.statType, |
|
|
|
startDate: this.data.chart1StartDate, |
|
|
|
startDate, |
|
|
|
endDate: this.data.chart1EndDate, |
|
|
|
endDate, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}).then((list: any) => { |
|
|
|
}).then((list: any) => { |
|
|
|
// 新接口返回的数据格式包含 invitePatientCount, jumpPatientCount, enrollPatientCount, indicationStats
|
|
|
|
// 新接口返回的数据格式包含 invitePatientCount, jumpPatientCount, enrollPatientCount, indicationStats
|
|
|
|
@ -274,10 +279,13 @@ Page({ |
|
|
|
|
|
|
|
|
|
|
|
// 获取邀约药师统计图表(使用 chart2 的日期)
|
|
|
|
// 获取邀约药师统计图表(使用 chart2 的日期)
|
|
|
|
getPharmacistChart() { |
|
|
|
getPharmacistChart() { |
|
|
|
|
|
|
|
// 根据统计类型选择日期格式
|
|
|
|
|
|
|
|
const startDate = this.data.statType === 'month' ? this.data.chart2StartMonth : this.data.chart2StartDate |
|
|
|
|
|
|
|
const endDate = this.data.statType === 'month' ? this.data.chart2EndMonth : this.data.chart2EndDate |
|
|
|
const data: any = { |
|
|
|
const data: any = { |
|
|
|
type: this.data.statType, |
|
|
|
type: this.data.statType, |
|
|
|
startDate: this.data.chart2StartDate, |
|
|
|
startDate, |
|
|
|
endDate: this.data.chart2EndDate, |
|
|
|
endDate, |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.data.currentProjectId) { |
|
|
|
if (this.data.currentProjectId) { |
|
|
|
data.projectId = this.data.currentProjectId |
|
|
|
data.projectId = this.data.currentProjectId |
|
|
|
@ -296,10 +304,13 @@ Page({ |
|
|
|
|
|
|
|
|
|
|
|
// 获取邀约药店统计图表(使用 chart3 的日期)
|
|
|
|
// 获取邀约药店统计图表(使用 chart3 的日期)
|
|
|
|
getPharmacyChart() { |
|
|
|
getPharmacyChart() { |
|
|
|
|
|
|
|
// 根据统计类型选择日期格式
|
|
|
|
|
|
|
|
const startDate = this.data.statType === 'month' ? this.data.chart3StartMonth : this.data.chart3StartDate |
|
|
|
|
|
|
|
const endDate = this.data.statType === 'month' ? this.data.chart3EndMonth : this.data.chart3EndDate |
|
|
|
const data: any = { |
|
|
|
const data: any = { |
|
|
|
type: this.data.statType, |
|
|
|
type: this.data.statType, |
|
|
|
startDate: this.data.chart3StartDate, |
|
|
|
startDate, |
|
|
|
endDate: this.data.chart3EndDate, |
|
|
|
endDate, |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.data.currentProjectId) { |
|
|
|
if (this.data.currentProjectId) { |
|
|
|
data.projectId = this.data.currentProjectId |
|
|
|
data.projectId = this.data.currentProjectId |
|
|
|
|