Sfoglia il codice sorgente

学生端样式修改和打包

zengyicheng 3 anni fa
parent
commit
ce0ed6adf6

+ 1 - 1
dist/index.html

@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>pbl-student</title><link href=./static/css/app.32fb264b146046802778d40ad1df2801.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.deec116227fdc82db9e5.js></script><script type=text/javascript src=./static/js/app.8f3fe11c03e82807f43e.js></script></body></html>
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>pbl-student</title><link href=./static/css/app.c6c47e65a3108620e98c530475c2f478.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.deec116227fdc82db9e5.js></script><script type=text/javascript src=./static/js/app.76959e962510a09e3625.js></script></body></html>

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.32fb264b146046802778d40ad1df2801.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.c6c47e65a3108620e98c530475c2f478.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.c6c47e65a3108620e98c530475c2f478.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.76959e962510a09e3625.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.76959e962510a09e3625.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.8f3fe11c03e82807f43e.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.8f3fe11c03e82807f43e.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


+ 347 - 146
src/components/study.vue

@@ -58,7 +58,7 @@
               style="font-size: 19px"
               @click="swichTask(index)"
             >
-              任务 {{ index + 1 }}
+              {{ index + 1 }} {{ task.task }}
             </div>
           </div>
         </div>
@@ -121,12 +121,10 @@
               </div>
             </div>
             <div class="vedioList">
-              <div style="height: 250px; overflow: auto">
-                <div class="vedioNav">视频列表</div>
+              <div v-for="(media, index) in vedio" :key="index">
+                <div class="vedioNav">视频</div>
                 <div
                   class="media"
-                  v-for="(media, index) in vedio"
-                  :key="index"
                   style="width: 160px; margin: 10px auto; position: relative"
                 >
                   <img
@@ -145,39 +143,48 @@
                 </div>
               </div>
               <div
-                style="height: 250px; overflow: auto"
-                v-if="textList.length > 0"
+                v-show="textList.length > 0"
+                class="newNav"
+                v-for="(text, textIndex) in textList"
+                :key="textIndex"
               >
-                <div class="vedioNav">附文本列表</div>
-                <div
-                  style="width: 160px; margin: 10px auto; position: relative"
-                >
-                  <!-- <img
-                    style="height: 90px; width: 160px"
-                    :src="
-                      media.cover != null && media.cover != ''
-                        ? JSON.parse(media.cover).length > 0
-                          ? JSON.parse(media.cover)[0].url
-                          : mr
-                        : mr
-                    "
-                    alt=""
-                    @click="lookVedio(media.url)"
-                  /> -->
-                  <div
-                    v-for="(text, textIndex) in textList"
-                    :key="textIndex"
-                    style="cursor: pointer; margin-bottom: 10px"
-                    @click="lookText(textIndex)"
-                  >
+                <div class="vedioNav" style="width: 70px">富文本</div>
+                <div>
+                  <div class="navText" @click="lookText(textIndex)">
                     {{ textList.length > 0 ? text.name : "" }}.doc
                   </div>
                 </div>
               </div>
+              <div
+                v-show="chapToolList.length > 0"
+                class="newNav"
+                v-for="(tools, toolsIndex) in chapToolList"
+                :key="toolsIndex"
+              >
+                <div class="vedioNav">工具</div>
+                <div>
+                  <div class="navText" @click="lookTools(toolsIndex)">
+                    {{ chapToolList.length > 0 ? tools.name : "" }}
+                  </div>
+                </div>
+              </div>
+              <div
+                v-show="chapToolList.length > 0"
+                class="newNav"
+                v-for="(lines, lineIndex) in lineList"
+                :key="lineIndex"
+              >
+                <div class="vedioNav">链接</div>
+                <div>
+                  <div class="navText">
+                    <a :href="'https://' + lines.url">{{ lines.url }}</a>
+                    <!-- {{
+                      lineList.length > 0 ? lines.url : ""
+                    }} -->
+                  </div>
+                </div>
+              </div>
             </div>
-            <!-- <div style="font-size: 18px; margin: 15px">
-              {{ chapInfo.dyName }}
-            </div> -->
           </div>
           <div v-else style="padding: 20px 50px">暂无视频</div>
         </div>
@@ -299,7 +306,7 @@
               </div>
             </div>
           </div> -->
-          <div class="project_box">
+          <div class="project_box" v-if="file.length > 0">
             <div class="queTop">
               <div class="question" style="width: 30px">
                 <img src="../assets/icon/fileIcon.png" alt="" />
@@ -328,100 +335,101 @@
             <!-- <div class="filebox" v-if="!chapInfo.chapterInfo[0].taskJson[taskCount].toolChoose.length">
               暂无数据
             </div> -->
-            <div class="toolHeng">
+            <div
+              class="toolHeng"
+              v-for="(tool, toolIndex) in chapInfo.chapterInfo[0].taskJson[
+                taskCount
+              ].toolChoose"
+              :key="toolIndex"
+            >
               <div
                 class="filebox"
-                v-for="(tool, toolIndex) in chapInfo.chapterInfo[0].taskJson[
-                  taskCount
-                ].toolChoose"
-                :key="toolIndex"
+                style="
+                  min-width: 480px;
+                  flex-wrap: nowrap;
+                  width: 90%;
+                  background: #f2f2f2;
+                  border-radius: 10px;
+                  margin: 10px 0 10px 20px;
+                "
               >
-                <div
-                  style="
-                    display: flex;
-                    flex-direction: row;
-                    flex-wrap: wrap;
-                    margin: 20px auto 0;
-                  "
-                >
+                <div style="display: flex; flex-flow: row wrap">
                   <!-- v-for="(itemTool, indexTool) in toolTypeList"
                   :key="indexTool" -->
-                  <div class="addPoint">
-                    <img
-                      v-if="tool.tool == 8"
-                      src="../assets/icon/secondToolList/library.png"
-                      alt=""
-                      @click="addTools(tool.tool, toolIndex)"
-                    />
-                    <div v-if="tool.tool == 8" style="margin: 5px 0">
-                      素材库
+                  <div
+                    class="addPoint"
+                    v-for="(tooC, toolCIndex) in tool.tool"
+                    :key="toolCIndex"
+                  >
+                    <div v-if="tooC == 8">
+                      <img
+                        src="../assets/icon/secondToolList/library.png"
+                        alt=""
+                        @click="addTools(tooC, toolIndex)"
+                      />
+                      <div style="margin: 5px 0">素材库</div>
+                    </div>
+                    <div v-if="tooC == 1">
+                      <img
+                        @click="addTools(tooC, toolIndex)"
+                        src="../assets/icon/secondToolList/whiteBoard.png"
+                        alt=""
+                      />
+                      <div style="margin: 5px 0">电子白板</div>
                     </div>
-                    <img
-                      v-if="tool.tool == 1"
-                      @click="addTools(tool.tool, toolIndex)"
-                      src="../assets/icon/secondToolList/whiteBoard.png"
-                      alt=""
-                    />
-                    <div v-if="tool.tool == 1" style="margin: 5px 0">
-                      电子白板
+                    <div v-if="tooC == 2">
+                      <img
+                        @click="addTools(tooC, toolIndex)"
+                        src="../assets/icon/secondToolList/note.png"
+                        alt=""
+                      />
+                      <div style="margin: 5px 0">便签</div>
                     </div>
-                    <img
-                      v-if="tool.tool == 2"
-                      @click="addTools(tool.tool, toolIndex)"
-                      src="../assets/icon/secondToolList/note.png"
-                      alt=""
-                    />
-                    <div v-if="tool.tool == 2" style="margin: 5px 0">便签</div>
-                    <img
-                      v-if="tool.tool == 3"
-                      @click="addTools(tool.tool, toolIndex)"
-                      src="../assets/icon/secondToolList/mindMapping.png"
-                      alt=""
-                    />
-                    <div v-if="tool.tool == 3" style="margin: 5px 0">
-                      思维导图
+                    <div v-if="tooC == 3">
+                      <img
+                        @click="addTools(tooC, toolIndex)"
+                        src="../assets/icon/secondToolList/mindMapping.png"
+                        alt=""
+                      />
+                      <div style="margin: 5px 0">思维导图</div>
                     </div>
-                    <img
-                      v-if="tool.tool == 6"
-                      @click="addTools(tool.tool, toolIndex)"
-                      src="../assets/icon/secondToolList/doc.png"
-                      alt=""
-                    />
-                    <div v-if="tool.tool == 6" style="margin: 5px 0">
-                      协同文档
+                    <div v-if="tooC == 6">
+                      <img
+                        @click="addTools(tooC, toolIndex)"
+                        src="../assets/icon/secondToolList/doc.png"
+                        alt=""
+                      />
+                      <div style="margin: 5px 0">协同文档</div>
                     </div>
-                    <img
-                      v-else-if="tool.tool == 7"
-                      @click="addTools(tool.tool, toolIndex)"
-                      src="../assets/icon/secondToolList/mindNetwork.png"
-                      alt=""
-                    />
-                    <div v-if="tool.tool == 7" style="margin: 5px 0">
-                      思维网格
+                    <div v-if="tooC == 7">
+                      <img
+                        @click="addTools(tooC, toolIndex)"
+                        src="../assets/icon/secondToolList/mindNetwork.png"
+                        alt=""
+                      />
+                      <div style="margin: 5px 0">思维网格</div>
                     </div>
-                    <img
-                      v-if="tool.tool == 4"
-                      @click="addTools(tool.tool, toolIndex)"
-                      src="../assets/icon/thirdToolList/ask.png"
-                      alt=""
-                    />
-                    <div v-if="tool.tool == 4" style="margin: 5px 0">
-                      问卷调查
+                    <div v-if="tooC == 4">
+                      <img
+                        @click="addTools(tooC, toolIndex)"
+                        src="../assets/icon/thirdToolList/ask.png"
+                        alt=""
+                      />
+                      <div style="margin: 5px 0">问卷调查</div>
                     </div>
-                    <img
-                      v-else-if="tool.tool == 5"
-                      @click="addTools(tool.tool, toolIndex)"
-                      src="../assets/icon/thirdToolList/score.png"
-                      alt=""
-                    />
-                    <div v-if="tool.tool == 5" style="margin: 5px 0">
-                      量规评分
+                    <div v-if="tooC == 5">
+                      <img
+                        @click="addTools(tooC, toolIndex)"
+                        src="../assets/icon/thirdToolList/score.png"
+                        alt=""
+                      />
+                      <div style="margin: 5px 0">量规评分</div>
                     </div>
                   </div>
                 </div>
                 <div style="padding: 0 0 20px 30px">
                   <div style="margin: 0 0 20px 0">工具描述</div>
-                  <div style="width: 380px; height: 150px; overflow: auto">
+                  <div>
                     {{ tool.toolDetail != "" ? tool.toolDetail : "暂无描述" }}
                   </div>
                 </div>
@@ -751,7 +759,7 @@
       </span>
     </el-dialog>
     <el-dialog
-      title="查看文本"
+      title="查看文本"
       :visible.sync="dialogVisible1"
       :append-to-body="true"
       width="500px"
@@ -763,7 +771,7 @@
           <div style="font-size: 20px">{{ text.name }}</div>
           <!-- <el-input v-model="AttText.title" auto-complete="off" placeholder="请输入文本标题..."></el-input> -->
         </el-form-item>
-        <div>文本内容</div>
+        <div>文本内容</div>
         <!-- <editor-bar v-model="AttText.text" @change="change"></editor-bar> -->
         <div
           v-html="text.url"
@@ -777,6 +785,134 @@
         >
       </span>
     </el-dialog>
+    <el-dialog
+      title="查看工具"
+      :visible.sync="dialogVisible2"
+      :append-to-body="true"
+      width="500px"
+      :before-close="handleClose"
+      class="dialog_diy toolsCss"
+    >
+      <div class="toolHeng">
+        <div
+          class="filebox"
+          style="min-width: 480px; flex-wrap: nowrap; width: 90%"
+        >
+          <div style="display: flex; flex-flow: row wrap">
+            <div class="addPoint">
+              <div
+                v-if="
+                  chapTools.url ? chapTools.url.indexOf(8) != -1 : undefined
+                "
+              >
+                <img
+                  src="../assets/icon/secondToolList/library.png"
+                  alt=""
+                  @click="addTools(8)"
+                />
+                <div style="margin: 5px 0">素材库</div>
+              </div>
+              <div
+                v-if="
+                  chapTools.url ? chapTools.url.indexOf(1) != -1 : undefined
+                "
+              >
+                <img
+                  @click="addTools(1)"
+                  src="../assets/icon/secondToolList/whiteBoard.png"
+                  alt=""
+                />
+                <div style="margin: 5px 0">电子白板</div>
+              </div>
+              <div
+                v-if="
+                  chapTools.url ? chapTools.url.indexOf(2) != -1 : undefined
+                "
+              >
+                <img
+                  @click="addTools(2)"
+                  src="../assets/icon/secondToolList/note.png"
+                  alt=""
+                />
+                <div style="margin: 5px 0">便签</div>
+              </div>
+              <div
+                v-if="
+                  chapTools.url ? chapTools.url.indexOf(3) != -1 : undefined
+                "
+              >
+                <img
+                  @click="addTools(3)"
+                  src="../assets/icon/secondToolList/mindMapping.png"
+                  alt=""
+                />
+                <div style="margin: 5px 0">思维导图</div>
+              </div>
+              <div
+                v-if="
+                  chapTools.url ? chapTools.url.indexOf(6) != -1 : undefined
+                "
+              >
+                <img
+                  @click="addTools(6)"
+                  src="../assets/icon/secondToolList/doc.png"
+                  alt=""
+                />
+                <div style="margin: 5px 0">协同文档</div>
+              </div>
+              <div
+                v-if="
+                  chapTools.url ? chapTools.url.indexOf(7) != -1 : undefined
+                "
+              >
+                <img
+                  @click="addTools(7)"
+                  src="../assets/icon/secondToolList/mindNetwork.png"
+                  alt=""
+                />
+                <div style="margin: 5px 0">思维网格</div>
+              </div>
+              <div
+                v-if="
+                  chapTools.url ? chapTools.url.indexOf(4) != -1 : undefined
+                "
+              >
+                <img
+                  @click="addTools(4)"
+                  src="../assets/icon/thirdToolList/ask.png"
+                  alt=""
+                />
+                <div style="margin: 5px 0">问卷调查</div>
+              </div>
+              <div
+                v-if="
+                  chapTools.url ? chapTools.url.indexOf(5) != -1 : undefined
+                "
+              >
+                <img
+                  @click="addTools(5)"
+                  src="../assets/icon/thirdToolList/score.png"
+                  alt=""
+                />
+                <div style="margin: 5px 0">量规评分</div>
+              </div>
+            </div>
+          </div>
+          <div style="padding: 0 0 20px 30px">
+            <div style="margin: 0 0 20px 0">工具描述</div>
+            <div>
+              {{ chapTools.name != "" ? chapTools.name : "暂无描述" }}
+            </div>
+          </div>
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="dialogVisible2 = false"
+          >确定</el-button
+        >
+      </span>
+    </el-dialog>
+
     <el-dialog
       title="提示"
       :visible.sync="dialogVisible4"
@@ -807,6 +943,10 @@ export default {
       vedio: [],
       text: [],
       textList: [],
+      line: [],
+      lineList: [],
+      chapTools: [],
+      chapToolList: [],
       file: [],
       rateList: {
         ca: 0,
@@ -870,6 +1010,7 @@ export default {
       pictureDialog: false,
       toolTypeList: [],
       dialogVisible1: false,
+      dialogVisible2: false,
       dialogVisible4: false,
       isNoHomeWork: false,
       dialogVisible5: false,
@@ -1113,7 +1254,7 @@ export default {
       this.isAsk = false;
       this.getHomeWork();
       this.getStudentAsk();
-      var a = this.chapInfo.chapterInfo[0].taskJson[this.taskCount];
+      var a = this.chapInfo.chapterInfo[0].taskJson[i];
       var b = [
         "AVI",
         "NAVI",
@@ -1148,22 +1289,29 @@ export default {
       ];
       this.vedio = [];
       this.textList = [];
+      this.lineList = [];
+      this.chapToolList = [];
       this.file = [];
       var c = a.chapterData;
       for (var j = 0; j < c.length; j++) {
-        if (
-          b.indexOf(
-            c[j].url
-              .split(".")
-              [c[j].url.split(".").length - 1].toLocaleUpperCase()
-          ) != -1
-        ) {
-          this.vedio.push(c[j]);
-        } else {
-          this.file.push(c[j]);
-        }
-        if (c[j].type == 6) {
+        if (c[j].type == 7) {
+          this.chapToolList.push(c[j]);
+        } else if (c[j].type == 8) {
+          this.lineList.push(c[j]);
+        } else if (c[j].type == 6) {
           this.textList.push(c[j]);
+        } else {
+          if (
+            b.indexOf(
+              c[j].url
+                .split(".")
+                [c[j].url.split(".").length - 1].toLocaleUpperCase()
+            ) != -1
+          ) {
+            this.vedio.push(c[j]);
+          } else {
+            this.file.push(c[j]);
+          }
         }
       }
 
@@ -1247,9 +1395,7 @@ export default {
           this.chapInfo = JSON.parse(this.courseDetail.chapters)[t];
           this.chapInfoList = JSON.parse(this.courseDetail.chapters);
           this.playerOptions.sources[0].src =
-            this.vedio.length > 0
-              ? this.vedio[0].url
-              : require("../assets/icon/wheel.png");
+            this.vedio.length > 0 ? this.vedio[0].url : this.mr;
           this.playerO = this.playerOptions;
           // var a = this.chapInfo.chapterInfo[0].homeworkList;
           // for (var k = 0; k < a.length; k++) {
@@ -1330,6 +1476,10 @@ export default {
       this.text = this.textList[i];
       this.dialogVisible1 = true;
     },
+    lookTools(i) {
+      this.chapTools = this.chapToolList[i];
+      this.dialogVisible2 = true;
+    },
     downFile(i) {
       window.open(this.file[i].url);
     },
@@ -1584,20 +1734,25 @@ export default {
           a = this.askCount;
           this.toolsCount(a, t);
         }
+        if (!this.dialogVisible2) {
+          this.askJson.askJson =
+            this.chapInfo.chapterInfo[0].taskJson[this.taskCount].toolChoose[
+              i
+            ].askJson[0];
+          this.askJson.askTitle =
+            this.chapInfo.chapterInfo[0].taskJson[this.taskCount].toolChoose[
+              i
+            ].askTitle;
+          this.askJson.askCount =
+            this.chapInfo.chapterInfo[0].taskJson[this.taskCount].toolChoose[
+              i
+            ].askCount;
+        } else {
+          this.askJson.askJson = this.chapTools.askJson.askJson[0];
+          this.askJson.askTitle = this.chapTools.askJson.askTitle;
+          this.askJson.askCount = this.chapTools.askJson.askCount;
+        }
         this.dialogVisible5 = true;
-        this.askJson.askJson =
-          this.chapInfo.chapterInfo[0].taskJson[this.taskCount].toolChoose[
-            i
-          ].askJson[0];
-        this.askJson.askTitle =
-          this.chapInfo.chapterInfo[0].taskJson[this.taskCount].toolChoose[
-            i
-          ].askTitle;
-        this.askJson.askCount =
-          this.chapInfo.chapterInfo[0].taskJson[this.taskCount].toolChoose[
-            i
-          ].askCount;
-        console.log(this.askJson);
         // window.parent.postMessage({ tools: "4" }, "*");
       } else if (t == 5) {
         if (this.scoreCount > 0) {
@@ -1798,6 +1953,10 @@ export default {
   height: 30px;
   box-sizing: border-box;
   display: flex;
+  width: 215px;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
   padding: 0 10px;
 }
 .study_top .checked {
@@ -1805,7 +1964,7 @@ export default {
   padding-bottom: 5px;
   color: #3fc6a0;
   display: flex;
-  height: 31px;
+  height: 35px;
 }
 .study_top .checked > div,
 .study_top .check > div {
@@ -2209,12 +2368,19 @@ export default {
   width: 200px;
   height: 530px;
   border-radius: 10px;
-  /* overflow: auto; */
+  overflow: auto;
 }
 .vedioNav {
-  margin: 10px 15px;
+  margin: 10px 0 0 15px;
   border-bottom: 1px solid #d7d7d7;
   padding-bottom: 5px;
+  background: #d2e3ff;
+  width: 60px;
+  border-radius: 5px;
+  color: #4d97d6;
+  text-align: center;
+  height: 20px;
+  line-height: 26px;
 }
 .queTop {
   display: flex;
@@ -2292,15 +2458,22 @@ export default {
   padding-bottom: 10px;
   margin: 0 30px;
 }
-.addPoint > img {
+.addPoint > div > img {
   cursor: pointer;
   margin: 0 20px;
 }
 .addPoint {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: wrap;
+  align-items: center;
+}
+.addPoint > div {
   display: flex;
   flex-direction: column;
   flex-wrap: nowrap;
   align-items: center;
+  margin: 0 15px 10px 0;
 }
 .ediBottom {
   margin-left: 20px;
@@ -2387,6 +2560,9 @@ export default {
 .a_add_input >>> el-radio-group {
   margin: 10px 0;
 }
+.a_add_input >>> .el-radio {
+  margin-bottom: 10px;
+}
 .redioStyle >>> .el-radio__label {
   font-size: 18px;
 }
@@ -2416,4 +2592,29 @@ export default {
 .textCss >>> .el-dialog__footer {
   padding-top: 38px;
 }
+
+.toolsCss >>> .el-dialog__body {
+  padding: 20px;
+}
+
+.lineCss >>> .el-dialog__body {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: center;
+}
+.newNav {
+  display: flex;
+  flex-direction: row;
+  align-items: baseline;
+  justify-content: flex-start;
+}
+.navText {
+  cursor: pointer;
+  margin: 0px 0px 10px 5px;
+  width: 112px;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
 </style>

Some files were not shown because too many files changed in this diff