|
@@ -695,7 +695,7 @@
|
|
|
</div>
|
|
|
<div
|
|
|
class="remove"
|
|
|
- @click="deleteTool(toolIndex)"
|
|
|
+ @click="deleteTool(itemTaskIndex,toolIndex)"
|
|
|
v-if="itemTask.toolChoose.length > 1"
|
|
|
style="position: absolute; right: 55px"
|
|
|
></div>
|
|
@@ -827,7 +827,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="tool">
|
|
|
- <div class="whiteBIcon" @click="openTools(4)">
|
|
|
+ <div class="whiteBIcon" @click="openTools(itemTaskIndex,4,toolIndex)">
|
|
|
<img src="../../assets/icon/thirdToolList/ask.png" alt />
|
|
|
<div style="margin: 5px 0">问卷调查</div>
|
|
|
</div>
|
|
@@ -1054,7 +1054,9 @@
|
|
|
:before-close="handleClose"
|
|
|
class="dialog_diy"
|
|
|
>
|
|
|
- <div v-for="(item, index) in unitJson[unitIndex].chapterInfo[0].taskJson" :key="index">
|
|
|
+ <!-- v-for="(item, index) in unitJson[unitIndex].chapterInfo[0].taskJson[taskCount].toolChoose"
|
|
|
+ :key="index"-->
|
|
|
+ <div>
|
|
|
<div
|
|
|
class="a_add_title"
|
|
|
style="
|
|
@@ -1065,17 +1067,17 @@
|
|
|
"
|
|
|
>
|
|
|
<div style="margin-right: 20px; font-size: 20px">问卷标题:</div>
|
|
|
- <el-input v-model="item.askTitle" placeholder="请输入问卷标题" style="width: 400px"></el-input>
|
|
|
+ <el-input v-model="askJson.askTitle" placeholder="请输入问卷标题" style="width: 400px"></el-input>
|
|
|
</div>
|
|
|
<div class="a_addBox">
|
|
|
<div style="font-size: 16px; color: #c7c7c7">请输入问卷内容</div>
|
|
|
- <div class="a_add_box" v-for="(item1, index1) in item.askCount" :key="index1">
|
|
|
+ <div class="a_add_box" v-for="(item1, index1) in askJson.askCount" :key="index1">
|
|
|
<div class="a_add_head">
|
|
|
<div>
|
|
|
{{ index1 + 1 + "、" }}
|
|
|
<el-input
|
|
|
class="a_add_head_input"
|
|
|
- v-model="item.askJson[index1].askstitle"
|
|
|
+ v-model="askJson.askJson[index1].askstitle"
|
|
|
placeholder="请输入问卷题目..."
|
|
|
></el-input>
|
|
|
</div>
|
|
@@ -1092,9 +1094,9 @@
|
|
|
<div class="a_add_body">
|
|
|
<div class="a_add_input">
|
|
|
<el-input
|
|
|
- v-for="(item2, checkIndex) in item.askJson[index1].askItem"
|
|
|
+ v-for="(item2, checkIndex) in askJson.askJson[index1].askItem"
|
|
|
:key="checkIndex"
|
|
|
- v-model="item.askJson[index1].checkList[checkIndex]"
|
|
|
+ v-model="askJson.askJson[index1].checkList[checkIndex]"
|
|
|
placeholder="请输入选项..."
|
|
|
style="width: 150px; margin: 10px 10px 0 0"
|
|
|
></el-input>
|
|
@@ -1104,15 +1106,15 @@
|
|
|
style="margin: 10px 0px 0 0"
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
- @click="addcheckList(item.askJson[index1])"
|
|
|
- v-if="item.askJson[index1].askItem < 4"
|
|
|
+ @click="addcheckList(askJson.askJson[index1])"
|
|
|
+ v-if="askJson.askJson[index1].askItem < 4"
|
|
|
>添加</el-button>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
style="margin: 10px 0 0 0"
|
|
|
- @click="deletecheckList(item.askJson[index1])"
|
|
|
- v-if="item.askJson[index1].askItem != 1"
|
|
|
+ @click="deletecheckList(askJson.askJson[index1])"
|
|
|
+ v-if="askJson.askJson[index1].askItem != 1"
|
|
|
>删除</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -1175,6 +1177,11 @@ export default {
|
|
|
cid: this.$route.query.cid != "" ? this.$route.query.cid : "",
|
|
|
cover: [], //课程封面
|
|
|
myWord: [],
|
|
|
+ askJson: {
|
|
|
+ askCount: 1,
|
|
|
+ askTitle: "",
|
|
|
+ askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
+ },
|
|
|
unitJson: [
|
|
|
{
|
|
|
dyName: "", //单元标题
|
|
@@ -1194,7 +1201,16 @@ export default {
|
|
|
taskDetail: "",
|
|
|
chapterData: [],
|
|
|
toolText: "",
|
|
|
- toolChoose: [{ tool: null, toolDetail: "", toolType: 0 }],
|
|
|
+ toolChoose: [
|
|
|
+ {
|
|
|
+ tool: null,
|
|
|
+ toolDetail: "",
|
|
|
+ toolType: 0,
|
|
|
+ askCount: 1,
|
|
|
+ askTitle: "",
|
|
|
+ askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
+ },
|
|
|
+ ],
|
|
|
isShowTools: false,
|
|
|
askCount: 1,
|
|
|
isFold: 0,
|
|
@@ -1233,6 +1249,7 @@ export default {
|
|
|
loading: false,
|
|
|
toolType: 0,
|
|
|
inputShow: true,
|
|
|
+ toolIndex: 0,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -1410,7 +1427,7 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
- deleteTool(i) {
|
|
|
+ deleteTool(itemTaskIndex, i) {
|
|
|
var _this = this;
|
|
|
if (_this.time()) {
|
|
|
_this
|
|
@@ -1421,7 +1438,7 @@ export default {
|
|
|
})
|
|
|
.then(() => {
|
|
|
_this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
|
|
|
- _this.taskCount
|
|
|
+ itemTaskIndex
|
|
|
].toolChoose.splice(i, 1);
|
|
|
_this.$message.success("删除成功");
|
|
|
})
|
|
@@ -1669,7 +1686,16 @@ export default {
|
|
|
taskDetail: "",
|
|
|
chapterData: [],
|
|
|
toolText: "",
|
|
|
- toolChoose: [{ tool: null, toolDetail: "", toolType: 0 }],
|
|
|
+ toolChoose: [
|
|
|
+ {
|
|
|
+ tool: null,
|
|
|
+ toolDetail: "",
|
|
|
+ toolType: 0,
|
|
|
+ askCount: 1,
|
|
|
+ askTitle: "",
|
|
|
+ askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
+ },
|
|
|
+ ],
|
|
|
isShowTools: false,
|
|
|
askCount: 1,
|
|
|
isFold: 0,
|
|
@@ -1701,6 +1727,9 @@ export default {
|
|
|
tool: null,
|
|
|
toolDetail: "",
|
|
|
toolType: 0,
|
|
|
+ askCount: 1,
|
|
|
+ askTitle: "",
|
|
|
+ askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
});
|
|
|
},
|
|
|
addTaskBorder() {
|
|
@@ -1709,7 +1738,16 @@ export default {
|
|
|
taskDetail: "",
|
|
|
chapterData: [],
|
|
|
toolText: "",
|
|
|
- toolChoose: [{ tool: null, toolDetail: "", toolType: 0 }],
|
|
|
+ toolChoose: [
|
|
|
+ {
|
|
|
+ tool: null,
|
|
|
+ toolDetail: "",
|
|
|
+ toolType: 0,
|
|
|
+ askCount: 1,
|
|
|
+ askTitle: "",
|
|
|
+ askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
+ },
|
|
|
+ ],
|
|
|
isShowTools: false,
|
|
|
askCount: 1,
|
|
|
isFold: 0,
|
|
@@ -2016,7 +2054,7 @@ export default {
|
|
|
goTo(path) {
|
|
|
this.$router.push(path);
|
|
|
},
|
|
|
- openTools(i) {
|
|
|
+ openTools(itemTaskIndex, i, toolIndex) {
|
|
|
// if (i == 1) {
|
|
|
// window.parent.postMessage({ tools: "1" }, "*");
|
|
|
// } else if (i == 2) {
|
|
@@ -2033,6 +2071,11 @@ export default {
|
|
|
// window.parent.postMessage({ tools: "6" }, "*");
|
|
|
// }
|
|
|
if (i == 4) {
|
|
|
+ this.taskCount = itemTaskIndex;
|
|
|
+ this.toolIndex = toolIndex;
|
|
|
+ this.askJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
|
|
|
+ itemTaskIndex
|
|
|
+ ].toolChoose[toolIndex];
|
|
|
this.dialogVisible5 = true;
|
|
|
}
|
|
|
},
|
|
@@ -2082,28 +2125,20 @@ export default {
|
|
|
// }
|
|
|
// },
|
|
|
addAskList() {
|
|
|
- this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
|
|
|
- this.taskCount
|
|
|
- ].checkJson.push({
|
|
|
- checkCount: [],
|
|
|
- checkPerent: [],
|
|
|
- });
|
|
|
- this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
|
|
|
- this.taskCount
|
|
|
- ].askJson.push({
|
|
|
+ // this.askJson.checkJson.push({
|
|
|
+ // checkCount: [],
|
|
|
+ // checkPerent: [],
|
|
|
+ // });
|
|
|
+ this.askJson.askJson.push({
|
|
|
askstitle: "",
|
|
|
askItem: 1,
|
|
|
checkList: [],
|
|
|
});
|
|
|
- this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
|
|
|
- .askCount++;
|
|
|
+ this.askJson.askCount++;
|
|
|
},
|
|
|
deleteAskList() {
|
|
|
- this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
|
|
|
- this.taskCount
|
|
|
- ].askJson.splice(-1);
|
|
|
- this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
|
|
|
- .askCount--;
|
|
|
+ this.askJson.askJson.splice(-1);
|
|
|
+ this.askJson.askCount--;
|
|
|
},
|
|
|
addcheckList(json) {
|
|
|
json.checkList.length++;
|
|
@@ -2114,16 +2149,12 @@ export default {
|
|
|
json.askItem--;
|
|
|
},
|
|
|
addAsk() {
|
|
|
- if (
|
|
|
- this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
|
|
|
- .askTitle === ""
|
|
|
- ) {
|
|
|
+ // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
|
|
|
+ if (this.askJson.askTitle === "") {
|
|
|
this.$message.error("问卷调查标题不能为空!");
|
|
|
return;
|
|
|
}
|
|
|
- var aj = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
|
|
|
- this.taskCount
|
|
|
- ].askJson;
|
|
|
+ var aj = this.askJson.askJson;
|
|
|
var b = 1;
|
|
|
for (var i = 0; i < aj.length; i++) {
|
|
|
if (aj[i].askstitle === "") {
|
|
@@ -2178,16 +2209,15 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
|
|
|
- this.taskCount
|
|
|
- ].askJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
|
|
|
- this.taskCount
|
|
|
- ].askJson.filter((el) => {
|
|
|
+ this.askJson.askJson = this.askJson.askJson.filter((el) => {
|
|
|
var elc = el.checkList.filter((element) => {
|
|
|
return element != "";
|
|
|
});
|
|
|
return el.askstitle != "" && elc.length != 0;
|
|
|
});
|
|
|
+ this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
|
|
|
+ this.taskCount
|
|
|
+ ].toolChoose[this.toolIndex] = this.askJson;
|
|
|
this.dialogVisible5 = false;
|
|
|
},
|
|
|
selectCourseDetail() {
|
|
@@ -3538,6 +3568,7 @@ ol {
|
|
|
min-height: 1160px;
|
|
|
position: relative;
|
|
|
background: #fbfbfb;
|
|
|
+ /* transition: all .5s; */
|
|
|
}
|
|
|
.smallTaskBorder {
|
|
|
height: 135px;
|
|
@@ -3568,10 +3599,11 @@ ol {
|
|
|
justify-content: flex-end;
|
|
|
align-items: center;
|
|
|
position: absolute;
|
|
|
- right: 0;
|
|
|
+ right: 15px;
|
|
|
+ bottom: 35px;
|
|
|
}
|
|
|
.funBlockTop {
|
|
|
- top: 35px;
|
|
|
+ /* top: 35px; */
|
|
|
}
|
|
|
.fold {
|
|
|
display: flex;
|