Quellcode durchsuchen

解决学生管理

yu vor 4 Jahren
Ursprung
Commit
375133996f

+ 11 - 0
components/home/sy.vue

@@ -1,6 +1,7 @@
 <template>
 	<view class="myComRoot">
 		<view class="df homeBG">
+			<!-- <image class="homeBG" mode="aspectFill" src="../../assets/home/homeBG.png"></image> -->
 			<view class="sy-menu">
 				<view class="sy-menu-box menu-box1 df jcc" @click="onClick_menu(0)">
 					<view class="sy-menu-text menu-text1">{{menu[0].title}}</view>
@@ -103,11 +104,21 @@
 </script>
 
 <style lang="scss">
+	.homeBG {
+		width: 100%;
+		height: 100%;
+	}
 	.homeBG img {
 		max-width: 100%;
 	}
 
 	.sy-menu {
+	// 	background-image: url('../../assets/home/homeBG.png');
+	
+	// 	background-repeat: no-repeat;
+	// 	background-size: cover;
+		// background-position: center;
+			
 		position: absolute;
 		width: 100%;
 		height: 100%;

+ 2 - 0
components/home/teacher/create.vue

@@ -103,6 +103,8 @@
 								this.model.projectName='';
 								this.model.describe='';
 								this.model.type='科幻';
+							
+								this.$emit('onBackCreateInfo');
 							}
 						});
 					}

+ 4 - 2
components/home/teacher/table.vue

@@ -48,7 +48,7 @@
 		components: {
 			// locationtemp
 		},
-		created() {
+		mounted() {
 			this.getList();
 		},
 		methods: {
@@ -70,12 +70,14 @@
 						} = res;
 						this.tabledata = res.data.Projects
 						console.log("table页面请求所有项目",res);
+						// this.$forceUpdate();//强制刷新页面
 					}
 				})
 			},
 			//查看项目
 			find(obj,index){
-				this.$emit('viewProject',obj,index)
+				// this.$emit('viewProject',obj,index)
+				console.log('111111111')
 			}
 		}
 	}

+ 13 - 7
components/home/teacherCreation.vue

@@ -33,7 +33,7 @@
 			<!-- <view class="rightBox"> -->
 			<!-- showboder -->
 			<teacher ref="teacher" v-show="index==1" @paging="paging"></teacher>
-			<create ref="create" v-show="index==3"></create>
+			<create ref="create" v-show="index==3" v-on:onBackCreateInfo="onBackCreateInfo"></create>
 			<vtable ref="table" v-show="index==2" v-on:viewProject='viewProject'></vtable>
 			<project ref="project" v-show="index==4"></project>
 			<location ref="location" v-show="index==2||index==4"></location>
@@ -59,17 +59,19 @@
 				menu: [{
 					id: 1,
 					icon: "icon-bianzu22",
-					select: true,
+					select: false,
 					title: '新建项目',
 					list: []
-				}, {
+				}, 
+				{
 					id: 2,
 					icon: "icon-bianzu22",
 					select: false,
 					title: '选择项目',
+					// list: []
 					list: [{
 						id: 4,
-						title: "项目",
+						title: "项目1",
 						select: false
 					}]
 				}],
@@ -84,11 +86,9 @@
 			vtable,
 			project,
 			location
-		},
-		created() {
-
 		},
 		methods: {
+			
 			checkMenu(obj, i) {
 				this.index = obj.id;
 				if (i == 0) {
@@ -101,10 +101,13 @@
 				}
 
 				if (obj.id == 2) {
+					// this.$refs.table.$forceUpdate();//强制刷新页面
 					this.$refs.table.getList();
 				}
 			},
 			paging(obj) {
+				// console.log('this.index=',this.index)
+				// console.log('obj=',obj)
 				this.index = obj;
 			},
 			childrenClick(obj) {
@@ -127,6 +130,9 @@
 				this.menu[1].list[0].title = '项目' + (index + 1);
 				this.checkMenu(this.menu[1].list[0],1);
 				this.$refs.project.viewProject(obj);
+			},
+			onBackCreateInfo(){
+				this.index = 1;
 			}
 		}
 	}

+ 0 - 1
components/student/table.vue

@@ -86,7 +86,6 @@
 						}
 					},
 				});
-		
 			}
 		}
 	}