林旭祥 7 месяцев назад
Родитель
Сommit
7bc13c53bc

+ 11 - 1
src/components/MultipleItem/index.vue

@@ -13,6 +13,12 @@
         <div class="name" :class="{ 'name2': faceCheckStu.student_id }">
           {{ faceCheckStu.student_id ? faceCheckStu.name : area ? "虚位以待" : "未启用" }}
         </div>
+        <div class="ctrlBox" v-if="examState == 43 && handcontroller && ctrl == area">
+          <img src="@/assets/images/test/jushou.png" />
+          <div class="lable">
+            请举左手开始
+          </div>
+        </div>
       </div>
     </div>
     <div class="score">
@@ -64,8 +70,10 @@ const data = reactive<any>({
   faceCheckStu: {},//人脸信息
   unit: "",//单位
   backReason: [],//犯规项
+  handcontroller: null,//是否开启手势控制
+  ctrl: "",//控制位
 });
-const { examState, resultId, faceCheckStu, currentResultObj, unit, backReason } = toRefs(data);
+const { examState, resultId, faceCheckStu, currentResultObj, unit, backReason, handcontroller, ctrl } = toRefs(data);
 
 /**
  * 接收消息
@@ -457,6 +465,8 @@ watch(() => props.examState, (newVal, oldVal) => {
 onMounted(() => {
   let dic: any = dataDictionary;
   unit.value = dic.unit[project];
+  ctrl.value = route.query.ctrl;
+  handcontroller.value = route.query.handcontroller;
 })
 
 //暴露给父组件用

+ 1 - 1
src/components/OptionWindow/index.vue

@@ -316,7 +316,7 @@ const confirm = () => {
 };
 
 //手势赋值跳转
-const getGesture = async (myProject, data) => {
+const getGesture = async (myProject:any, data:any) => {
   await getClass();
   project.value = myProject;
   chooseArea.value = data.area.split(",");

+ 87 - 5
src/views/train/multiple.vue

@@ -11,7 +11,7 @@
       <div class="testBox"
         :class="{ 'testBox1': styleType == 1, 'testBox2': styleType == 2, 'testBox3': styleType == 3 }">
         <div class="ul"
-          :class="{ 'overlap': (examState == 43 && time.ready) || [42].includes(examState) || (showTestAgain && ![41].includes(examState)), 'ready': [41].includes(examState), 'hands': parameter.gesture }"
+          :class="{ 'overlap': (examState == 43 && time.ready) || [42].includes(examState) || (showTestAgain && ![41].includes(examState)), 'ready': [41].includes(examState), 'hands': parameter.handcontroller }"
           v-for="(items, indexs) in testListArr " :key="indexs">
           <MultipleItem :ref="(el: any) => { multipleItemRef(el, item.itemNumber, item.area) }"
             v-for="(item, index) in items" :query="parameter" :area="item.area" :key="index" @returnData="returnData"
@@ -916,13 +916,41 @@ $waiPadding: 6.51rem;
           }
 
           .name2 {
+            box-sizing: border-box;
             padding: 0.1rem 0.4rem;
             border-radius: 1.1rem;
             background: radial-gradient(96% 96% at 2% 32%, #FFFFFF 0%, #FCFDFD 54%, #E1E4E7 100%);
             box-shadow: inset 0px 1px 0px 2px rgba(255, 255, 255, 0.9046), inset 0px 3px 6px 0px rgba(0, 0, 0, 0.0851);
           }
-        }
 
+          .ctrlBox {
+            position: absolute;
+            left: 0;
+            top: 0;
+            border: 5px solid #ffffff;
+            display: flex;
+            flex-direction: column;
+            align-items: center;
+            background: rgba(0, 0, 0, 0.8);
+            z-index: 2;
+            width: 100%;
+            height: 100%;
+            box-sizing: border-box;
+            border-radius: 1.6rem;
+
+            img {
+              max-width: 100%;
+              max-height: 70%;
+              margin: 10% 0 5% 0;
+            }
+
+            .lable {
+              text-align: center;
+              font-size: 2rem;
+              color: #ffffff
+            }
+          }
+        }
       }
 
       .score {
@@ -1108,9 +1136,9 @@ $waiPadding: 6.51rem;
         align-items: center;
         justify-content: center;
         cursor: pointer;
+        position: relative;
 
         .userInfo-center {
-
           .pic {
             width: calc(36vh * 0.62);
             height: calc(36vh * 0.62);
@@ -1138,7 +1166,6 @@ $waiPadding: 6.51rem;
             }
           }
 
-
           .pic2 {
             box-sizing: border-box;
             border: 0.44rem solid rgba(26, 41, 58, 0.6315);
@@ -1149,6 +1176,34 @@ $waiPadding: 6.51rem;
             color: #1A293A;
             font-size: 2.21rem;
           }
+
+          .ctrlBox {
+            position: absolute;
+            left: 0;
+            top: 0;
+            border: 5px solid #ffffff;
+            display: flex;
+            flex-direction: column;
+            align-items: center;
+            background: rgba(0, 0, 0, 0.8);
+            z-index: 2;
+            width: 100%;
+            height: 100%;
+            box-sizing: border-box;
+            border-radius: 1.6rem;
+
+            img {
+              max-width: 100%;
+              max-height: 70%;
+              margin: 10% 0 5% 0;
+            }
+
+            .lable {
+              text-align: center;
+              font-size: 2rem;
+              color: #ffffff
+            }
+          }
         }
       }
 
@@ -1334,8 +1389,35 @@ $waiPadding: 6.51rem;
             font-size: 1rem;
             margin-left: 0.5vw;
           }
-        }
 
+          .ctrlBox {
+            position: absolute;
+            left: 0;
+            top: 0;
+            border: 5px solid #ffffff;
+            display: flex;
+            flex-direction: column;
+            align-items: center;
+            background: rgba(0, 0, 0, 0.8);
+            z-index: 2;
+            width: 100%;
+            height: 100%;
+            box-sizing: border-box;
+            border-radius: 5vh;
+
+            img {
+              max-width: 100%;
+              max-height: 60%;
+              margin: 5% 0 5% 0;
+            }
+
+            .lable {
+              text-align: center;
+              font-size: 1rem;
+              color: #ffffff
+            }
+          }
+        }
       }
 
       .score {

+ 2 - 2
src/views/train/test.vue

@@ -66,7 +66,7 @@
 
             <div v-show="examState == 43 && !time.ready && readyState">
               <div class="readyBoxBefore">
-                <div class="item" v-if="parameter.gesture">
+                <div class="item" v-if="parameter.handcontroller">
                   <div><img src="@/assets/images/test/jushou.png" /></div>
                   <div class="lable">
                     <div>请举左手开始</div>
@@ -275,7 +275,7 @@ const getStopFace = async () => {
   // }
   getClearTimer("face");
   if (needStart.value) {
-    let txt = parameter.value.gesture === true ? ",请举左手开始测试" : ",请准备";
+    let txt = parameter.value.handcontroller === true ? ",请举左手开始测试" : ",请准备";
     speckText(faceCheckStu.value.name + txt);
   }
   if (examState.value == 41) {