修改部分逻辑
This commit is contained in:
parent
fa6681a2d7
commit
a3d6c5e534
|
@ -3,7 +3,7 @@
|
||||||
<el-row :gutter="10" style="padding: 10px; opacity: 0.9">
|
<el-row :gutter="10" style="padding: 10px; opacity: 0.9">
|
||||||
<el-col :span="18">
|
<el-col :span="18">
|
||||||
<el-card style="margin-top: 10px">
|
<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>
|
<video ref="video" autoplay></video>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
height="250"
|
height="250"
|
||||||
></canvas>
|
></canvas>
|
||||||
<div style="align-items: center">
|
<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 style="margin-top: 10px" type="danger" @click="Alert()"
|
||||||
>医疗出警</el-button
|
>医疗出警</el-button
|
||||||
>
|
>
|
||||||
|
@ -82,17 +82,13 @@ export default {
|
||||||
};
|
};
|
||||||
socket.onmessage = function (message) {
|
socket.onmessage = function (message) {
|
||||||
console.log(message.data);
|
console.log(message.data);
|
||||||
if (message.data == "二级") {
|
if (message.data == "一级") {
|
||||||
that.isShow = true;
|
|
||||||
that.color = "#CCCC00";
|
|
||||||
that.issues();
|
|
||||||
that.solve();
|
|
||||||
} else if (message.data == "一级") {
|
|
||||||
that.issues();
|
that.issues();
|
||||||
that.isShow = true;
|
that.isShow = true;
|
||||||
that.color = "red";
|
that.color = "red";
|
||||||
that.solve();
|
|
||||||
that.alarmSound();
|
that.alarmSound();
|
||||||
|
}else{
|
||||||
|
that.color = "green";
|
||||||
}
|
}
|
||||||
|
|
||||||
socket.onerror = function () {
|
socket.onerror = function () {
|
||||||
|
|
|
@ -78,7 +78,6 @@ export default {
|
||||||
that.isShow = true;
|
that.isShow = true;
|
||||||
that.color = "#CCCC00";
|
that.color = "#CCCC00";
|
||||||
that.issues();
|
that.issues();
|
||||||
that.solve();
|
|
||||||
} else if (message.data == "一级") {
|
} else if (message.data == "一级") {
|
||||||
that.isShow = true;
|
that.isShow = true;
|
||||||
that.color = "red";
|
that.color = "red";
|
||||||
|
@ -88,6 +87,8 @@ export default {
|
||||||
}, 500);
|
}, 500);
|
||||||
that.issues();
|
that.issues();
|
||||||
|
|
||||||
|
}else if(message.data == "三级"){
|
||||||
|
that.color = "green";
|
||||||
}
|
}
|
||||||
|
|
||||||
socket.onerror = function () {
|
socket.onerror = function () {
|
||||||
|
|
Loading…
Reference in New Issue