diff --git a/src/api/system/followupstatistics.js b/src/api/system/followupstatistics.js new file mode 100644 index 0000000..5bc08a3 --- /dev/null +++ b/src/api/system/followupstatistics.js @@ -0,0 +1,19 @@ +import request from '@/utils/request' + +// 随访明细表查询 +export function getFollowUpDetail(query) { + return request({ + url: '/system/statistics/getFollowUpDetail', + method: 'get', + params: query + }) +} + +// 随访成功率统计 +export function getFollowUpRate(query) { + return request({ + url: `/system/statistics/getFollowUpRate`, + method: 'get', + params: query + }) +} diff --git a/src/views/system/followupstatistics/index.vue b/src/views/system/followupstatistics/index.vue index a33accd..d1921c1 100644 --- a/src/views/system/followupstatistics/index.vue +++ b/src/views/system/followupstatistics/index.vue @@ -40,7 +40,7 @@ - 搜索 + 搜索 重置 @@ -49,32 +49,32 @@
AI电话拨打次数
-
350
+
{{ echartlist.aiNum }}
成功率:
- +
人工电话拨打次数
-
600
+
{{ echartlist.commonNum }}
成功率:
- +
AI电话拨打人数
-
200
+
{{ echartlist.aiPatientNum }}
成功率:
- +
人工电话拨打人数
-
400
+
{{ echartlist.commonPatientNum }}
成功率:
- +
-
总通话人数:600
-
短信发送数:300
-
小程序通知数:350
+
总通话人数:{{ echartlist.sumPatientNum }}
+
短信发送数:{{ echartlist.smsNum }}
+
小程序通知数:{{ echartlist.subscribeNum }}
@@ -86,68 +86,41 @@
-
+
科室/人员
-
+
日期
-
- - + + + + + + + + + + + + + + + - + - + - + - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- + +
@@ -158,6 +131,10 @@ import { selectAgencyList, getAgencyList, } from "@/api/manage/selectAgencyList"; +import { + getFollowUpDetail, + getFollowUpRate +} from '@/api/system/followupstatistics' import * as echarts from 'echarts'; export default { name: "followupstatistics", @@ -166,8 +143,6 @@ export default { maxTableHeight: undefined, // 查询参数 queryParams: { - pageNum: 1, - pageSize: 10, startDate: null, endDate: null, hospitalAgencyId: null, @@ -178,6 +153,7 @@ export default { departmentName: null, wardId: null, wardName: null, + type: 'dept' }, visitDate: [], //医院list @@ -188,124 +164,24 @@ export default { departmentlist: [], //病区list wardlist: [], - tapbtn: 1, - tableData: [{ - id: 1, - ksry: '总计', - jzcyrs: '66', - ysfjhrs: '76', - sffgl: '116%', - sfcgrs: '69', - sfcglr: '105%', - sfjhcs: '387', - sfjhcgs: '260', - sfcglrw: '77%', - sfjhsbs: '140', - sfjhsbl: '36%' - }, { - id: 2, - ksry: '骨伤科', - jzcyrs: '18', - ysfjhrs: '26', - sffgl: '145%', - sfcgrs: '26', - sfcglr: '145%', - sfjhcs: '387', - sfjhcgs: '260', - sfcglrw: '77%', - sfjhsbs: '140', - sfjhsbl: '36%' - }, { - id: 3, - ksry: '妇科', - jzcyrs: '66', - ysfjhrs: '76', - sffgl: '116%', - sfcgrs: '69', - sfcglr: '105%', - sfjhcs: '387', - sfjhcgs: '260', - sfcglrw: '77%', - sfjhsbs: '140', - sfjhsbl: '36%', - children: [{ - id: 31, - ksry: '张三', - jzcyrs: '66', - ysfjhrs: '76', - sffgl: '116%', - sfcgrs: '69', - sfcglr: '105%', - sfjhcs: '387', - sfjhcgs: '260', - sfcglrw: '77%', - sfjhsbs: '140', - sfjhsbl: '36%', - }, { - id: 32, - ksry: '李四', - jzcyrs: '66', - ysfjhrs: '76', - sffgl: '116%', - sfcgrs: '69', - sfcglr: '105%', - sfjhcs: '387', - sfjhcgs: '260', - sfcglrw: '77%', - sfjhsbs: '140', - sfjhsbl: '36%', - }] - }, { - id: 4, - ksry: '肾内科', - jzcyrs: '66', - ysfjhrs: '76', - sffgl: '116%', - sfcgrs: '69', - sfcglr: '105%', - sfjhcs: '387', - sfjhcgs: '260', - sfcglrw: '77%', - sfjhsbs: '140', - sfjhsbl: '36%', - }], - tableDatasj: [{ - id: 5, - tjsj: '2024-10', - jzcyrs: '66', - ysfjhrs: '76', - sffgl: '116%', - sfcgrs: '69', - sfcgl: '105%', - zndhcs: '7', - zndhcgl: '84%', - rgsfcs: '1', - rgsfcgl: '100%', - }, { - id: 6, - tjsj: '2024-09', - jzcyrs: '18', - ysfjhrs: '26', - sffgl: '145%', - sfcgrs: '26', - sfcgl: '145%', - zndhcs: '3', - zndhcgl: '30%', - rgsfcs: '2', - rgsfcgl: '50%', - }], + echartlist: [], + loading: false, + tableData: [], }; }, created() { this.selectAgencyinfo(); + this.getList(); }, mounted() { - this.echartinfo(); - this.echartinfotwo(); this.getMaxTableHeight() this.screenChange() }, methods: { + clicktype(index) { + this.queryParams.type = index + this.getFollowUpDetailinfo(); + }, echartinfo() { var chartDom = document.getElementById('leftechart'); var myChart = echarts.init(chartDom); @@ -324,7 +200,7 @@ export default { }, xAxis: { type: 'category', - data: ['2024年9月', '2024年10月'] + data: this.echartlist.numTrendVoList.map(e => e.followUpMonth) }, yAxis: { type: 'value', @@ -334,7 +210,7 @@ export default { { name: 'AI电话拨打人数', type: 'line', - data: [120, 200], + data: this.echartlist.numTrendVoList.map(e => e.aiPatientNum), lineStyle: { width: 3, color: '#942CCA', @@ -343,7 +219,7 @@ export default { { name: '人工电话拨打人数', type: 'line', - data: [220, 400], + data: this.echartlist.numTrendVoList.map(e => e.commonPatientNum), lineStyle: { width: 3, color: '#22B14C', @@ -352,7 +228,7 @@ export default { { name: '短信发送数', type: 'line', - data: [150, 300], + data: this.echartlist.numTrendVoList.map(e => e.smsNum), lineStyle: { width: 3, color: '#ED1C24', @@ -361,7 +237,7 @@ export default { { name: '小程序通知数', type: 'line', - data: [320, 350], + data: this.echartlist.numTrendVoList.map(e => e.subscribeNum), lineStyle: { width: 3, color: '#FF7F27', @@ -380,7 +256,7 @@ export default { formatter: function (params) { var result = params[0].name + "
"; params.forEach(function (item) { - if (item.value) { + if (item.value >= 0) { result += item.marker + " " + item.seriesName + " : " + item.value + "%
"; } else { result += item.marker + " " + item.seriesName + " : -
"; @@ -400,7 +276,7 @@ export default { }, xAxis: { type: 'category', - data: ['2024年9月', '2024年10月'] + data: this.echartlist.rateTrendVoList.map(e => e.followUpMonth) }, yAxis: [ { @@ -424,7 +300,7 @@ export default { { name: 'AI电话拨打次数成功率', type: 'line', - data: [15, 60], + data: this.echartlist.rateTrendVoList.map(e => e.aiSuccessRate), lineStyle: { width: 3, color: '#FFF200', @@ -433,7 +309,7 @@ export default { { name: '人工电话拨打次数成功率', type: 'line', - data: [32, 90], + data: this.echartlist.rateTrendVoList.map(e => e.commonSuccessRate), lineStyle: { width: 3, color: '#00A2E8', @@ -442,7 +318,7 @@ export default { { name: 'AI电话拨打人数成功率', type: 'line', - data: [12, 60], + data: this.echartlist.rateTrendVoList.map(e => e.aiPatientSuccessRate), lineStyle: { width: 3, color: '#3F48CC', @@ -451,7 +327,7 @@ export default { { name: '人工电话拨打人数成功率', type: 'line', - data: [22, 90], + data: this.echartlist.rateTrendVoList.map(e => e.commonPatientSuccessRate), lineStyle: { width: 3, color: '#880015', @@ -462,7 +338,7 @@ export default { option && myChart.setOption(option); }, /** 查询 */ - getList() { + async getList() { if (this.visitDate?.length > 0) { this.queryParams.startDate = this.visitDate[0]; this.queryParams.endDate = this.visitDate[1]; @@ -470,11 +346,37 @@ export default { this.queryParams.startDate = null; this.queryParams.endDate = null; } + await getFollowUpRate(this.queryParams).then(res => { + this.echartlist = res.data + this.echartinfo(); + this.echartinfotwo(); + this.getFollowUpDetailinfo(); + }) }, - /** 搜索按钮操作 */ - handleQuery() { - this.queryParams.pageNum = 1; - this.getList(); + async getFollowUpDetailinfo() { + if (this.visitDate?.length > 0) { + this.queryParams.startDate = this.visitDate[0]; + this.queryParams.endDate = this.visitDate[1]; + } else { + this.queryParams.startDate = null; + this.queryParams.endDate = null; + } + this.loading = true + await getFollowUpDetail(this.queryParams).then(res => { + var id = 1 + res.data.forEach(e => { + id++ + e.rowId = id + if (e.childerenList?.length > 0) { + e.childerenList.forEach(el => { + id++ + el.rowId = id + }) + } + }) + this.tableData = res.data + this.loading = false + }) }, /** 重置按钮操作 */ resetQuery() { @@ -482,6 +384,7 @@ export default { this.queryParams.visitDateStart = null; this.queryParams.visitDateEnd = null; this.resetForm("queryForm"); + this.getList(); }, selectAgencyinfo() { let query = {