1.新需求2025.9.19新需求: 去掉"健康监测"副屏, 修改后健康终端报警点击查看详情弹出告警记录分页列表; 去掉【体检人数统计】【体检数据】【健康打卡数据】,增加【心血管监测】模块功能,【心血管监测】功能将原心血管监测大屏上的内容整理并移动到急救服务平台大屏中; 员工求助时,地图中推荐两个医院、两个健康小屋、两个AED坐标信息,并按距离排序,体现距离远近顺序; 地图中油田医院、健康小屋等各个图例,显示总数信息; 救护车坐标信息维护,并在大屏上标记; 右上角"增加【救助信息】板块, 当出现应急弹窗后或从今日应急选中应急事件 , 该板块需展示应急事件的相关信息(开发中);
106 lines
2.8 KiB
Vue
106 lines
2.8 KiB
Vue
<template>
|
|
<div class="pie-container self">
|
|
<div class="inner" ref="healthChart"></div>
|
|
<div class="count">
|
|
<div class="t">总人数</div>
|
|
<div class="v">{{ total }}</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
<script setup lang="ts">
|
|
import { ref, watch } from 'vue';
|
|
import * as echarts from 'echarts';
|
|
import { useStep } from '/@/components/secondaryScreen/screen-right/screenRightHooks.ts';
|
|
import { screenPie } from '/@/views/indexSun/threeLeftNewItem/pieCharts.ts';
|
|
import { getStepNew } from '/@/components/secondaryScreen/commonApi.ts';
|
|
import { caching, useSession } from '/@/hooks/autoRefresh/caching.ts';
|
|
|
|
const props = defineProps({
|
|
orgCode: String,
|
|
type: String,
|
|
themeType: String,
|
|
});
|
|
const { setSession, getSession } = useSession();
|
|
const { PAGE2_RIGHT2 } = caching;
|
|
watch(
|
|
props,
|
|
() => {
|
|
init();
|
|
},
|
|
{ immediate: true, deep: true }
|
|
);
|
|
const healthChart = ref<HTMLElement>();
|
|
const { total, setStep, getStepData } = useStep();
|
|
|
|
async function init() {
|
|
try {
|
|
const params = {
|
|
orgCode: props.orgCode,
|
|
type: props.type,
|
|
};
|
|
// const { code, result } = await getStep(params);
|
|
const { code, result } = await getStepNew(params);
|
|
if (code == 200) {
|
|
setValue(result);
|
|
setSession(PAGE2_RIGHT2, JSON.stringify(result));
|
|
}
|
|
} catch {
|
|
const result = JSON.parse(getSession(PAGE2_RIGHT2));
|
|
setValue(result);
|
|
}
|
|
}
|
|
|
|
function setValue(result: any) {
|
|
setStep(result);
|
|
initChart(getStepData());
|
|
}
|
|
|
|
function initChart(chartData: any) {
|
|
let myChart = echarts.init(healthChart.value);
|
|
let options = screenPie(chartData);
|
|
myChart.setOption(options);
|
|
window.addEventListener('resize', () => {
|
|
myChart.resize();
|
|
});
|
|
}
|
|
</script>
|
|
<style scoped lang="less">
|
|
.inner {
|
|
width: 100%;
|
|
margin: 0 auto;
|
|
height: 100%;
|
|
}
|
|
|
|
.pie-container.self {
|
|
position: relative;
|
|
padding-bottom: 0 !important;
|
|
}
|
|
|
|
.count {
|
|
position: absolute;
|
|
bottom: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
color: #fff;
|
|
font-size: 22px;
|
|
font-weight: bold;
|
|
z-index: 1;
|
|
pointer-events: none;
|
|
|
|
> div {
|
|
width: 80px;
|
|
text-align: center;
|
|
z-index: 0;
|
|
}
|
|
|
|
.t {
|
|
font-size: 14px;
|
|
font-weight: normal;
|
|
}
|
|
}
|
|
</style>
|