Quellcode durchsuchen

修改新需求

plg vor 10 Monaten
Ursprung
Commit
7f1736a686

+ 1 - 0
.gitignore

@@ -13,6 +13,7 @@ exe/mysql/mysql-5.7.24-winx64/bin/*
 !exe/mysql/mysql-5.7.24-winx64/bin/mysql_stop.bat
 exe/phoneApk
 exe/ct1
+exe/fx
 exe/bling.mp3
 exe/rpc_thrift.exe
 exe/healthKnowledge

Datei-Diff unterdrückt, da er zu groß ist
+ 509 - 380
src/main/index.js


BIN
src/renderer/assets/manage/dt.gif


+ 84 - 22
src/renderer/components/Animation.vue

@@ -1,18 +1,50 @@
 <template>
   <div class="main_right_height">
     <div class="main_tab_double">
-      <el-button :class="{
-        xl_tab_active_button: singlePeople,
-        xl_tab_button: singlePeople == false,
-      }" style="margin-right: 50px" @click="singlePeople = true">单人训练</el-button>
-      <el-button :class="{
-        xl_tab_active_button: singlePeople == false,
-        xl_tab_button: singlePeople,
-      }" @click="singlePeople = false">双人训练</el-button>
+      <el-button
+        :class="{
+          xl_tab_active_button: singlePeople == 0,
+          xl_tab_button: singlePeople != 0,
+        }"
+        style="margin-right: 50px"
+        @click="singlePeople = 0"
+        >单人训练</el-button
+      >
+      <el-button
+        :class="{
+          xl_tab_active_button: singlePeople == 1,
+          xl_tab_button: singlePeople != 1,
+        }"
+        @click="singlePeople = 1"
+        style="margin-right: 50px"
+        >双人训练</el-button
+      >
+
+      <el-button
+        :class="{
+          xl_tab_active_button: singlePeople == 2,
+          xl_tab_button: singlePeople != 2,
+        }"
+        @click="singlePeople = 2"
+        >自主神经稳定性训练</el-button
+      >
     </div>
 
-    <div :class="{animation_zong:true}">
-      <div class="animation_main" v-show="!singlePeople">
+    <div :class="{ animation_zong: true }">
+      <div class="animation_main" v-show="singlePeople == 2">
+        <div class="animation_k">
+          <el-button
+           @click="startFX"
+            icon="el-icon-video-play"
+            style="background-color: #1ba784; color: #fff; height: 200px; width: 200px;font-size:30px;
+    box-shadow:inset -15px 0px  10px -15px #000,inset 0px -15px 15px -15px #000;"
+            class="xl_tab_button"
+          >
+            启动</el-button
+          >
+        </div>
+      </div>
+      <div class="animation_main" v-show="singlePeople == 1">
         <div class="animation_k" @click="goPage('/menu/animationDes', 1)">
           <img class="animation_img_cla" src="../assets/newAnimation/tianping.png" />
           <div class="animation_des">&nbsp;</div>
@@ -24,31 +56,47 @@
           <span class="animation_des_font">双人奔跑</span>
         </div>
 
-        <div class="animation_k" @click="goPage('/menu/animationDes', 3)" style="visibility: hidden">
+        <div
+          class="animation_k"
+          @click="goPage('/menu/animationDes', 3)"
+          style="visibility: hidden"
+        >
           <img class="animation_img_cla" src="../assets/newAnimation/cat.png" />
           <div class="animation_des">&nbsp;</div>
           <span class="animation_des_font">心之花</span>
         </div>
       </div>
-      <div class="animation_main" v-show="!singlePeople">
-        <div class="animation_k" @click="goPage('/menu/animationDes', 1)" style="visibility: hidden">
+      <div class="animation_main" v-show="singlePeople == 1">
+        <div
+          class="animation_k"
+          @click="goPage('/menu/animationDes', 1)"
+          style="visibility: hidden"
+        >
           <img class="animation_img_cla" src="../assets/newAnimation/tianping.png" />
           <div class="animation_des">&nbsp;</div>
           <span class="animation_des_font">天平倾斜</span>
         </div>
-        <div class="animation_k" @click="goPage('/menu/animationDes', 2)" style="visibility: hidden">
+        <div
+          class="animation_k"
+          @click="goPage('/menu/animationDes', 2)"
+          style="visibility: hidden"
+        >
           <img class="animation_img_cla" src="../assets/newAnimation/run.png" />
           <div class="animation_des">&nbsp;</div>
           <span class="animation_des_font">双人奔跑</span>
         </div>
 
-        <div class="animation_k" @click="goPage('/menu/animationDes', 3)" style="visibility: hidden">
+        <div
+          class="animation_k"
+          @click="goPage('/menu/animationDes', 3)"
+          style="visibility: hidden"
+        >
           <img class="animation_img_cla" src="../assets/newAnimation/cat.png" />
           <div class="animation_des">&nbsp;</div>
           <span class="animation_des_font">心之花</span>
         </div>
       </div>
-      <div class="animation_main" v-show="singlePeople">
+      <div class="animation_main" v-show="singlePeople == 0">
         <div class="animation_k" @click="goPage('/menu/animationDes', 1)">
           <img class="animation_img_cla" src="../assets/newAnimation/long.png" />
           <div class="animation_des">&nbsp;</div>
@@ -66,7 +114,7 @@
           <span class="animation_des_font">天气变化</span>
         </div>
       </div>
-      <div class="animation_main" v-show="singlePeople">
+      <div class="animation_main" v-show="singlePeople == 0">
         <div class="animation_k" @click="goPage('/menu/animationDes', 4)">
           <img class="animation_img_cla" src="../assets/newAnimation/yanhua.png" />
           <div class="animation_des">&nbsp;</div>
@@ -79,24 +127,40 @@
         </div>
         <!-- display:none -->
         <!-- visibility: hidden -->
-        <div class="animation_k" @click="goPage('/menu/animationDes', 2)" style="visibility: hidden">
+        <div
+          class="animation_k"
+          @click="goPage('/menu/animationDes', 2)"
+          style="visibility: hidden"
+        >
           <img class="animation_img_cla" src="../assets/newAnimation/cat.png" />
           <div class="animation_des">&nbsp;</div>
           <span class="animation_des_font">别点我</span>
         </div>
       </div>
     </div>
-
   </div>
 </template>
 <script>
+
+//想主进程发送信息
+//主进程去启动服务
+const { ipcRenderer } = require("electron");
 export default {
   data() {
     return {
-      singlePeople: true,
+      singlePeople: 0,
     };
+  },
+  mounted(){
+
+  },
+  destroyed(){
+
   },
   methods: {
+    startFX(){
+      ipcRenderer.send("main-windows-fx-exe");
+    },
     goPage(val, typeName) {
       //当singlePeople 为false时跳进双人选择的界面
       if (this.singlePeople) {
@@ -240,8 +304,6 @@ export default {
   display: flex;
   flex-direction: column;
 
-
-
   flex: 1;
   padding-bottom: 20px;
 }

+ 51 - 41
src/renderer/components/AnimationDes.vue

@@ -136,24 +136,36 @@
         </div>
 
         <div class="flood-plan-page" ref="animationFlow">
+          <!-- <div style="flex: 1; background-color: red"></div> -->
           <iframe
+           style="flex:1"
             scrolling="yes"
             v-if="visibleFlag"
             :src="urlThreeP"
             ref="unityIframe"
-            width="100px"
             frameborder="0"
-            :width="widthIframe"
-            :height="heightIframe"
+           
           >
+          
           </iframe>
-          <div v-if="equipment == '2'" style="width:20vw;display:flex;justify-content: center;align-items:start;padding-left: 10px;">
-            <img src="../assets/manage/dt.gif" />
+          <div
+            v-if="equipment == '2'"
+
+            style="
+              border: 1px solid #EAE8E7;
+             padding:10px;
+              display: flex;
+              justify-content: start;
+              align-items: center;
+              flex-direction: column;
+            "
+          >
+           <span style="font-size:16px;margin-bottom:10px;color:#1FD18E">呼吸助手</span>
+            <img style="width:100px" src="../assets/manage/dt.gif" />
+            <span style="font-size:12px;margin-top:10px;color:#1FD18E">
+            呼吸周期10s</span>
           </div>
-         
-      
         </div>
-       
       </div>
       <div style="flex: 1">&nbsp;</div>
     </div>
@@ -182,12 +194,7 @@
             :formatter="rssiFor"
           >
           </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
             prop="deviceType"
@@ -743,7 +750,7 @@ export default {
       for (let i = 0; i < scanDataTmpFin.length; i++) {
         let obj = {
           rssi: "",
-          aliasName:'',
+          aliasName: "",
           name: "",
           mac: "",
           connect: false,
@@ -1133,7 +1140,7 @@ export default {
                 mac: dataLin.m,
                 name: dataLin.n,
                 rssi: dataLin.rssi,
-                aliasName:dataLin.aliasName,
+                aliasName: dataLin.aliasName,
                 ai: dataLin.ai,
                 at: dataLin.at,
                 type: dataLin.t, //当type为1时为心电
@@ -1461,7 +1468,7 @@ export default {
         //开始脑电各个部分的数据
         targetList: [],
       };
-      
+
       setTimeout(() => {
         this.getSize();
       }, 0);
@@ -1476,8 +1483,7 @@ export default {
       //   this.userLink.linkStatus = false;
       //   this.userTwoLink.linkStatus = false;
       this.resetData();
-      
-      
+
       //只要切换类型就断开
       // this.userLink.mac = "";
       // this.linkStatus = false;
@@ -1487,7 +1493,6 @@ export default {
       //断开所有设备
 
       //结束测试
-
     },
     //断开所有设备的操作
     disconnectDevice() {
@@ -1975,24 +1980,26 @@ export default {
     setUrl() {},
     getSize() {
       let that = this;
-      // this.changeSize(100, 100);
+      // that.widthIframe = 100;
+      // that.heightIframe = 100;
       // that.visibleFlag = false;
-      that.widthIframe = 100;
-      that.heightIframe = 100;
       setTimeout(() => {
         // that.visibleFlag = true;
-        let width = that.$refs.animationFlow.clientWidth;
-        let height = that.$refs.animationFlow.clientHeight - 40;
-        that.widthIframe = width
-        if(this.equipment=='1'){
-          that.widthIframe = width
-        }else{
-          that.widthIframe = width -200;
-        }
-        that.heightIframe = height;
-
-        that.changeSize(width, height);
       }, 0);
+      // setTimeout(() => {
+      //   that.visibleFlag=true
+      //   let width = that.$refs.animationFlow.clientWidth;
+      //   let height = that.$refs.animationFlow.clientHeight - 40;
+      //   that.widthIframe = width
+      //   if(this.equipment=='1'){
+      //     that.widthIframe = width
+      //   }else{
+      //     that.widthIframe = width;
+      //   }
+      //   that.heightIframe = height;
+
+      //   that.changeSize(width, height);
+      // }, 0);
     },
     changeSize(width, height) {
       this.$refs.unityIframe.contentWindow.changeSize(width, height);
@@ -2060,7 +2067,7 @@ export default {
     },
     sendUnity(val) {
       let a = val / 100;
-      this.$refs.unityvue.message("littlefire", "sssize", a);
+      this.$refs.unityvue.message("littlefire", "size", a);
     },
     goBack() {
       this.$router.go(-1);
@@ -2752,13 +2759,14 @@ canvas {
 }
 
 .flood-plan-page {
- display: flex;
- justify-content: center;
- flex-direction: row;
+  display: flex;
+  justify-content: center;
+  flex-direction: row;
   margin-top: 20px;
   flex: 1;
   width: 100%;
-  overflow: visible;
+  /* overflow: visible; */
+  overflow:scroll
 }
 
 .selectSty {
@@ -2794,8 +2802,10 @@ canvas {
 
 .main_sp {
   display: flex;
-  flex: 1;
+  /* flex: 1; */
+  height:96vh;
   flex-direction: row;
+  margin-bottom:40px;
 }
 
 .main_top {
@@ -2815,7 +2825,7 @@ canvas {
 }
 
 .outPage {
-  margin-bottom: 20px;
+  /* margin-bottom: 20px; */
 }
 .naoOneClass {
   width: 100%;

+ 35 - 21
src/renderer/components/AnimationDouble.vue

@@ -175,17 +175,30 @@
 
         <div class="flood-plan-page" ref="animationFlow">
           <iframe
-            scrolling="no"
-            :src="urlThreeP"
+          style="flex:1"
+            scrolling="yes"
             v-if="visibleFlag"
+            :src="urlThreeP"
             ref="unityIframe"
             frameborder="0"
-            :width="widthIframe"
-            :height="heightIframe"
           >
           </iframe>
-          <div v-if="equipment == '2'" style="width:20vw;display:flex;justify-content: center;align-items:start;padding-left: 10px;">
-            <img src="../assets/manage/dt.gif" />
+          <div
+            v-if="equipment == '2'"
+
+            style="
+              border: 1px solid #EAE8E7;
+             padding:10px;
+              display: flex;
+              justify-content: start;
+              align-items: center;
+              flex-direction: column;
+            "
+          >
+           <span style="font-size:16px;margin-bottom:10px;color:#1FD18E">呼吸助手</span>
+            <img style="width:100px" src="../assets/manage/dt.gif" />
+            <span style="font-size:12px;margin-top:10px;color:#1FD18E">
+            呼吸周期10s</span>
           </div>
         </div>
       </div>
@@ -2823,20 +2836,20 @@ export default {
     getSize() {
       let that = this;
       // that.visibleFlag = false;
-      that.widthIframe = 100;
-      that.heightIframe = 100;
-      setTimeout(() => {
-        // that.visibleFlag = true;
-        let width = this.$refs.animationFlow.clientWidth;
-        let height = this.$refs.animationFlow.clientHeight - 40;
-        if(this.equipment=='1'){
-          that.widthIframe = width
-        }else{
-          that.widthIframe = width -200;
-        }
-        that.heightIframe = height;
-        that.changeSize(width, height);
-      }, 0);
+      // that.widthIframe = 100;
+      // that.heightIframe = 100;
+      // setTimeout(() => {
+      //   // that.visibleFlag = true;
+      //   let width = this.$refs.animationFlow.clientWidth;
+      //   let height = this.$refs.animationFlow.clientHeight - 40;
+      //   if(this.equipment=='1'){
+      //     that.widthIframe = width
+      //   }else{
+      //     that.widthIframe = width -200;
+      //   }
+      //   that.heightIframe = height;
+      //   that.changeSize(width, height);
+      // }, 0);
     },
     changeSize(width, height) {
       this.$refs.unityIframe.contentWindow.changeSize(width, height);
@@ -4325,7 +4338,8 @@ canvas {
 .main_sp {
   display: flex;
   flex: 1;
-
+  height:96vh;
+  
   flex-direction: row;
 }
 .dialog_height {

+ 3 - 2
src/renderer/components/TopDes.vue

@@ -28,7 +28,8 @@ export default {
 </script>
 <style>
 .topdes_class{
-    margin-top:40px;
+  height:5vh;
+    padding-top:40px;
     display: flex;
     flex-direction: row;
     justify-content: flex-start;
@@ -36,6 +37,6 @@ export default {
     width:92%;
     margin-left:4%;
     padding-bottom:20px;
-    margin-bottom:20px;
+    margin-bottom: 20px;
 }
 </style>

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.