update 调整银川大屏和西安大屏

This commit is contained in:
zk
2024-05-17 13:07:39 +08:00
parent 45aec85fad
commit 13faaa92a6
15 changed files with 145 additions and 88 deletions
+44 -35
View File
@@ -1,6 +1,14 @@
import { ref, unref } from 'vue';
import * as echarts from 'echarts';
//服务详情数据弹窗参数
export enum ServerDetailType {
gross = '0', //最新呼入电话
alerdyreceive = '1', //最新受理电话
jqqz = '2', //突发重大伤病应急
dbjy = '3', //重大伤病应急就医
}
export function useStatistics() {
const statistics = ref([
{
@@ -90,36 +98,36 @@ export function useSpin() {
}
export const hospitalList = [
{
name: '泾河医院',
key: 'zhigong',
value: 0,
},
{
name: '兴隆医院',
key: 'tangdu',
value: 0,
},
{
name: '宁夏宝石花医院',
key: 'yangehu',
value: 0,
},
{
name: '延安市人民医院',
key: 'yananshi',
value: 0,
},
{
name: '西京医院',
key: 'xijing',
value: 0,
},
{
name: '庆阳医院',
key: 'changan',
value: 0,
},
// {
// name: '泾河医院',
// key: 'zhigong',
// value: 0,
// },
// {
// name: '兴隆医院',
// key: 'tangdu',
// value: 0,
// },
// {
// name: '宁夏宝石花医院',
// key: 'yangehu',
// value: 0,
// },
// {
// name: '延安市人民医院',
// key: 'yananshi',
// value: 0,
// },
// {
// name: '西京医院',
// key: 'xijing',
// value: 0,
// },
// {
// name: '庆阳医院',
// key: 'changan',
// value: 0,
// },
];
export function useHospitalList() {
@@ -129,11 +137,12 @@ export function useHospitalList() {
return unref(radarList);
}
function setRadarList(res = {}) {
radarList.value.forEach((item) => {
const { key } = item;
item.value = res[key] || 0;
});
function setRadarList(res) {
radarList.value = res;
// radarList.value.forEach((item) => {
// const { key } = item;
// item.value = res[key] || 0;
// });
}
return {
+2 -2
View File
@@ -3,7 +3,7 @@ import { get } from '/@/api/request';
export enum Api {
departList = '/sys/sysDepart/allSecondaryDeparts',
server = '/health-emergency/emergency/tblUserHelp/statistics',
getDetail = '/health-emergency/emergency/tblHealthData/getDetail',
getDetail = '/health-medical/medical/hospital/getMedicalHospital',
complaint = '/health-emergency/emergency/tblHelpCenter/sicknessTypeStatistic',
}
@@ -14,4 +14,4 @@ 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);
export const getDetail = (params: any) => get(Api.getDetail, params);
+6 -6
View File
@@ -54,13 +54,13 @@
async function getList() {
setSpin(true);
try {
const { code, result } = (await getDetail({})) || {};
const { code, result } = (await getDetail({ dataType: props.setting.dataType })) || {};
setSpin(!spinning.value);
if (code != 200 || !Array.isArray(result)) {
if (code != 200) {
return;
}
setSession(LEFT_KEY3, JSON.stringify(result[0]));
setValue(result[0]);
setSession(LEFT_KEY3, JSON.stringify(result));
setValue(result);
} catch {
const result = JSON.parse(getSession(LEFT_KEY3));
setValue(result);
@@ -76,9 +76,9 @@
function initChart() {
const myChart = echarts.init(document.querySelector('.RadarCharts'));
let countList = radarList.value.map((item) => item.value);
let countList = radarList.value.map((item) => item?.userCount);
let max = Math.max(...countList);
const indicator = radarList.value.map((item) => ({ name: item.name, max: max }));
const indicator = radarList.value.map((item) => ({ name: item?.hospitalName, max: max }));
const option = radarCharts({ indicator, countList });
myChart.setOption(option);
window.addEventListener('resize', () => {
+16 -3
View File
@@ -1,7 +1,7 @@
<template>
<div>
<public-title title="主诉分类" />
<div class="inner">
<div class="zc-inner">
<div class="title">
<div class="type-check">
<span
@@ -24,7 +24,7 @@
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, watch } from 'vue';
import { ref, onMounted, watch, onUnmounted } from 'vue';
import PublicTitle from '/@/components/publicTitle.vue';
import * as echarts from 'echarts';
import { complaint, getDepart } from '/@/components/body-d-left/left.api.ts';
@@ -51,8 +51,20 @@
}
onMounted(() => {
document.addEventListener('visibilitychange', checkTabState);
init();
});
onUnmounted(() => {
document.removeEventListener('visibilitychange', checkTabState);
});
const tabState = ref('');
function checkTabState() {
console.log('checkTabState', document.hidden);
tabState.value = document.hidden ? 'inactive' : 'active';
if (!document.hidden) {
}
}
function init() {
getDepartOption();
@@ -112,8 +124,9 @@
}
</script>
<style scoped lang="less">
.inner {
.zc-inner {
position: relative;
width: 100%;
height: calc(100% - 40px);
.spin {