修改部分逻辑

This commit is contained in:
Cool 2024-07-05 17:29:03 +08:00
parent fa6681a2d7
commit a3d6c5e534
2 changed files with 7 additions and 10 deletions

View File

@ -3,7 +3,7 @@
<el-row :gutter="10" style="padding: 10px; opacity: 0.9">
<el-col :span="18">
<el-card style="margin-top: 10px">
<div style="width: 100%; max-width: 900px">
<div v-show="isShow" style="width: 100%; max-width: 900px">
<video ref="video" autoplay></video>
</div>
</el-card>
@ -19,7 +19,7 @@
height="250"
></canvas>
<div style="align-items: center">
<alarm v-if="isShow" :backgroudColor="color" :size="80">!</alarm>
<alarm v-show="isShow" :backgroudColor="color" :size="80">!</alarm>
<el-button style="margin-top: 10px" type="danger" @click="Alert()"
>医疗出警</el-button
>
@ -82,17 +82,13 @@ export default {
};
socket.onmessage = function (message) {
console.log(message.data);
if (message.data == "二级") {
that.isShow = true;
that.color = "#CCCC00";
that.issues();
that.solve();
} else if (message.data == "一级") {
if (message.data == "一级") {
that.issues();
that.isShow = true;
that.color = "red";
that.solve();
that.alarmSound();
}else{
that.color = "green";
}
socket.onerror = function () {

View File

@ -78,7 +78,6 @@ export default {
that.isShow = true;
that.color = "#CCCC00";
that.issues();
that.solve();
} else if (message.data == "一级") {
that.isShow = true;
that.color = "red";
@ -88,6 +87,8 @@ export default {
}, 500);
that.issues();
}else if(message.data == "三级"){
that.color = "green";
}
socket.onerror = function () {