zengyicheng 3 years ago
parent
commit
343635466b

+ 1 - 1
dist/index.html

@@ -25,4 +25,4 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.b7c7b57b1de505fa551d7c4197c1dc69.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3b33e268f4f77bae1f08.js></script><script type=text/javascript src=./static/js/vendor.57c88615aac160d2c474.js></script><script type=text/javascript src=./static/js/app.42c4f8bce33503d485e9.js></script></body></html>
+    }</style><link href=./static/css/app.21046ee9c8277f4c78d78ffbe8c37642.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3b33e268f4f77bae1f08.js></script><script type=text/javascript src=./static/js/vendor.57c88615aac160d2c474.js></script><script type=text/javascript src=./static/js/app.2db0123c2faf07eb576c.js></script></body></html>

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


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


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


BIN
dist/static/img/word.76356c6.png


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


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


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


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


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


+ 131 - 39
src/components/pages/addCourse.vue

@@ -165,6 +165,7 @@
                       <div class="bInfo_title">课程封面</div>
 
                       <el-upload
+                        :class="{ disUoloadSty: noneBtnImg }"
                         class="upCss"
                         action="#"
                         list-type="picture"
@@ -266,6 +267,36 @@
                     <img src="../../assets/icon/check.png" alt="" v-else />
                   </div>
                 </div>
+                <div
+                  class="wordTeacher"
+                  @click="checkTemplate1(myWord)"
+                  v-if="cid != '' && cid != undefined"
+                >
+                  <div class="wordPic">
+                    <img src="../../assets/icon/wordMub.png" alt="" />
+                  </div>
+
+                  <div
+                    style="
+                      margin-top: 10px;
+                      line-height: 19px;
+                      overflow: hidden;
+                      text-overflow: ellipsis;
+                      white-space: nowrap;
+                      padding: 0 20px;
+                    "
+                  >
+                    我的文档
+                  </div>
+                  <div class="checkword">
+                    <img
+                      src="../../assets/icon/checked.png"
+                      alt=""
+                      v-if="cid != '' && cid != undefined"
+                    />
+                    <img src="../../assets/icon/check.png" alt="" v-else />
+                  </div>
+                </div>
               </div>
             </div>
           </div>
@@ -286,7 +317,7 @@
                 <div class="cru_selectBox">
                   <div
                     v-for="(item, index) in unitJson"
-                    :key="item.id"
+                    :key="index"
                     class="cru_select"
                     :class="unitIndex == index ? 'cru_selected' : 'cru_select'"
                     @click="unitSet(index)"
@@ -309,7 +340,7 @@
               <div
                 class="chapter_box"
                 v-for="(item, index) in unitJson[unitIndex].chapterInfo"
-                :key="item.id"
+                :key="index"
               >
                 <div>
                   <div class="chapter_contentbox">
@@ -327,6 +358,18 @@
                       @click="deleteUnit(unitIndex)"
                     ></div>
                   </div>
+                  <div style="margin: 30px 0 20px 0px; font-size: 18px">
+                    阶段描述
+                  </div>
+                  <div>
+                    <textarea
+                      rows="6"
+                      class="binfo_input"
+                      cols=""
+                      style="width: 80% !important"
+                      v-model="unitJson[unitIndex].dyText"
+                    ></textarea>
+                  </div>
                   <el-switch
                     v-model="unitJson[unitIndex].isTalk"
                     active-text="是否开启评价"
@@ -337,7 +380,7 @@
                 <div
                   style="
                     display: flex;
-                    margin: 15px 0;
+                    margin: 23px 0;
                     flex-direction: row;
                     justify-content: flex-start;
                     align-items: center;
@@ -356,14 +399,14 @@
                 </div>
                 <div class="toolChoose">
                   <div class="tool">
-                    <div class="whiteBIcon" @click="toolChoose = 1">
+                    <div class="whiteBIcon" @click="addTools(1)">
                       <img src="../../assets/icon/whiteBordIcon.png" alt="" />
                     </div>
-                    <div class="check" @click="toolChoose = 1">
+                    <div class="check">
                       <img
                         src="../../assets/icon/checkNo.png"
                         alt=""
-                        v-if="toolChoose != 1"
+                        v-if="item.toolChoose.indexOf(1) == -1"
                       />
                       <img
                         src="../../assets/icon/checkedIs.png"
@@ -373,14 +416,14 @@
                     </div>
                   </div>
                   <div class="tool">
-                    <div class="whiteBIcon" @click="toolChoose = 2">
+                    <div class="whiteBIcon" @click="addTools(2)">
                       <img src="../../assets/icon/noteIcon.png" alt="" />
                     </div>
-                    <div class="check" @click="toolChoose = 2">
+                    <div class="check">
                       <img
                         src="../../assets/icon/checkNo.png"
                         alt=""
-                        v-if="toolChoose != 2"
+                        v-if="item.toolChoose.indexOf(2) == -1"
                       />
                       <img
                         src="../../assets/icon/checkedIs.png"
@@ -390,14 +433,14 @@
                     </div>
                   </div>
                   <div class="tool">
-                    <div class="whiteBIcon" @click="toolChoose = 3">
+                    <div class="whiteBIcon" @click="addTools(3)">
                       <img src="../../assets/icon/mindIcon.png" alt="" />
                     </div>
-                    <div class="check" @click="toolChoose = 3">
+                    <div class="check">
                       <img
                         src="../../assets/icon/checkNo.png"
                         alt=""
-                        v-if="toolChoose != 3"
+                        v-if="item.toolChoose.indexOf(3) == -1"
                       />
                       <img
                         src="../../assets/icon/checkedIs.png"
@@ -407,14 +450,14 @@
                     </div>
                   </div>
                   <div class="tool">
-                    <div class="whiteBIcon" @click="toolChoose = 4">
+                    <div class="whiteBIcon" @click="addTools(4)">
                       <img src="../../assets/icon/askIcon.png" alt="" />
                     </div>
-                    <div class="check" @click="toolChoose = 4">
+                    <div class="check">
                       <img
                         src="../../assets/icon/checkNo.png"
                         alt=""
-                        v-if="toolChoose != 4"
+                        v-if="item.toolChoose.indexOf(4) == -1"
                       />
                       <img
                         src="../../assets/icon/checkedIs.png"
@@ -424,14 +467,14 @@
                     </div>
                   </div>
                   <div class="tool">
-                    <div class="whiteBIcon" @click="toolChoose = 5">
+                    <div class="whiteBIcon" @click="addTools(5)">
                       <img src="../../assets/icon/scoreIcon.png" alt="" />
                     </div>
-                    <div class="check" @click="toolChoose = 5">
+                    <div class="check">
                       <img
                         src="../../assets/icon/checkNo.png"
                         alt=""
-                        v-if="toolChoose != 5"
+                        v-if="item.toolChoose.indexOf(5) == -1"
                       />
                       <img
                         src="../../assets/icon/checkedIs.png"
@@ -441,14 +484,14 @@
                     </div>
                   </div>
                   <div class="tool">
-                    <div class="whiteBIcon" @click="toolChoose = 6">
+                    <div class="whiteBIcon" @click="addTools(6)">
                       <img src="../../assets/icon/wordIcon.png" alt="" />
                     </div>
-                    <div class="check" @click="toolChoose = 6">
+                    <div class="check">
                       <img
                         src="../../assets/icon/checkNo.png"
                         alt=""
-                        v-if="toolChoose != 6"
+                        v-if="item.toolChoose.indexOf(6) == -1"
                       />
                       <img
                         src="../../assets/icon/checkedIs.png"
@@ -576,6 +619,7 @@
                                 width: 55%;
                                 minwidth: 215px;
                                 z-index: 99;
+                                font-size: 14px;
                               "
                             />
                             <input
@@ -882,14 +926,12 @@ export default {
       checkedCities: [],
       isIndeterminate: true,
       steps: 1,
-      toolChoose: 0,
       courseName: "",
       isTeacherSee: false,
       courseText: "",
       formLabelWidth: "100px",
       uploadLoading1: false,
       noneBtnImg: false,
-      noneBtnImg1: false,
       updateBoolean2: false,
       unitIndex: 0,
       dialogVisible: false,
@@ -899,10 +941,13 @@ export default {
       searchPeople: "",
       userid: this.$route.query.userid,
       oid: this.$route.query.oid,
+      cid: this.$route.query.cid != "" ? this.$route.query.cid : "",
       cover: [], //课程封面
+      myWord: [],
       unitJson: [
         {
           dyName: "", //单元标题
+          dyText: "",
           startTime: "", //开始时间
           endTime: "", //结束时间
           isTalk: false, //是否开启评价
@@ -913,6 +958,7 @@ export default {
               title: "",
               courseName: "",
               chapterData: [],
+              toolChoose: [],
               itemCount: 1,
               fileList1: [],
               homeworkList: [],
@@ -1016,17 +1062,12 @@ export default {
         }
       }
       if (s == 3) {
-        if (
-          this.courseName != "" &&
-          this.courseText != "" &&
-          this.checkboxList.length != 0 &&
-          this.templateC.id != undefined
-        ) {
+        if (this.templateC.id != undefined) {
           this.cTemplate = this.templateC.content;
           this.dialogVisible2 = false;
           this.steps = 3;
         } else {
-          this.$message.error("请将信息填写完整");
+          this.$message.error("请选择文档");
           return;
         }
       }
@@ -1083,11 +1124,11 @@ export default {
           })
           .then(() => {
             _this.unitJson.splice(i, 1);
-            var a = 0;
-            if (_this.unitIndex > 0) {
-              a = _this.unitIndex - 1;
-            }
-
+            // var a = 0;
+            // if (_this.unitIndex > 0) {
+            //   a = _this.unitIndex - 1;
+            // }
+            this.unitIndex = this.unitIndex - 1;
             _this.$message.success("删除成功");
           })
           .catch(() => {
@@ -1306,6 +1347,7 @@ export default {
     addunit() {
       this.unitJson.push({
         dyName: "", //单元标题
+        dyText: "",
         startTime: "", //开始时间
         endTime: "", //结束时间
         isTalk: false, //是否开启评价
@@ -1318,6 +1360,7 @@ export default {
             chapterData: [],
             itemCount: 1,
             fileList1: [],
+            toolChoose: [],
             homeworkList: [],
             video: [],
             testData: [],
@@ -1488,6 +1531,11 @@ export default {
       this.cTemplate = res.content;
       this.dialogVisible2 = true;
     },
+    checkTemplate1(w) {
+      this.templateC.title = "我的文档";
+      this.cTemplate = w;
+      this.dialogVisible2 = true;
+    },
     wordNext() {
       //   this.cTemplate = this.templateC.content;
       //   this.steps++;
@@ -1496,8 +1544,52 @@ export default {
     addPP() {
       this.dialogVisible3 = true;
     },
+    addTools(i) {
+      if (this.unitJson[this.unitIndex].chapterInfo[0].toolChoose.length == 0) {
+        this.unitJson[this.unitIndex].chapterInfo[0].toolChoose.push(i);
+      } else {
+        if (
+          this.unitJson[this.unitIndex].chapterInfo[0].toolChoose.indexOf(i) !=
+          -1
+        ) {
+          this.unitJson[this.unitIndex].chapterInfo[0].toolChoose.splice(
+            this.unitJson[this.unitIndex].chapterInfo[0].toolChoose.indexOf(i),
+            1
+          );
+        } else {
+          this.unitJson[this.unitIndex].chapterInfo[0].toolChoose.push(i);
+        }
+      }
+    },
+    selectCourseDetail() {
+      if (this.cid == "" || this.cid == undefined) {
+        console.log("这是新增课程");
+      } else {
+        let params = {
+          cid: this.cid,
+        };
+        this.ajax
+          .get(this.$store.state.api + "select_course_detail", params)
+          .then((res) => {
+            this.unitJson = res.data[0][0];
+            this.courseName = res.data[0][0].title;
+            this.courseText = res.data[0][0].brief;
+            this.checkboxList = JSON.parse(res.data[0][0].course_student);
+            this.cover = JSON.parse(res.data[0][0].cover);
+            this.noneBtnImg = this.cover.length >= 1;
+            this.isTeacherSee =
+              res.data[0][0].is_teacher_look == 0 ? true : false;
+            this.myWord = res.data[0][0].template;
+            this.templateC.id = "123";
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      }
+    },
   },
   created() {
+    this.selectCourseDetail();
     this.getStudent();
     this.getTemplate();
   },
@@ -1771,7 +1863,7 @@ export default {
 
 .cru_selectBox {
   display: flex;
-  margin: 15px 0 10px;
+  margin: 24px 0 10px;
   flex-wrap: nowrap;
   white-space: nowrap;
   overflow: auto;
@@ -1929,8 +2021,8 @@ export default {
   margin-left: 20px;
 }
 
-.disUoloadSty >>> .el-upload--picture-card {
-  display: none; /* 上传按钮隐藏 */
+.disUoloadSty >>> .el-icon-plus {
+  display: none !important; /* 上传按钮隐藏 */
 }
 
 .imgLeft {
@@ -2215,7 +2307,7 @@ export default {
   background-size: 100% 100%;
 }
 .chapter_upload_l_i5 {
-  background-image: url(/static/img/word.76356c6.png);
+  background-image: url("../../assets/icon/word.png");
   width: 24px;
   height: 24px;
   /* margin: 10px auto 0 auto; */

+ 16 - 2
src/components/pages/course.vue

@@ -45,7 +45,21 @@
             </div>
             <div class="three_bottom">
               <div @click="jump(item.courseId)">开始教学</div>
-              <div v-if="groupA == '0'">修改</div>
+              <div
+                v-if="groupA == '0'"
+                @click="
+                  goTo(
+                    '/course/addCourse?cid=' +
+                      item.courseId +
+                      '&userid=' +
+                      userid +
+                      '&oid=' +
+                      oid
+                  )
+                "
+              >
+                修改
+              </div>
               <div
                 @click="
                   goTo(
@@ -151,7 +165,7 @@ export default {
       //     "&userid=" +
       //     this.userid
       // );
-      window.parent.postMessage({cid:cid,type:"1"},'*')
+      window.parent.postMessage({ cid: cid, type: "1" }, "*");
     },
     handle_remove(file, fileList) {
       var _tmp = this.fileList;

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