From c753ab18a3fcae327535158d5ad1ab5c211811f9 Mon Sep 17 00:00:00 2001
From: "@fawn-nine" <1271023382@qq.com>
Date: Thu, 8 Aug 2024 16:41:29 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E5=AD=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages.json | 7 +
pages/miniClass/addHomeWork.vue | 5 +-
pages/miniClass/classInfo.vue | 27 +-
pages/miniClass/classInfoMan.vue | 56 +--
pages/miniClass/courseClassList.vue | 9 +-
pages/miniClass/myClassList.vue | 531 +++++++++++++++++++--------
pages/miniClass/studentsInClass.vue | 463 +++++++++++++++++++++++
pages/miniClass/taskDetail.vue | 2 +-
pages/miniClass/taskDetailForMan.vue | 367 ++++++++++--------
pages/miniClass/taskList.vue | 48 +--
10 files changed, 1131 insertions(+), 384 deletions(-)
create mode 100644 pages/miniClass/studentsInClass.vue
diff --git a/pages.json b/pages.json
index 8646bfe..efaf2cb 100644
--- a/pages.json
+++ b/pages.json
@@ -653,6 +653,13 @@
{
"navigationBarTitleText" : "管理端任务详情"
}
+ },
+ {
+ "path" : "pages/miniClass/studentsInClass",
+ "style" :
+ {
+ "navigationBarTitleText" : "班内学员"
+ }
}
],
"globalStyle": {
diff --git a/pages/miniClass/addHomeWork.vue b/pages/miniClass/addHomeWork.vue
index 4ff8791..29865d6 100644
--- a/pages/miniClass/addHomeWork.vue
+++ b/pages/miniClass/addHomeWork.vue
@@ -101,8 +101,9 @@
//第一次加载
onLoad(e) {
console.log('收到的值', e);
+
this.pageType = e.type
- this.form.classId = e.id
+ this.form.classId = e.classId
this.form.type = e.type
if(e.id){
// this.form.renwuId = e.renwuId
@@ -138,7 +139,7 @@
// 获取医案任务详情
getTaskInfo(){
$http.request({
- url: "common/class/getClassTaskInfo",
+ url: "common/class/getClassTaskInfoStudent",
method: "POST",
data: {
"taskId": this.form.id
diff --git a/pages/miniClass/classInfo.vue b/pages/miniClass/classInfo.vue
index 3b93160..701774e 100644
--- a/pages/miniClass/classInfo.vue
+++ b/pages/miniClass/classInfo.vue
@@ -338,6 +338,9 @@
},
onPullDownRefresh() {
this.getClassInfo()
+ this.pPage = 0
+ this.taskList = []
+ this.getList()
uni.stopPullDownRefresh()
},
onBackPress() {
@@ -349,9 +352,7 @@
},
onShow() {
this.getClassInfo()
- this.pPage = 0
- this.taskList = []
- this.getList()
+
},
computed: {
...mapState(["userInfo"]),
@@ -454,6 +455,7 @@
})
},
getList(){
+ console.log('进入函数了吗');
this.status = 1;
if (this.loadFlag) {
console.log("有未完成的进程");
@@ -464,17 +466,20 @@
})
this.loadFlag = true;
this.pPage++;
+ var data = {
+
+ "limit": 10,
+ "page": this.pPage,
+ "classId": this.thisClass.id,
+ "type": this.tijiaoTitleId+'', //类型 0班内任务1医案2心得
+ "myExperience": this.myExperience, //0全部心得1我的心得
+ "title": ""
+ }
+ console.log('data',data);
$http.request({
url: "common/class/getClassTaskListStudent",
method: "POST",
- data: {
- "limit": 10,
- "page": this.pPage,
- "classId": this.thisClass.id,
- "type": this.tijiaoTitleId+'', //类型 0班内任务1医案2心得
- "myExperience": this.myExperience, //0全部心得1我的心得
- "title": ""
- },
+ data,
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
diff --git a/pages/miniClass/classInfoMan.vue b/pages/miniClass/classInfoMan.vue
index 11d90ad..580a18b 100644
--- a/pages/miniClass/classInfoMan.vue
+++ b/pages/miniClass/classInfoMan.vue
@@ -90,8 +90,12 @@
联合班
精英班
- 人数{{students.length}}/{{thisClass.number}}人
+
+ 学员人数
+
+ {{students.length}}/{{thisClass.number}}人
+
+
管理成员点击查看
@@ -124,48 +128,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.student.nickname}}
-
- ({{item.student.tel}}) 踢出班级
-
-
-
- 匿名用户
-
-
-
-
-
-
- {{ item.buyState }}
-
-
-
-
-
-
-
-
@@ -251,7 +213,7 @@
-
+
@@ -547,6 +509,7 @@
},
// 跳转
onPageJump(url, id, modeType) {
+ console.log('type',modeType);
uni.navigateTo({
url: `${url}?id=${id}&type=${modeType}`
});
@@ -620,7 +583,7 @@
this.$refs.fab.close()
setTimeout(() => {
uni.navigateTo({
- url: `${_url}?id=${this.thisClass.id}&type=${_type}`
+ url: `${_url}?classId=${this.thisClass.id}&type=${_type}`
})
}, 200)
},
@@ -1133,6 +1096,7 @@
.otherItems {
// border: 1px solid #dadada;
padding: 20rpx;
+ text-align: center;
// background-color: rgba(255, 255, 255, .5);
border-radius: 20rpx;
justify-content: space-between;
diff --git a/pages/miniClass/courseClassList.vue b/pages/miniClass/courseClassList.vue
index 690effa..140c7f3 100644
--- a/pages/miniClass/courseClassList.vue
+++ b/pages/miniClass/courseClassList.vue
@@ -26,11 +26,10 @@
-
- 【联合班】
- 【普通班】
- 【联合班】
- 【精英班】
+
+ 【普通班】
+ 【联合班】
+ 【精英班】
{{item.title}}
diff --git a/pages/miniClass/myClassList.vue b/pages/miniClass/myClassList.vue
index bb2041a..51bf384 100644
--- a/pages/miniClass/myClassList.vue
+++ b/pages/miniClass/myClassList.vue
@@ -2,65 +2,142 @@
-
-
-
-
+
+
+
+ -->
-
-
+ {{item.title}}
-
-
-
-
-
-
-
-
-
-
-
-
- 【联合班】
- 【普通班】
- 【联合班】
- 【精英班】
-
- {{item.title}}
-
-
-
- 目标学员人数:{{item.number}} 人
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 【普通班】
+ 【联合班】
+ 【精英班】
+
+ {{item.title}}
+
+
+
+ 目标学员人数:{{item.number}} 人
+
+
+
+
+ 进入班级
+
+
-
-
-
- 进入班级
-
-
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 【普通班】
+ 【联合班】
+ 【精英班】
+
+ {{item.title}}
+
+
+
+ 目标学员人数:{{item.number}} 人
+
+
+
+
+ 进入班级
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 【普通班】
+ 【联合班】
+ 【精英班】
+
+ {{item.title}}
+
+
+
+ 目标学员人数:{{item.number}} 人
+
+
+
+
+ 进入班级
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -75,16 +152,27 @@
data() {
return {
playData: {},
- addType:undefined, // 小班类型
- range:[
- { value: '0', text: "普通小班",name:"普通小班"},
- { value: '1', text: "联合班" ,name:"普通小班"},
- { value: '2', text: "精英班" ,name:"普通小班"},
+ addType: undefined, // 小班类型
+ range: [{
+ value: '0',
+ text: "普通小班",
+ name: "普通小班"
+ },
+ {
+ value: '1',
+ text: "联合班",
+ name: "普通小班"
+ },
+ {
+ value: '2',
+ text: "精英班",
+ name: "普通小班"
+ },
],
tagId: null,
- pid:null,
+ pid: null,
fixed: false,
- pupShow:false,
+ pupShow: false,
fatherTabId: null,
subTabId: null, //
bgiStyle: {
@@ -103,17 +191,43 @@
// backgroundColor: '#258feb'
},
- subList: [{title:'待开班',id:'0'},{title:'已开班',id:'1'},{title:'已结班',id:'2'}],
+ subList1: [{
+ title: '进行中',
+ id: '0'
+ }, {
+ title: '已结班',
+ id: '2'
+ }],
+ subList: [{
+ title: '待开班',
+ id: '0'
+ }, {
+ title: '已开班',
+ id: '1'
+ }, {
+ title: '已结班',
+ id: '2'
+ }],
scrollable: false,
pageTitle: '',
- tabList: [
- {name:'普通小班', id:'0'},{name:'联合班', id:'1'},{name:'精英班',id:'2'}],
+ tabList: [{
+ name: '普通小班',
+ id: '0'
+ }, {
+ name: '联合班',
+ id: '1'
+ }, {
+ name: '精英班',
+ id: '2'
+ }],
curTagId: 0,
- classList: [],
+ classList: [], // 已结班
+ preClassList: [], // 待开班
+ learningClassList: [], // 在学习的班级
status: 3, // 0 不显示, 1 加载中,2 加载全部完成,3 暂无数据
page: 1,
flag: true, // 函数是否执行完
-
+
};
},
//第一次加载
@@ -126,7 +240,7 @@
this.pageTitle = e.title
this.pid = e.pid
console.log(e, '传入分类id')
- this.getData()
+ // this.getData()
// this.getCateList(this.tagId)
},
onPageScroll(e) {
@@ -160,6 +274,7 @@
onShow() {
// 隐藏原生的tabbar
// uni.hideTabBar();
+ this.getLearingClassList()
},
components: {
musicPlay
@@ -167,63 +282,29 @@
//方法
methods: {
// 加入班级
- enterClass(){
-
+ enterClass() {
+
},
- selectChange(e){
+ selectChange(e) {
console.log("e:", e);
},
- closePup(){
+ closePup() {
this.pupShow = false
},
surl(imageurl) {
return `url(${imageurl})`
},
- goCreateClass(){
- console.log('this.addType',this.addType);
- if(this.addType != undefined){
- uni.navigateTo({
- url:`/pages/miniClass/addClass?type=${this.addType}&name=add`
- })
- }else{
- uni.showToast({
- title:'请选择班级的类型',
- icon:'none'
- })
- return
- }
- },
- fatherClick(e) {
- console.log('点击', e)
- this.page = 1
- // var item = e
- this.curTagId = e.id
- this.subTabId = this.subList[0].id
- this.getData(this.subTabId);
- },
- curseClick(item) {
- this.subTabId = item.id
- this.classList = []
- this.page = 1
- this.getData(this.subTabId);
- },
- getData(id) {
- if (!this.flag) {
- console.log('正在执行,未完成')
- return
- }
-
- this.status = 1
- this.flag = false
+ // 待开班
+ getPreClassList() {
uni.showLoading({
- title:'正在加载'
+ title: "加载中"
})
$http.request({
url: "common/class/MyClassList",
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
data: {
- "state": this.subTabId, //小班状态0待开班1已开班2完成
- "type": '' // 班类型 0小班 1联合班 2精英班
+ "state": '0', //小班状态0待开班1已开班2完成
+ "type": '' // 班类型 0小班 1联合班 2精英班
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
@@ -232,11 +313,122 @@
.then(res => {
if (res.code == 0) {
if (res.result.length > 0) {
- this.classList = res.result
-
- }else{
+ this.preClassList = res.result
+
+ } else {
+ this.preClassList = []
+ }
+ }
+ uni.hideLoading()
+ this.getData()
+ }).catch(e => {
+ uni.hideLoading()
+this.getData()
+ console.log(e, '数据报错')
+ // this.status = 3
+ uni.showToast({
+ title: `获取数据失败`,
+ icon: 'error'
+ })
+ });
+ },
+ // 学习中
+ getLearingClassList() {
+ uni.showLoading({
+ title: "加载中"
+ })
+ $http.request({
+ url: "common/class/MyClassList",
+ method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
+ data: {
+ "state": '1', //小班状态0待开班1已开班2完成
+ "type": '' // 班类型 0小班 1联合班 2精英班
+ },
+ header: { //默认 无 说明:请求头
+ 'Content-Type': 'application/json'
+ },
+ })
+ .then(res => {
+ if (res.code == 0) {
+ if (res.result.length > 0) {
+ this.learningClassList = res.result
+
+ } else {
+ this.learningClassList = []
+ }
+ }
+ this.getPreClassList()
+ uni.hideLoading()
+ }).catch(e => {
+ uni.hideLoading()
+ this.getPreClassList()
+
+ console.log(e, '数据报错')
+ // this.status = 3
+ uni.showToast({
+ title: `获取数据失败`,
+ icon: 'error'
+ })
+ });
+ },
+ goCreateClass() {
+ console.log('this.addType', this.addType);
+ if (this.addType != undefined) {
+ uni.navigateTo({
+ url: `/pages/miniClass/addClass?type=${this.addType}&name=add`
+ })
+ } else {
+ uni.showToast({
+ title: '请选择班级的类型',
+ icon: 'none'
+ })
+ return
+ }
+ },
+ fatherClick(e) {
+ console.log('点击', e)
+ this.page = 1
+ // var item = e
+ this.curTagId = e.id
+ this.subTabId = this.subList[0].id
+ this.getData(this.subTabId);
+ },
+ curseClick(item) {
+ this.subTabId = item.id
+ // this.classList = []
+ // this.page = 1
+ // this.getData(this.subTabId);
+ },
+ getData(id) {
+ if (!this.flag) {
+ console.log('正在执行,未完成')
+ return
+ }
+
+ this.status = 1
+ this.flag = false
+ uni.showLoading({
+ title: '正在加载'
+ })
+ $http.request({
+ url: "common/class/MyClassList",
+ method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
+ data: {
+ "state": '2', //小班状态0待开班1已开班2完成
+ "type": '' // 班类型 0小班 1联合班 2精英班
+ },
+ header: { //默认 无 说明:请求头
+ 'Content-Type': 'application/json'
+ },
+ })
+ .then(res => {
+ if (res.code == 0) {
+ if (res.result.length > 0) {
+ this.classList = res.result
+
+ } else {
this.classList = []
- }
+ }
this.flag = true
}
uni.hideLoading()
@@ -246,20 +438,20 @@
console.log(e, '数据报错')
// this.status = 3
uni.showToast({
- title:`获取数据失败`,
- icon:'error'
+ title: `获取数据失败`,
+ icon: 'error'
})
});
},
// 跳转
- onPageJump(url,id,have) {
+ onPageJump(url, id, have) {
// console.log('进来了',url,id);
uni.navigateTo({
url: `${url}?id=${id}&have=${have}`
});
},
-
- shuomingPage(url,id,pid){
+
+ shuomingPage(url, id, pid) {
uni.navigateTo({
url: `${url}?id=${id}&pid=${pid}`
});
@@ -269,43 +461,65 @@
diff --git a/pages/miniClass/taskDetail.vue b/pages/miniClass/taskDetail.vue
index bbe575e..d7be0c2 100644
--- a/pages/miniClass/taskDetail.vue
+++ b/pages/miniClass/taskDetail.vue
@@ -208,7 +208,7 @@
// 获取医案任务详情
getTaskInfo(){
$http.request({
- url: "common/class/getClassTaskInfo",
+ url: "common/class/getClassTaskInfoStudent",
method: "POST",
data: {
"taskId": this.thisTask.id
diff --git a/pages/miniClass/taskDetailForMan.vue b/pages/miniClass/taskDetailForMan.vue
index b638d44..ba3e6d1 100644
--- a/pages/miniClass/taskDetailForMan.vue
+++ b/pages/miniClass/taskDetailForMan.vue
@@ -21,70 +21,78 @@
-
-
-
-
-
-
-
- 匿名用户
- 匿名用户
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 我的答案
-
-
-
- *内容:(600字以内)
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ 匿名用户
+ 匿名用户
-
-
-
- 上传图片:
-
-
-
-
+
-
-
-
-
-
-
- 他人不可见
+
+
- 他人可见
+ {{item.content}}
-
- (不勾选时,班级管理员以外的人看不见提交的内容)
-
+
+ {{item.createTime}}
+
+
-
+
+
+
+
+
+
+
+
+
+
+ 提交的内容
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 日期:{{curReplay.createTime}}
+
+
+ 学员信息:{{curReplay.createUser.nickname != null && curReplay.createUser.nickname != '' ? curReplay.createUser.nickname : '匿名用户'}}
+ / {{curReplay.createUser.tel}}
+
+
+
+
+
+
+
+
@@ -94,7 +102,7 @@