plg 11 ヶ月 前
コミット
ead713799c

BIN
src/renderer/assets/newAnimation/lanya1.png


BIN
src/renderer/assets/newAnimation/lanyaActive1.png


+ 100 - 162
src/renderer/components/AnimationDes.vue

@@ -9,166 +9,82 @@
       </el-col>
       <el-col :span="1">&nbsp;</el-col>
     </el-row> -->
-    <el-row>
-      <el-col :span="1"> &nbsp; </el-col>
-      <el-col :span="22">
+
+
+    <div class="main_sp">
+      <div style="flex:1"></div>
+      <div class="main_second">
         <div class="select_class_animation">
           <span class="desSty">选择设备</span>&nbsp;
-          <el-select
-            v-model="equipment"
-            placeholder="请选择"
-            class="selectSty"
-            size="medium"
-            @change="equipmentFun"
-          >
-            <el-option
-              class="select_option"
-              v-for="item in optionsEquipment"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            >
+          <el-select v-model="equipment" placeholder="请选择" class="selectSty" size="mini" @change="equipmentFun">
+            <el-option class="select_option" v-for="item in optionsEquipment" :key="item.value" :label="item.label"
+              :value="item.value">
             </el-option>
           </el-select>
           &nbsp;&nbsp;&nbsp;&nbsp;
           <span class="desSty">游戏难度</span>&nbsp;
-          <el-select
-            v-model="gameDifficulty"
-            placeholder="请选择"
-            class="selectSty"
-            size="medium"
-            @change="gameDiffFun"
-          >
-            <el-option
-              v-for="item in difficultyOptions"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            >
+          <el-select v-model="gameDifficulty" placeholder="请选择" class="selectSty" size="mini" @change="gameDiffFun">
+            <el-option v-for="item in difficultyOptions" :key="item.value" :label="item.label" :value="item.value">
             </el-option>
           </el-select>
           &nbsp;&nbsp;&nbsp;&nbsp;
           <span class="desSty">游戏时间</span>&nbsp;
-          <el-select
-            v-model="gameTime"
-            placeholder="请选择"
-            class="selectSty"
-            size="medium"
-            @change="gameTimeFun"
-          >
-            <el-option
-              v-for="item in timeOptions"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            >
+          <el-select v-model="gameTime" placeholder="请选择" class="selectSty" size="mini" @change="gameTimeFun">
+            <el-option v-for="item in timeOptions" :key="item.value" :label="item.label" :value="item.value">
             </el-option>
           </el-select>
           &nbsp;&nbsp;&nbsp;&nbsp;
           <div class="equipment_status">
-            <span
+            <!-- <span
               class="desSty"
               v-show="linkStatus"
               :style="{ color: linkStatus ? '#0FB577' : '#000000' }"
               >设备已连接:</span
-            >
-            <span class="desSty" v-show="!linkStatus">设备未连接:</span>
-            <img
-              v-show="!linkStatus"
-              @click="openTableFun"
-              style="width: 14px; height: 20px; color: #ffffff"
-              src="../assets/newAnimation/lanya.png"
-            />
-            <img
-              v-show="linkStatus"
-              @click="openTableFun"
-              style="width: 14px; height: 20px; color: #ffffff"
-              src="../assets/newAnimation/lanyaActive.png"
-            />
+            > -->
+            <!-- <span class="desSty" v-show="!linkStatus">设备未连接:</span> -->
+            <img v-show="!linkStatus" @click="openTableFun" style="width: 70px; height: 24px; color: #ffffff"
+              src="../assets/newAnimation/lanya1.png" />
+            <img v-show="linkStatus" @click="openTableFun" style="width: 70px; height: 24px; color: #ffffff"
+              src="../assets/newAnimation/lanyaActive1.png" />
           </div>
           &nbsp;&nbsp;&nbsp;&nbsp;
-          <span
-            class="desSty"
-            @click="viewEchartsFun"
-            :style="{ color: linkStatus ? '#0FB577' : '#000000' }"
-            >查看波形图</span
-          >
+          <i class="el-icon-search" @click="viewEchartsFun(1)" style="margin-left:2px;font-size: 12px;"
+            :style="{ color: linkStatus ? '#1FD18E' : '#1FD18E' }"></i>&nbsp;
+          <span class="desSty" @click="viewEchartsFun"
+            :style="{ color: linkStatus ? '#1FD18E' : '#1FD18E' }">查看波形图</span>
           &nbsp;&nbsp;&nbsp;&nbsp;
-          <span
-            style="font-size: 12px"
-            v-show="equipment == '2' && pulseTimeNum < 180 && pulseTimeNum > 0"
-            >还剩{{ timeShow }}开始</span
-          >
-          <span
-            style="font-size: 12px"
-            v-show="buttonFlag == '结束' && gameTimeTimerFlag"
-            >{{ timeShow }}</span
-          >
+          <span style="font-size: 12px" v-show="equipment == '2' && pulseTimeNum < 180 && pulseTimeNum > 0">还剩{{
+      timeShow }}开始
+          </span>
+          <span style="font-size: 12px" v-show="buttonFlag == '结束' && gameTimeTimerFlag">{{ timeShow }}</span>
           <div class="animation-middle-m">&nbsp;</div>
-          <el-button
-            @click="startTest"
-            size="small"
-            class="xl_animation_button"
-            style="float: right; font-size: 12px"
-            >{{ buttonFlag }}</el-button
-          >
+          <el-button @click="startTest" size="small" class="xl_animation_button"
+            style="float: right; font-size: 12px">{{ buttonFlag }}</el-button>
         </div>
-        <!-- <el-button @click="send"></el-button> -->
-        <el-row> </el-row>
-        <el-row> </el-row>
-        <el-row>
-          <el-col :span="24">
-            <div
-              class="flood-plan-page"
-              ref="animationFlow"
-              style="display: block; height: 72vh; margin-top: 10px"
-            >
-              <iframe
-                scrolling="no"
-                :src="urlThreeP"
-                ref="unityIframe"
-                frameborder="0"
-                :width="widthIframe"
-                :height="heightIframe"
-              >
-              </iframe>
-            </div>
-          </el-col>
-        </el-row>
-      </el-col>
-      <el-col :span="1"> &nbsp; </el-col>
-    </el-row>
-
-    <el-dialog
-      title="提示"
-      :visible.sync="tableVisible"
-      width="60%"
-      center
-      :before-close="closeScan"
-    >
+
+
+
+        <div class="flood-plan-page" ref="animationFlow">
+          <iframe scrolling="no" :src="urlThreeP" ref="unityIframe" frameborder="0" :width="widthIframe"
+            :height="heightIframe">
+          </iframe>
+        </div>
+      </div>
+      <div style="flex:1"></div>
+
+
+    </div>
+
+    <el-dialog title="提示" :visible.sync="tableVisible" width="60%" center :before-close="closeScan">
       <span>
-        <el-table
-          :data="mergeData"
-          style="width: 100%; height: 400px"
-          :header-cell-style="{
-            background: '#66B497',
-            color: '#FFFFFF',
-            'letter-spacing': '4px',
-          }"
-        >
-          <el-table-column
-            prop="rssi"
-            align="center"
-            label="信号强度"
-            :formatter="rssiFor"
-          >
+        <el-table :data="mergeData" style="width: 100%; height: 400px" :header-cell-style="{
+      background: '#66B497',
+      color: '#FFFFFF',
+      'letter-spacing': '4px',
+    }">
+          <el-table-column prop="rssi" align="center" label="信号强度" :formatter="rssiFor">
           </el-table-column>
-          <el-table-column
-            prop="deviceType"
-            align="center"
-            label="类型"
-            :formatter="typeFormatter"
-          >
+          <el-table-column prop="deviceType" align="center" label="类型" :formatter="typeFormatter">
           </el-table-column>
           <!-- <el-table-column
                 prop="Name"
@@ -183,16 +99,9 @@
 
           <el-table-column label="操作" align="center">
             <template slot-scope="scope">
-              <el-button
-                :disabled="buttonLinkFlag"
-                class="xl_d_button"
-                size="mini"
-                slot="reference"
-                @click="linkJudge(scope.$index, scope.row, scope.row.connect)"
-              >
-                <span v-if="scope.row.connect">断开连接</span
-                ><span v-if="!scope.row.connect">连接</span></el-button
-              >
+              <el-button :disabled="buttonLinkFlag" class="xl_d_button" size="mini" slot="reference"
+                @click="linkJudge(scope.$index, scope.row, scope.row.connect)">
+                <span v-if="scope.row.connect">断开连接</span><span v-if="!scope.row.connect">连接</span></el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -493,7 +402,7 @@ export default {
 
     //进入生物反馈页面扫描设备
     // this.queryScan();
-    that.listTimeFlag = setInterval(that.connectList, 2000);
+    that.listTimeFlag = setInterval(that.connectList, 6000);
     that.timeSendFlag = setInterval(that.sendAtten, 1000);
     that.ecgTimeFlag = setInterval(that.readFile, 5000);
   },
@@ -512,7 +421,7 @@ export default {
     this.closeScan();
     this.disconnectDevice();
   },
-  destroyed() {},
+  destroyed() { },
   methods: {
     initHRV(event, arg) {
       let that = this;
@@ -898,7 +807,7 @@ export default {
       let that = this;
       this.disabledTimeFlag = setTimeout(() => {
         this.buttonLinkFlag = false;
-      }, 5000);
+      }, 8000);
     },
     //断开连接的脑电
     disconnectEquipment(val) {
@@ -915,9 +824,15 @@ export default {
     //查询连接列表
     connectList() {
       let that = this;
-      that.$http.getTmp(`v2/device/connected/list`, {}, (res) => {
-        //判断当前的列表是否存在该用户已点击的列表
-      });
+      //判断窗口是否打开
+      //如果窗口是打开状态则,开始调用
+      if (this.tableVisible) {
+        that.$http.getTmp(`v2/device/connected/list`, {}, (res) => {
+          //判断当前的列表是否存在该用户已点击的列表
+        });
+      }
+
+
     },
     typeFormatter(val) {
       if (val.type == "1") {
@@ -934,14 +849,15 @@ export default {
     //开启扫描扫描
     queryScan() {
       let that = this;
-      that.$http.getTmp(`/v2/device/scan`, {}, (res) => {});
+      that.$http.getTmp(`/v2/device/scan`, {}, (res) => { });
     },
 
     //关闭扫描
     closeScan() {
+
       this.tableVisible = false;
       let that = this;
-      that.$http.getTmp(`/v2/device/stop/scan`, {}, (res) => {});
+      that.$http.getTmp(`/v2/device/stop/scan`, {}, (res) => { });
     },
     //进来后先连接websocket
     //连上后进行扫描
@@ -950,7 +866,7 @@ export default {
     //初始化websocket
     initWebsocket() {
       // const wsuri = "ws://192.168.1.103:8000/ws?uid=client&to_uid=server";
-        const wsuri = "ws://127.0.0.1:8000/ws?uid=client&to_uid=server";
+      const wsuri = "ws://127.0.0.1:8000/ws?uid=client&to_uid=server";
       // const wsuri = "ws://localhost:8000/ws?uid=client&to_uid=server";
       // const wsuri = "ws://192.168.1.13:8000/ws?uid=client&to_uid=server";
       this.websock = new WebSocket(wsuri);
@@ -1614,12 +1530,12 @@ export default {
       console.log(params);
       console.log("游戏和数据保存");
     },
-    setUrl() {},
+    setUrl() { },
     getSize() {
       let width = this.$refs.animationFlow.clientWidth;
-      let height = this.$refs.animationFlow.clientHeight - 20;
+      let height = this.$refs.animationFlow.clientHeight - 40;
       this.widthIframe = width;
-      this.heightIframe = height + 20;
+      this.heightIframe = height;
       this.changeSize(width, height);
     },
     changeSize(width, height) {
@@ -1675,7 +1591,7 @@ export default {
           break;
         default:
           // this.urlThreeP = "../../../static/loong_3/index.html";
-        this.urlThreeP = __static + "/loong_3/index.html";
+          this.urlThreeP = __static + "/loong_3/index.html";
       }
       this.gameScene = val;
       this.flag = this.gameScene;
@@ -2349,7 +2265,8 @@ export default {
 
 .main_right_height {
   height: 100vh !important;
-  display: block !important;
+  display: flex !important;
+  flex-direction: column;
   overflow-y: auto !important;
   background: #ffffff;
 }
@@ -2383,7 +2300,9 @@ canvas {
 }
 
 .flood-plan-page {
-  /* margin-top:20px; */
+  margin-top:20px;
+  flex: 1;
+  width: 100%;
 }
 
 .selectSty {
@@ -2398,8 +2317,7 @@ canvas {
   /* color: #0f0f0f; */
 }
 
-.animation_fk {
-}
+.animation_fk {}
 
 .select_option {
   font-size: 10px;
@@ -2422,4 +2340,24 @@ canvas {
   height: 30vh;
   width: 100%;
 }
+
+.main_sp {
+  display: flex;
+  flex: 1;
+
+  flex-direction: row;
+
+}
+
+.main_top {
+  display: flex;
+  flex-direction: column;
+  flex: 1;
+}
+
+.main_second {
+  display: flex;
+  flex-direction: column;
+  flex:22;
+}
 </style>

+ 122 - 225
src/renderer/components/AnimationDouble.vue

@@ -1,208 +1,98 @@
 <template>
   <div class="main_right_height">
     <TopDes :flag="true" topDesFont="生物反馈记录"></TopDes>
-    <el-row>
-      <el-col :span="1"> &nbsp; </el-col>
-      <el-col :span="22">
+
+    <div class='main_sp'>
+      <div style="flex:1"></div>
+      <div class="main_second">
+
         <div class="select_class_animation">
           <span class="desSty">选择设备</span>&nbsp;
-          <el-select
-            v-model="equipment"
-            placeholder="请选择"
-            class="selectSty"
-            size="medium"
-            @change="equipmentFun"
-          >
-            <el-option
-              class="select_option"
-              v-for="item in optionsEquipment"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            >
+          <el-select v-model="equipment" placeholder="请选择" class="selectSty" size="mini" @change="equipmentFun">
+            <el-option class="select_option" v-for="item in optionsEquipment" :key="item.value" :label="item.label"
+              :value="item.value">
             </el-option>
           </el-select>
           &nbsp;&nbsp;&nbsp;&nbsp;
           <span class="desSty">游戏难度</span>&nbsp;
-          <el-select
-            v-model="gameDifficulty"
-            placeholder="请选择"
-            class="selectSty"
-            size="medium"
-            @change="gameDiffFun"
-          >
-            <el-option
-              v-for="item in difficultyOptions"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            >
+          <el-select v-model="gameDifficulty" placeholder="请选择" class="selectSty" size="mini" @change="gameDiffFun">
+            <el-option v-for="item in difficultyOptions" :key="item.value" :label="item.label" :value="item.value">
             </el-option>
           </el-select>
           &nbsp;&nbsp;&nbsp;&nbsp;
           <span class="desSty">游戏时间</span>&nbsp;
-          <el-select
-            v-model="gameTime"
-            placeholder="请选择"
-            class="selectSty"
-            size="medium"
-            @change="gameTimeFun"
-          >
-            <el-option
-              v-for="item in timeOptions"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            >
+          <el-select v-model="gameTime" placeholder="请选择" class="selectSty" size="mini" @change="gameTimeFun">
+            <el-option v-for="item in timeOptions" :key="item.value" :label="item.label" :value="item.value">
             </el-option>
           </el-select>
 
           &nbsp;&nbsp;&nbsp;&nbsp;
-          <span
-            style="font-size: 12px"
-            v-show="equipment == '2' && pulseTimeNum < 180 && pulseTimeNum > 0"
-            >还剩{{ timeShow }}开始</span
-          >
-          <span
-            style="font-size: 12px"
-            v-show="buttonFlag == '结束' && gameTimeTimerFlag"
-            >{{ timeShow }}</span
-          >
+          <span style="font-size: 12px" v-show="equipment == '2' && pulseTimeNum < 180 && pulseTimeNum > 0">还剩{{
+      timeShow }}开始</span>
+          <span style="font-size: 12px" v-show="buttonFlag == '结束' && gameTimeTimerFlag">{{ timeShow }}</span>
           <div class="animation-middle-m">&nbsp;</div>
-          <el-button
-            @click="startTest"
-            size="small"
-            class="xl_animation_button"
-            style="float: right; font-size: 12px"
-            >{{ buttonFlag }}</el-button
-          >
+          <el-button @click="startTest" size="small" class="xl_animation_button"
+            style="float: right; font-size: 12px">{{ buttonFlag }}</el-button>
         </div>
-      </el-col>
-      <el-col :span="1"> &nbsp; </el-col>
-    </el-row>
-    <el-row>
-      <el-col :span="1"> &nbsp; </el-col>
-      <el-col :span="22">
         <div class="select_class_animation" style="margin-top: 10px">
           <div class="equipment_status">
             <div class="desSty">用户编号:</div>
-            <div class="desSty">{{ userLink.num }}</div>
+            <div class="desSty user_num" v-show="userLink.num != ''">{{ userLink.num }}</div>
+            <!-- <div class="desSty user_num" v-show="true">{{ '111111111111111111111111' }}</div> -->
             &nbsp;&nbsp;&nbsp;&nbsp;
-            <span
-              class="desSty"
-              v-show="userLink.linkStatus"
-              :style="{ color: userLink.linkStatus ? '#0FB577' : '#000000' }"
-              >设备已连接:</span
-            >
-            <span class="desSty" v-show="!userLink.linkStatus">设备未连接:</span>
-            <img
-              v-show="!userLink.linkStatus"
-              @click="openTableFun(1)"
-              style="width: 14px; height: 20px; color: #ffffff"
-              src="../assets/newAnimation/lanya.png"
-            />
-            <img
-              v-show="userLink.linkStatus"
-              @click="openTableFun(1)"
-              style="width: 14px; height: 20px; color: #ffffff"
-              src="../assets/newAnimation/lanyaActive.png"
-            />
+            <!-- <span class="desSty" v-show="userLink.linkStatus"
+              :style="{ color: userLink.linkStatus ? '#0FB577' : '#000000' }">设备已连接:</span>
+            <span class="desSty" v-show="!userLink.linkStatus">设备未连接:</span> -->
+            <img v-show="!userLink.linkStatus" @click="openTableFun(1)"
+              style="width: 70px; height: 24px; color: #ffffff" src="../assets/newAnimation/lanya1.png" />
+            <img v-show="userLink.linkStatus" @click="openTableFun(1)" style="width: 70px; height: 24px; color: #ffffff"
+              src="../assets/newAnimation/lanyaActive1.png" />
           </div>
           &nbsp;&nbsp;&nbsp;&nbsp;
-          <span
-            class="desSty"
-            @click="viewEchartsFun(1)"
-            :style="{ color: userLink.linkStatus ? '#0FB577' : '#000000' }"
-            >查看波形图</span
-          >
+          <i class="el-icon-search" @click="viewEchartsFun(1)" style="margin-left:2px;font-size: 12px;"
+            :style="{ color: linkStatus ? '#1FD18E' : '#1FD18E' }"></i>&nbsp;
+          <span class="desSty" @click="viewEchartsFun(1)"
+            :style="{ color: userLink.linkStatus ? '#1FD18E' : '#1FD18E' }">查看波形图</span>
           &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
           <div class="equipment_status">
             <div class="desSty">用户编号:</div>
             <div class="desSty">{{ userTwoLink.num }}</div>
             &nbsp;&nbsp;&nbsp;&nbsp;
-            <span
-              class="desSty"
-              v-show="userTwoLink.linkStatus"
-              :style="{ color: userTwoLink.linkStatus ? '#0FB577' : '#000000' }"
-              >设备已连接:</span
-            >
-            <span class="desSty" v-show="!userTwoLink.linkStatus">设备未连接:</span>
-            <img
-              v-show="!userTwoLink.linkStatus"
-              @click="openTableFun(2)"
-              style="width: 14px; height: 20px; color: #ffffff"
-              src="../assets/newAnimation/lanya.png"
-            />
-            <img
-              v-show="userTwoLink.linkStatus"
-              @click="openTableFun(2)"
-              style="width: 14px; height: 20px; color: #ffffff"
-              src="../assets/newAnimation/lanyaActive.png"
-            />
+            <!-- <span class="desSty" v-show="userTwoLink.linkStatus"
+              :style="{ color: userTwoLink.linkStatus ? '#0FB577' : '#000000' }">设备已连接:</span>
+            <span class="desSty" v-show="!userTwoLink.linkStatus">设备未连接:</span> -->
+            <img v-show="!userTwoLink.linkStatus" @click="openTableFun(2)"
+              style="width: 70px; height: 24px; color: #ffffff" src="../assets/newAnimation/lanya1.png" />
+            <img v-show="userTwoLink.linkStatus" @click="openTableFun(2)"
+              style="width: 70px; height: 24px; color: #ffffff" src="../assets/newAnimation/lanyaActive1.png" />
           </div>
           &nbsp;&nbsp;&nbsp;&nbsp;
-          <span
-            class="desSty"
-            @click="viewEchartsFun(2)"
-            :style="{ color: userTwoLink.linkStatus ? '#0FB577' : '#000000' }"
-            >查看波形图</span
-          >
+          <i class="el-icon-search" @click="viewEchartsFun(1)" style="margin-left:2px;font-size: 12px;"
+            :style="{ color: linkStatus ? '#1FD18E' : '#1FD18E' }"></i>&nbsp;
+          <span class="desSty" @click="viewEchartsFun(2)"
+            :style="{ color: userTwoLink.linkStatus ? '#1FD18E' : '#1FD18E' }">查看波形图</span>
         </div>
-      </el-col>
-      <el-col :span="1"> &nbsp; </el-col>
-    </el-row>
-    <el-row>
-      <el-col :span="1">&nbsp;</el-col>
-      <el-col :span="22">
-        <div
-          class="flood-plan-page"
-          ref="animationFlow"
-          style="display: block; height: 70vh; margin-top: 10px"
-        >
-          <iframe
-            scrolling="no"
-            :src="urlThreeP"
-            ref="unityIframe"
-            frameborder="0"
-            :width="widthIframe"
-            :height="heightIframe"
-          >
+
+
+        <div class="flood-plan-page" ref="animationFlow">
+          <iframe scrolling="no" :src="urlThreeP" ref="unityIframe" frameborder="0" :width="widthIframe"
+            :height="heightIframe">
           </iframe>
         </div>
-      </el-col>
-      <el-col :span="1">&nbsp;</el-col>
-    </el-row>
-
-    <el-dialog
-      title="提示"
-      :visible.sync="tableVisible"
-      width="60%"
-      center
-      :before-close="closeScan"
-    >
+
+      </div>
+      <div style="flex:1"></div>
+    </div>
+    <el-dialog title="提示" :visible.sync="tableVisible" width="60%" center :before-close="closeScan">
       <span>
-        <el-table
-          :data="mergeData"
-          style="width: 100%; max-height: 400px; overflow-y: auto"
-          :header-cell-style="{
-            background: '#66B497',
-            color: '#FFFFFF',
-            'letter-spacing': '4px',
-          }"
-        >
-          <el-table-column
-            prop="rssi"
-            align="center"
-            label="信号强度"
-            :formatter="rssiFormatter"
-          >
+        <el-table :data="mergeData" style="width: 100%; max-height: 400px; overflow-y: auto" :header-cell-style="{
+      background: '#66B497',
+      color: '#FFFFFF',
+      'letter-spacing': '4px',
+    }">
+          <el-table-column prop="rssi" align="center" label="信号强度" :formatter="rssiFormatter">
           </el-table-column>
-          <el-table-column
-            prop="deviceType"
-            align="center"
-            label="类型"
-            :formatter="typeFormatter"
-          >
+          <el-table-column prop="deviceType" align="center" label="类型" :formatter="typeFormatter">
           </el-table-column>
           <el-table-column prop="userNum" align="center" label="已绑用户">
           </el-table-column>
@@ -210,16 +100,9 @@
 
           <el-table-column label="操作" align="center">
             <template slot-scope="scope">
-              <el-button
-                :disabled="buttonLinkFlag"
-                class="xl_d_button"
-                size="mini"
-                slot="reference"
-                @click="linkJudge(scope.row, scope.row.connect)"
-              >
-                <span v-if="scope.row.connect">断开连接</span
-                ><span v-if="!scope.row.connect">连接</span></el-button
-              >
+              <el-button :disabled="buttonLinkFlag" class="xl_d_button" size="mini" slot="reference"
+                @click="linkJudge(scope.row, scope.row.connect)">
+                <span v-if="scope.row.connect">断开连接</span><span v-if="!scope.row.connect">连接</span></el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -232,29 +115,17 @@
     <!-- 用户选择框 -->
     <el-dialog title="选择连接用户" :visible.sync="userVisible" width="50%" center>
       <span>
-        <el-input
-          style="width: 180px; margin-bottom: 10px"
-          placeholder="请输入搜索内容"
-          v-model="nameSearch"
-          prefix-icon="el-icon-search"
-          @input="searchUser"
-          size="small"
-        >
+        <el-input style="width: 180px; margin-bottom: 10px" placeholder="请输入搜索内容" v-model="nameSearch"
+          prefix-icon="el-icon-search" @input="searchUser" size="small">
         </el-input>
-        <el-table
-          :data="userData"
-          style="width: 100%; max-height: 300px; overflow-y: auto"
-          :header-cell-style="{
-            background: '#66B497',
-            color: '#FFFFFF',
-            'letter-spacing': '4px',
-          }"
-        >
+        <el-table :data="userData" style="width: 100%; max-height: 300px; overflow-y: auto" :header-cell-style="{
+      background: '#66B497',
+      color: '#FFFFFF',
+      'letter-spacing': '4px',
+    }">
           <el-table-column>
             <template slot-scope="scope">
-              <el-radio v-model="selectUserRadio" :label="scope.row.identifier"
-                >&nbsp;</el-radio
-              >
+              <el-radio v-model="selectUserRadio" :label="scope.row.identifier">&nbsp;</el-radio>
             </template>
           </el-table-column>
           <el-table-column prop="userName" align="center" label="姓名"> </el-table-column>
@@ -262,14 +133,8 @@
           </el-table-column>
         </el-table>
         <p align="center" style="margin-bottom: 40px">
-          <el-pagination
-            @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
-            :current-page="pageNum"
-            :page-size="pageSize"
-            layout="total,  prev, pager, next, jumper"
-            :total="totolSize"
-          >
+          <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum"
+            :page-size="pageSize" layout="total,  prev, pager, next, jumper" :total="totolSize">
           </el-pagination>
         </p>
       </span>
@@ -499,8 +364,8 @@ export default {
       focusNao: [],
       // 全量
       focusNaoAll: [],
-      // urlThreeP: "../../../static/tianping/index.html",
-      urlThreeP: __static + "/tianping/index.html",
+      urlThreeP: "../../../static/tianping/index.html",
+      // urlThreeP: __static + "/tianping/index.html",
       pubsrc: __static,
       userLink: {
         num: "",
@@ -694,7 +559,7 @@ export default {
     this.initWebsocket();
     //当点击开始时调用方法开发发送游戏数据
     //上来就查询已连接列表
-    that.listTimeFlag = setInterval(that.connectList, 2000);
+    that.listTimeFlag = setInterval(that.connectList, 6000);
     //根据扫描列表和已连接列表看看哪些是重复的//重复的就是已连接的
     that.mergeTimeFlag = setInterval(that.mergeDataFun, 1000);
     that.attentionTime = setInterval(that.sendAtten, 1000);
@@ -718,7 +583,7 @@ export default {
     ipcRenderer.removeListener("ecg_two_data", this.initTwoHRV);
     this.disconnectDevice();
   },
-  destroyed() {},
+  destroyed() { },
   methods: {
     initHRV(event, arg) {
       let that = this;
@@ -1030,12 +895,12 @@ export default {
     //开启扫描
     queryScan() {
       let that = this;
-      that.$http.getTmp(`/v2/device/scan`, {}, (res) => {});
+      that.$http.getTmp(`/v2/device/scan`, {}, (res) => { });
     },
     closeScan() {
       this.tableVisible = false;
       let that = this;
-      that.$http.getTmp(`/v2/device/stop/scan`, {}, (res) => {});
+      that.$http.getTmp(`/v2/device/stop/scan`, {}, (res) => { });
     },
     searchUser() {
       this.pageNum = 1;
@@ -1537,7 +1402,7 @@ export default {
       let that = this;
       this.disabledTimeFlag = setTimeout(() => {
         this.buttonLinkFlag = false;
-      }, 5000);
+      }, 8000);
     },
     //断开连接的脑电
     disconnectEquipment(val) {
@@ -1554,9 +1419,13 @@ export default {
     //查询连接列表
     connectList() {
       let that = this;
-      that.$http.getTmp(`v2/device/connected/list`, {}, (res) => {
-        //判断当前的列表是否存在该用户已点击的列表
-      });
+      if (that.tableVisible) {
+        that.$http.getTmp(`v2/device/connected/list`, {}, (res) => {
+          //判断当前的列表是否存在该用户已点击的列表
+        });
+      }
+
+
     },
     typeFormatter(val) {
       if (val.type == "1") {
@@ -2297,12 +2166,12 @@ export default {
       this.clearFirstDataFun();
       this.clearSecondDataFun();
     },
-    setUrl() {},
+    setUrl() { },
     getSize() {
       let width = this.$refs.animationFlow.clientWidth;
-      let height = this.$refs.animationFlow.clientHeight - 20;
+      let height = this.$refs.animationFlow.clientHeight - 40;
       this.widthIframe = width;
-      this.heightIframe = height + 20;
+      this.heightIframe = height;
       this.changeSize(width, height);
     },
     changeSize(width, height) {
@@ -2322,8 +2191,8 @@ export default {
       this.clearDataFun();
       switch (val) {
         case 1:
-          this.urlThreeP = __static + "/tianping/index.html";
-          // this.urlThreeP = "../../../static/tianping/index.html";
+          // this.urlThreeP = __static + "/tianping/index.html";
+          this.urlThreeP = "../../../static/tianping/index.html";
           this.delayTime();
           break;
         case 2:
@@ -3706,16 +3575,20 @@ export default {
   flex-direction: row;
   align-items: center;
 }
+
 .main_right_height {
   height: 100vh !important;
-  display: block !important;
+  display: flex !important;
+  flex-direction: column;
   overflow-y: auto !important;
   background: #ffffff;
 }
+
 canvas {
   /* width: 100%;
   height: 100%; */
 }
+
 .main-unity {
   margin-top: 10px;
 }
@@ -3724,49 +3597,73 @@ canvas {
 .footer {
   text-align: center;
 }
+
 .fullscreen {
   margin-top: 25px !important;
 
   text-align: center !important;
   display: none !important;
 }
+
 .musicTitle {
   display: block;
   font-size: 18px;
   color: #57acbb;
   margin-bottom: 5px;
 }
+
 .flood-plan-page {
-  /* margin-top:20px; */
+  margin-top: 20px;
+  flex: 1;
+  width: 100%;
 }
+
 .selectSty {
   width: 100px;
   font-size: 14px;
 }
+
 .desSty {
   font-size: 12px;
   font-family: Source Han Sans CN-Regular, Source Han Sans CN;
   font-weight: 500;
   /* color: #0f0f0f; */
 }
-.animation_fk {
-}
+
+.animation_fk {}
+
 .select_option {
   font-size: 10px;
 }
+
 .select_class_animation {
   display: flex;
   flex-direction: row;
   align-items: center;
 }
+
 .animation-middle-m {
   display: flex;
   flex-direction: row;
   flex: 1;
 }
+
 .naoOneClass {
   width: 100%;
   height: 30vh;
   width: 100%;
 }
+
+.user_num {
+  background-color: #F5F5F5;
+  padding: 4px;
+}
+
+.main_sp {
+  display: flex;
+  flex: 1;
+
+  flex-direction: row;
+
+}
 </style>

+ 2 - 2
src/renderer/components/ManageEquipment.vue

@@ -174,7 +174,7 @@ export default {
     this.queryEle();
     //根据扫描列表和已连接列表看看哪些是重复的//重复的就是已连接的
     that.mergeTimeFlag = setInterval(that.mergeDataFun, 1000);
-    that.listTimeFlag = setInterval(that.connectList, 2000);
+    that.listTimeFlag = setInterval(that.connectList, 6000);
   },
   beforeDestroy() {
     clearTimeout(this.mergeTimeFlag);
@@ -243,7 +243,7 @@ export default {
       let that = this;
       this.disabledTimeFlag = setTimeout(() => {
         this.buttonLinkFlag = false;
-      }, 5000);
+      }, 8000);
     },
     linkFun(index, val) {
       let that = this;