update:体测报告优化
This commit is contained in:
parent
6f611c7a24
commit
3cb2d992f8
@ -229,7 +229,7 @@
|
|||||||
<el-icon><office-building /></el-icon>
|
<el-icon><office-building /></el-icon>
|
||||||
<p>请在上方选择年级-班级,查看对应班级体测报告</p>
|
<p>请在上方选择年级-班级,查看对应班级体测报告</p>
|
||||||
</div>
|
</div>
|
||||||
<ClassView1 v-else :key="classKey" class="embeddedReport" />
|
<ClassView1 v-else :key="classKey" class="embeddedReport" embedded @to-view-student="onEmbeddedToViewStudent" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 教师报告 Tab -->
|
<!-- 教师报告 Tab -->
|
||||||
@ -238,7 +238,7 @@
|
|||||||
<el-icon><user /></el-icon>
|
<el-icon><user /></el-icon>
|
||||||
<p>请在上方选择教师,查看对应教师体测报告</p>
|
<p>请在上方选择教师,查看对应教师体测报告</p>
|
||||||
</div>
|
</div>
|
||||||
<TeacherView v-else :key="teacherKey" class="embeddedReport" />
|
<TeacherView v-else :key="teacherKey" class="embeddedReport" embedded @to-student-view="onEmbeddedToStudentView" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 学生报告 Tab -->
|
<!-- 学生报告 Tab -->
|
||||||
@ -250,6 +250,7 @@
|
|||||||
<StudentDataView v-else :key="studentKey" class="embeddedReport" />
|
<StudentDataView v-else :key="studentKey" class="embeddedReport" />
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 学生弹窗中点击学生,切换到学生报告 tab -->
|
||||||
<commonDialog :list="data.dialogData" @cancle="confirm" @confirm="confirm">
|
<commonDialog :list="data.dialogData" @cancle="confirm" @confirm="confirm">
|
||||||
<template #cont>
|
<template #cont>
|
||||||
<div class="dialogManage">
|
<div class="dialogManage">
|
||||||
@ -690,20 +691,42 @@ async function initGradeWholeDataStats(val) {
|
|||||||
console.error('Error occurred while calling API:', error);
|
console.error('Error occurred while calling API:', error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 查看详情
|
// 查看详情 - 年级报告表格点击,切换到班级报告 tab
|
||||||
function toView(val) {
|
function toView(val: any) {
|
||||||
console.log(val, 'valllllltoView==============>')
|
console.log(val, 'valllllltoView==============>')
|
||||||
const gradeName = val.gradeAndClassName.split("-")[0];
|
const gradeName = val.gradeAndClassName.split("-")[0];
|
||||||
console.log(gradeName,'gradeName')
|
const grade = data.value.classes.find((item: any) => item.label.startsWith(gradeName));
|
||||||
console.log(data.value.classes,'data.value.classes')
|
if (grade) {
|
||||||
const grade = data.value.classes.find(item => item.label.startsWith(gradeName));
|
classTabId.value = [grade.value, val.classId]
|
||||||
console.log(grade,'gradeeeeee')
|
onClassTabChange([grade.value, val.classId])
|
||||||
let params = {
|
switchTab('class')
|
||||||
id: val.classId,
|
}
|
||||||
gradeId: grade.value
|
}
|
||||||
|
// 班级报告内嵌表格"查看详情"→切换到学生报告 tab
|
||||||
|
async function onEmbeddedToViewStudent(e: any) {
|
||||||
|
console.log(e, 'onEmbeddedToViewStudent')
|
||||||
|
// e 是 commonTable 行数据,包含 classId, studentNo 等
|
||||||
|
const gradeId = classTabId.value?.[0]
|
||||||
|
const classId = classTabId.value?.[1]
|
||||||
|
// 在级联选择器中选择班级
|
||||||
|
studentClassTabId.value = [gradeId, classId]
|
||||||
|
await onStudentClassChange([gradeId, classId])
|
||||||
|
// 学生列表加载完成后设置选中
|
||||||
|
const stu = studentList.value.find((s: any) => s.studentNo === e.studentNo || s.StudentNo === e.studentNo)
|
||||||
|
if (stu) {
|
||||||
|
studentTabId.value = stu
|
||||||
|
onStudentTabChange(stu)
|
||||||
|
}
|
||||||
|
switchTab('student')
|
||||||
|
}
|
||||||
|
// 教师报告内嵌表格"查看详情"→切换到班级报告 tab
|
||||||
|
function onEmbeddedToStudentView(result: any) {
|
||||||
|
console.log(result, 'onEmbeddedToStudentView')
|
||||||
|
if (result) {
|
||||||
|
classTabId.value = [result.gradeId, result.id]
|
||||||
|
onClassTabChange([result.gradeId, result.id])
|
||||||
|
switchTab('class')
|
||||||
}
|
}
|
||||||
// let params=[val.classId,data.value.newGradeId!=0?data.value.newGradeId:1]
|
|
||||||
eventBus.emit('toDetail', params)
|
|
||||||
}
|
}
|
||||||
// 年级体测平均成绩
|
// 年级体测平均成绩
|
||||||
function averageBar(val) {
|
function averageBar(val) {
|
||||||
@ -1274,11 +1297,26 @@ async function toViewStudent(val) {
|
|||||||
|
|
||||||
data.value.dialogData.dialogVisible = true
|
data.value.dialogData.dialogVisible = true
|
||||||
}
|
}
|
||||||
function toViewStudentDetail(val) {
|
async function toViewStudentDetail(val: any) {
|
||||||
console.log(val, 'toViewStudentDetail')
|
console.log(val, 'toViewStudentDetail')
|
||||||
let k = data.value.gradeList.filter(item => item.gradeName == val.gradeName)
|
// 找到对应的 gradeId
|
||||||
val.gradeId = k[0].id
|
let k = data.value.gradeList.filter((item: any) => item.gradeName == val.gradeName)
|
||||||
eventBus.emit('toViewStudent', val);
|
val.gradeId = k[0]?.id
|
||||||
|
// 找到对应的 classId
|
||||||
|
const gradeData = data.value.classes.find((item: any) => item.label === val.gradeName) as any
|
||||||
|
const classObj = gradeData?.children?.find((c: any) => c.label === val.className) as any
|
||||||
|
const classId = val.classId || classObj?.value
|
||||||
|
const gradeId = val.gradeId || gradeData?.value
|
||||||
|
// 切换到学生报告 tab
|
||||||
|
studentClassTabId.value = [gradeId, classId]
|
||||||
|
await onStudentClassChange([gradeId, classId])
|
||||||
|
const stu = studentList.value.find((s: any) => s.studentNo === val.studentNo || s.StudentNo === val.studentNo)
|
||||||
|
if (stu) {
|
||||||
|
studentTabId.value = stu
|
||||||
|
onStudentTabChange(stu)
|
||||||
|
}
|
||||||
|
switchTab('student')
|
||||||
|
data.value.dialogData.dialogVisible = false
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -108,6 +108,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="cont4Chart" id="trendChart"></div>
|
<div class="cont4Chart" id="trendChart"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 训练记录弹窗 -->
|
||||||
|
<el-dialog v-model="showTrainingDialog" title="训练记录" width="90%" top="5vh" destroy-on-close>
|
||||||
|
<TrainingRecords v-if="showTrainingDialog" />
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 体测记录弹窗 -->
|
||||||
|
<el-dialog v-model="showPhysicalDialog" title="体测记录" width="90%" top="5vh" destroy-on-close>
|
||||||
|
<ExaminationRecords v-if="showPhysicalDialog" />
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -117,9 +127,12 @@ import * as echarts from 'echarts';
|
|||||||
import * as _api from '@/api/grade.js'
|
import * as _api from '@/api/grade.js'
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import eventBus from '@/eventBus';
|
|
||||||
import { ElMessage } from 'element-plus';
|
import { ElMessage } from 'element-plus';
|
||||||
|
import TrainingRecords from '@/views/studentsManage/trainingRecords/index.vue';
|
||||||
|
import ExaminationRecords from '@/views/studentsManage/examinationRecords/index.vue';
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
const showTrainingDialog = ref(false)
|
||||||
|
const showPhysicalDialog = ref(false)
|
||||||
const data = ref({
|
const data = ref({
|
||||||
selectData: 1,
|
selectData: 1,
|
||||||
selectOptions: [{
|
selectOptions: [{
|
||||||
@ -397,13 +410,15 @@ async function initResultTrends1(a, b, c, d) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 点击训练记录
|
// 点击训练记录 → 弹窗展示
|
||||||
function toRecord() {
|
function toRecord() {
|
||||||
eventBus.emit('toRecord', data.value.paramsValue)
|
localStorage.setItem('toRecord', JSON.stringify(data.value.paramsValue))
|
||||||
|
showTrainingDialog.value = true
|
||||||
}
|
}
|
||||||
// 点击体测记录
|
// 点击体测记录 → 弹窗展示
|
||||||
function stamina() {
|
function stamina() {
|
||||||
eventBus.emit('toPhysical', data.value.paramsValue)
|
localStorage.setItem('toRecord', JSON.stringify(data.value.paramsValue))
|
||||||
|
showPhysicalDialog.value = true
|
||||||
}
|
}
|
||||||
// 近五节课心率变化echarts
|
// 近五节课心率变化echarts
|
||||||
function heartEcharts(val) {
|
function heartEcharts(val) {
|
||||||
|
|||||||
@ -93,6 +93,8 @@ import { useRoute } from 'vue-router';
|
|||||||
import * as _api from '@/api/grade.js';
|
import * as _api from '@/api/grade.js';
|
||||||
import commonTable from '@/views/motionData/trainingData/components/commonTbale/index.vue';
|
import commonTable from '@/views/motionData/trainingData/components/commonTbale/index.vue';
|
||||||
import eventBus from '@/eventBus';
|
import eventBus from '@/eventBus';
|
||||||
|
const props = defineProps<{ embedded?: boolean }>()
|
||||||
|
const emit = defineEmits(['toViewStudent'])
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const data = ref({
|
const data = ref({
|
||||||
selectData: 1,
|
selectData: 1,
|
||||||
@ -274,7 +276,11 @@ onBeforeUnmount(() => {
|
|||||||
})
|
})
|
||||||
function toView(e) {
|
function toView(e) {
|
||||||
// console.log(e, 'eeeeeeeeeee')
|
// console.log(e, 'eeeeeeeeeee')
|
||||||
eventBus.emit('toViewStudent', e)
|
if (props.embedded) {
|
||||||
|
emit('toViewStudent', e)
|
||||||
|
} else {
|
||||||
|
eventBus.emit('toViewStudent', e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 切换等级占比项目
|
// 切换等级占比项目
|
||||||
function changeProject(e) {
|
function changeProject(e) {
|
||||||
|
|||||||
@ -352,7 +352,7 @@ function paginateTableData(pageIndex, pageSize) {
|
|||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.eventRelease {
|
.eventRelease {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 89vh;
|
height: 80vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
|
|||||||
@ -339,7 +339,7 @@ function paginateTableData(pageIndex, pageSize) {
|
|||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.eventRelease {
|
.eventRelease {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 89vh;
|
height: 80vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
|
|||||||
@ -92,6 +92,8 @@ import * as _api from '@/api/grade.js';
|
|||||||
import commonTable from '@/views/motionData/trainingData/components/commonTbale/index.vue';
|
import commonTable from '@/views/motionData/trainingData/components/commonTbale/index.vue';
|
||||||
import { ElMessage } from 'element-plus';
|
import { ElMessage } from 'element-plus';
|
||||||
import eventBus from '@/eventBus';
|
import eventBus from '@/eventBus';
|
||||||
|
const props = defineProps<{ embedded?: boolean }>()
|
||||||
|
const emit = defineEmits(['toStudentView'])
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
let gradeData=ref([])
|
let gradeData=ref([])
|
||||||
const data = ref({
|
const data = ref({
|
||||||
@ -261,8 +263,11 @@ function toView(val) {
|
|||||||
console.log(val, 'vallllll')
|
console.log(val, 'vallllll')
|
||||||
const result = findGradeAndClassIds(gradeData.value, val.gradeAndClassName);
|
const result = findGradeAndClassIds(gradeData.value, val.gradeAndClassName);
|
||||||
console.log(result, 'findGradeAndClassIds')
|
console.log(result, 'findGradeAndClassIds')
|
||||||
// return
|
if (props.embedded) {
|
||||||
eventBus.emit('toStudentView', result)
|
emit('toStudentView', result)
|
||||||
|
} else {
|
||||||
|
eventBus.emit('toStudentView', result)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 切换年级班级
|
// 切换年级班级
|
||||||
function changeClassroomMode(e) {
|
function changeClassroomMode(e) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user