feat:对接首台率接口

main
@0Melon0 11 months ago
parent 6980ce819e
commit cf96e155b6

@ -1,69 +1,42 @@
<!DOCTYPE html>
<html>
<head>
<title>Speech Synthesis Example</title>
</head>
<body>
<h1>Speech Synthesis Example</h1>
<input type="text" id="text" value="请0的家属到手术室门口接病人" />
<br />
<label for="rate">Rate:</label>
<input type="number" id="rate" value="1" step="0.1" min="0.1" max="10" />
<br />
<label for="voice">Voice:</label>
<select id="voiceSelect"></select>
<br />
<button onclick="speakText()">Speak</button>
<script>
const synth = window.speechSynthesis;
const voiceSelect = document.getElementById('voiceSelect');
function populateVoiceList() {
const voices = synth.getVoices();
console.log(voices);
if (voices.length === 0) {
synth.onvoiceschanged = populateVoiceList;
} else {
voiceSelect.innerHTML = ''; // 清空之前的选项
voices.forEach((voice, index) => {
const option = document.createElement('option');
option.textContent = `${voice.name} (${voice.lang})`;
console.log(`${voice.name} (${voice.lang})`);
option.value = index;
voiceSelect.appendChild(option);
});
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>unicode-bidi 示例</title>
<style>
.normal {
unicode-bidi: normal;
direction: ltr;
}
.embed {
unicode-bidi: embed;
direction: rtl;
}
populateVoiceList();
if (typeof synth.onvoiceschanged !== 'undefined') {
synth.onvoiceschanged = populateVoiceList;
.isolate {
unicode-bidi: isolate;
direction: rtl;
}
function speakText() {
window.speechSynthesis.cancel(); // 清除之前的语音合成
setTimeout(() => {
const textInput = document.getElementById('text').value;
const rate = parseFloat(document.getElementById('rate').value);
const utterance = new SpeechSynthesisUtterance([textInput, textInput, textInput].join(''));
const selectedVoiceIndex = voiceSelect.selectedOptions[0].value;
const voices = synth.getVoices();
utterance.voice = voices[selectedVoiceIndex];
utterance.rate = rate;
utterance.onend = function (event) {
console.log('Speech has finished.');
alert('Speech has finished.');
};
window.speechSynthesis.speak(utterance);
}, 100); // 延迟 100 毫秒
.bidi-override {
unicode-bidi: bidi-override;
direction: rtl;
}
</script>
</body>
.isolate-override {
unicode-bidi: isolate-override;
direction: rtl;
}
.plaintext {
unicode-bidi: plaintext;
direction: rtl;
}
</style>
</head>
<body>
<p class="normal">normal: This is an English text with عربى text embedded.</p>
<p class="embed">embed: This is an English text with عربى text embedded.</p>
<p class="isolate">isolate: This is an English text with عربى text embedded.</p>
<p class="bidi-override">bidi-override: This is an English text with عربى text embedded.</p>
<p class="isolate-override">isolate-override: This is an English text with عربى text embedded.</p>
<p class="plaintext">plaintext: This is an English text with عربى text embedded.</p>
</body>
</html>

@ -0,0 +1,22 @@
import _axios from '@/utils/_axios';
/**
* 获取首台准点率列表(右边)
*/
export const GetMonitorOperationCount = date => {
return _axios({
url: '/api/QualityMicroservice/Monitor/GetMonitorFirstOperation',
params: {
date,
},
});
};
/**
* 半年内首台准点率(左下角)
*/
export const GetMonitorFirstOperationMonth = () => {
return _axios({
url: '/api/QualityMicroservice/Monitor/GetMonitorFirstOperationMonth',
});
};

@ -78,7 +78,9 @@ export default {
methods: {
onGetPageData() {
let nowDay = dayjs().format('YYYY-MM-DD');
if (this.$store.getters.isMock) {
nowDay = '2024-06-06';
}
GetMonitorOperationCount(nowDay).then(res => {
this.overviewData[0]['itemVal'] = res['data']['firstPunctualityRate'].slice(0, -1);
this.overviewData[1]['itemVal'] = res['data']['roomUserRate'].slice(0, -1);

@ -13,34 +13,6 @@
<span class="text-[1.85vh] text-[#B53FDF] youshe text-nowrap">{{ subItem['operStatusName'] }}</span>
</div>
</div>
<!-- <div v-if="index % 3" class="w-[12.59vh] h-[9.81vh] ItemBox relative" :key="index">
<p class="absolute w-[10.74vh] h-[2.77vh] leading--[2.77vh] text-[1.85vh] left-[0.92vh] top-[0.74vh] text-center youshe PBg">
OR-{{ String(index + 1).padStart(3, '0') }}
</p>
<div class="absolute w-[8.51vh] h-[2.77vh] left-[2.03vh] bottom-[1.48vh] flex justify-between items-end">
<img src="@/assets/svg/Monitor/TopRight/OpingIcon.svg" />
<span class="text-[1.85vh] text-[#B53FDF] youshe">手术中</span>
</div>
</div>
<div v-else-if="index % 5" class="w-[12.59vh] h-[9.81vh] ItemBox relative" :key="index">
<p class="absolute w-[10.74vh] h-[2.77vh] leading--[2.77vh] text-[1.85vh] left-[0.92vh] top-[0.74vh] text-center youshe PBg">
OR-{{ String(index + 1).padStart(3, '0') }}
</p>
<div class="absolute w-[10.27vh] h-[2.77vh] left-[1.2vh] bottom-[1.48vh] flex justify-between items-end">
<img src="@/assets/svg/Monitor/TopRight/OpendIcon.svg" />
<span class="text-[1.85vh] text-[#946FEC] youshe">麻醉结束</span>
</div>
</div>
<div v-else class="w-[12.59vh] h-[9.81vh] ItemBox relative" :key="index">
<p class="absolute w-[10.74vh] h-[2.77vh] leading--[2.77vh] text-[1.85vh] left-[0.92vh] top-[0.74vh] text-center youshe PBg">
OR-{{ String(index + 1).padStart(3, '0') }}
</p>
<div class="absolute w-[8.51vh] h-[2.77vh] left-[2.03vh] bottom-[1.48vh] flex justify-between items-end">
<img src="@/assets/svg/Monitor/TopRight/OpWaitIcon.svg" />
<span class="text-[1.85vh] text-[#0CFFFF] youshe">空置中</span>
</div>
</div> -->
</template>
</section>
</el-carousel-item>
@ -62,7 +34,9 @@ export default {
methods: {
onGetPageData() {
let nowDay = dayjs().format('YYYY-MM-DD');
if (this.$store.getters.isMock) {
nowDay = '2024-06-06';
}
GetMonitorOperationRoomStatus(nowDay).then(res => {
this.formatData(res['data']);
this.isLoading = false;

@ -1,11 +1,13 @@
<template>
<div class="h-[32.4vh] mt-[2.77vh] bgLeftBottomBox pt-[3.24vh]">
<div class="h-[32.4vh] mt-[2.77vh] bgLeftBottomBox pt-[3.24vh]" v-loading="isLoading">
<div class="w-[43.79vh] h-[26.85vh] mx-auto" ref="echartsContainer"></div>
</div>
</template>
<script>
import * as echarts from 'echarts';
import { GetMonitorFirstOperationMonth } from '@/api/operation';
let chart = null;
export default {
data() {
return {
@ -68,12 +70,26 @@ export default {
},
],
},
isLoading: true,
};
},
mounted() {
const chartContainer = this.$refs.echartsContainer;
const chart = echarts.init(chartContainer);
methods: {
onGetPageData() {
GetMonitorFirstOperationMonth().then(res => {
this.chartOptions['xAxis']['data'] = [];
this.chartOptions['series'][0]['data'] = [];
res['data'].forEach(item => {
this.chartOptions['xAxis']['data'].push(item['monthName']);
this.chartOptions['series'][0]['data'].push(item['firstPunctualityRate'].slice(0, -1));
});
chart.setOption(this.chartOptions);
this.isLoading = false;
});
},
},
mounted() {
chart = echarts.init(this.$refs.echartsContainer);
this.onGetPageData();
},
};
</script>

@ -1,5 +1,5 @@
<template>
<div class="h-[48.79vh] bgLeftTopBox p-[1.85vh]">
<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 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>
@ -7,7 +7,7 @@
<img src="@/assets/svg/Monitor/TopLeft/TrianglePurple.svg" />
<span class="youshe text-[1.75vh] ml-[1.11vh] opacity-80">总人数</span>
</div>
<p class="text-[#733FF3] text-[4.07vh] mt-[1.4vh] youshe leading-none">350</p>
<p class="text-[#733FF3] text-[4.07vh] mt-[1.4vh] youshe leading-none">{{ totalPopulation }}</p>
</section>
<section>
<template v-for="(item, index) in peopleData">
@ -29,6 +29,9 @@
<script>
import * as echarts from 'echarts';
import { GetMonitorOperationCount } from '@/api/monitor';
import dayjs from 'dayjs';
let chart = null;
export default {
data() {
return {
@ -124,12 +127,29 @@ export default {
itemVal: '300',
},
],
totalPopulation: 0,
isLoading: true,
};
},
mounted() {
const chartContainer = this.$refs.echartsContainer;
const chart = echarts.init(chartContainer);
methods: {
onGetPageData() {
let nowDay = dayjs().format('YYYY-MM-DD');
if (this.$store.getters.isMock) {
nowDay = '2024-06-06';
}
GetMonitorOperationCount(nowDay).then(res => {
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);
this.isLoading = false;
});
},
},
mounted() {
chart = echarts.init(this.$refs.echartsContainer);
this.onGetPageData();
},
};
</script>

@ -13,20 +13,25 @@
</div>
</div>
<div class="h-[72.58vh]">
<el-carousel direction="vertical" :autoplay="false" :interval="5000" indicatorPosition="none">
<el-carousel-item v-for="item in 1" :key="item">
<template v-for="(item, index) in 14">
<el-carousel direction="vertical" :autoplay="true" :interval="15000" indicatorPosition="none">
<el-carousel-item v-for="(item, index) in scheduList" :key="index">
<template v-for="(subItem, index) in item">
<div class="h-[4.44vh] leading-[4.44vh] mt-[0.74vh] text-center itemStyle" :key="index">
<div class="inline-block">
<div class="inline-block w-[11.11vh] text-[1.48vh] panmen">R-{{ String(index + 1).padStart(3, '0') }}</div>
<div class="inline-block w-[16.51vh] text-[1.48vh]">阑尾切除术</div>
<div class="inline-block w-[13.11vh] text-[1.48vh] align-middle">
<img class="mx-auto" src="@/assets/svg/Operation/RightMid/Emergency.svg" />
<div class="inline-block align-top w-[11.11vh] text-[1.48vh] panmen">{{ subItem['roomName'] }}</div>
<div class="inline-block align-top w-[16.51vh] text-[1.48vh] px-1">
<marquee scrollamount="2">{{ subItem['operationName'] }}</marquee>
</div>
<div class="inline-block align-middle w-[13.11vh] text-[1.48vh]">
<img class="mx-auto" src="@/assets/svg/Operation/RightMid/Emergency.svg" v-if="subItem['OperationType']" />
<img class="mx-auto" src="@/assets/svg/Operation/RightMid/Other.svg" v-else />
</div>
<div class="inline-block align-top w-[16.66vh] text-[1.48vh]">{{ formatData(subItem['InDateTime']) }}</div>
<div class="inline-block align-top w-[16.66vh] text-[1.48vh]">{{ formatData(subItem['AnesStartTime']) }}</div>
<div class="inline-block align-top w-[16.66vh] text-[1.48vh]">{{ formatData(subItem['OperStartTime']) }}</div>
<div class="inline-block align-top w-[11.11vh] text-[1.48vh]" :class="subItem['IsFirstOnTime'] ? 'text-[#349AFC]' : 'text-[#A53FAF]'">
{{ subItem['IsFirstOnTime'] ? '准点' : '不准点' }}
</div>
<div class="inline-block w-[16.66vh] text-[1.48vh]">2023-02-20 12:23:34</div>
<div class="inline-block w-[16.66vh] text-[1.48vh]">2023-02-20 12:24:34</div>
<div class="inline-block w-[16.66vh] text-[1.48vh]">2023-02-20 12:24:34</div>
<div class="inline-block w-[11.11vh] text-[1.48vh] text-[#349AFC]">准点</div>
</div>
</div>
</template>
@ -39,7 +44,42 @@
<script>
import { Carousel, CarouselItem } from 'element-ui';
import { GetMonitorOperationCount } from '@/api/operation';
import dayjs from 'dayjs';
export default {
data() {
return {
scheduList: [],
isLoading: true,
};
},
methods: {
onGetPageData() {
let nowDay = dayjs().format('YYYY-MM-DD');
if (this.$store.getters.isMock) {
nowDay = '2024-06-06';
}
GetMonitorOperationCount(nowDay).then(res => {
this.scheduList = [];
let group = 0;
for (let i = 0; i < res['data']['length']; i++) {
group = parseInt(i / 14);
if (this.scheduList[group]) {
this.scheduList[group].push(res['data'][i]);
} else {
this.scheduList[group] = [res['data'][i]];
}
}
this.isLoading = false;
});
},
formatData(date) {
return dayjs(date).format('YYYY-MM-DD HH:mm:ss');
},
},
mounted() {
this.onGetPageData();
},
components: {
'el-carousel': Carousel,
'el-carousel-item': CarouselItem,

Loading…
Cancel
Save