|
@@ -169,14 +169,14 @@
|
|
|
.taskJson" :key="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
|
|
|
- }">
|
|
|
+ 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">
|
|
|
- <div class="nt_taskTitle">任务{{ tIndex + 1 }}</div>
|
|
|
+ <div class="nt_taskTitle">任务{{ tIndex + 1 }}:</div>
|
|
|
<div class="nt_taskName">
|
|
|
<el-tooltip effect="light" :content="t.task" placement="top">
|
|
|
<span>{{ t.task }}</span>
|
|
@@ -222,30 +222,6 @@
|
|
|
align-items: center;
|
|
|
">
|
|
|
<div class="lineTitle" style="margin-bottom:10px">学习内容</div>
|
|
|
- <div class="add_info_box">
|
|
|
- <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
|
|
|
- 文件
|
|
|
- <input type="file" accept="*" style="display: none" v-if="inputShow"
|
|
|
- @change="beforeUpload2($event, unitIndex, 13, 0)" />
|
|
|
- </button>
|
|
|
- <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
|
|
|
- 图文
|
|
|
- </button>
|
|
|
- <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
|
|
|
- 链接
|
|
|
- </button>
|
|
|
- <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
|
|
|
- 代码
|
|
|
- </button>
|
|
|
- <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
|
|
|
- 资源
|
|
|
- </button>
|
|
|
- <!-- <button class="info_btn" @click="addImg($event)">
|
|
|
- 其他附件
|
|
|
- <input type="file" accept="*" style="display: none" v-if="inputShow" @change="beforeUpload2($event, unitIndex, 12, itemTaskIndex)
|
|
|
- " />
|
|
|
- </button> -->
|
|
|
- </div>
|
|
|
<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
|
|
@@ -404,6 +380,30 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="add_info_box" style="margin:10px 0 0" v-if="!item.taskJson[0].isFoldchapter">
|
|
|
+ <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
|
|
|
+ 文件
|
|
|
+ <input type="file" accept="*" style="display: none" v-if="inputShow"
|
|
|
+ @change="beforeUpload2($event, unitIndex, 13, 0)" />
|
|
|
+ </button>
|
|
|
+ <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
|
|
|
+ 图文
|
|
|
+ </button>
|
|
|
+ <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
|
|
|
+ 链接
|
|
|
+ </button>
|
|
|
+ <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
|
|
|
+ 代码
|
|
|
+ </button>
|
|
|
+ <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
|
|
|
+ 资源
|
|
|
+ </button>
|
|
|
+ <!-- <button class="info_btn" @click="addImg($event)">
|
|
|
+ 其他附件
|
|
|
+ <input type="file" accept="*" style="display: none" v-if="inputShow" @change="beforeUpload2($event, unitIndex, 12, itemTaskIndex)
|
|
|
+ " />
|
|
|
+ </button> -->
|
|
|
+ </div>
|
|
|
<div v-if="unitJson[unitIndex].chapterInfo[0].taskJson[0]
|
|
|
.proVisible
|
|
|
" class="mask">
|
|
@@ -1646,7 +1646,8 @@
|
|
|
</div>
|
|
|
<div>添加工具</div>
|
|
|
</div> -->
|
|
|
- <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)" style="margin: 0 auto 0">
|
|
|
+ <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)"
|
|
|
+ style="margin: 0 auto;padding: 0 30px;height: 45px;">
|
|
|
添加工具
|
|
|
</button>
|
|
|
</div>
|
|
@@ -3597,7 +3598,11 @@
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
<div class="check_class_left">
|
|
|
- <div class="check_class_left_title">选择班级</div>
|
|
|
+ <div class="check_class_all_box">
|
|
|
+ <div class="check_class_left_title">选择班级</div>
|
|
|
+ <div style="display:flex;align-items:center;"><el-checkbox v-model="checkAll"
|
|
|
+ @change="handleCheckAllChange" class="all_check">全选</el-checkbox></div>
|
|
|
+ </div>
|
|
|
<el-checkbox-group v-model="checkboxList2" class="check_class_item" @change="InviteChange" v-if="grade2.length">
|
|
|
<div v-for="item in grade2" :key="item.id" class="class_item">
|
|
|
<el-checkbox :label="item.id">
|
|
@@ -5056,16 +5061,6 @@ export default {
|
|
|
this.heightPx = $(".rightBox")[0].offsetHeight - 130 + 'px'
|
|
|
}
|
|
|
},
|
|
|
- handleCheckAllChange(val) {
|
|
|
- this.checkedCities = val ? cityOptions : [];
|
|
|
- this.isIndeterminate = false;
|
|
|
- },
|
|
|
- handleCheckedCitiesChange(value) {
|
|
|
- let checkedCount = value.length;
|
|
|
- this.checkAll = checkedCount === this.cities.length;
|
|
|
- this.isIndeterminate =
|
|
|
- checkedCount > 0 && checkedCount < this.cities.length;
|
|
|
- },
|
|
|
addHw(e) {
|
|
|
var el = e.currentTarget;
|
|
|
el.getElementsByTagName("input")[0].click();
|
|
@@ -5209,6 +5204,7 @@ export default {
|
|
|
.$confirm("是否保存已编辑内容?", "提示", {
|
|
|
confirmButtonText: "保存",
|
|
|
cancelButtonText: "不保存",
|
|
|
+ distinguishCancelAndClose: true,
|
|
|
type: "warning",
|
|
|
})
|
|
|
.then(() => {
|
|
@@ -5232,17 +5228,20 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
- .catch(() => {
|
|
|
- this.goTo(
|
|
|
- "/course?userid=" +
|
|
|
- this.userid +
|
|
|
- "&oid=" +
|
|
|
- this.oid +
|
|
|
- "&org=" +
|
|
|
- this.org +
|
|
|
- "&role=" +
|
|
|
- this.role
|
|
|
- );
|
|
|
+ .catch((v) => {
|
|
|
+ console.log(v)
|
|
|
+ if(v == "cancel"){
|
|
|
+ this.goTo(
|
|
|
+ "/course?userid=" +
|
|
|
+ this.userid +
|
|
|
+ "&oid=" +
|
|
|
+ this.oid +
|
|
|
+ "&org=" +
|
|
|
+ this.org +
|
|
|
+ "&role=" +
|
|
|
+ this.role
|
|
|
+ );
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
nextSteps() {
|
|
@@ -6502,6 +6501,19 @@ export default {
|
|
|
}
|
|
|
this.grade2 = res.data[0];
|
|
|
this.classJuri = res.data[0];
|
|
|
+ let _check = []
|
|
|
+ let _check2 = []
|
|
|
+ for (var i = 0; i < this.grade2.length; i++) {
|
|
|
+ var gid = this.grade2[i].id
|
|
|
+ _check.push(gid)
|
|
|
+ }
|
|
|
+ for (var i = 0; i < this.checkboxList2.length; i++) {
|
|
|
+ var _id = this.checkboxList2[i]
|
|
|
+ if (_check.indexOf(_id) !== -1) {
|
|
|
+ _check2.push(_id)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.checkAll = _check2.length === _check.length;
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
this.isLoading = false;
|
|
@@ -9426,6 +9438,19 @@ export default {
|
|
|
},
|
|
|
InviteChange(val) {
|
|
|
console.log(val);
|
|
|
+ let _check = []
|
|
|
+ let _check2 = []
|
|
|
+ for (var i = 0; i < this.grade2.length; i++) {
|
|
|
+ var gid = this.grade2[i].id
|
|
|
+ _check.push(gid)
|
|
|
+ }
|
|
|
+ for (var i = 0; i < this.checkboxList2.length; i++) {
|
|
|
+ var _id = this.checkboxList2[i]
|
|
|
+ if (_check.indexOf(_id) !== -1) {
|
|
|
+ _check2.push(_id)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.checkAll = _check2.length === _check.length;
|
|
|
return;
|
|
|
let array = JSON.parse(JSON.stringify(val));
|
|
|
this.inviteCode = this.inviteCode.filter((el) => {
|
|
@@ -9438,6 +9463,31 @@ export default {
|
|
|
this.getInviteCode(array[i]);
|
|
|
}
|
|
|
},
|
|
|
+ handleCheckAllChange(val) {
|
|
|
+ if (val) {
|
|
|
+ for (var i = 0; i < this.grade2.length; i++) {
|
|
|
+ var gid = this.grade2[i].id
|
|
|
+ if (this.checkboxList2.indexOf(gid) === -1) {
|
|
|
+ this.checkboxList2.push(gid)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ let _check = []
|
|
|
+ let _check2 = []
|
|
|
+ for (var i = 0; i < this.grade2.length; i++) {
|
|
|
+ var gid = this.grade2[i].id
|
|
|
+ _check.push(gid)
|
|
|
+ }
|
|
|
+ for (var i = 0; i < this.checkboxList2.length; i++) {
|
|
|
+ var _id = this.checkboxList2[i]
|
|
|
+ if (_check.indexOf(_id) === -1) {
|
|
|
+ _check2.push(_id)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.checkboxList2 = _check2
|
|
|
+ }
|
|
|
+ this.isIndeterminate = false;
|
|
|
+ },
|
|
|
async getInviteCode(cid) {
|
|
|
let code = this.randomNumber();
|
|
|
let params = {
|
|
@@ -9674,7 +9724,7 @@ export default {
|
|
|
this.newIndex = i;
|
|
|
},
|
|
|
dragTaskEnd() {
|
|
|
- if(this.newIndex == this.oldIndex){
|
|
|
+ if (this.newIndex == this.oldIndex) {
|
|
|
return;
|
|
|
}
|
|
|
this.$confirm(
|
|
@@ -9689,7 +9739,7 @@ export default {
|
|
|
.then(() => {
|
|
|
let newItems = [...this.unitJson[this.unitIndex].chapterInfo[0].taskJson];
|
|
|
let chapterData = []
|
|
|
- if(this.oldIndex == 0){
|
|
|
+ if (this.oldIndex == 0) {
|
|
|
chapterData = newItems[this.oldIndex].chapterData
|
|
|
newItems[this.oldIndex].chapterData = []
|
|
|
}
|
|
@@ -9697,7 +9747,7 @@ export default {
|
|
|
newItems.splice(this.oldIndex, 1);
|
|
|
// 在列表中目标位置增加新的节点
|
|
|
newItems.splice(this.newIndex, 0, this.oldData);
|
|
|
- if(this.oldIndex == 0){
|
|
|
+ if (this.oldIndex == 0) {
|
|
|
newItems[0].chapterData = chapterData
|
|
|
}
|
|
|
this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [...newItems];
|
|
@@ -12851,7 +12901,7 @@ ol {
|
|
|
background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
|
|
|
}
|
|
|
|
|
|
-.dragOver{
|
|
|
+.dragOver {
|
|
|
background: red !important;
|
|
|
}
|
|
|
|
|
@@ -12893,7 +12943,7 @@ ol {
|
|
|
color: #060E17;
|
|
|
line-height: 25px;
|
|
|
font-size: 16px;
|
|
|
- min-width: 45px;
|
|
|
+ min-width: 50px;
|
|
|
}
|
|
|
|
|
|
.navTask .nt_taskName {
|
|
@@ -13315,10 +13365,25 @@ ol {
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
+.check_class_all_box {
|
|
|
+ display: flex;
|
|
|
+ margin-bottom: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.all_check {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ padding: 2px 0 0;
|
|
|
+ margin-left: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.all_check>>>.el-checkbox__label {
|
|
|
+ line-height: unset;
|
|
|
+}
|
|
|
+
|
|
|
.check_class_left_title {
|
|
|
font-size: 16px;
|
|
|
font-weight: 700;
|
|
|
- margin-bottom: 10px;
|
|
|
}
|
|
|
|
|
|
.check_class_item {
|