|
@@ -21,6 +21,7 @@
|
|
</el-breadcrumb-item>
|
|
</el-breadcrumb-item>
|
|
</el-breadcrumb>
|
|
</el-breadcrumb>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="r_pub_button_retrun" @click="retrunCourse">返回</div>
|
|
</div>
|
|
</div>
|
|
<!-- <div style="display: flex; margin-top: 20px; position: relative"> -->
|
|
<!-- <div style="display: flex; margin-top: 20px; position: relative"> -->
|
|
<div ref="stepBox" class="stepBox">
|
|
<div ref="stepBox" class="stepBox">
|
|
@@ -574,17 +575,17 @@
|
|
itemTaskIndex
|
|
itemTaskIndex
|
|
].task
|
|
].task
|
|
" />
|
|
" />
|
|
|
|
+ </div>
|
|
|
|
+ <div class="remove" v-if="item.taskJson.length > 1 &&
|
|
|
|
+ (!unitJson[unitIndex].easy ||
|
|
|
|
+ unitJson[unitIndex].easy == 6)
|
|
|
|
+ " @click="deleteTask(itemTaskIndex)"></div>
|
|
<div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && itemTask.isFold2"
|
|
<div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && itemTask.isFold2"
|
|
class="show_taskD show" @click="fold2(itemTaskIndex)"><img
|
|
class="show_taskD show" @click="fold2(itemTaskIndex)"><img
|
|
src="../../assets/icon/new/icon-slide.png" />收起任务描述</div>
|
|
src="../../assets/icon/new/icon-slide.png" />收起任务描述</div>
|
|
<div v-else-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" class="show_taskD"
|
|
<div v-else-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" class="show_taskD"
|
|
@click="fold2(itemTaskIndex)"><img src="../../assets/icon/new/icon-slide.png" />展开任务描述
|
|
@click="fold2(itemTaskIndex)"><img src="../../assets/icon/new/icon-slide.png" />展开任务描述
|
|
</div>
|
|
</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>
|
|
<div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && itemTask.isFold2" style="
|
|
<div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && itemTask.isFold2" style="
|
|
display: flex;
|
|
display: flex;
|
|
@@ -626,8 +627,8 @@
|
|
align-items: center;
|
|
align-items: center;
|
|
" :style="{margin:!itemTask.isFoldchapter ? '20px 0':'20px 0 10px'}">
|
|
" :style="{margin:!itemTask.isFoldchapter ? '20px 0':'20px 0 10px'}">
|
|
<div class="lineTitle">学习内容</div>
|
|
<div class="lineTitle">学习内容</div>
|
|
- <div v-if="!itemTask.isFoldchapter" class="show_taskD show" @click="foldC(itemTaskIndex)" style="margin: 0px 15px 0 0;"><img src="../../assets/icon/new/icon-slide.png" />收起学习内容</div>
|
|
|
|
- <div v-else class="show_taskD" @click="foldC(itemTaskIndex)" style="margin: 0px 15px 0 0;"><img src="../../assets/icon/new/icon-slide.png" />展开学习内容</div>
|
|
|
|
|
|
+ <div v-if="!itemTask.isFoldchapter" class="show_taskD show" @click="foldC(itemTaskIndex)"><img src="../../assets/icon/new/icon-slide.png" />收起学习内容</div>
|
|
|
|
+ <div v-else class="show_taskD" @click="foldC(itemTaskIndex)"><img src="../../assets/icon/new/icon-slide.png" />展开学习内容</div>
|
|
<!-- <div class="line"></div> -->
|
|
<!-- <div class="line"></div> -->
|
|
</div>
|
|
</div>
|
|
<div v-if="!itemTask.isFoldchapter">
|
|
<div v-if="!itemTask.isFoldchapter">
|
|
@@ -2499,11 +2500,11 @@
|
|
align-items: center;
|
|
align-items: center;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
">
|
|
">
|
|
- <div style="margin-right: 20px; font-size: 20px">标题:</div>
|
|
|
|
|
|
+ <!-- <div style="margin-right: 20px; font-size: 20px">标题:</div> -->
|
|
<el-input v-model="askJson.askTitle" placeholder="请输入标题" style="width: 400px"></el-input>
|
|
<el-input v-model="askJson.askTitle" placeholder="请输入标题" style="width: 400px"></el-input>
|
|
</div>
|
|
</div>
|
|
<div class="a_addBox">
|
|
<div class="a_addBox">
|
|
- <div style="font-size: 16px; color: #c7c7c7">请输入题目内容</div>
|
|
|
|
|
|
+ <!-- <div style="font-size: 16px; color: #c7c7c7">请输入题目内容</div> -->
|
|
<div class="a_add_box" v-for="(item1, index1) in askJson.askCount" :key="index1">
|
|
<div class="a_add_box" v-for="(item1, index1) in askJson.askCount" :key="index1">
|
|
<div class="a_add_checkType">
|
|
<div class="a_add_checkType">
|
|
<span :class="{
|
|
<span :class="{
|
|
@@ -2521,9 +2522,9 @@
|
|
" placeholder="请输入题目"></textarea>
|
|
" placeholder="请输入题目"></textarea>
|
|
</div>
|
|
</div>
|
|
<div class="a_add_head_div">
|
|
<div class="a_add_head_div">
|
|
- <el-button type="primary" size="small" @click="addAskList()">添加</el-button>
|
|
|
|
<el-button type="primary" size="small" @click="deleteAskList(index1)" v-if="askJson.askCount != 1">删除
|
|
<el-button type="primary" size="small" @click="deleteAskList(index1)" v-if="askJson.askCount != 1">删除
|
|
</el-button>
|
|
</el-button>
|
|
|
|
+ <el-button type="primary" size="small" @click="addAskList()">添加</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="a_add_body">
|
|
<div class="a_add_body">
|
|
@@ -2567,7 +2568,7 @@
|
|
</div> -->
|
|
</div> -->
|
|
<div class="a_addBox">
|
|
<div class="a_addBox">
|
|
<div style="font-size: 16px; color: #c7c7c7;display: flex;align-items: center;">
|
|
<div style="font-size: 16px; color: #c7c7c7;display: flex;align-items: center;">
|
|
- 请输入题目内容
|
|
|
|
|
|
+ <!-- 请输入题目内容 -->
|
|
<button class="c_pub_button_add pub_btn_paste_img" @click="pasteOption" style="margin-left: 10px"
|
|
<button class="c_pub_button_add pub_btn_paste_img" @click="pasteOption" style="margin-left: 10px"
|
|
v-if="isPasteChoice">智能粘贴</button>
|
|
v-if="isPasteChoice">智能粘贴</button>
|
|
</div>
|
|
</div>
|
|
@@ -2588,15 +2589,15 @@
|
|
<textarea class="a_add_head_input textarea_css" v-autoHeight="40"
|
|
<textarea class="a_add_head_input textarea_css" v-autoHeight="40"
|
|
v-model="testJson.testJson[index1].teststitle" placeholder="请输入题目"></textarea>
|
|
v-model="testJson.testJson[index1].teststitle" placeholder="请输入题目"></textarea>
|
|
</div>
|
|
</div>
|
|
- <div class="xzUpImg" @click.stop="addImg($event)">
|
|
|
|
|
|
+ <div class="xzUpImg" @click.stop="addImg($event)" style="margin-right: 10px;">
|
|
<img src="../../assets/icon/xzUpImg.png" alt="" />
|
|
<img src="../../assets/icon/xzUpImg.png" alt="" />
|
|
<input type="file" accept="image/*" style="display: none" @change="beforeUploadTiMu($event, index1)" />
|
|
<input type="file" accept="image/*" style="display: none" @change="beforeUploadTiMu($event, index1)" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="a_add_head_div">
|
|
<div class="a_add_head_div">
|
|
- <el-button type="primary" size="small" @click="addTestList()">添加</el-button>
|
|
|
|
<el-button type="primary" size="small" @click="deleteTestList(index1)" v-if="testJson.testCount != 1">删除
|
|
<el-button type="primary" size="small" @click="deleteTestList(index1)" v-if="testJson.testCount != 1">删除
|
|
</el-button>
|
|
</el-button>
|
|
|
|
+ <el-button type="primary" size="small" @click="addTestList()">添加</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="timuImgBox" v-if="testJson.testJson[index1].timuList &&
|
|
<div class="timuImgBox" v-if="testJson.testJson[index1].timuList &&
|
|
@@ -2692,7 +2693,7 @@
|
|
</div>
|
|
</div>
|
|
</el-checkbox-group>
|
|
</el-checkbox-group>
|
|
</div>
|
|
</div>
|
|
- <div class="a_add_body_div" style="margin-bottom: 3px">
|
|
|
|
|
|
+ <div class="a_add_body_div">
|
|
<el-button type="primary" size="small" @click="addTcheckList(testJson.testJson[index1])">添加</el-button>
|
|
<el-button type="primary" size="small" @click="addTcheckList(testJson.testJson[index1])">添加</el-button>
|
|
<el-button type="primary" size="small" @click="deleteTcheckList(testJson.testJson[index1])"
|
|
<el-button type="primary" size="small" @click="deleteTcheckList(testJson.testJson[index1])"
|
|
v-if="testJson.testJson[index1].testItem != 1">删除
|
|
v-if="testJson.testJson[index1].testItem != 1">删除
|
|
@@ -3749,8 +3750,49 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- steps(newValue) {
|
|
|
|
|
|
+ steps(newValue,old) {
|
|
if (newValue == 4) {
|
|
if (newValue == 4) {
|
|
|
|
+ let cPan = 1;
|
|
|
|
+ for (var i = 0; i < this.unitJson.length; i++) {
|
|
|
|
+ for (
|
|
|
|
+ var j = 0;
|
|
|
|
+ j < this.unitJson[i].chapterInfo[0].taskJson.length;
|
|
|
|
+ j++
|
|
|
|
+ ) {
|
|
|
|
+ this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
|
|
|
|
+ this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
|
|
|
|
+ if (
|
|
|
|
+ this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
|
|
|
|
+ ) {
|
|
|
|
+ for (
|
|
|
|
+ var z = 0;
|
|
|
|
+ z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
|
|
|
|
+ z++
|
|
|
|
+ ) {
|
|
|
|
+ if (
|
|
|
|
+ !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
|
|
|
|
+ .length
|
|
|
|
+ ) {
|
|
|
|
+ this.$message.error("请把工具添加完整");
|
|
|
|
+ cPan = 2;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
|
|
|
|
+ this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
|
|
|
|
+ i
|
|
|
|
+ ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
|
|
|
|
+ return ele.value != "";
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.inputShow = true;
|
|
|
|
+ if (cPan == 2) {
|
|
|
|
+ this.steps = old;
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
this.goTo(
|
|
this.goTo(
|
|
"/course?userid=" +
|
|
"/course?userid=" +
|
|
this.userid +
|
|
this.userid +
|
|
@@ -3871,6 +3913,49 @@ export default {
|
|
}
|
|
}
|
|
return _guid;
|
|
return _guid;
|
|
},
|
|
},
|
|
|
|
+ retrunCourse(){
|
|
|
|
+ this
|
|
|
|
+ .$confirm("是否保存?", "提示", {
|
|
|
|
+ confirmButtonText: "保存",
|
|
|
|
+ cancelButtonText: "不保存",
|
|
|
|
+ type: "warning",
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ if (this.cid == "" || this.cid == undefined) {
|
|
|
|
+ if (this.courseName == "") {
|
|
|
|
+ this.$message.error("请补充填写课程名称");
|
|
|
|
+ return;
|
|
|
|
+ } else {
|
|
|
|
+ this.addWork();
|
|
|
|
+ }
|
|
|
|
+ this.steps = 4
|
|
|
|
+ } else {
|
|
|
|
+ if (this.courseName == "") {
|
|
|
|
+ this.$message.error("请补充填写课程名称");
|
|
|
|
+ return;
|
|
|
|
+ } else {
|
|
|
|
+ if (this.userid != this.courseUserid && this.role != "1") {
|
|
|
|
+ this.updateWork2();
|
|
|
|
+ } else {
|
|
|
|
+ this.updateWork();
|
|
|
|
+ }
|
|
|
|
+ this.steps = 4
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.goTo(
|
|
|
|
+ "/course?userid=" +
|
|
|
|
+ this.userid +
|
|
|
|
+ "&oid=" +
|
|
|
|
+ this.oid +
|
|
|
|
+ "&org=" +
|
|
|
|
+ this.org +
|
|
|
|
+ "&role=" +
|
|
|
|
+ this.role
|
|
|
|
+ );
|
|
|
|
+ });
|
|
|
|
+ },
|
|
lastSteps() {
|
|
lastSteps() {
|
|
if (this.steps == 4) {
|
|
if (this.steps == 4) {
|
|
this.goTo(
|
|
this.goTo(
|
|
@@ -6525,12 +6610,47 @@ export default {
|
|
this.testJson.testCount++;
|
|
this.testJson.testCount++;
|
|
},
|
|
},
|
|
deleteAskList(index) {
|
|
deleteAskList(index) {
|
|
- this.askJson.askJson.splice(index, 1);
|
|
|
|
- this.askJson.askCount--;
|
|
|
|
|
|
+ if(!this.askJson.askJson[index].askstitle && this.askJson.askJson[index].askItem == 1 && !this.askJson.askJson[index].checkList[0]){
|
|
|
|
+ this.askJson.askJson.splice(index, 1);
|
|
|
|
+ this.askJson.askCount--;
|
|
|
|
+ }else{
|
|
|
|
+ let _this = this;
|
|
|
|
+ _this
|
|
|
|
+ .$confirm("此操作不可撤销,是否继续?", "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning",
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ _this.askJson.askJson.splice(index, 1);
|
|
|
|
+ _this.askJson.askCount--;
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ return;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
},
|
|
},
|
|
deleteTestList(index) {
|
|
deleteTestList(index) {
|
|
- this.testJson.testJson.splice(index, 1);
|
|
|
|
- this.testJson.testCount--;
|
|
|
|
|
|
+ if(!this.testJson.testJson[index].teststitle && this.testJson.testJson[index].testItem == 1 && !this.testJson.testJson[index].checkList[0]){
|
|
|
|
+ this.testJson.testJson.splice(index, 1);
|
|
|
|
+ this.testJson.testCount--;
|
|
|
|
+ }else{
|
|
|
|
+ let _this = this;
|
|
|
|
+ _this
|
|
|
|
+ .$confirm("此操作不可撤销,是否继续?", "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning",
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ _this.testJson.testJson.splice(index, 1);
|
|
|
|
+ _this.testJson.testCount--;
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ return;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
},
|
|
},
|
|
addcheckList(json) {
|
|
addcheckList(json) {
|
|
json.checkList.length++;
|
|
json.checkList.length++;
|
|
@@ -6556,7 +6676,8 @@ export default {
|
|
},
|
|
},
|
|
checkAskType(type, json) {
|
|
checkAskType(type, json) {
|
|
json.type = type;
|
|
json.type = type;
|
|
- json.checkList = [];
|
|
|
|
|
|
+ // json.checkList = [];
|
|
|
|
+ this.$forceUpdate();
|
|
},
|
|
},
|
|
addSelectList(json) {
|
|
addSelectList(json) {
|
|
json.select.push("");
|
|
json.select.push("");
|
|
@@ -6608,10 +6729,17 @@ export default {
|
|
this.$message.error("选项不能为空!");
|
|
this.$message.error("选项不能为空!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ for (var z2 = z+1; z2 < aj[i].checkList.length; z2++) {
|
|
|
|
+ let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
|
|
|
|
+ if (checkC == checkC2) {
|
|
|
|
+ this.$message.error(`第${i+1}题的选项${z+1}和选项${z2+1}重复了,请修改!`);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
b++;
|
|
b++;
|
|
if (index < 2) {
|
|
if (index < 2) {
|
|
- this.$message.error("填写了的题目,选项至少要有两项!");
|
|
|
|
|
|
+ this.$message.error("每道题目至少需要设置2个选项。");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -6676,10 +6804,17 @@ export default {
|
|
this.$message.error("选项不能为空!");
|
|
this.$message.error("选项不能为空!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ for (var z2 = z+1; z2 < aj[i].checkList.length; z2++) {
|
|
|
|
+ let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
|
|
|
|
+ if (checkC == checkC2) {
|
|
|
|
+ this.$message.error(`第${i+1}题的选项${z+1}和选项${z2+1}重复了,请修改!`);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
b++;
|
|
b++;
|
|
if (index < 2) {
|
|
if (index < 2) {
|
|
- this.$message.error("填写了的题目,选项至少要有两项!");
|
|
|
|
|
|
+ this.$message.error("每道题目至少需要设置2个选项。");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if (
|
|
if (
|
|
@@ -9892,7 +10027,7 @@ ol {
|
|
.a_add_checkType {
|
|
.a_add_checkType {
|
|
margin-top: 10px;
|
|
margin-top: 10px;
|
|
display: flex;
|
|
display: flex;
|
|
- font-size: 16px;
|
|
|
|
|
|
+ font-size: 14px;
|
|
align-items: center;
|
|
align-items: center;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -9912,7 +10047,7 @@ ol {
|
|
}
|
|
}
|
|
|
|
|
|
.a_add_head .a_add_head_input {
|
|
.a_add_head .a_add_head_input {
|
|
- width: 550px;
|
|
|
|
|
|
+ width: 540px;
|
|
}
|
|
}
|
|
|
|
|
|
.a_add_head .a_add_head_div {
|
|
.a_add_head .a_add_head_div {
|
|
@@ -9987,6 +10122,12 @@ ol {
|
|
align-items: center;
|
|
align-items: center;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
/* flex-direction: column; */
|
|
/* flex-direction: column; */
|
|
|
|
+ margin-bottom: 8px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.a_add_body_div >>> .el-button--primary{
|
|
|
|
+ background: #466b99;
|
|
|
|
+ border: none;
|
|
}
|
|
}
|
|
|
|
|
|
.all_choose {
|
|
.all_choose {
|
|
@@ -10441,7 +10582,7 @@ ol {
|
|
.courseTop {
|
|
.courseTop {
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: row;
|
|
flex-direction: row;
|
|
- justify-content: flex-start;
|
|
|
|
|
|
+ justify-content: space-between;
|
|
align-items: center;
|
|
align-items: center;
|
|
width: calc(100% - 40px);
|
|
width: calc(100% - 40px);
|
|
margin: 0 auto;
|
|
margin: 0 auto;
|
|
@@ -11548,7 +11689,12 @@ ol {
|
|
transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
|
|
transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
|
|
outline: none;
|
|
outline: none;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
- height: 40px;
|
|
|
|
|
|
+ height: 46px;
|
|
|
|
+ font-family: 'Microsoft YaHei';
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.textarea_css::-webkit-input-placeholder {
|
|
|
|
+ color: #C0C4CC
|
|
}
|
|
}
|
|
|
|
|
|
.textarea_css:focus {
|
|
.textarea_css:focus {
|