Merge branch 'tx' of http://gitea.langsi.online/youmanlu/youmanlu-teacher-uniapp into dev_lbw
This commit is contained in:
		
						commit
						5ea72f897a
					
				|  | @ -42,7 +42,7 @@ const install = (Vue, vm) => { | |||
| 		// 所以哪怕您重新登录修改了Storage,下一次的请求将会是最新值
 | ||||
| 		// const token = uni.getStorageSync('token');
 | ||||
| 
 | ||||
| 		const token = "	Bearer 0b34feaf02224ccb9d4e09730ab68c35" | ||||
| 		const token = "	Bearer e465eb9d9ae74b4dad7a63dbe0e54587" | ||||
| 
 | ||||
| 		// console.log("我是token", token)
 | ||||
| 		config.header.Authorization = token;  | ||||
|  |  | |||
|  | @ -62,8 +62,8 @@ | |||
| 			} | ||||
| 		}, | ||||
| 		onLoad(option) { | ||||
| 			// this.classid=option.id | ||||
| 			this.classid=15 | ||||
| 			this.classid=option.id | ||||
| 			// this.classid=15 | ||||
| 			this.getallstu() | ||||
| 		}, | ||||
| 		methods: { | ||||
|  |  | |||
|  | @ -95,8 +95,8 @@ export default { | |||
| 		} | ||||
| 	}, | ||||
| 	onLoad(option) { | ||||
| 		// this.classid=option.id | ||||
| 		this.classid=15 | ||||
| 		this.classid=option.id | ||||
| 		// this.classid=15 | ||||
| 		 | ||||
| 	}, | ||||
| 	onShow() { | ||||
|  |  | |||
|  | @ -47,7 +47,7 @@ | |||
| 				</view> | ||||
| 				<view class="info_box"> | ||||
| 					<view class="info_cont" | ||||
| 						  style="width:90rpx ;"> | ||||
| 						  style="width:80rpx ;"> | ||||
| 						<view class="info_cont_top"> | ||||
| 							学生人数 | ||||
| 						</view> | ||||
|  |  | |||
|  | @ -131,8 +131,8 @@ | |||
| 			} | ||||
| 		}, | ||||
| 		onLoad(option) { | ||||
| 		/* > */	// this.classid=option.id | ||||
| 			this.classid=15 | ||||
| 		this.classid=option.id | ||||
| 			// this.classid=15 | ||||
| 			 | ||||
| 		}, | ||||
| 		onShow(){ | ||||
|  |  | |||
|  | @ -37,7 +37,7 @@ | |||
| 									shape="circle"></u-checkbox> | ||||
| 							</view> | ||||
| 						</view> | ||||
| 						<view class="partshow" v-if="tk==partitem.id"> | ||||
| 						<view class="partshow"  v-if="selectedItems.includes(partitem.id)"> | ||||
| 							<view class="Part2" v-for="(quesitem,quesindex) in partitem.modules" :key="quesindex"> | ||||
| 								<view class="imaflex"> | ||||
| 									<view>{{quesitem.number}} {{quesitem.typeText}}</view> | ||||
|  | @ -66,6 +66,8 @@ | |||
| 				image: true, | ||||
| 				tk: null, | ||||
| 				selectwrite: [], | ||||
| 				selectedItems: [], | ||||
| 				 | ||||
| 
 | ||||
| 			} | ||||
| 		}, | ||||
|  | @ -93,6 +95,23 @@ | |||
| 						this.itemActive = activeindex; | ||||
| 						this.updateSubsetsInListHearing() | ||||
| 						console.log(this.listHearing, "this.itemActivethis.itemActive"); | ||||
| 						const uniquePartIds = new Set(); | ||||
| 						 | ||||
| 						// Loop through listHearing and collect unique part IDs | ||||
| 						this.listHearing.forEach((paper) => { | ||||
| 						  paper.tests.forEach((test) => { | ||||
| 						    test.parts.forEach((part) => { | ||||
| 						      const hasSelectedQuesitem = part.modules.some((quesitem) => quesitem.subsets); | ||||
| 						       | ||||
| 						      if (hasSelectedQuesitem) { | ||||
| 						        uniquePartIds.add(part.id); | ||||
| 						      } | ||||
| 						    }); | ||||
| 						  }); | ||||
| 						}); | ||||
| 						 | ||||
| 						// Convert the Set to an array and update selectedItems | ||||
| 						this.selectedItems = Array.from(uniquePartIds); | ||||
| 					}); | ||||
| 			}, | ||||
| 			Bages_addActive(TextIndex, id) { | ||||
|  | @ -100,14 +119,14 @@ | |||
| 				this.$forceUpdate(); | ||||
| 			}, | ||||
| 			icon(id) { | ||||
| 				this.image = !this.image; | ||||
| 				this.tk = id; | ||||
| 				if (this.image == false) { | ||||
| 					this.tk = id; | ||||
| 				} else { | ||||
| 					this.tk = null; | ||||
| 				} | ||||
| 			}, | ||||
| 			   this.image = !this.image; | ||||
| 			   if (this.image) { | ||||
| 			     this.selectedItems = this.selectedItems.filter(item => item !== id); | ||||
| 			   } else { | ||||
| 			     this.selectedItems.push(id); | ||||
| 			   } | ||||
| 							console.log(this.selectedItems,'this.selectedItemsthis.selectedItems'); | ||||
| 			 }, | ||||
| 			checkboxChange(partitem, e) { | ||||
| 				if (e.value) { | ||||
| 					this.listHearing.forEach((paper) => { | ||||
|  |  | |||
|  | @ -37,7 +37,7 @@ | |||
| 									shape="circle"></u-checkbox> | ||||
| 							</view> | ||||
| 						</view> | ||||
| 						<view class="partshow" v-if="tk==partitem.id"> | ||||
| 						<view class="partshow" v-if="selectedItems.includes(partitem.id)"> | ||||
| 							<view class="Part2" v-for="(quesitem,quesindex) in partitem.modules" :key="quesindex"> | ||||
| 								<view class="imaflex"> | ||||
| 									<view>{{quesitem.number}}{{quesitem.typeText}}</view> | ||||
|  | @ -66,6 +66,7 @@ | |||
| 				image: true, | ||||
| 				tk: null, | ||||
| 				selectwrite: [], | ||||
| 				selectedItems: [], | ||||
| 
 | ||||
| 			} | ||||
| 		}, | ||||
|  | @ -91,6 +92,24 @@ | |||
| 					} | ||||
| 					this.itemActive = activeindex | ||||
| 					this.updateSubsetsInListHearing() | ||||
| 				const uniquePartIds = new Set(); | ||||
| 				 | ||||
| 				// Loop through listHearing and collect unique part IDs | ||||
| 				this.listHearing.forEach((paper) => { | ||||
| 				  paper.tests.forEach((test) => { | ||||
| 				    test.parts.forEach((part) => { | ||||
| 				      const hasSelectedQuesitem = part.modules.some((quesitem) => quesitem.subsets); | ||||
| 				       | ||||
| 				      if (hasSelectedQuesitem) { | ||||
| 				        uniquePartIds.add(part.id); | ||||
| 				      } | ||||
| 				    }); | ||||
| 				  }); | ||||
| 				}); | ||||
| 				 | ||||
| 				// Convert the Set to an array and update selectedItems | ||||
| 				this.selectedItems = Array.from(uniquePartIds); | ||||
| 						console.log( this.selectedItems ,' this.selectedItems '); | ||||
| 				}) | ||||
| 			}, | ||||
| 			// 听力test点击事件 | ||||
|  | @ -99,15 +118,15 @@ | |||
| 				this.$forceUpdate() | ||||
| 			}, | ||||
| 			// 点击变化图表 | ||||
| 			icon(id) { | ||||
| 				this.image = !this.image | ||||
| 				this.tk = id | ||||
| 				if (this.image == false) { | ||||
| 					this.tk = id | ||||
| 				} else { | ||||
| 					this.tk = null | ||||
| 				} | ||||
| 			}, | ||||
| 			 icon(id) { | ||||
| 			    this.image = !this.image; | ||||
| 			    if (this.image) { | ||||
| 			      this.selectedItems = this.selectedItems.filter(item => item !== id); | ||||
| 			    } else { | ||||
| 			      this.selectedItems.push(id); | ||||
| 			    } | ||||
| 				console.log(this.selectedItems,'this.selectedItemsthis.selectedItems'); | ||||
| 			  }, | ||||
| 			checkboxChange(partitem, e) { | ||||
| 				if (e.value) { | ||||
| 					this.listHearing.forEach((paper) => { | ||||
|  | @ -200,6 +219,8 @@ | |||
| 						}); | ||||
| 					}); | ||||
| 				}); | ||||
| 				console.log(this.selectwrite,'selectwriteselectwrite'); | ||||
| 				 | ||||
| 			}, | ||||
| 
 | ||||
| 			// 添加信息到selectwrite数组 | ||||
|  |  | |||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
		Reference in New Issue
	
	Block a user
	 libowei
						libowei