|
@@ -82,11 +82,11 @@
|
|
|
v-show="equipment == '2' && pulseTimeNum < 180 && pulseTimeNum > 0"
|
|
|
>还剩{{ timeShow }}开始</span
|
|
|
> -->
|
|
|
- <!-- <span
|
|
|
+ <span
|
|
|
style="font-size: 12px"
|
|
|
v-show="buttonFlag == '结束' && gameTimeTimerFlag"
|
|
|
>{{ timeShow }}</span
|
|
|
- > -->
|
|
|
+ >
|
|
|
<div class="animation-middle-m"> </div>
|
|
|
<el-button
|
|
|
@click="startTest"
|
|
@@ -545,8 +545,8 @@ export default {
|
|
|
focusNao: [],
|
|
|
// 全量
|
|
|
focusNaoAll: [],
|
|
|
- // urlThreeP: "../../../static/tianping/index.html",
|
|
|
- urlThreeP: __static + "/tianping/index.html",
|
|
|
+ // urlThreeP: "../../../static/tianping1/index.html",
|
|
|
+ urlThreeP: __static + "/tianping1/index.html",
|
|
|
pubsrc: __static,
|
|
|
userLink: {
|
|
|
num: "",
|
|
@@ -974,21 +974,38 @@ export default {
|
|
|
|
|
|
//双人向传输数据
|
|
|
sendAtten() {
|
|
|
+ //如果是简单不变
|
|
|
+ //如果是普通就乘以0.9
|
|
|
+ //如果是困难就乘以0.8
|
|
|
+
|
|
|
+ let a=null;
|
|
|
+ let b=null;
|
|
|
+ if(this.gameDifficulty==1){
|
|
|
+ a=parseFloat(this.attentionAnimation / 100);
|
|
|
+ b=parseFloat(this.attentionSecondAnimation / 100);
|
|
|
+ }else if(this.gameDifficulty==2){
|
|
|
+ a=parseFloat(this.attentionAnimation / 100)*0.9
|
|
|
+ b=parseFloat(this.attentionSecondAnimation / 100)*0.9;
|
|
|
+ }else if(this.gameDifficulty==3){
|
|
|
+ a=parseFloat(this.attentionAnimation / 100)*0.8
|
|
|
+ b=parseFloat(this.attentionSecondAnimation / 100)*0.8;
|
|
|
+ }
|
|
|
+
|
|
|
let one =
|
|
|
- parseFloat(this.attentionAnimation / 100) +
|
|
|
+ a +
|
|
|
"," +
|
|
|
- parseFloat(this.attentionSecondAnimation / 100);
|
|
|
+ b;
|
|
|
// console.log(one);
|
|
|
//当按钮状态是结束时
|
|
|
if (this.buttonFlag == "结束") {
|
|
|
this.send(one);
|
|
|
- let left=`Player1,${this.userLink.num}, ${parseFloat(this.attentionAnimation / 100)},${this.userLink.mac}`;
|
|
|
- let right =`Player2,${this.userTwoLink.num},${parseFloat(this.attentionSecondAnimation / 100)},${this.userTwoLink.mac}`
|
|
|
- this.sendTarget();
|
|
|
+ let left = `Player1,${this.userLink.num}, ${a},${this.userLink.mac}`;
|
|
|
+ let right = `Player2,${this.userTwoLink.num},${b},${this.userTwoLink.mac}`;
|
|
|
+ this.sendTarget(left,right);
|
|
|
}
|
|
|
},
|
|
|
- sendTarget(valLeft,valRight){
|
|
|
- this.$refs.unityIframe.contentWindow.towPersion(valLeft,valRight);
|
|
|
+ sendTarget(valLeft, valRight) {
|
|
|
+ this.$refs.unityIframe.contentWindow.towPersion(valLeft, valRight);
|
|
|
},
|
|
|
//如果为0的话不显示
|
|
|
rssiFormatter(val) {
|
|
@@ -2083,6 +2100,7 @@ export default {
|
|
|
this.attentionAnimation = 0;
|
|
|
//脑电--第二个人的测试数据
|
|
|
this.attentionSecondAnimation = 0;
|
|
|
+
|
|
|
this.userLink = {
|
|
|
num: "",
|
|
|
mac: "",
|
|
@@ -2294,16 +2312,16 @@ export default {
|
|
|
// 保存脑电数据
|
|
|
//参数进行保存
|
|
|
//调用保存数据的方法
|
|
|
- that.saveAnimation(params);
|
|
|
+ that.saveAnimation();
|
|
|
}
|
|
|
if (this.equipment == 2) {
|
|
|
// 保存心电数据
|
|
|
//参数进行保存
|
|
|
|
|
|
//调用保存数据的方法
|
|
|
- that.saveAnimation(params);
|
|
|
+ that.saveAnimation();
|
|
|
}
|
|
|
- this.resetData();
|
|
|
+ // this.resetData();
|
|
|
}
|
|
|
}, 1000);
|
|
|
},
|
|
@@ -2378,6 +2396,8 @@ export default {
|
|
|
...params,
|
|
|
},
|
|
|
(res) => {
|
|
|
+ that.clearDataFun();
|
|
|
+ that.resetData();
|
|
|
if (res.data.code == 200) {
|
|
|
this.$message.success("记录保存成功");
|
|
|
// this.$message.success("保存成功");
|
|
@@ -2649,8 +2669,6 @@ export default {
|
|
|
this.saveAnimation();
|
|
|
}
|
|
|
//改变按钮状态
|
|
|
- this.clearDataFun();
|
|
|
- this.resetData();
|
|
|
}
|
|
|
},
|
|
|
//清除第一个图表
|
|
@@ -2761,9 +2779,11 @@ export default {
|
|
|
setUrl() {},
|
|
|
getSize() {
|
|
|
let that = this;
|
|
|
- that.visibleFlag = false;
|
|
|
+ // that.visibleFlag = false;
|
|
|
+ that.widthIframe = 100;
|
|
|
+ that.heightIframe = 100;
|
|
|
setTimeout(() => {
|
|
|
- that.visibleFlag = true;
|
|
|
+ // that.visibleFlag = true;
|
|
|
let width = this.$refs.animationFlow.clientWidth;
|
|
|
let height = this.$refs.animationFlow.clientHeight - 40;
|
|
|
that.widthIframe = width;
|
|
@@ -2791,8 +2811,8 @@ export default {
|
|
|
// this.clearDataFun();
|
|
|
switch (val) {
|
|
|
case 1:
|
|
|
- this.urlThreeP = __static + "/tianping/index.html";
|
|
|
- // this.urlThreeP = "../../../static/tianping/index.html";
|
|
|
+ this.urlThreeP = __static + "/tianping1/index.html";
|
|
|
+ // this.urlThreeP = "../../../static/tianping1/index.html";
|
|
|
this.delayTime();
|
|
|
break;
|
|
|
case 2:
|
|
@@ -2822,7 +2842,7 @@ export default {
|
|
|
break;
|
|
|
default:
|
|
|
// this.urlThreeP = this.pubSrc + "/candle/index.html";
|
|
|
- this.urlThreeP = __static + "/tianping/index.html";
|
|
|
+ this.urlThreeP = __static + "/tianping1/index.html";
|
|
|
}
|
|
|
this.gameScene = val;
|
|
|
this.flag = this.gameScene;
|