diff --git a/common/http.interceptor.js b/common/http.interceptor.js
index 2c5f949..930e143 100644
--- a/common/http.interceptor.js
+++ b/common/http.interceptor.js
@@ -41,7 +41,9 @@ const install = (Vue, vm) => {
// 方式四,如果token放在了Storage本地存储中,拦截是每次请求都执行的
// 所以哪怕您重新登录修改了Storage,下一次的请求将会是最新值
// const token = uni.getStorageSync('token');
- const token = " Bearer ce1a0c1ec5344cefbc7a185e29353c7c"
+
+ const token = " Bearer d61c0fee9e404290b8e4ad7bd0167656"
+
// console.log("我是token", token)
config.header.Authorization = token;
// config.header.Tenant-Id=1
diff --git a/pages.json b/pages.json
index 4e0d8f0..e21b33c 100644
--- a/pages.json
+++ b/pages.json
@@ -68,16 +68,7 @@
"navigationStyle": "custom"
}
},
- {
- "path" : "pages/Mystudent/search",
- "style" :
- {
- "navigationBarTitleText": "",
- "navigationBarBackgroundColor": "#4473f6",
- "enablePullDownRefresh": false,
- "navigationStyle": "custom"
- }
- },
+
{
"path" : "pages/Mystudent/classmate",
"style" :
@@ -127,6 +118,26 @@
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
+ },
+ {
+ "path" : "pages/Mystudent/addstu",
+ "style" :
+ {
+ "navigationBarTitleText": "",
+ "navigationBarBackgroundColor": "#4473f6",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path" : "pages/Mystudent/formstu",
+ "style" :
+ {
+ "navigationBarTitleText": "",
+ "navigationBarBackgroundColor": "#4473f6",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
}
],
"subPackages": [
diff --git a/pages/Mystudent/Formteacher.vue b/pages/Mystudent/Formteacher.vue
index 235717d..bc11c16 100644
--- a/pages/Mystudent/Formteacher.vue
+++ b/pages/Mystudent/Formteacher.vue
@@ -18,39 +18,14 @@
placeholder-style="color:#C7CDD3 ">
-
+
+
- 张三三老师
-
-
- 听力
-
-
-
-
-
-
-
-
-
- 张三三老师
-
-
- 听力
-
-
-
-
-
-
-
-
-
- 张三三老师
+ {{item.name}}
听力
@@ -68,10 +43,28 @@ export default {
bgc: {
backgroundColor: "#transparent",
},
+ classid:0,
+ teacherlist:[]
}
},
+ onLoad(option) {
+ // this.classid=option.id
+ this.classid=15
+ this.getclassteacher()
+ },
methods: {
-
+ getclassteacher(){
+ this.$u.get(`https://api.admin-v2.langsi.online/admin-api/classroom/teacher/list?classId=${this.classid}`).then(res => {
+
+
+ if (res.code == 0) {
+ this.teacherlist=res.data.list
+ // this.classlist = res.data.list
+ // this.isloding = false
+
+ }
+ })
+ }
}
}
diff --git a/pages/Mystudent/addstu.vue b/pages/Mystudent/addstu.vue
new file mode 100644
index 0000000..215860d
--- /dev/null
+++ b/pages/Mystudent/addstu.vue
@@ -0,0 +1,207 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 李斯丹妮
+
+
+ ID:3324
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/Mystudent/search.vue b/pages/Mystudent/formstu.vue
similarity index 52%
rename from pages/Mystudent/search.vue
rename to pages/Mystudent/formstu.vue
index 28b20af..8a385f5 100644
--- a/pages/Mystudent/search.vue
+++ b/pages/Mystudent/formstu.vue
@@ -1,16 +1,17 @@
-
-
+
-
-
+
+
+
-
+
+
+
+ + 添加学生
+
-
-
-
+
+
+
- 雅思1班
+ 李斯丹妮
- 标签文字
+ ID:3324
-
-
-
- 班级人数
+
+
+
+ 平均成绩/分
+
+
+ 6
+
-
- 21
+
+
+ 作业完成度
+
+
+ 80%
+
-
-
-
- 平均成绩/分
-
-
- 21
-
-
-
-
- 作业完成度
-
-
- 80%
-
-
+
-
-
+
+
- 雅思1班
+ 李斯丹妮
- 标签文字
+ ID:3324
-
-
-
- 班级人数
+
+
+
+ 平均成绩/分
+
+
+ 6
+
-
- 21
+
+
+ 作业完成度
+
+
+ 80%
+
-
-
-
- 平均成绩/分
-
-
- 21
-
-
-
-
- 作业完成度
-
-
- 80%
-
-
+
+
+
@@ -118,30 +114,65 @@
export default {
data() {
return {
+ title: '班级成员',
bgc: {
- backgroundColor: "#transparent",
+ backgroundColor: "#F6F9FC",
},
checkindex: 1,
}
},
+ onLoad(option) {
+ // this.classid=option.id
+ this.classid=15
+ this.getclassteacher()
+ },
methods: {
-
+ getclassteacher(){
+ this.$u.get(`https://api.admin-v2.langsi.online/admin-api/classroom/members/list?classId=${this.classid}`).then(res => {
+
+
+ if (res.code == 0) {
+ this.teacherlist=res.data.list
+ // this.classlist = res.data.list
+ // this.isloding = false
+
+ }
+ })
+ },
+ addstu(){
+ uni.navigateTo({
+ url: "/pages/Mystudent/addstu?id=" + this.classid
+ }).then(res => {
+
+ }).catch(err => {
+
+ });
+ }
}
}
diff --git a/pages/Mystudent/student.vue b/pages/Mystudent/student.vue
index 1c3b916..cabfb89 100644
--- a/pages/Mystudent/student.vue
+++ b/pages/Mystudent/student.vue
@@ -52,7 +52,7 @@
学生人数
- 21
+ {{totalLastNum}}
@@ -60,7 +60,7 @@
平均成绩/分
- 21
+ {{totalAvgScore }}
@@ -68,7 +68,7 @@
作业完成度
- 80%
+ {{totalWorkCompletionDegre}}%
@@ -160,8 +160,8 @@
-
- {{ item.name }}
+
+
@@ -290,6 +290,9 @@ export default {
showtext: false,
textindex: 0,
searchKeyword: '',
+ totalLastNum:'',
+ totalAvgScore:'',
+ totalWorkCompletionDegre:0,
}
},
onLoad(option) {
@@ -297,14 +300,22 @@ export default {
},
methods: {
+ highlightSearch(name) {
+ // 使用正则表达式替换匹配到的 searchKeyword 为带有颜色的文字
+ if (this.searchKeyword) {
+ const regex = new RegExp(this.searchKeyword, 'gi');
+ return name.replace(regex, match => `${match}`);
+ }
+ return name;
+ },
toclassdetal(item) {
- console.log('点击了'); // 确保这一行输出
+
uni.navigateTo({
url: "/pages_teacher/teacher_class/class_detail?id=" + item.id
}).then(res => {
- console.log('跳转成功', res);
- }).catch(err => {
- console.error('跳转失败', err);
+
+ }).catch(err => {
+
});
},
search() {
@@ -320,7 +331,7 @@ export default {
},
calculatePercentage(value1, value2) {
if (value2 === 0) {
- console.log("value2 is zero, cannot calculate percentage");
+
return '0%'; // 或者返回其他默认值
}
@@ -348,8 +359,7 @@ export default {
},
fuwei() {
- console.log(this.classlist, 'this.classlist');
- console.log(this.changeclasslist, 'this.changeclasslist');
+
this.classlist = JSON.parse(JSON.stringify(this.changeclasslist));
},
changetext() {
@@ -378,7 +388,7 @@ export default {
return 0; // 保持原有顺序
});
} else {
- console.log('调用了');
+
this.fuwei();
}
@@ -386,17 +396,40 @@ export default {
},
getclassList() {
this.$u.get("https://api.admin-v2.langsi.online/admin-api/classroom/page").then(res => {
- console.log(res, '返回成功');
+
if (res.code === 0) {
this.classlist = res.data.list;
this.changeclasslist = JSON.parse(JSON.stringify(this.classlist));
this.isloding = false;
+ const list = res.data.list;
+
+ if (list.length > 0) {
+ // 计算 totalMembers 总和
+ const totalMembersSum = list.reduce((sum, item) => sum + item.totalMembers, 0);
+
+ // 计算 workCompletionDegree 平均值
+ const workCompletionDegreeAvg = list.reduce((sum, item) => sum + item.workCompletionDegree, 0) / list.length;
+
+ // 计算 avgScore 平均值
+ const avgScoreAvg = list.reduce((sum, item) => sum + item.avgScore, 0) / list.length;
+ console.log(workCompletionDegreeAvg,'workCompletionDegreeworkCompletionDegree');
+ // 将计算结果赋值给对应的变量
+ this.totalLastNum = totalMembersSum;
+ this.totalWorkCompletionDegre = workCompletionDegreeAvg;
+ this.totalAvgScore = avgScoreAvg;
+ // console.log(this.totalworkCompletionDegree,'totalworkCompletionDegreetotalworkCompletionDegree');
+ } else {
+ // 处理空数组的情况,例如设置默认值或者给出提示
+ this.totalLastNum = 0;
+ this.totalWorkCompletionDegre = 0;
+ this.totalAvgScore = 0;
+ }
}
});
},
getstuList() {
this.$u.get("https://api.admin-v2.langsi.online/admin-api/classroom/page").then(res => {
- console.log(res, '返回成功');
+
if (res.code == 0) {
this.classlist = res.data.list
diff --git a/pages_teacher/teacher_class/class_detail.vue b/pages_teacher/teacher_class/class_detail.vue
index 134ac6a..b8409a8 100644
--- a/pages_teacher/teacher_class/class_detail.vue
+++ b/pages_teacher/teacher_class/class_detail.vue
@@ -8,8 +8,20 @@
- 雅思1班
- 基础班
+ {{classinfo.name}}
+
+
+ 听力
+
+
+ 阅读
+
+
+ 写作
+
+
+ 口语
+
@@ -19,10 +31,21 @@
-
+
- {{item.title}}
+ 班级成员
+
+
+
+
+
+
+
+
+
+
+ 带班老师
@@ -69,52 +92,7 @@
return {
isShow: false,
- clas:[
- {
- title:'班级成员',
- image:[
- {
- url:'https://file.langsi.online/yasiimg/web/static/uXJ24nLEqmCb0FkFpmfy',
- },
- {
- url:'https://file.langsi.online/yasiimg/web/static/ufg5N01CbfezyG5wt48Q'
- },
- {
- url:'https://file.langsi.online/yasiimg/web/static/uXJ24nLEqmCb0FkFpmfy'
- },
- {
- url:'https://file.langsi.online/yasiimg/web/static/uy3xEPgyYPnRqPbpamya'
- },
- {
- url:'https://file.langsi.online/yasiimg/web/static/uY8idjLvCQSuYCzvus9A'
- },{
- url:'https://file.langsi.online/yasiimg/web/static/ucf2g8fGLqNtW7OpGNT6'
- },
- ]
- },
- {
- title:'带班老师',
- image:[
- {
- url:'https://file.langsi.online/yasiimg/web/static/uXJ24nLEqmCb0FkFpmfy',
- },
- {
- url:'https://file.langsi.online/yasiimg/web/static/ufg5N01CbfezyG5wt48Q'
- },
- {
- url:'https://file.langsi.online/yasiimg/web/static/uXJ24nLEqmCb0FkFpmfy'
- },
- {
- url:'https://file.langsi.online/yasiimg/web/static/uy3xEPgyYPnRqPbpamya'
- },
- {
- url:'https://file.langsi.online/yasiimg/web/static/uY8idjLvCQSuYCzvus9A'
- },{
- url:'https://file.langsi.online/yasiimg/web/static/ucf2g8fGLqNtW7OpGNT6'
- },
- ]
- }
- ],
+
operation:[
{
image:'https://file.langsi.online/yasiimg/web/static/ukPnTLkhCKU5zhbM7SMu',
@@ -137,9 +115,55 @@
title:'更多'
}
- ]
+ ],
+ classid:0,
+ classinfo:{}
}
- }
+ },
+ onLoad(option) {
+ // this.classid=option.id
+ this.classid=15
+ this.getclassinfo()
+ },
+ onShow(){
+
+ },
+ methods:{
+ getclassinfo() {
+ this.$u.get(`https://api.admin-v2.langsi.online/admin-api/classroom/detail?id=${this.classid}`).then(res => {
+
+
+ if (res.code == 0) {
+ this.classinfo=res.data
+ // this.classlist = res.data.list
+ // this.isloding = false
+
+ }
+ })
+ },
+ toteacher(){
+
+ uni.navigateTo({
+ url: "/pages/Mystudent/Formteacher?id=" + this.classinfo.id
+ }).then(res => {
+
+ }).catch(err => {
+
+ });
+
+ },
+ tostu(){
+
+ uni.navigateTo({
+ url: "/pages/Mystudent/formstu?id=" + this.classinfo.id
+ }).then(res => {
+
+ }).catch(err => {
+
+ });
+
+ }
+ },
}
diff --git a/pages_teacher/teacher_teachers/teacher_writeadd.vue b/pages_teacher/teacher_teachers/teacher_writeadd.vue
index e948bc8..f5fa67f 100644
--- a/pages_teacher/teacher_teachers/teacher_writeadd.vue
+++ b/pages_teacher/teacher_teachers/teacher_writeadd.vue
@@ -19,7 +19,127 @@
-
+
+
+ {{item.examName}}
+ test1
+ test2
+ test3
+ test4
+
+
+
+
+
+ Test 1
+
+ 曲线图
+ 政府
+
+
+
+
+
+
+
+
+
+ Test 1
+
+ 曲线图
+ 政府
+
+
+
+
+
+
+
+
+
+
+
+ Test 2
+
+ 曲线图
+ 政府
+
+
+
+
+
+
+
+
+
+ Test 2
+
+ 曲线图
+ 政府
+
+
+
+
+
+
+
+
+
+
+
+ Test 3
+
+ 曲线图
+ 政府
+
+
+
+
+
+
+
+
+
+ Test 3
+
+ 曲线图
+ 政府
+
+
+
+
+
+
+
+
+
+
+
+ Test 4
+
+ 曲线图
+ 政府
+
+
+
+
+
+
+
+
+
+ Test 4
+
+ 曲线图
+ 政府
+
+
+
+
+
+
+
+
@@ -46,7 +166,6 @@
import audiology from './components/audiology.vue'
import reading from './components/reading.vue'
import slander from './components/slander.vue'
- import compose from './components/compose.vue'
export default {
data() {
return {
@@ -68,25 +187,40 @@
name: '1',
disabled: false
}],
+ // 写作
+ Compose: [],
num:0,
// 下拉框的v-if布尔值
radioValue: '',
part1: true,
current: 0,
search: true,
+ listType: [],
idList: [],
}
},
components:{
audiology,
reading,
- slander,
- compose
+ slander
},
methods: {
+ upType(index, num) {
+ this.listType.splice(index, 1, num)
+ },
change(index) {
this.current = index;
},
+ //写作接口
+ // getCompose() {
+ // this.$u.post('https://api.admin-v2.langsi.online/admin-api/speaking/topic/home/list').then(res => {
+ // this.Compose = res.data
+ // console.log(this.Compose)
+ // for (let i = 0; i < res.data.length; i++) {
+ // this.listType.push(1)
+ // }
+ // })
+ // },
// 选中某个单选框时,由radio时触发
radioCheck(index) {
if (this.radioValue == this.list2[index].id) {