lsc 1 년 전
부모
커밋
2885db8eb5

+ 1 - 1
dist/index.html

@@ -25,7 +25,7 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.b888fc16028b1070ff7800ed6e22c817.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.1b8e037bd3fbbd358d74.js></script><script type=text/javascript src=./static/js/app.701652c7cfe197a21ca6.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.c071087e13e3b8af9e6b23dde34a5cf7.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.1b8e037bd3fbbd358d74.js></script><script type=text/javascript src=./static/js/app.41b04f4451f245943658.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/css/app.b888fc16028b1070ff7800ed6e22c817.css


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/css/app.b888fc16028b1070ff7800ed6e22c817.css.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/css/app.c071087e13e3b8af9e6b23dde34a5cf7.css


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/css/app.c071087e13e3b8af9e6b23dde34a5cf7.css.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/app.41b04f4451f245943658.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/app.41b04f4451f245943658.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/app.701652c7cfe197a21ca6.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/manifest.3512a67a6213c2df4180.js.map


+ 3 - 0
src/App.vue

@@ -478,4 +478,7 @@ html::-webkit-scrollbar-thumb {
   display: flex;
   align-items: center;
 }
+.el-cascader-node__label{
+  max-width: 150px;
+}
 </style>

+ 139 - 27
src/components/pages/addCourse.vue

@@ -495,7 +495,10 @@
                       </div>
                     </div>
                     <div v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
-                      .taskJson" :key="tIndex">
+                      .taskJson" :key="tIndex" :class="{
+                          dragOverTop: newIndex === tIndex && typeIndex == 'task-'+tIndex && oldIndex > tIndex,
+                          dragOverBottom: newIndex === tIndex && typeIndex == 'task-'+tIndex && oldIndex < tIndex,
+                        }">
                       <div @dragstart="dragTaskStart(t, tIndex)" @dragover.prevent="dragTaskOver(tIndex)"
                           @dragend="dragTaskEnd()" draggable @click="goToTask(tIndex)" class="navTask" :class="{
                         isNavTask:
@@ -707,7 +710,7 @@
                               itemTask.chapterData.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 @dragstart="dragStart(item1, index1, itemTaskIndex)" @dragover.prevent="dragOver(index1)"
+                              <div @dragstart="dragStart(item1, index1, itemTaskIndex)" @dragover.prevent="dragOver(index1, itemTaskIndex)"
                                 @dragend="dragEnd()" draggable class="chapter_upload"
                                 v-for="(item1, index1) in itemTask.chapterData" :key="item1.id" @click="
                                   getChapterData(
@@ -717,7 +720,10 @@
                                     index1,
                                     item1.type
                                   )
-                                  ">
+                                  " :class="{
+                                dragOverTop2: newIndex === index1 && typeIndex == 'chapter-'+itemTaskIndex+'-'+index1 && oldIndex > index1,
+                                dragOverBottom2: newIndex === index1 && typeIndex == 'chapter-'+itemTaskIndex+'-'+index1 && oldIndex < index1,
+                              }">
                                 <div class="chapter_upload_drag"></div>
                                 <div class="chapter_upload_o" style="
                               position: relative;
@@ -920,7 +926,7 @@
                               itemTask.chapterData.length == 0
                               "><img src="../../assets/icon/new/c_none.png" alt /></div>
                             <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
-                              <div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="dragOver(index1)"
+                              <div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="dragOver(index1, itemTaskIndex)"
                                 @dragend="dragEnd()" draggable class="chapter_upload"
                                 v-for="(item1, index1) in itemTask.chapterData" :key="item1.id" @click="
                                   getChapterData(
@@ -930,7 +936,10 @@
                                     index1,
                                     item1.type
                                   )
-                                  ">
+                                  " :class="{
+                                dragOverTop2: newIndex === index1 && typeIndex == 'chapter-'+itemTaskIndex+'-'+index1 && oldIndex > index1,
+                                dragOverBottom2: newIndex === index1 && typeIndex == 'chapter-'+itemTaskIndex+'-'+index1 && oldIndex < index1,
+                              }">
                                 <div class="chapter_upload_drag"></div>
                                 <div class="chapter_upload_t" style="width: 100%"></div>
                                 <div class="chapter_upload_o" style="
@@ -1255,15 +1264,33 @@
                               其他
                             </div> -->
                                 </div>
-                                <div v-if="itemTool.isFold3" class="show_toolD show"
-                                  @click="fold3(itemTaskIndex, toolIndex)"
-                                  :style="{ right: itemTask.toolChoose.length > 1 ? '45px' : '0px' }"><img
-                                    src="../../assets/icon/new/icon-slide.png" />收起工具栏</div>
-                                <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
-                                  :style="{ right: itemTask.toolChoose.length > 1 ? '45px' : '0px' }"><img
-                                    src="../../assets/icon/new/icon-slide.png" />展开工具栏</div>
-                                <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
-                                  v-if="itemTask.toolChoose.length > 1" style="position: absolute; right: 0"></div>
+                                <div class="chapter_upload_ud" style="z-index: 99;margin:0 0 0 auto" v-if="itemTask.toolChoose.length > 1">
+                                  <div class="chapter_upload_up" @click.stop="
+                                      upTool(
+                                        $event,
+                                        unitIndex,
+                                        itemTaskIndex, 
+                                        toolIndex
+                                      )
+                                  "></div>
+                                  <div class="chapter_upload_down" @click.stop="
+                                      downTool(
+                                        $event,
+                                        unitIndex,
+                                        itemTaskIndex, 
+                                        toolIndex
+                                      )
+                                  "></div>
+                              </div>
+                              <div v-if="itemTool.isFold3" class="show_toolD show"
+                                @click="fold3(itemTaskIndex, toolIndex)"
+                                :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
+                                  src="../../assets/icon/new/icon-slide.png" />收起工具栏</div>
+                              <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
+                                :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
+                                  src="../../assets/icon/new/icon-slide.png" />展开工具栏</div>
+                              <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
+                                v-if="itemTask.toolChoose.length > 1" style="position: absolute; right: 0;top:-5px;"></div>
                               </div>
 
                               <div style="min-height: 163px" v-show="itemTool.isFold3">
@@ -2357,7 +2384,7 @@
                             </div>
                           </div>
                           <div class="mbCss">
-                            <div class="pjCss">
+                            <div class="pjCss" :style="{width:itemTask.isEvaFold?'calc(100% - 55%)':'calc(100% - 120px)'}">
                               <div v-if="itemTask.eList && itemTask.eList.length" class="elist_input">
                                 <div v-for="(eItem, eIndex) in itemTask.eList" :key="eIndex" class="elist_input_box">
                                   <span>评价名称:</span>
@@ -2399,9 +2426,8 @@
                             </div>
                             <div v-if="evalua" style="
                           border: 1px solid #e5e5e5;
-                          width: 55%;
                           box-shadow: 3px 1px 15px 3px #e0e0e0;
-                        " class="evaCss">
+                        " :style="{width:itemTask.isEvaFold?'55%':'116px'}" class="evaCss">
                               <!-- <div class="e_add_top">
                               <div class="e_add_title">
                                 <span>当前使用目标管理</span>
@@ -2417,8 +2443,8 @@
                               <div class="e_add_content" style="width: 100%">
                                 <div class="e_add_list_pbox" style="width: 100%">
                                   <div class="e_add_list_pbox_title">
-                                    <span class="type_title">切换模式</span>
-                                    <div class="type_content">
+                                    <span class="type_title" v-if="itemTask.isEvaFold">切换模式</span>
+                                    <div class="type_content" v-if="itemTask.isEvaFold">
                                       <span :class="{ active: typeMode == 1 }" @click="OtherMb(1, itemTaskIndex)">目标树</span>
                                       <span :class="{ active: typeMode == 2 }" @click="OtherMb(2, itemTaskIndex)">目标罗盘</span>
                                       <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
@@ -2430,7 +2456,7 @@
                                       @click="foldEva(itemTaskIndex)"><img src="../../assets/icon/new/icon-slide.png" />展开目标
                                     </div>
                                   </div>
-                                  <div class="e_add_list_pbox_content" v-show="itemTask.isEvaFold" style="min-height: 200px;">
+                                  <div class="e_add_list_pbox_content" v-if="itemTask.isEvaFold" style="min-height: 200px;">
                                     <Mind :showBar="false" :mindData="data" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mind'
                                       " v-if="typeMode == 1"></Mind>
                                     <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2">
@@ -3951,6 +3977,7 @@ export default {
       oldIndex: 0,
       oldData: null,
       newIndex: "",
+      typeIndex: "",
     };
   },
   directives: {
@@ -5998,6 +6025,60 @@ export default {
       this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
       this.$forceUpdate();
     },
+    upTool(e, i, j, tooli){
+      e.stopPropagation();
+      if (tooli == 0) {
+        return;
+      }
+      this.$confirm(
+        "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
+        "提示",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      )
+        .then(() => {
+          var a =
+          JSON.parse(JSON.stringify(this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]));
+          this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
+            JSON.parse(JSON.stringify(this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]));
+          this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
+          this.$forceUpdate()
+        })
+        .catch(() => {
+          return;
+        });
+    },
+    downTool(e, i, j, tooli){
+      e.stopPropagation();
+      if ( tooli ==
+        this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length -
+        1) {
+        return;
+      }
+      this.$confirm(
+        "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
+        "提示",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      )
+        .then(() => {
+          var a =
+          JSON.parse(JSON.stringify(this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]));
+          this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
+            JSON.parse(JSON.stringify(this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]));
+          this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
+          this.$forceUpdate()
+        })
+        .catch(() => {
+          return;
+        });
+    },
     addWork() {
       let cPan = 1;
       for (var i = 0; i < this.unitJson.length; i++) {
@@ -9168,7 +9249,8 @@ export default {
       this.oldIndex = i;
       this.oldData = val;
     },
-    dragOver(i) {
+    dragOver(i, j) {
+      this.typeIndex = "chapter-" + j + '-' + i
       this.newIndex = i;
     },
     dragEnd() {
@@ -9180,6 +9262,7 @@ export default {
       // 在列表中目标位置增加新的节点
       newItems.splice(this.newIndex, 0, this.oldData);
       this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount].chapterData = [...newItems];
+      this.typeIndex = "";
       this.newIndex = "";
       this.$forceUpdate()
     },
@@ -9188,10 +9271,13 @@ export default {
       this.oldData = val;
     },
     dragTaskOver(i) {
+      this.typeIndex = "task-" + i
       this.newIndex = i;
     },
     dragTaskEnd() {
       if(this.newIndex == this.oldIndex){
+        this.newIndex = "";
+        this.typeIndex = "";
         return;
       }
       this.$confirm(
@@ -9210,11 +9296,13 @@ export default {
           // 在列表中目标位置增加新的节点
           newItems.splice(this.newIndex, 0, this.oldData);
           this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [...newItems];
+          this.typeIndex = "";
           this.newIndex = "";
           this.$forceUpdate()
         })
         .catch(() => {
           this.newIndex = "";
+          this.typeIndex = "";
           return;
         });
     },
@@ -9270,6 +9358,7 @@ export default {
 
   .evaCss {
     width: 100% !important;
+    margin-top: 10px;
   }
 }
 
@@ -9750,9 +9839,9 @@ export default {
   font-size: 14px;
   cursor: pointer;
   color: #717C8D;
-  position: absolute;
+  /* position: absolute;
   right: 45px;
-  top: 5px;
+  top: 5px; */
 }
 
 .show_toolD>img {
@@ -11342,7 +11431,7 @@ ol {
   background: #fff;
   width: 100%;
   height: 60px;
-  z-index: 9999;
+  z-index: 999;
 }
 
 .fold {
@@ -11477,8 +11566,8 @@ ol {
 .elist_input .elist_input_box input {
   font: inherit;
   color: currentColor;
-  /* width: 200px; */
-  max-width: 200px;
+  width: 100%;
+  max-width: calc(100% - 385px);
   padding: 8px 14px;
   display: block;
   min-width: 0;
@@ -12489,6 +12578,27 @@ ol {
   background-image: url(../../assets/icon/new/icon_arrow_a.png) !important;
 }
 
+.dragOverTop {
+  border-top: 2px solid #0061FF !important;
+  border-radius: 0 !important;
+  margin-top: 10px;
+}
+
+.dragOverBottom {
+  border-bottom: 2px solid #0061FF !important;
+  border-radius: 0 !important;
+  margin-top: 10px;
+}
+
+.dragOverTop2 {
+  border-top: 2px solid #0061FF !important;
+  border-radius: 0 !important;
+}
+
+.dragOverBottom2 {
+  border-bottom: 2px solid #0061FF !important;
+  border-radius: 0 !important;
+}
 .isNavTask {
   /* background: #3681FC; */
   background: #EEF3FB;
@@ -13031,7 +13141,9 @@ ol {
   align-items: flex-start;
   align-content: flex-start;
 }
-
+.class_item:first-child {
+  margin: 0 15px 15px 67px;
+}
 .class_item {
   margin: 0 15px 15px 0;
 

+ 123 - 20
src/components/pages/easy/addCourse.vue

@@ -168,13 +168,15 @@
                   <div class="stepsBottom2">
                     <div class="navBottom" :style="{ height: heightPx }">
                       <div v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
-                        .taskJson" :key="tIndex">
+                        .taskJson" :key="tIndex" :class="{
+                          dragOverTop: newIndex === tIndex && typeIndex == 'task-'+tIndex && oldIndex > tIndex,
+                          dragOverBottom: newIndex === tIndex && typeIndex == 'task-'+tIndex && oldIndex < tIndex,
+                        }">
                         <div @dragstart="dragTaskStart(t, tIndex)" @dragover.prevent="dragTaskOver(tIndex)"
                           @dragend="dragTaskEnd()" draggable @click="goToTask(tIndex)" class="navTask" :class="{
                             isNavTask:
                               isClickColor > 0 && isClickColor == tIndex + 1,
                             isNavOpen: t.toolOpen,
-                            // dragOver: newIndex === tIndex
                           }">
                           <div style="left: 8px;" class="chapter_upload_drag"></div>
                           <div class="nt_taskBox">
@@ -234,17 +236,20 @@
                             item.taskJson[0].chapterData.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 @dragstart="dragStart(item1, index1, 0)" @dragover.prevent="dragOver(index1)"
+                            <div @dragstart="dragStart(item1, index1, 0)" @dragover.prevent="dragOver(index1, 0)"
                               @dragend="dragEnd()" draggable class="chapter_upload" v-for="(item1, index1) in item.taskJson[0]
                                 .chapterData" :key="item1.id" @click="
-    getChapterData(
-      $event,
-      unitIndex,
-      index,
-      index1,
-      item1.type
-    )
-    ">
+                              getChapterData(
+                                $event,
+                                unitIndex,
+                                index,
+                                index1,
+                                item1.type
+                              )
+                              " :class="{
+                                dragOverTop2: newIndex === index1 && typeIndex == 'chapter-'+'0'+'-'+index1 && oldIndex > index1,
+                                dragOverBottom2: newIndex === index1 && typeIndex == 'chapter-'+'0'+'-'+index1 && oldIndex < index1,
+                              }">
                               <div class="chapter_upload_drag"></div>
                               <div class="chapter_upload_t" style="width: 100%"></div>
                               <div class="chapter_upload_o" style="
@@ -562,15 +567,33 @@
                                   其他
                                 </div> -->
                               </div>
+                              <div class="chapter_upload_ud" style="z-index: 99;margin:0 0 0 auto" v-if="itemTask.toolChoose.length > 1">
+                                  <div class="chapter_upload_up" @click.stop="
+                                      upTool(
+                                        $event,
+                                        unitIndex,
+                                        itemTaskIndex, 
+                                        toolIndex
+                                      )
+                                  "></div>
+                                  <div class="chapter_upload_down" @click.stop="
+                                      downTool(
+                                        $event,
+                                        unitIndex,
+                                        itemTaskIndex, 
+                                        toolIndex
+                                      )
+                                  "></div>
+                              </div>
                               <div v-if="itemTool.isFold3" class="show_toolD show"
                                 @click="fold3(itemTaskIndex, toolIndex)"
-                                :style="{ right: itemTask.toolChoose.length > 1 ? '45px' : '0px' }"><img
+                                :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
                                   src="../../../assets/icon/new/icon-slide.png" />收起工具栏</div>
                               <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
-                                :style="{ right: itemTask.toolChoose.length > 1 ? '45px' : '0px' }"><img
+                                :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
                                   src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div>
                               <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
-                                v-if="itemTask.toolChoose.length > 1" style="position: absolute; right: 0"></div>
+                                v-if="itemTask.toolChoose.length > 1" style="position: absolute; right: 0;top:-5px;"></div>
                             </div>
                             <div style="min-height: 163px" v-show="itemTool.isFold3">
                               <div class="toolSort" v-if="itemTool.toolType == 0">
@@ -4796,6 +4819,7 @@ export default {
       oldIndex: 0,
       oldData: null,
       newIndex: "",
+      typeIndex: "",
     };
   },
   directives: {
@@ -6604,6 +6628,60 @@ export default {
       this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
       this.$forceUpdate();
     },
+    upTool(e, i, j, tooli){
+      e.stopPropagation();
+      if (tooli == 0) {
+        return;
+      }
+      this.$confirm(
+        "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
+        "提示",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      )
+        .then(() => {
+          var a =
+          JSON.parse(JSON.stringify(this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]));
+          this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
+            JSON.parse(JSON.stringify(this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]));
+          this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
+          this.$forceUpdate()
+        })
+        .catch(() => {
+          return;
+        });
+    },
+    downTool(e, i, j, tooli){
+      e.stopPropagation();
+      if ( tooli ==
+        this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length -
+        1) {
+        return;
+      }
+      this.$confirm(
+        "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
+        "提示",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      )
+        .then(() => {
+          var a =
+          JSON.parse(JSON.stringify(this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]));
+          this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
+            JSON.parse(JSON.stringify(this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]));
+          this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
+          this.$forceUpdate()
+        })
+        .catch(() => {
+          return;
+        });
+    },
     addWork() {
       let cPan = 1;
       for (var i = 0; i < this.unitJson.length; i++) {
@@ -9708,7 +9786,8 @@ export default {
       this.oldIndex = i;
       this.oldData = val;
     },
-    dragOver(i) {
+    dragOver(i, j) {
+      this.typeIndex = "chapter-" + j + '-' + i
       this.newIndex = i;
     },
     dragEnd() {
@@ -9719,6 +9798,7 @@ export default {
       newItems.splice(this.newIndex, 0, this.oldData);
       this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount].chapterData = [...newItems];
       this.newIndex = "";
+      this.typeIndex = "";
       this.$forceUpdate()
     },
     dragTaskStart(val, i) {
@@ -9726,10 +9806,13 @@ export default {
       this.oldData = val;
     },
     dragTaskOver(i) {
+      this.typeIndex = "task-" + i
       this.newIndex = i;
     },
     dragTaskEnd() {
       if (this.newIndex == this.oldIndex) {
+        this.typeIndex = "";
+          this.newIndex = "";
         return;
       }
       this.$confirm(
@@ -9756,10 +9839,12 @@ export default {
             newItems[0].chapterData = chapterData
           }
           this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [...newItems];
+          this.typeIndex = "";
           this.newIndex = "";
           this.$forceUpdate()
         })
         .catch(() => {
+          this.typeIndex = "";
           this.newIndex = "";
           return;
         });
@@ -10285,9 +10370,9 @@ export default {
   font-size: 14px;
   cursor: pointer;
   color: #717C8D;
-  position: absolute;
+  /* position: absolute;
   right: 45px;
-  top: 5px;
+  top: 5px; */
 }
 
 .show_toolD>img {
@@ -11810,7 +11895,7 @@ ol {
   position: absolute;
   right: 15px;
   bottom: 35px;
-  z-index: 9999;
+  z-index: 999;
 }
 
 .fold {
@@ -12937,8 +13022,26 @@ ol {
   background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
 }
 
-.dragOver {
-  background: red !important;
+.dragOverTop {
+  border-top: 2px solid #0061FF !important;
+  border-radius: 0 !important;
+  margin-top: 10px;
+}
+
+.dragOverBottom {
+  border-bottom: 2px solid #0061FF !important;
+  border-radius: 0 !important;
+  margin-top: 10px;
+}
+
+.dragOverTop2 {
+  border-top: 2px solid #0061FF !important;
+  border-radius: 0 !important;
+}
+
+.dragOverBottom2 {
+  border-bottom: 2px solid #0061FF !important;
+  border-radius: 0 !important;
 }
 
 .isNavTask {

+ 121 - 10
src/components/pages/task/addCourse.vue

@@ -165,7 +165,10 @@
                     <!-- <div class="navTop">辅助导航</div> -->
                     <div class="navBottom" :style="{ height: heightPx }">
                       <div v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
-                        .taskJson" :key="tIndex">
+                        .taskJson" :key="tIndex" :class="{
+                          dragOverTop: newIndex === tIndex && typeIndex == 'task-'+tIndex && oldIndex > tIndex,
+                          dragOverBottom: newIndex === tIndex && typeIndex == 'task-'+tIndex && oldIndex < tIndex,
+                        }">
                         <div @dragstart="dragTaskStart(t, tIndex)" @dragover.prevent="dragTaskOver(tIndex)"
                           @dragend="dragTaskEnd()" draggable @click="goToTask(tIndex)" class="navTask" :class="{
                           isNavTask:
@@ -285,7 +288,7 @@
                             itemTask.chapterData.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 @dragstart="dragStart(item1, index1, itemTaskIndex)" @dragover.prevent="dragOver(index1)"
+                            <div @dragstart="dragStart(item1, index1, itemTaskIndex)" @dragover.prevent="dragOver(index1,itemTaskIndex)"
                               @dragend="dragEnd()" draggable class="chapter_upload"
                               v-for="(item1, index1) in itemTask.chapterData" :key="item1.id" @click="
                                 getChapterData(
@@ -295,7 +298,10 @@
                                   index1,
                                   item1.type
                                 )
-                                ">
+                                " :class="{
+                                dragOverTop2: newIndex === index1 && typeIndex == 'chapter-'+itemTaskIndex+'-'+index1 && oldIndex > index1,
+                                dragOverBottom2: newIndex === index1 && typeIndex == 'chapter-'+itemTaskIndex+'-'+index1 && oldIndex < index1,
+                              }">
                               <div class="chapter_upload_drag"></div>
                               <div class="chapter_upload_t" style="width: 100%"></div>
                               <div class="chapter_upload_o" style="
@@ -563,15 +569,33 @@
                                   其他
                                 </div> -->
                               </div>
+                              <div class="chapter_upload_ud" style="z-index: 99;margin:0 0 0 auto" v-if="itemTask.toolChoose.length > 1">
+                                  <div class="chapter_upload_up" @click.stop="
+                                      upTool(
+                                        $event,
+                                        unitIndex,
+                                        itemTaskIndex, 
+                                        toolIndex
+                                      )
+                                  "></div>
+                                  <div class="chapter_upload_down" @click.stop="
+                                      downTool(
+                                        $event,
+                                        unitIndex,
+                                        itemTaskIndex, 
+                                        toolIndex
+                                      )
+                                  "></div>
+                              </div>
                               <div v-if="itemTool.isFold3" class="show_toolD show"
                                 @click="fold3(itemTaskIndex, toolIndex)"
-                                :style="{ right: itemTask.toolChoose.length > 1 ? '45px' : '0px' }"><img
+                                :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
                                   src="../../../assets/icon/new/icon-slide.png" />收起工具栏</div>
                               <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
-                                :style="{ right: itemTask.toolChoose.length > 1 ? '45px' : '0px' }"><img
+                                :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
                                   src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div>
                               <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
-                                v-if="itemTask.toolChoose.length > 1" style="position: absolute; right: 0"></div>
+                                v-if="itemTask.toolChoose.length > 1" style="position: absolute; right: 0;top:-5px;"></div>
                             </div>
 
                             <div style="min-height: 163px" v-show="itemTool.isFold3">
@@ -5127,6 +5151,7 @@ export default {
       oldIndex: 0,
       oldData: null,
       newIndex: "",
+      typeIndex: "",
     };
   },
   directives: {
@@ -6922,6 +6947,60 @@ export default {
       this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
       this.$forceUpdate();
     },
+    upTool(e, i, j, tooli){
+      e.stopPropagation();
+      if (tooli == 0) {
+        return;
+      }
+      this.$confirm(
+        "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
+        "提示",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      )
+        .then(() => {
+          var a =
+          JSON.parse(JSON.stringify(this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]));
+          this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
+            JSON.parse(JSON.stringify(this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]));
+          this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
+          this.$forceUpdate()
+        })
+        .catch(() => {
+          return;
+        });
+    },
+    downTool(e, i, j, tooli){
+      e.stopPropagation();
+      if ( tooli ==
+        this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length -
+        1) {
+        return;
+      }
+      this.$confirm(
+        "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
+        "提示",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      )
+        .then(() => {
+          var a =
+          JSON.parse(JSON.stringify(this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]));
+          this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
+            JSON.parse(JSON.stringify(this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]));
+          this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
+          this.$forceUpdate()
+        })
+        .catch(() => {
+          return;
+        });
+    },
     addWork() {
       let cPan = 1;
       for (var i = 0; i < this.unitJson.length; i++) {
@@ -9996,7 +10075,8 @@ export default {
       this.oldIndex = i;
       this.oldData = val;
     },
-    dragOver(i) {
+    dragOver(i, j) {
+      this.typeIndex = "chapter-" + j + '-' + i
       this.newIndex = i;
     },
     dragEnd() {
@@ -10006,6 +10086,7 @@ export default {
       // 在列表中目标位置增加新的节点
       newItems.splice(this.newIndex, 0, this.oldData);
       this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount].chapterData = [...newItems];
+      this.typeIndex = "";
       this.newIndex = "";
       this.$forceUpdate()
     },
@@ -10014,10 +10095,13 @@ export default {
       this.oldData = val;
     },
     dragTaskOver(i) {
+      this.typeIndex = "task-" + i
       this.newIndex = i;
     },
     dragTaskEnd() {
       if(this.newIndex == this.oldIndex){
+        this.newIndex = "";
+        this.typeIndex = "";
         return;
       }
       this.$confirm(
@@ -10036,10 +10120,12 @@ export default {
           // 在列表中目标位置增加新的节点
           newItems.splice(this.newIndex, 0, this.oldData);
           this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [...newItems];
+          this.typeIndex = "";
           this.newIndex = "";
           this.$forceUpdate()
         })
         .catch(() => {
+          this.typeIndex = "";
           this.newIndex = "";
           return;
         });
@@ -10564,9 +10650,9 @@ export default {
   font-size: 14px;
   cursor: pointer;
   color: #717C8D;
-  position: absolute;
+  /* position: absolute;
   right: 45px;
-  top: 5px;
+  top: 5px; */
 }
 
 .show_toolD>img {
@@ -12093,7 +12179,7 @@ ol {
   position: absolute;
   right: 15px;
   bottom: 35px;
-  z-index: 9999;
+  z-index: 999;
 }
 
 .fold {
@@ -13219,6 +13305,28 @@ ol {
   background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
 }
 
+.dragOverTop {
+  border-top: 2px solid #0061FF !important;
+  border-radius: 0 !important;
+  margin-top: 10px;
+}
+
+.dragOverBottom {
+  border-bottom: 2px solid #0061FF !important;
+  border-radius: 0 !important;
+  margin-top: 10px;
+}
+
+.dragOverTop2 {
+  border-top: 2px solid #0061FF !important;
+  border-radius: 0 !important;
+}
+
+.dragOverBottom2 {
+  border-bottom: 2px solid #0061FF !important;
+  border-radius: 0 !important;
+}
+
 .isNavTask {
   /* background: #3681FC; */
   background: #EEF3FB;
@@ -13708,6 +13816,9 @@ ol {
   align-content: flex-start;
 }
 
+.class_item:first-child {
+  margin: 0 15px 15px 67px;
+}
 .class_item {
   margin: 0 15px 15px 0;
 

+ 36 - 15
src/components/tools/sunburst.vue

@@ -4,11 +4,7 @@
       <img src="../../assets/nominddata.png" alt />
     </div>
     <!-- <img src="../../assets/dataimage/1.png" style="width:90%" /> -->
-    <div
-      id="charts_canvas"
-      class="echart"
-      style="width: 100%; height: 100%"
-    ></div>
+    <div id="charts_canvas" class="echart" style="width: 100%; height: 100%"></div>
   </div>
 </template>
 
@@ -22,19 +18,43 @@ export default {
       timer: null,
       ooption: [],
       option: {
-        tooltip:{},
+        tooltip: {
+          formatter: function (params) {
+            var newParamsName = "";
+            var paramsNameNumber = params.name.length;
+            var provideNumber = 20;  //一行显示几个字
+            var rowNumber = Math.ceil(paramsNameNumber / provideNumber);
+            if (paramsNameNumber > provideNumber) {
+              for (var p = 0; p <rowNumber; p++) {
+                var tempStr = "";
+                var start = p * provideNumber;
+                var end = start + provideNumber;
+                if (p == rowNumber - 1) {
+                  tempStr = params.name.substring(start, paramsNameNumber);
+                } else {
+                  tempStr = params.name.substring(start, end) + "</br>";
+                }
+                newParamsName += tempStr;
+              }
+
+            } else {
+              newParamsName = params.name;
+            }
+            return newParamsName
+          }
+        },
         series: {
           type: "sunburst",
           data: [],
           radius: [30, "90%"],
           label: {
             rotate: "radial",
-            // formatter: function (val) {
-            //   // console.log(val);
-            //   return val.name.length > 5
-            //     ? val.name.substring(0, 6) + '...'
-            //     : val.name;
-            // }
+            formatter: function (val) {
+              // console.log(val);
+              return val.name.length > 5
+                ? val.name.substring(0, 6) + '...'
+                : val.name;
+            }
           },
         },
       },
@@ -76,7 +96,7 @@ export default {
         _array.push({ name: _item.name, value: count, children: [] });
         let j = 0;
         for (var item2 in _item.child) {
-          let num2 = Object.keys( _item.child);
+          let num2 = Object.keys(_item.child);
           let count2 = count / num2.length;
           let _item2 = _item.child[item2];
           _array[i].children.push({
@@ -85,7 +105,7 @@ export default {
             children: [],
           });
           for (var item3 in _item2.child) {
-            let num3 = Object.keys( _item2.child);
+            let num3 = Object.keys(_item2.child);
             let count3 = count2 / num3.length;
             let _item3 = _item2.child[item3];
             _array[i].children[j].children.push({
@@ -115,7 +135,7 @@ export default {
       deep: true,
     },
     Josn: {
-      handler: function (newVal, oldVal) {},
+      handler: function (newVal, oldVal) { },
       deep: true,
     },
   },
@@ -153,6 +173,7 @@ export default {
   flex-shrink: 0;
   position: relative;
 }
+
 .noMind {
   position: absolute;
   display: flex;

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.