From 7c28d6cfc5353fbdf5c14ba38eb12215d0285632 Mon Sep 17 00:00:00 2001 From: yanzai Date: Mon, 8 Dec 2025 10:26:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YiJi-admin/src/views/YeWu/baobiao_yanshi.vue | 57 +++++++++++++------- 1 file changed, 37 insertions(+), 20 deletions(-) diff --git a/YiJi-admin/src/views/YeWu/baobiao_yanshi.vue b/YiJi-admin/src/views/YeWu/baobiao_yanshi.vue index c7038cb..da7bb3b 100644 --- a/YiJi-admin/src/views/YeWu/baobiao_yanshi.vue +++ b/YiJi-admin/src/views/YeWu/baobiao_yanshi.vue @@ -377,7 +377,7 @@ // 医技预约图表 initChart(techBarRef, { title: { - text: '申请科室分布', + text: '执行科室分布', left: 'center' }, tooltip: { @@ -391,13 +391,15 @@ }, xAxis: { type: 'category', - data: ['超声科', '放射科', '普放', '心电图', '胃肠镜科'] + data: tech.value.keshi_name, + // data: ['fas'] }, yAxis: { type: 'value' }, series: [{ - data: [45, 32, 67, 28, 53], + data: tech.value.keshi_value, + // data: [1], type: 'bar', color: '#91cc75' }] @@ -418,23 +420,7 @@ series: [{ type: 'pie', radius: ['40%', '70%'], - data: [{ - value: 70, - name: 'CT(70)' - }, - { - value: 30, - name: '核磁(30)' - }, - { - value: 30, - name: 'DR(30)' - }, - { - value: 150, - name: '超声(150)' - } - ] + data: tech.value.leixing }] }) break @@ -454,6 +440,11 @@ charts.forEach(chart => chart.resize()) }) } + let tech=ref({ + keshi_name:[], + keshi_value:[], + leixing:[] + }) const GetTongJi=()=>{ loading.value = true @@ -463,6 +454,32 @@ loading.value = false if (res.status) { techTableData.value=res.data.time_slot_stats + let keshi=[]; + let keshi_value=[]; + let type_count_list=[] + res.data.department_count.forEach((v1,i1)=>{ + keshi.push(v1.department_name) + keshi_value.push(v1.count) + }) + + tech.value.keshi_name=keshi + tech.value.keshi_value=keshi_value + + res.data.check_item_type_count.forEach((v2,i2)=>{ + type_count_list.push({ + value:v2.count, + name:v2.class_name + }) + }) + + tech.value.leixing=type_count_list + + if (activeTab.value === 'tech') { + nextTick(() => { + initTabCharts('tech') + }) + } + console.log(tech.value) } else { ElMessage.error(res.msg) }