zengyicheng 3 سال پیش
والد
کامیت
5291871b83

+ 1 - 1
src/App.vue

@@ -23,7 +23,7 @@
         </div>
       </div> -->
 		<!-- </div> -->
-		<div style="height: calc(100% - 67.5px)">
+		<div>
 			<!-- main 内容 -->
 			<keep-alive v-if="$route.meta.keepAlive">
 				<!-- 这里是会被缓存的视图组件 -->

BIN
src/assets/email.png


BIN
src/assets/icon/first.png


BIN
src/assets/icon/firstNo.png


BIN
src/assets/icon/four.png


BIN
src/assets/icon/fourNo.png


BIN
src/assets/icon/second.png


BIN
src/assets/icon/secondNo.png


BIN
src/assets/icon/third.png


BIN
src/assets/icon/thirdNo.png


BIN
src/assets/zy.png


+ 296 - 84
src/components/pages/addCourse.vue

@@ -8,7 +8,7 @@
 				<div class="write_people">陈伟涛、琳珠正在协同本课程..</div>
 				<div class="end_write">结束协同</div>
 			</div> -->
-      <div class="left">
+      <!-- <div class="left">
         <div class="tips">请跟随下面的步骤,逐步上传你的课程或房间內容:</div>
         <div class="info_steps">
           <span class="" :class="steps > 0 ? 'steps_active' : ''"
@@ -33,11 +33,48 @@
             >{{ this.steps > 3 ? "√" : "4" }} </span
           ><span>上传成功</span>
         </div>
-      </div>
+      </div> -->
       <div class="right">
+        <h3 class="info_title" v-if="steps == 1">项目内容填写</h3>
+        <h3 class="info_title" v-if="steps == 2">请选择文档模板</h3>
+        <h3 class="info_title" v-if="steps == 3">项目内容填写</h3>
+
+        <div class="stepBg">
+          <div v-if="steps == 1" class="first">
+            <div><img src="../../assets/icon/first.png" alt="" /></div>
+            <div>填写基本信息</div>
+          </div>
+          <div v-else class="firstNo">
+            <div><img src="../../assets/icon/firstNo.png" alt="" /></div>
+            <div>填写基本信息</div>
+          </div>
+          <div v-if="steps == 2" class="second">
+            <div><img src="../../assets/icon/second.png" alt="" /></div>
+            <div>选择文档模板</div>
+          </div>
+          <div v-else class="secondNo">
+            <div><img src="../../assets/icon/secondNo.png" alt="" /></div>
+            <div>选择文档模板</div>
+          </div>
+          <div v-if="steps == 3" class="third">
+            <div><img src="../../assets/icon/third.png" alt="" /></div>
+            <div>上传课程内容</div>
+          </div>
+          <div v-else class="thirdNo">
+            <div><img src="../../assets/icon/thirdNo.png" alt="" /></div>
+            <div>上传课程内容</div>
+          </div>
+          <div v-if="steps == 4" class="four">
+            <div><img src="../../assets/icon/four.png" alt="" /></div>
+            <div>上传完成</div>
+          </div>
+          <div v-else class="fourNo">
+            <div><img src="../../assets/icon/fourNo.png" alt="" /></div>
+            <div>上传完成</div>
+          </div>
+        </div>
         <div v-if="this.steps == 1">
           <div class="basic_box">
-            <h3 class="info_title">项目内容填写</h3>
             <div class="big_box">
               <div class="left_first">
                 <div>
@@ -47,7 +84,7 @@
                   <div>
                     <input
                       type="text"
-                      placeholder="项目名称"
+                      placeholder="请输入项目名称"
                       class="binfo_input"
                       v-model="courseName"
                     />
@@ -59,8 +96,8 @@
                   </div>
                   <div>
                     <textarea
-                      rows="4"
-                      placeholder="简要描述"
+                      rows="8"
+                      placeholder="请输入项目介绍"
                       class="binfo_input"
                       cols=""
                       v-model="courseText"
@@ -79,9 +116,20 @@
                   <div style="flex: 0.5 1 0%; margin: 0 20px 0 0">
                     <div class="bInfo_title">
                       课程封面
-                      <div class="chapter_beizhu">PNG,GIF,JPEG</div>
+                      <!-- <div class="chapter_beizhu">PNG,GIF,JPEG</div> -->
                     </div>
-                    <div class="chapter_uploadBox1">
+                    <el-upload
+                      action="https://jsonplaceholder.typicode.com/posts/"
+                      list-type="picture-card"
+                      :on-preview="handlePictureCardPreview"
+                      class="uploadWidth"
+                    >
+                      <i
+                        class="el-icon-plus"
+                        style="position: absolute; top: 15px; left: 15px"
+                      ></i>
+                    </el-upload>
+                    <!-- <div class="chapter_uploadBox1">
                       <div
                         class="chapter_add"
                         v-if="cover.length == 0"
@@ -123,13 +171,14 @@
                           </div>
                         </div>
                       </div>
-                    </div>
+                    </div> -->
                   </div>
                   <div style="flex: 0.5 1 0%; margin-top: 30px">
                     <div class="bInfo_title">
                       <span style="color: red">*</span>选择项目成员
                     </div>
-                    <div class="people">
+                    <div class="addPeople">点击添加成员</div>
+                    <!-- <div class="people">
                       <div class="people_top">
                         <div class="people_nav">选择成员</div>
                         <div class="people_top_right">
@@ -157,6 +206,12 @@
                           }}</el-checkbox
                         >
                       </el-checkbox-group>
+                    </div> -->
+                  </div>
+                  <div style="flex: 0.5 1 0%; margin-top: 30px">
+                    <div class="bInfo_title">协同编辑</div>
+                    <div class="addPeople" style="background: #6b92c9">
+                      添加协同编辑
                     </div>
                   </div>
                 </div>
@@ -167,7 +222,6 @@
         </div>
         <div v-if="this.steps == 2">
           <div class="basic_box">
-            <h3 class="info_title">请选择文档模板</h3>
             <div class="wordbox">
               <div
                 class="wordTeacher"
@@ -288,7 +342,6 @@
             <div class="chapter_btn_w">新增阶段</div>
           </div> -->
           <div class="basic_box">
-            <h3 class="info_title">项目内容填写</h3>
             <div class="big_box">
               <div class="left_first">
                 <div>
@@ -330,9 +383,26 @@
                   <div style="flex: 0.5 1 0%; margin: 0 20px 0 0">
                     <div class="bInfo_title">
                       课程封面
-                      <div class="chapter_beizhu">PNG,GIF,JPEG</div>
+                      <!-- <div class="chapter_beizhu">PNG,GIF,JPEG</div> -->
                     </div>
-                    <div class="chapter_uploadBox1">
+                    <div style="display: flex; justify-content: flex-start">
+                      <el-upload
+                        action="https://jsonplaceholder.typicode.com/posts/"
+                        list-type="picture-card"
+                        :on-preview="handlePictureCardPreview"
+                        class="uploadWidth"
+                      >
+                        <i
+                          class="el-icon-plus"
+                          style="position: absolute; top: 15px; left: 15px"
+                        ></i>
+                      </el-upload>
+                      <div class="kcImg">
+                        <img src="../../assets/kc1.png" alt="" />
+                      </div>
+                    </div>
+
+                    <!-- <div class="chapter_uploadBox1">
                       <div
                         class="chapter_add"
                         v-if="cover.length == 0"
@@ -374,13 +444,14 @@
                           </div>
                         </div>
                       </div>
-                    </div>
+                    </div> -->
                   </div>
                   <div style="flex: 0.5 1 0%; margin-top: 30px">
                     <div class="bInfo_title">
                       <span style="color: red">*</span>选择项目成员
                     </div>
-                    <div class="people">
+                    <div class="addPeople">已添加 点击查看</div>
+                    <!-- <div class="people">
                       <div class="people_top">
                         <div class="people_nav">选择成员</div>
                         <div class="people_top_right">
@@ -408,6 +479,15 @@
                           }}</el-checkbox
                         >
                       </el-checkbox-group>
+                    </div> -->
+                  </div>
+                  <div style="flex: 0.5 1 0%; margin-top: 30px">
+                    <div class="bInfo_title">协同编辑</div>
+                    <div class="addPeople" style="background: #6b92c9">
+                      结束协同
+                    </div>
+                    <div style="font-size: 15px; margin-top: 5px">
+                      陈伟涛、琳珠正在协同编辑本课程.
                     </div>
                   </div>
                 </div>
@@ -453,34 +533,34 @@
                     @click="deleteUnit(unitIndex)"
                   ></div>
                 </div>
-                <!-- <div class="time">
-									<div class="small_title">
-										开始时间<span style="color: red">*</span>
-									</div>
-									<el-date-picker
-										v-model="unitJson[unitIndex].startTime"
-										type="date"
-										placeholder="选择日期"
-										style="margin-left: 5px"
-									>
-									</el-date-picker>
-									<div class="small_title" style="margin-left: 40px">
-										结束时间<span style="color: red">*</span>
-									</div>
-									<el-date-picker
-										v-model="unitJson[unitIndex].endTime"
-										type="date"
-										placeholder="选择日期"
-										style="margin-left: 5px"
-									>
-									</el-date-picker>
-									<el-switch
-										v-model="unitJson[unitIndex].isTalk"
-										active-text="是否开启评价"
-										style="margin: 10px 0px 0px 30px"
-									>
-									</el-switch>
-								</div> -->
+                <div class="time">
+                  <div class="small_title">
+                    开始时间<span style="color: red">*</span>
+                  </div>
+                  <el-date-picker
+                    v-model="unitJson[unitIndex].startTime"
+                    type="date"
+                    placeholder="选择日期"
+                    style="margin-left: 5px"
+                  >
+                  </el-date-picker>
+                  <div class="small_title" style="margin-left: 40px">
+                    结束时间<span style="color: red">*</span>
+                  </div>
+                  <el-date-picker
+                    v-model="unitJson[unitIndex].endTime"
+                    type="date"
+                    placeholder="选择日期"
+                    style="margin-left: 5px"
+                  >
+                  </el-date-picker>
+                </div>
+                <el-switch
+                  v-model="unitJson[unitIndex].isTalk"
+                  active-text="是否开启评价"
+                  style="margin: 25px 0px 0px 0"
+                >
+                </el-switch>
               </div>
               <div class="line"></div>
               <!-- <div
@@ -540,7 +620,7 @@
                 class="basic_box"
                 style="margin: 45px 0 0 15px; min-height: 0"
               >
-                <h3 class="info_title">附件添加</h3>
+                <h3 class="info_title" style="margin: 0">附件添加</h3>
                 <div class="add_info_box">
                   <button class="info_btn" @click="addImg($event)">
                     添加视频
@@ -692,9 +772,33 @@
                 class="basic_box"
                 style="margin: 45px 0 0 15px; min-height: 0"
               >
-                <h3 class="info_title">作业设置</h3>
+                <h3 class="info_title" style="margin: 0">作业设置</h3>
                 <div class="homework_box">
-                  <div
+                  <div style="display: flex; justify-content: flex-start">
+                    <el-upload
+                      action="https://jsonplaceholder.typicode.com/posts/"
+                      list-type="picture-card"
+                      :on-preview="handlePictureCardPreview"
+                      class="uploadWidth"
+                    >
+                      <i
+                        class="el-icon-plus"
+                        style="position: absolute; top: 15px; left: 15px"
+                      ></i>
+                    </el-upload>
+                    <div class="zyBox">
+                      <div class="deleteZy">
+                        <img src="../../assets/icon/delete.png" alt="" />
+                      </div>
+                      <div class="zyImg">
+                        <img src="../../assets/zy.png" alt="" />
+                      </div>
+                      <div style="width: 110px; font-size: 15px">
+                        风车智能舵机作业视频
+                      </div>
+                    </div>
+                  </div>
+                  <!-- <div
                     class="course_homework"
                     v-for="(item2, index) in item.itemCount"
                     :key="index"
@@ -708,7 +812,7 @@
                       placeholder="请输入作业名称"
                       v-model="item.homeworkList[index].name"
                     ></el-input>
-                  </div>
+                  </div> -->
                   <!-- <div>
                     <el-button
                       size="small"
@@ -738,15 +842,19 @@
             <div>您的课程编号</div>
             <div class="number">{{ number }}</div>
             <div class="success_button">
-              <div class="look_course">预览课程</div>
+              <div class="look_course">邀请老师协同编辑</div>
               <div class="attend_others" @click="dialogVisible = true">
-                邀请老师协同编辑
+                预览课程
               </div>
             </div>
           </div>
         </div>
         <div class="info_btnBox">
-          <button class="info_btn" v-if="steps == 1" @click="goTo('/course?userid='+ userid + '&oid=' + oid)">
+          <button
+            class="info_btn"
+            v-if="steps == 1"
+            @click="goTo('/course?userid=' + userid + '&oid=' + oid)"
+          >
             返回课程
           </button>
           <button
@@ -853,7 +961,7 @@ export default {
       dialogVisible2: false,
       searchPeople: "",
       userid: this.$route.query.userid,
-      oid:this.$route.query.oid,
+      oid: this.$route.query.oid,
       cover: [], //课程封面
       unitJson: [
         {
@@ -939,36 +1047,36 @@ export default {
       }
     },
     nextSteps() {
-      if (this.steps == 1) {
-        if (
-          this.courseName != "" &&
-          this.courseText != "" &&
-          this.checkboxList.length != 0
-        ) {
-          this.steps++;
-        } else {
-          this.$message.error("请将信息填写完整");
-        }
-      } else if (this.steps == 2) {
-        // if (
-        // 	this.unitJson[this.unitIndex].dyName != ""
-        // 	// this.unitJson[this.unitIndex].startTime != "" &&
-        // 	// this.unitJson[this.unitIndex].endTime != ""
-        // ) {
-        // 	this.steps++;
-        // } else {
-        // 	this.$message.error("请将信息填写完整");
-        // }
-        if (this.templateC.id == "" || this.templateC.id == undefined) {
-          this.$message.error("请选择文档");
-          return;
-        }
-        this.dialogVisible2 = true;
-      } else if (this.steps == 3) {
-        this.addWork();
-        this.steps++;
-      }
+      // if (this.steps == 1) {
+      //   if (
+      //     this.courseName != "" &&
+      //     this.courseText != "" &&
+      //     this.checkboxList.length != 0
+      //   ) {
+      //     this.steps++;
+      //   } else {
+      //     this.$message.error("请将信息填写完整");
+      //   }
+      // } else if (this.steps == 2) {
+      //   // if (
+      //   // 	this.unitJson[this.unitIndex].dyName != ""
+      //   // 	// this.unitJson[this.unitIndex].startTime != "" &&
+      //   // 	// this.unitJson[this.unitIndex].endTime != ""
+      //   // ) {
+      //   // 	this.steps++;
+      //   // } else {
+      //   // 	this.$message.error("请将信息填写完整");
+      //   // }
+      //   if (this.templateC.id == "" || this.templateC.id == undefined) {
+      //     this.$message.error("请选择文档");
+      //     return;
+      //   }
+      //   this.dialogVisible2 = true;
+      // } else if (this.steps == 3) {
+      //   this.addWork();
       //   this.steps++;
+      // }
+      this.steps++;
     },
     unitSet(i) {
       this.unitIndex = i;
@@ -1486,11 +1594,10 @@ export default {
 .pb_content {
   background: #fff;
   height: 100%;
+  margin: 20px 20px 20px 20px;
 }
 
 .pb_content_body {
-  display: flex;
-  margin: 0 auto !important;
   width: 100% !important;
   height: 100%;
 }
@@ -1530,7 +1637,7 @@ export default {
 
 .right {
   height: 100%;
-  width: calc(100% - 385px);
+  width: 100%;
   overflow: auto;
 }
 
@@ -1550,6 +1657,7 @@ export default {
 }
 .info_title {
   font-size: 1.5em;
+  margin: 30px 50px;
 }
 
 .bInfo_title {
@@ -2252,4 +2360,108 @@ ol {
 .checkword img {
   width: 100%;
 }
+
+.stepBg {
+  height: 90px;
+  background: #e7e7e7;
+  width: 80%;
+  border-radius: 10px;
+  margin: 20px auto;
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-start;
+  align-items: center;
+}
+
+.stepBg > div {
+  width: 25%;
+}
+
+.first,
+.second,
+.third,
+.four {
+  background: #4a83d0;
+  height: 90px;
+  color: #fff;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+}
+
+.first {
+  border-radius: 10px 0 0 10px !important;
+}
+
+.four {
+  border-radius: 0 10px 10px 0 !important;
+}
+
+.firstNo,
+.secondNo,
+.thirdNo,
+.fourNo {
+  background: #e7e7e7;
+  height: 90px;
+  color: #adadad;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+}
+
+.uploadWidth >>> .el-upload {
+  width: 60px;
+  height: 60px;
+  position: relative;
+}
+
+.addPeople {
+  background: #fa6060;
+  width: 135px;
+  height: 40px;
+  color: #fff;
+  border-radius: 5px;
+  text-align: center;
+  line-height: 40px;
+  font-size: 15px;
+}
+
+.kcImg {
+  width: 60px;
+  margin-left: 10px;
+}
+
+.zyImg {
+  width: 55px;
+  margin: 0 10px;
+}
+
+.deleteZy {
+  width: 20px;
+  position: absolute;
+  top: 5px;
+  right: 5px;
+}
+
+.kcImg > img,
+.zyImg > img,
+.deleteZy > img {
+  width: 100%;
+  height: 100%;
+}
+
+.zyBox {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  background: #67d37d;
+  color: #fff;
+  width: 210px;
+  margin-left: 20px;
+  border-radius: 10px;
+  height: 70px;
+  position: relative;
+}
 </style>

+ 318 - 302
src/components/pages/class.vue

@@ -1,311 +1,327 @@
 <template>
-	<div class="pb_content">
-		<div class="pb_head">
-			<span>班级管理</span>
-		</div>
-		<div class="pb_content_body">
-			<div class="student_head">
-				<div class="student_search">
-					<span>
-						<el-input
-							placeholder="请输入班级名称"
-							v-model="sClassName"
-							clearable
-						>
-						</el-input>
-					</span>
-					<el-button type="primary" @click="searchClass">查询</el-button>
-				</div>
-				<div class="student_button">
-					<el-button type="primary" @click="dialogVisible = true"
-						>添加班级</el-button
-					>
-				</div>
-			</div>
-			<div class="student_table">
-				<el-table
-					ref="table"
-					:data="tableData"
-					border
-					:height="tableHeight"
-					:fit="true"
-					v-loading="isLoading"
-					style="width: 100%; height: 60%"
-					:header-cell-style="{ background: '#f1f1f1' }"
-					:row-class-name="tableRowClassName"
-				>
-					<el-table-column
-						prop="name"
-						label="班级名称"
-						min-width="80%"
-						align="center"
-					>
-					</el-table-column>
-					<el-table-column label="操作" min-width="20%">
-						<template slot-scope="scope">
-							<el-button
-								type="primary"
-								size="small"
-								@click="deleteClass(scope.row.id)"
-								>删除</el-button
-							>
-						</template>
-					</el-table-column>
-				</el-table>
-			</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
-			title="添加学生"
-			:visible.sync="dialogVisible"
-			:append-to-body="true"
-			width="25%"
-			:before-close="handleClose"
-			class="dialog_diy"
-		>
-			<el-form>
-				<el-form-item label="班级名称" :label-width="formLabelWidth">
-					<el-input
-						v-model="className"
-						auto-complete="off"
-						placeholder="请输入班级..."
-					></el-input>
-				</el-form-item>
-			</el-form>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="dialogVisible = false">取 消</el-button>
-				<el-button type="primary" @click="insertClass">确 定</el-button>
-			</span>
-		</el-dialog>
-	</div>
+  <div class="pb_content">
+    <div class="pb_head top">
+      <span>班级管理</span>
+      <div class="student_button">
+        <el-button type="primary" class="bgColor" @click="dialogVisible = true"
+          >添加班级</el-button
+        >
+      </div>
+    </div>
+    <div class="pb_content_body">
+      <div class="student_head">
+        <div class="student_search">
+          <span>
+            <el-input
+              placeholder="请输入班级名称"
+              v-model="sClassName"
+              clearable
+            >
+            </el-input>
+          </span>
+          <el-button type="primary" @click="searchClass">查询</el-button>
+        </div>
+      </div>
+      <div class="student_table">
+        <el-table
+          ref="table"
+          :data="tableData"
+          border
+          :height="tableHeight"
+          :fit="true"
+          v-loading="isLoading"
+          style="width: 100%; height: 60%"
+          :header-cell-style="{ background: '#f1f1f1' }"
+          :row-class-name="tableRowClassName"
+        >
+          <el-table-column
+            prop="name"
+            label="班级名称"
+            min-width="40%"
+            align="center"
+          >
+          </el-table-column>
+		  <el-table-column
+            prop="pnum"
+            label="人数"
+            min-width="40%"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column label="操作" min-width="20%">
+            <template slot-scope="scope">
+              <el-button
+                type="primary"
+                size="small"
+                @click="deleteClass(scope.row.id)"
+                >删除</el-button
+              >
+            </template>
+          </el-table-column>
+        </el-table>
+      </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
+      title="添加学生"
+      :visible.sync="dialogVisible"
+      :append-to-body="true"
+      width="25%"
+      :before-close="handleClose"
+      class="dialog_diy"
+    >
+      <el-form>
+        <el-form-item label="班级名称" :label-width="formLabelWidth">
+          <el-input
+            v-model="className"
+            auto-complete="off"
+            placeholder="请输入班级..."
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="insertClass">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				tableHeight: "500px",
-				isLoading: false,
-				formLabelWidth: "100px",
-				sClassName: "",
-				className: "",
-				dialogVisible: false,
-				tableData: [],
-				page: 1,
-				total: 0,
-				userid: this.$route.query.userid,
-				oid: this.$route.query.oid,
-			};
-		},
-		created() {
-			this.page = 1;
-			this.getClass();
-		},
-		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 "";
-				}
-			},
-			handleCurrentChange(val) {
-				this.page = val;
-			},
-			handleClose(done) {
-				done();
-			},
-			time() {
-				if (!this.now) {
-					this.now = new Date().getTime();
-					return true;
-				} else {
-					let time = new Date().getTime();
-					if (time - this.now > 3000) {
-						this.now = time;
-						return true;
-					} else {
-						return false;
-					}
-				}
-			},
-			searchClass() {
-				this.page = 1;
-				this.getClass();
-			},
-			//新增班级
-			insertClass() {
-				let params = {
-					name: this.className,
-					oid: this.oid,
-					uid: this.userid,
-				};
-				this.ajax
-					.get(this.$store.state.api + "insertClass", params)
-					.then((res) => {
-						this.$message({
-							message: "新增成功",
-							type: "success",
-						});
-						this.dialogVisible = false;
-						this.sClassName = "";
-						this.getClass();
-						this.className = "";
-					})
-					.catch((err) => {
-						this.$message({
-							message: "新增失败",
-							type: "error",
-						});
-						console.error(err);
-					});
-			},
-			//获取班级列表
-			getClass() {
-				this.isLoading = true;
-				let params = {
-					// username: this.$store.state.userInfo.userid,
-					cu: "",
-					oid:this.oid,
-					cn: this.sClassName,
-					page: this.page,
-				};
-				this.ajax
-					.get(this.$store.state.api + "selectClass", 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);
-					});
-			},
-			//删除班级
-			deleteClass(id) {
-				let params = {
-					id: id,
-				};
-				if (this.time()) {
-					this.$confirm("确定删除此课程吗?", "提示", {
-						confirmButtonText: "确定",
-						cancelButtonText: "取消",
-						type: "warning",
-					})
-						.then(() => {
-							this.ajax
-								.get(this.$store.state.api + "deleteClass", params)
-								.then((res) => {
-									this.$message({
-										message: "删除成功",
-										type: "success",
-									});
-									if (this.page != 1 && this.tableData.length == 1) {
-										this.page - 1;
-									}
-									this.getClass();
-								})
-								.catch((err) => {
-									this.$message.error("删除失败");
-									console.error(err);
-								});
-						})
-						.catch(() => {});
-				}
-			},
-		},
-	};
+export default {
+  data() {
+    return {
+      tableHeight: "500px",
+      isLoading: false,
+      formLabelWidth: "100px",
+      sClassName: "",
+      className: "",
+      dialogVisible: false,
+      tableData: [],
+      page: 1,
+      total: 0,
+      userid: this.$route.query.userid,
+      oid: this.$route.query.oid,
+    };
+  },
+  created() {
+    this.page = 1;
+    this.getClass();
+  },
+  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 "";
+      }
+    },
+    handleCurrentChange(val) {
+      this.page = val;
+    },
+    handleClose(done) {
+      done();
+    },
+    time() {
+      if (!this.now) {
+        this.now = new Date().getTime();
+        return true;
+      } else {
+        let time = new Date().getTime();
+        if (time - this.now > 3000) {
+          this.now = time;
+          return true;
+        } else {
+          return false;
+        }
+      }
+    },
+    searchClass() {
+      this.page = 1;
+      this.getClass();
+    },
+    //新增班级
+    insertClass() {
+      let params = {
+        name: this.className,
+        oid: this.oid,
+        uid: this.userid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "insertClass", params)
+        .then((res) => {
+          this.$message({
+            message: "新增成功",
+            type: "success",
+          });
+          this.dialogVisible = false;
+          this.sClassName = "";
+          this.getClass();
+          this.className = "";
+        })
+        .catch((err) => {
+          this.$message({
+            message: "新增失败",
+            type: "error",
+          });
+          console.error(err);
+        });
+    },
+    //获取班级列表
+    getClass() {
+      this.isLoading = true;
+      let params = {
+        // username: this.$store.state.userInfo.userid,
+        cu: "",
+        oid: this.oid,
+        cn: this.sClassName,
+        page: this.page,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectClass", 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);
+        });
+    },
+    //删除班级
+    deleteClass(id) {
+      let params = {
+        id: id,
+      };
+      if (this.time()) {
+        this.$confirm("确定删除此课程吗?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(() => {
+            this.ajax
+              .get(this.$store.state.api + "deleteClass", params)
+              .then((res) => {
+                this.$message({
+                  message: "删除成功",
+                  type: "success",
+                });
+                if (this.page != 1 && this.tableData.length == 1) {
+                  this.page - 1;
+                }
+                this.getClass();
+              })
+              .catch((err) => {
+                this.$message.error("删除失败");
+                console.error(err);
+              });
+          })
+          .catch(() => {});
+      }
+    },
+  },
+};
 </script>
 
 <style scoped>
-	.dialog_diy >>> .el-dialog__header {
-		background: #3d67bc !important;
-		padding: 15px 20px;
-	}
-	.dialog_diy >>> .el-dialog__title {
-		color: #fff;
-	}
-	.student_table >>> .el-table--border td {
-		border-right: 0px !important;
-	}
-	.dialog_diy >>> .el-dialog__headerbtn {
-		top: 19px;
-	}
-	.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close {
-		color: #fff;
-	}
-	.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover {
-		color: #fff;
-	}
-	.student_head >>> .el-button--primary {
-		background-color: #2268bc;
-	}
-	.xls_button {
-		font-size: 14px;
-		cursor: pointer;
-		text-decoration: underline;
-		color: rgb(34, 104, 188);
-	}
-	.student_head {
-		display: flex;
-		justify-content: space-between;
-	}
-	.student_search {
-		display: flex;
-		width: 300px;
-	}
-	.student_search span {
-		margin: 0 10px 0 0;
-	}
-	.student_button {
-		display: flex;
-		overflow: hidden;
-		height: 40px;
-	}
-	.student_button .el-button--primary {
-		/* margin-right: 10px; */
-	}
-	.upload-demo {
-		display: flex;
-		flex-direction: column;
-		align-items: end;
-		/* position: relative; */
-		width: 100px;
-		overflow: hidden;
-	}
-	.student_table {
-		margin: 20px 0;
-	}
+.dialog_diy >>> .el-dialog__header {
+  background: #3d67bc !important;
+  padding: 15px 20px;
+}
+.dialog_diy >>> .el-dialog__title {
+  color: #fff;
+}
+.student_table >>> .el-table--border td {
+  border-right: 0px !important;
+}
+.dialog_diy >>> .el-dialog__headerbtn {
+  top: 19px;
+}
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close {
+  color: #fff;
+}
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover {
+  color: #fff;
+}
+.student_head >>> .el-button--primary {
+  background-color: #2268bc;
+}
+.xls_button {
+  font-size: 14px;
+  cursor: pointer;
+  text-decoration: underline;
+  color: rgb(34, 104, 188);
+}
+.student_head {
+  display: flex;
+  justify-content: space-between;
+}
+.student_search {
+  display: flex;
+  width: 300px;
+}
+.student_search span {
+  margin: 0 10px 0 0;
+}
+.student_button {
+  display: flex;
+  overflow: hidden;
+  height: 40px;
+}
+.student_button .el-button--primary {
+  /* margin-right: 10px; */
+}
+.upload-demo {
+  display: flex;
+  flex-direction: column;
+  align-items: end;
+  /* position: relative; */
+  width: 100px;
+  overflow: hidden;
+}
+.student_table {
+  margin: 20px 0;
+}
 
-	.el-table >>> .even_row {
-		background-color: #f1f1f1;
-	}
+.el-table >>> .even_row {
+  background-color: #f1f1f1;
+}
+
+.top {
+  display: flex;
+  justify-content: space-between;
+}
+
+.bgColor {
+  background: #2167bc;
+}
 </style>

+ 472 - 464
src/components/pages/course.vue

@@ -1,485 +1,493 @@
 <template>
-	<div class="pb_content">
-		<div class="pb_head">
-			<span>项目管理</span>
-		</div>
-		<div class="pb_content_body">
-			<div class="student_head">
-				<div class="student_search">
-					<span>课程筛选</span>
-					<el-select v-model="groupA" @change="search">
-						<el-option value="0" label="我的课程"></el-option>
-						<el-option value="1" label="他人课程"></el-option>
-					</el-select>
-				</div>
-				<div class="student_button">
-					<el-button
-						type="primary"
-						@click="goTo('/course/addCourse?userid=' + userid + '&oid=' + oid)"
-						>添加课程</el-button
-					>
-				</div>
-			</div>
-			<div class="student_table">
-				<div class="course_box">
-					<div class="out_box" v-for="(item, index) in course" :key="index">
-						<div class="tup">
-							<img
-								:src="
-									item.cover != null && item.cover != ''
-										? JSON.parse(item.cover).length > 0
-											? JSON.parse(item.cover)[0].url
-											: mr
-										: mr
-								"
-								alt=""
-							/>
-						</div>
-						<div class="bottom_box">
-							<div>{{ item.title }}</div>
-							<div class="kc_t" v-if="groupA == '1'">
-								创建老师:{{ item.uname }}
-							</div>
-							<div class="kc_time">{{ item.time }}</div>
-						</div>
-						<div class="three_bottom">
-							<div @click="jump(item.courseId)">开始教学</div>
-							<div v-if="groupA == '0'">修改文档模板</div>
-							<div
-								@click="
-									goTo(
-										'/worksDetail?cid=' +
-											item.courseId +
-											'&userid=' +
-											userid
-									)
-								"
-							>
-								作业
-							</div>
-						</div>
-					</div>
-					<div class="course_empty" v-if="course.length == 0">暂无数据</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>
-		<el-dialog :visible.sync="dialogVisible1" size="tiny">
-			<img width="100%" :src="dialogImageUrl" alt="" />
-		</el-dialog>
-	</div>
+  <div class="pb_content">
+    <div class="pb_head top">
+      <span>项目管理</span>
+      <div class="student_button">
+        <el-button
+          type="primary"
+          class="bgColor"
+          @click="goTo('/course/addCourse?userid=' + userid + '&oid=' + oid)"
+          >添加课程</el-button
+        >
+      </div>
+    </div>
+    <div class="pb_content_body">
+      <div class="student_head">
+        <div class="student_search">
+          <span>课程筛选</span>
+          <el-select v-model="groupA" @change="search">
+            <el-option value="0" label="我的课程"></el-option>
+            <el-option value="1" label="他人课程"></el-option>
+          </el-select>
+        </div>
+      </div>
+      <div class="student_table">
+        <div class="course_box">
+          <div class="out_box" v-for="(item, index) in course" :key="index">
+            <div class="tup">
+              <img
+                :src="
+                  item.cover != null && item.cover != ''
+                    ? JSON.parse(item.cover).length > 0
+                      ? JSON.parse(item.cover)[0].url
+                      : mr
+                    : mr
+                "
+                alt=""
+              />
+            </div>
+            <div class="bottom_box">
+              <div>{{ item.title }}</div>
+              <div class="kc_t" v-if="groupA == '1'">
+                创建老师:{{ item.uname }}
+              </div>
+              <div class="kc_time">{{ item.time }}</div>
+            </div>
+            <div class="three_bottom">
+              <div @click="jump(item.courseId)">开始教学</div>
+              <div v-if="groupA == '0'">修改文档模板</div>
+              <div
+                @click="
+                  goTo(
+                    '/worksDetail?cid=' + item.courseId + '&userid=' + userid
+                  )
+                "
+              >
+                作业
+              </div>
+            </div>
+          </div>
+          <div class="course_empty" v-if="course.length == 0">暂无数据</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>
+    <el-dialog :visible.sync="dialogVisible1" size="tiny">
+      <img width="100%" :src="dialogImageUrl" alt="" />
+    </el-dialog>
+  </div>
 </template>
 
 <script>
-	import "../../common/aws-sdk-2.235.1.min";
-	import EditorBar from "../../components/tools/wangEnduit";
-	export default {
-		components: { EditorBar },
-		data() {
-			return {
-				itemCount: 1,
-				courseTitle: "",
-				courseText: "",
-				courseTime: "",
-				isLoading: false,
-				fileList: [],
-				fileList1: [],
-				homeworkList: [{ name: "" }],
-				formLabelWidth: "100px",
-				dialogVisible: false,
-				dialogVisible1: false,
-				dialogImageUrl: "",
-				group: "",
-				userid: this.$route.query.userid,
-				oid: this.$route.query.oid,
-				Juri: "",
-				groupList: [],
-				JuriList: [],
-				page: 1,
-				total: 0,
-				tableData: [],
-				now: "",
-				courseDetail: {},
-				addCourse: {},
-				groupA: "0",
-				classX: "",
-				course: [],
-				mr: require("../../assets/icon/kc1.png"),
-			};
-		},
-		methods: {
-			change(val) {
-				console.log(val);
-			},
-			addHomeworkBox() {
-				this.homeworkList.push({ name: "" });
-				this.itemCount++;
-			},
-			reduceHomeworkBox() {
-				var a = this.homeworkList;
-				a.splice(a.length - 1);
-				this.itemCount--;
-			},
-			goTo(path) {
-				this.$router.push(path);
-			},
-			tableRowClassName({ row, rowIndex }) {
-				if ((rowIndex + 1) % 2 === 0) {
-					return "even_row";
-				} else {
-					return "";
-				}
-			},
-			jump(cid) {
-				window.open("//pbl.cocorobo.cn/student/#/courseDetail?courseId=" + cid);
-			},
-			handle_remove(file, fileList) {
-				var _tmp = this.fileList;
-				for (var i = 0, len = _tmp.length; i < len; i++) {
-					if (_tmp[i].uid == file.uid) {
-						_tmp.splice(i, 1);
-						break;
-					}
-					this.fileList = _tmp;
-				}
-			},
-			handle_remove1(file, fileList) {
-				var _tmp = this.fileList1;
-				for (var i = 0, len = _tmp.length; i < len; i++) {
-					if (_tmp[i].uid == file.uid) {
-						_tmp.splice(i, 1);
-						break;
-					}
-					this.fileList1 = _tmp;
-				}
-			},
-			handleCurrentChange(val) {
-				// console.log(`当前页: ${val}`);
-				this.page = val;
-			},
-			init() {},
-			handleClose(done) {
-				done();
-			},
-			handleRemove(file, fileList) {
-				console.log(file, fileList);
-			},
-			handlePictureCardPreview(file) {
-				this.dialogImageUrl = file.url;
-				this.dialogVisible1 = true;
-			},
-			onExceed() {
-				this.$message.error("课程海报仅支持上传一张,请删除后再进行上传");
-			},
-			//uuid生成
-			guid() {
-				return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
-					/[xy]/g,
-					function (c) {
-						var r = (Math.random() * 16) | 0,
-							v = c == "x" ? r : (r & 0x3) | 0x8;
-						return v.toString(16);
-					}
-				);
-			},
-			time() {
-				if (!this.now) {
-					this.now = new Date().getTime();
-					return true;
-				} else {
-					let time = new Date().getTime();
-					if (time - this.now > 3000) {
-						this.now = time;
-						return true;
-					} else {
-						return false;
-					}
-				}
-			},
-			getCourse() {
-				const loading = this.openLoading(
-					document.querySelector(".student_table")
-				);
-				this.isLoading = true;
-				let params = {
-					type: this.groupA,
-					uid: this.userid,
-					oid: this.oid,
-					page: this.page,
-				};
-				this.ajax
-					.get(this.$store.state.api + "selectCourse", params)
-					.then((res) => {
-						loading.close();
-						this.isLoading = false;
-						this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
-						this.course = res.data[0];
-						console.log(res.data);
-					})
-					.catch((err) => {
-						console.error(err);
-					});
-			},
-			search() {
-				this.page = 1;
-				this.getCourse();
-			},
-		},
-		created() {
-			this.page = 1;
-			this.getCourse();
-		},
-	};
+import "../../common/aws-sdk-2.235.1.min";
+import EditorBar from "../../components/tools/wangEnduit";
+export default {
+  components: { EditorBar },
+  data() {
+    return {
+      itemCount: 1,
+      courseTitle: "",
+      courseText: "",
+      courseTime: "",
+      isLoading: false,
+      fileList: [],
+      fileList1: [],
+      homeworkList: [{ name: "" }],
+      formLabelWidth: "100px",
+      dialogVisible: false,
+      dialogVisible1: false,
+      dialogImageUrl: "",
+      group: "",
+      userid: this.$route.query.userid,
+      oid: this.$route.query.oid,
+      Juri: "",
+      groupList: [],
+      JuriList: [],
+      page: 1,
+      total: 0,
+      tableData: [],
+      now: "",
+      courseDetail: {},
+      addCourse: {},
+      groupA: "0",
+      classX: "",
+      course: [],
+      mr: require("../../assets/icon/kc1.png"),
+    };
+  },
+  methods: {
+    change(val) {
+      console.log(val);
+    },
+    addHomeworkBox() {
+      this.homeworkList.push({ name: "" });
+      this.itemCount++;
+    },
+    reduceHomeworkBox() {
+      var a = this.homeworkList;
+      a.splice(a.length - 1);
+      this.itemCount--;
+    },
+    goTo(path) {
+      this.$router.push(path);
+    },
+    tableRowClassName({ row, rowIndex }) {
+      if ((rowIndex + 1) % 2 === 0) {
+        return "even_row";
+      } else {
+        return "";
+      }
+    },
+    jump(cid) {
+      window.open("//pbl.cocorobo.cn/student/#/courseDetail?courseId=" + cid);
+    },
+    handle_remove(file, fileList) {
+      var _tmp = this.fileList;
+      for (var i = 0, len = _tmp.length; i < len; i++) {
+        if (_tmp[i].uid == file.uid) {
+          _tmp.splice(i, 1);
+          break;
+        }
+        this.fileList = _tmp;
+      }
+    },
+    handle_remove1(file, fileList) {
+      var _tmp = this.fileList1;
+      for (var i = 0, len = _tmp.length; i < len; i++) {
+        if (_tmp[i].uid == file.uid) {
+          _tmp.splice(i, 1);
+          break;
+        }
+        this.fileList1 = _tmp;
+      }
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.page = val;
+    },
+    init() {},
+    handleClose(done) {
+      done();
+    },
+    handleRemove(file, fileList) {
+      console.log(file, fileList);
+    },
+    handlePictureCardPreview(file) {
+      this.dialogImageUrl = file.url;
+      this.dialogVisible1 = true;
+    },
+    onExceed() {
+      this.$message.error("课程海报仅支持上传一张,请删除后再进行上传");
+    },
+    //uuid生成
+    guid() {
+      return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
+        /[xy]/g,
+        function (c) {
+          var r = (Math.random() * 16) | 0,
+            v = c == "x" ? r : (r & 0x3) | 0x8;
+          return v.toString(16);
+        }
+      );
+    },
+    time() {
+      if (!this.now) {
+        this.now = new Date().getTime();
+        return true;
+      } else {
+        let time = new Date().getTime();
+        if (time - this.now > 3000) {
+          this.now = time;
+          return true;
+        } else {
+          return false;
+        }
+      }
+    },
+    getCourse() {
+      const loading = this.openLoading(
+        document.querySelector(".student_table")
+      );
+      this.isLoading = true;
+      let params = {
+        type: this.groupA,
+        uid: this.userid,
+        oid: this.oid,
+        page: this.page,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectCourse", params)
+        .then((res) => {
+          loading.close();
+          this.isLoading = false;
+          this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
+          this.course = res.data[0];
+          console.log(res.data);
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+    search() {
+      this.page = 1;
+      this.getCourse();
+    },
+  },
+  created() {
+    this.page = 1;
+    this.getCourse();
+  },
+};
 </script>
 
 <style scoped>
-	.dialog_diy >>> .el-dialog__header {
-		background: #3d67bc !important;
-		padding: 15px 20px;
-	}
-	.dialog_diy >>> .el-dialog__title {
-		color: #fff;
-	}
-	.dialog_diy >>> .el-dialog__headerbtn {
-		top: 19px;
-	}
-	.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close {
-		color: #fff;
-	}
-	.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover {
-		color: #fff;
-	}
-	.student_head >>> .el-button--primary {
-		background-color: #2268bc;
-	}
+.dialog_diy >>> .el-dialog__header {
+  background: #3d67bc !important;
+  padding: 15px 20px;
+}
+.dialog_diy >>> .el-dialog__title {
+  color: #fff;
+}
+.dialog_diy >>> .el-dialog__headerbtn {
+  top: 19px;
+}
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close {
+  color: #fff;
+}
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover {
+  color: #fff;
+}
+.student_head >>> .el-button--primary {
+  background-color: #2268bc;
+}
 
-	.xls_button {
-		font-size: 14px;
-		cursor: pointer;
-		text-decoration: underline;
-		color: rgb(34, 104, 188);
-	}
-	.student_head {
-		display: flex;
-		justify-content: space-between;
-	}
-	.student_search {
-		display: flex;
-		align-items: center;
-		width: 300px;
-	}
-	.student_search span {
-		margin: 0 10px 0 0;
-	}
-	.student_button {
-		display: flex;
-		overflow: hidden;
-		height: 40px;
-	}
-	.upload-demo {
-		display: flex;
-		flex-direction: column;
-		align-items: end;
-		/* position: relative; */
-		width: 100px;
-		overflow: hidden;
-	}
-	.student_table {
-		margin: 10px 0;
-		min-height: 530px;
-		height: 93%;
-		overflow: auto;
-	}
+.xls_button {
+  font-size: 14px;
+  cursor: pointer;
+  text-decoration: underline;
+  color: rgb(34, 104, 188);
+}
+.student_head {
+  display: flex;
+  justify-content: space-between;
+}
 
-	.student_empty {
-		display: flex;
-		justify-content: center;
-		align-items: center;
-	}
+.top {
+  display: flex;
+  justify-content: space-between;
+}
 
-	.el-table >>> .even_row {
-		background-color: #f1f1f1;
-	}
+.bgColor {
+  background: #2167bc;
+}
 
-	.time {
-		font-size: 13px;
-		color: #999;
-	}
+.student_search {
+  display: flex;
+  align-items: center;
+  width: 300px;
+}
+.student_search span {
+  margin: 0 10px 0 0;
+}
+.student_button {
+  display: flex;
+  overflow: hidden;
+  height: 40px;
+}
+.upload-demo {
+  display: flex;
+  flex-direction: column;
+  align-items: end;
+  /* position: relative; */
+  width: 100px;
+  overflow: hidden;
+}
+.student_table {
+  margin: 10px 0;
+  min-height: 530px;
+  height: 93%;
+  overflow: auto;
+}
 
-	.course_button {
-		padding: 10px 20px;
-	}
-	.course_button_box {
-		display: flex;
-		margin-top: 5px;
-		justify-content: space-between;
-	}
-	.course_rate {
-		margin-top: 5px;
-	}
-	.course_view {
-		display: flex;
-		align-items: center;
-		margin: 5px 0 0 0;
-	}
-	.course_view i {
-		background-image: url("../../assets/liulan.png");
-		width: 25px;
-		height: 25px;
-		background-size: 100% 100%;
-		/* margin-top: 1px; */
-		line-height: 25px;
-		vertical-align: text-top;
-		background-repeat: no-repeat;
-	}
-	.image {
-		width: 100%;
-		height: 150px;
-		display: block;
-	}
-	.course_box {
-		display: flex;
-		flex-wrap: wrap;
-		height: 100%;
-	}
-	.student_page {
-		width: 95%;
-		margin: 0 auto;
-	}
-	.course_create_box {
-		font-size: 18px;
-	}
-	.course_name {
-		margin-top: 10px;
-	}
-	.course_name span {
-		margin-bottom: 10px;
-		display: block;
-	}
-	.homework_box {
-		display: flex;
-		align-items: center;
-		flex-wrap: wrap;
-	}
-	.course_homework {
-		width: 130px;
-		display: flex;
-		justify-content: center;
-		flex-direction: column;
-		align-items: center;
-		margin: 0 10px 10px 0;
-	}
-	.course_type {
-		margin-top: 10px;
-		display: flex;
-	}
-	.course_type1 span {
-		margin-bottom: 10px;
-		display: block;
-	}
-	.course_type2 {
-		margin-left: 20px;
-	}
-	.course_type2 span {
-		margin-bottom: 10px;
-		display: block;
-	}
-	.course_empty {
-		color: rgb(110, 110, 110);
-		width: 100%;
-		height: 100%;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-	}
-	.el_cards >>> .el-card__body {
-		height: 100%;
-	}
-	.courseBtnBox {
-		display: flex;
-		flex-direction: column;
-		justify-content: space-between;
-		height: calc(100% - 170px);
-		padding: 10px;
-	}
+.student_empty {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
 
-	.wordUpload {
-		display: flex;
-	}
+.el-table >>> .even_row {
+  background-color: #f1f1f1;
+}
 
-	.wordUpload > .buttonUp {
-		margin-right: 5px;
-	}
+.time {
+  font-size: 13px;
+  color: #999;
+}
 
-	.out_box {
-		display: flex;
-		flex-direction: column;
-		flex-wrap: nowrap;
-		width: 250px;
-		background: #fff;
-		margin-left: 25px;
-		border: 1px solid #ccc;
-		height: fit-content;
-		box-sizing: border-box;
-		border-radius: 0px 0px 5px 5px;
-		overflow: hidden;
-		margin-bottom: 10px;
-	}
+.course_button {
+  padding: 10px 20px;
+}
+.course_button_box {
+  display: flex;
+  margin-top: 5px;
+  justify-content: space-between;
+}
+.course_rate {
+  margin-top: 5px;
+}
+.course_view {
+  display: flex;
+  align-items: center;
+  margin: 5px 0 0 0;
+}
+.course_view i {
+  background-image: url("../../assets/liulan.png");
+  width: 25px;
+  height: 25px;
+  background-size: 100% 100%;
+  /* margin-top: 1px; */
+  line-height: 25px;
+  vertical-align: text-top;
+  background-repeat: no-repeat;
+}
+.image {
+  width: 100%;
+  height: 150px;
+  display: block;
+}
+.course_box {
+  display: flex;
+  flex-wrap: wrap;
+  height: 100%;
+}
+.student_page {
+  width: 95%;
+  margin: 0 auto;
+}
+.course_create_box {
+  font-size: 18px;
+}
+.course_name {
+  margin-top: 10px;
+}
+.course_name span {
+  margin-bottom: 10px;
+  display: block;
+}
+.homework_box {
+  display: flex;
+  align-items: center;
+  flex-wrap: wrap;
+}
+.course_homework {
+  width: 130px;
+  display: flex;
+  justify-content: center;
+  flex-direction: column;
+  align-items: center;
+  margin: 0 10px 10px 0;
+}
+.course_type {
+  margin-top: 10px;
+  display: flex;
+}
+.course_type1 span {
+  margin-bottom: 10px;
+  display: block;
+}
+.course_type2 {
+  margin-left: 20px;
+}
+.course_type2 span {
+  margin-bottom: 10px;
+  display: block;
+}
+.course_empty {
+  color: rgb(110, 110, 110);
+  width: 100%;
+  height: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.el_cards >>> .el-card__body {
+  height: 100%;
+}
+.courseBtnBox {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+  height: calc(100% - 170px);
+  padding: 10px;
+}
 
-	.bottom_box {
-		display: flex;
-		padding: 10px 0 10px 10px;
-		flex-direction: column;
-		box-sizing: border-box;
-	}
-	.bottom_box > div:nth-child(1) {
-		width: 230px;
-		overflow: hidden;
-		text-overflow: ellipsis;
-		white-space: nowrap;
-	}
+.wordUpload {
+  display: flex;
+}
 
-	.tup {
-		width: 100%;
-		height: 141.06px;
-		margin: 0 auto;
-	}
+.wordUpload > .buttonUp {
+  margin-right: 5px;
+}
 
-	.tup > img {
-		width: 100%;
-		height: 100%;
-	}
+.out_box {
+  display: flex;
+  flex-direction: column;
+  flex-wrap: nowrap;
+  width: 250px;
+  background: #fff;
+  margin-left: 25px;
+  border: 1px solid #ccc;
+  height: fit-content;
+  box-sizing: border-box;
+  border-radius: 0px 0px 5px 5px;
+  overflow: hidden;
+  margin-bottom: 10px;
+}
 
-	.kc_time {
-		margin-top: 8px;
-		font-size: 14px;
-		color: #999;
-	}
-	.kc_t {
-		margin-top: 5px;
-	}
+.bottom_box {
+  display: flex;
+  padding: 10px 0 10px 10px;
+  flex-direction: column;
+  box-sizing: border-box;
+}
+.bottom_box > div:nth-child(1) {
+  width: 230px;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
 
-	.three_bottom {
-		display: flex;
-		flex-direction: row;
-		justify-content: space-around;
-		border-bottom: 1px solid #ccc;
-		height: 40px;
-		align-items: center;
-		background: #f5f4f4;
-		font-size: 14px;
-	}
-	.three_bottom > div {
-		cursor: pointer;
-	}
+.tup {
+  width: 100%;
+  height: 141.06px;
+  margin: 0 auto;
+}
+
+.tup > img {
+  width: 100%;
+  height: 100%;
+}
+
+.kc_time {
+  margin-top: 8px;
+  font-size: 14px;
+  color: #999;
+}
+.kc_t {
+  margin-top: 5px;
+}
+
+.three_bottom {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-around;
+  border-bottom: 1px solid #ccc;
+  height: 40px;
+  align-items: center;
+  background: #f5f4f4;
+  font-size: 14px;
+}
+.three_bottom > div {
+  cursor: pointer;
+}
 </style>

+ 260 - 197
src/components/pages/data.vue

@@ -1,206 +1,269 @@
 <template>
-	<div class="pb_content">
-		<div class="pb_head">
-			<span>我的资料</span>
-		</div>
-		<div class="pb_content_body">
-			<div style="width: 500px">
-				<el-form
-					:model="ruleForm"
-					:rules="rules"
-					ref="ruleForm"
-					label-width="100px"
-					class="demo-ruleForm"
-				>
-					<el-form-item label="姓名" prop="teacherName">
-						<el-input
-							v-model="ruleForm.name"
-							style="width: 250px"
-							placeholder="请输入名字"
-						></el-input>
-					</el-form-item>
-					<el-form-item label="性别">
-						<el-radio-group v-model="ruleForm.sex">
-							<el-radio label="男"></el-radio>
-							<el-radio label="女"></el-radio>
-						</el-radio-group>
-					</el-form-item>
-					<el-form-item label="电子邮箱" prop="mail">
-						<el-input
-							v-model="ruleForm.mail"
-							style="width: 300px"
-							placeholder="请输入电子邮箱"
-						></el-input>
-					</el-form-item>
-					<el-form-item label="手机号码" prop="phone">
-						<el-input
-							disabled
-							v-model="ruleForm.phone"
-							style="width: 300px"
-							placeholder="请输入手机号码"
-						></el-input>
-					</el-form-item>
-					<el-form-item label="学校" prop="sBySchool">
-						<el-input
-							disabled
-							v-model="ruleForm.sBySchool"
-							style="width: 300px"
-						></el-input>
-					</el-form-item>
-					<el-form-item label="个人简介" prop="intro">
-						<el-input
-							v-model="ruleForm.intro"
-							type="textarea"
-							:rows="5"
-							resize="none"
-							placeholder="想说点什么..."
-						></el-input>
-					</el-form-item>
-					<el-form-item>
-						<el-button type="primary" @click="submitForm('ruleForm')"
-							>修改</el-button
-						>
-					</el-form-item>
-				</el-form>
-			</div>
-		</div>
-	</div>
+  <div class="pb_content">
+    <div class="pb_content_body" style="position: relative; width: 95%">
+      <div
+        style="
+          width: 25%;
+          position: absolute;
+          left: 50%;
+          top: 0;
+          transform: translate(-50%, 30%);
+        "
+      >
+        <div class="formTop">
+          <div class="tx">
+            <img
+              :src="ruleForm.headportrait != null ? ruleForm.headportrait : tx"
+              alt=""
+            />
+          </div>
+          <div class="right">
+            <div class="name">{{ ruleForm.name }}</div>
+            <div class="rightBottom">
+              <div class="emailImg">
+                <img src="../../assets/email.png" alt="" />
+              </div>
+              <div class="email">{{ ruleForm.mail }}</div>
+            </div>
+          </div>
+        </div>
+        <el-form
+          :model="ruleForm"
+          :rules="rules"
+          ref="ruleForm"
+          label-width="100px"
+          class="demo-ruleForm"
+        >
+          <!-- <el-form-item label="姓名" prop="teacherName">
+            <el-input
+              v-model="ruleForm.name"
+              style="width: 250px"
+              placeholder="请输入名字"
+            ></el-input>
+          </el-form-item> -->
+          <el-form-item label="性别">
+            <el-radio-group v-model="ruleForm.sex">
+              <el-radio label="男"></el-radio>
+              <el-radio label="女"></el-radio>
+            </el-radio-group>
+          </el-form-item>
+          <!-- <el-form-item label="电子邮箱" prop="mail">
+            <el-input
+              v-model="ruleForm.mail"
+              style="width: 300px"
+              placeholder="请输入电子邮箱"
+            ></el-input>
+          </el-form-item> -->
+          <el-form-item label="手机号码" prop="phone">
+            <el-input
+              disabled
+              v-model="ruleForm.phone"
+              style="width: 300px"
+              placeholder="请输入手机号码"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="学校" prop="sBySchool">
+            <el-input
+              disabled
+              v-model="ruleForm.sBySchool"
+              style="width: 300px"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="个人简介" prop="intro">
+            <el-input
+              v-model="ruleForm.intro"
+              type="textarea"
+              :rows="5"
+              resize="none"
+              placeholder="想说点什么..."
+              style="width: 300px"
+            ></el-input>
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" @click="submitForm('ruleForm')"
+              >修改</el-button
+            >
+          </el-form-item>
+        </el-form>
+      </div>
+    </div>
+  </div>
 </template>
 
 <script>
-	export default {
-		data() {
-			var validatePass = (rule, value, callback) => {
-				if (value == "") {
-					return;
-				}
-				var reg =
-					/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/;
-				if (!reg.test(value)) {
-					callback(new Error("请输入正确的邮箱"));
-				} else {
-					callback();
-				}
-			};
-			var validatePass1 = (rule, value, callback) => {
-				var reg = /^1\d{10}$/;
-				if (!reg.test(value)) {
-					callback(new Error("请输入正确的手机号码"));
-				} else {
-					callback();
-				}
-			};
-			return {
-				ruleForm: {
-					name: "",
-					type: [],
-					sex: "男",
-					intro: "",
-					mail: "",
-					phone: "",
-					sBySchool: "",
-				},
-				userinfo:"",
-				schoolJuri: [],
-				userid: this.$route.query.userid,
-				rules: {
-					pass: [{ validator: validatePass, trigger: "blur" }],
-					name: [{ required: true, message: "请输入你的名字", trigger: "blur" }],
-					mail: [
-						{
-							validator: validatePass,
-							trigger: "blur",
-						},
-					],
-					phone: [
-						{ required: true, message: "请输入你的手机号码", trigger: "blur" },
+export default {
+  data() {
+    var validatePass = (rule, value, callback) => {
+      if (value == "") {
+        return;
+      }
+      var reg =
+        /^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/;
+      if (!reg.test(value)) {
+        callback(new Error("请输入正确的邮箱"));
+      } else {
+        callback();
+      }
+    };
+    var validatePass1 = (rule, value, callback) => {
+      var reg = /^1\d{10}$/;
+      if (!reg.test(value)) {
+        callback(new Error("请输入正确的手机号码"));
+      } else {
+        callback();
+      }
+    };
+    return {
+      ruleForm: {
+        name: "",
+        type: [],
+        sex: "男",
+        intro: "",
+        mail: "",
+        phone: "",
+        sBySchool: "",
+        headportrait: "",
+      },
+      tx: require("../../assets/portal.png"),
+      userinfo: "",
+      schoolJuri: [],
+      userid: this.$route.query.userid,
+      rules: {
+        pass: [{ validator: validatePass, trigger: "blur" }],
+        name: [{ required: true, message: "请输入你的名字", trigger: "blur" }],
+        mail: [
+          {
+            validator: validatePass,
+            trigger: "blur",
+          },
+        ],
+        phone: [
+          { required: true, message: "请输入你的手机号码", trigger: "blur" },
 
-						{
-							validator: validatePass1,
-							trigger: "blur",
-						},
-					],
-				},
-			};
-		},
-		methods: {
-			getSchool() {
-				this.isLoading = true;
-				let params = {
-					page: this.page,
-				};
-				this.ajax
-					.get(this.$store.state.api + "selectOrg", params)
-					.then((res) => {
-						this.isLoading = false;
-						this.schoolJuri = res.data[0];
-					})
-					.catch((err) => {
-						this.isLoading = false;
-						console.error(err);
-					});
-			},
-			submitForm(formName) {
-				this.$refs[formName];
-				let params = [
-					{
-						uid: this.userid,
-						sname: this.ruleForm.name,
-						ph: this.ruleForm.phone,
-						sex: this.ruleForm.sex == "男" ? "0" : "1",
-						email: this.ruleForm.mail,
-						js: this.ruleForm.intro,
-					},
-				];
-				this.ajax
-					.post(this.$store.state.api + "updateUser", params)
-					.then((res) => {
-						this.$message({
-							message: "修改成功",
-							type: "success",
-						});
-						this.getUser();
-					})
-					.catch((err) => {
-						this.$message.error("修改失败");
-						console.error(err);
-					});
-			},
-			getUser() {
-				let params = { uid: this.userid };
-				this.ajax
-					.get(this.$store.state.api + "getUser", params)
-					.then((res) => {
-						this.userinfo = res.data[0][0];
-						// this.$cookies.set("userInfo", this.userinfo, -1);
-               			 this.$cookies.set("teacherInfo", res.data[0][0], -1);
-						this.$store.commit("update", ["userInfo", this.userinfo]);
-						console.log(res.data[0][0]);
-					})
-					.catch((err) => {
-						console.error(err);
-					});
-			},
-			getDetail() {
-				let params = { uid: this.userid };
-				this.ajax
-					.get(this.$store.state.api + "getUser", params)
-					.then((res) => {
-						res.data[0][0].sex = res.data[0][0].sex ? "女" : "男";
-						this.ruleForm = res.data[0][0];
-						console.log(res.data[0][0]);
-					})
-					.catch((err) => {
-						console.error(err);
-					});
-			},
-		},
-		created() {
-			this.getSchool();
-			this.getDetail();
-		},
-	};
+          {
+            validator: validatePass1,
+            trigger: "blur",
+          },
+        ],
+      },
+    };
+  },
+  methods: {
+    getSchool() {
+      this.isLoading = true;
+      let params = {
+        page: this.page,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectOrg", params)
+        .then((res) => {
+          this.isLoading = false;
+          this.schoolJuri = res.data[0];
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
+    submitForm(formName) {
+      this.$refs[formName];
+      let params = [
+        {
+          uid: this.userid,
+          sname: this.ruleForm.name,
+          ph: this.ruleForm.phone,
+          sex: this.ruleForm.sex == "男" ? "0" : "1",
+          email: this.ruleForm.mail,
+          js: this.ruleForm.intro,
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + "updateUser", params)
+        .then((res) => {
+          this.$message({
+            message: "修改成功",
+            type: "success",
+          });
+          this.getUser();
+        })
+        .catch((err) => {
+          this.$message.error("修改失败");
+          console.error(err);
+        });
+    },
+    getUser() {
+      let params = { uid: this.userid };
+      this.ajax
+        .get(this.$store.state.api + "getUser", params)
+        .then((res) => {
+          this.userinfo = res.data[0][0];
+          // this.$cookies.set("userInfo", this.userinfo, -1);
+          this.$cookies.set("teacherInfo", res.data[0][0], -1);
+          this.$store.commit("update", ["userInfo", this.userinfo]);
+          console.log(res.data[0][0]);
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+    getDetail() {
+      let params = { uid: this.userid };
+      this.ajax
+        .get(this.$store.state.api + "getUser", params)
+        .then((res) => {
+          res.data[0][0].sex = res.data[0][0].sex ? "女" : "男";
+          this.ruleForm = res.data[0][0];
+          console.log(res.data[0][0]);
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+  },
+  created() {
+    this.getSchool();
+    this.getDetail();
+  },
+};
 </script>
 
 <style scoped>
+.formTop {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-bottom: 20px;
+}
+.tx {
+  width: 100px;
+  margin-right: 15px;
+}
+.emailImg {
+  width: 30px;
+  margin-right: 5px;
+}
+.tx > img,
+.emailImg > img {
+  width: 100%;
+  height: 100%;
+}
+.right {
+  display: flex;
+  flex-direction: column;
+  align-items: flex-start;
+}
+.name {
+  color: #3c88dd;
+  font-size: 20px;
+  margin-bottom: 10px;
+}
+
+.email {
+  color: #acacac;
+  font-size: 18px;
+}
+.rightBottom {
+  display: flex;
+  align-items: center;
+}
 </style>

+ 473 - 466
src/components/pages/library.vue

@@ -1,490 +1,497 @@
 <template>
-	<div class="pb_content">
-		<div class="pb_head">
-			<span>素材库</span>
-		</div>
-		<div class="pb_content_body" style="height: 70%">
-			<div class="student_head">
-				<div class="three">
-					<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 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" 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>
-								{{
-									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" 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 class="bottom_box">
-							<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" 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>
-								{{
-									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>
+  <div class="pb_content">
+    <div class="pb_head top">
+      <span>素材库</span>
+      <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 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="pb_content_body" style="height: 70%">
+      <div class="student_head">
+        <div class="three">
+          <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>
+      <div class="student_table">
+        <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>
+                {{
+                  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" 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 class="bottom_box">
+              <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" 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>
+                {{
+                  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>
 
 <script>
-	export default {
-		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: "",
-				userid: this.$route.query.userid,
-				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: {
-			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"; //设置区域
+export default {
+  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: "",
+      userid: this.$route.query.userid,
+      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: {
+    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;
+      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"; //设置区域
+      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;
+      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.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();
-		},
-	};
+      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.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 {
+/* .student_button {
 																														display: flex;
 																														overflow: hidden;
 																														height: 40px;
 																													} */
-	.student_head >>> .el-button--primary {
-		background-color: #2268bc;
-	}
-	.student_head {
-		display: flex;
-		justify-content: space-between;
-	}
-	.three {
-		display: flex;
-		flex-direction: row;
-		justify-content: space-between;
-		width: 200px;
-		height: 30px;
-	}
+.student_head >>> .el-button--primary {
+  background-color: #2268bc;
+}
+.student_head {
+  display: flex;
+  justify-content: space-between;
+}
+.three {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  width: 200px;
+  height: 30px;
+}
 
-	.three > div {
-		cursor: pointer;
-	}
+.three > div {
+  cursor: pointer;
+}
 
-	.choose {
-		border-bottom: 5px solid #3994fd;
-	}
+.choose {
+  border-bottom: 5px solid #3994fd;
+}
 
-	.student_table {
-		width: 100%;
-		height: 100%;
-		background: #f2f2f2;
-		margin-top: 10px;
-	}
+.student_table {
+  width: 100%;
+  height: 100%;
+  background: #f2f2f2;
+  margin-top: 10px;
+}
 
-	.tup {
-		width: 200px;
-		height: 191px;
-		margin: 0 auto;
-		position: relative;
-	}
+.tup {
+  width: 200px;
+  height: 191px;
+  margin: 0 auto;
+  position: relative;
+}
 
-	.deleteWord {
-		width: 25px;
-		height: 25px;
-		position: absolute;
-		right: -25px;
-		top: -10px;
-		cursor: pointer;
-	}
+.deleteWord {
+  width: 25px;
+  height: 25px;
+  position: absolute;
+  right: -25px;
+  top: -10px;
+  cursor: pointer;
+}
 
-	.tup > img,
-	.deleteWord > img {
-		width: 100%;
-		height: 100%;
-	}
+.tup > img,
+.deleteWord > img {
+  width: 100%;
+  height: 100%;
+}
 
-	.out_box {
-		display: flex;
-		flex-direction: column;
-		flex-wrap: nowrap;
-		width: 250px;
-		padding: 10px 0;
-		background: #fff;
-		margin-left: 25px;
-	}
+.out_box {
+  display: flex;
+  flex-direction: column;
+  flex-wrap: nowrap;
+  width: 250px;
+  padding: 10px 0;
+  background: #fff;
+  margin-left: 25px;
+}
 
-	.bottom_box {
-		display: flex;
-		text-align: center;
-		margin: 0 auto;
-		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;
-	}
+.bottom_box {
+  display: flex;
+  text-align: center;
+  margin: 0 auto;
+  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;
+}
+
+.top {
+  display: flex;
+  justify-content: space-between;
+}
 </style>

+ 9 - 6
src/components/pages/notice.vue

@@ -1,8 +1,5 @@
 <template>
 	<div class="pb_content">
-		<div class="pb_head">
-			<span>通知公告</span>
-		</div>
 		<div class="pb_content_body">
 			<div class="student_table">
 				<el-table
@@ -36,6 +33,14 @@
 							{{ scope.row.creater ? scope.row.creater : "未知" }}
 						</template>
 					</el-table-column> -->
+					<el-table-column
+						prop="creatMen"
+						label="创建者"
+						min-width="25"
+						align="center"
+					>
+					管理员
+					</el-table-column>
 					<el-table-column
 						prop="creatTime"
 						label="创建时间"
@@ -83,9 +88,7 @@
 			<div>
 				<div class="pb_head">
 					<span style="font-size: 20px">{{ res.title }}</span>
-					<span style="font-size: 15px; line-height: 35px">{{
-						res.creater ? res.creater : "未知"
-					}}</span>
+					<span style="font-size: 15px; line-height: 35px">管理员</span>
 				</div>
 				<div class="notice_content cont" v-html="res.newscontent"></div>
 			</div>

+ 846 - 807
src/components/pages/student.vue

@@ -1,820 +1,859 @@
 <template>
-	<div class="pb_content" style="min-width: 960px">
-		<div class="pb_head">
-			<span>我的学生列表</span>
-			<span>Student List</span>
-		</div>
-		<div class="pb_content_body">
-			<div class="student_head">
-				<div class="head_left">
-					<el-input
-						v-model="sPhoneUser"
-						class="student_input"
-						placeholder="请输入手机号或用户名"
-					></el-input>
-					<el-button class="student_button" @click="searchStudent"
-						>查询</el-button
-					>
-				</div>
-				<div class="head_right">
-					<el-button @click="addStudent">添加学生</el-button>
-					<el-upload
-						class="upload-demo"
-						:http-request="handleChange"
-						:on-remove="handleRemove"
-						action="#"
-						:file-list="fileListUpload"
-						accept=".xlsx"
-					>
-						<el-button size="primary" type="primary">批量添加</el-button>
-						<!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
-					</el-upload>
-					<div @click="getExcel">xls 上传样例</div>
-				</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="name"
-						label="姓名"
-						min-width="10"
-						align="center"
-					>
-					</el-table-column>
-					<el-table-column
-						prop="phonenumber"
-						label="电话"
-						min-width="15"
-						align="center"
-					>
-					</el-table-column>
-					<el-table-column
-						prop="sex"
-						label="性别"
-						min-width="10"
-						align="center"
-					>
-						{{ this.tableData.sex ? this.tableData.sex : "男" }}
-					</el-table-column>
-					<el-table-column
-						prop="school"
-						label="学校"
-						min-width="30"
-						align="center"
-					>
-					</el-table-column>
-					<el-table-column
-						prop="class"
-						label="班级"
-						min-width="15"
-						align="center"
-					>
-					</el-table-column>
-					<el-table-column label="操作" min-width="20">
-						<template slot-scope="scope">
-							<el-button
-								class="de_button"
-								type="primary"
-								size="small"
-								@click="deleteStudent(scope.row.userid, scope.row.state)"
-								>删除</el-button
-							>
-						</template>
-					</el-table-column>
-				</el-table>
-				<el-dialog
-					:visible.sync="dialogVisible"
-					:append-to-body="true"
-					width="700px"
-					:before-close="handleClose"
-					class="add_student"
-				>
-					<div slot="title" class="header-title">
-						<div class="logoImg">
-							<img src="../../assets/logo.png" alt="" />
-						</div>
-						<div class="title_add_student">添加学生</div>
-					</div>
-					<el-form>
-						<el-form-item label="学生名称" :label-width="formLabelWidth">
-							<span>
-								<el-input
-									placeholder="请输入学生昵称"
-									clearable
-									v-model="sName"
-									class="add_input"
-								></el-input>
-							</span>
-						</el-form-item>
-						<el-form-item label="学生手机号" :label-width="formLabelWidth">
-							<span>
-								<el-input
-									placeholder="请输入学生手机号"
-									clearable
-									v-model="sPhone"
-									class="add_input"
-								></el-input>
-							</span>
-						</el-form-item>
-						<el-form-item label="所属学校" :label-width="formLabelWidth">
-							<el-input
-								disabled
-								style="width: 300px"
-								:value="this.$store.state.userInfo.schoolName"
-							></el-input>
-						</el-form-item>
-						<el-form-item label="班级" :label-width="formLabelWidth">
-							<el-select v-model="sByClass" placeholder="请选择班级">
-								<el-option
-									v-for="(item, index) in classJuri"
-									:key="index"
-									:label="item.name"
-									:value="item.id"
-								>
-								</el-option>
-							</el-select>
-						</el-form-item>
-						<div style="text-align: center; color: #adb3b7">
-							注:添加学生的账号密码为123456
-						</div>
-					</el-form>
-					<span slot="footer" class="dialog-footer flex">
-						<el-button class="right" @click="insertStudent">确认</el-button>
-					</span>
-				</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>
+  <div class="pb_content" style="min-width: 960px">
+    <div class="pb_head">
+      <span>我的学生列表</span>
+    </div>
+    <div class="pb_content_body">
+      <div class="student_head">
+        <div class="head_left">
+          <el-input
+            v-model="sPhoneUser"
+            class="student_input"
+            placeholder="请输入手机号或用户名"
+          ></el-input>
+          <el-button class="student_button" @click="searchStudent"
+            >查询</el-button
+          >
+        </div>
+        <div class="head_right">
+          <el-button @click="addStudent">添加学生</el-button>
+          <el-upload
+            class="upload-demo"
+            :http-request="handleChange"
+            :on-remove="handleRemove"
+            action="#"
+            :file-list="fileListUpload"
+            accept=".xlsx"
+          >
+            <el-button size="primary" type="primary">批量添加</el-button>
+            <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
+          </el-upload>
+          <div @click="getExcel">xls 上传样例</div>
+        </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 label="姓名" min-width="10" align="center">
+            <template slot-scope="scope">
+              <div class="userImg">
+                <div class="tx">
+                  <img
+                    :src="
+                      scope.row.headportrait != null
+                        ? scope.row.headportrait
+                        : tx
+                    "
+                    alt=""
+                  />
+                </div>
+                <div>{{ scope.row.name }}</div>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="phonenumber"
+            label="电话"
+            min-width="15"
+            align="center"
+          >
+          </el-table-column>
+          <!-- <el-table-column
+            prop="sex"
+            label="性别"
+            min-width="10"
+            align="center"
+          >
+            {{ this.tableData.sex ? this.tableData.sex : "男" }}
+          </el-table-column> -->
+          <!-- <el-table-column
+            prop="school"
+            label="学校"
+            min-width="30"
+            align="center"
+          >
+          </el-table-column> -->
+          <el-table-column
+            prop="class"
+            label="班级"
+            min-width="15"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column label="操作" min-width="20">
+            <template slot-scope="scope">
+              <!-- <el-button
+                class="de_button"
+                type="primary"
+                size="small"
+                @click="deleteStudent(scope.row.userid, scope.row.state)"
+                >删除</el-button
+              > -->
+              <div class="delete" @click="deleteStudent(scope.row.userid, scope.row.state)">
+                <img
+                  src="../../assets/remove.png"
+                  alt=""
+                />
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+        <el-dialog
+          :visible.sync="dialogVisible"
+          :append-to-body="true"
+          width="700px"
+          :before-close="handleClose"
+          class="add_student"
+        >
+          <div slot="title" class="header-title">
+            <div class="logoImg">
+              <img src="../../assets/logo.png" alt="" />
+            </div>
+            <div class="title_add_student">添加学生</div>
+          </div>
+          <el-form>
+            <el-form-item label="学生名称" :label-width="formLabelWidth">
+              <span>
+                <el-input
+                  placeholder="请输入学生昵称"
+                  clearable
+                  v-model="sName"
+                  class="add_input"
+                ></el-input>
+              </span>
+            </el-form-item>
+            <el-form-item label="学生手机号" :label-width="formLabelWidth">
+              <span>
+                <el-input
+                  placeholder="请输入学生手机号"
+                  clearable
+                  v-model="sPhone"
+                  class="add_input"
+                ></el-input>
+              </span>
+            </el-form-item>
+            <el-form-item label="所属学校" :label-width="formLabelWidth">
+              <el-input
+                disabled
+                style="width: 300px"
+                v-model="schoolName"
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="班级" :label-width="formLabelWidth">
+              <el-select v-model="sByClass" placeholder="请选择班级">
+                <el-option
+                  v-for="(item, index) in classJuri"
+                  :key="index"
+                  :label="item.name"
+                  :value="item.id"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <div style="text-align: center; color: #adb3b7">
+              注:添加学生的账号密码为123456
+            </div>
+          </el-form>
+          <span slot="footer" class="dialog-footer flex">
+            <el-button class="right" @click="insertStudent">确认</el-button>
+          </span>
+        </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>
 </template>
 
 <script>
-	import $ from "jquery";
-	export default {
-		data() {
-			return {
-				tableHeight: "500px",
-				isLoading: false,
-				formLabelWidth: "100px",
-				tableData: [],
-				dialogVisible: false,
-				sName: "",
-				sPhone: "",
-				// sBySchool: [],
-				// sBySchoolName:"",
-				sByClass: "",
-				schoolJuri: [],
-				classJuri: [],
-				fileListUpload: [],
-				page: 1,
-				total: 0,
-				sPhoneUser: "",
-				userid: this.$route.query.userid,
-				oid: this.$route.query.oid,
-			};
-		},
-		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 "";
-				}
-			},
-			searchStudent() {
-				this.page = 1;
-				this.getStudent();
-			},
-			addStudent() {
-				this.dialogVisible = true;
-				(this.sName = ""), (this.sPhone = ""), (this.sByClass = "");
-				this.getClass();
-				// this.getSchool();
-			},
-			handleClose(done) {
-				done();
-			},
-			getExcel(res) {
-				require.ensure([], () => {
-					const { export_json_to_excel } = require("../../common/Export2Excel");
-					const tHeader = [
-						"学生姓名",
-						"学生手机号",
-						"性别",
-						"学校",
-						"班级",
-						"(注:导入学校为:" + this.$store.state.userInfo.schoolName + ")",
-					];
-					const data = [];
-					export_json_to_excel(tHeader, data, "上传学生样例");
-				});
-			},
-			handleCurrentChange(val) {
-				this.page = val;
-			},
-			time() {
-				if (!this.now) {
-					this.now = new Date().getTime();
-					return true;
-				} else {
-					let time = new Date().getTime();
-					if (time - this.now > 3000) {
-						this.now = time;
-						return true;
-					} else {
-						return false;
-					}
-				}
-			},
-			//新增学生
-			insertStudent() {
-				this.dialogVisible = true;
-				if (this.sName === "") {
-					this.$message.error("学生昵称不能为空");
-					return;
-				} else if (this.sPhone === "") {
-					this.$message.error("学生手机号不能为空");
-					return;
-				} else if (this.sByClass === "") {
-					this.$message.error("请为学生选择班级");
-					return;
-				} else if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(this.sPhone)) {
-					this.$message.error("手机号格式不正确");
-					return;
-				}
-				if (this.time()) {
-					let params = { un: this.sPhone };
-					this.ajax
-						.get(this.$store.state.api + "findPhone", params)
-						.then((res) => {
-							if (res.data[0].length > 0) {
-								this.$message.error("此学生手机号码已被注册");
-							} else {
-								this.add_Student();
-							}
-						})
-						.catch((err) => {
-							console.error(err);
-						});
-				}
-			},
-			add_Student() {
-				let params = {
-					ph: this.sPhone,
-					username: this.sName,
-					userpassword: 123456,
-					type: 2,
-					oid: this.oid,
-					tid: this.userid,
-					cid: this.sByClass,
-				};
-				this.ajax
-					.get(this.$store.state.api + "insertStudent", params)
-					.then((res) => {
-						this.isLoading = false;
-						this.$message({
-							message: "新增成功",
-							type: "success",
-						});
-						this.dialogVisible = false;
-						this.sPhone = "";
-						this.sName = "";
-						// this.sBySchool = [];
-						this.sByClass = [];
-						this.getStudent();
-					})
-					.catch((err) => {
-						this.isLoading = false;
-						this.$message({
-							message: "新增失败",
-							type: "error",
-						});
-						console.error(err);
-					});
-			},
-			//获取班级列表
-			getClass() {
-				this.isLoading = true;
-				let params = {
-					// username: this.$store.state.userInfo.userid,
-					cu: "",
-					oid: this.oid,
-					cn: "",
-					page: this.page,
-				};
-				this.ajax
-					.get(this.$store.state.api + "selectClass", params)
-					.then((res) => {
-						this.isLoading = false;
-						this.classJuri = res.data[0];
-					})
-					.catch((err) => {
-						this.isLoading = false;
-						console.error(err);
-					});
-			},
-			// getSchool() {
-			// 	this.isLoading = true;
-			// 	let params = {
-			// 		page: this.page,
-			// 	};
-			// 	this.ajax
-			// 		.get(this.$store.state.api + "selectOrg", params)
-			// 		.then((res) => {
-			// 			this.isLoading = false;
-			// 			this.schoolJuri = res.data[0];
-			// 		})
-			// 		.catch((err) => {
-			// 			this.isLoading = false;
-			// 			console.error(err);
-			// 		});
-			// },
-			getStudent() {
-				this.isLoading = true;
-				let params = {
-					uid: this.userid,
-					cu: "",
-					cn: this.sPhoneUser,
-					page: this.page,
-				};
-				this.ajax
-					.get(this.$store.state.api + "selectStudent", 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);
-					});
-			},
-			handleChange(file) {
-				this.fileTemp = file.file;
-				if (this.fileTemp) {
-					if (
-						this.fileTemp.type ==
-							"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ||
-						this.fileTemp.type == "application/vnd.ms-excel"
-					) {
-						this.importCount = 1;
-						this.importfxx(this.fileTemp);
-					} else {
-						this.$message({
-							type: "warning",
-							message: "附件格式错误,请删除后重新上传!",
-						});
-					}
-				} else {
-					this.$message({
-						type: "warning",
-						message: "请上传附件!",
-					});
-				}
-			},
-			handleRemove(file, fileList) {
-				this.fileTemp = null;
-			},
-			importfxx(obj) {
-				const loading = this.$loading.service({
-					background: "rgba(255, 255, 255, 0.7)",
-					target: document.body,
-				});
-				var _$ = $;
-				this.importCount++;
-				let _this = this;
-				// 通过DOM取文件数据
-				this.file = obj;
-				var rABS = false; //是否将文件读取为二进制字符串
-				var f = this.file;
-				var reader = new FileReader();
-				//if (!FileReader.prototype.readAsBinaryString) {
-				FileReader.prototype.readAsBinaryString = function (f) {
-					var binary = "";
-					var rABS = false; //是否将文件读取为二进制字符串
-					var pt = this;
-					var wb; //读取完成的数据
-					var outdata;
-					var reader = new FileReader();
-					reader.onload = function (e) {
-						var bytes = new Uint8Array(reader.result);
-						var length = bytes.byteLength;
-						for (var i = 0; i < length; i++) {
-							binary += String.fromCharCode(bytes[i]);
-						}
-						var XLSX = require("xlsx");
-						if (rABS) {
-							wb = XLSX.read(btoa(fixdata(binary)), {
-								//手动转化
-								type: "base64",
-							});
-						} else {
-							wb = XLSX.read(binary, {
-								type: "binary",
-							});
-						}
-						outdata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]); //outdata就是你想要的东西
-						this.da = [...outdata];
-						let arr = [];
-						this.da.map((v) => {
-							let obj = {};
-							obj.name = v["学生名称"];
-							obj.phone = v["学生手机号"];
-							// obj.sex = v["性別"];
-							// obj.school = this.$store.state.userInfo.organizeid;
-							obj.class = v["班级"];
-							arr.push(obj);
-						});
-						console.log(arr);
-						let _b = 1;
-						for (var i = 0; i < arr.length; i++) {
-							let item = arr[i];
-							if (item.class === "") {
-								_b = 1;
-								_this.$message.error("学生班级不能为空,请重新上传");
-								break;
-							} else if (item.name === "") {
-								_b = 1;
-								_this.$message.error("学生姓名不能为空,请重新上传");
-								break;
-							} else if (item.phone === "") {
-								_b = 1;
-								_this.$message.error("学生手机号不能为空,请重新上传");
-								break;
-							} else if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(item.phone)) {
-								_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 = {
-									className: item.class,
-								};
+import $ from "jquery";
+export default {
+  data() {
+    return {
+      tableHeight: "500px",
+      isLoading: false,
+      formLabelWidth: "100px",
+      tableData: [],
+      dialogVisible: false,
+      sName: "",
+      sPhone: "",
+      schoolName: "",
+      // sBySchool: [],
+      // sBySchoolName:"",
+      sByClass: "",
+      schoolJuri: [],
+      classJuri: [],
+      fileListUpload: [],
+      page: 1,
+      total: 0,
+      sPhoneUser: "",
+      userid: this.$route.query.userid,
+      oid: this.$route.query.oid,
+      tx: require("../../assets/portal.png"),
+    };
+  },
+  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 "";
+      }
+    },
+    searchStudent() {
+      this.page = 1;
+      this.getStudent();
+    },
+    addStudent() {
+      this.dialogVisible = true;
+      (this.sName = ""), (this.sPhone = ""), (this.sByClass = "");
+      this.getClass();
+      // this.getSchool();
+    },
+    handleClose(done) {
+      done();
+    },
+    getExcel(res) {
+      require.ensure([], () => {
+        const { export_json_to_excel } = require("../../common/Export2Excel");
+        const tHeader = [
+          "学生姓名",
+          "学生手机号",
+          "性别",
+          "学校",
+          "班级",
+          "(注:导入学校为:" + this.schoolName + ")",
+        ];
+        const data = [];
+        export_json_to_excel(tHeader, data, "上传学生样例");
+      });
+    },
+    handleCurrentChange(val) {
+      this.page = val;
+    },
+    time() {
+      if (!this.now) {
+        this.now = new Date().getTime();
+        return true;
+      } else {
+        let time = new Date().getTime();
+        if (time - this.now > 3000) {
+          this.now = time;
+          return true;
+        } else {
+          return false;
+        }
+      }
+    },
+    //新增学生
+    insertStudent() {
+      this.dialogVisible = true;
+      if (this.sName === "") {
+        this.$message.error("学生昵称不能为空");
+        return;
+      } else if (this.sPhone === "") {
+        this.$message.error("学生手机号不能为空");
+        return;
+      } else if (this.sByClass === "") {
+        this.$message.error("请为学生选择班级");
+        return;
+      } else if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(this.sPhone)) {
+        this.$message.error("手机号格式不正确");
+        return;
+      }
+      if (this.time()) {
+        let params = { un: this.sPhone };
+        this.ajax
+          .get(this.$store.state.api + "findPhone", params)
+          .then((res) => {
+            if (res.data[0].length > 0) {
+              this.$message.error("此学生手机号码已被注册");
+            } else {
+              this.add_Student();
+            }
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      }
+    },
+    add_Student() {
+      let params = {
+        ph: this.sPhone,
+        username: this.sName,
+        userpassword: 123456,
+        type: 2,
+        oid: this.oid,
+        tid: this.userid,
+        cid: this.sByClass,
+      };
+      this.ajax
+        .get(this.$store.state.api + "insertStudent", params)
+        .then((res) => {
+          this.isLoading = false;
+          this.$message({
+            message: "新增成功",
+            type: "success",
+          });
+          this.dialogVisible = false;
+          this.sPhone = "";
+          this.sName = "";
+          // this.sBySchool = [];
+          this.sByClass = [];
+          this.getStudent();
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          this.$message({
+            message: "新增失败",
+            type: "error",
+          });
+          console.error(err);
+        });
+    },
+    //获取班级列表
+    getClass() {
+      this.isLoading = true;
+      let params = {
+        // username: this.$store.state.userInfo.userid,
+        cu: "",
+        oid: this.oid,
+        cn: "",
+        page: this.page,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectClass", params)
+        .then((res) => {
+          this.isLoading = false;
+          this.classJuri = res.data[0];
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
+    // getSchool() {
+    // 	this.isLoading = true;
+    // 	let params = {
+    // 		page: this.page,
+    // 	};
+    // 	this.ajax
+    // 		.get(this.$store.state.api + "selectOrg", params)
+    // 		.then((res) => {
+    // 			this.isLoading = false;
+    // 			this.schoolJuri = res.data[0];
+    // 		})
+    // 		.catch((err) => {
+    // 			this.isLoading = false;
+    // 			console.error(err);
+    // 		});
+    // },
+    getStudent() {
+      this.isLoading = true;
+      let params = {
+        uid: this.userid,
+        cu: "",
+        cn: this.sPhoneUser,
+        page: this.page,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectStudent", 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);
+        });
+    },
+    handleChange(file) {
+      this.fileTemp = file.file;
+      if (this.fileTemp) {
+        if (
+          this.fileTemp.type ==
+            "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ||
+          this.fileTemp.type == "application/vnd.ms-excel"
+        ) {
+          this.importCount = 1;
+          this.importfxx(this.fileTemp);
+        } else {
+          this.$message({
+            type: "warning",
+            message: "附件格式错误,请删除后重新上传!",
+          });
+        }
+      } else {
+        this.$message({
+          type: "warning",
+          message: "请上传附件!",
+        });
+      }
+    },
+    handleRemove(file, fileList) {
+      this.fileTemp = null;
+    },
+    importfxx(obj) {
+      const loading = this.$loading.service({
+        background: "rgba(255, 255, 255, 0.7)",
+        target: document.body,
+      });
+      var _$ = $;
+      this.importCount++;
+      let _this = this;
+      // 通过DOM取文件数据
+      this.file = obj;
+      var rABS = false; //是否将文件读取为二进制字符串
+      var f = this.file;
+      var reader = new FileReader();
+      //if (!FileReader.prototype.readAsBinaryString) {
+      FileReader.prototype.readAsBinaryString = function (f) {
+        var binary = "";
+        var rABS = false; //是否将文件读取为二进制字符串
+        var pt = this;
+        var wb; //读取完成的数据
+        var outdata;
+        var reader = new FileReader();
+        reader.onload = function (e) {
+          var bytes = new Uint8Array(reader.result);
+          var length = bytes.byteLength;
+          for (var i = 0; i < length; i++) {
+            binary += String.fromCharCode(bytes[i]);
+          }
+          var XLSX = require("xlsx");
+          if (rABS) {
+            wb = XLSX.read(btoa(fixdata(binary)), {
+              //手动转化
+              type: "base64",
+            });
+          } else {
+            wb = XLSX.read(binary, {
+              type: "binary",
+            });
+          }
+          outdata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]); //outdata就是你想要的东西
+          this.da = [...outdata];
+          let arr = [];
+          this.da.map((v) => {
+            let obj = {};
+            obj.name = v["学生名称"];
+            obj.phone = v["学生手机号"];
+            // obj.sex = v["性別"];
+            // obj.school = this.$store.state.userInfo.organizeid;
+            obj.class = v["班级"];
+            arr.push(obj);
+          });
+          console.log(arr);
+          let _b = 1;
+          for (var i = 0; i < arr.length; i++) {
+            let item = arr[i];
+            if (item.class === "") {
+              _b = 1;
+              _this.$message.error("学生班级不能为空,请重新上传");
+              break;
+            } else if (item.name === "") {
+              _b = 1;
+              _this.$message.error("学生姓名不能为空,请重新上传");
+              break;
+            } else if (item.phone === "") {
+              _b = 1;
+              _this.$message.error("学生手机号不能为空,请重新上传");
+              break;
+            } else if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(item.phone)) {
+              _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 = {
+                className: item.class,
+              };
 
-								_$.ajax({
-									url: _this.$store.state.api + "selectC", //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.classid = res[0][0].id;
-										}
-									},
-									error: function (xhr, textStatus) {
-										console.log(textStatus);
-									},
-									complete: function () {},
-								});
-								if (_a == 1) {
-									_b = 1;
-									break;
-								}
-							}
-							// if (item.school != "") {
-							// 	let _a;
-							// 	let params = {
-							// 		schoolName: item.school,
-							// 	};
+              _$.ajax({
+                url: _this.$store.state.api + "selectC", //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.classid = res[0][0].id;
+                  }
+                },
+                error: function (xhr, textStatus) {
+                  console.log(textStatus);
+                },
+                complete: function () {},
+              });
+              if (_a == 1) {
+                _b = 1;
+                break;
+              }
+            }
+            // 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;
-							// 	}
-							// }
-							if (item.phone != "") {
-								let params = { un: item.phone };
-								let _a;
-								_$.ajax({
-									url: _this.$store.state.api + "findPhone", //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) {
-											_this.$message.error("此学生手机号码已被注册");
-											_a = 1;
-										}
-									},
-									error: function (xhr, textStatus) {
-										console.log(textStatus);
-									},
-									complete: function () {},
-								});
-								if (_a == 1) {
-									_b = 1;
-									break;
-								}
-							}
-							_b = 2;
-						}
-						if (_b == 2) {
-							for (var i = 0; i < arr.length; i++) {
-								let _i = i;
-								let item = arr[i];
-								let params = {
-									ph: item.phone,
-									username: item.name,
-									userpassword: 123456,
-									type: 2,
-									// oid: item.schoolid,
-									oid: _this.oid,
-									tid: _this.userid,
-									cid: item.classid,
-								};
+            // 	_$.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;
+              _$.ajax({
+                url: _this.$store.state.api + "findPhone", //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) {
+                    _this.$message.error("此学生手机号码已被注册");
+                    _a = 1;
+                  }
+                },
+                error: function (xhr, textStatus) {
+                  console.log(textStatus);
+                },
+                complete: function () {},
+              });
+              if (_a == 1) {
+                _b = 1;
+                break;
+              }
+            }
+            _b = 2;
+          }
+          if (_b == 2) {
+            for (var i = 0; i < arr.length; i++) {
+              let _i = i;
+              let item = arr[i];
+              let params = {
+                ph: item.phone,
+                username: item.name,
+                userpassword: 123456,
+                type: 2,
+                // oid: item.schoolid,
+                oid: _this.oid,
+                tid: _this.userid,
+                cid: item.classid,
+              };
 
-								_this.ajax
-									.get(_this.$store.state.api + "insertStudent", params)
-									.then((res) => {
-										if (_i == arr.length - 1) {
-											loading.close();
-											_this.$message({
-												message: "上传成功",
-												type: "success",
-											});
-											_this.getStudent();
-										}
-									})
-									.catch((err) => {
-										_this.$message.error("添加失败");
-										console.error(err);
-									});
-							}
-						} else {
-							loading.close();
-						}
+              _this.ajax
+                .get(_this.$store.state.api + "insertStudent", params)
+                .then((res) => {
+                  if (_i == arr.length - 1) {
+                    loading.close();
+                    _this.$message({
+                      message: "上传成功",
+                      type: "success",
+                    });
+                    _this.getStudent();
+                  }
+                })
+                .catch((err) => {
+                  _this.$message.error("添加失败");
+                  console.error(err);
+                });
+            }
+          } else {
+            loading.close();
+          }
 
-						_this.fileListUpload = [];
-					};
-					reader.readAsArrayBuffer(f);
-				};
+          _this.fileListUpload = [];
+        };
+        reader.readAsArrayBuffer(f);
+      };
 
-				if (rABS) {
-					reader.readAsArrayBuffer(f);
-				} else {
-					reader.readAsBinaryString(f);
-				}
-			},
-			// getSchoolName() {
-			// 	let params = {
-			// 		oid: this.$store.state.userInfo.organizeid,
-			// 	};
-			// 	this.ajax
-			// 		.get(this.$store.state.api + "selectSchoolName", params)
-			// 		.then((res) => {
-			// 			this.sBySchool = res.data[0];
-			// 			this.sBySchoolName = this.sBySchool[0].name;
-			// 		})
-			// 		.catch((err) => {
-			// 			console.error(err);
-			// 		});
-			// },
-			deleteStudent(id, state) {
-				state = 0;
-				let params = [{ uid: id, state: state }];
-				this.$confirm("确定" + "删除" + "此学生吗?", "提示", {
-					confirmButtonText: "确定",
-					cancelButtonText: "取消",
-					type: "warning",
-				})
-					.then(() => {
-						this.ajax
-							.post(this.$store.state.api + "deleteStudent", params)
-							.then((res) => {
-								this.$message({
-									message: "操作成功",
-									type: "success",
-								});
-								this.getStudent();
-							})
-							.catch((err) => {
-								this.$message.error("操作失败");
-								console.error(err);
-							});
-					})
-					.catch(() => {});
-			},
-		},
-		created() {
-			this.page = 1;
-			this.getStudent();
-			// this.getSchoolName();
-		},
-	};
+      if (rABS) {
+        reader.readAsArrayBuffer(f);
+      } else {
+        reader.readAsBinaryString(f);
+      }
+    },
+    getSchoolName() {
+      let params = {
+        oid: this.oid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectSchoolName", params)
+        .then((res) => {
+          this.schoolName = res.data[0][0].name;
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+    deleteStudent(id, state) {
+      state = 0;
+      let params = [{ uid: id, state: state }];
+      this.$confirm("确定" + "删除" + "此学生吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.ajax
+            .post(this.$store.state.api + "deleteStudent", params)
+            .then((res) => {
+              this.$message({
+                message: "操作成功",
+                type: "success",
+              });
+              this.getStudent();
+            })
+            .catch((err) => {
+              this.$message.error("操作失败");
+              console.error(err);
+            });
+        })
+        .catch(() => {});
+    },
+  },
+  created() {
+    this.page = 1;
+    this.getStudent();
+    this.getSchoolName();
+  },
+};
 </script>
 
 <style scoped>
-	.pb_head > span:nth-child(2) {
-		font-size: 20px;
-		margin-left: 5px;
-		color: #828282;
-	}
-	.student_head {
-		display: flex;
-		justify-content: space-between;
-	}
-	.head_left {
-		display: flex;
-	}
-	.head_right {
-		display: flex;
-	}
-	.student_input >>> .el-input__inner {
-		height: 30px;
-		width: 190px;
-		font-size: 13px;
-		padding: 0 10px;
-	}
-	.student_button {
-		color: #fff;
-		background: #2268bc;
-		width: 60px;
-		height: 30px;
-		padding: 0 !important;
-		font-size: 12px;
-		line-height: 30px;
-	}
-	.head_right > button:nth-child(1) {
-		color: #fff;
-		background: #2268bc;
-		width: 70px;
-		height: 30px;
-		padding: 0 !important;
-		font-size: 12px;
-		line-height: 30px;
-	}
-	.head_right > button:nth-child(2) {
-		color: #fff;
-		background: #2268bc;
-		width: 70px;
-		height: 30px;
-		padding: 0 !important;
-		font-size: 12px;
-		line-height: 30px;
-	}
-	.head_right > div {
-		font-size: 12px;
-		line-height: 40px;
-		margin-left: 10px;
-		color: #2a6dbe;
-		text-decoration: underline;
-		cursor: pointer;
-	}
-	.student_table >>> .el-table--border td {
-		border-right: 0px !important;
-	}
-	.el-table__row--striped .even_row {
-		background-color: #f1f1f1 !important;
-	}
-	.de_button {
-		color: #fff;
-		background: #5190fd;
-		width: 50px;
-		height: 25px;
-		padding: 0 !important;
-		font-size: 12px;
-		line-height: 25px;
-	}
-	.add_student >>> .el-dialog__header {
-		padding: 20px 20px 10px;
-		text-align: center;
-		background: #32455b;
-	}
-	.add_student >>> .el-dialog__title {
-		font-size: 14px !important;
-		color: #fff !important;
-	}
-	.add_student >>> .el-dialog__headerbtn {
-		font-size: 20px !important;
-	}
-	.add_student >>> .el-form-item__label {
-		margin-left: 65px;
-	}
-	.add_student >>> .el-form-item {
-		display: flex;
-	}
-	.add_student >>> .el-form-item__content {
-		margin: 0 !important;
-	}
-	.add_input {
-		width: 365px;
-	}
-	.add_student >>> .el-dialog__footer {
-		text-align: center !important;
-	}
-	.right {
-		width: 250px;
-		color: #fff;
-		background: #0e72e6;
-		margin-bottom: 20px;
-	}
-	.header-title {
-		display: flex;
-	}
-	.logoImg {
-		width: 30px;
-	}
-	.logoImg > img {
-		width: 100%;
-		height: 100%;
-	}
-	.title_add_student {
-		margin: 0 auto;
-		color: #fff;
-	}
-	.upload-demo {
-		line-height: 0px !important;
-	}
-	.upload-demo >>> .el-button {
-		color: #fff;
-		background: #2268bc;
-		width: 70px;
-		height: 30px;
-		padding: 0 !important;
-		font-size: 12px;
-		line-height: 0 !important;
-	}
+.pb_head > span:nth-child(2) {
+  font-size: 20px;
+  margin-left: 5px;
+  color: #828282;
+}
+.student_head {
+  display: flex;
+  justify-content: space-between;
+}
+.head_left {
+  display: flex;
+}
+.head_right {
+  display: flex;
+}
+.student_input >>> .el-input__inner {
+  height: 30px;
+  width: 190px;
+  font-size: 13px;
+  padding: 0 10px;
+}
+.student_button {
+  color: #fff;
+  background: #2268bc;
+  width: 60px;
+  height: 30px;
+  padding: 0 !important;
+  font-size: 12px;
+  line-height: 30px;
+}
+.head_right > button:nth-child(1) {
+  color: #fff;
+  background: #2268bc;
+  width: 70px;
+  height: 30px;
+  padding: 0 !important;
+  font-size: 12px;
+  line-height: 30px;
+}
+.head_right > button:nth-child(2) {
+  color: #fff;
+  background: #2268bc;
+  width: 70px;
+  height: 30px;
+  padding: 0 !important;
+  font-size: 12px;
+  line-height: 30px;
+}
+.head_right > div {
+  font-size: 12px;
+  line-height: 40px;
+  margin-left: 10px;
+  color: #2a6dbe;
+  text-decoration: underline;
+  cursor: pointer;
+}
+.student_table >>> .el-table--border td {
+  border-right: 0px !important;
+}
+.el-table__row--striped .even_row {
+  background-color: #f1f1f1 !important;
+}
+.de_button {
+  color: #fff;
+  background: #5190fd;
+  width: 50px;
+  height: 25px;
+  padding: 0 !important;
+  font-size: 12px;
+  line-height: 25px;
+}
+.add_student >>> .el-dialog__header {
+  padding: 20px 20px 10px;
+  text-align: center;
+  background: #32455b;
+}
+.add_student >>> .el-dialog__title {
+  font-size: 14px !important;
+  color: #fff !important;
+}
+.add_student >>> .el-dialog__headerbtn {
+  font-size: 20px !important;
+}
+.add_student >>> .el-form-item__label {
+  margin-left: 65px;
+}
+.add_student >>> .el-form-item {
+  display: flex;
+}
+.add_student >>> .el-form-item__content {
+  margin: 0 !important;
+}
+.add_input {
+  width: 365px;
+}
+.add_student >>> .el-dialog__footer {
+  text-align: center !important;
+}
+.right {
+  width: 250px;
+  color: #fff;
+  background: #0e72e6;
+  margin-bottom: 20px;
+}
+.header-title {
+  display: flex;
+}
+.logoImg {
+  width: 30px;
+}
+.logoImg > img {
+  width: 100%;
+  height: 100%;
+}
+.title_add_student {
+  margin: 0 auto;
+  color: #fff;
+}
+.upload-demo {
+  line-height: 0px !important;
+}
+.upload-demo >>> .el-button {
+  color: #fff;
+  background: #2268bc;
+  width: 70px;
+  height: 30px;
+  padding: 0 !important;
+  font-size: 12px;
+  line-height: 0 !important;
+}
+
+.userImg {
+  display: flex;
+  flex-direction: row;
+  justify-content: center;
+  align-items: center;
+}
+
+.tx {
+  width: 40px;
+  margin-right: 10px;
+}
+
+.delete{
+	width: 25px;
+	cursor: pointer;
+}
+
+.tx > img,
+.delete>img {
+  width: 100%;
+  height: 100%;
+}
 </style>

+ 4 - 0
src/components/pages/works.vue

@@ -224,4 +224,8 @@ export default {
 .student_page {
   margin-top: 10px;
 }
+
+.student_table >>> .el-table{
+  height: 635px !important;
+}
 </style>

+ 992 - 958
src/components/pages/worksDetail.vue

@@ -1,22 +1,23 @@
 <template>
-	<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?userid=' + userid + '&oid=' + oid}"
-							>评价管理</el-breadcrumb-item
-						>
-						<el-breadcrumb-item>作业管理</el-breadcrumb-item>
-					</el-breadcrumb>
-				</div>
-				<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?userid=' + userid + '&oid=' + oid }"
+              >评价管理</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"
@@ -29,164 +30,164 @@
 							: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, 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">
+          <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
+            <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
@@ -195,40 +196,40 @@
 								"
 								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">
+              <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>
@@ -257,760 +258,793 @@
 								</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>
+          </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 talkScore"
+        >
+          <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="firstTop">
+            <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>
+
+          <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="lastTop">
+            <div class="moreSay">更多评价</div>
+            <div class="more_say_input">
+              <el-input
+                type="textarea"
+                placeholder="还有要说的吗..."
+                :rows="3"
+                resize="none"
+                v-model="rateList.content"
+                :readonly="rateParams[5] != '' && rateParams[5] != undefined"
+                style="background: #fafafa"
+              ></el-input>
+            </div>
+          </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,
-				id: this.$route.query.cid,
-				userid: this.$route.query.userid,
-				oid: this.$route.query.oid,
-				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.oid,
-				};
-				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.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();
-		},
-	};
+export default {
+  data() {
+    return {
+      tableHeight: "500px",
+      isLoading: false,
+      id: this.$route.query.cid,
+      userid: this.$route.query.userid,
+      oid: this.$route.query.oid,
+      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.oid,
+      };
+      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.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 #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;
-	}
+.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-bottom: 10px;
+}
+.userTou {
+  width: 50px;
+}
+.userTou > img {
+  width: 100%;
+  height: 100%;
+}
+.score_user_name {
+  line-height: 53px;
+  margin-left: 15px;
+}
+.course_top {
+  display: flex;
+  align-items: center;
+}
+.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;
+  margin-bottom: 15px;
+  border-radius: 5px;
+  width: 90%;
+  box-shadow: 2px 2px 5px #909090;
+}
+.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: 80%;
+}
+.more_say_input >>> .el-input__inner {
+  height: 75px;
+  font-size: 13px;
+  padding: 0 0 0 10px;
+}
+.assess_right {
+  width: 200px;
+  background: #82b0ee;
+  color: #fff;
+  text-align: center;
+  height: 30px;
+  line-height: 30px;
+  border-radius: 5px;
+  margin: 0 auto;
+  margin-top: 20px;
+  font-size: 13px;
+  cursor: pointer;
+}
+.student_page {
+  margin-top: 10px;
+}
+.display {
+  display: none;
+}
+
+.firstTop {
+  background: #fff;
+  display: flex;
+  margin-bottom: 15px;
+  flex-direction: column;
+  align-items: flex-start;
+  height: 90px;
+  padding: 10px 25px;
+  border-radius: 5px;
+  width: 90%;
+  box-shadow: 2px 2px 5px #909090;
+}
+
+.talkScore >>> .el-dialog__body {
+  background: #efefef;
+  margin: 0 !important;
+}
+
+.lastTop {
+  background: #fff;
+  border-radius: 5px;
+  width: 98%;
+  height: 120px;
+  box-shadow: 2px 2px 5px #909090;
+}
 </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/api/pbl/',
+        // api: 'https://pbl.cocorobo.cn/api/pbl/',
+        api: 'http://localhost:7003/api/pbl/',
     },
 
     mutations: {