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

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

Loading…
Cancel
Save