Procházet zdrojové kódy

1

Signed-off-by: lcw <1324309909@qq.com>
lcw před 3 roky
rodič
revize
6adc82b3b0

binární
src/assets/icon/sp1.png


binární
src/assets/icon/tup1.png


binární
src/assets/icon/wheel.png


binární
src/assets/icon/yp1.png


+ 1 - 0
src/components/pages/data.vue

@@ -34,6 +34,7 @@
 					</el-form-item>
 					<el-form-item label="手机号码" prop="phone">
 						<el-input
+							disabled
 							v-model="ruleForm.phone"
 							style="width: 300px"
 							placeholder="请输入手机号码"

+ 387 - 50
src/components/pages/library.vue

@@ -6,65 +6,138 @@
 		<div class="pb_content_body" style="height: 70%">
 			<div class="student_head">
 				<div class="three">
-					<div :class="choose == 0 ? 'choose' : ''" @click="choose = 0">
-						图片
-					</div>
-					<div :class="choose == 1 ? 'choose' : ''" @click="choose = 1">
-						视频
-					</div>
-					<div :class="choose == 2 ? 'choose' : ''" @click="choose = 2">
-						音频
-					</div>
+					<div :class="choose == 0 ? 'choose' : ''" @click="sMtl(0)">图片</div>
+					<div :class="choose == 1 ? 'choose' : ''" @click="sMtl(1)">视频</div>
+					<div :class="choose == 2 ? 'choose' : ''" @click="sMtl(2)">附件</div>
+				</div>
+				<div v-if="choose == 0" @click="addImg($event)">
+					<input
+						type="file"
+						accept="image/png,image/gif,image/jpeg"
+						style="display: none"
+						@change="beforeUpload1($event, 1)"
+					/>
+					<div class="uploadThing">上传图片</div>
 				</div>
-				<div class="student_button">
-					<el-button type="primary">上传素材</el-button>
+				<div v-if="choose == 1" @click="addImg($event)">
+					<input
+						type="file"
+						accept="video/mp4,video/quicktime,video/x-msvideo"
+						style="display: none"
+						@change="beforeUpload2($event, 2)"
+					/>
+					<div class="uploadThing">上传视频</div>
+				</div>
+				<div v-if="choose == 2" @click="addImg($event)">
+					<input
+						type="file"
+						accept="application/pdf,.ppt,.pptx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"
+						style="display: none"
+						@change="beforeUpload2($event, 3)"
+					/>
+					<div class="uploadThing">上传附件</div>
 				</div>
 			</div>
 			<div class="student_table">
-				<div v-if="this.choose == 0" style="padding: 15px 5px;display: flex;">
-					<div class="out_box">
-						<div class="tup"><img src="../../assets/tup1.png" alt="" /></div>
+				<div v-if="this.choose == 0" style="padding: 15px 5px; display: flex">
+					<div class="out_box" v-for="(item, index) in chapInfo" :key="index">
+						<div class="tup">
+							<img
+								:src="
+									item.chapdataInfo ? JSON.parse(item.chapdataInfo).url : mtp
+								"
+								alt=""
+								@click="
+									handlePictureCardPreview(JSON.parse(item.chapdataInfo).url)
+								"
+							/>
+							<div class="deleteWord" @click="deleteM(item.id)">
+								<img src="../../assets/icon/delete.png" alt="" />
+							</div>
+						</div>
 						<div class="bottom_box">
-							<div>人工智能封面.png</div>
-							<div class="update">
-								<img src="../../assets/update.png" alt="" />
+							<div>
+								{{
+									item.chapdataInfo
+										? JSON.parse(item.chapdataInfo).name
+										: "图片暂无名称"
+								}}
 							</div>
 						</div>
 					</div>
 				</div>
-                <div v-if="this.choose == 1" style="padding: 15px 5px;display: flex;">
-					<div class="out_box">
-						<div class="tup"><img src="../../assets/sp1.png" alt="" /></div>
-						<div class="bottom_box">
-							<div>2312193.mp4</div>
-							<div class="update">
-								<img src="../../assets/update.png" alt="" />
+				<div v-if="this.choose == 1" style="padding: 15px 5px; display: flex">
+					<div class="out_box" v-for="(item, index) in chapInfo" :key="index">
+						<div class="tup">
+							<img
+								:src="msp"
+								alt=""
+								@click="
+									handlePictureCardPreview1(JSON.parse(item.chapdataInfo).url)
+								"
+							/>
+							<div class="deleteWord" @click="deleteM(item.id)">
+								<img src="../../assets/icon/delete.png" alt="" />
 							</div>
 						</div>
-					</div>
-                    <div class="out_box">
-						<div class="tup"><img src="../../assets/sp1.png" alt="" /></div>
 						<div class="bottom_box">
-							<div>2312193.mp4</div>
-							<div class="update">
-								<img src="../../assets/update.png" alt="" />
+							<div>
+								{{
+									item.chapdataInfo
+										? JSON.parse(item.chapdataInfo).name
+										: "图片暂无名称"
+								}}
 							</div>
 						</div>
 					</div>
 				</div>
-                <div v-if="this.choose == 2" style="padding: 15px 5px;display: flex;">
-					<div class="out_box">
-						<div class="tup"><img src="../../assets/yp1.png" alt="" /></div>
+				<div v-if="this.choose == 2" style="padding: 15px 5px; display: flex">
+					<div class="out_box" v-for="(item, index) in chapInfo" :key="index">
+						<div class="tup">
+							<img :src="mfj" alt="" @click="
+									downFile(JSON.parse(item.chapdataInfo).url)
+								" />
+							<div class="deleteWord" @click="deleteM(item.id)">
+								<img src="../../assets/icon/delete.png" alt="" />
+							</div>
+						</div>
 						<div class="bottom_box">
-							<div>人工智能.mp4</div>
-							<div class="update">
-								<img src="../../assets/update.png" alt="" />
+							<div>
+								{{
+									item.chapdataInfo
+										? JSON.parse(item.chapdataInfo).name
+										: "图片暂无名称"
+								}}
 							</div>
 						</div>
 					</div>
 				</div>
 			</div>
+			<div class="student_page">
+				<el-pagination
+					background
+					layout="prev, pager, next"
+					:page-size="10"
+					:total="total"
+					v-if="!isLoading && page"
+					@current-change="handleCurrentChange"
+				>
+				</el-pagination>
+			</div>
 		</div>
+		<el-dialog :visible.sync="pictureDialog" size="tiny">
+			<img width="100%" :src="dialogImageUrl" alt="" />
+		</el-dialog>
+		<el-dialog :visible.sync="vedioDialog" size="tiny">
+			<video-player
+				class="video-player vjs-custom-skin"
+				ref="videoPlayer"
+				:playsinline="true"
+				:options="playerO"
+				@play="onPlayerPlay($event)"
+				style="width: 100%; height: 100%"
+			></video-player>
+		</el-dialog>
 	</div>
 </template>
 
@@ -73,19 +146,260 @@
 		data() {
 			return {
 				choose: 0,
+				chapInfo: [],
+				cImgInfo: [],
+				isLoading: false,
+				noneBtnImg: false,
+				mtp: require("../../assets/tup1.png"),
+				msp: require("../../assets/sp1.png"),
+				mfj: require("../../assets/yp1.png"),
+				page: 1,
+				total: 0,
+				dialogImageUrl: "",
+				pictureDialog: false,
+				vedioDialog: false,
+				playerOptions: {
+					playbackRates: [0.7, 1.0, 1.5, 2.0], //播放速度
+					autoplay: false, //如果true,浏览器准备好时开始回放。
+					muted: false, // 默认情况下将会消除任何音频。
+					loop: false, // 导致视频一结束就重新开始。
+					preload: "auto", // 建议浏览器在<video>加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持)
+					language: "zh-CN",
+					aspectRatio: "16:9", // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
+					fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
+					sources: [
+						{
+							type: "video/mp4", //这里的种类支持很多种:基本视频格式、直播、流媒体等,具体可以参看git网址项目   || "video/ogg"|| "video/webm"
+							src: "", //url地址require("../../assets/media/aaa.mp4")
+						},
+					],
+					// poster: require("../../assets/tu31.png"), //你的封面地址
+					// poster: dataRes.imgUrl, //你的封面地址
+					notSupportedMessage: "此视频暂无法播放,请稍后再试", //允许覆盖Video.js无法播放媒体源时显示的默认信息。
+					controlBar: {
+						timeDivider: true, //当前时间和持续时间的分隔符
+						durationDisplay: true, //显示持续时间
+						remainingTimeDisplay: false, //是否显示剩余时间功能
+						fullscreenToggle: true, //全屏按钮
+					},
+				},
+				playerO: {},
 			};
 		},
-		methods: {},
-		created() {},
+		methods: {
+			handleCurrentChange(val) {
+				this.page = val;
+			},
+			addImg(e) {
+				var el = e.currentTarget;
+				el.getElementsByTagName("input")[0].click();
+			},
+			imgChange(file, fileList, type) {
+				var _tmp = this.chapInfo;
+				this.noneBtnImg = _tmp.length >= 1;
+			},
+			downFile(url) {
+				window.open(url);
+			},
+			beforeUpload1(event, type) {
+				var file = event.target.files[0];
+				var credentials = {
+					accessKeyId: "AKIATLPEDU37QV5CHLMH",
+					secretAccessKey: "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",
+				}; //秘钥形式的登录上传
+				window.AWS.config.update(credentials);
+				window.AWS.config.region = "cn-northwest-1"; //设置区域
+
+				var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
+				var _this = this;
+
+				if (file) {
+					var params = {
+						Key:
+							file.name.split(".")[0] +
+							new Date().getTime() +
+							"." +
+							file.name.split(".")[1],
+						ContentType: file.type,
+						Body: file,
+						"Access-Control-Allow-Credentials": "*",
+						ACL: "public-read",
+					}; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
+					var options = {
+						partSize: 2048 * 1024 * 1024,
+						queueSize: 2,
+						leavePartsOnError: true,
+					};
+					bucket
+						.upload(params, options)
+						.on("httpUploadProgress", function (evt) {
+							//这里可以写进度条
+							// console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
+						})
+						.send(function (err, data) {
+							if (err) {
+								var a = _this.$refs.upload1.uploadFiles;
+								a.splice(a.length - 1, a.length);
+								_this.$message.error("上传失败");
+							} else {
+								_this.cImgInfo.push({
+									name: file.name,
+									url: data.Location,
+								});
+								_this.addMtl();
+								_this.cImgInfo = [];
+								_this.selectMtl();
+								_this.imgChange(null, null, type);
+								console.log(data.Location);
+							}
+						});
+				}
+			},
+			handlePictureCardPreview(url) {
+				this.dialogImageUrl = url;
+				this.pictureDialog = true;
+			},
+			handlePictureCardPreview1(url) {
+				this.playerO = {};
+				this.playerOptions.poster = "";
+				this.playerOptions.sources[0].src = url;
+				this.playerO = this.playerOptions;
+				// this.dialogImageUrl = url;
+				this.vedioDialog = true;
+			},
+			beforeUpload2(event, type) {
+				var file = event.target.files[0];
+				var credentials = {
+					accessKeyId: "AKIATLPEDU37QV5CHLMH",
+					secretAccessKey: "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",
+				}; //秘钥形式的登录上传
+				window.AWS.config.update(credentials);
+				window.AWS.config.region = "cn-northwest-1"; //设置区域
+
+				var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
+				var _this = this;
+
+				if (file) {
+					var params = {
+						Key:
+							file.name.split(".")[0] +
+							new Date().getTime() +
+							"." +
+							file.name.split(".")[1],
+						ContentType: file.type,
+						Body: file,
+						"Access-Control-Allow-Credentials": "*",
+						ACL: "public-read",
+					}; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
+					var options = {
+						partSize: 2048 * 1024 * 1024,
+						queueSize: 2,
+						leavePartsOnError: true,
+					};
+					bucket
+						.upload(params, options)
+						.on("httpUploadProgress", function (evt) {
+							//这里可以写进度条
+							// console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
+						})
+						.send(function (err, data) {
+							if (err) {
+								var a = _this.$refs.upload1.uploadFiles;
+								a.splice(a.length - 1, a.length);
+								_this.$message.error("上传失败");
+							} else {
+								if (type == 2) {
+									_this.cImgInfo.push({
+										name: file.name,
+										url: data.Location,
+									});
+									_this.addMtl();
+									_this.cImgInfo = [];
+									_this.selectMtl();
+									_this.imgChange(null, null, type);
+								} else if (type == 3) {
+									_this.cImgInfo.push({
+										name: file.name,
+										url: data.Location,
+									});
+									_this.addMtl();
+									_this.cImgInfo = [];
+									_this.selectMtl();
+									_this.imgChange(null, null, type);
+								}
+								console.log(data.Location);
+							}
+						});
+				}
+			},
+			addMtl() {
+				let params = {
+					cInfo: this.cImgInfo[0],
+					t: this.choose,
+					cBy: this.$store.state.userInfo.userid,
+				};
+				this.ajax
+					.get(this.$store.state.api + "addMtl", params)
+					.then((res) => {
+						this.$message.success("上传素材成功");
+					})
+					.catch((err) => {
+						console.error(err);
+					});
+			},
+			sMtl(type) {
+				this.choose = type;
+				this.selectMtl();
+			},
+			selectMtl() {
+				this.isLoading = true;
+				let params = {
+					t: parseInt(this.choose),
+					page: this.page,
+				};
+				this.ajax
+					.get(this.$store.state.api + "selectMtl", params)
+					.then((res) => {
+						this.isLoading = false;
+						this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
+						this.chapInfo = res.data[0];
+					})
+					.catch((err) => {
+						this.isLoading = false;
+						console.error(err);
+					});
+			},
+			deleteM(id) {
+				this.isLoading = true;
+				let params = {
+					id: id,
+				};
+				this.ajax
+					.get(this.$store.state.api + "deleteM", params)
+					.then((res) => {
+						this.isLoading = false;
+						this.$message.success("删除成功");
+						this.selectMtl();
+					})
+					.catch((err) => {
+						this.isLoading = false;
+						console.error(err);
+					});
+			},
+			onPlayerPlay() {},
+		},
+		created() {
+			this.selectMtl();
+		},
 	};
 </script>
 
 <style scoped>
-	.student_button {
-		display: flex;
-		overflow: hidden;
-		height: 40px;
-	}
+	/* .student_button {
+																														display: flex;
+																														overflow: hidden;
+																														height: 40px;
+																													} */
 	.student_head >>> .el-button--primary {
 		background-color: #2268bc;
 	}
@@ -118,17 +432,22 @@
 
 	.tup {
 		width: 200px;
+		height: 191px;
 		margin: 0 auto;
+		position: relative;
 	}
 
-	.update {
-		width: 19px;
-		height: 20px;
-		margin-left: 10px;
+	.deleteWord {
+		width: 25px;
+		height: 25px;
+		position: absolute;
+		right: -25px;
+		top: -10px;
+		cursor: pointer;
 	}
 
 	.tup > img,
-	.update > img {
+	.deleteWord > img {
 		width: 100%;
 		height: 100%;
 	}
@@ -140,13 +459,31 @@
 		width: 250px;
 		padding: 10px 0;
 		background: #fff;
-        margin-left: 25px;
+		margin-left: 25px;
 	}
 
 	.bottom_box {
 		display: flex;
 		text-align: center;
 		margin: 0 auto;
-		margin-top: 5px;
+		padding: 10px 0 5px 0;
+	}
+	.bottom_box > div:nth-child(1) {
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		overflow: hidden;
+		word-break: break-all;
+		width: 200px;
+	}
+	.uploadThing {
+		background: #2268bc;
+		width: 90px;
+		height: 35px;
+		color: #fff;
+		font-size: 12px;
+		text-align: center;
+		line-height: 35px;
+		cursor: pointer;
+		border-radius: 4px;
 	}
 </style>

+ 2 - 2
src/components/pages/notice.vue

@@ -27,7 +27,7 @@
 							><div v-html="snippet(scope.row.content)"></div
 						></template>
 					</el-table-column>
-					<el-table-column
+					<!-- <el-table-column
 						prop="creater"
 						label="创建者"
 						min-width="15"
@@ -35,7 +35,7 @@
 						><template slot-scope="scope">
 							{{ scope.row.creater ? scope.row.creater : "未知" }}
 						</template>
-					</el-table-column>
+					</el-table-column> -->
 					<el-table-column
 						prop="creatTime"
 						label="创建时间"

+ 60 - 56
src/components/pages/student.vue

@@ -334,6 +334,7 @@
 				let params = {
 					// username: this.$store.state.userInfo.userid,
 					cu: "",
+					oid: this.$store.state.userInfo.organizeid,
 					cn: "",
 					page: this.page,
 				};
@@ -453,10 +454,10 @@
 						let arr = [];
 						this.da.map((v) => {
 							let obj = {};
-							obj.name = v["学生名"];
+							obj.name = v["学生名"];
 							obj.phone = v["学生手机号"];
-							obj.sex = v["性別"];
-							obj.school = v["学校"];
+							// obj.sex = v["性別"];
+							// obj.school = this.$store.state.userInfo.organizeid;
 							obj.class = v["班级"];
 							arr.push(obj);
 						});
@@ -480,15 +481,17 @@
 								_b = 1;
 								_this.$message.error("有学生手机号格式不正确,请重新上传");
 								break;
-							} else if (item.school === "") {
-								_b = 1;
-								_this.$message.error("学生学校不能为空,请重新上传");
-								break;
-							} else if (item.sex === "") {
-								_b = 1;
-								_this.$message.error("学生性别不能为空,请重新上传");
-								break;
 							}
+							//  else if (item.school === "") {
+							// 	_b = 1;
+							// 	_this.$message.error("学生学校不能为空,请重新上传");
+							// 	break;
+							// }
+							// else if (item.sex === "") {
+							// 	_b = 1;
+							// 	_this.$message.error("学生性别不能为空,请重新上传");
+							// 	break;
+							// }
 							if (item.class != "") {
 								let _a;
 								let params = {
@@ -523,40 +526,40 @@
 									break;
 								}
 							}
-							if (item.school != "") {
-								let _a;
-								let params = {
-									schoolName: item.school,
-								};
+							// if (item.school != "") {
+							// 	let _a;
+							// 	let params = {
+							// 		schoolName: item.school,
+							// 	};
 
-								_$.ajax({
-									url: _this.$store.state.api + "selectS", //url路径
-									type: "GET", //GET
-									async: false, //或false,是否异步
-									data: params,
-									timeout: 5000, //超时时间
-									dataType: "json", //返回的数据格式:
-									beforeSend: function (xhr) {},
-									success: function (res, textStatus, jqXHR) {
-										if (res[0].length == 0) {
-											_a = 1;
-											_this.$message.error(
-												"有学生学校不存在,请去添加后并重新上传"
-											);
-										} else {
-											item.schoolid = res[0][0].id;
-										}
-									},
-									error: function (xhr, textStatus) {
-										console.log(textStatus);
-									},
-									complete: function () {},
-								});
-								if (_a == 1) {
-									_b = 1;
-									break;
-								}
-							}
+							// 	_$.ajax({
+							// 		url: _this.$store.state.api + "selectS", //url路径
+							// 		type: "GET", //GET
+							// 		async: false, //或false,是否异步
+							// 		data: params,
+							// 		timeout: 5000, //超时时间
+							// 		dataType: "json", //返回的数据格式:
+							// 		beforeSend: function (xhr) {},
+							// 		success: function (res, textStatus, jqXHR) {
+							// 			if (res[0].length == 0) {
+							// 				_a = 1;
+							// 				_this.$message.error(
+							// 					"有学生学校不存在,请去添加后并重新上传"
+							// 				);
+							// 			} else {
+							// 				item.schoolid = res[0][0].id;
+							// 			}
+							// 		},
+							// 		error: function (xhr, textStatus) {
+							// 			console.log(textStatus);
+							// 		},
+							// 		complete: function () {},
+							// 	});
+							// 	if (_a == 1) {
+							// 		_b = 1;
+							// 		break;
+							// 	}
+							// }
 							if (item.phone != "") {
 								let params = { un: item.phone };
 								let _a;
@@ -590,18 +593,19 @@
 							for (var i = 0; i < arr.length; i++) {
 								let _i = i;
 								let item = arr[i];
-								let params = [
-									{
-										ph: item.phone,
-										username: item.name,
-										type: 2,
-										oid: item.schoolid,
-										tid: _this.$store.state.userInfo.userid,
-										cid: item.classid,
-									},
-								];
+								let params = {
+									ph: item.phone,
+									username: item.name,
+									userpassword: 123456,
+									type: 2,
+									// oid: item.schoolid,
+									oid: _this.$store.state.userInfo.organizeid,
+									tid: _this.$store.state.userInfo.userid,
+									cid: item.classid,
+								};
+
 								_this.ajax
-									.post(_this.$store.state.api + "iStudent", params)
+									.get(_this.$store.state.api + "insertStudent", params)
 									.then((res) => {
 										if (_i == arr.length - 1) {
 											loading.close();
@@ -648,7 +652,7 @@
 			// },
 			deleteStudent(id, state) {
 				state = 0;
-				let params = [{ uid: id, state: state}];
+				let params = [{ uid: id, state: state }];
 				this.$confirm("确定" + "删除" + "此学生吗?", "提示", {
 					confirmButtonText: "确定",
 					cancelButtonText: "取消",

+ 1 - 5
src/components/pages/works.vue

@@ -40,7 +40,7 @@
           ></el-table-column>
           <el-table-column
             prop="uname"
-            label="项目"
+            label="创建人"
             min-width="30"
             align="center"
           ></el-table-column>
@@ -158,10 +158,6 @@ export default {
           console.error(err);
         });
     },
-    searchWork() {
-      this.page = 1;
-      this.getWorks();
-    },
     getProject() {
       this.isLoading = true;
       let params = {

+ 994 - 727
src/components/pages/worksDetail.vue

@@ -1,14 +1,22 @@
 <template>
-  <div class="pb_content">
-    <div class="pb_head">
-      <span>评价管理</span>
-      <!-- <span>备注:教师可以根据课程、班级条件筛选学生并查看该学生信息</span> -->
-    </div>
-    <div class="pb_content_body">
-      <div class="student_head">
-        <div class="student_search">
-          <div>项目筛选</div>
-          <!-- <el-select
+	<div class="pb_content">
+		<div class="pb_head">
+			<span>评价管理</span>
+			<!-- <span>备注:教师可以根据课程、班级条件筛选学生并查看该学生信息</span> -->
+		</div>
+		<div class="pb_content_body">
+			<div class="student_head">
+				<div style="padding: 10px 0px 20px 0;">
+					<el-breadcrumb separator-class="el-icon-arrow-right">
+						<el-breadcrumb-item :to="{ path: '/works' }"
+							>评价管理</el-breadcrumb-item
+						>
+						<el-breadcrumb-item>作业管理</el-breadcrumb-item>
+					</el-breadcrumb>
+				</div>
+				<div class="student_search">
+					<div>项目筛选</div>
+					<!-- <el-select
 						v-model="subject"
 						placeholder="请选择课程"
 						@change="searchWork"
@@ -21,727 +29,986 @@
 							:value="item.id"
 						></el-option>
 					</el-select> -->
-          <el-select
-            v-model="sClass"
-            placeholder="请选择班级"
-            @change="searchWork"
-          >
-            <el-option label="所有班级" value=""></el-option>
-            <el-option
-              v-for="(item, index) in grade"
-              :key="index"
-              :label="item.name"
-              :value="item.id"
-            ></el-option>
-          </el-select>
-        </div>
-      </div>
-      <div class="student_table">
-        <el-table
-          ref="table"
-          :data="tableData"
-          border
-          :height="tableHeight"
-          :fit="true"
-          v-loading="isLoading"
-          style="width: 100%"
-          :header-cell-style="{ background: '#f1f1f1' }"
-          :row-class-name="tableRowClassName"
-          stripe
-        >
-          <el-table-column
-            prop="sName"
-            label="姓名"
-            min-width="15"
-            align="center"
-          ></el-table-column>
-          <el-table-column
-            prop="class"
-            label="班级"
-            min-width="20"
-            align="center"
-          ></el-table-column>
-          <el-table-column
-            prop="course"
-            label="课程"
-            min-width="20"
-            align="center"
-          ></el-table-column>
-          <el-table-column
-            prop="time"
-            label="时间"
-            min-width="15"
-            align="center"
-          ></el-table-column>
-          <el-table-column label="操作" min-width="30">
-            <template slot-scope="scope">
-              <el-button
-                type="primary"
-                size="small"
-                @click="lookWork(scope.row.id)"
-                >查看作业</el-button
-              >
-              <el-button
-                class="de_button"
-                type="primary"
-                size="small"
-                @click="deleteWork(scope.row.id)"
-                >删除</el-button
-              >
-            </template>
-          </el-table-column>
-        </el-table>
-        <el-dialog
-          :visible.sync="dialogVisible"
-          :append-to-body="true"
-          width="700px"
-          :before-close="handleClose"
-          class="add_work"
-        >
-          <div slot="title" class="header-title">
-            <div class="logoImg">
-              <img src="../../assets/logo.png" alt="" />
-            </div>
-            <div class="title_add_student">查看作业</div>
-          </div>
-          <div class="top">
-            <div>{{ this.courseByUser }}</div>
-            <div>{{ this.userName }}</div>
-          </div>
-          <div class="first">
-            <div class="one_top">
-              <div>一、{{ this.courseByUser }} - {{ this.userName }}</div>
-              <el-button>已评分</el-button>
-            </div>
-            <div class="work_Img">
-              <img src="../../assets/workImg.png" alt="" />
-            </div>
-            <div class="work_input">
-              <div>早梅</div>
-            </div>
-            <div class="poetry">
-              一树寒梅白玉条,林村路傍溪桥.唐张谓《早梅》
-            </div>
-          </div>
-          <div class="first">
-            <div class="one_top">
-              <div>一、{{ this.courseByUser }}2 - {{ this.userName }}</div>
-              <el-button class="assess" @click="doingAssess"
-                >进行评分</el-button
-              >
-            </div>
-            <div class="work_Img">
-              <img src="../../assets/workImg.png" alt="" />
-            </div>
-            <div class="work_input">
-              <div>{{ this.answerName }}</div>
-            </div>
-            <div class="poetry">雨荒深院菊,霜倒半池莲.唐杜甫《宿赞公房》</div>
-          </div>
-        </el-dialog>
-        <el-dialog
-          :visible.sync="dialogVisible1"
-          :append-to-body="true"
-          width="700px"
-          :before-close="handleClose"
-          class="add_work"
-        >
-          <div slot="title" class="header-title">
-            <div class="logoImg">
-              <img src="../../assets/logo.png" alt="" />
-            </div>
-            <div class="title_add_student">查看作业</div>
-          </div>
-          <div class="assess_top">
-            <div>{{ this.courseByUser }} - {{ this.userName }}</div>
-          </div>
-          <div class="assess_Img">
-            <img src="../../assets/workImg.png" alt="" />
-          </div>
-          <div class="workName">{{ this.answerName }}</div>
-          <div class="student_Answer">
-            <div class="toux">
-              <img src="../../assets/portal.png" alt="" />
-            </div>
-            <div class="nav">
-              <div class="studentName">{{ this.userName }}</div>
-              <div class="studentAnswer">{{ this.studentAnswer }}</div>
-            </div>
-          </div>
-          <div class="comment">
-            <div class="comment_title">
-              评论<span>({{ this.commentCount }})</span>
-            </div>
-            <div class="other_Answer">
-              <div class="toux">
-                <img src="../../assets/portal.png" alt="" />
-              </div>
-              <div class="nav">
-                <div class="nameAndTime">
-                  <div class="otherName">{{ this.commentName }}</div>
-                  <div class="time">{{ this.commentTime }}</div>
-                </div>
-                <div class="otherAnswer">{{ this.commentAnswer }}</div>
-              </div>
-            </div>
-            <div class="other_Answer">
-              <div class="toux">
-                <img src="../../assets/portal.png" alt="" />
-              </div>
-              <div class="nav">
-                <div class="nameAndTime">
-                  <div class="otherName">{{ this.commentName }}</div>
-                  <div class="time">{{ this.commentTime }}</div>
-                </div>
-                <div class="otherAnswer">{{ this.commentAnswer }}</div>
-              </div>
-            </div>
-          </div>
-          <div class="doingAssess" @click="giveScore">进行评分</div>
-        </el-dialog>
-        <el-dialog
-          :visible.sync="dialogVisible2"
-          :append-to-body="true"
-          width="700px"
-          :before-close="handleClose"
-          class="add_work"
-        >
-          <div slot="title" class="header-title">
-            <div class="logoImg">
-              <img src="../../assets/logo.png" alt="" />
-            </div>
-            <div class="title_add_student">评分</div>
-          </div>
-          <div class="score_top">
-            <div class="userTou">
-              <img src="../../assets/portal.png" alt="" />
-            </div>
-            <div class="score_user_name">{{ this.userName }}</div>
-          </div>
-          <div class="course_top">
-            <div>课程名称</div>
-            <div>{{ this.courseByUser }}</div>
-          </div>
-          <div class="sd_score">
-            <div class="score_box">
-              <span>意识能力</span
-              ><el-rate
-                v-model="rateList.ca"
-                :disabled="rateParams[5] != '' && rateParams[5] != undefined"
-              ></el-rate>
-            </div>
-            <div class="score_box">
-              <span>科学探究能力</span
-              ><el-rate
-                v-model="rateList.sia"
-                :disabled="rateParams[5] != '' && rateParams[5] != undefined"
-              ></el-rate>
-            </div>
-            <div class="score_box">
-              <span>实践创新能力</span
-              ><el-rate
-                v-model="rateList.eta"
-                :disabled="rateParams[5] != '' && rateParams[5] != undefined"
-              ></el-rate>
-            </div>
-            <div class="score_box">
-              <span>学习反思能力</span
-              ><el-rate
-                v-model="rateList.pia"
-                :disabled="rateParams[5] != '' && rateParams[5] != undefined"
-              ></el-rate>
-            </div>
-            <div class="score_box">
-              <span>工程思维能力</span
-              ><el-rate
-                v-model="rateList.lra"
-                :disabled="rateParams[5] != '' && rateParams[5] != undefined"
-              ></el-rate>
-            </div>
-          </div>
-          <div class="moreSay">更多评价</div>
-          <div class="more_say_input">
-            <el-input
-              type="textarea"
-              placeholder="还有要说的吗..."
-              :rows="6"
-              resize="none"
-              v-model="rateList.content"
-              :readonly="rateParams[5] != '' && rateParams[5] != undefined"
-              style="background: #fafafa"
-            ></el-input>
-          </div>
-          <div class="assess_right" @click="right">确认</div>
-        </el-dialog>
-      </div>
-      <div class="student_page">
-        <el-pagination
-          background
-          layout="prev, pager, next"
-          :page-size="10"
-          :total="total"
-          @current-change="handleCurrentChange"
-        >
-        </el-pagination>
-      </div>
-    </div>
-  </div>
+					<el-select
+						v-model="sClass"
+						placeholder="请选择班级"
+						@change="searchWork"
+					>
+						<el-option label="所有班级" value=""></el-option>
+						<el-option
+							v-for="(item, index) in grade"
+							:key="index"
+							:label="item.name"
+							:value="item.id"
+						></el-option>
+					</el-select>
+				</div>
+			</div>
+			<div class="student_table">
+				<el-table
+					ref="table"
+					:data="tableData"
+					border
+					:height="tableHeight"
+					:fit="true"
+					v-loading="isLoading"
+					style="width: 100%"
+					:header-cell-style="{ background: '#f1f1f1' }"
+					:row-class-name="tableRowClassName"
+					stripe
+				>
+					<el-table-column
+						prop="sName"
+						label="姓名"
+						min-width="15"
+						align="center"
+					></el-table-column>
+					<el-table-column
+						prop="class"
+						label="班级"
+						min-width="20"
+						align="center"
+					></el-table-column>
+					<el-table-column
+						prop="course"
+						label="项目"
+						min-width="20"
+						align="center"
+					></el-table-column>
+					<el-table-column
+						prop="time"
+						label="时间"
+						min-width="15"
+						align="center"
+					></el-table-column>
+					<el-table-column label="操作" min-width="30">
+						<template slot-scope="scope">
+							<el-button
+								type="primary"
+								size="small"
+								@click="lookWork(scope.row.id, scope.row.userid)"
+								>查看作业</el-button
+							>
+							<el-button
+								class="de_button"
+								type="primary"
+								size="small"
+								@click="deleteWork(scope.row.id)"
+								>删除</el-button
+							>
+						</template>
+					</el-table-column>
+				</el-table>
+				<el-dialog
+					:visible.sync="dialogVisible"
+					:append-to-body="true"
+					width="700px"
+					:before-close="handleClose"
+					class="add_work"
+				>
+					<div slot="title" class="header-title">
+						<div class="logoImg">
+							<img src="../../assets/logo.png" alt="" />
+						</div>
+						<div class="title_add_student">查看作业</div>
+					</div>
+					<div class="top">
+						<div>{{ sInfo.course }}</div>
+						<div>{{ sInfo.sName }}</div>
+					</div>
+					<div class="first" v-for="(item, index) in chapInfo" :key="index">
+						<div class="one_top">
+							<div>
+								{{ index + 1 }}、{{ item.dyName }} -
+								{{ sInfo.sName }}
+							</div>
+							<el-button
+								@click="doingAssess(index)"
+								:class="
+									item.content != null && item.content != ''
+										? item.rateWrong == 0
+											? ''
+											: 'assess'
+										: 'display'
+								"
+								>{{
+									item.content != null && item.content != ""
+										? item.rateWrong == 0
+											? "已评分"
+											: "进行评分"
+										: ""
+								}}</el-button
+							>
+						</div>
+						<div class="work_Img">
+							<img
+								v-for="(photo, cindex) in item.cover"
+								:key="cindex + '-' + index"
+								:src="photo.url"
+								alt=""
+								@click="handlePictureCardPreview(photo.url)"
+							/>
+						</div>
+						<!-- <div class="work_input">
+							<div>早梅</div>
+						</div> -->
+						<div class="poetry">
+							{{
+								item.content != null && item.content != ""
+									? item.content
+									: "暂无内容"
+							}}
+						</div>
+					</div>
+				</el-dialog>
+				<el-dialog
+					:visible.sync="dialogVisible1"
+					:append-to-body="true"
+					width="700px"
+					:before-close="handleClose"
+					class="add_work"
+				>
+					<div slot="title" class="header-title">
+						<div class="logoImg">
+							<img src="../../assets/logo.png" alt="" />
+						</div>
+						<div class="title_add_student">查看作业</div>
+					</div>
+					<div>
+						<div class="assess_top">
+							<div>
+								{{
+									chapInfo[publicIndex] != null
+										? chapInfo[publicIndex].dyName
+										: "暂无课程"
+								}}
+								- {{ sInfo.sName }}
+							</div>
+						</div>
+						<div class="assess_Img">
+							<!-- <img
+								:src="
+									chapInfo[publicIndex] != null &&
+									chapInfo[publicIndex].upVedio.length > 0
+										? chapInfo[publicIndex].upVedio[0].url
+										: mr
+								"
+								alt=""
+							/> -->
+							<video-player
+								class="video-player vjs-custom-skin"
+								ref="videoPlayer"
+								:playsinline="true"
+								:options="playerO"
+								@play="onPlayerPlay($event)"
+								style="width: 100%; height: 100%"
+							></video-player>
+						</div>
+						<div class="workName">
+							{{
+								chapInfo[publicIndex] != null
+									? chapInfo[publicIndex].dyName
+									: "暂无课程"
+							}}
+						</div>
+						<div class="student_Answer">
+							<div class="toux">
+								<img src="../../assets/portal.png" alt="" />
+							</div>
+							<div class="nav">
+								<div class="studentName">{{ sInfo.sName }}</div>
+								<div class="studentAnswer">
+									{{
+										chapInfo[publicIndex] != null &&
+										chapInfo[publicIndex].content != null &&
+										chapInfo[publicIndex].content != ""
+											? chapInfo[publicIndex].content
+											: "暂无内容"
+									}}
+								</div>
+							</div>
+						</div>
+						<!-- <div class="comment">
+							<div class="comment_title">
+								评论<span>({{ this.commentCount }})</span>
+							</div>
+							<div class="other_Answer">
+								<div class="toux">
+									<img src="../../assets/portal.png" alt="" />
+								</div>
+								<div class="nav">
+									<div class="nameAndTime">
+										<div class="otherName">{{ this.commentName }}</div>
+										<div class="time">{{ this.commentTime }}</div>
+									</div>
+									<div class="otherAnswer">{{ this.commentAnswer }}</div>
+								</div>
+							</div>
+							<div class="other_Answer">
+								<div class="toux">
+									<img src="../../assets/portal.png" alt="" />
+								</div>
+								<div class="nav">
+									<div class="nameAndTime">
+										<div class="otherName">{{ this.commentName }}</div>
+										<div class="time">{{ this.commentTime }}</div>
+									</div>
+									<div class="otherAnswer">{{ this.commentAnswer }}</div>
+								</div>
+							</div>
+						</div> -->
+					</div>
+					<div class="doingAssess" @click="giveScore">进行评分</div>
+				</el-dialog>
+				<el-dialog
+					:visible.sync="dialogVisible2"
+					:append-to-body="true"
+					width="700px"
+					:before-close="handleClose"
+					class="add_work"
+				>
+					<div slot="title" class="header-title">
+						<div class="logoImg">
+							<img src="../../assets/logo.png" alt="" />
+						</div>
+						<div class="title_add_student">
+							{{ uploadBoolean ? "评分" : "修改评分" }}
+						</div>
+					</div>
+					<div class="score_top">
+						<div class="userTou">
+							<img src="../../assets/portal.png" alt="" />
+						</div>
+						<div class="score_user_name">{{ sInfo.sName }}</div>
+					</div>
+					<div class="course_top">
+						<div>课程名称</div>
+						<div>
+							{{
+								chapInfo[publicIndex] != null
+									? chapInfo[publicIndex].dyName
+									: "暂无课程"
+							}}
+						</div>
+					</div>
+					<div class="sd_score">
+						<div class="score_box">
+							<span>意识能力</span
+							><el-rate
+								v-model="rateList.ca"
+								:disabled="rateParams[5] != '' && rateParams[5] != undefined"
+							></el-rate>
+						</div>
+						<div class="score_box">
+							<span>科学探究能力</span
+							><el-rate
+								v-model="rateList.sia"
+								:disabled="rateParams[5] != '' && rateParams[5] != undefined"
+							></el-rate>
+						</div>
+						<div class="score_box">
+							<span>实践创新能力</span
+							><el-rate
+								v-model="rateList.eta"
+								:disabled="rateParams[5] != '' && rateParams[5] != undefined"
+							></el-rate>
+						</div>
+						<div class="score_box">
+							<span>学习反思能力</span
+							><el-rate
+								v-model="rateList.pia"
+								:disabled="rateParams[5] != '' && rateParams[5] != undefined"
+							></el-rate>
+						</div>
+						<div class="score_box">
+							<span>工程思维能力</span
+							><el-rate
+								v-model="rateList.lra"
+								:disabled="rateParams[5] != '' && rateParams[5] != undefined"
+							></el-rate>
+						</div>
+					</div>
+					<div class="moreSay">更多评价</div>
+					<div class="more_say_input">
+						<el-input
+							type="textarea"
+							placeholder="还有要说的吗..."
+							:rows="6"
+							resize="none"
+							v-model="rateList.content"
+							:readonly="rateParams[5] != '' && rateParams[5] != undefined"
+							style="background: #fafafa"
+						></el-input>
+					</div>
+					<div class="assess_right" @click="updateWorks" v-if="!uploadBoolean">
+						确认
+					</div>
+					<div class="assess_right" @click="updateWorks" v-else>修改</div>
+				</el-dialog>
+			</div>
+			<div class="student_page">
+				<el-pagination
+					background
+					layout="prev, pager, next"
+					:page-size="10"
+					:total="total"
+					@current-change="handleCurrentChange"
+				>
+				</el-pagination>
+			</div>
+		</div>
+		<el-dialog :visible.sync="pictureDialog" size="tiny">
+			<img width="100%" :src="dialogImageUrl" alt="" />
+		</el-dialog>
+		
+	</div>
 </template>
 
 <script>
-export default {
-  data() {
-    return {
-      tableHeight: "500px",
-      isLoading: false,
-      formLabelWidth: "100px",
-      dialogVisible: false,
-      dialogVisible1: false,
-      dialogVisible2: false,
-      courseByUser: "诗词中的植物",
-      userName: "林点",
-      answerName: "宿赞公房",
-      studentAnswer: "雨荒深院菊,霜倒半池莲.唐杜甫《宿赞公房》",
-      commentCount: 2,
-      commentName: "谭子松",
-      commentTime: "2021/2/5",
-      commentAnswer:
-        "作为家长我很高兴看到孩子的进步,希望这个进步只是一个开始,在新学期能够继续延续,这样才能不负老师的期望",
-      tableData: [],
-      subject: "",
-      sClass: "",
-      subjectJuri: [],
-      projectJuri: [],
-      grade: [],
-      projectchoose: "",
-      rateList: {
-        ca: 0,
-        sia: 0,
-        eta: 0,
-        pia: 0,
-        lra: 0,
-        content: "",
-      },
-      rateParams: [],
-      page: 1,
-      total: 0,
-    };
-  },
-  mounted() {
-    this.$nextTick(function () {
-      this.tableHeight =
-        window.innerHeight - this.$refs.table.$el.offsetTop - 200;
-      if (this.tableHeight <= 530) {
-        this.tableHeight = 530;
-      }
-      // 监听窗口大小变化
-      let self = this;
-      window.onresize = function () {
-        self.tableHeight =
-          window.innerHeight - self.$refs.table.$el.offsetTop - 200;
-        if (self.tableHeight <= 530) {
-          self.tableHeight = 530;
-        }
-      };
-    });
-  },
-  methods: {
-    tableRowClassName({ row, rowIndex }) {
-      if ((rowIndex + 1) % 2 === 0) {
-        return "even_row";
-      } else {
-        return "";
-      }
-    },
-    handleClose(done) {
-      done();
-    },
-    tableRowClassName({ row, rowIndex }) {
-      if ((rowIndex + 1) % 2 === 0) {
-        return "even_row";
-      } else {
-        return "";
-      }
-    },
-    handleCurrentChange(val) {
-      this.page = val;
-    },
-    lookWork() {
-      this.dialogVisible = true;
-    },
-    doingAssess() {
-      this.dialogVisible1 = true;
-    },
-    giveScore() {
-      this.dialogVisible2 = true;
-    },
-    //获取班级列表
-    getClass() {
-      this.isLoading = true;
-      let params = {
-        cu: "",
-        cn: this.sClass,
-        page: this.page,
-      };
-      this.ajax
-        .get(this.$store.state.api + "selectClass", params)
-        .then((res) => {
-          this.isLoading = false;
-          this.grade = res.data[0];
-        })
-        .catch((err) => {
-          this.isLoading = false;
-          console.error(err);
-        });
-    },
-    //获取分组分类
-    getGroup() {
-      let params = {};
-      this.ajax
-        .get(this.$store.state.api + "getGroup", params)
-        .then((res) => {
-          this.subjectJuri = res.data[0];
-          this.projectJuri = res.data[0];
-        })
-        .catch((err) => {
-          console.error(err);
-        });
-    },
-    searchWork() {
-      this.page = 1;
-      this.getWorks();
-    },
-    searchProject() {
-      this.page = 1;
-      this.getProject();
-    },
-    //获取作业
-    getWorks() {
-      this.isLoading = true;
-      let params = {
-        bid: this.$store.state.userInfo.organizeid,
-        isRate: 1,
-        classx: this.sClass,
-        cid: this.subject,
-        page: this.page,
-      };
-      this.ajax
-        .get(this.$store.state.api + "getWorks", params)
-        .then((res) => {
-          this.isLoading = false;
-          this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
-          this.tableData = res.data[0];
-        })
-        .catch((err) => {
-          this.isLoading = false;
-          console.error(err);
-        });
-    },
-    right() {
-      this.dialogVisible2 = false;
-    },
-  },
-  created() {
-    this.page = 1;
-    this.getClass();
-    this.getGroup();
-    this.getWorks();
-  },
-};
+	export default {
+		data() {
+			return {
+				tableHeight: "500px",
+				isLoading: false,
+				id: this.$route.query.cid,
+				formLabelWidth: "100px",
+				dialogImageUrl: "",
+				pictureDialog: false,
+				dialogVisible: false,
+				dialogVisible1: false,
+				dialogVisible2: false,
+				courseByUser: "诗词中的植物",
+				userName: "林点",
+				answerName: "宿赞公房",
+				studentAnswer: "雨荒深院菊,霜倒半池莲.唐杜甫《宿赞公房》",
+				commentCount: 2,
+				publicIndex: 0,
+				playerOptions: {
+					playbackRates: [0.7, 1.0, 1.5, 2.0], //播放速度
+					autoplay: false, //如果true,浏览器准备好时开始回放。
+					muted: false, // 默认情况下将会消除任何音频。
+					loop: false, // 导致视频一结束就重新开始。
+					preload: "auto", // 建议浏览器在<video>加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持)
+					language: "zh-CN",
+					aspectRatio: "16:9", // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
+					fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
+					sources: [
+						{
+							type: "video/mp4", //这里的种类支持很多种:基本视频格式、直播、流媒体等,具体可以参看git网址项目   || "video/ogg"|| "video/webm"
+							src: "", //url地址require("../../assets/media/aaa.mp4")
+						},
+					],
+					// poster: require("../../assets/tu31.png"), //你的封面地址
+					// poster: dataRes.imgUrl, //你的封面地址
+					notSupportedMessage: "此视频暂无法播放,请稍后再试", //允许覆盖Video.js无法播放媒体源时显示的默认信息。
+					controlBar: {
+						timeDivider: true, //当前时间和持续时间的分隔符
+						durationDisplay: true, //显示持续时间
+						remainingTimeDisplay: false, //是否显示剩余时间功能
+						fullscreenToggle: true, //全屏按钮
+					},
+				},
+				playerO: {},
+				commentName: "谭子松",
+				commentTime: "2021/2/5",
+				commentAnswer:
+					"作为家长我很高兴看到孩子的进步,希望这个进步只是一个开始,在新学期能够继续延续,这样才能不负老师的期望",
+				tableData: [],
+				uploadBoolean: false,
+				studentMessage: [],
+				subject: "",
+				sClass: "",
+				subjectJuri: [],
+				projectJuri: [],
+				grade: [],
+				mr: require("../../assets/icon/wheel.png"),
+				projectchoose: "",
+				scopeId: "",
+				rateList: {
+					ca: 0,
+					sia: 0,
+					eta: 0,
+					pia: 0,
+					lra: 0,
+					content: "",
+				},
+				rateParams: [],
+				page: 1,
+				total: 0,
+				worksDetail: [],
+				suserId: "",
+				sInfo: {},
+				chapInfo: [],
+				vedio: [],
+				file: [],
+			};
+		},
+		mounted() {
+			this.$nextTick(function () {
+				this.tableHeight =
+					window.innerHeight - this.$refs.table.$el.offsetTop - 200;
+				if (this.tableHeight <= 530) {
+					this.tableHeight = 530;
+				}
+				// 监听窗口大小变化
+				let self = this;
+				window.onresize = function () {
+					self.tableHeight =
+						window.innerHeight - self.$refs.table.$el.offsetTop - 200;
+					if (self.tableHeight <= 530) {
+						self.tableHeight = 530;
+					}
+				};
+			});
+		},
+		methods: {
+			tableRowClassName({ row, rowIndex }) {
+				if ((rowIndex + 1) % 2 === 0) {
+					return "even_row";
+				} else {
+					return "";
+				}
+			},
+			handleClose(done) {
+				done();
+			},
+			tableRowClassName({ row, rowIndex }) {
+				if ((rowIndex + 1) % 2 === 0) {
+					return "even_row";
+				} else {
+					return "";
+				}
+			},
+			handleCurrentChange(val) {
+				this.page = val;
+			},
+			lookWork(id, uid) {
+				this.scopeId = id;
+				let params = {
+					uid: uid,
+					cid: this.id,
+				};
+				this.ajax
+					.get(this.$store.state.api + "selectWorksDetail", params)
+					.then((res) => {
+						this.sInfo = res.data[0][0];
+						this.chapInfo = JSON.parse(res.data[0][0].chapters);
+						var worksDetail = res.data[1];
+						this.chapInfo.filter((value, index, array) => {
+							for (var i = 0; i < worksDetail.length; i++) {
+								if (index == worksDetail[i].stage) {
+									var c = JSON.parse(worksDetail[i].content)[0];
+									var d =
+										worksDetail[i].rate != null && worksDetail[i].rate != ""
+											? JSON.parse(worksDetail[i].rate)
+											: { ca: 0, sia: 0, eta: 0, pia: 0, lra: 0, content: "" };
+									var e =
+										worksDetail[i].rate != null && worksDetail[i].rate != ""
+											? 0
+											: 1;
+									value.rateWrong = e;
+									value.content = c.content;
+									value.rate = d;
+									// this.rateList = d;
+									// this.rateList = value.rate;
+									value.cover = c.cover;
+									value.upVedio = c.upVedio;
+									break;
+								}
+							}
+						});
+						// var a = JSON.parse(res.data[0][0].chapters)[this.publicIndex]
+						// 	.chapterInfo[0].chapterData;
+						// var b = [
+						// 	"AVI",
+						// 	"NAVI",
+						// 	"MPEG",
+						// 	"ASF",
+						// 	"MOV",
+						// 	"WMV",
+						// 	"3GP",
+						// 	"RM",
+						// 	"RMVB",
+						// 	"FLV",
+						// 	"F4V",
+						// 	"H.264",
+						// 	"H.265",
+						// 	"REAL VIDEO",
+						// 	"MKV",
+						// 	"WebM",
+						// 	"HDDVD",
+						// 	"MP4",
+						// 	"MPG",
+						// 	"M4V",
+						// 	"MGV",
+						// 	"OGV",
+						// 	"QTM",
+						// 	"STR",
+						// 	"AMC",
+						// 	"DVX",
+						// 	"EVO",
+						// 	"DAT",
+						// 	"OGG",
+						// 	"OGM",
+						// ];
+						// for (var i = 0; i < a.length; i++) {
+						// 	if (
+						// 		b.indexOf(
+						// 			a[i].url
+						// 				.split(".")
+						// 				[a[i].url.split(".").length - 1].toLocaleUpperCase()
+						// 		) != -1
+						// 	) {
+						// 		this.vedio.push(a[i]);
+						// 	} else {
+						// 		this.file.push(a[i]);
+						// 	}
+						// }
+						// element.mediaList = JSON.parse(element.chapters)[0].chapterInfo[t].chapterData;
+						// console.log(this.vedio);
+						// console.log(this.file);
+						// this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
+						this.courseDetail = res.data[0][0];
+						// this.playerOptions.poster = this.course.imgUrl;
+						// this.playerOptions.sources[0].src =
+						// 	this.vedio.length > 0
+						// 		? this.vedio[0].url
+						// 		: require("../../assets/icon/kc1.png");
+						// console.log(this.playerOptions.sources[0].src);
+						// this.playerO = this.playerOptions;
+						this.dialogVisible = true;
+					})
+					.catch((err) => {
+						console.error(err);
+					});
+			},
+			doingAssess(index) {
+				this.publicIndex = index;
+				this.playerOptions.sources[0].src =
+					this.chapInfo[this.publicIndex].upVedio.length > 0
+						? this.chapInfo[this.publicIndex].upVedio[0].url
+						: require("../../assets/icon/kc1.png");
+				console.log(this.playerOptions.sources[0].src);
+				this.playerO = this.playerOptions;
+				this.dialogVisible1 = true;
+			},
+			giveScore() {
+				this.rateList = this.chapInfo[this.publicIndex].rate;
+				this.dialogVisible2 = true;
+			},
+			//获取班级列表
+			getClass() {
+				this.isLoading = true;
+				let params = {
+					oid: this.$store.state.userInfo.organizeid,
+				};
+				this.ajax
+					.get(this.$store.state.api + "selectClassBySchool", params)
+					.then((res) => {
+						this.isLoading = false;
+						this.grade = res.data[0];
+					})
+					.catch((err) => {
+						this.isLoading = false;
+						console.error(err);
+					});
+			},
+			//获取分组分类
+			getGroup() {
+				let params = {};
+				this.ajax
+					.get(this.$store.state.api + "getGroup", params)
+					.then((res) => {
+						this.subjectJuri = res.data[0];
+						this.projectJuri = res.data[0];
+					})
+					.catch((err) => {
+						console.error(err);
+					});
+			},
+			searchWork() {
+				this.page = 1;
+				this.getWorks();
+			},
+			//获取作业
+			getWorks() {
+				this.isLoading = true;
+				var mr = this.mr;
+				let params = {
+					cn: this.sClass,
+					cid: this.id,
+					page: this.page,
+				};
+				this.ajax
+					.get(this.$store.state.api + "getWorks", params)
+					.then((res) => {
+						this.isLoading = false;
+						this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
+						this.tableData = res.data[0];
+					})
+					.catch((err) => {
+						this.isLoading = false;
+						console.error(err);
+					});
+			},
+			getCourseDetail() {
+				const loading = this.$loading.service({
+					background: "rgba(255, 255, 255, 0.7)",
+					target: document.querySelector(".student_table"),
+				});
+				let params = {
+					courseId: this.id,
+				};
+				this.ajax
+					.get(this.$store.state.api + "selectCourseDetail", params)
+					.then((res) => {
+						loading.close();
+						this.chapInfo = JSON.parse(res.data[0][0].chapters);
+						// element.imgUrl = JSON.parse(element.chapters).poster;
+					})
+					.catch((err) => {
+						loading.close();
+						console.error(err);
+					});
+			},
+			handlePictureCardPreview(url) {
+				this.dialogImageUrl = url;
+				this.pictureDialog = true;
+			},
+			updateWorks() {
+				let params = {
+					rate: this.rateList,
+					tuid: this.$store.state.userInfo.userid,
+					id: this.scopeId,
+				};
+				this.ajax
+					.get(this.$store.state.api + "updateWorks", params)
+					.then((res) => {
+						this.$message({
+							message: "评价成功",
+							type: "success",
+						});
+						this.uploadBoolean = false;
+						this.dialogVisible2 = false;
+					})
+					.catch((err) => {
+						this.$message.error("评价失败");
+						console.error(err);
+					});
+			},
+			switchVideo(media, index) {
+				this.playerO = {};
+				this.playerOptions.poster = "";
+				this.playerOptions.sources[0].src = media;
+				this.playerO = this.playerOptions;
+			},
+			onPlayerPlay() {},
+		},
+		created() {
+			this.page = 1;
+			this.getClass();
+			this.getGroup();
+			this.getWorks();
+			// this.getCourseDetail();
+		},
+	};
 </script>
 
 <style scoped>
-.pb_head > span:nth-child(2) {
-  font-size: 16px;
-  margin-left: 80px;
-  color: #ab582f;
-}
-.student_head {
-  margin-bottom: 20px;
-}
-.student_search {
-  display: flex;
-}
-.student_search > div:nth-child(1) {
-  line-height: 35px;
-  font-size: 14px;
-}
-.student_search >>> .el-input__inner {
-  width: 190px;
-  height: 35px;
-  margin-left: 10px;
-}
-.student_table >>> .el-table--border td {
-  border-right: 0px !important;
-}
-.add_work >>> .el-dialog__header {
-  padding: 20px 20px 10px;
-  text-align: center;
-  background: #32455b;
-}
-.add_work >>> .el-dialog__title {
-  font-size: 14px !important;
-  color: #fff !important;
-}
-.add_work >>> .el-dialog__headerbtn {
-  font-size: 20px !important;
-}
-.add_work >>> .el-form-item__label {
-  margin-left: 65px;
-}
-.add_work >>> .el-form-item {
-  display: flex;
-}
-.add_work >>> .el-form-item__content {
-  margin: 0 !important;
-}
-.add_work >>> .el-dialog__footer {
-  text-align: center !important;
-}
-.header-title {
-  display: flex;
-}
-.logoImg {
-  width: 30px;
-}
-.logoImg > img {
-  width: 100%;
-  height: 100%;
-}
-.title_add_student {
-  margin: 0 auto;
-  color: #fff;
-}
-.top {
-  display: flex;
-  justify-content: space-between;
-  padding-bottom: 10px;
-  border-bottom: 2px solid #eee;
-}
-.top > div:nth-child(1) {
-  font-size: 18px;
-}
-.top > div:nth-child(2) {
-  font-size: 14px;
-  line-height: 28px;
-}
-.first {
-  margin-top: 25px;
-  border-bottom: 1px solid #c5c5c5;
-}
-.one_top {
-  display: flex;
-  justify-content: space-between;
-}
-.one_top > div:nth-child(1) {
-  color: #2490bf;
-  font-size: 16px;
-}
-.one_top > button {
-  width: 100px;
-  background: #24a0a4;
-  height: 30px;
-  color: #e0e0e0;
-  font-size: 13px;
-  padding: 0 !important;
-}
-.work_Img {
-  width: 150px;
-  margin: 10px 0;
-}
-.assess_Img {
-  width: 400px;
-  margin: 0 auto;
-  padding: 15px 0;
-}
-.work_Img > img,
-.assess_Img > img {
-  width: 100%;
-  height: 100%;
-}
-.work_input {
-  border: 1px solid;
-  width: 135px;
-  height: 20px;
-  line-height: 20px;
-  font-size: 13px;
-  padding: 5px;
-}
-.poetry {
-  margin: 10px 0 15px 0;
-}
-.assess {
-  background: #169bd5 !important;
-}
-.assess_top {
-  border-bottom: 2px solid #eee;
-  padding-bottom: 10px;
-}
-.assess_top > div:nth-child(1) {
-  color: #2490bf;
-  font-size: 16px;
-}
-.student_Answer {
-  display: flex;
-  margin: 5px 10px;
-  border-bottom: 1px solid #ccc;
-  padding-bottom: 25px;
-}
-.workName {
-  font-size: 18px;
-  font-weight: bold;
-  margin: 5px 10px;
-}
-.toux {
-  width: 25px;
-  margin: auto 0;
-  height: 25px;
-}
-.toux > img {
-  width: 100%;
-  height: 100%;
-}
-.nav {
-  display: flex;
-  flex-wrap: wrap;
-  margin-top: 10px;
-  flex-direction: column;
-}
-.studentName {
-  margin-left: 10px;
-  font-size: 13px;
-}
-.studentAnswer {
-  font-size: 12px;
-  margin: 5px 0 0 10px;
-}
-.comment {
-  margin: 20px 0 0 10px;
-}
-.comment > .comment_title {
-  font-size: 18px;
-}
-.comment > .comment_title > span {
-  font-size: 14px;
-}
-.other_Answer {
-  display: flex;
-  margin: 5px 10px;
-  border-bottom: 1px solid #ccc;
-  padding-bottom: 15px;
-}
-.nav {
-  margin-left: 5px;
-}
-.nameAndTime {
-  display: flex;
-}
-.otherName {
-  font-weight: bold;
-  margin-left: 10px;
-  font-size: 13px;
-}
-.time {
-  margin-left: 25px;
-  font-size: 12px;
-  margin-top: 3px;
-}
-.otherAnswer {
-  width: 400px;
-  word-wrap: break-word;
-  word-break: break-all;
-  overflow: hidden;
-  font-size: 12px;
-  margin: 5px 0 0 10px;
-}
-.doingAssess {
-  margin: 0 auto;
-  width: 300px;
-  background: #169bd5;
-  height: 35px;
-  line-height: 35px;
-  border-radius: 3px;
-  font-size: 13px;
-  text-align: center;
-  color: #fff;
-  margin-top: 30px;
-  cursor: pointer;
-}
-.score_top {
-  display: flex;
-  margin-left: 15px;
-}
-.userTou {
-  width: 50px;
-}
-.userTou > img {
-  width: 100%;
-  height: 100%;
-}
-.score_user_name {
-  line-height: 53px;
-  margin-left: 15px;
-}
-.course_top {
-  display: flex;
-  margin: 30px 0 0 20px;
-}
-.course_top > div:nth-child(1) {
-  line-height: 25px;
-}
-.course_top > div:nth-child(2) {
-  border: 1px solid #ccc;
-  width: 250px;
-  text-align: center;
-  height: 25px;
-  line-height: 25px;
-  margin-left: 30px;
-}
-.sd_score {
-  font-size: 15px;
-  background: #fff;
-  padding: 18px 25px 1px;
-  width: 310px;
-  margin-bottom: 15px;
-}
-.sd_score .score_box {
-  display: flex;
-  align-items: center;
-  margin-bottom: 18px;
-}
-.sd_score span {
-  width: 100px;
-  text-align: justify;
-  text-align-last: justify;
-  display: block;
-  margin-right: 20px;
-}
-.moreSay {
-  margin: 0px 0 5px 20px;
-}
-.more_say_input {
-  margin-left: 20px;
-  width: 90%;
-}
-.more_say_input >>> .el-input__inner {
-  height: 75px;
-  font-size: 13px;
-  padding: 0 0 0 10px;
-}
-.assess_right {
-  width: 200px;
-  background: #666666;
-  color: #fff;
-  text-align: center;
-  height: 25px;
-  line-height: 25px;
-  border-radius: 5px;
-  margin: 0 auto;
-  margin-top: 20px;
-  font-size: 13px;
-  cursor: pointer;
-}
-.student_page {
-  margin-top: 10px;
-}
+	.pb_head > span:nth-child(2) {
+		font-size: 16px;
+		margin-left: 80px;
+		color: #ab582f;
+	}
+	.student_head {
+		margin-bottom: 20px;
+	}
+	.student_search {
+		display: flex;
+	}
+	.student_search > div:nth-child(1) {
+		line-height: 35px;
+		font-size: 14px;
+	}
+	.student_search >>> .el-input__inner {
+		width: 190px;
+		height: 35px;
+		margin-left: 10px;
+	}
+	.student_table >>> .el-table--border td {
+		border-right: 0px !important;
+	}
+	.add_work >>> .el-dialog__header {
+		padding: 20px 20px 10px;
+		text-align: center;
+		background: #32455b;
+	}
+	.add_work >>> .el-dialog__title {
+		font-size: 14px !important;
+		color: #fff !important;
+	}
+	.add_work >>> .el-dialog__headerbtn {
+		font-size: 20px !important;
+	}
+	.add_work >>> .el-form-item__label {
+		margin-left: 65px;
+	}
+	.add_work >>> .el-form-item {
+		display: flex;
+	}
+	.add_work >>> .el-form-item__content {
+		margin: 0 !important;
+	}
+	.add_work >>> .el-dialog__footer {
+		text-align: center !important;
+	}
+	.header-title {
+		display: flex;
+	}
+	.logoImg {
+		width: 30px;
+	}
+	.logoImg > img {
+		width: 100%;
+		height: 100%;
+	}
+	.title_add_student {
+		margin: 0 auto;
+		color: #fff;
+	}
+	.top {
+		display: flex;
+		justify-content: space-between;
+		padding-bottom: 10px;
+		border-bottom: 2px solid #eee;
+	}
+	.top > div:nth-child(1) {
+		font-size: 18px;
+	}
+	.top > div:nth-child(2) {
+		font-size: 14px;
+		line-height: 28px;
+	}
+	.first {
+		margin-top: 25px;
+		border-bottom: 1px solid #c5c5c5;
+	}
+	.one_top {
+		display: flex;
+		justify-content: space-between;
+	}
+	.one_top > div:nth-child(1) {
+		color: #2490bf;
+		font-size: 16px;
+	}
+	.one_top > button {
+		width: 100px;
+		background: #24a0a4;
+		height: 30px;
+		color: #e0e0e0;
+		font-size: 13px;
+		padding: 0 !important;
+	}
+	.work_Img {
+		width: 150px;
+		margin: 10px 0;
+	}
+	.assess_Img {
+		width: 400px;
+		margin: 0 auto;
+		padding: 15px 0;
+	}
+	.work_Img > img,
+	.assess_Img > img {
+		width: 100%;
+		height: 100%;
+	}
+	.work_input {
+		border: 1px solid;
+		width: 135px;
+		height: 20px;
+		line-height: 20px;
+		font-size: 13px;
+		padding: 5px;
+	}
+	.poetry {
+		margin: 10px 0 15px 0;
+	}
+	.assess {
+		background: #169bd5 !important;
+	}
+	.assess_top {
+		border-bottom: 2px solid #eee;
+		padding-bottom: 10px;
+	}
+	.assess_top > div:nth-child(1) {
+		color: #2490bf;
+		font-size: 16px;
+	}
+	.student_Answer {
+		display: flex;
+		margin: 5px 10px;
+		border-bottom: 1px solid #eee;
+		padding-bottom: 25px;
+	}
+	.workName {
+		font-size: 18px;
+		font-weight: bold;
+		margin: 5px 10px;
+	}
+	.toux {
+		width: 25px;
+		margin: auto 0;
+		height: 25px;
+	}
+	.toux > img {
+		width: 100%;
+		height: 100%;
+	}
+	.nav {
+		display: flex;
+		flex-wrap: wrap;
+		margin-top: 10px;
+		flex-direction: column;
+	}
+	.studentName {
+		margin-left: 10px;
+		font-size: 13px;
+	}
+	.studentAnswer {
+		font-size: 12px;
+		margin: 5px 0 0 10px;
+	}
+	.comment {
+		margin: 20px 0 0 10px;
+	}
+	.comment > .comment_title {
+		font-size: 18px;
+	}
+	.comment > .comment_title > span {
+		font-size: 14px;
+	}
+	.other_Answer {
+		display: flex;
+		margin: 5px 10px;
+		border-bottom: 1px solid #ccc;
+		padding-bottom: 15px;
+	}
+	.nav {
+		margin-left: 5px;
+	}
+	.nameAndTime {
+		display: flex;
+	}
+	.otherName {
+		font-weight: bold;
+		margin-left: 10px;
+		font-size: 13px;
+	}
+	.time {
+		margin-left: 25px;
+		font-size: 12px;
+		margin-top: 3px;
+	}
+	.otherAnswer {
+		width: 400px;
+		word-wrap: break-word;
+		word-break: break-all;
+		overflow: hidden;
+		font-size: 12px;
+		margin: 5px 0 0 10px;
+	}
+	.doingAssess {
+		margin: 0 auto;
+		width: 300px;
+		background: #169bd5;
+		height: 35px;
+		line-height: 35px;
+		border-radius: 3px;
+		font-size: 13px;
+		text-align: center;
+		color: #fff;
+		margin-top: 30px;
+		cursor: pointer;
+	}
+	.score_top {
+		display: flex;
+		margin-left: 15px;
+	}
+	.userTou {
+		width: 50px;
+	}
+	.userTou > img {
+		width: 100%;
+		height: 100%;
+	}
+	.score_user_name {
+		line-height: 53px;
+		margin-left: 15px;
+	}
+	.course_top {
+		display: flex;
+		margin: 30px 0 0 20px;
+	}
+	.course_top > div:nth-child(1) {
+		line-height: 25px;
+	}
+	.course_top > div:nth-child(2) {
+		border: 1px solid #ccc;
+		width: 250px;
+		text-align: center;
+		height: 25px;
+		line-height: 25px;
+		margin-left: 30px;
+	}
+	.sd_score {
+		font-size: 15px;
+		background: #fff;
+		padding: 18px 25px 1px;
+		width: 310px;
+		margin-bottom: 15px;
+	}
+	.sd_score .score_box {
+		display: flex;
+		align-items: center;
+		margin-bottom: 18px;
+	}
+	.sd_score span {
+		width: 100px;
+		text-align: justify;
+		text-align-last: justify;
+		display: block;
+		margin-right: 20px;
+	}
+	.moreSay {
+		margin: 0px 0 5px 20px;
+	}
+	.more_say_input {
+		margin-left: 20px;
+		width: 90%;
+	}
+	.more_say_input >>> .el-input__inner {
+		height: 75px;
+		font-size: 13px;
+		padding: 0 0 0 10px;
+	}
+	.assess_right {
+		width: 200px;
+		background: #666666;
+		color: #fff;
+		text-align: center;
+		height: 25px;
+		line-height: 25px;
+		border-radius: 5px;
+		margin: 0 auto;
+		margin-top: 20px;
+		font-size: 13px;
+		cursor: pointer;
+	}
+	.student_page {
+		margin-top: 10px;
+	}
+	.display {
+		display: none;
+	}
 </style>

+ 2 - 2
src/config/config.js

@@ -9,8 +9,8 @@ const store = new Vuex.Store({
         luyou:1,
         userInfo: {},
         nCount:0,
-        // api: 'https://pbl.cocorobo.cn/api/pbl/',
-        api: 'http://localhost:7003/pbl/',
+        api: 'https://pbl.cocorobo.cn/api/pbl/',
+        // api: 'http://localhost:7003/pbl/',
     },
 
     mutations: {