This commit is contained in:
@fawn-nine
2024-09-26 15:43:57 +08:00
parent 86a1f754c2
commit b2221666e1
13 changed files with 132 additions and 73 deletions

View File

@@ -142,12 +142,14 @@
<!-- 学员列表 -->
<view class="" v-if="tabId == '2'">
<template v-if="students.length> 0 ">
<view class="" style=" overflow: hidden; margin: 20rpx 0;">
<text style="font-size: 26rpx; color: #666;"> {{students.length}} 名学员</text>
<!-- <uni-section class="mb-10 nobg xueyuanTitle" title="班内学员" type="line" sub-title="">
{{students.length}} 名学员</uni-section> -->
</view>
<template v-if="(thisClass.state == '0' || thisClass.state == '1')">
<view class="classMateBox">
<view class="" style=" overflow: hidden;">
<uni-section class="mb-10 nobg xueyuanTitle" title="班内学员" type="line" sub-title="">
{{students.length}} 名学员</uni-section>
</view>
<view class=" tips">
<view class="flex_box">
<view class="item flex_box">
@@ -389,6 +391,7 @@
<script>
import sutdentScoreList from "./components/sutdent_score_list.vue";
import debounce from "@/common/debounce.js";
import {
ref,
onMounted
@@ -869,10 +872,11 @@
return list
},
// 改变班级状态
changeClassStatu(statusCode) {
changeClassStatu(statusCode) {
debounce(async () => {
let that = this
that.opClass(statusCode)
},300)
},
// 考试周和结班状态下,学员的信息
async getStudentScoreList() {
@@ -919,6 +923,9 @@
},
// 班级操作
opClass(statusCode) {
uni.showLoading({
title:'正在处理'
})
$http.request({
url: "common/class/updateClassState",
method: "POST",
@@ -931,6 +938,7 @@
},
})
.then(res => {
uni.hideLoading()
if (res.code == 0) {
// that.isHave = true
uni.showToast({
@@ -951,11 +959,12 @@
})
}
}).catch(e => {
uni.hideLoading()
console.log(e, '数据报错')
uni.showToast({
title: res.errMsg,
icon: 'none',
duration: 300
duration: 3000
})
});
},