This commit is contained in:
2024-11-07 14:57:27 +08:00
parent d1ff25ff24
commit b77fd4c06e
2 changed files with 112 additions and 190 deletions

View File

@ -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
})
}

View File

@ -40,7 +40,7 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="getList">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
@ -49,32 +49,32 @@
<div class="app">
<div class="content">
<div class="words">AI电话拨打次数</div>
<div class="num">350</div>
<div class="num">{{ echartlist.aiNum }}</div>
<div class="rate">成功率:</div>
<el-progress :percentage="60"></el-progress>
<el-progress :percentage="echartlist.aiSuccessRate"></el-progress>
</div>
<div class="content">
<div class="words">人工电话拨打次数</div>
<div class="num">600</div>
<div class="num">{{ echartlist.commonNum }}</div>
<div class="rate">成功率:</div>
<el-progress :percentage="90"></el-progress>
<el-progress :percentage="echartlist.commonSuccessRate"></el-progress>
</div>
<div class="content">
<div class="words">AI电话拨打人数</div>
<div class="num">200</div>
<div class="num">{{ echartlist.aiPatientNum }}</div>
<div class="rate">成功率:</div>
<el-progress :percentage="60"></el-progress>
<el-progress :percentage="echartlist.aiPatientSuccessRate"></el-progress>
</div>
<div class="content">
<div class="words">人工电话拨打人数</div>
<div class="num">400</div>
<div class="num">{{ echartlist.commonPatientNum }}</div>
<div class="rate">成功率:</div>
<el-progress :percentage="90"></el-progress>
<el-progress :percentage="echartlist.commonPatientSuccessRate"></el-progress>
</div>
<div class="content" style="margin-right: 0;">
<div class="words" style="top:20px;font-size: 17px;">总通话人数600</div>
<div class="words" style="top:60px;font-size: 17px;">短信发送数300</div>
<div class="words" style="top:100px;font-size: 17px;">小程序通知数350</div>
<div class="words" style="top:20px;font-size: 17px;">总通话人数{{ echartlist.sumPatientNum }}</div>
<div class="words" style="top:60px;font-size: 17px;">短信发送数{{ echartlist.smsNum }}</div>
<div class="words" style="top:100px;font-size: 17px;">小程序通知数{{ echartlist.subscribeNum }}</div>
</div>
</div>
<div class="trend">
@ -86,68 +86,41 @@
</div>
<div class="trend" style="padding-bottom: 50px;">
<div class="tabletitles">
<div :class="tapbtn == 1 ? 'tabletitleleft taptitle' : 'tabletitleleft'" @click="tapbtn = 1">
<div :class="queryParams.type == 'dept' ? 'tabletitleleft taptitle' : 'tabletitleleft'"
@click="clicktype('dept')">
科室/人员
</div>
<div :class="tapbtn == 2 ? 'tabletitleright taptitle' : 'tabletitleright'" @click="tapbtn = 2">
<div :class="queryParams.type == 'date' ? 'tabletitleright taptitle' : 'tabletitleright'"
@click="clicktype('date')">
日期
</div>
</div>
<el-descriptions title="随访明细表" style="padding:20px 0 0 15px;" />
<div v-if="tapbtn == 1">
<el-table :data="tableData" style="width: 98%;margin:0 auto;" row-key="id" border
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
<el-table-column prop="ksry" label="科室/人员">
<el-table :data="tableData" style="width: 98%;margin:0 auto;" row-key="rowId" border v-loading="loading"
:tree-props="{ children: 'childerenList', hasChildren: 'hasChildren' }">
<el-table-column prop="rowName" label="科室/人员">
</el-table-column>
<el-table-column prop="patientNum" label="就诊/出院人数" sortable>
</el-table-column>
<el-table-column prop="followUpNum" label="有随访计划人数">
</el-table-column>
<el-table-column prop="followUpCoverRate" label="随访覆盖率" sortable>
</el-table-column>
<el-table-column prop="followUpSuccessNum" label="随访成功人数">
</el-table-column>
<el-table-column prop="followUpSuccessRate" label="随访成功率">
</el-table-column>
<el-table-column label="按随访任务(方式)">
<el-table-column prop="aiNum" label="AI电话次数">
</el-table-column>
<el-table-column prop="jzcyrs" label="就诊/出院人数" sortable>
<el-table-column prop="aiSuccessRate" label="AI电话成功率">
</el-table-column>
<el-table-column prop="ysfjhrs" label="有随访计划人数">
<el-table-column prop="commonNum" label="人工随访次数">
</el-table-column>
<el-table-column prop="sffgl" label="随访覆盖率" sortable>
<el-table-column prop="commonSuccessRate" label="人工随访成功率">
</el-table-column>
<el-table-column prop="sfcgrs" label="随访成功人数">
</el-table-column>
<el-table-column prop="sfcglr" label="随访成功率(人)">
</el-table-column>
<el-table-column prop="sfjhcs" label="随访计划次数(任务)">
</el-table-column>
<el-table-column prop="sfjhcgs" label="随访计划成功数(任务)">
</el-table-column>
<el-table-column prop="sfcglrw" label="随访成功率(任务)">
</el-table-column>
<el-table-column prop="sfjhsbs" label="随访计划失败数(任务)">
</el-table-column>
<el-table-column prop="sfjhsbl" label="随访计划失败率(任务)">
</el-table-column>
</el-table>
</div>
<div v-if="tapbtn == 2">
<el-table :data="tableDatasj" style="width: 98%;margin:0 auto;" border>
<el-table-column prop="tjsj" label="统计时间">
</el-table-column>
<el-table-column prop="jzcyrs" label="就诊/出院人数" sortable>
</el-table-column>
<el-table-column prop="ysfjhrs" label="有随访计划人数">
</el-table-column>
<el-table-column prop="sffgl" label="随访覆盖率" sortable>
</el-table-column>
<el-table-column prop="sfcgrs" label="随访成功人数">
</el-table-column>
<el-table-column prop="sfcgl" label="随访成功率">
</el-table-column>
<el-table-column label="按随访任务(方式)">
<el-table-column prop="zndhcs" label="智能电话次数">
</el-table-column>
<el-table-column prop="zndhcgl" label="智能电话成功率">
</el-table-column>
<el-table-column prop="rgsfcs" label="人工随访次数">
</el-table-column>
<el-table-column prop="rgsfcgl" label="人工随访成功率">
</el-table-column>
</el-table-column>
</el-table>
</div>
</el-table-column>
</el-table>
</div>
</div>
</div>
@ -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 + "<br>";
params.forEach(function (item) {
if (item.value) {
if (item.value >= 0) {
result += item.marker + " " + item.seriesName + " : " + item.value + "%</br>";
} else {
result += item.marker + " " + item.seriesName + " : - </br>";
@ -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 = {