|
@@ -10,19 +10,35 @@
|
|
|
<div class="c_body" v-if="isloading">
|
|
|
<div v-if="type == 3">
|
|
|
<div v-for="(item, index) in checkArray[page].array" :key="index" class="check_box">
|
|
|
- <div class="title" v-if="item.ttype != 1 || (!item.json && item.ttype == 1)" :style="{fontSize:item.ttype == 1 && '16px'}">{{ selectType(item, index) }}</div>
|
|
|
+ <div class="title" v-if="item.ttype != 1 || (!item.json && item.ttype == 1)"
|
|
|
+ :style="{ fontSize: item.ttype == 1 && '16px' }">{{ selectType(item, index) }}</div>
|
|
|
<div v-if="item.ttype == 1" class="answerBox">
|
|
|
- <choiceV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-if="item.type == 1" :see="see" :isTeacher="isTeacher"></choiceV>
|
|
|
- <gapV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 3" :see="see" :isTeacher="isTeacher"></gapV>
|
|
|
- <fileV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 5" :see="see" :isTeacher="isTeacher"></fileV>
|
|
|
+ <choiceV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-if="item.type == 1" :see="see"
|
|
|
+ :isTeacher="isTeacher"></choiceV>
|
|
|
+ <gapV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 3" :see="see"
|
|
|
+ :isTeacher="isTeacher"></gapV>
|
|
|
+ <fileV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 5" :see="see"
|
|
|
+ :isTeacher="isTeacher"></fileV>
|
|
|
+ <courseV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 6"
|
|
|
+ :see="see" :isTeacher="isTeacher"></courseV>
|
|
|
+ <evaV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 7" :see="see"
|
|
|
+ :isTeacher="isTeacher"></evaV>
|
|
|
<!-- <span v-else>暂未设置题目</span> -->
|
|
|
</div>
|
|
|
<div v-for="(item2, index2) in item.array" :key="`${index}-${index2}`" class="check_box_xia">
|
|
|
- <div class="title" v-if="item2.ttype != 1 || (!item2.json && item2.ttype == 1)" :style="{fontSize:item2.ttype == 1 && '16px'}">{{ selectType(item2, index2) }}</div>
|
|
|
+ <div class="title" v-if="item2.ttype != 1 || (!item2.json && item2.ttype == 1)"
|
|
|
+ :style="{ fontSize: item2.ttype == 1 && '16px' }">{{ selectType(item2, index2) }}</div>
|
|
|
<div v-if="item2.ttype == 1" class="answerBox">
|
|
|
- <choiceV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-if="item2.type == 1" :see="see" :isTeacher="isTeacher"></choiceV>
|
|
|
- <gapV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 3" :see="see" :isTeacher="isTeacher"></gapV>
|
|
|
- <fileV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 5" :see="see" :isTeacher="isTeacher"></fileV>
|
|
|
+ <choiceV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-if="item2.type == 1"
|
|
|
+ :see="see" :isTeacher="isTeacher"></choiceV>
|
|
|
+ <gapV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 3"
|
|
|
+ :see="see" :isTeacher="isTeacher"></gapV>
|
|
|
+ <fileV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 5"
|
|
|
+ :see="see" :isTeacher="isTeacher"></fileV>
|
|
|
+ <courseV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 6"
|
|
|
+ :see="see" :isTeacher="isTeacher"></courseV>
|
|
|
+ <evav :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 7"
|
|
|
+ :see="see" :isTeacher="isTeacher"></evav>
|
|
|
<!-- <span v-else>暂未设置题目</span> -->
|
|
|
</div>
|
|
|
</div>
|
|
@@ -30,19 +46,35 @@
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
<div v-for="(item, index) in checkArray" :key="index" class="check_box">
|
|
|
- <div class="title" v-if="item.ttype != 1 || (!item.json && item.ttype == 1)" :style="{fontSize:item.ttype == 1 && '16px'}">{{ selectType(item, index) }}</div>
|
|
|
+ <div class="title" v-if="item.ttype != 1 || (!item.json && item.ttype == 1)"
|
|
|
+ :style="{ fontSize: item.ttype == 1 && '16px' }">{{ selectType(item, index) }}</div>
|
|
|
<div v-if="item.ttype == 1" class="answerBox">
|
|
|
- <choiceV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-if="item.type == 1" :see="see" :isTeacher="isTeacher"></choiceV>
|
|
|
- <gapV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 3" :see="see" :isTeacher="isTeacher"></gapV>
|
|
|
- <fileV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 5" :see="see" :isTeacher="isTeacher"></fileV>
|
|
|
+ <choiceV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-if="item.type == 1" :see="see"
|
|
|
+ :isTeacher="isTeacher"></choiceV>
|
|
|
+ <gapV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 3" :see="see"
|
|
|
+ :isTeacher="isTeacher"></gapV>
|
|
|
+ <fileV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 5" :see="see"
|
|
|
+ :isTeacher="isTeacher"></fileV>
|
|
|
+ <courseV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 6"
|
|
|
+ :see="see" :isTeacher="isTeacher"></courseV>
|
|
|
+ <evaV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 7" :see="see"
|
|
|
+ :isTeacher="isTeacher"></evaV>
|
|
|
<!-- <span v-else>暂未设置题目</span> -->
|
|
|
</div>
|
|
|
<div v-for="(item2, index2) in item.array" :key="`${index}-${index2}`" class="check_box_xia">
|
|
|
- <div class="title" v-if="item2.ttype != 1 || (!item2.json && item2.ttype == 1)" :style="{fontSize:item2.ttype == 1 && '16px'}">{{ selectType(item2, index2) }}</div>
|
|
|
+ <div class="title" v-if="item2.ttype != 1 || (!item2.json && item2.ttype == 1)"
|
|
|
+ :style="{ fontSize: item2.ttype == 1 && '16px' }">{{ selectType(item2, index2) }}</div>
|
|
|
<div v-if="item2.ttype == 1" class="answerBox">
|
|
|
- <choiceV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-if="item2.type == 1" :see="see" :isTeacher="isTeacher"></choiceV>
|
|
|
- <gapV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 3" :see="see" :isTeacher="isTeacher"></gapV>
|
|
|
- <fileV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 5" :see="see" :isTeacher="isTeacher"></fileV>
|
|
|
+ <choiceV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-if="item2.type == 1"
|
|
|
+ :see="see" :isTeacher="isTeacher"></choiceV>
|
|
|
+ <gapV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 3"
|
|
|
+ :see="see" :isTeacher="isTeacher"></gapV>
|
|
|
+ <fileV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 5"
|
|
|
+ :see="see" :isTeacher="isTeacher"></fileV>
|
|
|
+ <coursev :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 6"
|
|
|
+ :see="see" :isTeacher="isTeacher"></coursev>
|
|
|
+ <evaV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 7"
|
|
|
+ :see="see" :isTeacher="isTeacher"></evaV>
|
|
|
<!-- <span v-else>暂未设置题目</span> -->
|
|
|
</div>
|
|
|
</div>
|
|
@@ -54,7 +86,8 @@
|
|
|
<div class="p_page">
|
|
|
<span>{{ page + 1 }}</span><span>/</span><span>{{ checkArray.length }}</span>
|
|
|
</div>
|
|
|
- <el-button type="primary" size="mini" :disabled="page == checkArray.length - 1" @click="setPage('1')">下一页</el-button>
|
|
|
+ <el-button type="primary" size="mini" :disabled="page == checkArray.length - 1"
|
|
|
+ @click="setPage('1')">下一页</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -64,6 +97,8 @@
|
|
|
import choiceV from "./choice.vue";
|
|
|
import gapV from './gap.vue';
|
|
|
import fileV from './file.vue';
|
|
|
+import courseV from './course.vue';
|
|
|
+import evaV from './eva.vue';
|
|
|
export default {
|
|
|
props: {
|
|
|
cJson: {
|
|
@@ -72,7 +107,7 @@ export default {
|
|
|
title: {
|
|
|
type: String,
|
|
|
},
|
|
|
- brief:{
|
|
|
+ brief: {
|
|
|
type: String
|
|
|
},
|
|
|
checktype: {
|
|
@@ -95,7 +130,9 @@ export default {
|
|
|
components: {
|
|
|
choiceV,
|
|
|
gapV,
|
|
|
- fileV
|
|
|
+ fileV,
|
|
|
+ courseV,
|
|
|
+ evaV
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -108,6 +145,8 @@ export default {
|
|
|
3: "问答题",
|
|
|
4: "添加文档",
|
|
|
5: "附件",
|
|
|
+ 6: "课程",
|
|
|
+ 7: "评分",
|
|
|
},
|
|
|
isloading: true,
|
|
|
};
|
|
@@ -179,14 +218,14 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
- setPage(index){
|
|
|
+ setPage(index) {
|
|
|
this.isloading = false
|
|
|
- if(index == '1'){
|
|
|
+ if (index == '1') {
|
|
|
this.page++
|
|
|
- }else if(index == '-1'){
|
|
|
+ } else if (index == '-1') {
|
|
|
this.page--
|
|
|
}
|
|
|
- setTimeout(()=>{
|
|
|
+ setTimeout(() => {
|
|
|
this.isloading = true
|
|
|
}, 50)
|
|
|
this.$forceUpdate()
|
|
@@ -201,13 +240,21 @@ export default {
|
|
|
let checkArray = _json.filter((item) => {
|
|
|
if (item.array) {
|
|
|
item.array = item.array.filter((item2) => {
|
|
|
- if (item2.ttype == 1 && item2.json && !item2.json.answer2) {
|
|
|
+ if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type != 6 && item.type != 7) {
|
|
|
item2.json.answer2 = [];
|
|
|
+ } else if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type == 6) {
|
|
|
+ item2.json.answer2 = '';
|
|
|
+ } else if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type == 7) {
|
|
|
+ item2.json.answer2 = '';
|
|
|
}
|
|
|
if (item2.array) {
|
|
|
item2.array = item2.array.filter((item3) => {
|
|
|
- if (item3.ttype == 1 && item3.json && !item3.json.answer2) {
|
|
|
+ if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.type != 6 && item3.type != 7) {
|
|
|
item3.json.answer2 = [];
|
|
|
+ } else if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.type == 6) {
|
|
|
+ item3.json.answer2 = '';
|
|
|
+ } else if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.type == 7) {
|
|
|
+ item3.json.answer2 = '';
|
|
|
}
|
|
|
return item3;
|
|
|
});
|
|
@@ -217,8 +264,12 @@ export default {
|
|
|
);
|
|
|
});
|
|
|
}
|
|
|
- if (item.ttype == 1 && item.json && !item.json.answer2) {
|
|
|
+ if (item.ttype == 1 && item.json && !item.json.answer2 && item.type != 6 && item.type != 7) {
|
|
|
item.json.answer2 = [];
|
|
|
+ } else if (item.ttype == 1 && item.json && !item.json.answer2 && item.type == 6) {
|
|
|
+ item.json.answer2 = '';
|
|
|
+ } else if (item.ttype == 1 && item.json && !item.json.answer2 && item.type == 7) {
|
|
|
+ item.json.answer2 = '';
|
|
|
}
|
|
|
console.log(item.array);
|
|
|
return (item.ttype != 1 && item.array.length > 0) || item.ttype == 1;
|
|
@@ -254,7 +305,7 @@ export default {
|
|
|
margin: 10px auto;
|
|
|
}
|
|
|
|
|
|
-.c_box_brief{
|
|
|
+.c_box_brief {
|
|
|
width: 90%;
|
|
|
text-align: left;
|
|
|
font-size: 14px;
|
|
@@ -303,7 +354,7 @@ export default {
|
|
|
padding: 15px 0;
|
|
|
}
|
|
|
|
|
|
-.check_box_xia + .check_box_xia {
|
|
|
+.check_box_xia+.check_box_xia {
|
|
|
border-top: 1px solid #eee;
|
|
|
}
|
|
|
|