|
@@ -173,12 +173,14 @@
|
|
|
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="{
|
|
|
+ @dragend="dragTaskEnd()" :draggable="isdrag == 'task-'+tIndex" @click="goToTask(tIndex)" class="navTask" :class="{
|
|
|
isNavTask:
|
|
|
isClickColor > 0 && isClickColor == tIndex + 1,
|
|
|
isNavOpen: t.toolOpen,
|
|
|
}">
|
|
|
- <div style="left: 8px;" class="chapter_upload_drag"></div>
|
|
|
+ <div @click.stop="taskOpen(tIndex)" class="chapter_upload_open"></div>
|
|
|
+ <div @mousedown="isdrag = 'task-'+tIndex" @mouseup="isdrag = ''"
|
|
|
+ @touchstart="isdrag = 'task-'+tIndex" @touchend="isdrag = ''" style="left: 8px;" class="chapter_upload_drag"></div>
|
|
|
<div class="nt_taskBox">
|
|
|
<div class="nt_taskTitle">任务{{ tIndex + 1 }}:</div>
|
|
|
<div class="nt_taskName">
|
|
@@ -212,7 +214,7 @@
|
|
|
<div class="basic_box2">
|
|
|
<div style="margin: 0 0 20px 0; padding: 0 0 0 10px"
|
|
|
v-for="(item, index) in unitJson[unitIndex].chapterInfo" :key="index">
|
|
|
- <div class="taskBorder" style="padding: 20px 20px 10px;">
|
|
|
+ <div class="taskBorder" style="padding: 20px 20px 10px;" >
|
|
|
<div class="basic_box" style="
|
|
|
margin: 0;
|
|
|
min-height: 0;
|
|
@@ -226,18 +228,19 @@
|
|
|
align-items: center;
|
|
|
">
|
|
|
<div class="lineTitle" style="margin-bottom:10px">学习内容</div>
|
|
|
- <div style="margin-bottom:10px" v-if="!item.taskJson[0].isFoldchapter" class="show_taskD show"
|
|
|
+ <!-- <div style="margin-bottom:10px" v-if="!item.taskJson[0].isFoldchapter" class="show_taskD show"
|
|
|
@click="foldC(0)"><img src="../../../assets/icon/new/icon-slide.png" />收起学习内容</div>
|
|
|
<div style="margin-bottom:10px" v-else class="show_taskD" @click="foldC(0)"><img
|
|
|
- src="../../../assets/icon/new/icon-slide.png" />展开学习内容</div>
|
|
|
+ src="../../../assets/icon/new/icon-slide.png" />展开学习内容</div> -->
|
|
|
</div>
|
|
|
- <div v-if="!item.taskJson[0].isFoldchapter">
|
|
|
+ <!-- v-if="!item.taskJson[0].isFoldchapter" -->
|
|
|
+ <div>
|
|
|
<div class="add_chapters_box add_c_none" v-if="item.taskJson[0].chapterData &&
|
|
|
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, 0)"
|
|
|
- @dragend="dragEnd()" draggable class="chapter_upload" v-for="(item1, index1) in item.taskJson[0]
|
|
|
+ @dragend="dragEnd()" :draggable="isdrag == 'chapter-'+'0'+'-'+index1" class="chapter_upload" v-for="(item1, index1) in item.taskJson[0]
|
|
|
.chapterData" :key="item1.id" @click="
|
|
|
getChapterData(
|
|
|
$event,
|
|
@@ -250,7 +253,8 @@
|
|
|
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 @mousedown="isdrag = 'chapter-'+'0'+'-'+index1" @mouseup="isdrag = ''"
|
|
|
+ @touchstart="isdrag = 'chapter-'+'0'+'-'+index1" @touchend="isdrag = ''" class="chapter_upload_drag"></div>
|
|
|
<div class="chapter_upload_t" style="width: 100%"></div>
|
|
|
<div class="chapter_upload_o" style="
|
|
|
position: relative;
|
|
@@ -387,7 +391,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="add_info_box" style="margin:10px 0 0" v-if="!item.taskJson[0].isFoldchapter">
|
|
|
+ <!-- v-if="!item.taskJson[0].isFoldchapter" -->
|
|
|
+ <div class="add_info_box" style="margin:10px 0 0">
|
|
|
<button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
|
|
|
文件
|
|
|
<input type="file" accept="*" style="display: none" v-if="inputShow"
|
|
@@ -443,8 +448,9 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="taskBorder" :style="{
|
|
|
- minHeight: unitJson[unitIndex].easy && 'unset',
|
|
|
- }" v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex">
|
|
|
+ minHeight: unitJson[unitIndex].easy && 'unset', paddingBottom: '40px'
|
|
|
+ }" :class="{ smallTaskBorder: itemTask.isFold === 1 }" v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex">
|
|
|
+ <div class="taskTitle">任务{{ itemTaskIndex + 1 }}</div>
|
|
|
<div v-if="unitJson[unitIndex].easy != 1">
|
|
|
<div :style="{
|
|
|
marginBottom:
|
|
@@ -461,7 +467,7 @@
|
|
|
justify-content: flex-start;
|
|
|
align-items: center;
|
|
|
">
|
|
|
- <div class="lineTitle">任务{{ itemTaskIndex + 1 }}概述</div>
|
|
|
+ <div class="lineTitle">任务概述</div>
|
|
|
</div>
|
|
|
<div :id="'task' + itemTaskIndex" class="chapter_contentbox" style="
|
|
|
flex-direction: row;
|
|
@@ -477,16 +483,17 @@
|
|
|
itemTaskIndex
|
|
|
].task
|
|
|
" />
|
|
|
- <div v-if="!itemTask.isFold2" class="show_taskD show" @click="fold2(itemTaskIndex)"><img
|
|
|
+ <!-- <div v-if="!itemTask.isFold2" class="show_taskD show" @click="fold2(itemTaskIndex)"><img
|
|
|
src="../../../assets/icon/new/icon-slide.png" />收起任务描述</div>
|
|
|
<div v-else class="show_taskD" @click="fold2(itemTaskIndex)"><img
|
|
|
- src="../../../assets/icon/new/icon-slide.png" />展开任务描述</div>
|
|
|
+ src="../../../assets/icon/new/icon-slide.png" />展开任务描述</div> -->
|
|
|
</div>
|
|
|
<div class="remove" v-if="item.taskJson.length > 1" @click="deleteTask(itemTaskIndex)"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div style="margin: 25px 0" v-if="!itemTask.isFold2">
|
|
|
+ <div style="margin: 25px 0">
|
|
|
+ <!-- v-if="!itemTask.isFold2" -->
|
|
|
<!-- <editor-bar style="width: 90% !important; margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
|
|
|
itemTaskIndex
|
|
|
].taskDetail
|
|
@@ -567,7 +574,7 @@
|
|
|
其他
|
|
|
</div> -->
|
|
|
</div>
|
|
|
- <div class="chapter_upload_ud2" style="z-index: 9;margin:0 0 0 auto" v-if="itemTask.toolChoose.length > 1">
|
|
|
+ <div class="chapter_upload_ud2" style="z-index: 9;margin:0 0 0 auto" :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px auto' : '0 0 0 auto' }" v-if="itemTask.toolChoose.length > 1">
|
|
|
<div class="chapter_upload_up2" @click.stop="
|
|
|
upTool(
|
|
|
$event,
|
|
@@ -585,17 +592,18 @@
|
|
|
)
|
|
|
">下移</div>
|
|
|
</div>
|
|
|
- <div v-if="!itemTool.isFold3" class="show_toolD show"
|
|
|
+ <!-- <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>
|
|
|
+ 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">
|
|
|
+ <!-- v-show="!itemTool.isFold3" -->
|
|
|
+ <div style="min-height: 163px" >
|
|
|
<div class="toolSort" v-if="itemTool.toolType == 0">
|
|
|
<!-- <div class="tool">
|
|
|
<div
|
|
@@ -1679,7 +1687,8 @@
|
|
|
</div> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-show="!itemTool.isFold3">
|
|
|
+ <!-- v-show="!itemTool.isFold3" -->
|
|
|
+ <div>
|
|
|
<textarea rows="3" type="text" v-autoHeight="87" placeholder="添加工具描述" class="binfo_input"
|
|
|
style="
|
|
|
margin: 0 0 20px 0;
|
|
@@ -1698,6 +1707,17 @@
|
|
|
</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="funBlock" style="padding: 0">
|
|
|
+ <div class="fold" @click="fold(itemTaskIndex, $event)">
|
|
|
+ <div
|
|
|
+ class="arrow"
|
|
|
+ :class="{ arrowZ: !(itemTask.isFold === 1) }"
|
|
|
+ ></div>
|
|
|
+ <div>
|
|
|
+ {{ itemTask.isFold === 1 ? "展开任务" : "收起任务" }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="addTaskBorder" v-if="!unitJson[unitIndex].easy">
|
|
|
<!-- <div>
|
|
@@ -4589,8 +4609,8 @@
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
<el-dialog title="创建作文题目" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px"
|
|
|
- :before-close="(done) => { closePan(69) }" class="dialog_diy fullStyle">
|
|
|
- <englishRight @setEngList="setEnglishList" :englishList="englishList"></englishRight>
|
|
|
+ :before-close="(done) => { closePan(69) }" class="dialog_diy fullStyle fullStyle1">
|
|
|
+ <englishRight :englishList="englishList" :oid="oid" ref="engJson"></englishRight>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="englishDialogVisible = false">取 消</el-button>
|
|
|
<el-button type="primary" @click="addEnglish">确 定</el-button>
|
|
@@ -4769,7 +4789,7 @@ export default {
|
|
|
toolText: "",
|
|
|
isShowTools: false,
|
|
|
askCount: 1,
|
|
|
- isFold: 0,
|
|
|
+ isFold: 1,
|
|
|
askTitle: "",
|
|
|
askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
checkJson: [{ checkCount: [], checkPerent: [] }],
|
|
@@ -4854,6 +4874,7 @@ export default {
|
|
|
oldData: null,
|
|
|
newIndex: "",
|
|
|
typeIndex: "",
|
|
|
+ isdrag: '',
|
|
|
};
|
|
|
},
|
|
|
directives: {
|
|
@@ -5226,6 +5247,9 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
addEnglish(){
|
|
|
+ this.englishList.engTitle = this.$refs['engJson'].engList.engTitle;
|
|
|
+ this.englishList.englishText = this.$refs['engJson'].engList.englishText;
|
|
|
+ this.englishList.textJson = this.$refs['engJson'].engList.textJson;
|
|
|
if(this.englishList.engTitle == "" || this.englishList.englishText == ""){
|
|
|
this.$message.error("请将内容填写完整!");
|
|
|
return;
|
|
@@ -5242,9 +5266,6 @@ export default {
|
|
|
this.addTools(69, this.taskCount, this.toolIndex);
|
|
|
}
|
|
|
},
|
|
|
- setEnglishList(engList){
|
|
|
- this.englishList = engList;
|
|
|
- },
|
|
|
imgChange2(i, j) {
|
|
|
var _tmp = this.testJson.testJson[i].checkList[j];
|
|
|
this.noneBtnImg = _tmp.length >= 1;
|
|
@@ -5794,11 +5815,11 @@ export default {
|
|
|
// a.splice(a.length - 1, a.length);
|
|
|
_this.$message.error("上传失败");
|
|
|
} else {
|
|
|
- _this.cover.push({
|
|
|
+ _this.cover = [{
|
|
|
name: file.name,
|
|
|
url: data.Location,
|
|
|
uid: file.uid,
|
|
|
- });
|
|
|
+ }];
|
|
|
_this.imgChange1(null, null, 1, null);
|
|
|
_this.choosePicVisible = false;
|
|
|
console.log(data.Location);
|
|
@@ -6402,7 +6423,7 @@ export default {
|
|
|
],
|
|
|
isShowTools: false,
|
|
|
askCount: 1,
|
|
|
- isFold: 0,
|
|
|
+ isFold: 1,
|
|
|
askTitle: "",
|
|
|
askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
checkJson: [{ checkCount: [], checkPerent: [] }],
|
|
@@ -6455,7 +6476,7 @@ export default {
|
|
|
toolText: "",
|
|
|
isShowTools: false,
|
|
|
askCount: 1,
|
|
|
- isFold: 0,
|
|
|
+ isFold: 1,
|
|
|
askTitle: "",
|
|
|
askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
checkJson: [{ checkCount: [], checkPerent: [] }],
|
|
@@ -6467,16 +6488,10 @@ export default {
|
|
|
el.getElementsByTagName("input")[0].click();
|
|
|
},
|
|
|
fold(i, e, type) {
|
|
|
- var a = e.currentTarget.parentElement.parentElement;
|
|
|
- var b = e.currentTarget.parentElement;
|
|
|
- if (type == 1) {
|
|
|
+ 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);
|
|
|
},
|
|
@@ -6692,59 +6707,81 @@ export default {
|
|
|
this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
|
- upTool(e, i, j, tooli){
|
|
|
+ async upTool(e, i, j, tooli){
|
|
|
e.stopPropagation();
|
|
|
if (tooli == 0) {
|
|
|
return;
|
|
|
}
|
|
|
- this.$confirm(
|
|
|
- "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
|
|
|
- "提示",
|
|
|
- {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- }
|
|
|
- )
|
|
|
- .then(() => {
|
|
|
+ let count1 = await this.getWorksCount(3, i, j, tooli - 1)
|
|
|
+ let count2 = await this.getWorksCount(3, i, j, tooli)
|
|
|
+ if(count1 > 0 || count2 > 0){
|
|
|
+ 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;
|
|
|
+ });
|
|
|
+ }else{
|
|
|
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;
|
|
|
- });
|
|
|
+ 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()
|
|
|
+ }
|
|
|
},
|
|
|
- downTool(e, i, j, tooli){
|
|
|
+ async 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(() => {
|
|
|
+ let count1 = await this.getWorksCount(3, i, j, tooli + 1)
|
|
|
+ let count2 = await this.getWorksCount(3, i, j, tooli)
|
|
|
+ if(count1 > 0 || count2 > 0){
|
|
|
+ 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;
|
|
|
+ });
|
|
|
+ }else{
|
|
|
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;
|
|
|
- });
|
|
|
+ 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()
|
|
|
+ }
|
|
|
},
|
|
|
addWork() {
|
|
|
let cPan = 1;
|
|
@@ -7170,7 +7207,7 @@ export default {
|
|
|
],
|
|
|
isShowTools: false,
|
|
|
askCount: 1,
|
|
|
- isFold: 0,
|
|
|
+ isFold: 1,
|
|
|
askTitle: "",
|
|
|
askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
checkJson: [{ checkCount: [], checkPerent: [] }],
|
|
@@ -7234,7 +7271,7 @@ export default {
|
|
|
],
|
|
|
isShowTools: false,
|
|
|
askCount: 1,
|
|
|
- isFold: 0,
|
|
|
+ isFold: 1,
|
|
|
askTitle: "",
|
|
|
askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
checkJson: [{ checkCount: [], checkPerent: [] }],
|
|
@@ -7682,6 +7719,7 @@ export default {
|
|
|
"*"
|
|
|
);
|
|
|
}else if(i == 69){
|
|
|
+ this.englishList = {};
|
|
|
this.englishList = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
|
|
|
itemTaskIndex
|
|
|
].toolChoose[toolIndex].englishList
|
|
@@ -7693,6 +7731,7 @@ export default {
|
|
|
)
|
|
|
)
|
|
|
: { };
|
|
|
+ this.$forceUpdate();
|
|
|
this.englishDialogVisible = true;
|
|
|
}
|
|
|
},
|
|
@@ -8356,10 +8395,13 @@ export default {
|
|
|
return element != "";
|
|
|
});
|
|
|
return (
|
|
|
- (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
|
|
|
+ el.teststitle != "" || el.timuList.length > 0 || elc.length != 0
|
|
|
);
|
|
|
});
|
|
|
isTestJson.testCount = isTestJson.testJson.length;
|
|
|
+ if(!isTestJson.testCount){
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.testJson = isTestJson;
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
@@ -8395,7 +8437,7 @@ export default {
|
|
|
],
|
|
|
isShowTools: false,
|
|
|
askCount: 1,
|
|
|
- isFold: 0,
|
|
|
+ isFold: 1,
|
|
|
askTitle: "",
|
|
|
askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
checkJson: [{ checkCount: [], checkPerent: [] }],
|
|
@@ -8445,7 +8487,7 @@ export default {
|
|
|
],
|
|
|
isShowTools: false,
|
|
|
askCount: 1,
|
|
|
- isFold: 0,
|
|
|
+ isFold: 1,
|
|
|
askTitle: "",
|
|
|
askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
checkJson: [{ checkCount: [], checkPerent: [] }],
|
|
@@ -9475,23 +9517,31 @@ export default {
|
|
|
goToTask(i) {
|
|
|
this.toolIndexType = ''
|
|
|
if (this.isClickColor == (i + 1)) {
|
|
|
- if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
|
|
|
- this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
|
|
|
- } else {
|
|
|
+ // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
|
|
|
+ // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
|
|
|
+ // } else {
|
|
|
this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true
|
|
|
- }
|
|
|
+ // }
|
|
|
this.$forceUpdate();
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
|
|
|
- this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
|
|
|
- } else {
|
|
|
+ // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
|
|
|
+ // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
|
|
|
+ // } else {
|
|
|
document.querySelectorAll(".rightBox")[0].scrollTop =
|
|
|
document.querySelectorAll(".taskBorder")[i + 1].offsetTop +
|
|
|
document.querySelectorAll(".taskBorder")[i + 1].parentElement.parentElement.offsetTop;
|
|
|
this.isClickColor = i + 1;
|
|
|
this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true
|
|
|
+ // }
|
|
|
+ this.$forceUpdate();
|
|
|
+ },
|
|
|
+ taskOpen(i){
|
|
|
+ if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
|
|
|
+ this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
|
|
|
+ } else {
|
|
|
+ this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true
|
|
|
}
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
@@ -9886,6 +9936,7 @@ export default {
|
|
|
this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount].chapterData = [...newItems];
|
|
|
this.newIndex = "";
|
|
|
this.typeIndex = "";
|
|
|
+ this.isdrag = "";
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
|
dragTaskStart(val, i) {
|
|
@@ -9896,49 +9947,102 @@ export default {
|
|
|
this.typeIndex = "task-" + i
|
|
|
this.newIndex = i;
|
|
|
},
|
|
|
- dragTaskEnd() {
|
|
|
+ async dragTaskEnd() {
|
|
|
if (this.newIndex == this.oldIndex) {
|
|
|
this.typeIndex = "";
|
|
|
- this.newIndex = "";
|
|
|
+ this.newIndex = "";
|
|
|
+ this.isdrag = "";
|
|
|
return;
|
|
|
}
|
|
|
- this.$confirm(
|
|
|
- "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
|
|
|
- "提示",
|
|
|
- {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- }
|
|
|
- )
|
|
|
- .then(() => {
|
|
|
- let newItems = [...this.unitJson[this.unitIndex].chapterInfo[0].taskJson];
|
|
|
- let chapterData = []
|
|
|
- if (this.oldIndex == 0) {
|
|
|
- chapterData = newItems[this.oldIndex].chapterData
|
|
|
- newItems[this.oldIndex].chapterData = []
|
|
|
- }else if(this.newIndex == 0){
|
|
|
- chapterData = newItems[this.newIndex].chapterData
|
|
|
- newItems[this.oldIndex].chapterData = []
|
|
|
- }
|
|
|
- // 删除老的节点
|
|
|
- newItems.splice(this.oldIndex, 1);
|
|
|
- // 在列表中目标位置增加新的节点
|
|
|
- newItems.splice(this.newIndex, 0, this.oldData);
|
|
|
- if (this.oldIndex == 0 || this.newIndex == 0) {
|
|
|
- newItems[0].chapterData = chapterData
|
|
|
+ let count1 = await this.getWorksCount(2, 0, this.newIndex, 0)
|
|
|
+ let count2 = await this.getWorksCount(2, 0, this.oldIndex, 0)
|
|
|
+ if(count1 > 0 || count2 > 0){
|
|
|
+ this.$confirm(
|
|
|
+ "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
}
|
|
|
- this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [...newItems];
|
|
|
- this.typeIndex = "";
|
|
|
- this.newIndex = "";
|
|
|
- this.$forceUpdate()
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- this.typeIndex = "";
|
|
|
- this.newIndex = "";
|
|
|
- return;
|
|
|
- });
|
|
|
+ )
|
|
|
+ .then(() => {
|
|
|
+ let newItems = [...this.unitJson[this.unitIndex].chapterInfo[0].taskJson];
|
|
|
+ let chapterData = []
|
|
|
+ if (this.oldIndex == 0) {
|
|
|
+ chapterData = newItems[this.oldIndex].chapterData
|
|
|
+ newItems[this.oldIndex].chapterData = []
|
|
|
+ }else if(this.newIndex == 0){
|
|
|
+ chapterData = newItems[this.newIndex].chapterData
|
|
|
+ newItems[this.oldIndex].chapterData = []
|
|
|
+ }
|
|
|
+ // 删除老的节点
|
|
|
+ newItems.splice(this.oldIndex, 1);
|
|
|
+ // 在列表中目标位置增加新的节点
|
|
|
+ newItems.splice(this.newIndex, 0, this.oldData);
|
|
|
+ if (this.oldIndex == 0 || this.newIndex == 0) {
|
|
|
+ newItems[0].chapterData = chapterData
|
|
|
+ }
|
|
|
+ this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [...newItems];
|
|
|
+ this.typeIndex = "";
|
|
|
+ this.newIndex = "";
|
|
|
+ this.isdrag = "";
|
|
|
+ this.$forceUpdate()
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.typeIndex = "";
|
|
|
+ this.newIndex = "";
|
|
|
+ this.isdrag = "";
|
|
|
+ return;
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ let newItems = [...this.unitJson[this.unitIndex].chapterInfo[0].taskJson];
|
|
|
+ let chapterData = []
|
|
|
+ if (this.oldIndex == 0) {
|
|
|
+ chapterData = newItems[this.oldIndex].chapterData
|
|
|
+ newItems[this.oldIndex].chapterData = []
|
|
|
+ }else if(this.newIndex == 0){
|
|
|
+ chapterData = newItems[this.newIndex].chapterData
|
|
|
+ newItems[this.oldIndex].chapterData = []
|
|
|
+ }
|
|
|
+ // 删除老的节点
|
|
|
+ newItems.splice(this.oldIndex, 1);
|
|
|
+ // 在列表中目标位置增加新的节点
|
|
|
+ newItems.splice(this.newIndex, 0, this.oldData);
|
|
|
+ if (this.oldIndex == 0 || this.newIndex == 0) {
|
|
|
+ newItems[0].chapterData = chapterData
|
|
|
+ }
|
|
|
+ this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [...newItems];
|
|
|
+ this.typeIndex = "";
|
|
|
+ this.newIndex = "";
|
|
|
+ this.$forceUpdate()
|
|
|
+ }
|
|
|
},
|
|
|
+ getWorksCount(type, stage, task, tool){
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ let params = [
|
|
|
+ {
|
|
|
+ cid: this.cid,
|
|
|
+ stage: stage,
|
|
|
+ task: task,
|
|
|
+ tool: tool,
|
|
|
+ type: type
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ this.ajax
|
|
|
+ .post(this.$store.state.api + "getCourseWorkCount", params)
|
|
|
+ .then((res) => {
|
|
|
+ let count = res.data[0][0].count
|
|
|
+ resolve(count)
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ resolve(0)
|
|
|
+ this.$message.error("网络不佳");
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
clearTimeout(this.timer);
|
|
@@ -11015,6 +11119,10 @@ export default {
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
+.chapter_upload:hover > .chapter_upload_drag{
|
|
|
+ display: block;
|
|
|
+}
|
|
|
+
|
|
|
.chapter_upload_drag {
|
|
|
position: absolute;
|
|
|
cursor: pointer;
|
|
@@ -11024,6 +11132,7 @@ export default {
|
|
|
background-image: url("../../../assets/icon/new/icon_course_drag.png");
|
|
|
background-size: 100% 100%;
|
|
|
z-index: 10;
|
|
|
+ display: none;
|
|
|
}
|
|
|
|
|
|
.chapter_upload_t {
|
|
@@ -11227,7 +11336,7 @@ export default {
|
|
|
.chapter_upload_up2::before,
|
|
|
.chapter_upload_down2::before {
|
|
|
content: '';
|
|
|
- background-image: url('../../../assets/icon/new/c_up.png');
|
|
|
+ background-image: url('../../../assets/icon/new/c_down.png');
|
|
|
width: 14px;
|
|
|
height: 14px;
|
|
|
background-size: 100% 100%;
|
|
@@ -11236,7 +11345,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
.chapter_upload_up2::before {
|
|
|
- background-image: url('../../../assets/icon/new/c_down.png') !important;
|
|
|
+ background-image: url('../../../assets/icon/new/c_up.png') !important;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -11980,8 +12089,8 @@ ol {
|
|
|
}
|
|
|
|
|
|
.smallTaskBorder {
|
|
|
- height: 170px;
|
|
|
- min-height: 170px !important;
|
|
|
+ height: 340px;
|
|
|
+ min-height: 340px !important;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
|
|
@@ -12024,28 +12133,46 @@ ol {
|
|
|
display: flex;
|
|
|
padding: 15px 0;
|
|
|
flex-direction: row;
|
|
|
- justify-content: flex-end;
|
|
|
+ justify-content: center;
|
|
|
align-items: center;
|
|
|
position: absolute;
|
|
|
- right: 15px;
|
|
|
- bottom: 35px;
|
|
|
+ right: 0;
|
|
|
+ bottom: 0;
|
|
|
+ background: #fff;
|
|
|
+ width: 100%;
|
|
|
+ height: 60px;
|
|
|
z-index: 9;
|
|
|
}
|
|
|
|
|
|
.fold {
|
|
|
display: flex;
|
|
|
- margin: 0 10px;
|
|
|
+ margin: 0 20px;
|
|
|
flex-direction: row;
|
|
|
align-items: center;
|
|
|
cursor: pointer;
|
|
|
+ color: #2b7bff;
|
|
|
}
|
|
|
|
|
|
.arrow {
|
|
|
- width: 15px;
|
|
|
- height: 15px;
|
|
|
- margin-left: 10px;
|
|
|
+ margin-right: 8px;
|
|
|
+ width: 16px;
|
|
|
+ height: 16px;
|
|
|
+ min-width: 16px;
|
|
|
+ min-height: 16px;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ display: block;
|
|
|
+ background-image: url(../../../assets/icon/new/u_up.png);
|
|
|
+ /* border-left: 7px solid transparent;
|
|
|
+ border-bottom: 7px solid #717C8D;
|
|
|
+ border-top: 0px solid transparent;
|
|
|
+ border-right: 7px solid transparent; */
|
|
|
+ /* box-sizing: border-box; */
|
|
|
+ transition: all .3s;
|
|
|
}
|
|
|
|
|
|
+.arrowZ {
|
|
|
+ transform: rotate(180deg);
|
|
|
+}
|
|
|
.addToolFun {
|
|
|
display: flex;
|
|
|
width: 150px;
|
|
@@ -13146,14 +13273,17 @@ ol {
|
|
|
cursor: pointer;
|
|
|
background: #ffffff;
|
|
|
width: 95%;
|
|
|
- margin: 10px auto 0;
|
|
|
+ margin: 5px auto 5px;
|
|
|
box-sizing: border-box;
|
|
|
border-radius: 5px;
|
|
|
flex-wrap: wrap;
|
|
|
position: relative;
|
|
|
}
|
|
|
|
|
|
-.navTask::before {
|
|
|
+.navTask:hover > .chapter_upload_drag{
|
|
|
+ display: block;
|
|
|
+}
|
|
|
+.navTask .chapter_upload_open {
|
|
|
content: '';
|
|
|
display: block;
|
|
|
width: 16px;
|
|
@@ -13163,8 +13293,23 @@ ol {
|
|
|
margin-left: 23px;
|
|
|
}
|
|
|
|
|
|
-.isNavOpen::before {
|
|
|
+.noImage .chapter_upload_open {
|
|
|
+ display: none;
|
|
|
+ background-image: unset !important;
|
|
|
+}
|
|
|
+
|
|
|
+.isNavOpen .chapter_upload_open {
|
|
|
+ /* background-image: url(../../assets/icon/new/icon_arrow_a.png) !important; */
|
|
|
+ transform: rotate(90deg);
|
|
|
+}
|
|
|
+
|
|
|
+.isNavTask .chapter_upload_open {
|
|
|
background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
|
|
|
+ transform: rotate(-90deg);
|
|
|
+}
|
|
|
+
|
|
|
+.isNavTask.isNavOpen .chapter_upload_open{
|
|
|
+ transform: rotate(0deg);
|
|
|
}
|
|
|
|
|
|
.dragOverTop {
|
|
@@ -13235,14 +13380,19 @@ ol {
|
|
|
/* max-width: 130px; */
|
|
|
/* width: 100%; */
|
|
|
max-width: calc(100% - 66px);
|
|
|
- white-space: nowrap;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
font-size: 16px;
|
|
|
color: #060E17;
|
|
|
/* color: #0E1E33; */
|
|
|
}
|
|
|
|
|
|
+.navTask .nt_taskName span{
|
|
|
+ width: 100%;
|
|
|
+ white-space: nowrap;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ display:block;
|
|
|
+}
|
|
|
+
|
|
|
.gjBox {
|
|
|
width: calc(100% - 25px);
|
|
|
padding: 0 0 0 0;
|
|
@@ -13542,6 +13692,9 @@ ol {
|
|
|
height: 100% !important;
|
|
|
margin: 0 auto !important;
|
|
|
}
|
|
|
+.fullStyle1>>>.el-dialog__body {
|
|
|
+ height: auto !important;
|
|
|
+}
|
|
|
|
|
|
.wb_j_box_btn {
|
|
|
width: calc(100% - 30px);
|
|
@@ -13704,4 +13857,21 @@ ol {
|
|
|
.class_item>>>.el-checkbox__input {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
-}</style>
|
|
|
+}
|
|
|
+.taskTitle{
|
|
|
+ font-size: 20px;
|
|
|
+ font-weight: bold;
|
|
|
+ margin-bottom: 35px;
|
|
|
+}
|
|
|
+
|
|
|
+.taskTitle:after{
|
|
|
+ content: '';
|
|
|
+ width: 100%;
|
|
|
+ display: block;
|
|
|
+ height: 1px;
|
|
|
+ background: #CAD1DC;
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ margin: 15px 0 0;
|
|
|
+}
|
|
|
+</style>
|