fix: 部分文件中接口调试及界面呈现调整

main
weiyin 1 year ago
parent a0bb9d5927
commit 3eb9b174c6

1
.gitignore vendored

@ -1,6 +1,7 @@
.DS_Store .DS_Store
node_modules node_modules
/dist /dist
/.history
# local env files # local env files

@ -1,11 +1,11 @@
import _axios from '@/utils/_axios'; import _axios from "@/utils/_axios";
/** /**
* 获取手术总量(左上角) * 获取手术总量(左上角)
*/ */
export const GetMonitorOperationCount = date => { export const GetMonitorOperationCount = (date) => {
return _axios({ return _axios({
url: '/api/QualityMicroservice/Monitor/GetMonitorOperationCount', url: "/api/QualityMicroservice/Monitor/GetMonitorOperationCount",
params: { params: {
date, date,
}, },
@ -15,9 +15,9 @@ export const GetMonitorOperationCount = date => {
/** /**
* 获取术间状态(右上角) * 获取术间状态(右上角)
*/ */
export const GetMonitorOperationRoomStatus = date => { export const GetMonitorOperationRoomStatus = (date) => {
return _axios({ return _axios({
url: '/api/QualityMicroservice/Monitor/GetMonitorOperationRoomStatus', url: "/api/QualityMicroservice/Monitor/GetMonitorOperationRoomStatus",
params: { params: {
date, date,
}, },
@ -27,9 +27,9 @@ export const GetMonitorOperationRoomStatus = date => {
/** /**
* 获取手术量统计(左下角) * 获取手术量统计(左下角)
*/ */
export const GetMonitorOperationNumber = data => { export const GetMonitorOperationNumber = (data) => {
return _axios({ return _axios({
url: '/api/QualityMicroservice/Monitor/GetMonitorOperationNumber', url: "/api/QualityMicroservice/Monitor/GetMonitorOperationNumber",
params: data, params: data,
}); });
}; };
@ -37,9 +37,9 @@ export const GetMonitorOperationNumber = data => {
/** /**
* 获取手术级别统计(下中左) * 获取手术级别统计(下中左)
*/ */
export const GetMonitorOperationLevel = date => { export const GetMonitorOperationLevel = (date) => {
return _axios({ return _axios({
url: '/api/QualityMicroservice/Monitor/GetMonitorOperationLevel', url: "/api/QualityMicroservice/Monitor/GetMonitorOperationLevel",
params: { params: {
date, date,
}, },
@ -49,9 +49,9 @@ export const GetMonitorOperationLevel = date => {
/** /**
* 获取ASA级别(下中右) * 获取ASA级别(下中右)
*/ */
export const GetMonitorOperationASALevel = date => { export const GetMonitorOperationASALevel = (date) => {
return _axios({ return _axios({
url: '/api/QualityMicroservice/Monitor/GetMonitorOperationASALevel', url: "/api/QualityMicroservice/Monitor/GetMonitorOperationASALevel",
params: { params: {
date, date,
}, },
@ -61,9 +61,9 @@ export const GetMonitorOperationASALevel = date => {
/** /**
* 获取ASA级别(右下角) * 获取ASA级别(右下角)
*/ */
export const GetMonitorOperationDept = data => { export const GetMonitorOperationDept = (data) => {
return _axios({ return _axios({
url: '/api/QualityMicroservice/Monitor/GetMonitorOperationDept', url: "/api/QualityMicroservice/Monitor/GetMonitorOperationDept",
params: data, params: data,
}); });
}; };

@ -1,22 +1,45 @@
<template> <template>
<div class="w-[41.75vh] h-[40.09vh] bgBottomRightBox mt-[2.68vh] relative" v-loading="isLoading"> <div
<div class="w-[20.8vh] h-[5.07vh] ml-[1.85vh] flex justify-between items-center"> class="w-[41.75vh] h-[40.09vh] bgBottomRightBox mt-[2.68vh] relative"
v-loading="isLoading"
>
<div
class="w-[20.8vh] 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-[35.46vh] h-[28.05vh] ml-[2.4vh] my-[3.7vh]" ref="echartsContainer"></div> <div
<div class="absolute right-0 top-1/4 w-[3.51vh] h-[12.6vh]" :class="sliderClass"> class="w-[35.46vh] h-[28.05vh] ml-[2.4vh] my-[3.7vh]"
<div class="h-[6.3vh] leading-[6.3vh] text-center text-[#C0D3E1] cursor-pointer" @click="toWeek"></div> ref="echartsContainer"
<div class="h-[6.3vh] leading-[6.3vh] text-center text-[#C0D3E1] cursor-pointer" @click="toMonth"></div> ></div>
<div
class="absolute right-0 top-1/4 w-[3.51vh] h-[12.6vh]"
:class="sliderClass"
>
<div
class="h-[6.3vh] leading-[6.3vh] text-center text-[#C0D3E1] cursor-pointer"
@click="toWeek"
>
</div>
<div
class="h-[6.3vh] leading-[6.3vh] text-center text-[#C0D3E1] cursor-pointer"
@click="toMonth"
>
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import * as echarts from 'echarts'; import * as echarts from "echarts";
import { GetMonitorOperationDept } from '@/api/monitor'; import { GetMonitorOperationDept } from "@/api/monitor";
import { fnR } from '@/utils/common'; import { fnR } from "@/utils/common";
import dayjs from 'dayjs'; import dayjs from "dayjs";
let chartLeft = null; let chartLeft = null;
export default { export default {
@ -24,53 +47,88 @@ export default {
return { return {
chartOptions: { chartOptions: {
grid: { grid: {
left: '0%', left: "0%",
right: '0%', right: "0%",
top: '0%', top: "0%",
bottom: '10%', bottom: "10%",
}, },
xAxis: { xAxis: {
type: 'category', type: "category",
data: ['骨科', '心胸外科', '普通外科', '神经外科', '整形外科'], data: ["骨科", "心胸外科", "普通外科", "神经外科", "整形外科"],
}, },
yAxis: { yAxis: {
type: 'value', type: "value",
}, },
series: [ series: [
{ {
data: [180, 165, 155, 148, 137], data: [180, 165, 155, 148, 137],
type: 'bar', type: "bar",
barWidth: '10%', barWidth: "10%",
}, },
], ],
}, },
startDate: dayjs().subtract(7, 'day').format('YYYY-MM-DD'), emptyOptions: {
endDate: dayjs().format('YYYY-MM-DD'), title: {
text: "暂无数据",
x: "center",
y: "center",
textStyle: {
color: "#fff",
fontWeight: "normal",
fontSize: 16,
},
},
},
startDate: dayjs().subtract(7, "day").format("YYYY-MM-DD"),
endDate: dayjs().format("YYYY-MM-DD"),
sliderClass: { sliderClass: {
bgWeekBox: true, bgWeekBox: true,
bgMonthBox: false, bgMonthBox: false,
}, },
renderTimer: null, renderTimer: null,
isLoading: true, isLoading: true,
getDataList: [],
}; };
}, },
methods: { methods: {
onGetPageData() { onGetPageData() {
chartLeft.clear(); //
this.isLoading = true; this.isLoading = true;
GetMonitorOperationDept({ startDate: this.startDate, endDate: this.endDate }).then(res => { GetMonitorOperationDept({
if (res['data']['length']) { startDate: this.startDate,
endDate: this.endDate,
}).then((res) => {
this.getDataList = res["data"] || [];
if (this.getDataList.length) {
this.chartOptions.xAxis.data = []; this.chartOptions.xAxis.data = [];
this.chartOptions.series[0].data = []; this.chartOptions.series[0].data = [];
res['data'].forEach(item => { res["data"].forEach((item) => {
this.chartOptions.xAxis.data.push(item['deptName']); this.chartOptions.xAxis.data.push(item["deptName"]);
this.chartOptions.series[0].data.push(item['deptCount']); this.chartOptions.series[0].data.push(item["deptCount"]);
}); });
} else { } else {
if (this.$store.getters.isMock) { if (this.$store.getters.isMock) {
this.chartOptions.xAxis.data = ['骨科', '心胸外科', '普通外科', '神经外科', '整形外科']; this.chartOptions.xAxis.data = [
this.chartOptions.series[0].data = [fnR(), fnR(), fnR(), fnR(), fnR()].sort((a, b) => { "骨科",
"心胸外科",
"普通外科",
"神经外科",
"整形外科",
];
this.chartOptions.series[0].data = [
fnR(),
fnR(),
fnR(),
fnR(),
fnR(),
].sort((a, b) => {
return b - a; return b - a;
}); });
} else {
//
this.chartOptions.xAxis.data = [];
this.chartOptions.series[0].data = [];
chartLeft.setOption(this.emptyOptions);
} }
} }
this.isLoading = false; this.isLoading = false;
@ -78,21 +136,21 @@ export default {
}); });
}, },
toWeek() { toWeek() {
this.startDate = dayjs().subtract(7, 'day').format('YYYY-MM-DD'); this.startDate = dayjs().subtract(7, "day").format("YYYY-MM-DD");
this.sliderClass.bgWeekBox = true; this.sliderClass.bgWeekBox = true;
this.sliderClass.bgMonthBox = false; this.sliderClass.bgMonthBox = false;
this.onGetPageData(); this.onGetPageData();
}, },
toMonth() { toMonth() {
this.startDate = dayjs().subtract(30, 'day').format('YYYY-MM-DD'); this.startDate = dayjs().subtract(30, "day").format("YYYY-MM-DD");
this.sliderClass.bgWeekBox = false; this.sliderClass.bgWeekBox = false;
this.sliderClass.bgMonthBox = true; this.sliderClass.bgMonthBox = true;
this.onGetPageData(); this.onGetPageData();
}, },
}, },
mounted() { mounted() {
this.onGetPageData();
chartLeft = echarts.init(this.$refs.echartsContainer); chartLeft = echarts.init(this.$refs.echartsContainer);
this.onGetPageData();
chartLeft.setOption(this.chartOptions); chartLeft.setOption(this.chartOptions);
this.renderTimer = setInterval(() => { this.renderTimer = setInterval(() => {
if (this.sliderClass.bgWeekBox) { if (this.sliderClass.bgWeekBox) {
@ -110,18 +168,18 @@ export default {
<style> <style>
.bgBottomRightBox { .bgBottomRightBox {
background-image: url('@/assets/svg/Monitor/BottomRight/Box.svg'); background-image: url("@/assets/svg/Monitor/BottomRight/Box.svg");
background-size: contain; background-size: contain;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.bgWeekBox { .bgWeekBox {
background-image: url('@/assets/svg/Monitor/BottomLeft/WeekActive.svg'); background-image: url("@/assets/svg/Monitor/BottomLeft/WeekActive.svg");
background-size: contain; background-size: contain;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.bgMonthBox { .bgMonthBox {
background-image: url('@/assets/svg/Monitor/BottomLeft/MonthActive.svg'); background-image: url("@/assets/svg/Monitor/BottomLeft/MonthActive.svg");
} }
</style> </style>

@ -1,34 +1,62 @@
<template> <template>
<div class="w-[51.29vh] h-[39.62vh] bgTopLeftBox bg-contain bg-center bg-no-repeat p-[3vh] box-border" v-loading="isLoading"> <div
class="w-[51.29vh] h-[39.62vh] bgTopLeftBox bg-contain bg-center bg-no-repeat p-[3vh] box-border"
v-loading="isLoading"
>
<section class="flex justify-between"> <section class="flex justify-between">
<template v-for="(item, index) in overviewData"> <template v-for="(item, index) in overviewData">
<div class="w-[12.96vh] h-[14.81vh] bgTopLeftItemBox bg-contain bg-no-repeat pl-[1.48vh] py-[0.92vh]" :key="index"> <div
class="w-[12.96vh] h-[14.81vh] bgTopLeftItemBox bg-contain bg-no-repeat pl-[1.48vh] py-[0.92vh]"
:key="index"
>
<img src="@/assets/svg/Monitor/TopLeft/TriangleBlue.svg" /> <img src="@/assets/svg/Monitor/TopLeft/TriangleBlue.svg" />
<p class="tracking-[0.27vh] text-[1.48vh] leading-none mt-[2vh] mb-[2vh] opacity-80">{{ item['itemName'] }}</p> <p
class="tracking-[0.27vh] text-[1.48vh] leading-none mt-[2vh] mb-[2vh] opacity-80"
>
{{ item["itemName"] }}
</p>
<p class=""> <p class="">
<span class="text-[4.25vh] youshe text-[#733FF3] leading-none">{{ item['itemVal'] }}</span> <span class="text-[4.25vh] youshe text-[#733FF3] leading-none">{{
<span class="text-[2.22vh] youshe text-[#733FF3] leading-none">{{ item['itemUnit'] }}</span> item["itemVal"]
}}</span>
<span class="text-[2.22vh] youshe text-[#733FF3] leading-none">{{
item["itemUnit"]
}}</span>
</p> </p>
</div> </div>
</template> </template>
</section> </section>
<div class="w-[45.18vh] h-[14.81vh] bgTopLeftItemBoxPurple bg-contain bg-no-repeat mt-[3.7vh] px-[2.96vh] py-[2.4vh] flex justify-between items-center"> <div
class="w-[45.18vh] h-[14.81vh] bgTopLeftItemBoxPurple bg-contain bg-no-repeat mt-[3.7vh] px-[2.96vh] py-[2.4vh] flex justify-between items-center"
>
<section> <section>
<div class="flex"> <div class="flex">
<img src="@/assets/svg/Monitor/TopLeft/TrianglePurple.svg" /> <img src="@/assets/svg/Monitor/TopLeft/TrianglePurple.svg" />
<span class="youshe text-[1.75vh] ml-[1.11vh] opacity-80">总人数</span> <span class="youshe text-[1.75vh] ml-[1.11vh] opacity-80"
>总人数</span
>
</div> </div>
<p class="text-[#B53FDF] text-[4.07vh] mt-[1.4vh] youshe leading-none">{{ totalPopulation }}</p> <p class="text-[#B53FDF] text-[4.07vh] mt-[1.4vh] youshe leading-none">
{{ totalPopulation }}
</p>
</section> </section>
<section> <section>
<template v-for="(item, index) in peopleData"> <template v-for="(item, index) in peopleData">
<div class="w-[25.55vh] h-[4.07vh] peopleItemBox px-[2.22vh] flex justify-between items-center" :class="!index && 'mb-[1.85vh]'" :key="index"> <div
class="w-[25.55vh] h-[4.07vh] peopleItemBox px-[2.22vh] flex justify-between items-center"
:class="!index && 'mb-[1.85vh]'"
:key="index"
>
<div class="flex items-end"> <div class="flex items-end">
<img src="@/assets/svg/Monitor/TopLeft/PointPurple.svg" /> <img src="@/assets/svg/Monitor/TopLeft/PointPurple.svg" />
<span class="text-[1.48vh] opacity-80 ml-[0.74vh]">{{ item['itemName'] }}</span> <span class="text-[1.48vh] opacity-80 ml-[0.74vh]">{{
item["itemName"]
}}</span>
</div> </div>
<div class="flex items-center"> <div class="flex items-center">
<span class="text-[#B53FDF] text-[2.4vh] youshe">{{ item['itemVal'] }}</span> <span class="text-[#B53FDF] text-[2.4vh] youshe">{{
item["itemVal"]
}}</span>
<span class="text-[1.11vh] opacity-65 ml-[0.74vh]"></span> <span class="text-[1.11vh] opacity-65 ml-[0.74vh]"></span>
</div> </div>
</div> </div>
@ -39,36 +67,36 @@
</template> </template>
<script> <script>
import { GetMonitorOperationCount } from '@/api/monitor'; import { GetMonitorOperationCount } from "@/api/monitor";
import dayjs from 'dayjs'; import dayjs from "dayjs";
export default { export default {
data() { data() {
return { return {
overviewData: [ overviewData: [
{ {
itemName: '首台准点率', itemName: "首台准点率",
itemVal: '0', itemVal: "0",
itemUnit: '%', itemUnit: "%",
}, },
{ {
itemName: '手术间利用率', itemName: "手术间利用率",
itemVal: '0', itemVal: "0",
itemUnit: '%', itemUnit: "%",
}, },
{ {
itemName: '急诊患者', itemName: "急诊患者",
itemVal: '0', itemVal: "0",
itemUnit: '个', itemUnit: "个",
}, },
], ],
peopleData: [ peopleData: [
{ {
itemName: '进行中', itemName: "进行中",
itemVal: '50', itemVal: "50",
}, },
{ {
itemName: '待进行', itemName: "待进行",
itemVal: '300', itemVal: "300",
}, },
], ],
totalPopulation: 0, totalPopulation: 0,
@ -77,17 +105,25 @@ export default {
}, },
methods: { methods: {
onGetPageData() { onGetPageData() {
let nowDay = dayjs().format('YYYY-MM-DD'); let nowDay = dayjs().format("YYYY-MM-DD");
if (this.$store.getters.isMock) { if (this.$store.getters.isMock) {
nowDay = '2024-06-06'; nowDay = "2024-06-06";
} }
GetMonitorOperationCount(nowDay).then(res => { GetMonitorOperationCount(nowDay).then((res) => {
this.overviewData[0]['itemVal'] = res['data']['firstPunctualityRate'].slice(0, -1); if (!res.data) {
this.overviewData[1]['itemVal'] = res['data']['roomUserRate'].slice(0, -1); return;
this.overviewData[2]['itemVal'] = res['data']['patEmergencyCount']; }
this.totalPopulation = res['data']['patCount']; this.overviewData[0]["itemVal"] = res["data"][
this.peopleData[0]['itemVal'] = res['data']['patOperationing']; "firstPunctualityRate"
this.peopleData[1]['itemVal'] = res['data']['patWating']; ].slice(0, -1);
this.overviewData[1]["itemVal"] = res["data"]["roomUserRate"].slice(
0,
-1
);
this.overviewData[2]["itemVal"] = res["data"]["patEmergencyCount"];
this.totalPopulation = res["data"]["patCount"];
this.peopleData[0]["itemVal"] = res["data"]["patOperationing"];
this.peopleData[1]["itemVal"] = res["data"]["patWating"];
this.isLoading = false; this.isLoading = false;
}); });
}, },
@ -100,17 +136,26 @@ export default {
<style> <style>
.bgTopLeftBox { .bgTopLeftBox {
background-image: url('@/assets/svg/Monitor/TopLeft/Box.svg'); background-image: url("@/assets/svg/Monitor/TopLeft/Box.svg");
} }
.bgTopLeftItemBox { .bgTopLeftItemBox {
background-image: url('@/assets/svg/Monitor/TopLeft/ItemBox.svg'); background-image: url("@/assets/svg/Monitor/TopLeft/ItemBox.svg");
} }
.bgTopLeftItemBoxPurple { .bgTopLeftItemBoxPurple {
background-image: url('@/assets/svg/Monitor/TopLeft/ItemBoxPurple.svg'); background-image: url("@/assets/svg/Monitor/TopLeft/ItemBoxPurple.svg");
} }
.peopleItemBox { .peopleItemBox {
background: linear-gradient(271deg, rgba(85, 255, 212, 0.045) 2%, rgba(35, 150, 121, 0.066) 99%); background: linear-gradient(
271deg,
rgba(85, 255, 212, 0.045) 2%,
rgba(35, 150, 121, 0.066) 99%
);
border: 1.5px solid; border: 1.5px solid;
border-image: linear-gradient(159deg, rgba(169, 213, 255, 0.4) -8%, rgba(169, 213, 255, 0) 38%) 1.5; border-image: linear-gradient(
159deg,
rgba(169, 213, 255, 0.4) -8%,
rgba(169, 213, 255, 0) 38%
)
1.5;
} }
</style> </style>

@ -1,23 +1,40 @@
<template> <template>
<div class="h-[48.79vh] bgLeftTopBox p-[1.85vh]" v-loading="isLoading"> <div class="h-[48.79vh] bgLeftTopBox p-[1.85vh]" v-loading="isLoading">
<div class="w-[21.29vh] h-[21.29vh] mx-auto m-[2vh]" ref="echartsContainer"></div> <div
<div class="w-[45.18vh] h-[14.81vh] bgTopLeftItemBox mx-auto mt-[4.8vh] px-[2.96vh] py-[2.4vh] flex justify-between items-center"> class="w-[21.29vh] h-[21.29vh] mx-auto m-[2vh]"
ref="echartsContainer"
></div>
<div
class="w-[45.18vh] h-[14.81vh] bgTopLeftItemBox mx-auto mt-[4.8vh] px-[2.96vh] py-[2.4vh] flex justify-between items-center"
>
<section> <section>
<div class="flex"> <div class="flex">
<img src="@/assets/svg/Monitor/TopLeft/TrianglePurple.svg" /> <img src="@/assets/svg/Monitor/TopLeft/TrianglePurple.svg" />
<span class="youshe text-[1.75vh] ml-[1.11vh] opacity-80">总人数</span> <span class="youshe text-[1.75vh] ml-[1.11vh] opacity-80"
>总人数</span
>
</div> </div>
<p class="text-[#733FF3] text-[4.07vh] mt-[1.4vh] youshe leading-none">{{ totalPopulation }}</p> <p class="text-[#733FF3] text-[4.07vh] mt-[1.4vh] youshe leading-none">
{{ totalPopulation }}
</p>
</section> </section>
<section> <section>
<template v-for="(item, index) in peopleData"> <template v-for="(item, index) in peopleData">
<div class="w-[25.55vh] h-[4.07vh] peopleItemBox px-[2.22vh] flex justify-between items-center" :class="!index && 'mb-[1.85vh]'" :key="index"> <div
class="w-[25.55vh] h-[4.07vh] peopleItemBox px-[2.22vh] flex justify-between items-center"
:class="!index && 'mb-[1.85vh]'"
:key="index"
>
<div class="flex items-end"> <div class="flex items-end">
<img src="@/assets/svg/Operation/LeftTop/PointBlue.svg" /> <img src="@/assets/svg/Operation/LeftTop/PointBlue.svg" />
<span class="text-[1.48vh] opacity-80 ml-[0.74vh]">{{ item['itemName'] }}</span> <span class="text-[1.48vh] opacity-80 ml-[0.74vh]">{{
item["itemName"]
}}</span>
</div> </div>
<div class="flex items-center"> <div class="flex items-center">
<span class="text-[#733FF3] text-[2.4vh] youshe">{{ item['itemVal'] }}</span> <span class="text-[#733FF3] text-[2.4vh] youshe">{{
item["itemVal"]
}}</span>
<span class="text-[1.11vh] opacity-65 ml-[0.74vh]"></span> <span class="text-[1.11vh] opacity-65 ml-[0.74vh]"></span>
</div> </div>
</div> </div>
@ -28,9 +45,9 @@
</template> </template>
<script> <script>
import * as echarts from 'echarts'; import * as echarts from "echarts";
import { GetMonitorOperationCount } from '@/api/monitor'; import { GetMonitorOperationCount } from "@/api/monitor";
import dayjs from 'dayjs'; import dayjs from "dayjs";
let chart = null; let chart = null;
export default { export default {
data() { data() {
@ -38,15 +55,15 @@ export default {
chartOptions: { chartOptions: {
series: [ series: [
{ {
type: 'gauge', type: "gauge",
startAngle: 90, startAngle: 90,
endAngle: -270, endAngle: -270,
pointer: { pointer: {
show: false, show: false,
}, },
max: 100, max: 100,
radius: '100%', radius: "100%",
center: ['50%', '50%'], center: ["50%", "50%"],
progress: { progress: {
show: true, show: true,
overlap: false, overlap: false,
@ -54,7 +71,7 @@ export default {
clip: false, clip: false,
itemStyle: { itemStyle: {
color: { color: {
type: 'linear', type: "linear",
x: 0, x: 0,
y: 0, y: 0,
x2: 0, x2: 0,
@ -62,11 +79,11 @@ export default {
colorStops: [ colorStops: [
{ {
offset: 0, offset: 0,
color: '#9C85FA', color: "#9C85FA",
}, },
{ {
offset: 1, offset: 1,
color: '#5531E7', color: "#5531E7",
}, },
], ],
global: false, global: false,
@ -75,7 +92,7 @@ export default {
}, },
axisLine: { axisLine: {
lineStyle: { lineStyle: {
color: [[1, '#4F518C']], color: [[1, "#4F518C"]],
opacity: 0.7, opacity: 0.7,
width: 30, width: 30,
}, },
@ -95,21 +112,21 @@ export default {
data: [ data: [
{ {
value: 86, value: 86,
name: '首台准点率', name: "首台准点率",
title: { title: {
offsetCenter: ['0%', '20%'], offsetCenter: ["0%", "20%"],
fontSize: 22, fontSize: 22,
fontFamily: 'Microsoft YaHei', fontFamily: "Microsoft YaHei",
color: '#fff', color: "#fff",
overflow: 'break', overflow: "break",
lineHeight: 20, lineHeight: 20,
}, },
detail: { detail: {
valueAnimation: true, valueAnimation: true,
offsetCenter: ['0%', '-15%'], offsetCenter: ["0%", "-15%"],
fontSize: 40, fontSize: 40,
fontFamily: 'DIN-Bold,Microsoft YaHei', fontFamily: "DIN-Bold,Microsoft YaHei",
color: '#03FFFF', color: "#03FFFF",
formatter: `{value}%`, formatter: `{value}%`,
}, },
}, },
@ -119,12 +136,12 @@ export default {
}, },
peopleData: [ peopleData: [
{ {
itemName: '进行中', itemName: "进行中",
itemVal: '50', itemVal: "50",
}, },
{ {
itemName: '待进行', itemName: "待进行",
itemVal: '300', itemVal: "300",
}, },
], ],
totalPopulation: 0, totalPopulation: 0,
@ -133,15 +150,21 @@ export default {
}, },
methods: { methods: {
onGetPageData() { onGetPageData() {
let nowDay = dayjs().format('YYYY-MM-DD'); let nowDay = dayjs().format("YYYY-MM-DD");
if (this.$store.getters.isMock) { if (this.$store.getters.isMock) {
nowDay = '2024-06-06'; nowDay = "2024-06-06";
} }
GetMonitorOperationCount(nowDay).then(res => { GetMonitorOperationCount(nowDay).then((res) => {
this.chartOptions['series'][0]['data'][0]['value'] = res['data']['firstPunctualityRate'].slice(0, -1); if (!res.data) {
this.peopleData[0]['itemVal'] = res['data']['patOperationing']; this.isLoading = false;
this.peopleData[1]['itemVal'] = res['data']['patWating']; return;
this.totalPopulation = res['data']['patCount']; }
this.chartOptions["series"][0]["data"][0]["value"] = res["data"][
"firstPunctualityRate"
].slice(0, -1);
this.peopleData[0]["itemVal"] = res["data"]["patOperationing"];
this.peopleData[1]["itemVal"] = res["data"]["patWating"];
this.totalPopulation = res["data"]["patCount"];
chart.setOption(this.chartOptions); chart.setOption(this.chartOptions);
this.isLoading = false; this.isLoading = false;
}); });
@ -156,20 +179,29 @@ export default {
<style> <style>
.bgLeftTopBox { .bgLeftTopBox {
background-image: url('@/assets/svg/Operation/LeftTop/Box.svg'); background-image: url("@/assets/svg/Operation/LeftTop/Box.svg");
background-size: contain; background-size: contain;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.bgTopLeftItemBox { .bgTopLeftItemBox {
background-image: url('@/assets/svg/Operation/LeftTop/ItemBox.svg'); background-image: url("@/assets/svg/Operation/LeftTop/ItemBox.svg");
background-size: contain; background-size: contain;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.peopleItemBox { .peopleItemBox {
background: linear-gradient(271deg, rgba(85, 255, 212, 0.045) 2%, rgba(35, 150, 121, 0.066) 99%); background: linear-gradient(
271deg,
rgba(85, 255, 212, 0.045) 2%,
rgba(35, 150, 121, 0.066) 99%
);
border: 1.5px solid; border: 1.5px solid;
border-image: linear-gradient(159deg, rgba(169, 213, 255, 0.4) -8%, rgba(169, 213, 255, 0) 38%) 1.5; border-image: linear-gradient(
159deg,
rgba(169, 213, 255, 0.4) -8%,
rgba(169, 213, 255, 0) 38%
)
1.5;
} }
</style> </style>

@ -95,7 +95,8 @@ export default {
nowDay = '2024-06-06'; nowDay = '2024-06-06';
} }
GetMonitorAverageReceptionTime(nowDay).then(res => { GetMonitorAverageReceptionTime(nowDay).then(res => {
this.chartOptions['series'][0]['data'][0]['value'] = res['data']['averageReceptionTime'] > 999 ? 999 : res['data']['averageReceptionTime']; // this.chartOptions['series'][0]['data'][0]['value'] = res['data']['averageReceptionTime'] > 999 ? 999 : res['data']['averageReceptionTime'];
this.chartOptions['series'][0]['data'][0]['value'] = res['data']['averageReceptionTime'];
chart.setOption(this.chartOptions); chart.setOption(this.chartOptions);
this.isLoading = false; this.isLoading = false;
}); });

@ -1,7 +1,12 @@
<template> <template>
<div class="h-[48.79vh] bgLeftTopBox p-[1.85vh]" v-loading="isLoading"> <div class="h-[48.79vh] bgLeftTopBox p-[1.85vh]" v-loading="isLoading">
<div class="w-[22vh] h-[22vh] mx-auto mt-[4.6vh]" ref="echartsContainer"></div> <div
<div class="w-[37.96vh] h-[6.29vh] mx-auto mt-[8.6vh] px-[4.96vh] flex justify-between items-center bgTopLeftItemBox"> class="w-[22vh] h-[22vh] mx-auto mt-[4.6vh]"
ref="echartsContainer"
></div>
<div
class="w-[37.96vh] h-[6.29vh] mx-auto mt-[8.6vh] px-[4.96vh] flex justify-between items-center bgTopLeftItemBox"
>
<div class="flex"> <div class="flex">
<img src="@/assets/svg/Room/LeftTop/TrianglePurple.svg" /> <img src="@/assets/svg/Room/LeftTop/TrianglePurple.svg" />
<span class="text-[1.85vh] youshe ml-[1.4vh]">手术间数</span> <span class="text-[1.85vh] youshe ml-[1.4vh]">手术间数</span>
@ -12,9 +17,9 @@
</template> </template>
<script> <script>
import * as echarts from 'echarts'; import * as echarts from "echarts";
import { GetMonitorOperationCount } from '@/api/monitor'; import { GetMonitorOperationCount } from "@/api/monitor";
import dayjs from 'dayjs'; import dayjs from "dayjs";
let chart = null; let chart = null;
export default { export default {
data() { data() {
@ -22,15 +27,15 @@ export default {
chartOptions: { chartOptions: {
series: [ series: [
{ {
type: 'gauge', type: "gauge",
startAngle: 90, startAngle: 90,
endAngle: -270, endAngle: -270,
pointer: { pointer: {
show: false, show: false,
}, },
max: 100, max: 100,
radius: '100%', radius: "100%",
center: ['50%', '50%'], center: ["50%", "50%"],
progress: { progress: {
show: true, show: true,
overlap: false, overlap: false,
@ -38,7 +43,7 @@ export default {
clip: false, clip: false,
itemStyle: { itemStyle: {
color: { color: {
type: 'linear', type: "linear",
x: 0, x: 0,
y: 0, y: 0,
x2: 0, x2: 0,
@ -46,11 +51,11 @@ export default {
colorStops: [ colorStops: [
{ {
offset: 0, offset: 0,
color: '#9C85FA', color: "#9C85FA",
}, },
{ {
offset: 1, offset: 1,
color: '#5531E7', color: "#5531E7",
}, },
], ],
global: false, global: false,
@ -59,7 +64,7 @@ export default {
}, },
axisLine: { axisLine: {
lineStyle: { lineStyle: {
color: [[1, '#4F518C']], color: [[1, "#4F518C"]],
opacity: 0.7, opacity: 0.7,
width: 30, width: 30,
}, },
@ -79,21 +84,21 @@ export default {
data: [ data: [
{ {
value: 86, value: 86,
name: '首台准点率', name: "首台准点率",
title: { title: {
offsetCenter: ['0%', '20%'], offsetCenter: ["0%", "20%"],
fontSize: 22, fontSize: 22,
fontFamily: 'Microsoft YaHei', fontFamily: "Microsoft YaHei",
color: '#fff', color: "#fff",
overflow: 'break', overflow: "break",
lineHeight: 20, lineHeight: 20,
}, },
detail: { detail: {
valueAnimation: true, valueAnimation: true,
offsetCenter: ['0%', '-15%'], offsetCenter: ["0%", "-15%"],
fontSize: 40, fontSize: 40,
fontFamily: 'DIN-Bold,Microsoft YaHei', fontFamily: "DIN-Bold,Microsoft YaHei",
color: '#03FFFF', color: "#03FFFF",
formatter: `{value}%`, formatter: `{value}%`,
}, },
}, },
@ -107,13 +112,18 @@ export default {
}, },
methods: { methods: {
onGetPageData() { onGetPageData() {
let nowDay = dayjs().format('YYYY-MM-DD'); let nowDay = dayjs().format("YYYY-MM-DD");
if (this.$store.getters.isMock) { if (this.$store.getters.isMock) {
nowDay = '2024-06-06'; nowDay = "2024-06-06";
} }
GetMonitorOperationCount(nowDay).then(res => { GetMonitorOperationCount(nowDay).then((res) => {
this.chartOptions['series'][0]['data'][0]['value'] = res['data']['firstPunctualityRate'].slice(0, -1); if (!res.data) {
this.opTotal = res['data']['roomCount']; return;
}
this.chartOptions["series"][0]["data"][0]["value"] = res["data"][
"firstPunctualityRate"
].slice(0, -1);
this.opTotal = res["data"]["roomCount"];
chart.setOption(this.chartOptions); chart.setOption(this.chartOptions);
this.isLoading = false; this.isLoading = false;
}); });
@ -128,13 +138,13 @@ export default {
<style> <style>
.bgLeftTopBox { .bgLeftTopBox {
background-image: url('@/assets/svg/Room/LeftTop/Box.svg'); background-image: url("@/assets/svg/Room/LeftTop/Box.svg");
background-size: contain; background-size: contain;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.bgTopLeftItemBox { .bgTopLeftItemBox {
background-image: url('@/assets/svg/Room/LeftTop/ItemBox.svg'); background-image: url("@/assets/svg/Room/LeftTop/ItemBox.svg");
background-size: contain; background-size: contain;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;

@ -140,7 +140,8 @@ export default {
}, },
onGetPageData() { onGetPageData() {
let today = dayjs().format('YYYY-MM-DD'); let today = dayjs().format('YYYY-MM-DD');
today = '2024-06-06'; // today = '2024-06-06';
// today = '2024-08-07';
this.chartOptions.xAxis.min = `${today} 08:00:00`; this.chartOptions.xAxis.min = `${today} 08:00:00`;
this.chartOptions.xAxis.max = `${dayjs(today).add(1, 'day').format('YYYY-MM-DD')} 07:00:00`; this.chartOptions.xAxis.max = `${dayjs(today).add(1, 'day').format('YYYY-MM-DD')} 07:00:00`;
GetMonitorRoomUsageRate(today).then(res => { GetMonitorRoomUsageRate(today).then(res => {

Loading…
Cancel
Save