From d1eedfdc5b6187a96d898f38090b2370037d75f4 Mon Sep 17 00:00:00 2001 From: Ls <2391972606@qq.com> Date: Tue, 26 May 2026 08:41:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Service/BaseConfig.ts | 7 +- src/pages.json | 19 +- src/pages/dataAnalyze/Curve.vue | 162 +- src/pages/dataAnalyze/baoganAnalyze.vue | 744 +++- src/pages/dataAnalyze/grades.vue | 172 +- src/pages/dataAnalyze/paragraphAnalyze.vue | 1039 ++++-- src/pages/dataAnalyze/timingAnalze.vue | 399 +- src/pages/index/index.vue | 52 +- src/pages/index/user.vue | 88 +- src/pages/userFunc/addHunyang.vue | 6 +- src/pages/userFunc/cs.vue | 3872 ++++++++++++++++++++ src/pages/userFunc/hunyang.vue | 618 +++- src/pages/userFunc/project.vue | 1484 ++++++-- src/pages/userFunc/segmentation.vue | 157 +- src/pages/userFunc/setCourse.vue | 11 + src/pages/userFunc/student.vue | 83 +- src/pages/userFunc/swiming.vue | 423 ++- src/static/icon/video.mp3 | Bin 0 -> 33792 bytes 18 files changed, 7861 insertions(+), 1475 deletions(-) create mode 100644 src/pages/userFunc/cs.vue create mode 100644 src/static/icon/video.mp3 diff --git a/src/Service/BaseConfig.ts b/src/Service/BaseConfig.ts index f578a9f..0975c90 100644 --- a/src/Service/BaseConfig.ts +++ b/src/Service/BaseConfig.ts @@ -1,8 +1,7 @@ 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:5300"; + // protected static imgUrl: string = "http://192.168.0.142:5300"; + // protected static mediaUrl: string = "http://192.168.0.142:5300/"; protected static servesUrl: string = "https://swimming.api.xypays.cn"; protected static imgUrl: string = "https://swimming.api.xypays.cn"; diff --git a/src/pages.json b/src/pages.json index b684ed2..f273e28 100644 --- a/src/pages.json +++ b/src/pages.json @@ -76,8 +76,9 @@ { "path": "project", "style": { - "navigationBarTitleText": "包干" - + "navigationBarTitleText": "包干", + "pageOrientation": "auto", + "navigationStyle": "custom" } }, { @@ -89,7 +90,9 @@ { "path": "hunyang", "style": { - "navigationBarTitleText": "混氧" + "navigationBarTitleText": "混氧", + "pageOrientation": "auto", + "navigationStyle": "custom" } }, { @@ -97,12 +100,18 @@ "style": { "navigationBarTitleText": "创建项目" } + }, + { + "path": "cs", + "style": { + "navigationBarTitleText": "测试", + "pageOrientation": "auto" + } } ] }, { "root": "pages/dataAnalyze", - "pages": [ - { + "pages": [{ "path": "baoganAnalyze", "style": { "navigationBarTitleText": "包干数据" diff --git a/src/pages/dataAnalyze/Curve.vue b/src/pages/dataAnalyze/Curve.vue index e566df7..df6d523 100644 --- a/src/pages/dataAnalyze/Curve.vue +++ b/src/pages/dataAnalyze/Curve.vue @@ -11,7 +11,31 @@ - + + + + + 选择项目 + + + + + + + + + {{ project.name }} + + + + 暂无项目 + + + + + @@ -46,9 +70,6 @@ - - {{ student.name.charAt(0) }} - {{ student.name }} @@ -58,7 +79,7 @@ - + @@ -87,7 +108,7 @@ - + @@ -96,6 +117,7 @@ import { Service } from '@/Service/Service' import { ref, computed } from 'vue' import { PlanService } from '@/Service/swimming/PlanService' + import { studentService } from '@/Service/swimming/studentService' const MAX_SELECTED_STUDENTS = 3 const chartColors = ['#52c41a', '#1890ff', '#faad14'] @@ -191,9 +213,10 @@ }) } - const selectProcetFunc = (e: any) => { - selectProcet.value = e.value[0].name - selectId.value = e.value[0].planId + const selectProcetFunc = (project: any) => { + selectProcet.value = project.name + selectId.value = project.planId + showProject.value = false selectedStudentIds.value = [] begin.value = '' end.value = '' @@ -218,13 +241,14 @@ } const loadProjectStudents = (projectId: string) => { - PlanService.GetPlanInfo(projectId).then(res => { + studentService.GetStudentList().then(res => { if (res.code == 0) { - projectStudents.value = res.data.plan.users + projectStudents.value = res.data } else { Service.Msg(res.msg) } }) + } const toggleStudent = (studentId: string) => { @@ -262,6 +286,7 @@ res.data.list.map((item: any) => { lineChartData.value.categories.push(item.dayTime) item.data.map((content: any, index: any) => { + xData.value[index].name = content.studentName xData.value[index].data.push(content.time) }) @@ -469,6 +494,8 @@ /* 图表区域 */ .chart-section { margin-top: 4rpx; + position: relative; + z-index: 1; } .stats-card { @@ -549,4 +576,117 @@ } } } + + /* 项目选择弹窗 */ + .project-popup-content { + width: 680rpx; + max-height: 70vh; + background: linear-gradient(180deg, #fafbfc 0%, #fff 100%); + border-radius: 32rpx; + overflow: hidden; + display: flex; + flex-direction: column; + box-shadow: 0 24rpx 80rpx rgba(0, 0, 0, 0.25), 0 0 0 1rpx rgba(0, 0, 0, 0.04); + } + + .modal-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 36rpx 32rpx 28rpx; + background: linear-gradient(180deg, #fafbfc 0%, #fff 100%); + border-bottom: 1rpx solid rgba(0, 0, 0, 0.06); + + .modal-title { + font-size: 36rpx; + font-weight: 700; + background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; + } + + .modal-close { + width: 60rpx; + height: 60rpx; + border-radius: 50%; + background: linear-gradient(135deg, #f5f5f5 0%, #f0f0f0 100%); + display: flex; + align-items: center; + justify-content: center; + transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); + box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08); + + &:active { + background: linear-gradient(135deg, #e8e8e8 0%, #e0e0e0 100%); + transform: scale(0.92); + } + } + } + + .popup-project-list { + max-height: 55vh; + padding: 24rpx 28rpx; + } + + .project-list-inner { + display: flex; + flex-direction: column; + gap: 16rpx; + } + + .project-item { + display: flex; + align-items: center; + gap: 16rpx; + padding: 20rpx 24rpx; + background: linear-gradient(135deg, #fff 0%, #fafbfc 100%); + transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); + box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06), 0 0 0 1rpx rgba(0, 0, 0, 0.04) inset; + position: relative; + overflow: hidden; + border-radius: 16rpx; + + &::after { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 4rpx; + height: 100%; + background: linear-gradient(180deg, #1890ff 0%, #40a9ff 100%); + opacity: 0; + transition: opacity 0.3s ease; + } + + &:active::after { + opacity: 1; + } + + .item-info { + flex: 1; + min-width: 0; + display: flex; + align-items: center; + + .item-name { + font-size: 28rpx; + font-weight: 600; + color: #333; + letter-spacing: 1rpx; + } + } + } + + .empty-project { + display: flex; + align-items: center; + justify-content: center; + padding: 60rpx 0; + + .empty-text { + font-size: 28rpx; + color: #999; + } + } diff --git a/src/pages/dataAnalyze/baoganAnalyze.vue b/src/pages/dataAnalyze/baoganAnalyze.vue index 572747a..8898ecd 100644 --- a/src/pages/dataAnalyze/baoganAnalyze.vue +++ b/src/pages/dataAnalyze/baoganAnalyze.vue @@ -1,5 +1,5 @@ @@ -126,36 +164,29 @@ import { Service } from '@/Service/Service' import { ref, computed } from 'vue' import { PlanService } from '@/Service/swimming/PlanService' - - interface Project { - id: string - name: string - } + import { studentService } from '@/Service/swimming/studentService' interface Student { - id: string - name: string - gender: string - age: number + studentId : 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[] - } + // 数据加载 + let isLoading = ref(false) // 项目选择 - let showProject = ref(false) + let showProjectPopup = ref(false) let selectProcet = ref('') let selectId = ref('') @@ -169,40 +200,30 @@ let pageTotal = ref(10) const columns = ref([ - { label: '训练日期', name: 'addTime' }, { label: '姓名', name: 'studentName' }, - { label: '项目名称', name: 'name' }, - { label: '项目类型', name: 'planType' }, + { label: '训练数据', name: 'subsection' }, { label: '完成比例', name: 'completion' }, { label: '详细数据', name: 'detail' } ]) - - let rowData=ref('') - - const tableData = ref([]) + + + let row = ref({}) + let rowData = ref('') + + + const tableData = ref([]) const projectOptions = 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 collapsedDays = ref([]) + + // 切换日期折叠状态 + const toggleDayCollapse = (index : number) => { + collapsedDays.value[index] = !collapsedDays.value[index] } const selectedStudentDisplay = computed(() => { @@ -219,12 +240,18 @@ return `${begin.value} 至 ${end.value}` }) + onLoad(() => { - loadData() getProjectData() + getRecordList() + getStudentList() }) - const loadData = () => {} + onShow(() => { }) + + + + const getProjectData = () => { PlanService.GetPlanListNoPage('计时项目').then(res => { @@ -235,22 +262,35 @@ } }) } - - const cellClick = (rows: any) => { - rowData.value = rows.detail - console.log(rowData.value); - showLapsModal.value=true + + const getStudentList = () => { + studentService.GetStudentList().then(res => { + if (res.code == 0) { + studentList.value = res.data + } else { + Service.Msg(res.msg) + } + }) } - - const selectProcetFunc = (e: any) => { - selectProcet.value = e.value[0].name - selectId.value = e.value[0].planId + + + const cellClick = (rows : any) => { + + row.value = rows + rowData.value = rows.detail + showRecordPopup.value = true + } + + const selectProject = (project : any) => { + selectProcet.value = project.name + selectId.value = project.planId + showProjectPopup.value = false begin.value = '' end.value = '' selectedStudentIndexes.value = [] - studentList.value = [] + selectedStudentIds.value = [] tableData.value = [] - getProjectDetail() + getRecord() } const getProjectDetail = () => { @@ -267,21 +307,30 @@ showCalendar.value = true } - const calendarConfirm = (e: any) => { + const calendarConfirm = (e : any) => { begin.value = e[0] end.value = e[e.length - 1] showCalendar.value = false + getRecord() } const calendarClose = () => { showCalendar.value = false } - const selectAllStudents = () => { - selectedStudentIndexes.value = studentList.value.map((_, index) => index) + const allSelected = computed(() => { + return studentList.value.length > 0 && studentList.value.every((_, index) => selectedStudentIndexes.value.includes(index)) + }) + + const toggleSelectAll = () => { + if (allSelected.value) { + selectedStudentIndexes.value = [] + } else { + selectedStudentIndexes.value = studentList.value.map((_, index) => index) + } } - const toggleStudentSelection = (index: number) => { + const toggleStudentSelection = (index : number) => { const idx = selectedStudentIndexes.value.indexOf(index) if (idx > -1) { selectedStudentIndexes.value.splice(idx, 1) @@ -302,6 +351,7 @@ } const getRecordList = () => { + Service.Msg('数据加载中...') let studentIdList = selectedStudentIndexes.value.map(index => { return studentList.value[index].studentId }) @@ -310,21 +360,24 @@ planId: selectId.value, studentId: JSON.stringify(studentIdList), sTime: begin.value, - eTime: end.value, - page: page.value + eTime: end.value } PlanService.GetBaoganLog(data).then(res => { + isLoading.value = true + Service.LoadClose() if (res.code == 0) { pageTotal.value = res.data.pageTotal tableData.value = res.data.list + // 初始化折叠状态,默认全部展开 + collapsedDays.value = new Array(res.data.list.length).fill(false) } else { Service.Msg(res.msg) } }) } - const pageChange = (e: any) => { + const pageChange = (e : any) => { page.value = e getRecordList() } @@ -332,16 +385,44 @@ const closeStudentPicker = () => { showStudentPicker.value = false } + + // 记录详情弹窗 + const showRecordPopup = ref(false) + + interface RecordItem { + name : string + time : string + } + + const recordList = ref([]) + + // 打开记录详情弹窗 + const openRecordPopup = (data : RecordItem[]) => { + recordList.value = data + showRecordPopup.value = true + } + + // 关闭记录详情弹窗 + const closeRecordPopup = () => { + showRecordPopup.value = false + } + // 简化时间格式化(分:秒.毫秒) + const formatSimpleTime = (seconds : number) : string => { + const mins = Math.floor(seconds / 60) + const secs = Math.floor(seconds % 60) + const millis = Math.floor((seconds % 1) * 100) + return `${mins.toString().padStart(2, '0')}′${secs.toString().padStart(2, '0')}″${millis.toString().padStart(2, '0')}` + } + \ No newline at end of file diff --git a/src/pages/dataAnalyze/grades.vue b/src/pages/dataAnalyze/grades.vue index 1e2332a..2a8ab80 100644 --- a/src/pages/dataAnalyze/grades.vue +++ b/src/pages/dataAnalyze/grades.vue @@ -11,7 +11,7 @@ - + @@ -53,6 +53,33 @@ 暂无排名数据 + + + + + + 选择项目 + + + + + + + + + {{ project.name }} + + + + 暂无项目 + + + + + + @@ -100,8 +127,9 @@ } const selectProcetFunc = (e: any) => { - selectProcet.value = e.value[0].name - selectId.value = e.value[0].planId + + selectProcet.value = e.name + selectId.value = e.planId loadProjectGrades(selectId.value) } @@ -109,6 +137,7 @@ PlanService.GetRankData(projectId).then(res => { if (res.code == 0) { gradeList.value = res.data.list + showProject.value=false } else { Service.Msg(res.msg) } @@ -339,4 +368,141 @@ color: #999; } } + + + /* 项目选择弹窗 */ + .project-popup-content { + width: 680rpx; + max-height: 70vh; + background: linear-gradient(180deg, #fafbfc 0%, #fff 100%); + border-radius: 32rpx; + overflow: hidden; + display: flex; + flex-direction: column; + box-shadow: 0 24rpx 80rpx rgba(0, 0, 0, 0.25), 0 0 0 1rpx rgba(0, 0, 0, 0.04); + } + + .modal-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 36rpx 32rpx 28rpx; + background: linear-gradient(180deg, #fafbfc 0%, #fff 100%); + border-bottom: 1rpx solid rgba(0, 0, 0, 0.06); + + .modal-title { + font-size: 36rpx; + font-weight: 700; + background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; + } + + .modal-close { + width: 60rpx; + height: 60rpx; + border-radius: 50%; + background: linear-gradient(135deg, #f5f5f5 0%, #f0f0f0 100%); + display: flex; + align-items: center; + justify-content: center; + transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); + box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08); + + &:active { + background: linear-gradient(135deg, #e8e8e8 0%, #e0e0e0 100%); + transform: scale(0.92); + } + } + } + + .popup-project-list { + max-height: 55vh; + padding: 24rpx 28rpx; + } + + .project-list-inner { + display: flex; + flex-direction: column; + gap: 16rpx; + } + + .project-item { + display: flex; + align-items: center; + gap: 16rpx; + padding: 20rpx 24rpx; + background: linear-gradient(135deg, #fff 0%, #fafbfc 100%); + transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); + box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06), 0 0 0 1rpx rgba(0, 0, 0, 0.04) inset; + position: relative; + overflow: hidden; + border-radius: 16rpx; + + &::after { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 4rpx; + height: 100%; + background: linear-gradient(180deg, #1890ff 0%, #40a9ff 100%); + opacity: 0; + transition: opacity 0.3s ease; + } + + &:active::after { + opacity: 1; + } + + .item-icon { + flex-shrink: 0; + + .icon-bg { + width: 56rpx; + height: 56rpx; + background: linear-gradient(135deg, #1890ff 0%, #40a9ff 50%, #36cfc9 100%); + border-radius: 14rpx; + display: flex; + align-items: center; + justify-content: center; + box-shadow: 0 4rpx 12rpx rgba(24, 144, 255, 0.25); + position: relative; + + &::before { + content: ''; + position: absolute; + top: 6rpx; + right: 6rpx; + width: 10rpx; + height: 10rpx; + background: rgba(255, 255, 255, 0.3); + border-radius: 50%; + } + + .icon-text { + font-size: 28rpx; + color: #fff; + font-weight: 700; + letter-spacing: 2rpx; + } + } + } + + .item-info { + flex: 1; + min-width: 0; + display: flex; + align-items: center; + + .item-name { + font-size: 28rpx; + font-weight: 600; + color: #333; + letter-spacing: 1rpx; + } + } + } + diff --git a/src/pages/dataAnalyze/paragraphAnalyze.vue b/src/pages/dataAnalyze/paragraphAnalyze.vue index 1df5e35..911e4da 100644 --- a/src/pages/dataAnalyze/paragraphAnalyze.vue +++ b/src/pages/dataAnalyze/paragraphAnalyze.vue @@ -1,115 +1,155 @@ @@ -116,7 +122,7 @@ let planCount=ref(0) let studentCount=ref(0) let userInfo = ref({}) - + let isUse=ref(false) onLoad(() => { @@ -124,8 +130,19 @@ onShow(() => { loadUserInfo() + isUseFunc() }) + const isUseFunc=()=>{ + userService.IsCheakUserVerify().then(res=>{ + if(res.code==0){ + isUse.value=res.data.isCheak + }else{ + Service.Msg(res.msg) + } + }) + } + const loadUserInfo = () => { userService.GetUserInfo().then((content:any) => { if (content.code == 0) { @@ -138,26 +155,21 @@ }) } - - /** - * 跳转到训练计划页面 - * 点击"训练计划"菜单项时触发 - * 功能说明: - * - 跳转到训练计划列表页面 - * - 用户可以查看、添加、编辑训练计划 - */ - const goToTrainingPlans = () => { - Service.GoPage('/pages/userFunc/plan') + const goPage=(path:any)=>{ + if(!isUse.value){ + Service.Msg('用户暂无权限,请等待审核!') + return + } + Service.GoPage(path) } - // 跳转到设置 - const goToSettings = () => { - Service.Msg('系统设置功能开发中') - } - - // 跳转到关于 - const goToAbout = () => { - Service.Msg('关于我们功能开发中') + const callContact = () => { + uni.makePhoneCall({ + phoneNumber: '13800000000', + fail: () => { + Service.Msg('拨打电话失败') + } + }) } @@ -169,7 +181,7 @@ .user-container { padding: 20rpx; padding-top: 30rpx; - padding-bottom: 40rpx; + padding-bottom: 140rpx; } /* 用户信息卡片 */ @@ -551,4 +563,30 @@ margin: 0 32rpx; } } + + /* 底部固定联系信息 */ + .contact-footer { + position: fixed; + bottom: 0; + left: 0; + right: 0; + background-color: #fff; + border-top: 1rpx solid #eee; + padding: 16rpx 0; + display: flex; + flex-direction: column; + align-items: center; + gap: 6rpx; + z-index: 10; + + .contact-label { + font-size: 24rpx; + color: #999; + } + + .contact-phone { + font-size: 26rpx; + color: #1890ff; + } + } \ No newline at end of file diff --git a/src/pages/userFunc/addHunyang.vue b/src/pages/userFunc/addHunyang.vue index bee767f..6a2227d 100644 --- a/src/pages/userFunc/addHunyang.vue +++ b/src/pages/userFunc/addHunyang.vue @@ -378,10 +378,12 @@ console.log('保存的数据:', data) PlanService.AddPlan(data).then(res => { if (res.code == 0) { - Service.Msg('添加成功!') + Service.Msg(planId.value?'修改成功!':'添加成功!') setTimeout(() => { - Service.GoPageBack() + Service.GoPageDelse('/pages/userFunc/hunyang?id=' + res.data.planId) }, 1000) + + } else { Service.Msg(res.msg) } diff --git a/src/pages/userFunc/cs.vue b/src/pages/userFunc/cs.vue new file mode 100644 index 0000000..87c611f --- /dev/null +++ b/src/pages/userFunc/cs.vue @@ -0,0 +1,3872 @@ + + + + + \ No newline at end of file diff --git a/src/pages/userFunc/hunyang.vue b/src/pages/userFunc/hunyang.vue index bf5777f..04945fc 100644 --- a/src/pages/userFunc/hunyang.vue +++ b/src/pages/userFunc/hunyang.vue @@ -1,100 +1,94 @@