yu 4 vuotta sitten
vanhempi
sitoutus
b79526f991

+ 23 - 45
components/home/teacher/project.vue

@@ -46,8 +46,8 @@
 							<!-- <th>{{item.Describe}}</th> -->
 							<th>{{item.Type}}</th>
 							<th>{{item.CreateUserName}}</th>
-							<th style="position: relative;"><button type="default" size="mini" @click="edit(index)" class="m_edit">修改</button></th>
-							<th style="position: relative;"><button type="default" size="mini" @click="delete1(index)" class="m_delete">删除</button></th>
+							<th style="position: relative;"><button type="default" size="mini" @click="editProject(index)" class="m_edit">修改</button></th>
+							<th style="position: relative;"><button type="default" size="mini" @click="deleteProject(index)" class="m_delete">删除</button></th>
 						</tr>
 					</tbody>
 				</table>
@@ -197,29 +197,35 @@
 			audit,
 			// locationtemp
 		},
-		created() {
-			// this.getlist();
-			// this.getFileList();
-		},
 		methods: {
 			paging(obj) {
 				this.index = obj;
 			},
-			delete1(index) {
+			editProject(index) {
 				this.title = "是否删除信息?";
 				this.arr = ["删除", "取消"]
 				this.show = true;
 			},
+			deleteProject(index) {
+				this.title = "是否删除信息?";
+				this.arr = ["删除", "取消"]
+				this.show = true;
+			},
+			// delete1(index) {
+			// 	this.title = "是否删除信息?";
+			// 	this.arr = ["删除", "取消"]
+			// 	this.show = true;
+			// },
 			download(index) {
 				this.title = "下载成功?";
 				this.arr = ["确认"];
 				this.show = true;
 			},
-			edit(index) {
-				this.title = "是否删除信息?";
-				this.arr = ["删除", "取消"]
-				this.show = true;
-			},
+			// edit(index) {
+			// 	this.title = "是否删除信息?";
+			// 	this.arr = ["删除", "取消"]
+			// 	this.show = true;
+			// },
 			audit(index) {
 				this.title = "是否确认审核?";
 				this.arr = ["通过", "未通过"]
@@ -241,11 +247,8 @@
 					default:
 						break;
 				}
-				// if (this.audit == "audit") {
-
-				// }
 
-				console.log(obj)
+				// console.log(obj)
 			},
 			auditPost(obj) {
 				uni.request({
@@ -270,12 +273,7 @@
 					method: "POST",
 					dataType: "json",
 					success: res => {
-
-						var {
-							data
-						} = res;
-						this.projectData = data.Projects;
-
+						this.projectData = res.data.Projects;
 					}
 				})
 			},
@@ -296,26 +294,6 @@
 						// console.log('this.fileData=',this.fileData)
 					}
 				})
-				// var temp = {
-				// 	"UserID": this.$UserId,
-				// 	"ProjectID": this.projectData[0].Id
-				// }
-				// uni.request({
-				// 	url: this.$Api + "/project/getprojectcontent",
-				// 	data: temp,
-				// 	method: "POST",
-				// 	dataType: "json",
-				// 	success: res => {
-				// 		var {
-				// 			data
-				// 		} = res;
-				// 		if (data.code == 100) {
-				// 			this.fileData = data.ProjectItem;
-				// 			console.log('this.fileData=',this.fileData)
-				// 		}
-				// 	}
-				// })
-
 			},
 			viewProject(obj) {
 				this.projectData = [obj];
@@ -332,10 +310,10 @@
 					method: "POST",
 					dataType: "json",
 					success: res => {
-						console.log("请求学生", res);
+						// console.log("请求学生", res);
 						if (res.data.Code == 100) {
 							this.projectMembers = res.data.Users;
-							console.log();
+							// console.log();
 						}
 					}
 				})
@@ -357,7 +335,7 @@
 					method: "POST",
 					dataType: "json",
 					success: res => {
-						console.log("请求学生", res);
+						// console.log("请求学生", res);
 						if (res.data.Code == 100) {
 							this.projectMembers = res.data.Users;
 							console.log();

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

@@ -49,7 +49,7 @@
 			// locationtemp
 		},
 		mounted() {
-			this.getList();
+			// this.getList();
 		},
 		methods: {
 			paging(obj) {
@@ -66,7 +66,7 @@
 					dataType: "json",
 					success: res => {
 						this.tabledata = res.data.Projects
-						console.log("table页面请求所有项目",res);
+						// console.log("table页面请求所有项目",res);
 						// this.$forceUpdate();//强制刷新页面
 					}
 				})

+ 9 - 8
components/home/teacherCreation.vue

@@ -72,12 +72,12 @@
 					icon: "icon-bianzu22",
 					select: false,
 					title: '选择项目',
-					// list: []
-					list: [{
-						id: 4,
-						title: "项目1",
-						select: false
-					}]
+					list: []
+					// list: [{
+					// 	id: 4,
+					// 	title: "项目1",
+					// 	select: false
+					// }]
 				}],
 				scrollTop: 0,
 				oldScrollTop: 0,
@@ -133,8 +133,9 @@
 			},
 			viewProject(obj, index) {
 				console.log("查看项目", obj, index);
-				this.menu[1].list[0].title = '项目' + (index + 1);
-				this.checkMenu(this.menu[1].list[0], 1);
+				// this.menu[1].list[0].title = '项目' + (index + 1);
+				// this.checkMenu(this.menu[1].list[0], 1);
+				this.checkMenu({id:4}, 1);
 				this.$refs.project.viewProject(obj);
 			},
 			onBackCreateInfo(){

+ 3 - 5
components/student/StudentInfo.vue

@@ -185,7 +185,6 @@
 			}
 		},
 		onUploadAvatar(){
-		
 			uni.chooseFile({
 			    success: (chooseFileRes) => {
 			        const tempFilePaths = chooseFileRes.tempFilePaths;
@@ -203,15 +202,14 @@
 								header: {
 									'Content-Type': 'application/json;charset=UTF-8'
 								},
-							   url: this.$Api + " /user/getuserinfo", //仅为示例,非真实的接口地址
+							    url: this.$Api + "/user/getuserinfo", //仅为示例,非真实的接口地址
 								method: 'POST',
 								data: {
-									"UserID": UserID,
+									'UserID':this.$UserId, 
 								},
 								dataType: 'json',
 								success: (res) => {
-									let data = res.data;
-									userInfo.avatarSrc = data.Image;
+									this.userInfo.avatarSrc = res.data.User.HeadImageURL;
 								},
 								fail: (res) => {
 									console.log("fail+**+*", res)

+ 3 - 5
components/user/selfInfo.vue

@@ -312,7 +312,6 @@
 			}
 		},
 		onUploadAvatar(){
-		
 			uni.chooseFile({
 			    success: (chooseFileRes) => {
 			        const tempFilePaths = chooseFileRes.tempFilePaths;
@@ -330,15 +329,14 @@
 								header: {
 									'Content-Type': 'application/json;charset=UTF-8'
 								},
-							   url: this.$Api + " /user/getuserinfo", //仅为示例,非真实的接口地址
+							    url: this.$Api + "/user/getuserinfo", //仅为示例,非真实的接口地址
 								method: 'POST',
 								data: {
-									"UserID": UserID,
+									'UserID':this.$UserId, 
 								},
 								dataType: 'json',
 								success: (res) => {
-									let data = res.data;
-									userInfo.avatarSrc = data.Image;
+									this.userInfo.avatarSrc = res.data.User.HeadImageURL;
 								},
 								fail: (res) => {
 									console.log("fail+**+*", res)

+ 3 - 5
components/user/user.vue

@@ -351,7 +351,6 @@
 				
 			},
 			onUploadAvatar(){
-
 				uni.chooseFile({
 				    success: (chooseFileRes) => {
 				        const tempFilePaths = chooseFileRes.tempFilePaths;
@@ -369,15 +368,14 @@
 									header: {
 										'Content-Type': 'application/json;charset=UTF-8'
 									},
-								   url: this.$Api + " /user/getuserinfo", //仅为示例,非真实的接口地址
+								    url: this.$Api + "/user/getuserinfo", //仅为示例,非真实的接口地址
 									method: 'POST',
 									data: {
-										"UserID": UserID,
+										'UserID':this.$UserId, 
 									},
 									dataType: 'json',
 									success: (res) => {
-										let data = res.data;
-										userInfo.avatarSrc = data.Image;
+										this.userInfo.avatarSrc = res.data.User.HeadImageURL;
 									},
 									fail: (res) => {
 										console.log("fail+**+*", res)