From 09f4ddc2d76b15f1464e5ac0985ca4271e549c6e Mon Sep 17 00:00:00 2001 From: wx <645899409@qq.com> Date: Wed, 23 Oct 2024 15:20:57 +0800 Subject: [PATCH] =?UTF-8?q?update=201.=E9=93=B6=E5=B7=9D=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=80=A5=E6=95=91=E6=95=B0=E6=8D=AE=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/body-d-left/bodyLeftHooks.ts | 67 +++++ .../dailyWorkTrends/dailyWorkTrends.vue | 1 + .../emergencyData/emergencyData.vue | 228 ++++++++++++++++++ src/views/yinChuan/yinChuan.api.ts | 4 + src/views/yinChuan/yinChuan.vue | 16 +- 5 files changed, 314 insertions(+), 2 deletions(-) create mode 100644 src/views/yinChuan/componetns/emergencyData/emergencyData.vue diff --git a/src/components/body-d-left/bodyLeftHooks.ts b/src/components/body-d-left/bodyLeftHooks.ts index 796f807..ba76e77 100644 --- a/src/components/body-d-left/bodyLeftHooks.ts +++ b/src/components/body-d-left/bodyLeftHooks.ts @@ -463,6 +463,73 @@ export function barOption(xData, ydata, theme) { }; } +export function getOptions(data: any[] = [], colors: any[] = [], totalTimes: number = 0) { + return { + title: [ + { + text: totalTimes + '人', + left: 'center', + top: '35%', + textStyle: { + color: '#ffffff', + fontStyle: 'normal', + fontWeight: '400', // 字体粗细 'normal','bold','bolder','lighter',100 | 200 | 300 | 400... + fontFamily: 'Source Han Sans CN', + fontSize: 20, + height: '22%', + }, + }, + { + subtext: '急救总次数', + subtextStyle: { + color: '#ffffff', + fontStyle: 'normal', + fontWeight: '500', + fontFamily: 'Source Han Sans CN', + fontSize: 24, + }, + left: 'center', + top: '48%', + }, + ], + tooltip: { + trigger: 'item', + }, + label: { + formatter: '{b} {c}', + // fontSize: 18 + }, + legend: { + top: '0%', + left: 'center', + textStyle: { + color: '#ffffff', + }, + }, + colors: colors, + series: [ + { + type: 'pie', + radius: ['60%', '70%'], + avoidLabelOverlap: false, + padAngle: 1, + itemStyle: { + borderRadius: 10, + }, + center: ['50%', '55%'], + // emphasis: { + // label: { + // show: true, + // fontSize: 40, + // fontWeight: 'bold', + // }, + // }, + data: data, + }, + ], + }; +} + /** * @desc 值是否不为零 * @param list 数组 diff --git a/src/views/yinChuan/componetns/dailyWorkTrends/dailyWorkTrends.vue b/src/views/yinChuan/componetns/dailyWorkTrends/dailyWorkTrends.vue index 0193d05..ec1bebb 100644 --- a/src/views/yinChuan/componetns/dailyWorkTrends/dailyWorkTrends.vue +++ b/src/views/yinChuan/componetns/dailyWorkTrends/dailyWorkTrends.vue @@ -54,6 +54,7 @@ padding: 10px 20px; .trends-title-con { + margin-bottom: 5px; display: flex; align-items: center; } diff --git a/src/views/yinChuan/componetns/emergencyData/emergencyData.vue b/src/views/yinChuan/componetns/emergencyData/emergencyData.vue new file mode 100644 index 0000000..cd31a7e --- /dev/null +++ b/src/views/yinChuan/componetns/emergencyData/emergencyData.vue @@ -0,0 +1,228 @@ + + + diff --git a/src/views/yinChuan/yinChuan.api.ts b/src/views/yinChuan/yinChuan.api.ts index c1d9abc..d56adf2 100644 --- a/src/views/yinChuan/yinChuan.api.ts +++ b/src/views/yinChuan/yinChuan.api.ts @@ -4,6 +4,8 @@ export enum Api { phoneList = '/health-emergency/emergency/tblUserHelp/phoneList', getWorkDaily = '/health-emergency/emergency/ycLargeScreen/medicalCenter', getTeamHealth = '/health-emergency/emergency/ycLargeScreen/userHealthCenter', + ambulanceStat = '/health-emergency/emergency/ycLargeScreen/ambulanceStat', + ambulancePage = '/health-emergency/emergency/ycLargeScreen/ambulancePage', } // 呼入电话、受理电话 @@ -12,3 +14,5 @@ export const getPhoneList = (params: any) => get(Api.phoneList, params); export const getWorkDaily = (params: any) => get(Api.getWorkDaily, params); //员工队伍健康状况 export const getTeamHealth = (params: any) => get(Api.getTeamHealth, params); +export const ambulanceStatApi = (params: any) => get(Api.ambulanceStat, params); +export const ambulancePageApi = (params: any) => get(Api.ambulancePage, params); diff --git a/src/views/yinChuan/yinChuan.vue b/src/views/yinChuan/yinChuan.vue index e24c791..49f3d28 100644 --- a/src/views/yinChuan/yinChuan.vue +++ b/src/views/yinChuan/yinChuan.vue @@ -23,6 +23,7 @@ /> +
+