diff --git a/src/assets/images/bg.png b/src/assets/images/bg.png index 48e35ea..ce13c13 100644 Binary files a/src/assets/images/bg.png and b/src/assets/images/bg.png differ diff --git a/src/components/body-d-left/bodyLeftHooks.ts b/src/components/body-d-left/bodyLeftHooks.ts index b619c7c..27833ff 100644 --- a/src/components/body-d-left/bodyLeftHooks.ts +++ b/src/components/body-d-left/bodyLeftHooks.ts @@ -1,4 +1,5 @@ import { ref } from 'vue'; +import * as echarts from 'echarts'; export const timeTab = [ { @@ -18,6 +19,16 @@ export const timeTab = [ value: '4', }, ]; +export const sexType = [ + { + name: '男', + value: '2', + }, + { + name: '女', + value: '1', + }, +]; export function useSpin() { const spinning = ref(true); @@ -30,4 +41,110 @@ export function useSpin() { spinning, setSpin, }; +} + +export const hospitalList = [ + { + title: '兴隆医院', + key: 'tangdu', + }, + { + title: '泾河医院', + key: 'zhigong', + }, + { + title: '宁夏宝石花医院', + key: 'yangehu', + }, + { + title: '庆阳医院', + key: 'changan', + }, + { + title: '延安市人民医院', + key: 'yananshi', + }, + { + title: '西京医院', + key: 'xijing', + }, +]; + +export function barOption(xData, ydata) { + function maxCount() { + if (ydata.length) { + return Math.max(...ydata) < 5 ? 5 : null; + } else { + return 5; + } + } + + return { + grid: { + top: '18%', + left: '8%', + right: '8%', + bottom: '15%', + }, + tooltip: { + show: true, + textStyle: { + color: '#fff', + }, + backgroundColor: 'rgba(50,50,50,0.7)', + borderColor: '#1b7ef2', + }, + xAxis: { + type: 'category', + data: xData, + axisLabel: { + color: '#FFFFFF', + fontSize: 14, + }, + axisLine: { + color: '#bac9e1', + }, + }, + yAxis: { + name: '次数', + nameTextStyle: { + color: '#fff', + padding: [0, 0, 0, -15], + }, + type: 'value', + axisLabel: { + color: '#FFFFFF', + fontSize: 14, + }, + splitLine: { + show: true, + lineStyle: { + type: 'dashed', + color: 'rgba(217, 231, 255, 0.2)', + }, + }, + min: 0, + max: maxCount(), + }, + series: [ + { + data: ydata, + type: 'bar', + barWidth: '20%', + itemStyle: { + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { offset: 0, color: '#008CFF' }, + { offset: 1, color: '#33CBFE' }, + ]), + }, + barMaxWidth: '10', + label: { + show: true, + position: 'top', + color: '#33CBFE', + fontWeight: 'normal', + }, + }, + ], + }; } \ No newline at end of file diff --git a/src/components/body-d-left/left.api.ts b/src/components/body-d-left/left.api.ts index 564eb3f..a1106b4 100644 --- a/src/components/body-d-left/left.api.ts +++ b/src/components/body-d-left/left.api.ts @@ -1,8 +1,17 @@ -import { get } from '../../api/request'; +import { get } from '/@/api/request'; -enum Api { +export enum Api { + departList = '/sys/sysDepart/allSecondaryDeparts', server = '/health-emergency/emergency/tblUserHelp/statistics', + getDetail = '/health-emergency/emergency/tblHealthData/getDetail', + complaint = '/health-emergency/emergency/tblHelpCenter/sicknessTypeStatistic', } -export const list = (params) => get(Api.server, params); +//获取全部部门 +export const getDepart = (params: any) => get(Api.departList, params); +//服务详情数据 +export const list = (params: any) => get(Api.server, params); //主诉分类 +export const complaint = (params: any) => get(Api.complaint, params); +//体检数据 +export const getDetail = (params: any) => get(Api.getDetail, params); \ No newline at end of file diff --git a/src/components/body-d-left/oneL.vue b/src/components/body-d-left/oneL.vue index 842db7b..d1d2854 100644 --- a/src/components/body-d-left/oneL.vue +++ b/src/components/body-d-left/oneL.vue @@ -32,13 +32,15 @@ const selectIndex = ref(0); const selectVal = ref('1'); const { setSpin, spinning } = useSpin(); + onMounted(() => { getList(); }); async function getList() { + setSpin(true); try { - const { code, result } = (await list({ condition: selectVal.value })) || []; + const { code, result } = (await list({ condition: selectVal.value })) || {}; setSpin(!spinning.value); if (code != 200) { return; diff --git a/src/components/body-d-left/threeL.vue b/src/components/body-d-left/threeL.vue index ef9b078..7feec2c 100644 --- a/src/components/body-d-left/threeL.vue +++ b/src/components/body-d-left/threeL.vue @@ -5,104 +5,111 @@