|
@@ -500,13 +500,15 @@
|
|
dragOverBottom: newIndex === tIndex && typeIndex == 'task-'+tIndex && oldIndex < tIndex && dragType == 'task',
|
|
dragOverBottom: newIndex === tIndex && typeIndex == 'task-'+tIndex && oldIndex < tIndex && dragType == 'task',
|
|
}">
|
|
}">
|
|
<div @dragstart="dragTaskStart(t, tIndex, 0)" @dragover.prevent="dragTaskOver(tIndex, 0)"
|
|
<div @dragstart="dragTaskStart(t, tIndex, 0)" @dragover.prevent="dragTaskOver(tIndex, 0)"
|
|
- @dragend="dragTaskEnd()" draggable @click="goToTask(tIndex)" class="navTask" :class="{
|
|
|
|
|
|
+ @dragend="dragTaskEnd()" :draggable="isdrag == 'task-'+tIndex" @click="goToTask(tIndex)" class="navTask" :class="{
|
|
isNavTask:
|
|
isNavTask:
|
|
isClickColor > 0 && isClickColor == tIndex + 1,
|
|
isClickColor > 0 && isClickColor == tIndex + 1,
|
|
isNavOpen: t.toolOpen
|
|
isNavOpen: t.toolOpen
|
|
}">
|
|
}">
|
|
<div @click.stop="taskOpen(tIndex)" class="chapter_upload_open"></div>
|
|
<div @click.stop="taskOpen(tIndex)" class="chapter_upload_open"></div>
|
|
<div
|
|
<div
|
|
|
|
+ @mousedown="isdrag = 'task-'+tIndex" @mouseup="isdrag = ''"
|
|
|
|
+ @touchstart="isdrag = 'task-'+tIndex" @touchend="isdrag = ''"
|
|
style="left: 8px;"
|
|
style="left: 8px;"
|
|
class="chapter_upload_drag"
|
|
class="chapter_upload_drag"
|
|
></div>
|
|
></div>
|
|
@@ -544,11 +546,13 @@
|
|
dragOverBottom: newIndex === stageIndex && typeIndex == 'Unit-'+stageIndex && oldIndex < stageIndex && dragType == 'Unit',
|
|
dragOverBottom: newIndex === stageIndex && typeIndex == 'Unit-'+stageIndex && oldIndex < stageIndex && dragType == 'Unit',
|
|
}">
|
|
}">
|
|
<div @dragstart="dragUnitStart(stage, stageIndex)" @dragover.prevent="dragUnitOver(stageIndex)"
|
|
<div @dragstart="dragUnitStart(stage, stageIndex)" @dragover.prevent="dragUnitOver(stageIndex)"
|
|
- @dragend="dragUnitEnd()" draggable @click="unitSet2(stageIndex)" class="navStage" :class="{
|
|
|
|
|
|
+ @dragend="dragUnitEnd()" :draggable="isdrag == 'unit-'+stageIndex" @click="unitSet2(stageIndex)" class="navStage" :class="{
|
|
isNavStage: stageIndex == unitIndex,
|
|
isNavStage: stageIndex == unitIndex,
|
|
isNavStageOpen: stage.toolOpen
|
|
isNavStageOpen: stage.toolOpen
|
|
}">
|
|
}">
|
|
<div
|
|
<div
|
|
|
|
+ @mousedown="isdrag = 'unit-'+stageIndex" @mouseup="isdrag = ''"
|
|
|
|
+ @touchstart="isdrag = 'unit-'+stageIndex" @touchend="isdrag = ''"
|
|
style="left: 8px;"
|
|
style="left: 8px;"
|
|
class="chapter_upload_drag"
|
|
class="chapter_upload_drag"
|
|
></div>
|
|
></div>
|
|
@@ -568,13 +572,15 @@
|
|
dragOverBottom: newIndex === tIndex && typeIndex == 'task-'+tIndex && oldIndex < tIndex && stageIndex == checkUnitIndex && dragType == 'task',
|
|
dragOverBottom: newIndex === tIndex && typeIndex == 'task-'+tIndex && oldIndex < tIndex && stageIndex == checkUnitIndex && dragType == 'task',
|
|
}" :style="{display:stage.toolOpen ? 'block' : 'none'}">
|
|
}" :style="{display:stage.toolOpen ? 'block' : 'none'}">
|
|
<div @dragstart="dragTaskStart(t, tIndex, stageIndex)" @dragover.prevent="dragTaskOver(tIndex, stageIndex)"
|
|
<div @dragstart="dragTaskStart(t, tIndex, stageIndex)" @dragover.prevent="dragTaskOver(tIndex, stageIndex)"
|
|
- @dragend="dragTaskEnd()" draggable @click="goToTask2(tIndex, stageIndex)" class="navTask" style="padding-left: 12px;" :class="{
|
|
|
|
|
|
+ @dragend="dragTaskEnd()" :draggable="isdrag == 'task-'+stageIndex+'-'+tIndex" @click="goToTask2(tIndex, stageIndex)" class="navTask" style="padding-left: 12px;" :class="{
|
|
isNavTask:
|
|
isNavTask:
|
|
isClickColor > 0 && isClickColor == tIndex + 1 && stageIndex == unitIndex,
|
|
isClickColor > 0 && isClickColor == tIndex + 1 && stageIndex == unitIndex,
|
|
isNavOpen: t.toolOpen
|
|
isNavOpen: t.toolOpen
|
|
}">
|
|
}">
|
|
<div @click.stop="taskOpen(tIndex)" class="chapter_upload_open"></div>
|
|
<div @click.stop="taskOpen(tIndex)" class="chapter_upload_open"></div>
|
|
<div
|
|
<div
|
|
|
|
+ @mousedown="isdrag = 'task-'+stageIndex+'-'+tIndex" @mouseup="isdrag = ''"
|
|
|
|
+ @touchstart="isdrag = 'task-'+stageIndex+'-'+tIndex" @touchend="isdrag = ''"
|
|
style="left: 20px;"
|
|
style="left: 20px;"
|
|
class="chapter_upload_drag"
|
|
class="chapter_upload_drag"
|
|
></div>
|
|
></div>
|
|
@@ -778,7 +784,7 @@
|
|
"><img src="../../assets/icon/new/c_none.png" alt /><span>请添加学习内容</span></div>
|
|
"><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 v-else class="add_chapters_box" style="display: flex; flex-direction: column">
|
|
<div @dragstart="dragStart(item1, index1, itemTaskIndex)" @dragover.prevent="dragOver(index1, itemTaskIndex)"
|
|
<div @dragstart="dragStart(item1, index1, itemTaskIndex)" @dragover.prevent="dragOver(index1, itemTaskIndex)"
|
|
- @dragend="dragEnd()" draggable class="chapter_upload"
|
|
|
|
|
|
+ @dragend="dragEnd()" :draggable="isdrag == 'chapter-'+itemTaskIndex+'-'+index1" class="chapter_upload"
|
|
v-for="(item1, index1) in itemTask.chapterData" :key="item1.id" @click="
|
|
v-for="(item1, index1) in itemTask.chapterData" :key="item1.id" @click="
|
|
getChapterData(
|
|
getChapterData(
|
|
$event,
|
|
$event,
|
|
@@ -791,7 +797,8 @@
|
|
dragOverTop2: newIndex === index1 && typeIndex == 'chapter-'+itemTaskIndex+'-'+index1 && oldIndex > index1 && dragType == 'drag',
|
|
dragOverTop2: newIndex === index1 && typeIndex == 'chapter-'+itemTaskIndex+'-'+index1 && oldIndex > index1 && dragType == 'drag',
|
|
dragOverBottom2: newIndex === index1 && typeIndex == 'chapter-'+itemTaskIndex+'-'+index1 && oldIndex < index1 && dragType == 'drag',
|
|
dragOverBottom2: newIndex === index1 && typeIndex == 'chapter-'+itemTaskIndex+'-'+index1 && oldIndex < index1 && dragType == 'drag',
|
|
}">
|
|
}">
|
|
- <div class="chapter_upload_drag"></div>
|
|
|
|
|
|
+ <div @mousedown="isdrag = 'chapter-'+itemTaskIndex+'-'+index1" @mouseup="isdrag = ''"
|
|
|
|
+ @touchstart="isdrag = 'chapter-'+itemTaskIndex+'-'+index1" @touchend="isdrag = ''" class="chapter_upload_drag"></div>
|
|
<div class="chapter_upload_o" style="
|
|
<div class="chapter_upload_o" style="
|
|
position: relative;
|
|
position: relative;
|
|
display: flex;
|
|
display: flex;
|
|
@@ -995,7 +1002,7 @@
|
|
"><img src="../../assets/icon/new/c_none.png" alt /></div>
|
|
"><img src="../../assets/icon/new/c_none.png" alt /></div>
|
|
<div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
|
|
<div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
|
|
<div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="dragOver(index1, itemTaskIndex)"
|
|
<div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="dragOver(index1, itemTaskIndex)"
|
|
- @dragend="dragEnd()" draggable class="chapter_upload"
|
|
|
|
|
|
+ @dragend="dragEnd()" :draggable="isdrag == 'chapter-'+itemTaskIndex+'-'+index1" class="chapter_upload"
|
|
v-for="(item1, index1) in itemTask.chapterData" :key="item1.id" @click="
|
|
v-for="(item1, index1) in itemTask.chapterData" :key="item1.id" @click="
|
|
getChapterData(
|
|
getChapterData(
|
|
$event,
|
|
$event,
|
|
@@ -1008,7 +1015,8 @@
|
|
dragOverTop2: newIndex === index1 && typeIndex == 'chapter-'+itemTaskIndex+'-'+index1 && oldIndex > index1,
|
|
dragOverTop2: newIndex === index1 && typeIndex == 'chapter-'+itemTaskIndex+'-'+index1 && oldIndex > index1,
|
|
dragOverBottom2: newIndex === index1 && typeIndex == 'chapter-'+itemTaskIndex+'-'+index1 && oldIndex < index1,
|
|
dragOverBottom2: newIndex === index1 && typeIndex == 'chapter-'+itemTaskIndex+'-'+index1 && oldIndex < index1,
|
|
}">
|
|
}">
|
|
- <div class="chapter_upload_drag"></div>
|
|
|
|
|
|
+ <div @mousedown="isdrag = 'chapter-'+itemTaskIndex+'-'+index1" @mouseup="isdrag = ''"
|
|
|
|
+ @touchstart="isdrag = 'chapter-'+itemTaskIndex+'-'+index1" @touchend="isdrag = ''" class="chapter_upload_drag"></div>
|
|
<div class="chapter_upload_t" style="width: 100%"></div>
|
|
<div class="chapter_upload_t" style="width: 100%"></div>
|
|
<div class="chapter_upload_o" style="
|
|
<div class="chapter_upload_o" style="
|
|
position: relative;
|
|
position: relative;
|
|
@@ -4178,7 +4186,7 @@ export default {
|
|
},
|
|
},
|
|
],
|
|
],
|
|
checkUnitIndex: 0,
|
|
checkUnitIndex: 0,
|
|
-
|
|
|
|
|
|
+ isdrag: '',
|
|
};
|
|
};
|
|
},
|
|
},
|
|
directives: {
|
|
directives: {
|
|
@@ -9943,6 +9951,7 @@ export default {
|
|
this.typeIndex = "";
|
|
this.typeIndex = "";
|
|
this.newIndex = "";
|
|
this.newIndex = "";
|
|
this.dragType = "";
|
|
this.dragType = "";
|
|
|
|
+ this.isdrag = "";
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
console.log(this.taskCount);
|
|
console.log(this.taskCount);
|
|
@@ -9956,6 +9965,7 @@ export default {
|
|
this.typeIndex = "";
|
|
this.typeIndex = "";
|
|
this.newIndex = "";
|
|
this.newIndex = "";
|
|
this.dragType = "";
|
|
this.dragType = "";
|
|
|
|
+ this.isdrag = "";
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
},
|
|
},
|
|
dragTaskStart(val, i, j) {
|
|
dragTaskStart(val, i, j) {
|
|
@@ -9975,6 +9985,7 @@ export default {
|
|
this.dragType = "";
|
|
this.dragType = "";
|
|
this.typeIndex = "";
|
|
this.typeIndex = "";
|
|
this.checkUnitIndex = "";
|
|
this.checkUnitIndex = "";
|
|
|
|
+ this.isdrag = "";
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if((this.newIndex == this.oldIndex && this.oldUnitIndex == this.checkUnitIndex)){
|
|
if((this.newIndex == this.oldIndex && this.oldUnitIndex == this.checkUnitIndex)){
|
|
@@ -9982,6 +9993,7 @@ export default {
|
|
this.dragType = "";
|
|
this.dragType = "";
|
|
this.typeIndex = "";
|
|
this.typeIndex = "";
|
|
this.checkUnitIndex = "";
|
|
this.checkUnitIndex = "";
|
|
|
|
+ this.isdrag = "";
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
let count1 = await this.getWorksCount(2, this.checkUnitIndex, this.newIndex, 0)
|
|
let count1 = await this.getWorksCount(2, this.checkUnitIndex, this.newIndex, 0)
|
|
@@ -10018,6 +10030,7 @@ export default {
|
|
this.newIndex = "";
|
|
this.newIndex = "";
|
|
this.dragType = "";
|
|
this.dragType = "";
|
|
this.checkUnitIndex = "";
|
|
this.checkUnitIndex = "";
|
|
|
|
+ this.isdrag = "";
|
|
this.updateWork();
|
|
this.updateWork();
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
})
|
|
})
|
|
@@ -10026,6 +10039,7 @@ export default {
|
|
this.dragType = "";
|
|
this.dragType = "";
|
|
this.typeIndex = "";
|
|
this.typeIndex = "";
|
|
this.checkUnitIndex = "";
|
|
this.checkUnitIndex = "";
|
|
|
|
+ this.isdrag = "";
|
|
return;
|
|
return;
|
|
});
|
|
});
|
|
}else{
|
|
}else{
|
|
@@ -10050,6 +10064,7 @@ export default {
|
|
this.newIndex = "";
|
|
this.newIndex = "";
|
|
this.dragType = "";
|
|
this.dragType = "";
|
|
this.checkUnitIndex = "";
|
|
this.checkUnitIndex = "";
|
|
|
|
+ this.isdrag = "";
|
|
this.updateWork();
|
|
this.updateWork();
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
}
|
|
}
|
|
@@ -10074,12 +10089,14 @@ export default {
|
|
this.newIndex = "";
|
|
this.newIndex = "";
|
|
this.dragType = "";
|
|
this.dragType = "";
|
|
this.typeIndex = "";
|
|
this.typeIndex = "";
|
|
|
|
+ this.isdrag = "";
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if(this.newIndex == this.oldIndex){
|
|
if(this.newIndex == this.oldIndex){
|
|
this.newIndex = "";
|
|
this.newIndex = "";
|
|
this.dragType = "";
|
|
this.dragType = "";
|
|
this.typeIndex = "";
|
|
this.typeIndex = "";
|
|
|
|
+ this.isdrag = "";
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
let count1 = await this.getWorksCount(1, this.newIndex, 0, 0)
|
|
let count1 = await this.getWorksCount(1, this.newIndex, 0, 0)
|
|
@@ -10105,6 +10122,7 @@ export default {
|
|
this.typeIndex = "";
|
|
this.typeIndex = "";
|
|
this.newIndex = "";
|
|
this.newIndex = "";
|
|
this.dragType = "";
|
|
this.dragType = "";
|
|
|
|
+ this.isdrag = "";
|
|
this.updateWork();
|
|
this.updateWork();
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
})
|
|
})
|
|
@@ -10112,6 +10130,7 @@ export default {
|
|
this.newIndex = "";
|
|
this.newIndex = "";
|
|
this.dragType = "";
|
|
this.dragType = "";
|
|
this.typeIndex = "";
|
|
this.typeIndex = "";
|
|
|
|
+ this.isdrag = "";
|
|
return;
|
|
return;
|
|
});
|
|
});
|
|
}else{
|
|
}else{
|
|
@@ -10124,6 +10143,7 @@ export default {
|
|
this.typeIndex = "";
|
|
this.typeIndex = "";
|
|
this.newIndex = "";
|
|
this.newIndex = "";
|
|
this.dragType = "";
|
|
this.dragType = "";
|
|
|
|
+ this.isdrag = "";
|
|
this.updateWork();
|
|
this.updateWork();
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
}
|
|
}
|
|
@@ -11279,6 +11299,7 @@ export default {
|
|
background-image: url("../../assets/icon/new/icon_course_drag.png");
|
|
background-image: url("../../assets/icon/new/icon_course_drag.png");
|
|
background-size: 100% 100%;
|
|
background-size: 100% 100%;
|
|
z-index: 10;
|
|
z-index: 10;
|
|
|
|
+ display: none;
|
|
}
|
|
}
|
|
|
|
|
|
.isNavStage > .chapter_upload_drag{
|
|
.isNavStage > .chapter_upload_drag{
|
|
@@ -13499,6 +13520,18 @@ ol {
|
|
position: relative;
|
|
position: relative;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+.navStage:hover > .chapter_upload_drag{
|
|
|
|
+ display: block;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.navTask:hover > .chapter_upload_drag{
|
|
|
|
+ display: block;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.chapter_upload:hover > .chapter_upload_drag{
|
|
|
|
+ display: block;
|
|
|
|
+}
|
|
|
|
+
|
|
.navStage::before {
|
|
.navStage::before {
|
|
content: '';
|
|
content: '';
|
|
display: block;
|
|
display: block;
|