From 76008bc03a45062660e6ce6fdd656fd8c63273e0 Mon Sep 17 00:00:00 2001
From: taoxu <2622874537@qq.com>
Date: Thu, 7 Dec 2023 16:59:19 +0800
Subject: [PATCH 1/6] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
 pages/Mystudent/addstu.vue                   | 131 +++++++++++++++++--
 pages/Mystudent/formstu.vue                  |  89 +++++++------
 pages_teacher/teacher_class/class_detail.vue |  31 ++++-
 3 files changed, 188 insertions(+), 63 deletions(-)
diff --git a/pages/Mystudent/addstu.vue b/pages/Mystudent/addstu.vue
index 215860d..89d0a64 100644
--- a/pages/Mystudent/addstu.vue
+++ b/pages/Mystudent/addstu.vue
@@ -1,27 +1,33 @@
 
 	
-		
+			
 		
 			
 				
 
 				
 			
-			
+			
 		
 		
-			
+			 
 				
 					
-						
+						
 					
 					
-						
-							李斯丹妮
+						
+							
 						
 						
-							ID:3324
+							ID:{{item.id}}
 						
 					
 				
@@ -30,9 +36,14 @@
 			
 
 		
-		
+		
 			
 		
+		
+			
+				确定添加({{selectedIds.length}})
+			
+		
 	
 
 
@@ -41,10 +52,13 @@
 		data() {
 			return {
 				bgc: {
-					backgroundColor: "#transparent",
+					backgroundColor: "#F6F9FC",
 				},
 				checkindex: 1,
-				stulist:[]
+				stulist:[],
+				searchKeyword:'',
+				orgstulist:[],
+				selectedIds: [],
 			}
 		},
 		onLoad(option) {
@@ -53,14 +67,81 @@
 			this.getallstu()
 		},
 		methods: {
+			addstu() {
+			let data = {
+				memberId: this.selectedIds[0],
+				// memberId: '1522',
+				roomId: this.classid
+			};
+			
+			this.$u.post(`https://api.admin-v2.langsi.online/admin-api/classroom/members/add`, data).then(res => {
+				if (res.code === 0) {
+					this.$refs.uToast.show({
+						title: '添加成功',
+						type: 'success',
+						position:'top'
+					})
+					this.selectedIds=[]
+					this.fuwei()
+				}else{
+					this.$refs.uToast.show({
+						title: '添加失败',
+						type: 'error',
+						position:'top'
+						
+					})
+					this.selectedIds=[]
+					this.fuwei()
+				}
+			});
+			},
+			 toggleSelection(item) {
+			    const selectedIndex = this.selectedIds.indexOf(item.id);
+			
+			    if (selectedIndex === -1) {
+			      // If not selected, add to the array and apply the 'act1' class
+			      this.selectedIds.push(item.id);
+			      item.isSelected = true;  // Add a property to the item to track selection
+			    } else {
+			      // If already selected, remove from the array and remove the 'act1' class
+			      this.selectedIds.splice(selectedIndex, 1);
+			      item.isSelected = false;
+			    }
+				console.log(this.selectedIds,'selectedIdsselectedIdsselectedIds');
+			  },
+			search() {
+			    // 根据关键字过滤 this.classlist
+			    if (this.searchKeyword !== '') {
+			        const filteredList = JSON.parse(JSON.stringify(this.orgstulist)).filter(item => {
+			            // 匹配 nickName 或者 id
+			            return item.nickName.includes(this.searchKeyword) || item.id.toString().includes(this.searchKeyword);
+			        });
+			        // 更新 this.classlist 为过滤后的列表
+			        this.stulist = filteredList;
+			    } else {
+			        this.fuwei();
+			    }
+			},
+			fuwei() {
+				
+				this.stulist = JSON.parse(JSON.stringify(this.orgstulist));
+			},
+			highlightSearch(name) {
+			    // 使用正则表达式替换匹配到的 searchKeyword 为带有颜色的文字
+			    if (this.searchKeyword) {
+			      const regex = new RegExp(this.searchKeyword, 'gi');
+			      return name.replace(regex, match => `${match}`);
+			    }
+			    return name;
+			  },
 			getallstu(){
 				this.$u.get(`https://api.admin-v2.langsi.online/admin-api/v2/ybs-user/page`).then(res => {
 				
 							
 					if (res.code == 0) {
-						this.stulist=res.data.list	
-						// this.classlist = res.data.list
-						// this.isloding = false
+						this.stulist=res.data.list
+						this.orgstulist = JSON.parse(JSON.stringify(res.data.list));
+						
 							
 					}
 				})
@@ -203,5 +284,29 @@
 				border: 2rpx solid #2D7CE6;
 			}
 		}
+		.botbtn{
+			padding: 32rpx 32rpx 0 32rpx;
+			margin-left: -32rpx;
+			position: fixed;
+			bottom: 0;
+			width: 750rpx;
+			height: 200rpx;
+			background: #FFFFFF;
+			box-shadow: 0rpx -10rpx 16rpx 0rpx rgba(202,202,202,0.25);
+			border-radius: 40rpx 40rpx 0rpx 0rpx;
+			.btn{
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				font-size: 28rpx;
+				font-family:'PingFang','PingFang';
+				font-weight: 800;
+				color: #FFFFFF;
+				width: 686rpx;
+				height: 80rpx;
+				background: linear-gradient(180deg, #74AFFF 0%, #2D7CE6 100%);
+				border-radius: 104rpx 104rpx 104rpx 104rpx;
+			}
+		}
 	}
 
\ No newline at end of file
diff --git a/pages/Mystudent/formstu.vue b/pages/Mystudent/formstu.vue
index 8a385f5..e174b40 100644
--- a/pages/Mystudent/formstu.vue
+++ b/pages/Mystudent/formstu.vue
@@ -20,9 +20,11 @@
 					
 				
 				
+					  v-model="searchKeyword"
+					  placeholder="搜索相关内容..."
+					  class="input"
+					  placeholder-style="color:#C7CDD3"
+					  @input="search()">
 			
 			
 		
@@ -32,51 +34,17 @@
 		
 
 		
-			
+			
 				
 					
-						
+						
 					
 					
-						
-							李斯丹妮
+						
+						
 						
 						
-							ID:3324
-						
-					
-				
-				
-					
-							
-								平均成绩/分
-							
-							
-								6
-							
-						
-					
-							
-								作业完成度
-							
-							
-								80%
-							
-						
-						
-				
-			
-			
-				
-					
-						
-					
-					
-						
-							李斯丹妮
-						
-						
-							ID:3324
+							ID:{{item.memberInfo.id}}
 						
 					
 				
@@ -101,6 +69,7 @@
 				
 			
 			
+			
 		
 		
-					
-						
+					
+						去安排
+					
+				
+				
+					
+					
+						
 							
 								
 							
-							雅思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);
From 317c54a1cf4c48dc6f6cc8c46ad0cd2fd8eff1bb Mon Sep 17 00:00:00 2001
From: taoxu <2622874537@qq.com>
Date: Thu, 7 Dec 2023 22:13:54 +0800
Subject: [PATCH 4/6] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
 pages/Mystudent/addclassforwork.vue           | 12 +++++++++
 pages/upload/upload.vue                       | 27 ++++++++++++++-----
 .../pages_add/add_studentsforwork.vue         | 12 +++++++++
 .../teacher_teachers/teacher_addOperation.vue | 16 +++++++++--
 4 files changed, 59 insertions(+), 8 deletions(-)
diff --git a/pages/Mystudent/addclassforwork.vue b/pages/Mystudent/addclassforwork.vue
index f277030..50e8a14 100644
--- a/pages/Mystudent/addclassforwork.vue
+++ b/pages/Mystudent/addclassforwork.vue
@@ -106,6 +106,12 @@ export default {
 			const filteredList = JSON.parse(JSON.stringify(this.changeclasslist)).filter(item => item.name.includes(this.searchKeyword));
 		  // 更新 this.classlist 为过滤后的列表
 		  this.classlist = filteredList;
+		  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 });
+		     }
+		   });
 		 }else{
 			this.fuwei()
 		 }
@@ -122,6 +128,12 @@ export default {
 		fuwei() {
 			
 			this.classlist = JSON.parse(JSON.stringify(this.changeclasslist));
+			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 });
+			   }
+			 });
 		},
 		getclassList() {
 			this.$u.get("https://api.admin-v2.langsi.online/admin-api/classroom/page").then(res => {
diff --git a/pages/upload/upload.vue b/pages/upload/upload.vue
index 9a7caf4..040281b 100644
--- a/pages/upload/upload.vue
+++ b/pages/upload/upload.vue
@@ -57,12 +57,27 @@
 				},
 				// 获取上传七牛云token
 				getQiniuToken() {
-					this.$u.get('https://v2.ielts.langsi.online/file/getToken').then(res => {
-						console.log(res.data);
-						this.token = res.data.token
-					}).catch(err => {
-						console.log(err)
-					})
+						wx.request({
+						url: 'https://v2.ielts.langsi.online/file/getToken',
+						method: 'get',  // Adjust the request method as needed
+						// data: yourData,
+						header: {
+							'Authorization': 'eyJhbGciOiJIUzUxMiJ9.eyJub3RfeWJzX3VzZXJfa2V5IjoiNWZiYzA4YmUtNDZlMi00NDUzLThmYjQtMjFlNzhjZDIxY2EyIn0.jw2fyMnlNEW-zx8cH6aPh_H-WqEAHDQdh4oCpYg3qBIJZEmw6L4oNWJPvKHM9edmRdLO0p2z7_vlCYoY00NqxA ' 
+						},
+						success: (res) => {
+							console.log(res);
+							this.token = res.data.data.token
+						},
+						fail: (err) => {
+							console.log(err);
+						}
+						});
+					// this.$u.get('https://v2.ielts.langsi.online/file/getToken').then(res => {
+					// 	console.log(res.data);
+					// 	this.token = res.data.token
+					// }).catch(err => {
+					// 	console.log(err)
+					// })
 					
 				},
 			}
diff --git a/pages_teacher/pages_add/add_studentsforwork.vue b/pages_teacher/pages_add/add_studentsforwork.vue
index 59e3b63..6ced2bc 100644
--- a/pages_teacher/pages_add/add_studentsforwork.vue
+++ b/pages_teacher/pages_add/add_studentsforwork.vue
@@ -111,6 +111,12 @@
 			        });
 			        // 更新 this.classlist 为过滤后的列表
 			        this.stulist = filteredList;
+					this.selectedIds.forEach(selectedItem => {
+					   const index = this.stulist.findIndex(item => item.id === selectedItem.id);
+					   if (index !== -1) {
+					     this.$set(this.stulist, index, { ...this.stulist[index], isSelected: true });
+					   }
+					 });
 			    } else {
 			        this.fuwei();
 			    }
@@ -118,6 +124,12 @@
 			fuwei() {
 				
 				this.stulist = JSON.parse(JSON.stringify(this.orgstulist));
+				this.selectedIds.forEach(selectedItem => {
+				   const index = this.stulist.findIndex(item => item.id === selectedItem.id);
+				   if (index !== -1) {
+				     this.$set(this.stulist, index, { ...this.stulist[index], isSelected: true });
+				   }
+				 });
 			},
 			highlightSearch(name) {
 			    // 使用正则表达式替换匹配到的 searchKeyword 为带有颜色的文字
diff --git a/pages_teacher/teacher_teachers/teacher_addOperation.vue b/pages_teacher/teacher_teachers/teacher_addOperation.vue
index 0d42a84..69e9398 100644
--- a/pages_teacher/teacher_teachers/teacher_addOperation.vue
+++ b/pages_teacher/teacher_teachers/teacher_addOperation.vue
@@ -31,7 +31,10 @@
 				
 					
 					
-						
+						
+							
+								
+							
 							
 								
 							
@@ -62,7 +65,10 @@
 				
 				
 					
-						
+						
+							
+								
+							
 							
 								
 							
@@ -312,6 +318,12 @@
 		  }
 		},
 		methods:{
+			delcls(id){
+				 this.classinfo = this.classinfo.filter(item => item.id !== id);
+			},
+			delstu(id){
+				 this.stuinfo = this.stuinfo.filter(item => item.id !== id);
+			},
 			toaddstu(){
 				uni.navigateTo({
 				 url: "/pages_teacher/pages_add/add_studentsforwork?stuinfo=" + encodeURIComponent(JSON.stringify(this.stuinfo))
From f805ef513e0dfa59d08f82924822f3ff2f084a2c Mon Sep 17 00:00:00 2001
From: taoxu <2622874537@qq.com>
Date: Fri, 8 Dec 2023 22:57:06 +0800
Subject: [PATCH 5/6] =?UTF-8?q?=E6=B8=B2=E6=9F=93=20=E9=A1=B5=E9=9D=A2=20?=
 =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=A4=84=E7=90=86=20=E7=BB=93=E6=9E=84?=
 =?UTF-8?q?=E8=A7=A3=E6=9E=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
 pages/Mystudent/addclassforwork.vue           |    2 +-
 .../pages_add/add_studentsforwork.vue         |    3 +-
 .../teacher_teachers/components/compose.vue   |  279 +--
 .../teacher_teachers/teacher_addOperation.vue | 1089 ++++++-----
 .../teacher_teachers/teacher_writeadd.vue     | 1595 +++++++++++------
 5 files changed, 1875 insertions(+), 1093 deletions(-)
diff --git a/pages/Mystudent/addclassforwork.vue b/pages/Mystudent/addclassforwork.vue
index 50e8a14..24c840f 100644
--- a/pages/Mystudent/addclassforwork.vue
+++ b/pages/Mystudent/addclassforwork.vue
@@ -5,7 +5,7 @@
 				  :background="bgc"
 				  title-color='#2E4975'
 				  title-size='36'
-				  height='36'>
+				  height='36' :custom-back="addclassinfo">
 		
 			
 				
diff --git a/pages_teacher/pages_add/add_studentsforwork.vue b/pages_teacher/pages_add/add_studentsforwork.vue
index 6ced2bc..43e338f 100644
--- a/pages_teacher/pages_add/add_studentsforwork.vue
+++ b/pages_teacher/pages_add/add_studentsforwork.vue
@@ -1,7 +1,7 @@
 
 	
 		
+			height='36'  :custom-back="addstu">
 			
 		
 			
@@ -71,6 +71,7 @@
 		},
 		methods: {
 			addstu() {
+				console.log('调用了');
 				uni.setStorageSync('selectedStuInfo', this.selectedIds);
 							
 				// Navigate back to the previous page
diff --git a/pages_teacher/teacher_teachers/components/compose.vue b/pages_teacher/teacher_teachers/components/compose.vue
index 4e33ba1..0bcbe65 100644
--- a/pages_teacher/teacher_teachers/components/compose.vue
+++ b/pages_teacher/teacher_teachers/components/compose.vue
@@ -1,153 +1,210 @@
 
 	
 	
-		
+		
 			
 			
 				
-					{{item.examName}}
+					{{ item.examName }}
 				
 			
 			
 			
-				{{text}}
+				{{ text }}
 			
 			
 			
-				
-					
+				
+					
 						
-							{{Task}}
+							{{ Task }}
 							
-								{{item[text][Task].caption}}
-								{{item[text][Task].themeCaption}}
+								{{ item[text][Task].caption }}
+								{{ item[text][Task].themeCaption }}
 							
 						
 
 						
-							{{item.name}}
+							{{ item.name }}
 						
 					
 				
 			
 		
 	
-
 
 
 
 
 
diff --git a/pages_teacher/teacher_teachers/teacher_addOperation.vue b/pages_teacher/teacher_teachers/teacher_addOperation.vue
index 69e9398..8ed530b 100644
--- a/pages_teacher/teacher_teachers/teacher_addOperation.vue
+++ b/pages_teacher/teacher_teachers/teacher_addOperation.vue
@@ -1,13 +1,21 @@
 
 	
 		
-			
+			
 			
 			
@@ -15,33 +23,45 @@
 			
 				
 					班级安排
-					
+					
 						+
 					
 				
-				
-					
+				
+					
 					
 						暂未安排哦!
 					
-					
+					
 						去安排
 					
 				
 				
-					
-					
-						
-							
-								
+
+					
+						
+							
+								
+								
 							
 							
-								
+								
+								
 							
-							{{item.name}}
+							{{ item.name }}
 						
-						
-						
+
+
 					
 				
 			
@@ -49,35 +69,46 @@
 			
 				
 					学员安排
-					
+					
 
 						+
 					
 				
-				
-					
+				
+					
 					
 						暂未安排哦!
 					
-					
+					
 						去安排
 					
 				
-				
+				
 					
-						
-							
-								
+						
+							
+								
+								
 							
 							
-								
+								
 							
-							{{item.name}}
+							{{ item.name }}
 						
-						
+
 					
-					
-				
+
+
 				
 			
 			
@@ -89,17 +120,18 @@
 						
 						
 							IELTS 18
-							
+							
 								
 									
 										
 											
 												
-																		
+
 													Test 2
-																		
+
 													听力
-																		
+
 												
 												
 													Part 1:多选题
@@ -107,114 +139,105 @@
 											
 										
 									
-								
-									
-										
-											
-																	
-												Test 2
-																	
-												听力
-																	
+									
+										
+											
+												
+
+													Test 2
+
+													听力
+
+												
+												
+													Part 1:多选题
+												
 											
-											
-												Part 1:多选题
+										
+									
+									
+										
+											
+												
+
+													Test 2
+
+													听力
+
+												
+												
+													Part 1:多选题
+												
 											
-										
-									
-								
-								
-									
-										
-											
-																	
-												Test 2
-																	
-												听力
-																	
-											
-											
-												Part 1:多选题
-											
-										
-									
-								
+										
+									
 								
 							
 						
 					
-					
-							IELTS 18
-							
-								
-										
-										Test 2
-										听力
-								
-								
-									Part 1:多选题
-								
+					
+						{{item.examName}}
+						
+							
+								
+								{{items.test}}
+								写作
 							
+							
+								{{items.task}}
+							
+						
 					
 					
 						
-							IELTS 18
-							
+							
+							
 								
-									
+									
 										
 											
-												
-																		
-													Test 2
-																		
-													听力
-																		
+												
+
+													{{ item.part }}-{{ item.introduction }}
+
+													口语
+
 												
 												
-													Part 1:多选题
+													
+														{{ item.topicEn }}:
+														
+															串题
+															跟读
+															模考
+														
+													
 												
 											
 										
 									
-									
-						
-										
-						
-											
-						
-											
-																	
-												Test 2
-																	
-												听力
-																	
-											
-						
-												
-						
-													Part 1:多选题
-						
-												
-						
-											
-						
-										
-						
-									
+
 								
 							
 						
 					
-						
-					
-							
-								
-									添加
-								
+					
+					
+						
+							
+							添加
+						
 					
 				
-				
+
 			
 			
 			
@@ -223,9 +246,17 @@
 				
 				
 					
-						
+						
 						
-							
+							
 						
 
 
@@ -238,353 +269,515 @@
 					描述
 				
 				
-					
-					
-				
-	
-	
-
-			
 			
+		
+
+		
+		
+
+		
+		
+			
+				确定添加
+			
+		
 
 	
 
 
 
+}
+
+.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;
+	flex-wrap: wrap;
+	// justify-content: space-between;
+	// margin-top: 20rpx;
+}
+
+.class_tp {
+	width: 56rpx;
+	height: 56rpx;
+	margin-right: 12rpx;
+}
+
+.Ielts {
+	font-size: 40rpx;
+	font-weight: 400;
+	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;
+	justify-content: center;
+	align-items: center;
+	padding: 20rpx;
+	// width: 215rpx;
+	height: 96rpx;
+	background: #FFFFFF;
+	border-radius: 20rpx 20rpx 20rpx 20rpx;
+}
+
+
+.class_wz {
+	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;
+}
+
+.view_textrea {
+	height: 260rpx;
+	background: #FFFFFF;
+	border-radius: 20rpx 20rpx 20rpx 20rpx;
+	;
+	margin-top: 16rpx;
+	padding: 28rpx 32rpx;
+}
+
+.view_button {
+	width: 93.1%;
+	margin: auto;
+	text-align: center;
+	line-height: 80rpx;
+	background: linear-gradient(180deg, #74AFFF 0%, #2D7CE6 100%);
+	border-radius: 104rpx 104rpx 104rpx 104rpx;
+	color: #FFFFFF;
+}
+
+.view_footer {
+	width: 100%;
+	padding: 0 16rpx;
+	height: 144rpx;
+	border-radius: 40rpx 40rpx 0rpx 0rpx;
+	padding: 32rpx 0rpx;
+	background-color: #fff;
+	box-shadow: 0rpx -10rpx 16rpx 0rpx rgba(202, 202, 202, 0.25);
+	margin-top: 8rpx;
+}
+
+.u-node {
+	width: 44rpx;
+	height: 44rpx;
+	border-radius: 100rpx;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	background: #d0d0d0;
+}
+
+.u-order-desc {
+	display: block;
+	// flex-wrap: nowrap;
+	padding: 20rpx;
+	background: #F9F9F9;
+	border-radius: 20rpx 20rpx 20rpx 20rpx;
+	margin: 12rpx 0rpx;
+
+	.txt {
+
+		font-size: 24rpx;
+		font-weight: 500;
+		color: #2E4975;
+	}
+}
+
+.u-order-time {
+	color: rgb(200, 200, 200);
+	font-size: 26rpx;
+}
+
+.yuandi {
+	width: 18rpx;
+	height: 18rpx;
+	background: #2D7CE6;
+	border-radius: 24rpx 24rpx 24rpx 24rpx;
+}
+
+.Test {
+	font-size: 28rpx;
+	font-weight: 800;
+	color: #2E4975;
+	margin-left: 12rpx;
+}
+
+.ellipses {
+	font-size: 20rpx;
+	background: rgba(242, 170, 2, 0.2);
+	margin-left: 12rpx;
+	padding: 8rpx 20rpx;
+	color: #F2AA02;
+	border-radius: 20rpx 20rpx 20rpx 20rpx;
+}
+
+.erotic {
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	width: 80rpx;
+	height: 36rpx;
+	font-size: 20rpx;
+	background: rgba(242, 63, 170, 0.1);
+	margin-left: 12rpx;
+	// padding: 8rpx 20rpx;
+	color: #F23FEB;
+	border-radius: 20rpx 20rpx 20rpx 20rpx;
+}
+
+.greener {
+	font-size: 20rpx;
+	background: rgba(27, 225, 178, 0.1);
+	margin-left: 12rpx;
+	padding: 8rpx 20rpx;
+	color: #1BE1B2;
+	border-radius: 20rpx 20rpx 20rpx 20rpx;
+}
+
+.increase {
+	padding: 26rpx 125rpx;
+	color: #FFFFFF;
+	background-color: #F39852;
+	border-radius: 20rpx 20rpx 20rpx 20rpx;
+	text-align: center;
+}
+
\ No newline at end of file
diff --git a/pages_teacher/teacher_teachers/teacher_writeadd.vue b/pages_teacher/teacher_teachers/teacher_writeadd.vue
index eef2e3e..95eb75c 100644
--- a/pages_teacher/teacher_teachers/teacher_writeadd.vue
+++ b/pages_teacher/teacher_teachers/teacher_writeadd.vue
@@ -1,72 +1,231 @@
 
 	
 		
-			
+			
 			
 			
-			
-				
+			
+				
 			
+			
 			
 			
-				
+				
 			
 			
-			
+			
 				
 				
 					
 						
-							
+							
 								
-									{{selectedOption}}
-									
+									{{ selectedOption }}
+									
 								
-								
-									{{item.name}}
+								
+									{{ item.name }}
 								
 							
 						
 						
-						
+						
 							
 								
-								
-											串题
-									        跟读
-									        模考
+								
+									串题
+									跟读
+									模考
 								
 							
-						
-								
-								
-									
-										
-											{{items.topicEn}}
-										
-										
-											串题
-											跟读
-											模考
-										
+
+							
+							
+								
+									
+										
+									
+									
+										串题
+										跟读
+										模考
 									
 								
-								
-								
-									
-										
-											{{items.topicEn}}
-										
+							
+							
+							
+								
+									
+										
 									
 								
+							
+						
+						
+						
+							
+								
+								
+									串题
+									跟读
+									模考
+								
+							
+
+							
+							
+								
+									
+										
+									
+									
+										串题
+										跟读
+										模考
+									
+								
+							
+							
+							
+								
+									
+										
+									
+								
+							
+						
+						
+						
+							
+								
+								
+									串题
+									跟读
+									模考
+								
+							
+
+							
+							
+								
+									
+										
+									
+									
+										串题
+										跟读
+										模考
+									
+								
+							
+							
+							
+								
+									
+										
+									
+								
+							
 						
 					
 				
+				
 				
 				
-					
+
 					
 				
 				
@@ -80,531 +239,724 @@
 			
 		
 		
-		
-			
-	
-
+
 
 
 
 
From 1202742ead2f41c131665e30363efe7fa24f327a Mon Sep 17 00:00:00 2001
From: taoxu <2622874537@qq.com>
Date: Sat, 9 Dec 2023 18:15:29 +0800
Subject: [PATCH 6/6] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=B8=B2=E6=9F=93=20?=
 =?UTF-8?q?=E9=80=BB=E8=BE=91=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
 .../teacher_teachers/components/audiology.vue | 228 +++++++++++-----
 .../teacher_teachers/components/compose.vue   |  26 +-
 .../teacher_teachers/components/reading.vue   | 177 +++++++++----
 .../teacher_teachers/teacher_addOperation.vue | 246 ++++++++++--------
 .../teacher_teachers/teacher_writeadd.vue     |  35 ++-
 5 files changed, 491 insertions(+), 221 deletions(-)
diff --git a/pages_teacher/teacher_teachers/components/audiology.vue b/pages_teacher/teacher_teachers/components/audiology.vue
index fc50646..d25bd45 100644
--- a/pages_teacher/teacher_teachers/components/audiology.vue
+++ b/pages_teacher/teacher_teachers/components/audiology.vue
@@ -9,36 +9,42 @@
 			
 			
 				
-				
+				
 					{{TextItem.name}}
 				
 			
 			
 			
-				
+				
 					
 						
 							
 								
 								
-									
-									
+									
+									
 								
 								{{partitem.name}}
 							
 							
 							
-								
+								
 							
 						
 						
 							
 								
-									{{quesitem.typeText}}
+									{{quesitem.number}} {{quesitem.typeText}}
 								
 								
-									
+									
 								
 							
 						
@@ -59,6 +65,7 @@
 				itemActive: {},
 				image: true,
 				tk: null,
+				selectwrite: [],
 
 			}
 		},
@@ -66,78 +73,165 @@
 			this.hearing()
 		},
 		methods: {
-			// 听力调取接口渲染
+			updatawrite(data){
+				this.selectwrite=data
+				
+			},
 			hearing() {
-				this.$u.get('https://api.admin-v2.langsi.online/admin-api/ielts/paper/list', {
-					classify: 1
-				}).then(res => {
-					this.listHearing = res.data
-					let activeindex = {}
-					let arr = res.data
-					for (let parper of arr) {
-						let test = parper.tests[0]
-						activeindex[parper.id] = 0
-					}
-					this.itemActive = activeindex
-				})
+				this.$u
+					.get("https://api.admin-v2.langsi.online/admin-api/ielts/paper/list", {
+						classify: 1,
+					})
+					.then((res) => {
+						this.listHearing = res.data;
+						let activeindex = {};
+						let arr = res.data;
+						for (let parper of arr) {
+							let test = parper.tests[0];
+							activeindex[parper.id] = 0;
+						}
+						this.itemActive = activeindex;
+						this.updateSubsetsInListHearing()
+						console.log(this.listHearing, "this.itemActivethis.itemActive");
+					});
 			},
-			// 听力test点击事件
 			Bages_addActive(TextIndex, id) {
-				this.itemActive[id] = TextIndex
-				this.$forceUpdate()
+				this.itemActive[id] = TextIndex;
+				this.$forceUpdate();
 			},
-			// 点击变化图表
 			icon(id) {
-				this.image = !this.image
-				this.tk = id
+				this.image = !this.image;
+				this.tk = id;
 				if (this.image == false) {
-					this.tk = id
-				}else {
-					this.tk = null
+					this.tk = id;
+				} else {
+					this.tk = null;
 				}
 			},
-			checkboxChange(parat, e) {
+			checkboxChange(partitem, e) {
 				if (e.value) {
-					this.checked.push(parat.id)
-					 const allItemsNoSubsets = parat.modules.every(item => !('subsets' in item));
-					parat.modules.forEach(item=>{
-						   this.$set(item, 'subsets', item.id);
-						  item.subsets = item.id;
-						this.subsets.push(item.id)
-						console.log( item.subsets)
-							})
-					
+					this.listHearing.forEach((paper) => {
+						paper.tests.forEach((test, testIndex) => {
+							test.parts.forEach((part) => {
+								if (part.id === partitem.id) {
+									part.modules.forEach((quesitem, quesIndex) => {
+										this.addToSelectWrite(
+											quesitem,
+											partitem.id,
+											testIndex + 1,
+											paper.title
+										);
+									});
+								}
+							});
+						});
+					});
 				} else {
-					let index = this.checked.indexOf(parat.id);
-					if (index !== -1) {
-						this.checked.splice(index, 1);
-						parat.modules.forEach(item=>{
-							    this.$delete(item, 'subsets');
-							    const index = this.subsets.indexOf(item.id);
-							    if (index !== -1) {
-							        this.subsets.splice(index, 1);
-							    }	
-								})
-								
-					}
+					partitem.modules.forEach((quesitem) => {
+						this.removeFromSelectWrite(quesitem.id);
+					});
 				}
-				console.log(this.checked,'part数组')
-				this.$forceUpdate()
+				this.$forceUpdate();
+				console.log(this.selectwrite, "selectwriteselectwrite");
+				console.log(this.listHearing, "this.listHearing");
 
+				// 在这里执行额外的操作,遍历 selectwrite 中的每一项,更新 listHearing 中的 subsets
+				this.updateSubsetsInListHearing();
+					this.$parent.updatalisten(this.selectwrite)
 			},
-			checkoutzj(quesitem, id) {
-				if (id.value) {
-					this.subsets.push(quesitem.id)
-					console.log(quesitem)
-				} else {
-					let index2 = this.subsets.indexOf(quesitem.id);
-					if (index2 !== -1) {
-						this.subsets.splice(index2, 1);
-					}
+			handleCheckboxChange(quesitems) {
+			  const existingIndex = this.selectwrite.findIndex(item => item.id === quesitems.id);
+			
+			  if (existingIndex !== -1) {
+			    // 如果已存在,将 subsets 设为 false,并清除该项
+			    this.selectwrite.splice(existingIndex, 1);
+			    quesitems.subsets = false;
+			  } else {
+			    // 如果不存在,添加该项,并将 subsets 设为 true
+			    this.listHearing.forEach((paper) => {
+			      paper.tests.forEach((test, testIndex) => {
+			        test.parts.forEach((part) => {
+			          part.modules.forEach((quesitem, quesIndex) => {
+			            if (quesitem.id == quesitems.id) {
+			              this.addToSelectWrite(
+			                quesitems,
+			                quesitems.id, // 使用 quesitem 的 id
+			                testIndex + 1, // 使用内层循环的 testIndex
+			                paper.title // 使用 quesitem 的 paperTitle
+			              );
+			            }
+			          });
+			        });
+			      });
+			    });
+			    quesitems.subsets = true;
+			  }
+			
+			  console.log(this.selectwrite, 'selectwriteselectwrite');
+			  this.updateSubsetsInListHearing()
+			  	this.$parent.updatalisten(this.selectwrite)
+			},
+
+
+
+			// 在这里添加一个新的方法,用于更新 listHearing 中的 subsets
+		 updateSubsetsInListHearing() {
+		    this.listHearing.forEach((paper) => {
+		      paper.tests.forEach((test) => {
+		        test.parts.forEach((part) => {
+		          part.modules.forEach((quesitem) => {
+		            const selected = this.selectwrite.find((item) => {
+		              return item.id === quesitem.id;
+		            });
+		            if (selected) {
+		              quesitem.subsets = true;
+		            } else {
+		              quesitem.subsets = false;
+		            }
+		          });
+		        });
+		      });
+		    });
+		
+		    // 额外的逻辑,遍历 listHearing 中的每一个 part,判断是否全部 modules 的 subsets 都为 true
+		    this.listHearing.forEach((paper) => {
+		      paper.tests.forEach((test) => {
+		        test.parts.forEach((part) => {
+		          part.checked = part.modules.every((quesitem) => quesitem.subsets);
+		        });
+		      });
+		    });
+		  },
+
+			// 添加信息到selectwrite数组
+			addToSelectWrite(quesitem, partId, testIndex, paperTitle) {
+			// Split the guideText into words
+			const words = quesitem.guideText.split(/\s+/);
+			
+			// Take the first five words excluding "Complete"
+			const questionname = words.slice(0, 5).filter(word => word !== "Complete").join(' ');
+			
+			const item = {
+				id: quesitem.id,
+				paperId: quesitem.paperId,
+				papername: paperTitle,
+				partId: partId,
+				testId: quesitem.testId,
+				testname: `Test ${testIndex}`,
+				typeName: quesitem.typeText,
+				questionname: questionname,
+			};
+			
+			this.selectwrite.push(item);
+			},
+
+			removeFromSelectWrite(itemId) {
+				const index = this.selectwrite.findIndex((item) => item.id === itemId);
+				if (index !== -1) {
+					this.selectwrite.splice(index, 1);
 				}
-				console.log(this.subsets,'题型数组')
-			}
-		}
+			},
+		},
 	}
 
 
@@ -200,4 +294,4 @@
 		height: 20rpx;
 		margin-right: 10rpx;
 	}
-
+
\ No newline at end of file
diff --git a/pages_teacher/teacher_teachers/components/compose.vue b/pages_teacher/teacher_teachers/components/compose.vue
index 0bcbe65..9e8cb11 100644
--- a/pages_teacher/teacher_teachers/components/compose.vue
+++ b/pages_teacher/teacher_teachers/components/compose.vue
@@ -71,7 +71,28 @@ export default {
 	created() {
 		this.getCompose()
 	},
+	
 	methods: {
+		updatawrite(data){
+			this.selectwrite=data
+			
+		},
+		updateSubsetArr() {
+		  // 遍历 this.transformedData 中的每个项
+		  for (const item of this.transformedData) {
+		    // 遍历 this.selectwrite 中的每个对象
+		    for (const selectedItem of this.selectwrite) {
+		      const { id, test, task } = selectedItem;
+		
+		      // 检查 task1 中的 id 是否匹配
+		      if (item[test] && item[test][task] && String(item[test][task].id) === id) {
+		        this.$set(item[test][task], 'subsetArr', true);
+		      } else {
+		        this.$set(item[test][task], 'subsetArr', false);
+		      }
+		    }
+		  }
+		},
 		//写作接口	
 		getCompose() {
 			this.$u.post('https://api.admin-v2.langsi.online/admin-api/writing/all/search', this.comsapi).then(res => {
@@ -81,8 +102,9 @@ export default {
 				}
 				this.transformedData = arr
 				this.orgtransformedData = JSON.parse(JSON.stringify(arr));
-				// let json = JSON.stringify(this.transformedData)
-				console.log(this.transformedData, 'this.transformedData');
+				let json = JSON.stringify(this.transformedData)
+				// console.log(json, 'this.transformedData');
+				this.updateSubsetArr()
 			})
 		},
 		textClick(item, text) {
diff --git a/pages_teacher/teacher_teachers/components/reading.vue b/pages_teacher/teacher_teachers/components/reading.vue
index c550597..9196442 100644
--- a/pages_teacher/teacher_teachers/components/reading.vue
+++ b/pages_teacher/teacher_teachers/components/reading.vue
@@ -9,36 +9,42 @@
 			
 			
 				
-				
+				
 					{{TextItem.name}}
 				
 			
 			
 			
-				
+				
 					
 						
 							
 								
 								
-									
-									
+									
+									
 								
 								{{partitem.name}}
 							
 							
 							
-								
+								
 							
 						
 						
 							
 								
-									{{quesitem.typeText}}
+									{{quesitem.number}}{{quesitem.typeText}}
 								
 								
-									
+									
 								
 							
 						
@@ -59,6 +65,7 @@
 				itemActive: {},
 				image: true,
 				tk: null,
+				selectwrite: [],
 
 			}
 		},
@@ -66,6 +73,10 @@
 			this.hearing()
 		},
 		methods: {
+			updatawrite(data){
+				this.selectwrite=data
+				
+			},
 			// 听力调取接口渲染
 			hearing() {
 				this.$u.get('https://api.admin-v2.langsi.online/admin-api/ielts/paper/list', {
@@ -79,6 +90,7 @@
 						activeindex[parper.id] = 0
 					}
 					this.itemActive = activeindex
+					this.updateSubsetsInListHearing()
 				})
 			},
 			// 听力test点击事件
@@ -92,51 +104,128 @@
 				this.tk = id
 				if (this.image == false) {
 					this.tk = id
-				}else {
+				} else {
 					this.tk = null
 				}
 			},
-			checkboxChange(parat, e) {
+			checkboxChange(partitem, e) {
 				if (e.value) {
-					this.checked.push(parat.id)
-					 const allItemsNoSubsets = parat.modules.every(item => !('subsets' in item));
-					parat.modules.forEach(item=>{
-						   this.$set(item, 'subsets', item.id);
-						  item.subsets = item.id;
-						this.subsets.push(item.id)
-						console.log( item.subsets)
-							})
-					
+					this.listHearing.forEach((paper) => {
+						paper.tests.forEach((test, testIndex) => {
+							test.parts.forEach((part) => {
+								if (part.id === partitem.id) {
+									part.modules.forEach((quesitem, quesIndex) => {
+										this.addToSelectWrite(
+											quesitem,
+											partitem.id,
+											testIndex + 1,
+											paper.title
+										);
+									});
+								}
+							});
+						});
+					});
 				} else {
-					let index = this.checked.indexOf(parat.id);
-					if (index !== -1) {
-						this.checked.splice(index, 1);
-						parat.modules.forEach(item=>{
-							    this.$delete(item, 'subsets');
-							    const index = this.subsets.indexOf(item.id);
-							    if (index !== -1) {
-							        this.subsets.splice(index, 1);
-							    }	
-								})
-								
-					}
+					partitem.modules.forEach((quesitem) => {
+						this.removeFromSelectWrite(quesitem.id);
+					});
 				}
-				console.log(this.checked,'part数组')
-				this.$forceUpdate()
+				this.$forceUpdate();
+				
 
+				// 在这里执行额外的操作,遍历 selectwrite 中的每一项,更新 listHearing 中的 subsets
+				this.updateSubsetsInListHearing();
+					this.$parent.updataread(this.selectwrite)
 			},
-			checkoutzj(quesitem, id) {
-				if (id.value) {
-					this.subsets.push(quesitem.id)
-					console.log(quesitem)
+			handleCheckboxChange(quesitems) {
+				const existingIndex = this.selectwrite.findIndex(item => item.id === quesitems.id);
+
+				if (existingIndex !== -1) {
+					// 如果已存在,将 subsets 设为 false,并清除该项
+					this.selectwrite.splice(existingIndex, 1);
+					quesitems.subsets = false;
 				} else {
-					let index2 = this.subsets.indexOf(quesitem.id);
-					if (index2 !== -1) {
-						this.subsets.splice(index2, 1);
-					}
+					// 如果不存在,添加该项,并将 subsets 设为 true
+					this.listHearing.forEach((paper) => {
+						paper.tests.forEach((test, testIndex) => {
+							test.parts.forEach((part) => {
+								part.modules.forEach((quesitem, quesIndex) => {
+									if (quesitem.id == quesitems.id) {
+										this.addToSelectWrite(
+											quesitems,
+											quesitems.id, // 使用 quesitem 的 id
+											testIndex + 1, // 使用内层循环的 testIndex
+											paper.title // 使用 quesitem 的 paperTitle
+										);
+									}
+								});
+							});
+						});
+					});
+					quesitems.subsets = true;
 				}
-				console.log(this.subsets,'题型数组')
-			}
+
+				console.log(this.selectwrite, 'selectwriteselectwrite');
+				this.updateSubsetsInListHearing()
+				this.$parent.updataread(this.selectwrite)
+			},
+
+
+
+			// 在这里添加一个新的方法,用于更新 listHearing 中的 subsets
+			updateSubsetsInListHearing() {
+				this.listHearing.forEach((paper) => {
+					paper.tests.forEach((test) => {
+						test.parts.forEach((part) => {
+							part.modules.forEach((quesitem) => {
+								const selected = this.selectwrite.find((item) => {
+									return item.id === quesitem.id;
+								});
+								if (selected) {
+									quesitem.subsets = true;
+								} else {
+									quesitem.subsets = false;
+								}
+							});
+						});
+					});
+				});
+
+				// 额外的逻辑,遍历 listHearing 中的每一个 part,判断是否全部 modules 的 subsets 都为 true
+				this.listHearing.forEach((paper) => {
+					paper.tests.forEach((test) => {
+						test.parts.forEach((part) => {
+							part.checked = part.modules.every((quesitem) => quesitem.subsets);
+						});
+					});
+				});
+			},
+
+			// 添加信息到selectwrite数组
+			addToSelectWrite(quesitem, partId, testIndex, paperTitle) {
+				// Split the guideText into words
+				
+				const item = {
+					id: quesitem.id,
+					paperId: quesitem.paperId,
+					papername: paperTitle,
+					partId: partId,
+					testId: quesitem.testId,
+					testname: `Test ${testIndex}`,
+					typeName: quesitem.typeText,
+					questionname: quesitem.number,
+				};
+
+				this.selectwrite.push(item);
+			},
+
+			removeFromSelectWrite(itemId) {
+				const index = this.selectwrite.findIndex((item) => item.id === itemId);
+				if (index !== -1) {
+					this.selectwrite.splice(index, 1);
+				}
+			},
 		}
 	}
 
@@ -200,4 +289,4 @@
 		height: 20rpx;
 		margin-right: 10rpx;
 	}
-
+
\ No newline at end of file
diff --git a/pages_teacher/teacher_teachers/teacher_addOperation.vue b/pages_teacher/teacher_teachers/teacher_addOperation.vue
index 8ed530b..350d9a2 100644
--- a/pages_teacher/teacher_teachers/teacher_addOperation.vue
+++ b/pages_teacher/teacher_teachers/teacher_addOperation.vue
@@ -118,73 +118,94 @@
 						
 							作业安排
 						
-						
-							IELTS 18
+						
+					
+					
+						
+							{{item.papername}}
 							
+								  style="background-color: #fff; padding: 32rpx 40rpx;border-radius: 20rpx 20rpx 20rpx 20rpx;">
 								
-									
+									
 										
 											
-												
-
-													Test 2
-
-													听力
-
+												
+					
+													{{items.testname}}
+					
+													阅读
+													
+													
 												
 												
-													Part 1:多选题
-												
-											
-										
-									
-									
-										
-											
-												
-
-													Test 2
-
-													听力
-
-												
-												
-													Part 1:多选题
-												
-											
-										
-									
-									
-										
-											
-												
-
-													Test 2
-
-													听力
-
-												
-												
-													Part 1:多选题
+														{{items.questionname}} {{items.typeName}}
 												
 											
 										
 									
+					
 								
 							
 						
 					
-					
-						{{item.examName}}
-						
-							
-								
-								{{items.test}}
-								写作
+					
+						
+							{{item.papername}}
+							
+								
+									
+										
+											
+												
+					
+													{{items.testname}}
+					
+													听力
+													
+					
+												
+												
+														{{items.questionname}} {{items.typeName}}
+												
+											
+										
+									
+					
+								
 							
-							
-								{{items.task}}
+						
+					
+					
+						
+							{{item.examName}}
+							
+								
+									
+										
+											
+												
+					
+													{{items.test}}
+					
+													写作
+					
+												
+												
+														{{items.task}}
+												
+											
+										
+									
+					
+								
 							
 						
 					
@@ -317,7 +338,9 @@ export default {
 			selectwrite: [],
 			selectlisten: [],
 			selectread: [],
-			selectwritelist: []
+			selectwritelist: [],
+			selectlistenlist: [],
+			selectreadlist: [],
 
 		}
 	},
@@ -365,8 +388,8 @@ export default {
 			this.selectwrite = selectforwork.selectwrite
 			this.selectlisten = selectforwork.selectlisten
 			this.selectread = selectforwork.selectread
-			this.selectwrite = selectforwork.selectwrite;
-
+			// this.selectwrite = selectforwork.selectwrite;
+			//处理写作数据
 			const groupedItems = {};
 
 			this.selectwrite.forEach(item => {
@@ -385,11 +408,66 @@ export default {
 					id: item.id
 				});
 			});
-
-			// Convert groupedItems object to an array
+			
+			
 			this.selectwritelist = Object.values(groupedItems);
+			//处理听力数据
+			const groupedItems1 = {};
+			
+			this.selectlisten.forEach(item => {
+				const papername = item.papername;
+			
+				if (!groupedItems1[papername]) {
+					groupedItems1[papername] = {
+						papername: papername,
+						message: []
+					};
+				}
+			
+				groupedItems1[papername].message.push({
+					id: item.id,
+					paperId: item.paperId,
+					// papername: paperTitle,
+					partId: item.partId,
+					testId: item.testId,
+					testname: item.testname,
+					typeName: item.typeName,
+					questionname:item. questionname,
+				});
+			});
+			
+			// Convert groupedItems object to an array
+			this.selectlistenlist = Object.values(groupedItems1);
+			
+			const groupedItems2 = {};
+			
+			this.selectread.forEach(item => {
+				const papername = item.papername;
+			
+				if (!groupedItems2[papername]) {
+					groupedItems2[papername] = {
+						papername: papername,
+						message: []
+					};
+				}
+			
+				groupedItems2[papername].message.push({
+					id: item.id,
+					paperId: item.paperId,
+					// papername: paperTitle,
+					partId: item.partId,
+					testId: item.testId,
+					testname: item.testname,
+					typeName: item.typeName,
+					questionname:item. questionname,
+				});
+			});
+			
+			// Convert groupedItems object to an array
+			this.selectreadlist = Object.values(groupedItems2);
 
-			console.log(this.selectwritelist, 'selectwritelist');
+			console.log(this.selectreadlist, 'this.selectread');
+				console.log(this.selectlistenlist, 'this.selectlisten');
 			// Remove duplicates from this.classinfo
 			// this.stuinfo = this.stuinfo.filter(item => !selectedstuInfo.some(selectedItem => selectedItem.id === item.id));
 
@@ -400,52 +478,16 @@ export default {
 
 	},
 	methods: {
-		mergeObjectsByExamName(existingArray, newArray) {
-			const mergedArray = [];
-
-			newArray.forEach(newObj => {
-				const existingObjIndex = existingArray.findIndex(existingObj => existingObj.examName === newObj.examName);
-
-				if (existingObjIndex !== -1) {
-					// 如果存在相同的 examName,则合并对象
-					const existingObj = existingArray[existingObjIndex];
-					existingObj.message.push({
-						test: newObj.test,
-						task: newObj.task,
-						id: newObj.id,
-						// 其他属性...
-					});
-
-					// 更新数组中的对象
-					existingArray[existingObjIndex] = existingObj;
-				} else {
-					// 如果不存在相同的 examName,则直接添加新对象
-					mergedArray.push({
-						examName: newObj.examName,
-						message: [{
-							test: newObj.test,
-							task: newObj.task,
-							id: newObj.id,
-							// 其他属性...
-						}],
-						// 其他属性...
-					});
-				}
-			});
-
-			// 添加 existingArray 中未处理的对象
-			existingArray.forEach(existingObj => {
-				const existingObjIndex = mergedArray.findIndex(obj => obj.examName === existingObj.examName);
-				if (existingObjIndex === -1) {
-					mergedArray.push(existingObj);
-				}
-			});
-
-			return mergedArray;
-		},
+	
 		addwork() {
+			const dataToSave = {
+			  selectspeak: this.selectspeak,
+			  selectwrite: this.selectwrite,
+			  selectlisten: this.selectlisten,
+			  selectread: this.selectread
+			};
 			uni.navigateTo({
-				url: "/pages_teacher/teacher_teachers/teacher_writeadd?classinfo=" + encodeURIComponent(JSON.stringify(this.classinfo))
+				url: "/pages_teacher/teacher_teachers/teacher_writeadd?dataToSave=" + encodeURIComponent(JSON.stringify(dataToSave))
 			}).then(res => {
 
 			}).catch(err => {
diff --git a/pages_teacher/teacher_teachers/teacher_writeadd.vue b/pages_teacher/teacher_teachers/teacher_writeadd.vue
index 95eb75c..b4bb3c5 100644
--- a/pages_teacher/teacher_teachers/teacher_writeadd.vue
+++ b/pages_teacher/teacher_teachers/teacher_writeadd.vue
@@ -226,15 +226,15 @@
 				
 				
 
-					
+					
 				
 				
 				
-					
+					
 				
 				
 				
-					
+					
 				
 			
 		
@@ -282,7 +282,7 @@ export default {
 			// 下拉框的v-if布尔值
 			radioValue: '',
 			part1: true,
-			current: 1,
+			current: 0,
 			search: true,
 			listType: [],
 			idList: [],
@@ -341,16 +341,39 @@ export default {
 		reading,
 		compose
 	},
-	created() {
+	onShow() {
 		this.getList()
 	},
-
+	onLoad(option) {
+		
+		 const dataToSave =JSON.parse(decodeURIComponent(option.dataToSave))
+		
+			this.selectspeak=dataToSave.selectspeak
+			this.selectwrite=dataToSave.selectwrite
+			this.selectlisten=dataToSave.selectlisten
+			this.selectread=dataToSave.selectread
+			
+			this.$refs.compose.updatawrite(this.selectwrite)
+			this.$refs.audiology.updatawrite(this.selectlisten)
+			this.$refs.reading.updatawrite(this.selectread)
+			this.calculateTotalLength()
+	},
 	methods: {
 		updatawrite(data){
 			this.selectwrite=data
 			console.log(this.selectwrite, ' this.selectwrite this.selectwrite');
 			this.calculateTotalLength()
 		},
+		updataread(data){
+			this.selectread=data
+			console.log(this.selectread, ' this.selectwrite this.selectwrite');
+			this.calculateTotalLength()
+		},
+		updatalisten(data){
+			this.selectlisten=data
+			console.log(this.selectlisten, ' this.selectwrite this.selectwrite');
+			this.calculateTotalLength()
+		},
 		submessage(){
 			const dataToSave = {
  			  selectspeak: this.selectspeak,