diff --git a/src/views/PhysicalTestReport/index.vue b/src/views/PhysicalTestReport/index.vue index 984866c..ce78f4c 100644 --- a/src/views/PhysicalTestReport/index.vue +++ b/src/views/PhysicalTestReport/index.vue @@ -229,7 +229,7 @@

请在上方选择年级-班级,查看对应班级体测报告

- + @@ -238,7 +238,7 @@

请在上方选择教师,查看对应教师体测报告

- + @@ -250,6 +250,7 @@ + @@ -117,9 +127,12 @@ import * as echarts from 'echarts'; import * as _api from '@/api/grade.js' import { useRoute } from 'vue-router'; import axios from 'axios' -import eventBus from '@/eventBus'; 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 showTrainingDialog = ref(false) +const showPhysicalDialog = ref(false) const data = ref({ selectData: 1, selectOptions: [{ @@ -397,13 +410,15 @@ async function initResultTrends1(a, b, c, d) { } } -// 点击训练记录 +// 点击训练记录 → 弹窗展示 function toRecord() { - eventBus.emit('toRecord', data.value.paramsValue) + localStorage.setItem('toRecord', JSON.stringify(data.value.paramsValue)) + showTrainingDialog.value = true } -// 点击体测记录 +// 点击体测记录 → 弹窗展示 function stamina() { - eventBus.emit('toPhysical', data.value.paramsValue) + localStorage.setItem('toRecord', JSON.stringify(data.value.paramsValue)) + showPhysicalDialog.value = true } // 近五节课心率变化echarts function heartEcharts(val) { diff --git a/src/views/classView1/index.vue b/src/views/classView1/index.vue index 9d3976e..5dd3247 100644 --- a/src/views/classView1/index.vue +++ b/src/views/classView1/index.vue @@ -93,6 +93,8 @@ import { useRoute } from 'vue-router'; import * as _api from '@/api/grade.js'; import commonTable from '@/views/motionData/trainingData/components/commonTbale/index.vue'; import eventBus from '@/eventBus'; +const props = defineProps<{ embedded?: boolean }>() +const emit = defineEmits(['toViewStudent']) const route = useRoute(); const data = ref({ selectData: 1, @@ -274,7 +276,11 @@ onBeforeUnmount(() => { }) function toView(e) { // console.log(e, 'eeeeeeeeeee') - eventBus.emit('toViewStudent', e) + if (props.embedded) { + emit('toViewStudent', e) + } else { + eventBus.emit('toViewStudent', e) + } } // 切换等级占比项目 function changeProject(e) { diff --git a/src/views/studentsManage/examinationRecords/index.vue b/src/views/studentsManage/examinationRecords/index.vue index c9b1ce2..4923405 100644 --- a/src/views/studentsManage/examinationRecords/index.vue +++ b/src/views/studentsManage/examinationRecords/index.vue @@ -352,7 +352,7 @@ function paginateTableData(pageIndex, pageSize) {