|
@@ -476,6 +476,7 @@
|
|
|
添加任务
|
|
|
</div> -->
|
|
|
<div class="taskBorder" :style="{ minHeight: unitJson[unitIndex].easy && 'unset' }"
|
|
|
+ :class="{smallTaskBorder:itemTask.isFold === 1}"
|
|
|
v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex">
|
|
|
<div v-if="unitJson[unitIndex].easy != 1">
|
|
|
<div :style="{
|
|
@@ -501,13 +502,15 @@
|
|
|
itemTaskIndex
|
|
|
].task
|
|
|
" />
|
|
|
+ <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2" class="show_taskD show" @click="fold2(itemTaskIndex)"><img src="../../assets/icon/new/icon-slide.png" />收起任务描述</div>
|
|
|
+ <div v-else-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" class="show_taskD" @click="fold2(itemTaskIndex)"><img src="../../assets/icon/new/icon-slide.png" />展开任务描述</div>
|
|
|
</div>
|
|
|
<div class="remove" v-if="item.taskJson.length > 1 &&
|
|
|
(!unitJson[unitIndex].easy ||
|
|
|
unitJson[unitIndex].easy == 6)
|
|
|
" @click="deleteTask(itemTaskIndex)" style="margin-right: 10px;"></div>
|
|
|
</div>
|
|
|
- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" style="
|
|
|
+ <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2" style="
|
|
|
display: flex;
|
|
|
margin: 20px 0;
|
|
|
flex-direction: row;
|
|
@@ -517,7 +520,7 @@
|
|
|
<div class="lineTitle">任务描述</div>
|
|
|
<!-- <div class="line"></div> -->
|
|
|
</div>
|
|
|
- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1">
|
|
|
+ <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2">
|
|
|
<editor-bar style="margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
|
|
|
itemTaskIndex
|
|
|
].taskDetail
|
|
@@ -4730,18 +4733,19 @@ export default {
|
|
|
el.getElementsByTagName("input")[0].click();
|
|
|
},
|
|
|
fold(i, e) {
|
|
|
- var a = e.currentTarget.parentElement.parentElement;
|
|
|
- var b = e.currentTarget.parentElement;
|
|
|
if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0) {
|
|
|
this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
|
|
|
- a.className += " smallTaskBorder";
|
|
|
- b.className += " funBlockTop";
|
|
|
} else {
|
|
|
this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
|
|
|
- a.className = "taskBorder";
|
|
|
- b.className = "funBlock";
|
|
|
}
|
|
|
- console.log(e);
|
|
|
+ },
|
|
|
+ fold2(i) {
|
|
|
+ if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
|
|
|
+ this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = false;
|
|
|
+ } else {
|
|
|
+ this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
|
|
|
+ }
|
|
|
+ this.$forceUpdate();
|
|
|
},
|
|
|
deleteHomeworkBox(unitIndex, index, i) {
|
|
|
this.unitJson[unitIndex].chapterInfo[index].taskJson[
|
|
@@ -8100,8 +8104,27 @@ export default {
|
|
|
|
|
|
.chapter_contentbox .cc_input {
|
|
|
width: 100%;
|
|
|
+ display:flex;
|
|
|
+}
|
|
|
+
|
|
|
+.show_taskD{
|
|
|
+ min-width:fit-content;
|
|
|
+ margin-left: 10px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 14px;
|
|
|
+ cursor: pointer;
|
|
|
+ color: #717C8D;
|
|
|
}
|
|
|
|
|
|
+.show_taskD > img{
|
|
|
+ width:15px;
|
|
|
+ margin-right:5px;
|
|
|
+}
|
|
|
+
|
|
|
+.show_taskD.show > img{
|
|
|
+ transform: rotate(180deg);
|
|
|
+}
|
|
|
.remove {
|
|
|
background-image: url("../../assets/icon/new/delete_u.png");
|
|
|
cursor: pointer;
|