diff --git a/pages.json b/pages.json
index e21b33c..a4d67f3 100644
--- a/pages.json
+++ b/pages.json
@@ -90,7 +90,7 @@
}
},
{
- "path" : "pages/Mystudent/addforwork",
+ "path" : "pages/Mystudent/addclassforwork",
"style" :
{
"navigationBarTitleText": "",
@@ -195,6 +195,17 @@
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
+ },
+ // 作业添加学生
+ {
+ "path" : "pages_add/add_studentsforwork",
+ "style" :
+ {
+ "navigationBarTitleText": "",
+ "navigationBarBackgroundColor": "#4473f6",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
}
]
diff --git a/pages/Mystudent/addforwork.vue b/pages/Mystudent/addclassforwork.vue
similarity index 56%
rename from pages/Mystudent/addforwork.vue
rename to pages/Mystudent/addclassforwork.vue
index 11885a4..f277030 100644
--- a/pages/Mystudent/addforwork.vue
+++ b/pages/Mystudent/addclassforwork.vue
@@ -13,95 +13,34 @@
+ placeholder-style="color:#C7CDD3"
+ @input="search()">
-
-
+
+
-
- 雅思1班
+
+
- 共21人
-
-
-
-
-
-
-
-
-
- 雅思1班
-
-
- 共21人
-
-
-
-
-
-
-
-
-
- 雅思1班
-
-
- 共21人
+ 共{{item.totalMembers}}人
+
-
-
-
-
-
-
-
- 李斯丹妮
-
-
- ID:3324
-
-
-
-
-
-
-
-
-
- 李斯丹妮
-
-
- ID:3324
-
-
-
-
-
-
-
-
-
- 李斯丹妮
-
-
- ID:3324
-
-
-
+
+
-
-
- 确定添加(2)
+
+
+ 确定添加({{selectclass.length}})
@@ -115,10 +54,92 @@ export default {
backgroundColor: "#transparent",
},
showpage:1,
+ classlist:{},
+ changeclasslist:{},
+ isloding:true,
+ selectclass: [],
+ searchKeyword:''
+
}
},
+ onLoad(option) {
+ this.selectclass=JSON.parse(decodeURIComponent(option.classinfo))
+ },
+ onShow() {
+ this.getclassList()
+ },
methods: {
-
+ addclassinfo(){
+ uni.setStorageSync('selectedClassInfo', this.selectclass);
+
+ // Navigate back to the previous page
+ uni.navigateBack({
+ delta: 1, // Number of pages to go back
+ success(res) {
+ console.log(res);
+ },
+ fail(err) {
+ console.error(err);
+ }
+ });
+ },
+ toggleSelection(item) {
+ const selectedIndex = this.selectclass.findIndex(selectedItem => selectedItem.id === item.id);
+
+ if (selectedIndex === -1) {
+ // If not selected, add to the array and apply the 'act1' class
+ this.selectclass.push({ name: item.name, avatar: item.avatar, id: item.id });
+ item.isSelected = true;
+ } else {
+ item.isSelected = false;
+ // If already selected, remove from the array and remove the 'act1' class
+ this.selectclass.splice(selectedIndex, 1);
+ }
+ console.log(this.selectclass, 'this.selectclass');
+ },
+ isSelectedClass(item) {
+ return this.selectclass.some(selectedItem => selectedItem.id === item.id);
+ },
+ search() {
+ // 根据关键字过滤 this.classlist
+ if(this.searchKeyword!=''){
+ const filteredList = JSON.parse(JSON.stringify(this.changeclasslist)).filter(item => item.name.includes(this.searchKeyword));
+ // 更新 this.classlist 为过滤后的列表
+ this.classlist = filteredList;
+ }else{
+ this.fuwei()
+ }
+
+ },
+ highlightSearch(name) {
+ // 使用正则表达式替换匹配到的 searchKeyword 为带有颜色的文字
+ if (this.searchKeyword) {
+ const regex = new RegExp(this.searchKeyword, 'gi');
+ return name.replace(regex, match => `${match}`);
+ }
+ return name;
+ },
+ fuwei() {
+
+ this.classlist = JSON.parse(JSON.stringify(this.changeclasslist));
+ },
+ getclassList() {
+ this.$u.get("https://api.admin-v2.langsi.online/admin-api/classroom/page").then(res => {
+
+ if (res.code === 0) {
+ this.classlist = res.data.list;
+ this.changeclasslist = JSON.parse(JSON.stringify(this.classlist));
+ this.isloding = false;
+ this.selectclass.forEach(selectedItem => {
+ const index = this.classlist.findIndex(item => item.id === selectedItem.id);
+ if (index !== -1) {
+ this.$set(this.classlist, index, { ...this.classlist[index], isSelected: true });
+ }
+ });
+
+ }
+ });
+ },
}
}
diff --git a/pages_teacher/pages_add/add_students.vue b/pages_teacher/pages_add/add_students.vue
deleted file mode 100644
index ed3f2a7..0000000
--- a/pages_teacher/pages_add/add_students.vue
+++ /dev/null
@@ -1,9 +0,0 @@
-
- 添加学生-个人
-
-
-
-
-
\ No newline at end of file
diff --git a/pages_teacher/pages_add/add_studentsforwork.vue b/pages_teacher/pages_add/add_studentsforwork.vue
new file mode 100644
index 0000000..59e3b63
--- /dev/null
+++ b/pages_teacher/pages_add/add_studentsforwork.vue
@@ -0,0 +1,310 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ID:{{item.id}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确定添加({{selectedIds.length}})
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages_teacher/teacher_class/class_detail.vue b/pages_teacher/teacher_class/class_detail.vue
index 620a48c..c67606f 100644
--- a/pages_teacher/teacher_class/class_detail.vue
+++ b/pages_teacher/teacher_class/class_detail.vue
@@ -1,6 +1,6 @@
-
+
@@ -98,7 +98,9 @@
return {
isShow: true,
-
+ bgc: {
+ backgroundColor: "#F6F9FC",
+ },
operation:[
{
image:'https://file.langsi.online/yasiimg/web/static/ukPnTLkhCKU5zhbM7SMu',
@@ -129,7 +131,7 @@
}
},
onLoad(option) {
- // this.classid=option.id
+ /* > */ // this.classid=option.id
this.classid=15
},
@@ -139,8 +141,16 @@
},
methods:{
toaddwork(){
+ let classinofs=[
+ {
+ name:this.classinfo.name,
+ avatar:this.classinfo.avatar,
+ id:this.classinfo.id,
+
+ }
+ ]
uni.navigateTo({
- url: "/pages_teacher/teacher_teachers/teacher_addOperation?id=" + this.classinfo.id
+ url: "/pages_teacher/teacher_teachers/teacher_addOperation?classinfo=" + encodeURIComponent(JSON.stringify(classinofs))
}).then(res => {
}).catch(err => {
diff --git a/pages_teacher/teacher_teachers/teacher_addOperation.vue b/pages_teacher/teacher_teachers/teacher_addOperation.vue
index eefbc23..0d42a84 100644
--- a/pages_teacher/teacher_teachers/teacher_addOperation.vue
+++ b/pages_teacher/teacher_teachers/teacher_addOperation.vue
@@ -1,13 +1,13 @@
-
+
@@ -15,56 +15,30 @@
班级安排
-
-
-
- +
- 添加
-
+
+ +
-
-
-
-
-
-
-
- 雅思1班
-
-
-
-
-
- 雅思1班
-
-
-
-
-
- 雅思1班
-
+
+
+
+ 暂未安排哦!
-
-
-
+
+ 去安排
+
+
+
+
+
+
- 雅思1班
-
-
-
-
-
- 雅思1班
-
-
-
-
-
- 雅思1班
+ {{item.name}}
+
+
@@ -72,58 +46,33 @@
学员安排
-
+
-
- +
- 添加
-
+ +
-
-
-
-
-
-
-
- LULY
-
-
-
-
-
- Bright
-
-
-
-
-
- Bright
-
+
+
+
+ 暂未安排哦!
-
-
-
-
-
-
- LULY
-
-
-
-
-
- Bright
-
-
-
-
-
- Bright
-
+
+ 去安排
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
@@ -300,34 +249,96 @@
export default {
data() {
return {
- // 表单双向数据绑定
- form: {
- value: '',
- times:'',
-
+ bgc: {
+ backgroundColor: "#F6F9FC",
},
// prick 时间选择框数据
params: {
- year: true,
- month: true,
- day: true,
- hour: false,
- minute: false,
- second: false
- },
- show: false,
+ year: true,
+ month: true,
+ day: true,
+ hour: true,
+ minute: false,
+ second: false
+ },
+ show: false,
radio: '',
switchVal: false,
+ classinfo:[],
+ stuinfo:[],
+ worktit:'',
+ times:'',
+
}
},
+ onLoad(option) {
+ uni.removeStorageSync('selectedClassInfo');
+ uni.removeStorageSync('selectedStuInfo');
+ // this.classinfo=JSON.parse(decodeURIComponent(option.classinfo))
+ let classinofs=[
+ {
+ name:'阅读5班',
+ avatar:'Excepteur',
+ id:15,
+
+ }
+ ]
+ this.classinfo=classinofs
+
+ },
+ onShow() {
+ // Read selectedClassInfo data
+ const selectedClassInfo = uni.getStorageSync('selectedClassInfo');
+ console.log(selectedClassInfo,'selectedClassInfoselectedClassInfo');
+ if (selectedClassInfo && selectedClassInfo.length > 0) {
+ this.classinfo=selectedClassInfo
+ // Remove duplicates from this.classinfo
+ // this.classinfo = this.classinfo.filter(item => !selectedClassInfo.some(selectedItem => selectedItem.id === item.id));
+
+ // // Add non-duplicate items from selectedClassInfo to this.classinfo
+ // this.classinfo = this.classinfo.concat(selectedClassInfo);
+
+ }
+ const selectedstuInfo = uni.getStorageSync('selectedStuInfo');
+
+ if (selectedstuInfo && selectedstuInfo.length > 0) {
+ this.stuinfo=selectedstuInfo
+ // Remove duplicates from this.classinfo
+ // this.stuinfo = this.stuinfo.filter(item => !selectedstuInfo.some(selectedItem => selectedItem.id === item.id));
+
+ // // Add non-duplicate items from selectedClassInfo to this.classinfo
+ // this.stuinfo = this.stuinfo.concat(selectedstuInfo);
+
+ }
+ },
methods:{
+ toaddstu(){
+ uni.navigateTo({
+ url: "/pages_teacher/pages_add/add_studentsforwork?stuinfo=" + encodeURIComponent(JSON.stringify(this.stuinfo))
+
+ }).then(res => {
+
+ }).catch(err => {
+
+ });
+ },
+ addclass(){
+ uni.navigateTo({
+ url: "/pages/Mystudent/addclassforwork?classinfo=" + encodeURIComponent(JSON.stringify(this.classinfo))
+ }).then(res => {
+
+ }).catch(err => {
+
+ });
+ },
+
// 获取截止时间
printValue(e){
- this.form.times=`${e.year}-${e.month}-${e.day}`
+ this.times=`${e.year}-${e.month}-${e.day}`
},
submit() {
- }
+ }
}
}
@@ -366,16 +377,61 @@
justify-content: space-between;
align-items: center;
margin-top: 46rpx;
+ .view_tb{
+ display: flex;
+ padding-left: 24rpx;
+ // align-items: center;
+ // padding: 11rpx 24rpx 11rpx 24rpx;
+ width: 120rpx;
+ height: 52rpx;
+ background: #FFFFFF;
+ border-radius: 26rpx 26rpx 26rpx 26rpx;
+
+ border: 2rpx solid #F1F1F1;
+
+ color: #F18F21 ;
+ font-size: 30rpx;
+ }
+ }
+ .noting{
+ display: flex;
+ flex-wrap: nowrap;
+ align-items: center;
+ justify-content: center;
+ margin-top: 16rpx;
+ width: 686rpx;
+ height: 124rpx;
+ background: #FFFFFF;
+ border-radius: 20rpx 20rpx 20rpx 20rpx;
+ image{
+ width: 58.19rpx;
+ height: 60rpx;
+ }
+ .text1{
+ margin-left: 12rpx;
+ font-size: 24rpx;
+ font-family: PingFang SC, PingFang SC;
+ font-weight: 500;
+ color: #627698;
+ }
+ .text2{
+ margin-left: 12rpx;
+ font-size: 24rpx;
+ font-family: PingFang SC, PingFang SC;
+ font-weight: 500;
+ color: #2D7CE6;
+ border-bottom: 2px solid #2D7CE6;
+ }
}
-
.class_bj {
margin-top: 16rpx;
}
.class_images {
display: flex;
- justify-content: space-between;
- margin-top: 20rpx;
+ flex-wrap: wrap;
+ // justify-content: space-between;
+ // margin-top: 20rpx;
}
.class_tp {
@@ -389,8 +445,12 @@
color: #2E4975;
margin: 20rpx 0;
}
-
+ .class_ys:nth-child(3n) {
+ margin-right: 0;
+ }
.class_ys {
+ margin-top: 20rpx;
+ margin-right: 20rpx;
width: 215rpx;
height: 96rpx;
display: flex;
@@ -402,18 +462,23 @@
background: #FFFFFF;
border-radius: 20rpx 20rpx 20rpx 20rpx;
}
+
.class_wz {
- font-size: 28rpx;
- font-family: 'PingFang';
- font-weight: 500;
- color: #072F5A;
+ width: 125rpx;
+ font-size: 28rpx;
+ font-family: 'PingFang';
+ font-weight: 500;
+ color: #072F5A;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
}
.view_form{
padding: 0rpx 32rpx;
background: #FFFFFF;
margin-top: 16rpx;
-border-radius: 20rpx 20rpx 20rpx 20rpx;
+ border-radius: 20rpx 20rpx 20rpx 20rpx;
}
.view_textrea{
height: 260rpx;
@@ -432,10 +497,10 @@ border-radius: 20rpx 20rpx 20rpx 20rpx;
color: #FFFFFF;
}
.view_footer{
- width: 100%;
+ width: 100%;
padding: 0 16rpx;
height: 144rpx;
- border-radius: 40rpx 40rpx 0rpx 0rpx;
+ border-radius: 40rpx 40rpx 0rpx 0rpx;
padding: 32rpx 0rpx;
background-color: #fff;
box-shadow: 0rpx -10rpx 16rpx 0rpx rgba(202,202,202,0.25);