fix: 运营监控ASA分级bug修复

main
weiyin 10 months ago
parent a7c062c4c3
commit 818f4dc092

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 19 KiB

@ -15,7 +15,8 @@
:getDataList="getDataList"
></Histogram>
<div v-else class="flex w-[100%] h-[100%] items-center justify-center">
暂无数据
<!-- 暂无数据 -->
<img src="@/assets/svg/noData.svg" />
</div>
</div>
<div

@ -1,17 +1,23 @@
<template>
<div class="w-[71.58vh] h-[40.09vh] bgBottomMidBox mt-[2.68vh] relative">
<div class="flex">
<div class="w-[12.4vh] h-[5.07vh] ml-[1.85vh] flex justify-between items-center">
<div
class="w-[12.4vh] h-[5.07vh] ml-[1.85vh] flex justify-between items-center"
>
<img src="@/assets/svg/Monitor/Triangle.svg" />
<span class="text-[2.03vh] youshe leading-none">手术等级</span>
</div>
<div class="w-[12.4vh] h-[5.07vh] ml-[27vh] flex justify-between items-center">
<div
class="w-[12.4vh] h-[5.07vh] ml-[27vh] flex justify-between items-center"
>
<img src="@/assets/svg/Monitor/Triangle.svg" />
<span class="text-[2.03vh] youshe leading-none">ASA分级</span>
</div>
</div>
<section class="flex mt-[4.81vh]">
<div class="w-[35.79vh] h-[24.62vh] border-r border-dashed border-r-[rgba(255,255,255,0.26)]">
<div
class="w-[35.79vh] h-[24.62vh] border-r border-dashed border-r-[rgba(255,255,255,0.26)]"
>
<div class="h-full" ref="echartsContainerLeft"></div>
</div>
<div class="w-[35.79vh] h-[24.62vh]">
@ -22,10 +28,13 @@
</template>
<script>
import * as echarts from 'echarts';
import { GetMonitorOperationLevel, GetMonitorOperationASALevel } from '@/api/monitor';
import { fnR } from '@/utils/common';
import dayjs from 'dayjs';
import * as echarts from "echarts";
import {
GetMonitorOperationLevel,
GetMonitorOperationASALevel,
} from "@/api/monitor";
import { fnR } from "@/utils/common";
import dayjs from "dayjs";
let chartLeft = null;
let chartRight = null;
@ -36,18 +45,18 @@ export default {
chartOptionsLeft: {
series: [
{
type: 'pie',
radius: ['32%', '50%'],
selectedMode: 'single',
type: "pie",
radius: ["32%", "50%"],
selectedMode: "single",
data: [
{ name: '一级', value: 148, selected: false },
{ name: '二级', value: 87, selected: false },
{ name: '三级', value: 75, selected: false },
{ name: '四级', value: 40, selected: false },
{ name: "一级", value: 148, selected: false },
{ name: "二级", value: 87, selected: false },
{ name: "三级", value: 75, selected: false },
{ name: "四级", value: 40, selected: false },
],
label: {
formatter: '{b}{c}',
color: 'inherit',
formatter: "{b}{c}",
color: "inherit",
},
},
],
@ -55,39 +64,47 @@ export default {
chartOptionsRight: {
series: [
{
type: 'pie',
radius: ['32%', '50%'],
selectedMode: 'single',
type: "pie",
radius: ["32%", "50%"],
selectedMode: "single",
data: [
{ name: 'I级', value: 137, selected: false },
{ name: 'II级', value: 105, selected: false },
{ name: 'III级', value: 58, selected: false },
{ name: 'IV级', value: 37, selected: false },
{ name: 'V级', value: 13, selected: false },
{ name: "I级", value: 137, selected: false },
{ name: "II级", value: 105, selected: false },
{ name: "III级", value: 58, selected: false },
{ name: "IV级", value: 37, selected: false },
{ name: "V级", value: 13, selected: false },
],
label: {
formatter: '{b}{c}',
color: 'inherit',
formatter: "{b}{c}",
color: "inherit",
},
},
],
},
toDate: dayjs().format('YYYY-MM-DD'),
toDate: dayjs("2024-06-06").format("YYYY-MM-DD"),
};
},
methods: {
onGetPageData() {
this.isLoading = true;
Promise.all([GetMonitorOperationLevel(this.toDate), GetMonitorOperationASALevel(this.toDate)]).then(res => {
this.chartOptionsLeft.series[0].data[0].value = res[0]['level1'];
this.chartOptionsLeft.series[0].data[1].value = res[0]['level2'];
this.chartOptionsLeft.series[0].data[2].value = res[0]['level3'];
this.chartOptionsLeft.series[0].data[3].value = res[0]['level4'];
this.chartOptionsRight.series[0].data[0].value = res[1]['asaLevel1'];
this.chartOptionsRight.series[0].data[1].value = res[1]['asaLevel2'];
this.chartOptionsRight.series[0].data[2].value = res[1]['asaLevel3'];
this.chartOptionsRight.series[0].data[3].value = res[1]['asaLevel4'];
this.chartOptionsRight.series[0].data[4].value = res[1]['asaLevel5'];
Promise.all([
GetMonitorOperationLevel(this.toDate),
GetMonitorOperationASALevel(this.toDate),
]).then((res) => {
this.chartOptionsLeft.series[0].data[0].value = res[0].data["level1"];
this.chartOptionsLeft.series[0].data[1].value = res[0].data["level2"];
this.chartOptionsLeft.series[0].data[2].value = res[0].data["level3"];
this.chartOptionsLeft.series[0].data[3].value = res[0].data["level4"];
this.chartOptionsRight.series[0].data[0].value =
res[1].data["asaLevel1"];
this.chartOptionsRight.series[0].data[1].value =
res[1].data["asaLevel2"];
this.chartOptionsRight.series[0].data[2].value =
res[1].data["asaLevel3"];
this.chartOptionsRight.series[0].data[3].value =
res[1].data["asaLevel4"];
this.chartOptionsRight.series[0].data[4].value =
res[1].data["asaLevel5"];
if (this.$store.getters.isMock) {
this.chartOptionsLeft.series[0].data[0].value = fnR();
this.chartOptionsLeft.series[0].data[1].value = fnR();
@ -117,7 +134,7 @@ export default {
<style>
.bgBottomMidBox {
background-image: url('@/assets/svg/Monitor/BottomMid/Box.svg');
background-image: url("@/assets/svg/Monitor/BottomMid/Box.svg");
background-size: contain;
background-position: center;
background-repeat: no-repeat;

Loading…
Cancel
Save