4-23
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<view class="form-title">项目信息</view>
|
||||
<view class="form-group">
|
||||
<text class="form-label">项目名称</text>
|
||||
<input class="form-input" v-model="courseData.projectName" placeholder="请输入项目名称"
|
||||
<input class="form-input" :disabled="planId" v-model="courseData.projectName" placeholder="请输入项目名称"
|
||||
placeholder-class="input-placeholder" />
|
||||
</view>
|
||||
</view>
|
||||
@@ -115,11 +115,9 @@
|
||||
@click="toggleStudentSelect(student.studentId)">
|
||||
<view class="student-checkbox"
|
||||
:class="{ checked: selectedStudentIds.includes(student.studentId) }">
|
||||
<u-icon v-if="selectedStudentIds.includes(student.studentId)" name="checkmark" size="14"
|
||||
color="#fff"></u-icon>
|
||||
</view>
|
||||
<view class="student-avatar">
|
||||
<text class="avatar-text">{{ student.name.charAt(0) }}</text>
|
||||
<text v-if="selectedStudentIds.includes(student.studentId)" class="checkbox-index">
|
||||
{{ selectedStudentIds.indexOf(student.studentId) + 1 }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="student-info">
|
||||
<view class="student-name">{{ student.name }}</view>
|
||||
@@ -127,21 +125,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 已选学生预览 -->
|
||||
<view v-if="selectedStudents.length > 0" class="selected-preview">
|
||||
<view class="preview-header">
|
||||
<text class="preview-title">已选学生</text>
|
||||
</view>
|
||||
<view class="preview-list">
|
||||
<view v-for="(student, index) in selectedStudents" :key="student.studentId" class="preview-item">
|
||||
<text class="preview-index">{{ index + 1 }}</text>
|
||||
<text class="preview-name">{{ student.name }}</text>
|
||||
<view class="preview-remove" @click.stop="removeSelectedStudent(student.studentId)">
|
||||
<u-icon name="close" size="14" color="#ff4d4f"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="width: 100%; height: 80rpx;">
|
||||
@@ -326,10 +310,20 @@
|
||||
|
||||
PlanService.AddPlan(data).then(res=>{
|
||||
if(res.code==0){
|
||||
Service.Msg('添加成功!')
|
||||
setTimeout(()=>{
|
||||
Service.Msg( planId.value?'修改成功!': '添加成功!')
|
||||
if(planId.value){
|
||||
Service.GoPageBack()
|
||||
},1000)
|
||||
return
|
||||
}
|
||||
|
||||
if(type.value=='1'){
|
||||
Service.GoPageDelse('/pages/userFunc/swiming?id=' + res.data.planId)
|
||||
}else{
|
||||
Service.GoPageDelse('/pages/userFunc/segmentation?id=' + res.data.planId)
|
||||
}
|
||||
|
||||
|
||||
|
||||
}else{
|
||||
Service.Msg(res.msg)
|
||||
}
|
||||
@@ -697,14 +691,15 @@
|
||||
/* 学生列表 */
|
||||
.student-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: wrap;
|
||||
gap: 12rpx;
|
||||
|
||||
.student-item {
|
||||
width: calc((100% - 24rpx) / 3);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16rpx;
|
||||
padding: 20rpx;
|
||||
gap: 8rpx;
|
||||
padding: 16rpx 8rpx;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 16rpx;
|
||||
border: 2rpx solid transparent;
|
||||
@@ -720,8 +715,8 @@
|
||||
}
|
||||
|
||||
.student-checkbox {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
border-radius: 50%;
|
||||
border: 2rpx solid #d9d9d9;
|
||||
display: flex;
|
||||
@@ -734,6 +729,13 @@
|
||||
border-color: #1890ff;
|
||||
background-color: #1890ff;
|
||||
}
|
||||
|
||||
.checkbox-index {
|
||||
font-size: 22rpx;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.student-avatar {
|
||||
@@ -745,7 +747,7 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
|
||||
|
||||
.avatar-text {
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
@@ -754,14 +756,11 @@
|
||||
}
|
||||
|
||||
.student-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
|
||||
width: 100%;
|
||||
.student-name {
|
||||
font-size: 28rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 6rpx;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@@ -771,6 +770,7 @@
|
||||
.student-meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 12rpx;
|
||||
|
||||
.gender-badge {
|
||||
|
||||
Reference in New Issue
Block a user