保存
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<text>筛选条件</text>
|
||||
</view>
|
||||
|
||||
<view class="filter-item" @click="showProject = true">
|
||||
<view class="filter-item" @click="showProjectPopup = true">
|
||||
<text class="filter-label">项目</text>
|
||||
<view class="filter-value">
|
||||
<text class="value-text" :class="{ placeholder: !selectProcet }">{{ selectProcet || '请选择项目' }}</text>
|
||||
@@ -36,7 +36,30 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<up-picker v-model:show="showProject" keyName="name" valueName="planId" @confirm="selectProcetFunc" :columns="projectOptions"></up-picker>
|
||||
<!-- 项目选择弹窗 -->
|
||||
<up-popup :show="showProjectPopup" mode="center" round="32" :safeAreaInsetBottom="false" @close="showProjectPopup = false">
|
||||
<view class="project-popup-content">
|
||||
<view class="modal-header">
|
||||
<text class="modal-title">选择项目</text>
|
||||
<view class="modal-close" @click="showProjectPopup = false">
|
||||
<u-icon name="close" size="20" color="#999"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y class="popup-project-list">
|
||||
<view class="project-list-inner">
|
||||
<view v-for="(project, index) in projectOptions[0]" :key="project.planId" class="project-item" @click="selectProject(project)">
|
||||
|
||||
<view class="item-info">
|
||||
<text class="item-name">{{ project.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="!projectOptions[0] || projectOptions[0].length === 0" class="empty-project">
|
||||
<text class="empty-text">暂无项目</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</up-popup>
|
||||
|
||||
<!-- 数据表格 -->
|
||||
<view class="data-card">
|
||||
@@ -46,7 +69,7 @@
|
||||
</view>
|
||||
<view v-for="(item,index) in tableData" :key="index">
|
||||
<view class="day-title" @click="toggleDayCollapse(index)">
|
||||
<text>{{ item.dayTime }}</text>
|
||||
<text>{{ item.dayTime }} · {{ item.planName }} </text>
|
||||
<u-icon
|
||||
name="arrow-down"
|
||||
size="16"
|
||||
@@ -54,7 +77,7 @@
|
||||
:class="{ 'arrow-rotate': collapsedDays[index] }"
|
||||
></u-icon>
|
||||
</view>
|
||||
<view class="table-wrap" v-if="collapsedDays[index]">
|
||||
<view class="table-wrap" v-if="collapsedDays[index]">
|
||||
<next-table :show-header="true" @cellClick="cellClick" :columns="columns" :stripe="true" :fit="false" :show-summary="false" :data="item.data" ></next-table>
|
||||
</view>
|
||||
</view>
|
||||
@@ -66,11 +89,7 @@
|
||||
<text class="empty-text"> {{ isLoading?'暂无训练记录':'加载中' }} </text>
|
||||
</view>
|
||||
|
||||
<!-- 提示状态 -->
|
||||
<!-- <view v-else-if="selectProcet" class="empty-card">
|
||||
<u-icon name="search" size="64" color="#d9d9d9"></u-icon>
|
||||
<text class="empty-text">请选择筛选条件查看数据</text>
|
||||
</view> -->
|
||||
|
||||
|
||||
<!-- 日历弹窗 -->
|
||||
<up-calendar :show="showCalendar" mode="date" minDate="1776240407000" @confirm="calendarConfirm" @close="calendarClose"></up-calendar>
|
||||
@@ -79,23 +98,32 @@
|
||||
<view class="modal-overlay" v-if="showStudentPicker" @click="closeStudentPicker"></view>
|
||||
<view class="student-picker-modal" v-if="showStudentPicker">
|
||||
<view class="picker-header">
|
||||
<text class="header-title">选择学生</text>
|
||||
<view class="header-left">
|
||||
<text class="header-title">选择学生</text>
|
||||
<text class="student-count">已选({{ selectedStudentIndexes.length }}/{{ studentList.length }})</text>
|
||||
</view>
|
||||
<view class="header-actions">
|
||||
<text class="action-btn" @click="selectAllStudents">全选</text>
|
||||
<view class="select-all-btn" @click="toggleSelectAll">
|
||||
<view class="checkbox-icon" :class="{ checked: allSelected }">
|
||||
<u-icon v-if="allSelected" name="checkmark" size="14" color="#fff"></u-icon>
|
||||
</view>
|
||||
<text class="select-all-text">{{ allSelected ? '取消全选' : '全选' }}</text>
|
||||
</view>
|
||||
<text class="action-btn primary" @click="confirmStudentSelection">确定</text>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view class="student-list" scroll-y>
|
||||
<view v-for="(student, index) in studentList" :key="student.studentId" class="student-item" :class="{ selected: selectedStudentIndexes.includes(index) }" @click="toggleStudentSelection(index)">
|
||||
<view class="item-checkbox">
|
||||
<view class="checkbox-inner" :class="{ checked: selectedStudentIndexes.includes(index) }">
|
||||
<u-icon v-if="selectedStudentIndexes.includes(index)" name="checkmark" size="12" color="#fff"></u-icon>
|
||||
<view class="student-grid">
|
||||
<view v-for="(student, index) in studentList" :key="student.studentId" class="student-item" :class="{ checked: selectedStudentIndexes.includes(index) }" @click="toggleStudentSelection(index)">
|
||||
<view class="student-checkbox" :class="{ checked: selectedStudentIndexes.includes(index) }">
|
||||
<text v-if="selectedStudentIndexes.includes(index)" class="checkbox-index">
|
||||
{{ selectedStudentIndexes.indexOf(index) + 1 }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="student-info">
|
||||
<view class="student-name">{{ student.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-avatar">
|
||||
<text class="avatar-text">{{ student.name.charAt(0) }}</text>
|
||||
</view>
|
||||
<text class="item-name">{{ student.name }}</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
@@ -104,7 +132,7 @@
|
||||
<up-popup :show="showRecordPopup" @close="closeRecordPopup" mode="center" round="16" bgColor="#fff">
|
||||
<view class="record-popup-content">
|
||||
<view class="record-popup-header">
|
||||
<text class="record-popup-title">记录详情</text>
|
||||
<text class="record-popup-title">{{ rowData.studentName +'·' + rowData.planName}}</text>
|
||||
<u-icon name="close" size="22" color="#999" @click="closeRecordPopup"></u-icon>
|
||||
</view>
|
||||
<scroll-view class="record-popup-body" scroll-y>
|
||||
@@ -114,7 +142,7 @@
|
||||
<text class="record-th">时间</text>
|
||||
</view>
|
||||
<view
|
||||
v-for="(item, index) in rowData.split('|')"
|
||||
v-for="(item, index) in rowData.time.split('|')"
|
||||
:key="index"
|
||||
class="record-table-row"
|
||||
:class="{ 'record-row-odd': index % 2 === 1 }"
|
||||
@@ -122,7 +150,7 @@
|
||||
<text class="record-td">记录{{ index+1 }}</text>
|
||||
<text class="record-td">{{ item }}</text>
|
||||
</view>
|
||||
<view v-if="rowData.split('|').length === 0" class="record-empty">
|
||||
<view v-if="rowData.time.split('|').length === 0" class="record-empty">
|
||||
<text class="record-empty-text">暂无数据</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -159,7 +187,7 @@
|
||||
let isLoading=ref(false)
|
||||
|
||||
// 项目选择
|
||||
let showProject = ref(false)
|
||||
let showProjectPopup = ref(false)
|
||||
let selectProcet = ref('')
|
||||
let selectId = ref('')
|
||||
|
||||
@@ -174,12 +202,14 @@
|
||||
|
||||
const columns = ref([
|
||||
{ label: '姓名', name: 'studentName' },
|
||||
{ label: '项目名称', name: 'planName' },
|
||||
{ label: '最快速度', name: 'quicklyTime' },
|
||||
{ label: '详细数据', name: 'time', width: '200' }
|
||||
])
|
||||
|
||||
let rowData=ref('')
|
||||
let rowData=ref<any>({
|
||||
studentName:'',
|
||||
time:''
|
||||
})
|
||||
|
||||
const tableData = ref<any[]>([])
|
||||
const projectOptions = ref<Array<any>>([[]])
|
||||
@@ -217,6 +247,12 @@
|
||||
})
|
||||
|
||||
onShow(() => {})
|
||||
|
||||
|
||||
const cs=(e)=>{
|
||||
console.log(e);
|
||||
}
|
||||
|
||||
|
||||
const getProjectData = () => {
|
||||
PlanService.GetPlanListNoPage('计时项目').then(res => {
|
||||
@@ -240,17 +276,18 @@
|
||||
|
||||
|
||||
const cellClick=(e:any)=>{
|
||||
rowData.value=e.time
|
||||
console.log(rowData.value);
|
||||
rowData.value=e
|
||||
showRecordPopup.value=true
|
||||
}
|
||||
|
||||
const selectProcetFunc = (e: any) => {
|
||||
selectProcet.value = e.value[0].name
|
||||
selectId.value = e.value[0].planId
|
||||
const selectProject = (project: any) => {
|
||||
selectProcet.value = project.name
|
||||
selectId.value = project.planId
|
||||
showProjectPopup.value = false
|
||||
begin.value = ''
|
||||
end.value = ''
|
||||
selectedStudentIndexes.value = []
|
||||
selectedStudentIds.value = []
|
||||
// studentList.value = []
|
||||
tableData.value = []
|
||||
// getProjectDetail()
|
||||
@@ -282,8 +319,16 @@
|
||||
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) => {
|
||||
@@ -533,6 +578,18 @@
|
||||
background: #fafafa;
|
||||
border-radius: 24rpx 24rpx 0 0;
|
||||
|
||||
.header-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8rpx;
|
||||
|
||||
.student-count {
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.header-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
@@ -545,6 +602,36 @@
|
||||
gap: 16rpx;
|
||||
}
|
||||
|
||||
.select-all-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8rpx;
|
||||
padding: 8rpx 16rpx;
|
||||
border-radius: 12rpx;
|
||||
transition: all 0.2s ease;
|
||||
|
||||
&:active {
|
||||
transform: scale(0.96);
|
||||
}
|
||||
|
||||
.checkbox-icon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
&.checked {
|
||||
color: #1890ff;
|
||||
}
|
||||
}
|
||||
|
||||
.select-all-text {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
|
||||
.action-btn {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
@@ -570,69 +657,69 @@
|
||||
padding: 16rpx 24rpx 40rpx;
|
||||
}
|
||||
|
||||
.student-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 12rpx;
|
||||
}
|
||||
|
||||
.student-item {
|
||||
width: calc((100% - 24rpx) / 3);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20rpx;
|
||||
padding: 22rpx 20rpx;
|
||||
border-radius: 12rpx;
|
||||
margin-bottom: 12rpx;
|
||||
background: #f8f9fa;
|
||||
transition: background 0.2s;
|
||||
gap: 8rpx;
|
||||
padding: 16rpx 8rpx;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 16rpx;
|
||||
border: 2rpx solid transparent;
|
||||
transition: all 0.25s ease;
|
||||
|
||||
&:active {
|
||||
background: #eeeeee;
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
&.selected {
|
||||
background: #fff3e0;
|
||||
border: 1rpx solid #ffcc80;
|
||||
&.checked {
|
||||
background-color: #e6f7ff;
|
||||
border-color: #1890ff;
|
||||
}
|
||||
}
|
||||
|
||||
.item-checkbox {
|
||||
flex-shrink: 0;
|
||||
|
||||
.checkbox-inner {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #bfbfbf;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s;
|
||||
|
||||
&.checked {
|
||||
border-color: #faad14;
|
||||
background: #faad14;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-avatar {
|
||||
flex-shrink: 0;
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
.student-checkbox {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
border-radius: 50%;
|
||||
background: #1890ff;
|
||||
border: 2rpx solid #d9d9d9;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
transition: all 0.2s ease;
|
||||
|
||||
.avatar-text {
|
||||
font-size: 28rpx;
|
||||
&.checked {
|
||||
border-color: #1890ff;
|
||||
background-color: #1890ff;
|
||||
}
|
||||
|
||||
.checkbox-index {
|
||||
font-size: 22rpx;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.item-name {
|
||||
flex: 1;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
.student-info {
|
||||
width: 100%;
|
||||
|
||||
.student-name {
|
||||
font-size: 26rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
/* 表格深度样式 */
|
||||
@@ -664,6 +751,168 @@
|
||||
background-color: #fff !important;
|
||||
}
|
||||
|
||||
/* 项目选择弹窗 */
|
||||
.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.empty-project {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 100rpx 20rpx;
|
||||
gap: 16rpx;
|
||||
|
||||
.empty-text {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
background: linear-gradient(135deg, rgba(24, 144, 255, 0.08) 0%, rgba(64, 169, 255, 0.03) 100%);
|
||||
border-radius: 28rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes slideUp {
|
||||
from {
|
||||
transform: translateY(100%);
|
||||
|
||||
Reference in New Issue
Block a user