update:大屏调整
This commit is contained in:
@@ -18,13 +18,6 @@
|
||||
</div>
|
||||
</vue3-seamless-scroll>
|
||||
</div>
|
||||
<!-- <Dialog :openVis="open" width="65%" title="健康终端报警列表" @close="handleClose">-->
|
||||
<!-- <template #container>-->
|
||||
<!-- <div class="dialog-con">-->
|
||||
<!-- <a-table :dataSource="dataSource" :columns="columns" :scroll="{ y: '56vh' }" :pagination="false" />-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- </Dialog>-->
|
||||
<Dialog :openVis="openInfor" width="30%" title="健康报警员工信息" @close="handlePoliceClose">
|
||||
<template #container>
|
||||
<div class="police-con">
|
||||
@@ -60,19 +53,20 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import $bus from '/@/utils/bus.ts';
|
||||
import { columns } from '/@/components/body-d-right/bodyRightHooks.ts';
|
||||
import PublicTitle from '/@/components/publicTitle.vue';
|
||||
import Dialog from '/@/components/dialog/Dialog.vue';
|
||||
import { Vue3SeamlessScroll } from 'vue3-seamless-scroll';
|
||||
import { getMonitorList } from '/@/components/body-d-right/right.api.ts';
|
||||
import { Map } from '/@/assets/mapUtils/map.ts';
|
||||
import { caching, useSession } from '/@/hooks/autoRefresh/caching.ts';
|
||||
|
||||
const router = useRouter();
|
||||
const { setSession, getSession } = useSession();
|
||||
const { RIGHT_KEY1 } = caching;
|
||||
|
||||
const classOption = ref({
|
||||
step: 0.3, // 速度
|
||||
});
|
||||
const open = ref<boolean>(false);
|
||||
const openInfor = ref<boolean>(false);
|
||||
const userInfo = ref({
|
||||
realName: '',
|
||||
@@ -83,15 +77,6 @@
|
||||
address: '',
|
||||
});
|
||||
|
||||
const dataSource = ref([
|
||||
{
|
||||
key: '1',
|
||||
name: '胡彦斌',
|
||||
age: 32,
|
||||
address: '西湖区湖底公园1号',
|
||||
},
|
||||
]);
|
||||
|
||||
/**
|
||||
* @desc open员工信息
|
||||
*/
|
||||
@@ -119,9 +104,14 @@
|
||||
const scrollList = ref([]);
|
||||
|
||||
async function getScrollList() {
|
||||
const { code, result } = await getMonitorList({ pageSize: 10, pageNo: 1 });
|
||||
if (code == 200) {
|
||||
scrollList.value = result.records;
|
||||
try {
|
||||
const { code, result } = await getMonitorList({ pageSize: 10, pageNo: 1 });
|
||||
if (code == 200) {
|
||||
setSession(RIGHT_KEY1, JSON.stringify(result.records));
|
||||
scrollList.value = result.records;
|
||||
}
|
||||
} catch {
|
||||
scrollList.value = JSON.parse(getSession(RIGHT_KEY1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,10 @@
|
||||
import { getHealthDataList } from '/@/components/body-d-right/right.api';
|
||||
import { useSpin } from '/@/components/body-d-left/bodyLeftHooks.ts';
|
||||
import { ringOption, useHealth } from '/@/components/body-d-right/bodyRightHooks.ts';
|
||||
import { useSession, caching } from '/@/hooks/autoRefresh/caching.ts';
|
||||
|
||||
const { setSession, getSession } = useSession();
|
||||
const { RIGHT_KEY2 } = caching;
|
||||
const { setSpin, spinning } = useSpin();
|
||||
const healthChart = ref<HTMLElement>();
|
||||
onMounted(() => {
|
||||
@@ -26,15 +29,21 @@
|
||||
if (code != 200) {
|
||||
return;
|
||||
}
|
||||
setHealth(result);
|
||||
const yData = unref(getValue);
|
||||
let total = yData.reduce((accumulator, currentValue) => Number(accumulator) + Number(currentValue), 0);
|
||||
initChart(unref(healthData), total);
|
||||
setSession(RIGHT_KEY2, JSON.stringify(result));
|
||||
setValue(result);
|
||||
} catch {
|
||||
initChart(unref(healthData), 0);
|
||||
const result = JSON.parse(getSession(RIGHT_KEY2));
|
||||
setValue(result);
|
||||
}
|
||||
}
|
||||
|
||||
function setValue(result) {
|
||||
setHealth(result);
|
||||
const yData = unref(getValue);
|
||||
let total = yData.reduce((accumulator, currentValue) => Number(accumulator) + Number(currentValue), 0);
|
||||
initChart(unref(healthData), total);
|
||||
}
|
||||
|
||||
function initChart(chartData, total) {
|
||||
let myChart = echarts.init(healthChart.value);
|
||||
let options = ringOption(chartData, total);
|
||||
|
||||
Reference in New Issue
Block a user