|
@@ -167,7 +167,7 @@
|
|
<span
|
|
<span
|
|
style="cursor: pointer"
|
|
style="cursor: pointer"
|
|
class="desSty"
|
|
class="desSty"
|
|
- @click="viewEchartsFun(2)"
|
|
|
|
|
|
+ @click="viewEchartsFun(1)"
|
|
:style="{ color: userTwoLink.linkStatus ? '#1FD18E' : '#1FD18E' }"
|
|
:style="{ color: userTwoLink.linkStatus ? '#1FD18E' : '#1FD18E' }"
|
|
>查看波形图</span
|
|
>查看波形图</span
|
|
>
|
|
>
|
|
@@ -212,12 +212,7 @@
|
|
:formatter="rssiFormatter"
|
|
:formatter="rssiFormatter"
|
|
>
|
|
>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- prop="aliasName"
|
|
|
|
- align="center"
|
|
|
|
- label="名称"
|
|
|
|
-
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column prop="aliasName" align="center" label="名称">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="deviceType"
|
|
prop="deviceType"
|
|
@@ -307,21 +302,44 @@
|
|
:visible.sync="echartsVisible"
|
|
:visible.sync="echartsVisible"
|
|
width="90%"
|
|
width="90%"
|
|
center
|
|
center
|
|
- >
|
|
|
|
- <div class="dialog_height">
|
|
|
|
- <div class="outPage" v-show="equipment == '1'">
|
|
|
|
- <div id="eegOne" class="naoOneClass"></div>
|
|
|
|
- </div>
|
|
|
|
- <div class="outPage" v-show="equipment == '1'">
|
|
|
|
- <div id="eegTwo" class="naoOneClass"></div>
|
|
|
|
- </div>
|
|
|
|
- <div class="outThreePage" v-show="equipment == '1'">
|
|
|
|
- <div id="eegThree" class="naoOneClass"></div>
|
|
|
|
|
|
+ >
|
|
|
|
+ <div class="dialog_all1">
|
|
|
|
+ <div style="flex:1">用户编号:{{userLink.num}}</div>
|
|
|
|
+ <div style="flex:1">用户编号{{userTwoLink.num}}</div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="dialog_all">
|
|
|
|
+ <div class="dialog_height">
|
|
|
|
+
|
|
|
|
+ <div class="outPage" v-show="equipment == '1'">
|
|
|
|
+ <div id="eegOne" class="naoOneClass"></div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="outPage" v-show="equipment == '1'">
|
|
|
|
+ <div id="eegTwo" class="naoOneClass"></div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="outThreePage" v-show="equipment == '1'">
|
|
|
|
+ <div id="eegThree" class="naoOneClass"></div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="outPage" v-show="equipment == '2'">
|
|
|
|
+ <div id="ecgOne" class="naoOneClass" style="height: 500px"></div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- <div class="outPage" v-show="equipment == '2'">
|
|
|
|
- <div id="ecgOne" class="naoOneClass" style="height: 500px"></div>
|
|
|
|
|
|
+ <div class="dialog_height">
|
|
|
|
+ <div class="outPage" v-show="equipment == '1'">
|
|
|
|
+ <div id="eegOneSecond" class="naoOneClass"></div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="outPage" v-show="equipment == '1'">
|
|
|
|
+ <div id="eegTwoSecond" class="naoOneClass"></div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="outThreePage" v-show="equipment == '1'">
|
|
|
|
+ <div id="eegThreeSecond" class="naoOneClass"></div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="outPage" v-show="equipment == '2'">
|
|
|
|
+ <div id="ecgTwo" class="naoOneClass" style="height: 500px"></div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="echartsVisible = false">取 消</el-button>
|
|
<el-button @click="echartsVisible = false">取 消</el-button>
|
|
<el-button type="primary" @click="echartsVisible = false">确 定</el-button>
|
|
<el-button type="primary" @click="echartsVisible = false">确 定</el-button>
|
|
@@ -558,7 +576,7 @@ export default {
|
|
userLink: {
|
|
userLink: {
|
|
num: "",
|
|
num: "",
|
|
mac: "",
|
|
mac: "",
|
|
- aliasName:'',
|
|
|
|
|
|
+ aliasName: "",
|
|
linkStatus: false,
|
|
linkStatus: false,
|
|
ecgAllList: [], //心电数据部分
|
|
ecgAllList: [], //心电数据部分
|
|
ecgSectionList: [], //心电数据全部
|
|
ecgSectionList: [], //心电数据全部
|
|
@@ -568,7 +586,7 @@ export default {
|
|
userTwoLink: {
|
|
userTwoLink: {
|
|
num: "",
|
|
num: "",
|
|
mac: "",
|
|
mac: "",
|
|
- aliasName:'',
|
|
|
|
|
|
+ aliasName: "",
|
|
linkStatus: false,
|
|
linkStatus: false,
|
|
ecgAllList: [], //心电数据部分
|
|
ecgAllList: [], //心电数据部分
|
|
ecgSectionList: [], //心电数据全部
|
|
ecgSectionList: [], //心电数据全部
|
|
@@ -713,7 +731,7 @@ export default {
|
|
that.echartsTwo.resize();
|
|
that.echartsTwo.resize();
|
|
that.echartsThree.resize();
|
|
that.echartsThree.resize();
|
|
}
|
|
}
|
|
- if (that.echartsSecondVisible) {
|
|
|
|
|
|
+ if (that.echartsVisible) {
|
|
that.echartsOneSecond.resize();
|
|
that.echartsOneSecond.resize();
|
|
that.echartsTwoSecond.resize();
|
|
that.echartsTwoSecond.resize();
|
|
that.echartsThreeSecond.resize();
|
|
that.echartsThreeSecond.resize();
|
|
@@ -723,7 +741,7 @@ export default {
|
|
if (that.echartsVisible) {
|
|
if (that.echartsVisible) {
|
|
that.echartsEcg.resize();
|
|
that.echartsEcg.resize();
|
|
}
|
|
}
|
|
- if (that.echartsSecondVisible) {
|
|
|
|
|
|
+ if (that.echartsVisible) {
|
|
that.echartsEcgTwo.resize();
|
|
that.echartsEcgTwo.resize();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1017,7 +1035,7 @@ export default {
|
|
this.send(one);
|
|
this.send(one);
|
|
let left = `Player1,${this.userLink.num}, ${a},${this.userLink.aliasName}`;
|
|
let left = `Player1,${this.userLink.num}, ${a},${this.userLink.aliasName}`;
|
|
let right = `Player2,${this.userTwoLink.num},${b},${this.userTwoLink.aliasName}`;
|
|
let right = `Player2,${this.userTwoLink.num},${b},${this.userTwoLink.aliasName}`;
|
|
- console.log(left,right)
|
|
|
|
|
|
+ console.log(left, right);
|
|
this.sendTarget(left, right);
|
|
this.sendTarget(left, right);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -1041,7 +1059,7 @@ export default {
|
|
for (let i = 0; i < scanDataTmpFin.length; i++) {
|
|
for (let i = 0; i < scanDataTmpFin.length; i++) {
|
|
let obj = {
|
|
let obj = {
|
|
rssi: "",
|
|
rssi: "",
|
|
- aliasName:'',
|
|
|
|
|
|
+ aliasName: "",
|
|
name: "",
|
|
name: "",
|
|
mac: "",
|
|
mac: "",
|
|
connect: false,
|
|
connect: false,
|
|
@@ -1124,7 +1142,7 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
for (let k = 0; k < currentDeviceList.length; k++) {
|
|
for (let k = 0; k < currentDeviceList.length; k++) {
|
|
- if (that.userLink.mac !== "" && (that.userLink.mac == currentDeviceList[k].mac)) {
|
|
|
|
|
|
+ if (that.userLink.mac !== "" && that.userLink.mac == currentDeviceList[k].mac) {
|
|
currentDeviceList[k].userNum = that.userLink.num;
|
|
currentDeviceList[k].userNum = that.userLink.num;
|
|
}
|
|
}
|
|
if (
|
|
if (
|
|
@@ -1410,7 +1428,7 @@ export default {
|
|
this.focusNaoSecond.shift();
|
|
this.focusNaoSecond.shift();
|
|
}
|
|
}
|
|
// this.numEleDom = this.focusNaoAll.length.toString();
|
|
// this.numEleDom = this.focusNaoAll.length.toString();
|
|
- if (this.echartsSecondVisible) {
|
|
|
|
|
|
+ if (this.echartsVisible) {
|
|
//console.log(this.attentionDataAllSecond.length);
|
|
//console.log(this.attentionDataAllSecond.length);
|
|
this.renderEegOneSecond();
|
|
this.renderEegOneSecond();
|
|
this.renderEegTwoSecond();
|
|
this.renderEegTwoSecond();
|
|
@@ -1521,7 +1539,7 @@ export default {
|
|
this.focusNaoSecond.shift();
|
|
this.focusNaoSecond.shift();
|
|
}
|
|
}
|
|
// this.numEleDom = this.focusNaoAll.length.toString();
|
|
// this.numEleDom = this.focusNaoAll.length.toString();
|
|
- if (this.echartsSecondVisible) {
|
|
|
|
|
|
+ if (this.echartsVisible) {
|
|
//console.log(this.attentionDataAllSecond.length);
|
|
//console.log(this.attentionDataAllSecond.length);
|
|
this.renderEegOneSecond();
|
|
this.renderEegOneSecond();
|
|
this.renderEegTwoSecond();
|
|
this.renderEegTwoSecond();
|
|
@@ -1543,70 +1561,62 @@ export default {
|
|
//如果是脑电的话,需要判断是用户1还是用户2
|
|
//如果是脑电的话,需要判断是用户1还是用户2
|
|
//如果是心电的话,需要判断是用户1还是用户2
|
|
//如果是心电的话,需要判断是用户1还是用户2
|
|
if (this.equipment == "1") {
|
|
if (this.equipment == "1") {
|
|
- if (val == 1) {
|
|
|
|
- if (this.echartsOne == null) {
|
|
|
|
- this.echartsOne = echarts.init(document.getElementById("eegOne"));
|
|
|
|
- this.echartsTwo = echarts.init(document.getElementById("eegTwo"));
|
|
|
|
- this.echartsThree = echarts.init(document.getElementById("eegThree"));
|
|
|
|
- this.renderEegOne();
|
|
|
|
- this.renderEegTwo();
|
|
|
|
- this.renderEegThree();
|
|
|
|
- setTimeout(() => {
|
|
|
|
- this.echartsOne.resize();
|
|
|
|
- this.echartsTwo.resize();
|
|
|
|
- this.echartsThree.resize();
|
|
|
|
- }, 1000);
|
|
|
|
- } else {
|
|
|
|
|
|
+ if (this.echartsOne == null) {
|
|
|
|
+ this.echartsOne = echarts.init(document.getElementById("eegOne"));
|
|
|
|
+ this.echartsTwo = echarts.init(document.getElementById("eegTwo"));
|
|
|
|
+ this.echartsThree = echarts.init(document.getElementById("eegThree"));
|
|
|
|
+ this.renderEegOne();
|
|
|
|
+ this.renderEegTwo();
|
|
|
|
+ this.renderEegThree();
|
|
|
|
+ setTimeout(() => {
|
|
this.echartsOne.resize();
|
|
this.echartsOne.resize();
|
|
this.echartsTwo.resize();
|
|
this.echartsTwo.resize();
|
|
this.echartsThree.resize();
|
|
this.echartsThree.resize();
|
|
- }
|
|
|
|
|
|
+ }, 1000);
|
|
} else {
|
|
} else {
|
|
- if (this.echartsOneSecond == null) {
|
|
|
|
- this.echartsOneSecond = echarts.init(
|
|
|
|
- document.getElementById("eegOneSecond")
|
|
|
|
- );
|
|
|
|
- this.echartsTwoSecond = echarts.init(
|
|
|
|
- document.getElementById("eegTwoSecond")
|
|
|
|
- );
|
|
|
|
- this.echartsThreeSecond = echarts.init(
|
|
|
|
- document.getElementById("eegThreeSecond")
|
|
|
|
- );
|
|
|
|
- this.renderEegOneSecond();
|
|
|
|
- this.renderEegTwoSecond();
|
|
|
|
- this.renderEegThreeSecond();
|
|
|
|
- setTimeout(() => {
|
|
|
|
- this.echartsOneSecond.resize();
|
|
|
|
- this.echartsTwoSecond.resize();
|
|
|
|
- this.echartsThreeSecond.resize();
|
|
|
|
- }, 1000);
|
|
|
|
- } else {
|
|
|
|
|
|
+ this.echartsOne.resize();
|
|
|
|
+ this.echartsTwo.resize();
|
|
|
|
+ this.echartsThree.resize();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (this.echartsOneSecond == null) {
|
|
|
|
+ this.echartsOneSecond = echarts.init(document.getElementById("eegOneSecond"));
|
|
|
|
+ this.echartsTwoSecond = echarts.init(document.getElementById("eegTwoSecond"));
|
|
|
|
+ this.echartsThreeSecond = echarts.init(
|
|
|
|
+ document.getElementById("eegThreeSecond")
|
|
|
|
+ );
|
|
|
|
+ this.renderEegOneSecond();
|
|
|
|
+ this.renderEegTwoSecond();
|
|
|
|
+ this.renderEegThreeSecond();
|
|
|
|
+ setTimeout(() => {
|
|
this.echartsOneSecond.resize();
|
|
this.echartsOneSecond.resize();
|
|
this.echartsTwoSecond.resize();
|
|
this.echartsTwoSecond.resize();
|
|
this.echartsThreeSecond.resize();
|
|
this.echartsThreeSecond.resize();
|
|
- }
|
|
|
|
|
|
+ }, 1000);
|
|
|
|
+ } else {
|
|
|
|
+ this.echartsOneSecond.resize();
|
|
|
|
+ this.echartsTwoSecond.resize();
|
|
|
|
+ this.echartsThreeSecond.resize();
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- if (val == 1) {
|
|
|
|
- if (this.echartsEcg == null) {
|
|
|
|
- this.echartsEcg = echarts.init(document.getElementById("ecgOne"));
|
|
|
|
- this.renderEcgOne();
|
|
|
|
- setTimeout(() => {
|
|
|
|
- this.echartsEcg.resize();
|
|
|
|
- }, 1000);
|
|
|
|
- } else {
|
|
|
|
|
|
+ if (this.echartsEcg == null) {
|
|
|
|
+ this.echartsEcg = echarts.init(document.getElementById("ecgOne"));
|
|
|
|
+ this.renderEcgOne();
|
|
|
|
+ setTimeout(() => {
|
|
this.echartsEcg.resize();
|
|
this.echartsEcg.resize();
|
|
- }
|
|
|
|
|
|
+ }, 1000);
|
|
} else {
|
|
} else {
|
|
- if (this.echartsEcgTwo == null) {
|
|
|
|
- this.echartsEcgTwo = echarts.init(document.getElementById("ecgTwo"));
|
|
|
|
- this.renderEcgTwo();
|
|
|
|
- setTimeout(() => {
|
|
|
|
- this.echartsEcgTwo.resize();
|
|
|
|
- }, 1000);
|
|
|
|
- } else {
|
|
|
|
|
|
+ this.echartsEcg.resize();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (this.echartsEcgTwo == null) {
|
|
|
|
+ this.echartsEcgTwo = echarts.init(document.getElementById("ecgTwo"));
|
|
|
|
+ this.renderEcgTwo();
|
|
|
|
+ setTimeout(() => {
|
|
this.echartsEcgTwo.resize();
|
|
this.echartsEcgTwo.resize();
|
|
- }
|
|
|
|
|
|
+ }, 1000);
|
|
|
|
+ } else {
|
|
|
|
+ this.echartsEcgTwo.resize();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 先调用
|
|
// 先调用
|
|
@@ -1789,7 +1799,7 @@ export default {
|
|
} else if (redata.msgType == "eegData") {
|
|
} else if (redata.msgType == "eegData") {
|
|
// let dataLin = JSON.parse(redata.content);
|
|
// let dataLin = JSON.parse(redata.content);
|
|
///先判断第一个用户是否有mac---有mac代表已连接
|
|
///先判断第一个用户是否有mac---有mac代表已连接
|
|
- if (that.userLink.mac !== "" && (that.userLink.mac == dataLin.id)) {
|
|
|
|
|
|
+ if (that.userLink.mac !== "" && that.userLink.mac == dataLin.id) {
|
|
ipcRenderer.send("asynchronoushrv-naoData", {
|
|
ipcRenderer.send("asynchronoushrv-naoData", {
|
|
value: dataLin.value,
|
|
value: dataLin.value,
|
|
mac: dataLin.id,
|
|
mac: dataLin.id,
|
|
@@ -1811,7 +1821,7 @@ export default {
|
|
//当该用户的mac与id相同时,取这个数据
|
|
//当该用户的mac与id相同时,取这个数据
|
|
// console.log(dataLin.id === that.userLink.mac);
|
|
// console.log(dataLin.id === that.userLink.mac);
|
|
//用户1
|
|
//用户1
|
|
- if (that.userLink.mac !== "" && (dataLin.id === that.userLink.mac)) {
|
|
|
|
|
|
+ if (that.userLink.mac !== "" && dataLin.id === that.userLink.mac) {
|
|
// let list = dataLin.value.split(",");
|
|
// let list = dataLin.value.split(",");
|
|
let list = JSON.parse(dataLin.value);
|
|
let list = JSON.parse(dataLin.value);
|
|
// console.log(list)
|
|
// console.log(list)
|
|
@@ -1849,7 +1859,7 @@ export default {
|
|
}
|
|
}
|
|
if (that.userTwoLink.ecgAllList.length % 100 == 0) {
|
|
if (that.userTwoLink.ecgAllList.length % 100 == 0) {
|
|
// console.log(that.ecgAllList.length);
|
|
// console.log(that.ecgAllList.length);
|
|
- if (that.echartsSecondVisible && that.equipment == "2") {
|
|
|
|
|
|
+ if (that.echartsVisible && that.equipment == "2") {
|
|
that.renderEcgTwo();
|
|
that.renderEcgTwo();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1933,7 +1943,7 @@ export default {
|
|
if (that.userLink.mac == mac) {
|
|
if (that.userLink.mac == mac) {
|
|
that.userLink.linkStatus = false;
|
|
that.userLink.linkStatus = false;
|
|
that.userLink.mac = "";
|
|
that.userLink.mac = "";
|
|
- that.userLink.aliasName='';
|
|
|
|
|
|
+ that.userLink.aliasName = "";
|
|
}
|
|
}
|
|
if (that.userTwoLink.mac == mac) {
|
|
if (that.userTwoLink.mac == mac) {
|
|
that.userTwoLink.linkStatus = false;
|
|
that.userTwoLink.linkStatus = false;
|
|
@@ -4287,9 +4297,10 @@ canvas {
|
|
}
|
|
}
|
|
|
|
|
|
.naoOneClass {
|
|
.naoOneClass {
|
|
|
|
+ /* width:200px; */
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 30vh;
|
|
height: 30vh;
|
|
- width: 100%;
|
|
|
|
|
|
+ /* width: 100%; */
|
|
}
|
|
}
|
|
|
|
|
|
.user_num {
|
|
.user_num {
|
|
@@ -4306,6 +4317,7 @@ canvas {
|
|
.dialog_height {
|
|
.dialog_height {
|
|
height: 500px;
|
|
height: 500px;
|
|
overflow: auto;
|
|
overflow: auto;
|
|
|
|
+ flex: 1;
|
|
}
|
|
}
|
|
.dialog_bo1 .el-dialog__title {
|
|
.dialog_bo1 .el-dialog__title {
|
|
line-height: 20px;
|
|
line-height: 20px;
|
|
@@ -4313,7 +4325,18 @@ canvas {
|
|
color: #303133;
|
|
color: #303133;
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+.dialog_all{
|
|
|
|
+ display:flex;
|
|
|
|
+ flex-direction: row;
|
|
|
|
+ height:500px;
|
|
|
|
+}
|
|
|
|
+.dialog_all1{
|
|
|
|
+ display:flex;
|
|
|
|
+ flex-direction: row;
|
|
|
|
+ height:20px;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+}
|
|
.dialog_bo2 .el-dialog__title {
|
|
.dialog_bo2 .el-dialog__title {
|
|
line-height: 20px;
|
|
line-height: 20px;
|
|
font-size: 20px;
|
|
font-size: 20px;
|