|
@@ -15,7 +15,7 @@ defineOptions({
|
|
|
|
|
|
const pageParams: TrainingParams = reactive({
|
|
const pageParams: TrainingParams = reactive({
|
|
school_id: userStore.schoolId,
|
|
school_id: userStore.schoolId,
|
|
- is_formal: 0, // 1正式,2非正式
|
|
|
|
|
|
+ is_formal: 1, // 1正式,2非正式
|
|
grade_id: 0,
|
|
grade_id: 0,
|
|
page_no: 1,
|
|
page_no: 1,
|
|
page_size: 10,
|
|
page_size: 10,
|
|
@@ -63,6 +63,9 @@ async function getTrainingData(schoolId: number) {
|
|
function getTrainingSearch() {
|
|
function getTrainingSearch() {
|
|
getTrainingData(userStore.schoolId);
|
|
getTrainingData(userStore.schoolId);
|
|
}
|
|
}
|
|
|
|
+function alertError() {
|
|
|
|
+ ElMessage.error("本次训练采集的数据不足,无法分析并生成有效报告!");
|
|
|
|
+}
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
getGradeData(userStore.schoolId);
|
|
getGradeData(userStore.schoolId);
|
|
getTrainingData(userStore.schoolId);
|
|
getTrainingData(userStore.schoolId);
|
|
@@ -82,7 +85,6 @@ watch(
|
|
<!-- 学生查找 -->
|
|
<!-- 学生查找 -->
|
|
<div class="training-search">
|
|
<div class="training-search">
|
|
<el-select v-model="pageParams.is_formal" placeholder="正式学生/体验用户" size="large">
|
|
<el-select v-model="pageParams.is_formal" placeholder="正式学生/体验用户" size="large">
|
|
- <el-option key="0" :value="Number(0)" label="全部学生"></el-option>
|
|
|
|
<el-option key="1" :value="Number(1)" label="正式学生"></el-option>
|
|
<el-option key="1" :value="Number(1)" label="正式学生"></el-option>
|
|
<el-option key="2" :value="Number(2)" label="体验用户"></el-option>
|
|
<el-option key="2" :value="Number(2)" label="体验用户"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
@@ -108,11 +110,21 @@ watch(
|
|
<el-table-column prop="grade_name" label="所在班级" align="center" />
|
|
<el-table-column prop="grade_name" label="所在班级" align="center" />
|
|
<el-table-column label="操作" align="center" min-width="120">
|
|
<el-table-column label="操作" align="center" min-width="120">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <router-link
|
|
|
|
- :to="'/training/result?id=' + scope.row.game_record_id + '&type=' + scope.row.device_id"
|
|
|
|
- class="table-btn"
|
|
|
|
- >报告详情</router-link
|
|
|
|
- >
|
|
|
|
|
|
+ <template v-if="scope.row.report_status == 1">
|
|
|
|
+ <router-link
|
|
|
|
+ :to="
|
|
|
|
+ '/training/result?id=' +
|
|
|
|
+ scope.row.game_record_id +
|
|
|
|
+ '&type=' +
|
|
|
|
+ scope.row.device_id +
|
|
|
|
+ '&formal=' +
|
|
|
|
+ pageParams.is_formal
|
|
|
|
+ "
|
|
|
|
+ class="table-btn"
|
|
|
|
+ >报告详情</router-link
|
|
|
|
+ >
|
|
|
|
+ </template>
|
|
|
|
+ <button v-else class="table-btn disabled" @click="alertError()">训练效果分析</button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<!-- 无数据插槽 -->
|
|
<!-- 无数据插槽 -->
|
|
@@ -208,7 +220,6 @@ watch(
|
|
border-radius: 10px;
|
|
border-radius: 10px;
|
|
|
|
|
|
&.disabled {
|
|
&.disabled {
|
|
- cursor: not-allowed;
|
|
|
|
background: #bfbfbf;
|
|
background: #bfbfbf;
|
|
}
|
|
}
|
|
}
|
|
}
|