|
@@ -21,7 +21,7 @@
|
|
:leave-active-class="proxy?.animate.dialog.leave">
|
|
:leave-active-class="proxy?.animate.dialog.leave">
|
|
<div class="time" v-show="needStart && [42].includes(examState)">{{
|
|
<div class="time" v-show="needStart && [42].includes(examState)">{{
|
|
time.countdownNum
|
|
time.countdownNum
|
|
- }}</div>
|
|
|
|
|
|
+ }}</div>
|
|
</transition>
|
|
</transition>
|
|
<div class="tips" v-if="examState == 41">
|
|
<div class="tips" v-if="examState == 41">
|
|
<img v-if="parameter.gesture" src="@/assets/images/test/ready1.png" />
|
|
<img v-if="parameter.gesture" src="@/assets/images/test/ready1.png" />
|
|
@@ -29,7 +29,6 @@
|
|
</div>
|
|
</div>
|
|
<div class="complete" :class="{ 'complete2': needStart && [42].includes(examState) }"
|
|
<div class="complete" :class="{ 'complete2': needStart && [42].includes(examState) }"
|
|
v-if="faceCheckStu.student_id && time.ready <= 0 && examState != 43">
|
|
v-if="faceCheckStu.student_id && time.ready <= 0 && examState != 43">
|
|
-
|
|
|
|
<div class="scoreBox" v-if="['basketballv1'].includes(parameter.project)">
|
|
<div class="scoreBox" v-if="['basketballv1'].includes(parameter.project)">
|
|
<div class="score">{{ currentResultObj.count || 0 }}</div>
|
|
<div class="score">{{ currentResultObj.count || 0 }}</div>
|
|
</div>
|
|
</div>
|
|
@@ -48,7 +47,6 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
<div class="foulBox" v-if="examState == 42 && backReason.length">
|
|
<div class="foulBox" v-if="examState == 42 && backReason.length">
|
|
<transition :enter-active-class="proxy?.animate.mask.enter"
|
|
<transition :enter-active-class="proxy?.animate.mask.enter"
|
|
:leave-active-class="proxy?.animate.mask.leave">
|
|
:leave-active-class="proxy?.animate.mask.leave">
|
|
@@ -74,8 +72,8 @@
|
|
<div>请举手开始</div>
|
|
<div>请举手开始</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div v-if="!parameter.gesture">
|
|
|
|
- <div class="item"><img src="@/assets/images/test/bujushou.png" /></div>
|
|
|
|
|
|
+ <div class="item" v-else>
|
|
|
|
+ <div> <img src="@/assets/images/test/bujushou.png" /></div>
|
|
<div class="lable">
|
|
<div class="lable">
|
|
<div>请点击开始</div>
|
|
<div>请点击开始</div>
|
|
</div>
|
|
</div>
|
|
@@ -106,14 +104,14 @@
|
|
</div>
|
|
</div>
|
|
<div class="main-right">
|
|
<div class="main-right">
|
|
<div class="title">测试记录</div>
|
|
<div class="title">测试记录</div>
|
|
- <ul>
|
|
|
|
- <li v-for="(item, index) in reportList " :key="index" @click="openReport(item)">
|
|
|
|
|
|
+ <ul :ref="reportListRef" @scroll="getScroll($event)">
|
|
|
|
+ <li v-for="(item, index) in reportList" :key="index" @click="openReport(item)">
|
|
<div class="left">
|
|
<div class="left">
|
|
<div class="pic"><img :src="item.face_pic || item.logo_url" /></div>
|
|
<div class="pic"><img :src="item.face_pic || item.logo_url" /></div>
|
|
<div class="txt">
|
|
<div class="txt">
|
|
<div>
|
|
<div>
|
|
<div class="name">{{ item.student_name }}</div>
|
|
<div class="name">{{ item.student_name }}</div>
|
|
- <div class="className"></div>
|
|
|
|
|
|
+ <div class="className">{{ item.class_name }}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -133,7 +131,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <FaceWindow ref="faceWindowRef" :faceCheckStu="faceCheckStu" />
|
|
|
|
|
|
+ <FaceWindow ref="faceWindowRef" :faceCheckStu="faceCheckStu" :gesture="parameter.gesture" />
|
|
<ChooseStudent ref="chooseStudentRef" @returnData="returnStudent" />
|
|
<ChooseStudent ref="chooseStudentRef" @returnData="returnStudent" />
|
|
<ReportWindow ref="reportWindowRef" />
|
|
<ReportWindow ref="reportWindowRef" />
|
|
</div>
|
|
</div>
|
|
@@ -150,6 +148,7 @@ const route = useRoute();
|
|
const faceWindowRef = ref();
|
|
const faceWindowRef = ref();
|
|
const chooseStudentRef = ref();
|
|
const chooseStudentRef = ref();
|
|
const reportWindowRef = ref();
|
|
const reportWindowRef = ref();
|
|
|
|
+const reportListRef = ref();
|
|
const myInfo: any = localStorage.getItem("userInfo");
|
|
const myInfo: any = localStorage.getItem("userInfo");
|
|
const dic: any = dataDictionary;
|
|
const dic: any = dataDictionary;
|
|
const data = reactive<any>({
|
|
const data = reactive<any>({
|
|
@@ -171,8 +170,14 @@ const data = reactive<any>({
|
|
needStart: false,//是否需要按钮
|
|
needStart: false,//是否需要按钮
|
|
showTestAgain: false,//再测一次按钮
|
|
showTestAgain: false,//再测一次按钮
|
|
reportList: [],//测试列表
|
|
reportList: [],//测试列表
|
|
|
|
+ studentPage: {
|
|
|
|
+ current: 1,
|
|
|
|
+ size: 10,
|
|
|
|
+ pages: 1,
|
|
|
|
+ }, //学生分页
|
|
|
|
+ debounceTime: '', //防抖状态
|
|
});
|
|
});
|
|
-const { timerManager, parameter, time, userInfo, examState, resultId, faceCheckStu, currentResultObj, unit, backReason, backReasonStr, needStart, showTestAgain, reportList } = toRefs(data);
|
|
|
|
|
|
+const { timerManager, parameter, time, userInfo, examState, resultId, faceCheckStu, currentResultObj, unit, backReason, backReasonStr, needStart, showTestAgain, reportList, studentPage, debounceTime } = toRefs(data);
|
|
|
|
|
|
/**
|
|
/**
|
|
* 接收消息
|
|
* 接收消息
|
|
@@ -280,7 +285,8 @@ const getStopFace = async () => {
|
|
// }
|
|
// }
|
|
getClearTimer("face");
|
|
getClearTimer("face");
|
|
if (needStart.value) {
|
|
if (needStart.value) {
|
|
- speckText(faceCheckStu.value.name + parameter.value.gesture ? ",请举手开始测试" : ",请准备");
|
|
|
|
|
|
+ let txt = parameter.value.gesture ? ",请举手开始测试" : ",请准备";
|
|
|
|
+ speckText(faceCheckStu.value.name + txt);
|
|
}
|
|
}
|
|
await stopFace();
|
|
await stopFace();
|
|
if (faceCheckStu.value.student_id) {
|
|
if (faceCheckStu.value.student_id) {
|
|
@@ -344,7 +350,7 @@ const getStartOneTest = () => {
|
|
//显示再测一次按钮
|
|
//显示再测一次按钮
|
|
showTestAgain.value = true;
|
|
showTestAgain.value = true;
|
|
//停止播报;
|
|
//停止播报;
|
|
- speckCancel()
|
|
|
|
|
|
+ speckCancel();
|
|
//计时项目才开
|
|
//计时项目才开
|
|
if (needStart.value == true) {
|
|
if (needStart.value == true) {
|
|
//时间为0的为正计时,大于0的为倒计时
|
|
//时间为0的为正计时,大于0的为倒计时
|
|
@@ -641,7 +647,7 @@ const getAchievement = (data: any) => {
|
|
} else {
|
|
} else {
|
|
speckText(faceCheckStu?.value.name + "成绩为" + (chineseNumber(count) || 0) + unit.value + ",请下一位准备!" || "");
|
|
speckText(faceCheckStu?.value.name + "成绩为" + (chineseNumber(count) || 0) + unit.value + ",请下一位准备!" || "");
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ studentPage.value.current = 1;
|
|
getReportList();
|
|
getReportList();
|
|
faceWindowRef.value.open("right");
|
|
faceWindowRef.value.open("right");
|
|
//然后定时自动关闭
|
|
//然后定时自动关闭
|
|
@@ -651,38 +657,64 @@ const getAchievement = (data: any) => {
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
- * 当天成绩列表
|
|
|
|
|
|
+ * 成绩列表
|
|
*/
|
|
*/
|
|
const getReportList = () => {
|
|
const getReportList = () => {
|
|
let params: any = {
|
|
let params: any = {
|
|
- start_date: dayjs().format("YYYY-MM-DD"),
|
|
|
|
- end_date: dayjs().format("YYYY-MM-DD"),
|
|
|
|
exam_name: parameter.value.project,
|
|
exam_name: parameter.value.project,
|
|
- page: 1,
|
|
|
|
- per_page: 9000
|
|
|
|
|
|
+ page: studentPage.value.current,
|
|
|
|
+ per_page: studentPage.value.size
|
|
};
|
|
};
|
|
proxy?.$http.common.reportList(params).then((res: any) => {
|
|
proxy?.$http.common.reportList(params).then((res: any) => {
|
|
if (res.data.length > 0) {
|
|
if (res.data.length > 0) {
|
|
- reportList.value = res.data;
|
|
|
|
|
|
+ let list = res.data.map((item: any) => {
|
|
|
|
+ let type = parameter.value.project;
|
|
|
|
+ if (type == 'solidball' || type == 'shotball') {
|
|
|
|
+ item.result = item.result / 100
|
|
|
|
+ }
|
|
|
|
+ let result = null;
|
|
|
|
+ if (item.result.toString().indexOf(".") != -1) {
|
|
|
|
+ if (['jump', 'longjump', 'run50', 'run70', 'run100', 'run200', 'run400', 'run800', 'run1000', 'run15x4', 'run50x8', 'run10x4', 'basketballv1', 'basketballv1'].includes(type)) {
|
|
|
|
+ result = item.result.toFixed(2)
|
|
|
|
+ } else {
|
|
|
|
+ result = item.result.toFixed(1);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ result = item.result
|
|
|
|
+ }
|
|
|
|
+ item.result = result;
|
|
|
|
+ return item;
|
|
|
|
+ });
|
|
|
|
+ studentPage.value.current == 1 ?
|
|
|
|
+ (reportList.value = list) :
|
|
|
|
+ reportList.value.push(...list);
|
|
|
|
+ studentPage.value.pages = res.total;
|
|
|
|
+ getPages(res.total);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * 计算页码
|
|
|
|
+*/
|
|
|
|
+const getPages = (data: any) => {
|
|
|
|
+ studentPage.value.pages = Math.ceil(data / studentPage.value.size);
|
|
|
|
+};
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 准备开始
|
|
* 准备开始
|
|
*/
|
|
*/
|
|
const getReady = () => {
|
|
const getReady = () => {
|
|
|
|
+ speckCancel();
|
|
time.value.ready = 5;
|
|
time.value.ready = 5;
|
|
speckText(time.value.ready);
|
|
speckText(time.value.ready);
|
|
timerManager.value.readyTimer = setInterval(() => {
|
|
timerManager.value.readyTimer = setInterval(() => {
|
|
time.value.ready--;
|
|
time.value.ready--;
|
|
- if (time.value.ready < 1) {
|
|
|
|
|
|
+ speckText(time.value.ready);
|
|
|
|
+ if (time.value.ready == 0) {
|
|
getClearTimer("readyTimer");
|
|
getClearTimer("readyTimer");
|
|
getStartOneTest();
|
|
getStartOneTest();
|
|
- } else {
|
|
|
|
- speckText(time.value.ready);
|
|
|
|
}
|
|
}
|
|
}, 1000);
|
|
}, 1000);
|
|
};
|
|
};
|
|
@@ -694,6 +726,33 @@ const openReport = (data: any) => {
|
|
reportWindowRef.value.open(parameter.value.project, data);
|
|
reportWindowRef.value.open(parameter.value.project, data);
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+* 成绩翻页
|
|
|
|
+*/
|
|
|
|
+const getScroll = (event?: any) => {
|
|
|
|
+ if (studentPage.value.current == studentPage.value.pages) {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ let obj = event.target;
|
|
|
|
+ let scrollHeight = obj.scrollHeight;
|
|
|
|
+ let scrollTop = obj.scrollTop;
|
|
|
|
+ let clientHeight = obj.clientHeight;
|
|
|
|
+ //提前100高度加载数据
|
|
|
|
+ if (scrollTop + clientHeight + 100 >= scrollHeight) {
|
|
|
|
+ console.log('到底了!')
|
|
|
|
+ //继续加载下一页
|
|
|
|
+ if (debounceTime.value) {
|
|
|
|
+ clearTimeout(debounceTime.value)
|
|
|
|
+ }
|
|
|
|
+ debounceTime.value = setTimeout(() => {
|
|
|
|
+ studentPage.value.current++;
|
|
|
|
+ getReportList();
|
|
|
|
+ }, 500)
|
|
|
|
+ } else {
|
|
|
|
+ console.log('没到底')
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 输出犯规
|
|
* 输出犯规
|
|
*/
|
|
*/
|
|
@@ -860,7 +919,6 @@ $waiPadding: 6.51rem;
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
- margin-bottom: 3vh;
|
|
|
|
|
|
|
|
.scoreBox {
|
|
.scoreBox {
|
|
height: 10vh;
|
|
height: 10vh;
|
|
@@ -969,6 +1027,7 @@ $waiPadding: 6.51rem;
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
|
+ padding-top: 3vh;
|
|
|
|
|
|
.foul {
|
|
.foul {
|
|
height: 4.2vh;
|
|
height: 4.2vh;
|