lsc 1 سال پیش
والد
کامیت
16dbaa8b2f

+ 1 - 1
dist/index.html

@@ -25,7 +25,7 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.d0b5046950ef3cc1426b87484a3a37f2.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.f1661c5ebfd33221b88f.js></script><script type=text/javascript src=./static/js/app.bb9aff2eeb346190585d.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.c0f72f99812529972ee7558169537e7e.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.f1661c5ebfd33221b88f.js></script><script type=text/javascript src=./static/js/app.7f63452a35b253d2eb30.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/css/app.c0f72f99812529972ee7558169537e7e.css


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/css/app.c0f72f99812529972ee7558169537e7e.css.map


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/js/app.7f63452a35b253d2eb30.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/js/app.7f63452a35b253d2eb30.js.map


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/js/app.bb9aff2eeb346190585d.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/js/manifest.3512a67a6213c2df4180.js.map


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

@@ -10958,7 +10958,7 @@ ol {
 }
 
 .navTask .nt_taskBox {
-  width: calc(100% - 40px);
+  width: calc(100% - 55px);
   padding: 0 10px 0 20px;
   box-sizing: border-box;
   display: flex;

+ 1 - 1
src/components/pages/easy/addCourse.vue

@@ -11741,7 +11741,7 @@ ol {
 
 
 .navTask .nt_taskBox {
-  width: calc(100% - 40px);
+  width: calc(100% - 55px);
   padding: 0 10px 0 20px;
   box-sizing: border-box;
   box-sizing: border-box;

+ 160 - 167
src/components/pages/student/addCourse.vue

@@ -8709,203 +8709,196 @@ export default {
           }
           this.$forceUpdate();
 
-          let unitJson2 = JSON.parse(res.data[0][0].chapters);
-          this.unitJson2 = JSON.parse(res.data[0][0].chapters);
-          let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
-          let _unitJson = [];
-          let _chapAarry = [];
-          let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
-          let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
-          let index = 1;
-          let chapindex;
-          if (_unitJson2.length > unitJson2.length) {
-            for (let c = 0; c < _unitJson2.length; c++) {
-              _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
-            }
-            for (let j = 0; j < unitJson2.length; j++) {
-              let count = 0;
+          if(this.cidttt === 1){
+            let unitJson2 = JSON.parse(res.data[0][0].chapters);
+            this.unitJson2 = JSON.parse(res.data[0][0].chapters);
+            let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
+            let _unitJson = [];
+            let _chapAarry = [];
+            let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
+            let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
+            let index = 1;
+            let chapindex;
+            if (_unitJson2.length > unitJson2.length) {
+              for (let c = 0; c < _unitJson2.length; c++) {
+                _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
+              }
+              for (let j = 0; j < unitJson2.length; j++) {
+                let count = 0;
+                for (let k = 0; k < _unitJson2.length; k++) {
+                  if (
+                    unitJson2[j].chapterInfo[0].chapterid ==
+                    _unitJson2[k].chapterInfo[0].chapterid
+                  ) {
+                    count++;
+                    _chapAarry.splice(
+                      _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
+                      1
+                    );
+                    _unitJson.push(unitJson2[j]);
+                    break;
+                  }
+                }
+              }
               for (let k = 0; k < _unitJson2.length; k++) {
-                if (
-                  unitJson2[j].chapterInfo[0].chapterid ==
-                  _unitJson2[k].chapterInfo[0].chapterid
-                ) {
-                  count++;
+                if (_unitJson2[k].isUpdate == 1) {
                   _chapAarry.splice(
                     _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
                     1
                   );
-                  _unitJson.push(unitJson2[j]);
-                  break;
+                  _unitJson.push(_unitJson2[k]);
                 }
               }
-              // if(count === 0){
-              //   this.$message.error("您所修改的阶段已经被其他老师删除了");
-              // }
-            }
-            for (let k = 0; k < _unitJson2.length; k++) {
-              if (_unitJson2[k].isUpdate == 1) {
-                _chapAarry.splice(
-                  _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
-                  1
-                );
-                _unitJson.push(_unitJson2[k]);
+              console.log(_chapAarry);
+              for (let d = 0; d < _unitJson2.length; d++) {
+                if (
+                  _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
+                ) {
+                  if (_unitIndex == d) {
+                    index = 2;
+                  }
+                  chapindex = d;
+                }
               }
+            } else {
+              _unitJson = JSON.parse(JSON.stringify(_unitJson2));
             }
-            console.log(_chapAarry);
-            for (let d = 0; d < _unitJson2.length; d++) {
+
+            for (let i = 0; i < unitJson2.length; i++) {
               if (
-                _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
+                (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
+                _unitJson[i].chapterInfo[0].chapterid !=
+                unitJson2[i].chapterInfo[0].chapterid
               ) {
-                if (_unitIndex == d) {
-                  index = 2;
+                if (i == _unitJson.length - 1) {
+                  _unitIndex2++;
                 }
-                chapindex = d;
-                // this.$message.error("您所修改的阶段已经被其他老师删除了");
-              }
-            }
-          } else {
-            _unitJson = JSON.parse(JSON.stringify(_unitJson2));
-          }
-
-          for (let i = 0; i < unitJson2.length; i++) {
-            if (
-              (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
-              _unitJson[i].chapterInfo[0].chapterid !=
-              unitJson2[i].chapterInfo[0].chapterid
-            ) {
-              if (i == _unitJson.length - 1) {
-                // this.unitIndex++
-                _unitIndex2++;
+                _unitJson.splice(i, 0, unitJson2[i]);
+              } else if (i > _unitJson.length - 1) {
+                _unitJson.push(unitJson2[i]);
+              } else if (
+                _unitJson[i].chapterInfo[0].chapterid ==
+                unitJson2[i].chapterInfo[0].chapterid
+              ) {
+                _unitJson[i] = unitJson2[i];
               }
-              _unitJson.splice(i, 0, unitJson2[i]);
-            } else if (i > _unitJson.length - 1) {
-              _unitJson.push(unitJson2[i]);
-            } else if (
-              _unitJson[i].chapterInfo[0].chapterid ==
-              unitJson2[i].chapterInfo[0].chapterid
-            ) {
-              _unitJson[i] = unitJson2[i];
             }
-            // if (i == _unitIndex) {
-            //   continue;
-            // } else
-          }
 
-          if (_chapAarry.length && index != 2) {
-            if (chapindex < _unitIndex) {
-              this.isDelete = 2;
-              // this.unitIndex--;
-              _unitIndex2--;
-            } else if (
-              _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
-              _unitJson[_unitIndex].chapterInfo[0].chapterid
-            ) {
-              this.isDelete = 2;
-              for (let n = 0; n < _unitJson.length; n++) {
-                if (
-                  _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
-                  _unitJson[n].chapterInfo[0].chapterid
-                ) {
-                  // this.unitIndex = n;
-                  _unitIndex2 = n;
-                  _unitJson[n] = _unitJson2[_unitIndex];
-                  break;
+            if (_chapAarry.length && index != 2) {
+              if (chapindex < _unitIndex) {
+                this.isDelete = 2;
+                _unitIndex2--;
+              } else if (
+                _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
+                _unitJson[_unitIndex].chapterInfo[0].chapterid
+              ) {
+                this.isDelete = 2;
+                for (let n = 0; n < _unitJson.length; n++) {
+                  if (
+                    _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
+                    _unitJson[n].chapterInfo[0].chapterid
+                  ) {
+                    _unitIndex2 = n;
+                    _unitJson[n] = _unitJson2[_unitIndex];
+                    break;
+                  }
                 }
               }
-            }
-          } else if (index != 2) {
-            // _unitJson[this.unitIndex] = _unitJson2[_unitIndex];
-            _unitJson2[_unitIndex];
-            for (
-              var ci = 0;
-              ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
-              ci++
-            ) {
-              _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
-                _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
-                  ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
-                    .toolChoose
-                  : [];
-              let _chapterData = [];
+            } else if (index != 2) {
+              _unitJson2[_unitIndex];
               for (
-                var c = 0;
-                c <
-                _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
-                  .length;
-                c++
+                var ci = 0;
+                ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
+                ci++
               ) {
-                if (
-                  _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
-                    .chapterData[c]
+                _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
+                  _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
+                    ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
+                      .toolChoose
+                    : [];
+                let _chapterData = [];
+                for (
+                  var c = 0;
+                  c <
+                  _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
+                    .length;
+                  c++
                 ) {
-                  _chapterData.push(
+                  if (
                     _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
                       .chapterData[c]
-                  );
+                  ) {
+                    _chapterData.push(
+                      _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
+                        .chapterData[c]
+                    );
+                  }
                 }
+                _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
+                  _chapterData;
               }
-              _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
-                _chapterData;
+              _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
             }
-            _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
-          }
-          if (index == 1) {
-            this.unitJson = _unitJson;
+            if (index == 1) {
+              this.unitJson = _unitJson;
+              this.$forceUpdate();
+              setTimeout(() => {
+                if (this.unitIndex != _unitIndex2) {
+                  this.isDelete = 2;
+                  this.unitIndex = _unitIndex2;
+                }
+              }, 0);
+              this.timer = setTimeout(() => {
+                this.seleteCourseUpdate();
+              }, 1000);
+            } else if (index == 2) {
+              let _this = this;
+              _this
+                .$confirm(
+                  "您所修改的阶段已经被其他老师删除了,需要恢复嘛?",
+                  "提示",
+                  {
+                    confirmButtonText: "需要",
+                    cancelButtonText: "取消",
+                    type: "warning",
+                  }
+                )
+                .then(() => {
+                  if (_this.time()) {
+                    _this.restoreWork(
+                      _chapAarry[0],
+                      _unitJson,
+                      chapindex,
+                      _unitJson2,
+                      _unitIndex2
+                    );
+                  }
+                })
+                .catch(() => {
+                  _this.unitJson = _unitJson;
+                  _this.$forceUpdate();
+                  setTimeout(() => {
+                    if (this.unitIndex != _unitIndex2) {
+                      this.isDelete = 2;
+                      this.unitIndex = _unitIndex2;
+                    }
+                  }, 0);
+                  _this.timer = setTimeout(() => {
+                    _this.seleteCourseUpdate();
+                  }, 1000);
+                });
+            }
+          }else{
             this.$forceUpdate();
-            setTimeout(() => {
-              if (this.unitIndex != _unitIndex2) {
-                this.isDelete = 2;
-                this.unitIndex = _unitIndex2;
-              }
-            }, 0);
+            if (this.timer) {
+              clearTimeout(this.timer);
+              this.timer = null;
+            }
             this.timer = setTimeout(() => {
               this.seleteCourseUpdate();
             }, 1000);
-          } else if (index == 2) {
-            let _this = this;
-            _this
-              .$confirm(
-                "您所修改的阶段已经被其他老师删除了,需要恢复嘛?",
-                "提示",
-                {
-                  confirmButtonText: "需要",
-                  cancelButtonText: "取消",
-                  type: "warning",
-                }
-              )
-              .then(() => {
-                if (_this.time()) {
-                  _this.restoreWork(
-                    _chapAarry[0],
-                    _unitJson,
-                    chapindex,
-                    _unitJson2,
-                    _unitIndex2
-                  );
-                }
-              })
-              .catch(() => {
-                _this.unitJson = _unitJson;
-                _this.$forceUpdate();
-                setTimeout(() => {
-                  if (this.unitIndex != _unitIndex2) {
-                    this.isDelete = 2;
-                    this.unitIndex = _unitIndex2;
-                  }
-                }, 0);
-                _this.timer = setTimeout(() => {
-                  _this.seleteCourseUpdate();
-                }, 1000);
-              });
           }
-          // this.$forceUpdate();
-          // if (this.timer) {
-          //   clearTimeout(this.timer);
-          //   this.timer = null;
-          // }
-          // this.timer = setTimeout(() => {
-          //   this.seleteCourseUpdate();
-          // }, 1000);
+
         })
         .catch((err) => {
           console.error(err);

+ 1 - 1
src/components/pages/task/addCourse.vue

@@ -14286,7 +14286,7 @@ ol {
 
 
 .navTask .nt_taskBox {
-  width: calc(100% - 40px);
+  width: calc(100% - 55px);
   padding: 0 10px 0 20px;
   box-sizing: border-box;
   display: flex;

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است