lsc 1 year ago
parent
commit
e0f359db05

BIN
src/assets/icon/test/test_setting_icon.png


+ 33 - 18
src/components/pages/test/add/components/course/courseDilog.vue

@@ -6,7 +6,7 @@
         </div>
         <span slot="footer" class="dialog-footer">
             <el-button @click="close()">关 闭</el-button>
-            <el-button @click="close()">确 定</el-button>
+            <el-button @click="close()" type="primary">确 定</el-button>
         </span>
     </el-dialog>
 </template>
@@ -22,31 +22,46 @@ export default {
             type: Boolean,
             default: false
         },
-        // courseArray:{
-        //     type: Array,
-        //     default: () => []
-        // }
+        courses:{
+            type: Array,
+            default: () => []
+        }
     },
     data() {
         return {
-					courseArray:[]
-				};
+            courseArray: []
+        };
+    },
+    watch: {
+        courses: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.courseArray = newValue;
+                this.$forceUpdate()
+            }
+        }
+    },
+    mounted () {
+        this.courseArray = JSON.parse(JSON.stringify(this.courses));
+        this.$forceUpdate()
     },
     methods: {
         handleClose(done) {
             this.close();
             done();
         },
-				updateCourseArray(newValue){
-					let index = this.courseArray.findIndex(i=>i===newValue)
-					if(index!=-1){
-						this.courseArray.splice(index,1)
-					}else{
-						// 给courseArray添加课程id
-						this.courseArray.push(newValue)
-						
-					}
-				},
+        updateCourseArray(newValue) {
+            let index = this.courseArray.findIndex(i => i === newValue)
+            if (index != -1) {
+                this.courseArray.splice(index, 1)
+            } else {
+                // 给courseArray添加课程id
+                this.courseArray.push(newValue)
+
+            }
+            this.$emit("setCourse", this.courseArray)
+        },
         close() {
             this.$emit("update:dialogVisibleCourse", false);
         }
@@ -89,6 +104,6 @@ export default {
 
 .dialog_diy>>>.el-dialog__body,
 .dialog_diy>>>.el-dialog__footer {
-    background: #fafafa;
+    background: #fff;
 }
 </style>

+ 33 - 4
src/components/pages/test/add/components/course/index.vue

@@ -12,11 +12,15 @@
                 <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="checkJson.detail"
                     placeholder="请输入描述"></textarea>
             </div>
-            <div class="set_title">
-                <div @click="openCourse">设置课程选择范围</div>
+            <div class="set_title" style="flex-direction: column;">
+                <div @click="openCourse" class="setting">设置课程选择范围</div>
+                <div>
+                    <div>cid</div>
+                    <div>cid</div>
+                </div>
             </div>
         </div>
-        <courseDilogVue :dialogVisibleCourse.sync="dialogVisibleCourse"></courseDilogVue>
+        <courseDilogVue :dialogVisibleCourse.sync="dialogVisibleCourse" :courses="courses" @setCourse="setCourse"></courseDilogVue>
     </div>
 </template>
 
@@ -41,7 +45,8 @@ export default {
                 // { type: 2, name: '多选题' }
             ],
             checkJson: {},
-            dialogVisibleCourse:false
+            dialogVisibleCourse:false,
+            courses: []
         }
     },
     directives: {
@@ -87,6 +92,11 @@ export default {
         },
         openCourse(){
             this.dialogVisibleCourse = true
+        },
+        setCourse(courses){
+            this.checkJson.courses = courses
+            this.courses = courses
+            this.$forceUpdate()
         }
     },
     mounted() {
@@ -100,6 +110,7 @@ export default {
             };
         } else {
             this.checkJson = this.depthCopy(this.cJson);
+            this.courses = this.checkJson.courses
         }
 
     },
@@ -196,4 +207,22 @@ export default {
     border-bottom: 10px solid #f6f6f6;
     border-top: 10px solid transparent;
 } */
+
+.setting{
+    display: flex;
+    align-items: center;
+    cursor: pointer;
+    justify-content: flex-end;
+    width: 100%;
+}
+
+.setting::before{
+    content: '';
+    display: block;
+    width: 20px;
+    height: 20px;
+    background-image: url('../../../../../../assets/icon/test/test_setting_icon.png');
+    background-size: 100% 100%;
+    margin-right: 5px;
+}
 </style>

+ 35 - 2
src/components/pages/test/add/components/evaBox/index.vue

@@ -12,6 +12,14 @@
                 <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="checkJson.detail"
                     placeholder="请输入描述"></textarea>
             </div>
+            <div class="set_title">
+                <span>分值:</span>
+                <div class="number">
+                    <input class="binfo_input" type="value" v-model="checkJson.small" @change="numberPan"/>
+                    <span>~</span>
+                    <input class="binfo_input" type="value" v-model="checkJson.big" @change="numberPan2"/>
+                </div>
+            </div>
         </div>
     </div>
 </template>
@@ -65,9 +73,25 @@ export default {
             return JSON.parse(JSON.stringify(s));
         },
         numberPan() {
-            if (/[^\d]/.test(this.checkJson.score) || this.checkJson.score < 0) {
+            if (/[^\d]/.test(this.checkJson.small) || this.checkJson.small < 0) {
+                this.$message.error('请输入大于0的数字')
+                this.checkJson.small = 0
+            }else if(this.checkJson.small === ''){
+                this.checkJson.small = 0
+            }else if(this.checkJson.big <= this.checkJson.small){
+                this.$message.error('请输入小于'+this.checkJson.big+'的数字')
+                this.checkJson.small = this.checkJson.big - 1
+            }
+        },
+        numberPan2() {
+            if (/[^\d]/.test(this.checkJson.big) || this.checkJson.big < 0) {
                 this.$message.error('请输入大于0的数字')
-                this.checkJson.score = ''
+                this.checkJson.big = this.checkJson.small + 1
+            }else if(this.checkJson.big === ''){
+                this.checkJson.big = this.checkJson.small + 1
+            }else if(this.checkJson.big <= this.checkJson.small){
+                this.$message.error('请输入大于'+this.checkJson.small+'的数字')
+                this.checkJson.big = this.checkJson.small + 1
             }
         },
         changeAnswer() {
@@ -176,6 +200,15 @@ export default {
     border: 1px solid #3681FC !important;
 }
 
+
+.set_title > .number{
+    display: flex;
+    align-items: center;
+}
+
+.set_title > .number > span{
+    margin: 0 10px;
+}
 /* .jiao::before{
     content: '';
     position: absolute;

+ 103 - 0
src/components/pages/test/add/edit/check/course.vue

@@ -0,0 +1,103 @@
+<template>
+    <div class="c_box">
+        <div class="choice_box">
+            <div class="title" style="display: flex;">
+                <span style="min-width: fit-content;">{{ tindex + 1 + "、" }}</span>
+                <span>{{ checkJson.title }}</span>
+            </div>
+            <div class="detail" v-if="checkJson.detail" v-html="checkJson.detail"
+                style="color: #00000099;margin-top: 5px;">
+            </div>
+            <div class="choices">
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    props: {
+        tindex: {
+            type: Number
+        },
+        cJson: {
+            type: Object,
+        },
+        checktype: {
+            type: Number,
+            default: 1
+        },
+        see: {
+            type: Boolean,
+            default: false
+        }
+    },
+    data() {
+        return {
+            option: {
+                1: { name: '附件' },
+            },
+            userid: this.$route.query.userid,
+            checkJson: undefined,
+            progress: 0,
+            isFinishSize: 0,
+            proVisible: false,
+            isAllSize: 0,
+            wurl: "",
+            isTong: false
+        }
+    },
+    watch: {
+        checkJson: {
+            handler(newValue) {
+                this.$emit('update:cJson', newValue)
+            },
+            deep: true
+        },
+    },
+    methods: {
+        depthCopy(s) {
+            return JSON.parse(JSON.stringify(s));
+        },
+        openFileBox() {
+            this.dialogVisiblefile = true
+        },
+
+    },
+    mounted() {
+        this.checkJson = this.cJson ? this.depthCopy(this.cJson) : undefined
+
+    }
+}
+</script>
+
+<style scoped>
+.c_box {
+    width: 100%;
+    position: relative;
+}
+
+/* .mask {
+    position: absolute;
+    height: 100%;
+    width: 100%;
+    z-index: 2;
+} */
+
+.choice_box {
+    white-space: pre-line;
+}
+
+.choice_box>.title {
+    font-weight: bold;
+    width: 100%;
+    word-break: break-all;
+}
+
+.choice_box>.choices {
+    margin-top: 10px;
+}
+
+
+
+</style>

+ 132 - 0
src/components/pages/test/add/edit/check/eva.vue

@@ -0,0 +1,132 @@
+<template>
+    <div class="c_box">
+        <div class="choice_box">
+            <div class="title" style="display: flex;">
+                <span style="min-width: fit-content;">{{ tindex + 1 + "、" }}</span>
+                <span>{{ checkJson.title }}</span>
+            </div>
+            <div class="detail" v-if="checkJson.detail" v-html="checkJson.detail"
+                style="color: #00000099;margin-top: 5px;">
+            </div>
+            <div class="choices">
+                <div class="score" :class="{active: (checkJson.answer2 || checkJson.answer2 === 0) && (checkJson.answer2 >= index)}" @click="score(index)" v-for="(item, index) in (parseInt(checkJson.big) - parseInt(checkJson.small) + 1)" :key="index">{{ parseInt(checkJson.small) + index }}</div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+
+export default {
+    props: {
+        tindex: {
+            type: Number
+        },
+        cJson: {
+            type: Object,
+        },
+        checktype: {
+            type: Number,
+            default: 1
+        },
+        see: {
+            type: Boolean,
+            default: false
+        }
+    },
+    data() {
+        return {
+            option: {
+                1: { name: '附件' },
+            },
+            userid: this.$route.query.userid,
+            checkJson: undefined,
+            progress: 0,
+            isFinishSize: 0,
+            proVisible: false,
+            isAllSize: 0,
+            wurl: "",
+            isTong: false
+        }
+    },
+    watch: {
+        checkJson: {
+            handler(newValue) {
+                this.$emit('update:cJson', newValue)
+            },
+            deep: true
+        },
+    },
+    methods: {
+        depthCopy(s) {
+            return JSON.parse(JSON.stringify(s));
+        },
+        openFileBox() {
+            this.dialogVisiblefile = true
+        },
+        score(index){
+            if(this.checktype == '2'){
+                return
+            }
+            this.checkJson.answer2 = index
+        }
+    },
+    mounted() {
+        this.checkJson = this.cJson ? this.depthCopy(this.cJson) : undefined
+
+    }
+}
+</script>
+
+<style scoped>
+.c_box {
+    width: 100%;
+    position: relative;
+}
+
+/* .mask {
+    position: absolute;
+    height: 100%;
+    width: 100%;
+    z-index: 2;
+} */
+
+.choice_box {
+    white-space: pre-line;
+}
+
+.choice_box>.title {
+    font-weight: bold;
+    width: 100%;
+    word-break: break-all;
+}
+
+.choice_box>.choices {
+    margin-top: 10px;
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: center;
+    width: 90%;
+    margin: 0 auto;
+}
+
+.choices > .score{
+    width: 40px;
+    height: 40px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin: 0 20px 10px 0;
+    border-radius: 5px;
+    background: #dee0e3;
+    font-size: 18px;
+    font-weight: bold;
+    color: #fff;
+    cursor: pointer;
+}
+
+.choices > .score.active{
+    background: #adb4f5;
+}
+
+</style>

+ 15 - 1
src/components/pages/test/add/edit/check/index.vue

@@ -10,6 +10,8 @@
             <choiceV :tindex="index" :cJson.sync="item.json" v-if="item.type == 1"></choiceV>
             <gapV :tindex="index" :cJson.sync="item.json" v-if="item.type == 3"></gapV>
             <fileV :tindex="index" :cJson.sync="item.json" v-if="item.type == 5"></fileV>
+            <courseV :tindex="index" :cJson.sync="item.json" v-if="item.type == 6"></courseV>
+            <evaV :tindex="index" :cJson.sync="item.json" v-if="item.type == 7"></evaV>
             <span v-else>暂未设置题目</span>
           </div>
           <div v-for="(item2, index2) in item.array" :key="`${index}-${index2}`" class="check_box_xia">
@@ -18,6 +20,8 @@
               <choiceV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 1"></choiceV>
               <gapV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 3"></gapV>
               <fileV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 5"></fileV>
+              <courseV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 6"></courseV>
+              <evaV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 7"></evaV>
               <!-- <span v-else>暂未设置题目</span> -->
             </div>
           </div>
@@ -30,6 +34,8 @@
             <choiceV :tindex="index" :cJson.sync="item.json" v-if="item.type == 1"></choiceV>
             <gapV :tindex="index" :cJson.sync="item.json" v-if="item.type == 3"></gapV>
             <fileV :tindex="index" :cJson.sync="item.json" v-if="item.type == 5"></fileV>
+            <courseV :tindex="index" :cJson.sync="item.json" v-if="item.type == 6"></courseV>
+            <evaV :tindex="index" :cJson.sync="item.json" v-if="item.type == 7"></evaV>
             <!-- <span v-else>暂未设置题目</span> -->
           </div>
           <div v-for="(item2, index2) in item.array" :key="`${index}-${index2}`" class="check_box_xia">
@@ -38,6 +44,8 @@
               <choiceV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 1"></choiceV>
               <gapV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 3"></gapV>
               <fileV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 5"></fileV>
+              <courseV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 6"></courseV>
+              <evaV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 7"></evaV>
               <!-- <span v-else>暂未设置题目</span> -->
             </div>
           </div>
@@ -58,6 +66,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: {
@@ -70,7 +80,9 @@ export default {
   components: {
     choiceV,
     gapV,
-    fileV
+    fileV,
+    courseV,
+    evaV,
   },
   data() {
     return {
@@ -83,6 +95,8 @@ export default {
         3: "问答题",
         4: "添加文档",
         5: "附件",
+        6: "课程",
+        7: "评分",
       },
       isloading:true,
     }

+ 103 - 0
src/components/pages/testStudent/view/component/course.vue

@@ -0,0 +1,103 @@
+<template>
+    <div class="c_box">
+        <div class="choice_box">
+            <div class="title" style="display: flex;">
+                <span style="min-width: fit-content;">{{ tindex + 1 + "、" }}</span>
+                <span>{{ checkJson.title }}</span>
+            </div>
+            <div class="detail" v-if="checkJson.detail" v-html="checkJson.detail"
+                style="color: #00000099;margin-top: 5px;">
+            </div>
+            <div class="choices">
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    props: {
+        tindex: {
+            type: Number
+        },
+        cJson: {
+            type: Object,
+        },
+        checktype: {
+            type: Number,
+            default: 1
+        },
+        see: {
+            type: Boolean,
+            default: false
+        }
+    },
+    data() {
+        return {
+            option: {
+                1: { name: '附件' },
+            },
+            userid: this.$route.query.userid,
+            checkJson: undefined,
+            progress: 0,
+            isFinishSize: 0,
+            proVisible: false,
+            isAllSize: 0,
+            wurl: "",
+            isTong: false
+        }
+    },
+    watch: {
+        checkJson: {
+            handler(newValue) {
+                this.$emit('update:cJson', newValue)
+            },
+            deep: true
+        },
+    },
+    methods: {
+        depthCopy(s) {
+            return JSON.parse(JSON.stringify(s));
+        },
+        openFileBox() {
+            this.dialogVisiblefile = true
+        },
+
+    },
+    mounted() {
+        this.checkJson = this.cJson ? this.depthCopy(this.cJson) : undefined
+
+    }
+}
+</script>
+
+<style scoped>
+.c_box {
+    width: 100%;
+    position: relative;
+}
+
+/* .mask {
+    position: absolute;
+    height: 100%;
+    width: 100%;
+    z-index: 2;
+} */
+
+.choice_box {
+    white-space: pre-line;
+}
+
+.choice_box>.title {
+    font-weight: bold;
+    width: 100%;
+    word-break: break-all;
+}
+
+.choice_box>.choices {
+    margin-top: 10px;
+}
+
+
+
+</style>

+ 132 - 0
src/components/pages/testStudent/view/component/eva.vue

@@ -0,0 +1,132 @@
+<template>
+    <div class="c_box">
+        <div class="choice_box">
+            <div class="title" style="display: flex;">
+                <span style="min-width: fit-content;">{{ tindex + 1 + "、" }}</span>
+                <span>{{ checkJson.title }}</span>
+            </div>
+            <div class="detail" v-if="checkJson.detail" v-html="checkJson.detail"
+                style="color: #00000099;margin-top: 5px;">
+            </div>
+            <div class="choices">
+                <div class="score" :class="{active: (checkJson.answer2 || checkJson.answer2 === 0) && (checkJson.answer2 >= index)}" @click="score(index)" v-for="(item, index) in (parseInt(checkJson.big) - parseInt(checkJson.small) + 1)" :key="index">{{ parseInt(checkJson.small) + index }}</div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+
+export default {
+    props: {
+        tindex: {
+            type: Number
+        },
+        cJson: {
+            type: Object,
+        },
+        checktype: {
+            type: Number,
+            default: 1
+        },
+        see: {
+            type: Boolean,
+            default: false
+        }
+    },
+    data() {
+        return {
+            option: {
+                1: { name: '附件' },
+            },
+            userid: this.$route.query.userid,
+            checkJson: undefined,
+            progress: 0,
+            isFinishSize: 0,
+            proVisible: false,
+            isAllSize: 0,
+            wurl: "",
+            isTong: false
+        }
+    },
+    watch: {
+        checkJson: {
+            handler(newValue) {
+                this.$emit('update:cJson', newValue)
+            },
+            deep: true
+        },
+    },
+    methods: {
+        depthCopy(s) {
+            return JSON.parse(JSON.stringify(s));
+        },
+        openFileBox() {
+            this.dialogVisiblefile = true
+        },
+        score(index){
+            if(this.checktype == '2'){
+                return
+            }
+            this.checkJson.answer2 = index
+        }
+    },
+    mounted() {
+        this.checkJson = this.cJson ? this.depthCopy(this.cJson) : undefined
+
+    }
+}
+</script>
+
+<style scoped>
+.c_box {
+    width: 100%;
+    position: relative;
+}
+
+/* .mask {
+    position: absolute;
+    height: 100%;
+    width: 100%;
+    z-index: 2;
+} */
+
+.choice_box {
+    white-space: pre-line;
+}
+
+.choice_box>.title {
+    font-weight: bold;
+    width: 100%;
+    word-break: break-all;
+}
+
+.choice_box>.choices {
+    margin-top: 10px;
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: center;
+    width: 90%;
+    margin: 0 auto;
+}
+
+.choices > .score{
+    width: 40px;
+    height: 40px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin: 0 20px 10px 0;
+    border-radius: 5px;
+    background: #dee0e3;
+    font-size: 18px;
+    font-weight: bold;
+    color: #fff;
+    cursor: pointer;
+}
+
+.choices > .score.active{
+    background: #adb4f5;
+}
+
+</style>

+ 79 - 28
src/components/pages/testStudent/view/component/topic.vue

@@ -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;
 }