feat: 完成改版

main
shengwen.chen 4 months ago
parent b114d29cd6
commit bae8cc82ff

1
.gitignore vendored

@ -22,3 +22,4 @@ pnpm-debug.log*
*.njsproj
*.sln
*.sw?
*.zip

@ -14,21 +14,21 @@ export default {
methods: {
enterFullscreen() {
//
// const element = document.documentElement;
// if (!this.isLoding) {
// if (element.webkitRequestFullscreen) {
// // Chrome, Safari and Opera
// element.webkitRequestFullscreen();
// } else if (element.msRequestFullscreen) {
// // IE/Edge
// element.msRequestFullscreen();
// } else if (element.mozRequestFullScreen) {
// // Firefox
// element.mozRequestFullScreen();
// } else if (element.requestFullscreen) {
// element.requestFullscreen();
// }
// }
const element = document.documentElement;
if (!this.isLoding) {
if (element.webkitRequestFullscreen) {
// Chrome, Safari and Opera
element.webkitRequestFullscreen();
} else if (element.msRequestFullscreen) {
// IE/Edge
element.msRequestFullscreen();
} else if (element.mozRequestFullScreen) {
// Firefox
element.mozRequestFullScreen();
} else if (element.requestFullscreen) {
element.requestFullscreen();
}
}
},
},
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="557.455078125" height="352" viewBox="0 0 557.455078125 352"><defs><filter id="master_svg0_555_25475" filterUnits="objectBoundingBox" color-interpolation-filters="sRGB" x="0" y="0" width="554" height="349"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feColorMatrix in="SourceAlpha" type="matrix" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy="0" dx="0"/><feGaussianBlur stdDeviation="25"/><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/><feColorMatrix type="matrix" values="0 0 0 0 0.49803921580314636 0 0 0 0 0.33725491166114807 0 0 0 0 0.8509804010391235 0 0 0 0.5 0"/><feBlend mode="normal" in2="shape" result="effect1_innerShadow"/></filter><linearGradient x1="0.012568394653499126" y1="0.2873583436012268" x2="0.9811341762542725" y2="1" id="master_svg1_201_02516"><stop offset="0%" stop-color="#8C64E2" stop-opacity="1"/><stop offset="10.360609740018845%" stop-color="#8C64E2" stop-opacity="0"/><stop offset="47.14285731315613%" stop-color="#8C64E2" stop-opacity="0"/><stop offset="73.57142567634583%" stop-color="#8C64E2" stop-opacity="0.699999988079071"/><stop offset="85.00000238418579%" stop-color="#8C64E2" stop-opacity="0.2199999988079071"/><stop offset="100%" stop-color="#8C64E2" stop-opacity="0"/></linearGradient><linearGradient x1="6.661338147750939e-16" y1="0.5" x2="1.017080545425415" y2="0.5000399947166443" id="master_svg2_555_29651"><stop offset="0%" stop-color="#5D49AF" stop-opacity="1"/><stop offset="100%" stop-color="#7E65E5" stop-opacity="0"/></linearGradient><linearGradient x1="6.661338147750939e-16" y1="0.5" x2="1.017080545425415" y2="0.5000399947166443" id="master_svg3_555_29651"><stop offset="0%" stop-color="#5D49AF" stop-opacity="1"/><stop offset="100%" stop-color="#7E65E5" stop-opacity="0"/></linearGradient></defs><g><g filter="url(#master_svg0_555_25475)"><path d="M1.5,350.5L555.5,350.5L555.5,11.5L241.5,11.5L233.5,1.5L1.5,1.5L1.5,350.5Z" fill="#01152A" fill-opacity="0.4000000059604645"/><path d="M242.221,10L557,10L557,352L0,352L0,0L234.221,0L242.221,10ZM232.779,3L240.329,12.437L240.779,13L554,13L554,349L3,349L3,3L232.779,3Z" fill-rule="evenodd" fill="url(#master_svg1_201_02516)" fill-opacity="1"/></g><g><g><path d="M242.5,1.5L457.485,1.5L460.586,5.33186L245.60075,5.33186L242.5,1.5Z" fill="url(#master_svg2_555_29651)" fill-opacity="1"/></g><g><path d="M466.5,1.5L554.3545,1.5L557.4552,5.33186L469.60075,5.33186L466.5,1.5Z" fill="url(#master_svg3_555_29651)" fill-opacity="1"/></g></g></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="608" height="434" viewBox="0 0 608 434"><defs><filter id="master_svg0_6814_172121" filterUnits="objectBoundingBox" color-interpolation-filters="sRGB" x="-0.05714285714285714" y="-0.07253886010362694" width="1.1142857142857143" height="1.16580310880829"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy="4" dx="0"/><feGaussianBlur stdDeviation="8"/><feColorMatrix type="matrix" values="0 0 0 0 0.34117648005485535 0 0 0 0 0.2666666805744171 0 0 0 0 0.686274528503418 0 0 0 0.20000000298023224 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/><feGaussianBlur in="BackgroundImageFix" stdDeviation="5"/><feComposite in2="SourceAlpha" operator="in" result="effect2_foregroundBlur"/><feBlend mode="normal" in="SourceGraphic" in2="effect2_foregroundBlur" result="shape"/></filter><linearGradient x1="0.5" y1="0" x2="0.5" y2="1" id="master_svg1_6814_165834"><stop offset="0%" stop-color="#F0F3FD" stop-opacity="1"/><stop offset="100%" stop-color="#E8EEFD" stop-opacity="1"/></linearGradient><linearGradient x1="0.5" y1="0" x2="0.5" y2="1" id="master_svg2_6814_165846"><stop offset="0%" stop-color="#C2ACF7" stop-opacity="1"/><stop offset="100%" stop-color="#6F39F4" stop-opacity="0"/></linearGradient><linearGradient x1="0.5" y1="0" x2="0.5" y2="1" id="master_svg3_6814_165846"><stop offset="0%" stop-color="#C2ACF7" stop-opacity="1"/><stop offset="100%" stop-color="#6F39F4" stop-opacity="0"/></linearGradient></defs><g><g filter="url(#master_svg0_6814_172121)"><rect x="24" y="20" width="560" height="386" rx="8" fill="url(#master_svg1_6814_165834)" fill-opacity="0.949999988079071"/><rect x="25" y="21" width="558" height="384" rx="7" fill-opacity="0" stroke-opacity="1" stroke="#DFE0F3" fill="none" stroke-width="2"/></g><g transform="matrix(0,-1,1,0,4,50)"><rect x="27" y="23" width="3" height="40" rx="0" fill="url(#master_svg2_6814_165846)" fill-opacity="1"/></g><g><g><rect x="24" y="20" width="3" height="260" rx="0" fill="url(#master_svg3_6814_165846)" fill-opacity="1"/></g></g></g></svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="557.455078125" height="530" viewBox="0 0 557.455078125 530"><defs><filter id="master_svg0_555_25455" filterUnits="objectBoundingBox" color-interpolation-filters="sRGB" x="0" y="0" width="554" height="527"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feColorMatrix in="SourceAlpha" type="matrix" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy="0" dx="0"/><feGaussianBlur stdDeviation="25"/><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/><feColorMatrix type="matrix" values="0 0 0 0 0.49803921580314636 0 0 0 0 0.33725491166114807 0 0 0 0 0.8509804010391235 0 0 0 0.5 0"/><feBlend mode="normal" in2="shape" result="effect1_innerShadow"/></filter><linearGradient x1="0.012568394653499126" y1="0.2873583436012268" x2="0.9811341762542725" y2="1" id="master_svg1_201_02516"><stop offset="0%" stop-color="#8C64E2" stop-opacity="1"/><stop offset="10.360609740018845%" stop-color="#8C64E2" stop-opacity="0"/><stop offset="47.14285731315613%" stop-color="#8C64E2" stop-opacity="0"/><stop offset="73.57142567634583%" stop-color="#8C64E2" stop-opacity="0.699999988079071"/><stop offset="85.00000238418579%" stop-color="#8C64E2" stop-opacity="0.2199999988079071"/><stop offset="100%" stop-color="#8C64E2" stop-opacity="0"/></linearGradient><linearGradient x1="6.661338147750939e-16" y1="0.5" x2="1.017080545425415" y2="0.5000399947166443" id="master_svg2_555_29651"><stop offset="0%" stop-color="#5D49AF" stop-opacity="1"/><stop offset="100%" stop-color="#7E65E5" stop-opacity="0"/></linearGradient><linearGradient x1="6.661338147750939e-16" y1="0.5" x2="1.017080545425415" y2="0.5000399947166443" id="master_svg3_555_29651"><stop offset="0%" stop-color="#5D49AF" stop-opacity="1"/><stop offset="100%" stop-color="#7E65E5" stop-opacity="0"/></linearGradient></defs><g><g><g filter="url(#master_svg0_555_25455)"><path d="M1.5,528.5L555.5,528.5L555.5,11.5L241.5,11.5L233.5,1.5L1.5,1.5L1.5,528.5Z" fill="#01152A" fill-opacity="0.4000000059604645"/><path d="M242.221,10L557,10L557,530L0,530L0,0L234.221,0L242.221,10ZM232.779,3L240.329,12.437L240.779,13L554,13L554,527L3,527L3,3L232.779,3Z" fill-rule="evenodd" fill="url(#master_svg1_201_02516)" fill-opacity="1"/></g><g><g><path d="M242.5,1.5L457.485,1.5L460.586,5.33186L245.60075,5.33186L242.5,1.5Z" fill="url(#master_svg2_555_29651)" fill-opacity="1"/></g><g><path d="M466.5,1.5L554.3545,1.5L557.4552,5.33186L469.60075,5.33186L466.5,1.5Z" fill="url(#master_svg3_555_29651)" fill-opacity="1"/></g></g></g></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="608" height="546" viewBox="0 0 608 546"><defs><filter id="master_svg0_6814_171688" filterUnits="objectBoundingBox" color-interpolation-filters="sRGB" x="-0.05714285714285714" y="-0.05622489959839357" width="1.1142857142857143" height="1.1285140562248996"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy="4" dx="0"/><feGaussianBlur stdDeviation="8"/><feColorMatrix type="matrix" values="0 0 0 0 0.34117648005485535 0 0 0 0 0.2666666805744171 0 0 0 0 0.686274528503418 0 0 0 0.20000000298023224 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/><feGaussianBlur in="BackgroundImageFix" stdDeviation="5"/><feComposite in2="SourceAlpha" operator="in" result="effect2_foregroundBlur"/><feBlend mode="normal" in="SourceGraphic" in2="effect2_foregroundBlur" result="shape"/></filter><linearGradient x1="0.5" y1="0" x2="0.5" y2="1" id="master_svg1_6814_165834"><stop offset="0%" stop-color="#F0F3FD" stop-opacity="1"/><stop offset="100%" stop-color="#E8EEFD" stop-opacity="1"/></linearGradient><linearGradient x1="0.5" y1="0" x2="0.5" y2="1" id="master_svg2_6814_165846"><stop offset="0%" stop-color="#C2ACF7" stop-opacity="1"/><stop offset="100%" stop-color="#6F39F4" stop-opacity="0"/></linearGradient><linearGradient x1="0.5" y1="0" x2="0.5" y2="1" id="master_svg3_6814_165846"><stop offset="0%" stop-color="#C2ACF7" stop-opacity="1"/><stop offset="100%" stop-color="#6F39F4" stop-opacity="0"/></linearGradient></defs><g><g filter="url(#master_svg0_6814_171688)"><rect x="24" y="20" width="560" height="498" rx="8" fill="url(#master_svg1_6814_165834)" fill-opacity="0.949999988079071"/><rect x="25" y="21" width="558" height="496" rx="7" fill-opacity="0" stroke-opacity="1" stroke="#DFE0F3" fill="none" stroke-width="2"/></g><g transform="matrix(0,-1,1,0,4,50)"><rect x="27" y="23" width="3" height="40" rx="0" fill="url(#master_svg2_6814_165846)" fill-opacity="1"/></g><g><g><rect x="24" y="20" width="3" height="260" rx="0" fill="url(#master_svg3_6814_165846)" fill-opacity="1"/></g></g></g></svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

@ -5,7 +5,7 @@ Vue.use(Vuex);
export default new Vuex.Store({
state: {
isMock: true,
isMock: false,
intervalTime: 30000, // 请求间隔时间
},
getters: {

@ -57,9 +57,6 @@ export default {
});
},
updateChart() {
if (!this.myChart) {
this.myChart = echarts.init(document.getElementById("chartBottomLeft"));
}
let categories = ['择期手术', '急诊手术', '日间手术', '门诊手术']
let maxVal = 10
if (Math.max(...this.getDataList) > 0) {
@ -132,10 +129,14 @@ export default {
},
},
mounted() {
this.myChart = echarts.init(document.getElementById("chartBottomLeft"));
this.onGetPageData();
setInterval(() => {
this.changeActive()
}, this.$store.getters.intervalTime);
window.addEventListener("resize", () => {
this.myChart.resize();
});
},
};
</script>

@ -42,10 +42,6 @@ export default {
});
},
updateChart() {
if (!this.myChart) {
this.myChart = echarts.init(document.getElementById("chartBottomMidLeft"));
}
const total = this.pageList.reduce((sum, item) => sum + item.value, 0);
//
@ -111,7 +107,11 @@ export default {
}
},
mounted() {
this.myChart = echarts.init(document.getElementById("chartBottomMidLeft"));
this.onGetPageData();
window.addEventListener("resize", () => {
this.myChart.resize();
});
},
};
</script>

@ -48,10 +48,6 @@ export default {
});
},
updateChart() {
if (!this.myChart) {
this.myChart = echarts.init(document.getElementById("chartBottomMid"));
}
const total = this.pageList.reduce((sum, item) => sum + item.value, 0);
//
@ -117,7 +113,11 @@ export default {
}
},
mounted() {
this.myChart = echarts.init(document.getElementById("chartBottomMid"));
this.onGetPageData();
window.addEventListener("resize", () => {
this.myChart.resize();
});
},
};
</script>

@ -58,9 +58,6 @@ export default {
});
},
updateChart() {
if (!this.myChart) {
this.myChart = echarts.init(document.getElementById("chartBottomRight"));
}
let categories = ['骨科', '普外科', '内科', '神经外科', '肿瘤科']
let values = [0, 0, 0, 0, 0]
let maxVal = 20;
@ -128,10 +125,14 @@ export default {
},
},
mounted() {
this.myChart = echarts.init(document.getElementById("chartBottomRight"));
this.onGetPageData();
setInterval(() => {
this.changeActive()
}, this.$store.getters.intervalTime);
window.addEventListener("resize", () => {
this.myChart.resize();
});
},
};
</script>

@ -97,6 +97,9 @@ export default {
setInterval(() => {
this.onGetPageData();
}, this.$store.getters.intervalTime);
window.addEventListener("resize", () => {
chart.resize();
});
},
};
</script>
@ -107,7 +110,7 @@ export default {
width: vw(560);
height: vh(358);
background-image: url('@/assets/svg/Operation/LeftBottom/Box.svg');
background-size: auto;
background-size: 107%;
background-position: center;
background-repeat: no-repeat;
}

@ -3,7 +3,7 @@
box-sizing: border-box;
padding: vh(20) vw(20);
background-image: url('@/assets/svg/Operation/LeftTop/Box.svg');
background-size: auto;
background-size: 107%;
background-position: center;
background-repeat: no-repeat;

@ -165,6 +165,9 @@ export default {
setInterval(() => {
this.onGetPageData();
}, this.$store.getters.intervalTime);
window.addEventListener("resize", () => {
chart.resize();
});
},
};
</script>

@ -2,7 +2,7 @@
width: vw(1270);
height: vh(904);
background-image: url('@/assets/svg/Operation/RightMid/Box.svg');
background-size: auto;
background-size: 103%;
background-position: center;
background-repeat: no-repeat;

@ -1,6 +1,6 @@
<template>
<div class="w-[171.29vh] flex justify-between mx-auto">
<div class="w-[51.48vh]">
<div class="roomBox">
<div class="leftBox">
<leftTop></leftTop>
<leftBottom></leftBottom>
</div>
@ -21,4 +21,15 @@ export default {
};
</script>
<style></style>
<style lang="scss" scoped>
.roomBox {
width: vw(1860);
display: flex;
justify-content: space-between;
margin: 0 auto;
.leftBox {
width: vw(560);
}
}
</style>

@ -0,0 +1,38 @@
.bottomBoxWrap {
height: vh(386);
box-sizing: border-box;
padding: vh(20) vw(54);
background-image: url('@/assets/svg/Room/LeftBottom/Box.svg');
background-size: 107%;
background-position: center;
background-repeat: no-repeat;
margin-top: vh(24);
.echartsContainer {
height: vh(260)
}
.bottomBox {
height: vh(80);
padding: 0 vw(24);
background: linear-gradient(272deg, rgba(93, 73, 175, 0.045) 2%, rgba(93, 73, 175, 0.066) 99%);
border: 1px solid;
border-image: linear-gradient(160deg, rgba(158, 136, 246, 0.4) -10%, rgba(93, 73, 175, 0) 41%) 1.5;
display: flex;
align-items: center;
justify-content: space-evenly;
.left {
display: flex;
align-items: center;
span {
font-size: vw(16);
font-weight: 500;
color: #2D126F;
margin-left: vw(4);
}
}
}
}

@ -1,10 +1,13 @@
<template>
<div class="h-[32.31vh] mt-[2.77vh] pt-[4vh] bgLeftBottomBox">
<div class="h-[20vh] flex justify-center" ref="echartsContainer"></div>
<section class="w-[37.96vh] h-[5.18vh] leading-[5.18vh] text-center border border-[#2D126F] mx-auto">
<span class="text-[1.85vh] youshe">平均接台时间</span>
</section>
</div>
<section class="bottomBoxWrap">
<div class="echartsContainer" ref="echartsContainer"></div>
<div class="bottomBox">
<div class="left">
<img src="@/assets/svg/Operation/LeftTop/PointBlue.svg" />
<span>平均接台时间(min)</span>
</div>
</div>
</section>
</template>
<script>
@ -20,14 +23,14 @@ export default {
{
type: 'gauge',
radius: '100%',
max: 120,
max: 240,
axisLabel: {
show: false,
},
axisLine: {
lineStyle: {
width: 20,
color: [[1, 'rgba(126, 130, 137, 0.3)']],
color: [[1, '#fff']],
},
},
progress: {
@ -41,19 +44,18 @@ export default {
x2: 0,
y2: 1,
colorStops: [
{ offset: 0, color: '#03c2fd' },
{ offset: 0.5, color: '#1ed3e5' },
{ offset: 1, color: '#2fded6' },
{ offset: 0, color: '#5D49AF' },
{ offset: 1, color: '#E8E3FF' },
],
},
},
},
pointer: {
icon: 'rect',
width: 3,
width: 2,
offsetCenter: ['0%', '-40%'],
itemStyle: {
color: 'rgba(139, 230, 253, 1)',
color: '#5D49AF',
},
},
data: [
@ -68,14 +70,13 @@ export default {
},
rich: {
a: {
fontSize: 32,
color: '#4AC9FF',
fontFamily: 'DIN-Bold,Microsoft YaHei',
fontSize: 48,
color: '#5D49AF',
fontWeight: 700
},
b: {
fontSize: 16,
color: '#4AC9FF',
fontFamily: 'DIN-Bold,Microsoft YaHei',
fontSize: 20,
color: 'rgba(93, 73, 175, 0.6)',
verticalAlign: 'bottom',
},
},
@ -95,7 +96,6 @@ export default {
nowDay = '2024-06-06';
}
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'];
chart.setOption(this.chartOptions);
this.isLoading = false;
@ -112,11 +112,6 @@ export default {
};
</script>
<style>
.bgLeftBottomBox {
background-image: url('@/assets/svg/Room/LeftBottom/Box.svg');
background-size: contain;
background-position: center;
background-repeat: no-repeat;
}
<style lang="scss" scoped>
@import "./index.scss"
</style>

@ -0,0 +1,55 @@
.leftBox {
height: vh(498);
box-sizing: border-box;
padding: vh(54) vw(54);
background-image: url('@/assets/svg/Room/LeftTop/Box.svg');
background-size: 107%;
background-position: center;
background-repeat: no-repeat;
.echartsContainer {
width: vw(230);
height: vh(230);
margin: vh(20) auto;
}
.bottomBox {
margin-top: vh(40);
height: vh(80);
padding: 0 vw(24);
background: linear-gradient(272deg, rgba(93, 73, 175, 0.045) 2%, rgba(93, 73, 175, 0.066) 99%);
border: 1px solid;
border-image: linear-gradient(160deg, rgba(158, 136, 246, 0.4) -10%, rgba(93, 73, 175, 0) 41%) 1.5;
display: flex;
align-items: center;
justify-content: space-between;
.left {
display: flex;
align-items: center;
span {
font-size: vw(16);
color: #2D126F;
margin-left: vw(4);
}
}
.right {
font-size: vw(12);
color: #571273;
span {
font-weight: 500;
font-size: vw(26);
color: #5D49AF;
vertical-align: sub;
}
}
&:first-child {
margin-bottom: vh(24);
}
}
}

@ -1,14 +1,17 @@
<template>
<div class="h-[48.79vh] bgLeftTopBox p-[1.85vh]">
<div class="w-[22vh] h-[22vh] mx-auto mt-[4.6vh] flex justify-center" 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">
<img src="@/assets/svg/Room/LeftTop/TrianglePurple.svg" />
<span class="text-[1.85vh] youshe ml-[1.4vh]">手术间数</span>
<section class="leftBox">
<div class="echartsContainer" ref="echartsContainer"></div>
<div class="bottomBox">
<div class="left">
<img src="@/assets/svg/Operation/LeftTop/PointBlue.svg" />
<span>手术间数</span>
</div>
<div class="right">
<span class="panmen">300</span>
</div>
<p class="text-[2.96vh] text-[#733FF3] youshe">{{ opTotal }}</p>
</div>
</div>
</section>
</template>
<script>
@ -46,11 +49,11 @@ export default {
colorStops: [
{
offset: 0,
color: '#9C85FA',
color: '#6551B4',
},
{
offset: 1,
color: '#5531E7',
color: '#ACA0DC',
},
],
global: false,
@ -59,7 +62,7 @@ export default {
},
axisLine: {
lineStyle: {
color: [[1, '#4F518C']],
color: [[1, '#fff']],
opacity: 0.7,
width: 30,
},
@ -79,12 +82,12 @@ export default {
data: [
{
value: 86,
name: '首台准点率',
name: '术间利用率',
title: {
offsetCenter: ['0%', '20%'],
offsetCenter: ['0%', '24%'],
fontSize: 22,
fontFamily: 'Microsoft YaHei',
color: '#fff',
color: '#5D49AF',
overflow: 'break',
lineHeight: 20,
},
@ -92,8 +95,8 @@ export default {
valueAnimation: true,
offsetCenter: ['0%', '-15%'],
fontSize: 40,
fontFamily: 'DIN-Bold,Microsoft YaHei',
color: '#03FFFF',
fontFamily: 'panmen',
color: '#5D49AF',
formatter: `{value}%`,
},
},
@ -137,17 +140,6 @@ export default {
};
</script>
<style>
.bgLeftTopBox {
background-image: url('@/assets/svg/Room/LeftTop/Box.svg');
background-size: contain;
background-position: center;
background-repeat: no-repeat;
}
.bgTopLeftItemBox {
background-image: url('@/assets/svg/Room/LeftTop/ItemBox.svg');
background-size: contain;
background-position: center;
background-repeat: no-repeat;
}
<style lang="scss" scoped>
@import "./index.scss"
</style>

@ -1,234 +0,0 @@
<template>
<div class="w-[116.94vh] h-[85.51vh] bgRightMidBox">
<section class="h-full" ref="echartsContainer"></section>
</div>
</template>
<script>
import * as echarts from 'echarts';
import dayjs from 'dayjs';
export default {
data() {
return {
isLoding: false,
chartOptions: {
grid: {
width: '86%',
height: '80%',
top: '14%',
},
legend: {
data: [
{
name: '入手术室',
icon: 'rect',
itemStyle: {
color: '#92CC76',
},
},
{
name: '开始手术',
icon: 'rect',
itemStyle: {
color: '#EF6666',
},
},
{
name: '手术结束',
icon: 'rect',
itemStyle: {
color: '#FAC858',
},
},
{
name: '出手术室',
icon: 'rect',
itemStyle: {
color: '#5470C6',
},
},
],
selectedMode: 'none',
top: "6%",
right: "4%",
textStyle: {
color: '#fff',
fontSize: 14,
fontFamily: 'DIN-Bold,Microsoft YaHei',
},
},
xAxis: {
type: 'time',
position: 'top',
splitNumber: 24,
axisLabel: {
color: '#B7BDBF',
fontSize: 12,
margin: 16,
formatter: function (value) {
var date = new Date(value);
var hours = date.getHours();
var minutes = date.getMinutes();
if (hours === 0 && minutes === 0) {
return '00:00';
} else {
return (hours < 10 ? '0' : '') + hours + ':' + (minutes < 10 ? '0' : '') + minutes;
}
},
},
},
yAxis: {
type: 'category',
data: [],
axisLabel: {
color: '#B7BDBF',
fontSize: 12,
margin: 16,
fontFamily: 'DIN-Bold,Microsoft YaHei',
},
},
series: [],
},
};
},
methods: {
initData() {
//
const currentDate = dayjs().format('YYYY-MM-DD');
const hours = new Date().getHours();
const detailMin = dayjs().subtract(1, 'minute').format('HH:mm:00');
const sevenMinutesAgo = dayjs().subtract(8, 'minute').format('HH:mm:00');
this.chartOptions.xAxis.min = `${currentDate} 08:00:00`;
this.chartOptions.xAxis.max = `${dayjs().add(1, 'day').format('YYYY-MM-DD')} 07:00:00`;
//
const num = 20;
//
const timeArr = [];
//
for (let index = num; index >= 1; index--) {
this.chartOptions.yAxis.data.push(`手术间${String(index).padStart(3, '0')}`);
const isUseArr = this.getUseTime();
for (let j = 1; j < isUseArr.length; j += 2) {
if (isUseArr[j] <= hours) {
timeArr.push({
startTime: `${currentDate} ${isUseArr[j - 1]}:00:00`,
endTime: `${currentDate} ${isUseArr[j]}:00:00`,
yValue: index - 1,
color: '#5470C6',
diff: dayjs(`${currentDate} ${isUseArr[j]}:00:00`).diff(dayjs(`${currentDate} ${isUseArr[j - 1]}:00:00`), 'minute'),
name: '出手术室',
});
} else if (isUseArr[j] > hours && isUseArr[j - 1] < hours) {
if (Math.random() > 0.5) {
timeArr.push({
startTime: `${currentDate} ${isUseArr[j - 1]}:00:00`,
endTime: `${currentDate} ${detailMin}`,
yValue: index - 1,
color: '#EF6666',
diff: dayjs(`${currentDate} ${detailMin}`).diff(dayjs(`${currentDate} ${isUseArr[j - 1]}:00:00`), 'minute'),
name: '开始手术',
});
} else {
timeArr.push({
startTime: `${currentDate} ${isUseArr[j - 1]}:00:00`,
endTime: `${currentDate} ${detailMin}`,
yValue: index - 1,
color: '#FAC858',
diff: dayjs(`${currentDate} ${detailMin}`).diff(dayjs(`${currentDate} ${isUseArr[j - 1]}:00:00`), 'minute'),
name: '手术结束',
});
}
} else if (isUseArr[j] > hours && isUseArr[j - 1] == hours) {
timeArr.push({
startTime: `${currentDate} ${sevenMinutesAgo}`,
endTime: `${currentDate} ${detailMin}`,
yValue: index - 1,
color: '#92CC76',
diff: '7',
name: '入手术室',
});
}
}
}
// series
console.log(timeArr);
this.chartOptions.series = this.seriesData(timeArr);
},
seriesData(data) {
const res = data.map(function (item) {
return {
type: 'custom',
name: item.name,
renderItem: function (params, api) {
var xStart = api.coord([item.startTime, item.yValue]);
var xEnd = api.coord([item.endTime, item.yValue]);
var textX = (xStart[0] + xEnd[0]) / 2;
var textY = xStart[1] - 20;
return {
type: 'group',
children: [
{
type: 'line',
shape: {
x1: xStart[0],
y1: xStart[1],
x2: xEnd[0],
y2: xEnd[1],
},
style: {
stroke: item.color,
lineWidth: 8,
},
},
{
type: 'text',
position: [textX, textY],
style: {
text: `${item.diff} min`,
fill: '#B7BDBF',
textSize: '12px',
textAlign: 'center',
},
},
],
};
},
data: [item],
};
});
return res;
},
getUseTime() {
// 使
function getRandomUniqueValues(min, max, count) {
const values = new Set();
while (values.size < count) {
values.add(Math.floor(Math.random() * (max - min + 1)) + min);
}
return Array.from(values);
}
const numValues = Math.floor(Math.random() * 3) + 8;
const randomValues = getRandomUniqueValues(8, 24, numValues % 2 ? numValues + 1 : numValues);
return randomValues.sort((a, b) => {
return a - b;
});
},
},
mounted() {
const chartContainer = this.$refs.echartsContainer;
const chart = echarts.init(chartContainer);
this.initData();
chart.setOption(this.chartOptions);
},
};
</script>
<style>
.bgRightMidBox {
background-image: url('@/assets/svg/Room/RightMid/Box.svg');
background-size: contain;
background-position: center;
background-repeat: no-repeat;
}
</style>

@ -1,5 +1,5 @@
<template>
<div class="w-[116.94vh] h-[85.51vh] bgRightMidBox">
<div class=" bgRightMidBox">
<section class="h-full" ref="echartsContainer"></section>
</div>
</template>
@ -16,19 +16,19 @@ export default {
isLoding: false,
chartOptions: {
grid: {
width: '86%',
height: '80%',
top: '14%',
width: '90%',
height: '87%',
top: '10%',
left: '7%',
},
legend: {
data: [],
selectedMode: 'none',
top: '6%',
selectedMode: false,
top: '3%',
right: '4%',
textStyle: {
color: '#fff',
fontSize: 14,
fontFamily: 'DIN-Bold,Microsoft YaHei',
color: '#675C88',
fontSize: 12,
},
},
xAxis: {
@ -58,7 +58,6 @@ export default {
color: '#B7BDBF',
fontSize: 12,
margin: 16,
fontFamily: 'DIN-Bold,Microsoft YaHei',
},
},
series: [],
@ -136,6 +135,8 @@ export default {
this.formatLegendData();
// series
this.chartOptions.series = this.seriesData(timeArr);
console.log(this.chartOptions);
chart.setOption(this.chartOptions);
},
onGetPageData() {
@ -278,14 +279,19 @@ export default {
}, this.$store.getters.intervalTime);
}
});
window.addEventListener("resize", () => {
chart.resize();
});
},
};
</script>
<style>
<style lang="scss" scoped>
.bgRightMidBox {
width: vw(1270);
height: vh(904);
background-image: url('@/assets/svg/Room/RightMid/Box.svg');
background-size: contain;
background-size: 103%;
background-position: center;
background-repeat: no-repeat;
}

@ -4,7 +4,7 @@
margin: 0 auto;
position: relative;
background-image: url('@/assets/svg/Schedule/Box.svg');
background-size: cover;
background-size: 101%;
background-position: center;
background-repeat: no-repeat;

Loading…
Cancel
Save