lsc 7 months ago
parent
commit
4f4e00164f

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.6838dec84a72d1c013785973377367d0.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.ee476e38463461edca63.js></script><script type=text/javascript src=./static/js/app.a1f44f4ebe4882aae1f6.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.65a0ad7aa66ea53f4f8fc60046fff3a8.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.ee476e38463461edca63.js></script><script type=text/javascript src=./static/js/app.fec7558edac3b4d2f093.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

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


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


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


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


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


+ 205 - 6
src/components/pages/aiAddCourse/addCourse.vue

@@ -981,7 +981,7 @@
                               item1.type == 13 ||
                               item1.type == 7
                             " :placeholder="item1.name"  @click.stop="
-                              checkChpater2($event, index1 )
+                              checkChpater3($event, index1, item1)
                               " style="
                                           border: none;
                                           outline: none;
@@ -1027,7 +1027,7 @@
                           <div class="chapter_upload_ic">
                             <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
                             <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
-                              checkChpater3($event, index1 )
+                              checkChpater3($event, index1, item1)
                               ">
                               <div></div>
                             </div>
@@ -5487,6 +5487,146 @@
           <el-input v-model="testJson.testTitle" placeholder="请输入标题" style="width: 400px"></el-input>
         </div> -->
         <div class="a_addBox" style="height: 100%">
+          <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
+            <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
+              上传补充资料
+              <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" style="display: none" v-if="inputShow" @change="
+                beforeUploadInfo2(
+                  $event,
+                  17
+                )
+                " />
+            </button>
+            <div style="margin-top: 10px;width:100%" v-if="xuanzeInfoData.length">
+              <div class="add_chapters_box add_c_none" v-if="
+                xuanzeInfoData &&
+                xuanzeInfoData.length == 0
+              ">
+                <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
+              </div>
+              <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
+                <div class="chapter_upload" v-for="(item1, index1) in xuanzeInfoData" :key="item1.id" @click="
+                        getChapterData(
+                          $event,
+                          index1,
+                          item1.type
+                        )
+                        " >
+                  <div class="chapter_upload_o" style="
+                                position: relative;
+                                display: flex;
+                                align-items: center;
+                              ">
+                    <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
+                      <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
+                      <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
+                      </div>
+                      <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
+                      </div>
+                      <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
+                      <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
+                      </div>
+                      <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
+                      </div>
+                      <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
+                      </div>
+                      <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
+                      </div>
+                    </div>
+                    <div class="chapter_upload_n">
+                      <input readonly="true" v-if="
+                        item1.type == 2 ||
+                        item1.type == 3 ||
+                        item1.type == 12 ||
+                        item1.type == 13 ||
+                        item1.type == 7
+                      " :placeholder="item1.name"  @click.stop="
+                        checkChpater3($event, index1, item1)
+                        " style="
+                                    border: none;
+                                    outline: none;
+                                    width: 80%;
+                                    minwidth: 215px;
+                                    z-index: 99;
+                                    font-size: 14px;
+                                    white-space: nowrap;
+                                    overflow: hidden;
+                                    text-overflow: ellipsis;
+                                  " />
+                      <input :placeholder="item1.name" v-if="item1.type == 6" style="
+                                    border: none;
+                                    outline: none;
+                                    width: 80%;
+                                    white-space: nowrap;
+                                    overflow: hidden;
+                                    text-overflow: ellipsis;
+                                  " readonly="true" @click="
+                                    selectAttText(index1)
+                                    " />
+                      <input :placeholder="item1.title ? item1.title : '链接'
+                        " v-if="item1.type == 8" style="
+                                    border: none;
+                                    outline: none;
+                                    width: 80%;
+                                    white-space: nowrap;
+                                    overflow: hidden;
+                                    text-overflow: ellipsis;
+                                  " readonly="true" @click="selectLine(index1)" />
+                      <input :placeholder="item1.title ? item1.title : '链接'
+                        " v-if="item1.type == 14" style="
+                                    border: none;
+                                    outline: none;
+                                    width: 80%;
+                                    white-space: nowrap;
+                                    overflow: hidden;
+                                    text-overflow: ellipsis;
+                                  " readonly="true" @click="
+                                    openUpdateSource(index1)
+                                    " />
+                    </div>
+                    <div class="chapter_upload_ic">
+                      <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
+                      <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
+                        checkChpater3($event, index1, item1)
+                        ">
+                        <div></div>
+                      </div>
+                      <div class="chapter_upload_ic_r" @click.stop="
+                        deletexuanzeInfoData(
+                          $event,
+                          index1
+                        )
+                        ">
+                        <div></div>
+                      </div>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+            <div v-if="
+              xuanzeinfoproVisible
+            " class="mask">
+              <div class="progressBox">
+                <div class="lbox">
+                  <img src="../../../assets/loading.gif" />上传中,请稍后
+                </div>
+                <div style="margin-bottom: 10px">
+                  <span>{{
+                    xuanzeinfoisFinishSize
+                    }}M</span>
+                  /
+                  <span>{{
+                    xuanzeinfoisAllSize
+                    }}M</span>
+                </div>
+                <el-progress :text-inside="true" :stroke-width="20" :percentage="xuanzeinfoprogress
+                  ? xuanzeinfoprogress
+                  : 0
+                  " style="width: 80%"></el-progress>
+              </div>
+            </div>
+          </div>
           <div style="
               font-size: 16px;
               color: #c7c7c7;
@@ -6996,6 +7136,11 @@ export default {
       mubiaoinfoisFinishSize: 0,
       mubiaoinfoisAllSize: 0,
       mubiaoinfoprogress: 0,
+      xuanzeInfoData: [],
+      xuanzeinfoproVisible: false,
+      xuanzeinfoisFinishSize: 0,
+      xuanzeinfoisAllSize: 0,
+      xuanzeinfoprogress: 0,
     };
   },
   directives: {
@@ -9350,11 +9495,16 @@ export default {
         _this.teacherinfoproVisible = true;
         _this.teacherinfoisFinishSize = 0;
         _this.teacherinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
-      }else  if(type == 16){
+      }else if(type == 16){
         _this.mubiaoinfoprogress = 0;
         _this.mubiaoinfoproVisible = true;
         _this.mubiaoinfoisFinishSize = 0;
         _this.mubiaoinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
+      }else if(type == 17){
+        _this.xuanzeinfoprogress = 0;
+        _this.xuanzeinfoproVisible = true;
+        _this.xuanzeinfoisFinishSize = 0;
+        _this.xuanzeinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
       }else{
         _this.infoprogress = 0;
         _this.infoproVisible = true;
@@ -9391,6 +9541,9 @@ export default {
             }else if(type == 16){
               _this.mubiaoinfoprogress = parseInt((evt.loaded / evt.total) * 100);
               _this.mubiaoinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
+            }else if(type == 17){
+              _this.xuanzeinfoprogress = parseInt((evt.loaded / evt.total) * 100);
+              _this.xuanzeinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
             }else {
               _this.infoprogress = parseInt((evt.loaded / evt.total) * 100);
               _this.infoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
@@ -9405,6 +9558,9 @@ export default {
             }else if(type == 16){
               _this.mubiaoinfoprogress = 100;
               _this.mubiaoinfoisFinishSize = _this.mubiaoinfoisAllSize;
+            }else if(type == 17){
+              _this.xuanzeinfoprogress = 100;
+              _this.xuanzeinfoisFinishSize = _this.xuanzeinfoisAllSize;
             }else {
               _this.infoprogress = 100;
               _this.infoisFinishSize = _this.infoisAllSize;
@@ -9418,6 +9574,8 @@ export default {
                   _this.teacherinfoproVisible = false;
                 }else if(type == 16){
                   _this.mubiaoinfoproVisible = false;
+                }else if(type == 17){
+                  _this.xuanzeinfoproVisible = false;
                 }else{
                   _this.infoproVisible = false;
                 }
@@ -9433,6 +9591,8 @@ export default {
                   _this.teacherinfoproVisible = false;
                 }else if(type == 16){
                   _this.mubiaoinfoproVisible = false;
+                }else if(type == 17){
+                  _this.xuanzeinfoproVisible = false;
                 }else{
                   _this.infoproVisible = false;
                 }
@@ -9606,6 +9766,14 @@ export default {
                   type: _type,
                   fileid: fileid == 1 ? '' : fileid,
                 });
+              }else if (type == 17) {
+                _this.xuanzeInfoData.push({
+                  name: file.name,
+                  url: data.Location,
+                  uid: file.uid,
+                  type: _type,
+                  fileid: fileid == 1 ? '' : fileid,
+                });
               }
               console.log(data.Location);
               console.log(fileid);
@@ -10325,6 +10493,25 @@ export default {
           return;
         });
     },
+    deletexuanzeInfoData(e, ic) {
+      e.stopPropagation();
+      let _this = this;
+      _this
+        .$confirm("确定删除此项?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+        .then(() => {
+          _this.xuanzeInfoData.splice(
+            ic,
+            1
+          );
+        })
+        .catch(() => {
+          return;
+        });
+    },
     deleteCankaoInfoData(e, ic) {
       e.stopPropagation();
       let _this = this;
@@ -10463,8 +10650,8 @@ export default {
       }
       
     },
-    checkChpater3(e, ic){
-      let type = this.mubiaoInfoData[ic].type
+    checkChpater3(e, ic, item){
+      let type = item.type
       if(type == 3){
         var fileA = [
           "DOC",
@@ -10484,7 +10671,7 @@ export default {
           "XLSX",
           "XLS"
         ];
-        let url = this.mubiaoInfoData[ic].url
+        let url = item.url
         if (
           fileA.indexOf(
             url.split(".")[
@@ -10761,6 +10948,7 @@ export default {
             targetCourseText: this.targetCourseText,
             cankaoInfoData: this.cankaoInfoData,
             mubiaoInfoData: this.mubiaoInfoData,
+            xuanzeInfoData: this.xuanzeInfoData,
             infoData2: this.infoData2,
             isuseT: this.isuseT,
             mode: this.mode,
@@ -11027,6 +11215,7 @@ export default {
             targetCourseText: this.targetCourseText,
             cankaoInfoData: this.cankaoInfoData,
             mubiaoInfoData: this.mubiaoInfoData,
+            xuanzeInfoData: this.xuanzeInfoData,
             infoData2: this.infoData2,
             isuseT: this.isuseT,
             mode: this.mode,
@@ -13139,6 +13328,7 @@ export default {
                 this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
                 this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
                 this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
+                this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
                 this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
                 this.isuseT = JSON.parse(res.data[0][0].setting).isuseT ? JSON.parse(res.data[0][0].setting).isuseT : JSON.parse(res.data[0][0].setting).isuseT === false ? false : false;
                 this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
@@ -13279,6 +13469,7 @@ export default {
                 this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
                 this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
                 this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
+                this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
                 this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
                 this.isuseT = JSON.parse(res.data[0][0].setting).isuseT ? JSON.parse(res.data[0][0].setting).isuseT : JSON.parse(res.data[0][0].setting).isuseT === false ? false : false;
                 this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
@@ -17683,6 +17874,14 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','')
         }
       }
 
+      if (_this.xuanzeInfoData.length) {
+        for (var i = 0; i < _this.xuanzeInfoData.length; i++) {
+          if(_this.xuanzeInfoData[i].fileid){
+            fileid.push(_this.xuanzeInfoData[i].fileid)
+          }
+        }
+      }
+
       let sub = []
       let mclass = []
       if (this.courseTypeId.length) {

+ 1 - 1
src/components/pages/course.vue

@@ -265,7 +265,7 @@
 								</div>
     					</el-tooltip>
 
-							<el-tooltip effect="dark" content="删除" placement="top">
+							<el-tooltip effect="dark" content="删除" placement="top" v-if="item.isCourseType == 1 || role == '1'">
     					  <div class="t_b_Item" @click="deleteCourse(item.courseId)">
 									<img src="../../assets/icon/course/del.svg">
 								</div>

+ 2 - 1
src/components/pages/evaBox/index.vue

@@ -132,6 +132,7 @@
                     placement="bottom"
                   >
                     <div
+                      v-if="item.userid == userid || type !== 0"
                       class="reName"
                       @click.stop="reName(item.id, item.name)"
                     ></div>
@@ -142,7 +143,7 @@
                     content="设置分类"
                     placement="bottom"
                   >
-                    <div class="grouping" @click.stop="grouping(item.id)"></div>
+                    <div class="grouping" @click.stop="grouping(item.id)" v-if="item.userid == userid || type !== 0"></div>
                   </el-tooltip>
                   <el-tooltip
                     class="item"

+ 50 - 3
src/components/pages/newCourse/addCourse.vue

@@ -8608,7 +8608,32 @@ export default {
           .then(() => {
             _this.isDelete = 2;
             // _this.unitIndex = _this.unitIndex - 1;
-            _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
+            if(_this.cid){
+                _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
+              }else {
+                _this.$message({
+                  message: "删除成功",
+                  type: "success",
+                });
+                let task = JSON.parse(
+                  JSON.stringify(
+                    _this.unitJson[this.unitIndex].chapterInfo[0].taskJson
+                  )
+                );
+                _this.unitJson.splice(_this.unitIndex, 1);
+                if (_this.unitIndex == 0) {
+                  _this.unitIndex = 0;
+                } else {
+                  _this.unitIndex = _this.unitIndex - 1;
+                }
+
+                if (JSON.stringify(task) != JSON.stringify(_this.taskJSONa)) {
+                  _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson = [
+                    ..._this.unitJson[_this.unitIndex].chapterInfo[0].taskJson,
+                    ...task,
+                  ];
+                }
+            }
             // _this.$message.success("删除成功");
           })
           .catch(() => {
@@ -10756,7 +10781,25 @@ export default {
         _res = JSON.parse(res.chapters);
         this.updateCourseState(parseInt(res.state));
       }
-      _this
+      if(_this.unitJson.length == 1 
+      && _this.unitJson[0].chapterInfo[0].taskJson.length == 1 
+      && !_this.unitJson[0].chapterInfo[0].taskJson[0].task
+      && !_this.unitJson[0].chapterInfo[0].taskJson[0].taskDetail
+      && !_this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.length){
+        _this.unitJson = _res;
+        if(_this.cid){
+          _this.updateWork();
+        }
+        // _this.steps++;
+        _this.templateDialog = false;
+        setTimeout(() => {
+          this.checkEva(this.checkId);
+          setTimeout(() => {
+            this.checkEva(this.checkId);
+          }, 100);
+        }, 1000);
+      }else{
+        _this
         .$confirm(
           "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
           "提示",
@@ -10768,7 +10811,9 @@ export default {
         )
         .then(() => {
           _this.unitJson = _res;
-          _this.updateWork();
+          if(_this.cid){
+            _this.updateWork();
+          }
           // _this.steps++;
           _this.templateDialog = false;
           setTimeout(() => {
@@ -10781,6 +10826,8 @@ export default {
         .catch(() => {
           return;
         });
+      }
+      
     },
     checkTemplate(res) {
       let _this = this;

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