Procházet zdrojové kódy

创作管理中心

yichael před 4 roky
rodič
revize
c8af965196

+ 8 - 237
components/home/simulationCore.vue

@@ -2,9 +2,7 @@
 	<view class="s_container">
 		<image src="../../assets/home/homeBG.png" class="s_logo" mode=""></image>
 		<view class="s_content_container">
-			<view class="s_title" v-text="'虚拟仿真1号摄影棚'">
-
-			</view>
+			<view class="s_title" v-text="'虚拟仿真1号摄影棚'"></view>
 			<view class="s_content">
 				<view class="">
 					影视现场实时特效是虚拟制片的一种影视创作流程与创作技术,处于虚 拟制片前、中、后期中的中期现场创作环节,与虚拟制片的前期艺术设 计、虚拟制作联系尤为密切。影视现场实时特效的核心
@@ -16,37 +14,6 @@
 		<view class="s_footer" style="text-align: center;padding: 80rpx;">
 			<button size="mini" class="m_btn_download" style="" @click="goToProjectMange">进入项目管理中心</button>
 		</view>
-		
-		<!-- <view class="s_footer" style="text-align: center;padding: 80rpx;">
-			<view class="s_title" v-text="'推荐项目'">
-
-			</view>
-			<view class="s_table_padding">
-				<table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
-					<thead class="m-table-hander">
-						<tr>
-							<th>项目</th>
-							<th>名称</th>
-							<th>类型</th>
-							<th>介绍</th>
-							<th>项目文件</th>
-							<th>项目成员</th>
-						</tr>
-					</thead>
-					<tbody>
-						<tr v-for="(item,index) in projectData" :key="index">
-							<th>{{item.Id}}</th>
-							<th>{{item.ProjectName}}</th>
-							<th>{{item.Type}}</th>
-							<th>{{item.Intro}}</th>
-							<th class="m_yl"><button type="default" size="mini" class="m_edit" @click="preview(item)">预览</button></th>
-							<th style="position: relative;"><button type="default" @click="deleteMember(item)" size="mini" class="m_delete">删除</button></th>
-						</tr>
-					</tbody>
-				</table>
-			</view>
-
-		</view> -->
 	</view>
 </template>
 
@@ -55,142 +22,21 @@
 		name: "simulationCore", //虚拟影视开发中心
 		data() {
 			return {
-				projectData: []
 			}
 		},
 		
 		methods: {
 			init(){
 				console.log('simulationCore init');
-				// uni.chooseFile({
-				//     success: (chooseImageRes) => {
-				//         const tempFilePaths = chooseImageRes.tempFilePaths;
-				//         uni.uploadFile({
-				//             url: this.$Api + "/project/uploadprojectfile", //仅为示例,非真实的接口地址
-				//             filePath: tempFilePaths[0],
-				//             name: 'file',
-				//             formData: {
-				// 				'UserID':'1e9c969f-8990-40f2-8a8c-ecbafc5720b2',                // 创建用户 id
-				// 				'Name':'11',           // 项目名称
-				// 				'Type':'11',              // 项目描述
-				// 				'ProjectID':'2',                 // 科幻 现实 历史 主旋律 纪录片
-				//             },
-				//             success: (uploadFileRes) => {
-				//                 console.log('upload ok=',uploadFileRes.data);
-				//             }
-				//         });
-				//     }
-				// });
-				this.getProjectsID();
+				// this.getProjectsID();
 			},
 			goToProjectMange(){
-				this.$emit('goToTeachCreation');
-			},
-			getProjectsID() {
-				// console.log('userID=',this.$UserId)
-				uni.request({
-					url: this.$Api + "/project/getprojects",
-					data: {
-						"UserID": this.$UserId
-					},
-					method: "POST",
-					dataType: "json",
-					success: res => {
-						// console.log('res=',res)
-						console.log('Projects=',res.data.Projects)
-						let Projects = res.data.Projects;
-						for(let i=0;i<Projects.length;i++)
-						{
-							let data = {};
-							data.Id = Projects[i].Id;
-							data.ProjectName = Projects[i].ProjectName;
-							data.Type = Projects[i].Type;
-							data.Intro = '';
-							data.File = [];
-							data.Member = [];
-							this.projectData.push(data);
-						}
-						
-						for(let i=0;i<this.projectData.length;i++)
-						{
-							this.getProjectsCtcontent(i);
-						}
-					}
-				})
-			},
-			getProjectsCtcontent(index) {
-				// console.log('UserID=',this.$UserId)
-				// console.log('ProjectID=',this.projectData[index].Id)
-			
-				uni.request({
-					url: this.$Api + "/project/getprojectcontent",
-					data: {
-						"UserID": this.$UserId,
-						"ProjectID": this.projectData[index].Id
-					},
-					method: "POST",
-					dataType: "json",
-					success: res => {
-						console.log('res=',res)
-						if(res.data.ProjectItem.length!=0)
-						{
-							this.projectData[index].Intro = res.data.ProjectItem[0].Type;
-							this.projectData[index].File = res.data.ProjectItem[0].URL;
-						}
-						
-						this.getMember(index);
-					}
-				})
-			},
-			getMember(index) {
-				uni.request({
-					url: this.$Api + "/project/getmember",
-					data: {
-						"ProjectID": this.projectData[index].Id
-					},
-					method: "POST",
-					dataType: "json",
-					success: res => {
-						// console.log('res=',res)
-						// console.log('Projects=',res.data.Users[0].User.Id)
-						for(let i=0;i<res.data.Users.length;i++)
-						{
-							console.log('Projects=',res.data.Users[i].User.Id)
-							this.projectData[index].Member.push(res.data.Users[i].User.Id);
-						}
-					}
-				})
-			},
-			preview(item){
-				uni.downloadFile({
-					url: item.File,
-					success: (res) => {
-						if (res.statusCode === 200) {
-							uni.openDocument({
-								filePath: res.tempFilePath, 
-								// 如果文件名包含中文,建议使用escape(res.tempFilePath)转码,防止ios和安卓客户端导致的差异
-								success: function(res) {
-									console.log('打开文档成功');
-								}
-							});
-						}
-					},
-				});
-			},
-			deleteMember(item){
-				uni.request({
-					url: this.$Api + "/project/deletemember",
-					data: {
-						"userID" : this.$UserId,
-						"DeleteUserID":item.Id
-					},
-					method: "POST",
-					dataType: "json",
-					success: res => {
-						console.log('res=',res)
-						// this.projectData.splice(index,index);
-					}
-				})
+				if(mydata_userInfo.role === '老师'){
+					this.$emit('goToTeachCreation');
+				}
+				else{
+					this.$emit('goToStudentPlatform');
+				}
 			}
 		}
 	}
@@ -202,13 +48,10 @@
 		height: 100%;
 		background-color: #fff;
 	}
-
 	.s_logo {
 		width: 100%;
 		height: 1000rpx;
 	}
-
-
 	.s_content_container {
 		padding: 0 206rpx;
 
@@ -225,78 +68,6 @@
 			line-height: 70rpx;
 		}
 	}
-
-	.m_btn_download {
-		height: 80rpx;
-		line-height: 80rpx;
-		padding: 0 70rpx;
-		background: #EA252C;
-		color: #fff;
-		font-family: MicrosoftYaHei;
-	}
-
-	tbody tr {
-		border-top: 2rpx solid #DDDDDD !important;
-
-	}
-
-	tbody tr th:first-child {
-		position: relative;
-	}
-
-	tbody tr th {
-		font-weight: 400 !important;
-		height: 140rpx;
-		line-height: 140rpx;
-	}
-
-	tbody tr:hover {
-		// color: #fff;
-		background: #FDEBEC;
-		// opacity: 0.08;
-	}
-
-	.m-table-hander {
-		background-color: #FFF8F7;
-		height: 140rpx;
-		line-height: 140rpx;
-		font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
-		font-weight: bold;
-	}
-
-	.m_edit {
-		position: absolute;
-		top: 50%;
-		left: 50%;
-		transform: translate(-50%, -50%);
-		background: rgb(67, 127, 250);
-		color: rgb(255, 255, 255);
-		min-width: 130rpx;
-	}
-
-	.m_delete {
-		position: absolute;
-		top: 50%;
-		left: 50%;
-		min-width: 130rpx;
-		transform: translate(-50%, -50%);
-		background: rgb(234, 37, 44);
-		color: rgb(255, 255, 255);
-	}
-
-	.m_yl {
-		position: relative;
-	}
-
-	.s_table_padding {
-		padding: 20rpx 400rpx;
-	}
-
-	.s_title {
-		line-height: 120rpx;
-		font-size: 40rpx;
-	}
-	
 	.m_btn_download {
 		height: 80rpx;
 		line-height: 80rpx;

+ 10 - 10
components/home/teacher/project.vue

@@ -702,7 +702,7 @@
                                 this.isShowAddFile = false
                                 this.fileDialogData = {name : "", type :""}
                                 this.getFileList();
-                				alert("创建成功");
+                				// alert("创建成功");
                 			}
                 		});
                 	}
@@ -906,9 +906,9 @@
 						console.log('upload ok=', uploadFileRes.data);
 						this.bShowUpLoadFile = false;
 				        this.getFileList();
-						setTimeout(function(){
-							alert("创建成功");
-						},500)
+						// setTimeout(function(){
+						// 	alert("创建成功");
+						// },500)
 					}
 				});		
 			},
@@ -955,16 +955,16 @@
 							this.$forceUpdate();
 							this.bShowAddStu = false;
 							
-							setTimeout(function(){
-								alert("添加成功");
-							},500)
+							// setTimeout(function(){
+							// 	alert("添加成功");
+							// },500)
 							return;
 						}
 						
 						this.bShowAddStu = false;
-						setTimeout(function(){
-							alert("添加有误,请检查该学生是否存在");
-						},500)
+						// setTimeout(function(){
+						// 	alert("添加有误,请检查该学生是否存在");
+						// },500)
 					}
 				})	
 			},

+ 3 - 3
components/home/teacherCreation.vue

@@ -58,8 +58,8 @@
 			return {
 				index: 1,
 				childrenIndex: -1,
-				name: '张林老师',
-				position: '计算机系',
+				name: mydata_userInfo.Name,
+				position:mydata_userInfo.Position,
 				menu: [{
 					id: 1,
 					icon: "icon-bianzu22",
@@ -98,7 +98,7 @@
 		methods: {
 		
 			checkMenu(obj, i) {
-					console.log('index=',obj.id)
+					// console.log('index=',obj.id)
 				this.index = obj.id;
 				if (i == 0) {
 					this.index = obj.id;

+ 2 - 1
components/login/loginByPWD.vue

@@ -97,7 +97,8 @@
 							mydata_userInfo.UserID = data.UserID;
 							mydata_userInfo.Position = data.Position;
 							mydata_userInfo.role = data.Type;
-
+							
+							//设置用户类型(老师或者学生)
 							// let url = this.$Api + "/user/setusertype";
 							// uni.request({
 							// 	header: {

+ 16 - 5
components/student/Index.vue

@@ -47,14 +47,22 @@
 			return {
 				index: 1,
 				childrenIndex: -1,
-				name: '张林老师',
-				position: '计算机系',
+				name: mydata_userInfo.Name,
+				position:mydata_userInfo.Position,
 				menu: [{
 					id: 1,
 					icon: "icon-bianzu22",
 					select: true,
-					title: '项目一'
-				}],
+					title: '选择项目',
+					list: []
+				}
+				// ,{
+				// 	id: 1,
+				// 	icon: "icon-bianzu22",
+				// 	select: true,
+				// 	title: '选择项目'
+				// },
+				],
 				userInfo: mydata_userInfo,
 
 			}
@@ -72,7 +80,10 @@
 				} else {
 					obj.select = true;
 				}
-
+				if (obj.id == 2) {
+					// this.$refs.table.$forceUpdate();//强制刷新页面
+					this.$refs.table.getList();
+				}
 
 			},
 			paging(obj) {

+ 5 - 1
pages/home.vue

@@ -18,7 +18,7 @@
 			<SYJJ2 ref="SYJJ2" v-show="bShow[8]"></SYJJ2>
 			<simulation ref="simulation" v-show="bShow[9]"></simulation>
 			<simulationLibrary ref="simulationLibrary" v-show="bShow[10]"></simulationLibrary>
-			<simulationcore ref="simulationcore" v-show="bShow[11]" v-on:goToTeachCreation="goToTeachCreation"></simulationcore>
+			<simulationcore ref="simulationcore" v-show="bShow[11]" v-on:goToTeachCreation="goToTeachCreation" v-on:goToStudentPlatform="goToStudentPlatform"></simulationcore>
 			<simulationBase ref="simulationBase" v-show="bShow[12]"></simulationBase>
 			<teacherCreation ref="teacherCreation" v-show="bShow[13]"></teacherCreation>
 			<User ref="User" v-show="bShow[14]" v-on:onClick_proManage="onClick_proManage"></User>
@@ -344,6 +344,10 @@
 			goToTeachCreation(){
 				this.showPage(13);
 			},
+			goToStudentPlatform(){
+				this.showPage(19);
+				this.$refs.vstudentPlatform.updateInfo();
+			},
 			//顶部导航左上角icon点击事件
 			onTopMenuIconClick() {
 				if(!getApp().globalData.bLogin) {