From 11486220aac953dc77fca17f42aabe2be5f77979 Mon Sep 17 00:00:00 2001
From: Ls <2391972606@qq.com>
Date: Thu, 23 Apr 2026 10:07:44 +0800
Subject: [PATCH] 4-23
---
src/Service/BaseConfig.ts | 15 +-
src/pages/dataAnalyze/Curve.vue | 667 ++++++-------
src/pages/dataAnalyze/baoganAnalyze.vue | 921 ++++++++---------
src/pages/dataAnalyze/grades.vue | 494 ++++------
src/pages/dataAnalyze/paragraphAnalyze.vue | 791 +++++++--------
src/pages/dataAnalyze/timingAnalze.vue | 1033 +++++++++++---------
src/pages/index/index.vue | 6 +-
src/pages/index/user.vue | 28 +-
src/pages/userFunc/addHunyang.vue | 388 ++++++--
src/pages/userFunc/hunyang.vue | 932 +++++++++---------
src/pages/userFunc/project.vue | 247 +++--
src/pages/userFunc/projectList.vue | 16 +-
src/pages/userFunc/segmentation.vue | 84 +-
src/pages/userFunc/setCourse.vue | 70 +-
src/pages/userFunc/student.vue | 8 +-
src/pages/userFunc/swiming.vue | 44 +-
16 files changed, 2908 insertions(+), 2836 deletions(-)
diff --git a/src/Service/BaseConfig.ts b/src/Service/BaseConfig.ts
index 8a2e0b2..f578a9f 100644
--- a/src/Service/BaseConfig.ts
+++ b/src/Service/BaseConfig.ts
@@ -1,11 +1,12 @@
export class BaseConfig {
- protected static servesUrl: string = "http://192.168.0.142:5298";
- protected static imgUrl: string = "http://192.168.0.142:5298";
- protected static mediaUrl: string = "http://192.168.0.142:5298/";
+ // protected static servesUrl: string = "http://192.168.0.142:5298";
+ // protected static imgUrl: string = "http://192.168.0.142:5298";
+ // protected static mediaUrl: string = "http://192.168.0.142:5298/";
- // protected static servesUrl: string = "http://vp.xypays.cn";
- // protected static imgUrl: string = "http://vp.cloud.xypays.cn";
- // protected static mediaUrl: string = "http://byc1.xypays.cn/";
+
+ protected static servesUrl: string = "https://swimming.api.xypays.cn";
+ protected static imgUrl: string = "https://swimming.api.xypays.cn";
+ protected static mediaUrl: string = "https://swimming.api.xypays.cn/";
protected static uploadUrl: string = "/TencentCos/GetUpLoadInfo";
- protected static payuploadUrl: string = "http://192.168.0.142:5298";
+ protected static payuploadUrl: string = "https://swimming.api.xypays.cn";
}
\ No newline at end of file
diff --git a/src/pages/dataAnalyze/Curve.vue b/src/pages/dataAnalyze/Curve.vue
index 5f05ec3..e566df7 100644
--- a/src/pages/dataAnalyze/Curve.vue
+++ b/src/pages/dataAnalyze/Curve.vue
@@ -1,75 +1,65 @@
-
-
\ No newline at end of file
+
diff --git a/src/pages/dataAnalyze/baoganAnalyze.vue b/src/pages/dataAnalyze/baoganAnalyze.vue
index c5df7b2..572747a 100644
--- a/src/pages/dataAnalyze/baoganAnalyze.vue
+++ b/src/pages/dataAnalyze/baoganAnalyze.vue
@@ -1,56 +1,100 @@
-
-
@@ -104,36 +128,32 @@
import { PlanService } from '@/Service/swimming/PlanService'
interface Project {
- id : string
- name : string
+ id: string
+ name: string
}
interface Student {
- id : string
- name : string
- gender : string
- age : number
+ id: string
+ name: string
+ gender: string
+ age: number
}
interface TableDataItem {
- date : string
- name : string
- projectName : string
- plan : string
- completion : number
- detail : string
+ date: string
+ name: string
+ projectName: string
+ plan: string
+ completion: number
+ detail: string
}
interface StudentRecord {
- student : Student
- date : string
- segments : TableDataItem[]
+ student: Student
+ date: string
+ segments: TableDataItem[]
}
- const currentYear = ref(new Date().getFullYear())
- const currentMonth = ref(new Date().getMonth() + 1)
- const selectedDate = ref('')
-
// 项目选择
let showProject = ref(false)
let selectProcet = ref('')
@@ -143,91 +163,68 @@
const begin = ref('')
const end = ref('')
const showCalendar = ref(false)
- const calendarType = ref<'begin' | 'end'>('begin')
// 分页相关
let page = ref(1)
- let status = ref('loadmore')
-
let pageTotal = ref(10)
const columns = ref([
- {
- label: '训练日期',
- name: 'addTime',
- },
- {
- label: '姓名',
- name: 'studentName',
- },
- {
- label: '项目名称',
- name: 'name',
- },
- {
- label: '项目类型',
- name: 'planType',
- },
- {
- label: '完成比例',
- name: 'completion',
- },
- {
- label: '详细数据',
- name: 'detail',
- }
+ { label: '训练日期', name: 'addTime' },
+ { label: '姓名', name: 'studentName' },
+ { label: '项目名称', name: 'name' },
+ { label: '项目类型', name: 'planType' },
+ { label: '完成比例', name: 'completion' },
+ { label: '详细数据', name: 'detail' }
])
-
+
+ let rowData=ref('')
+
const tableData = ref([])
-
-
-
const projectOptions = ref>([[]])
-
- const selectedProjectIndex = ref(-1)
- const selectedProjectId = ref('')
-
-
-
-
-
const studentList = ref([])
-
const selectedStudentIndexes = ref([])
const selectedStudentIds = ref([])
const showStudentPicker = ref(false)
+
+ // 圈数达标时间弹窗
+ const showLapsModal = ref(false)
+ interface LapsItem {
+ lap: number
+ time: string
+ }
+ const lapsData = ref([])
+
+ // 打开圈数达标时间弹窗
+ const openLapsModal = (data: LapsItem[]) => {
+ lapsData.value = data
+ showLapsModal.value = true
+ }
+
+ // 关闭圈数达标时间弹窗
+ const closeLapsModal = () => {
+ showLapsModal.value = false
+ }
const selectedStudentDisplay = computed(() => {
if (selectedStudentIndexes.value.length === 0) {
return '请选择学生'
- } else {
- const names = selectedStudentIndexes.value.map(index => studentList.value[index].name)
- return names.length > 2 ? `${names.slice(0, 2).join(', ')}等${names.length}人` : names.join(', ')
}
+ const names = selectedStudentIndexes.value.map(index => studentList.value[index].name)
+ return names.length > 2 ? `${names.slice(0, 2).join(', ')}等${names.length}人` : names.join(', ')
})
- const averageCompletion = computed(() => {
- if (tableData.value.length === 0) return 0
- const total = tableData.value.reduce((sum, item) => sum + item.completion, 0)
- return Math.round(total / tableData.value.length)
+ const dateDisplay = computed(() => {
+ if (!begin.value) return '请选择'
+ if (begin.value === end.value) return begin.value
+ return `${begin.value} 至 ${end.value}`
})
-
-
-
onLoad(() => {
loadData()
getProjectData()
})
- onShow(() => {
-
- })
-
- const loadData = () => {
-
- }
-
+ const loadData = () => {}
const getProjectData = () => {
PlanService.GetPlanListNoPage('计时项目').then(res => {
@@ -238,14 +235,24 @@
}
})
}
-
- const selectProcetFunc = (e : any) => {
+
+ const cellClick = (rows: any) => {
+ rowData.value = rows.detail
+ console.log(rowData.value);
+ showLapsModal.value=true
+ }
+
+ const selectProcetFunc = (e: any) => {
selectProcet.value = e.value[0].name
selectId.value = e.value[0].planId
+ begin.value = ''
+ end.value = ''
+ selectedStudentIndexes.value = []
+ studentList.value = []
+ tableData.value = []
getProjectDetail()
}
-
const getProjectDetail = () => {
PlanService.GetPlanInfo(selectId.value).then(res => {
if (res.code == 0) {
@@ -256,14 +263,11 @@
})
}
-
-
-
const openCalendar = () => {
showCalendar.value = true
}
- const calendarConfirm = (e : any) => {
+ const calendarConfirm = (e: any) => {
begin.value = e[0]
end.value = e[e.length - 1]
showCalendar.value = false
@@ -273,17 +277,11 @@
showCalendar.value = false
}
-
-
const selectAllStudents = () => {
selectedStudentIndexes.value = studentList.value.map((_, index) => index)
}
- const handleStudentChange = (e : any) => {
- console.log('学生选择变化:', e)
- }
-
- const toggleStudentSelection = (index : number) => {
+ const toggleStudentSelection = (index: number) => {
const idx = selectedStudentIndexes.value.indexOf(index)
if (idx > -1) {
selectedStudentIndexes.value.splice(idx, 1)
@@ -295,7 +293,6 @@
const confirmStudentSelection = () => {
selectedStudentIds.value = selectedStudentIndexes.value.map(index => studentList.value[index].studentId)
showStudentPicker.value = false
-
getRecord()
}
@@ -327,13 +324,11 @@
})
}
-
- const pageChange = (e) => {
+ const pageChange = (e: any) => {
page.value = e
getRecordList()
}
-
const closeStudentPicker = () => {
showStudentPicker.value = false
}
@@ -341,415 +336,261 @@
\ No newline at end of file
+
+ /* 圈数达标弹窗 */
+ .laps-popup-content {
+ width: 600rpx;
+ max-height: 70vh;
+ display: flex;
+ flex-direction: column;
+ }
+
+ .laps-popup-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 28rpx 32rpx;
+ border-bottom: 1rpx solid #f0f0f0;
+ background: #fafafa;
+ border-radius: 16rpx 16rpx 0 0;
+
+ .laps-popup-title {
+ font-size: 32rpx;
+ font-weight: 600;
+ color: #333;
+ }
+ }
+
+ .laps-popup-body {
+ flex: 1;
+ overflow-y: auto;
+ padding: 20rpx 24rpx;
+ max-height: 50vh;
+ }
+
+ .laps-table {
+ border-radius: 12rpx;
+ overflow: hidden;
+ border: 1rpx solid #f0f0f0;
+ }
+
+ .laps-table-header {
+ display: flex;
+ padding: 22rpx 20rpx;
+ background: #faad14;
+
+ .laps-th {
+ flex: 1;
+ text-align: center;
+ font-size: 28rpx;
+ font-weight: 600;
+ color: #fff;
+ }
+ }
+
+ .laps-table-row {
+ display: flex;
+ padding: 24rpx 20rpx;
+ border-bottom: 1rpx solid #f5f5f5;
+ background: #ffffff;
+
+ &:last-child {
+ border-bottom: none;
+ }
+
+ &.laps-row-odd {
+ background: #fafafa;
+ }
+ }
+
+ .laps-td {
+ flex: 1;
+ text-align: center;
+ font-size: 28rpx;
+ color: #333;
+ }
+
+ .laps-empty {
+ padding: 40rpx;
+ text-align: center;
+
+ .laps-empty-text {
+ font-size: 26rpx;
+ color: #999;
+ }
+ }
+
diff --git a/src/pages/dataAnalyze/grades.vue b/src/pages/dataAnalyze/grades.vue
index e1b28f4..1e2332a 100644
--- a/src/pages/dataAnalyze/grades.vue
+++ b/src/pages/dataAnalyze/grades.vue
@@ -1,31 +1,21 @@
-
-
@@ -69,8 +62,6 @@
import { ref, computed } from 'vue'
import { PlanService } from '@/Service/swimming/PlanService'
- // ==================== 响应式数据 - 项目相关 ====================
-
// 项目选择
let showProject = ref(false)
let selectProcet = ref('')
@@ -78,49 +69,26 @@
const projectOptions = ref>([[]])
- // ==================== TypeScript 接口定义 ====================
-
- /**
- * 学生成绩接口
- * 定义学生的成绩和排名信息
- */
interface StudentGrade {
- id : string // 学生 ID
- name : string // 学生姓名
- bestSpeed : number // 最快速度(m/s)
- bestTime : number // 最快用时(秒)
- recordDate : string // 记录日期
- studentId : string // 学生 ID(用于数据关联)
+ id: string
+ name: string
+ bestSpeed: number
+ bestTime: number
+ recordDate: string
+ studentId: string
}
- // ==================== 响应式数据 - 排名相关 ====================
-
- // 排名列表数据
const gradeList = ref([])
- // 最高速度(计算属性)
const maxSpeed = computed(() => {
if (gradeList.value.length === 0) return 0
return Math.max(...gradeList.value.map(item => item.bestSpeed)).toFixed(2)
})
-
-
- // ==================== 生命周期钩子 ====================
-
- /**
- * 页面加载时触发
- * 在页面初始化时执行,只执行一次
- */
onLoad(() => {
- // 初始化数据
getProjectData()
})
-
-
- // ==================== 业务逻辑方法 - 项目相关 ====================
-
const getProjectData = () => {
PlanService.GetPlanListNoPage('计时项目').then(res => {
if (res.code == 0) {
@@ -131,314 +99,244 @@
})
}
- const selectProcetFunc = (e : any) => {
+ const selectProcetFunc = (e: any) => {
selectProcet.value = e.value[0].name
selectId.value = e.value[0].planId
loadProjectGrades(selectId.value)
}
- /**
- * 加载项目排名数据
- * 根据项目 ID 获取该项目的学生成绩排名列表
- * @param projectId 项目 ID
- */
- const loadProjectGrades = (projectId : string) => {
+ const loadProjectGrades = (projectId: string) => {
PlanService.GetRankData(projectId).then(res => {
if (res.code == 0) {
- gradeList.value=res.data.list
+ gradeList.value = res.data.list
} else {
Service.Msg(res.msg)
}
})
}
- // ==================== 业务逻辑方法 - 排名相关 ====================
-
- /**
- * 处理排名项点击事件
- * 点击某排名项查看详情
- * @param item 排名项数据
- */
- const handleRankingClick = (item : StudentGrade) => {
+ const handleRankingClick = (item: StudentGrade) => {
console.log('点击了排名项:', item)
- // TODO: 跳转到学生详情页面
- // Service.GoPage('/pages/student/detail', { studentId: item.studentId })
}
\ No newline at end of file
+
+ /* 空状态 */
+ .empty-card {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ padding: 120rpx 40rpx;
+ background: #ffffff;
+ border-radius: 16rpx;
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
+ margin-top: 4rpx;
+
+ .empty-text {
+ margin-top: 24rpx;
+ font-size: 28rpx;
+ color: #999;
+ }
+ }
+
diff --git a/src/pages/dataAnalyze/paragraphAnalyze.vue b/src/pages/dataAnalyze/paragraphAnalyze.vue
index 7ce8d89..1df5e35 100644
--- a/src/pages/dataAnalyze/paragraphAnalyze.vue
+++ b/src/pages/dataAnalyze/paragraphAnalyze.vue
@@ -1,54 +1,70 @@
-