|
@@ -4,12 +4,20 @@
|
|
|
<div style="font-size: 25px">{{ askJSONC.testTitle }}</div>
|
|
|
</div>
|
|
|
<div class="a_addBox">
|
|
|
- <div class="a_add_box" v-for="(item, index) in askJSONC.testJson.testJson" :key="index">
|
|
|
+ <div
|
|
|
+ class="a_add_box"
|
|
|
+ v-for="(item, index) in askJSONC.testJson.testJson"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
<div class="a_add_head">
|
|
|
<div>
|
|
|
<span>{{ index + 1 + "、" + item.teststitle }}</span>
|
|
|
</div>
|
|
|
- <el-button type="primary" @click="getA(checkJson[index].checkPerson, item.checkList)">查看学生</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="getA(checkJson[index].checkPerson, item.checkList)"
|
|
|
+ >查看学生</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
<div class="a_add_body">
|
|
|
<div class="a_add_input width100">
|
|
@@ -17,54 +25,94 @@
|
|
|
<span>选项</span><span>小计</span><span>比例</span>
|
|
|
</div>
|
|
|
<div class="a_add_persent">
|
|
|
- <div class="a_add_persent_div" v-for="(item1, checkIndex) in item.testItem" :key="checkIndex">
|
|
|
- <span :class="{ right: item.answer.length ? item.answer.indexOf(checkIndex) != -1 : item.answer == checkIndex }"><span style="max-width: calc(100% - 40px);width: auto;"
|
|
|
- v-html="item.checkList[checkIndex]"></span></span>
|
|
|
+ <div
|
|
|
+ class="a_add_persent_div"
|
|
|
+ v-for="(item1, checkIndex) in item.testItem"
|
|
|
+ :key="checkIndex"
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ :class="{
|
|
|
+ right: item.answer.length
|
|
|
+ ? item.answer.indexOf(checkIndex) != -1
|
|
|
+ : item.answer == checkIndex,
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ style="margin-right: 10px"
|
|
|
+ v-if="
|
|
|
+ item.checkList[checkIndex] &&
|
|
|
+ item.checkList[checkIndex].imgType &&
|
|
|
+ item.checkList[checkIndex].imgType == 1
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <div class="inImg">
|
|
|
+ <img :src="item.checkList[checkIndex].src" alt="" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <span
|
|
|
+ v-else
|
|
|
+ style="max-width: calc(100% - 40px); width: auto"
|
|
|
+ v-html="item.checkList[checkIndex]"
|
|
|
+ ></span>
|
|
|
+ </span>
|
|
|
<span>{{
|
|
|
- checkJson[index].checkCount[checkIndex]
|
|
|
- ? checkJson[index].checkCount[checkIndex]
|
|
|
- : 0
|
|
|
+ checkJson[index].checkCount[checkIndex]
|
|
|
+ ? checkJson[index].checkCount[checkIndex]
|
|
|
+ : 0
|
|
|
}}</span>
|
|
|
<span>
|
|
|
- <el-progress :percentage="
|
|
|
- checkJson[index].checkPerent[checkIndex]
|
|
|
- ? checkJson[index].checkPerent[checkIndex]
|
|
|
- : 0
|
|
|
- " :show-text="false"></el-progress>
|
|
|
+ <el-progress
|
|
|
+ :percentage="
|
|
|
+ checkJson[index].checkPerent[checkIndex]
|
|
|
+ ? checkJson[index].checkPerent[checkIndex]
|
|
|
+ : 0
|
|
|
+ "
|
|
|
+ :show-text="false"
|
|
|
+ ></el-progress>
|
|
|
</span>
|
|
|
</div>
|
|
|
<div class="a_add_persent_div">
|
|
|
<span>正确率</span>
|
|
|
<span>{{
|
|
|
- (checkJson[index].right
|
|
|
- ? checkJson[index].right
|
|
|
- : 0) +'%'
|
|
|
+ (checkJson[index].right ? checkJson[index].right : 0) + "%"
|
|
|
}}</span>
|
|
|
- <span>
|
|
|
- </span>
|
|
|
+ <span> </span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-dialog title="查看" :visible.sync="dialogVisible" :append-to-body="true" width="900px" :before-close="handleClose"
|
|
|
- class="dialog_diy">
|
|
|
+ <el-dialog
|
|
|
+ title="查看"
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ :append-to-body="true"
|
|
|
+ width="900px"
|
|
|
+ :before-close="handleClose"
|
|
|
+ class="dialog_diy"
|
|
|
+ >
|
|
|
<div>
|
|
|
<div v-for="(item, index) in timu" :key="index" class="borderB">
|
|
|
<div v-html="item" class="s_title"></div>
|
|
|
- <div class="stuBox" style="margin-top: 20px;align-items: flex-start;">
|
|
|
+ <div class="stuBox" style="margin-top: 20px; align-items: flex-start">
|
|
|
<div style="margin: 0 0 10px 0; min-width: 70px; color: #adadad">
|
|
|
选择同学:
|
|
|
</div>
|
|
|
<div class="stuBox" style="flex-wrap: wrap">
|
|
|
- <span class="studentClass" v-for="(pe, pi) in person[index]" :key="index + '-' + pi">{{ pe }}</span>
|
|
|
+ <span
|
|
|
+ class="studentClass"
|
|
|
+ v-for="(pe, pi) in person[index]"
|
|
|
+ :key="index + '-' + pi"
|
|
|
+ >{{ pe }}</span
|
|
|
+ >
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="dialogVisible = false">关 闭</el-button>
|
|
|
+ <el-button type="primary" @click="dialogVisible = false"
|
|
|
+ >关 闭</el-button
|
|
|
+ >
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -79,7 +127,7 @@ export default {
|
|
|
dialogVisible: false,
|
|
|
person: [],
|
|
|
timu: [],
|
|
|
- checkJson2:[]
|
|
|
+ checkJson2: [],
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -103,24 +151,23 @@ export default {
|
|
|
deep: true,
|
|
|
handler(newValue, oldValue) {
|
|
|
this.askJSONC = this.askJSON ? this.askJSON : {};
|
|
|
- for(var i = 0;i<this.checkJson.length;i++){
|
|
|
+ for (var i = 0; i < this.checkJson.length; i++) {
|
|
|
// debuggerA
|
|
|
- let el = this.checkJson[i]
|
|
|
- console.log(el)
|
|
|
+ let el = this.checkJson[i];
|
|
|
+ console.log(el);
|
|
|
}
|
|
|
- this.checkJson2 = this.checkJson
|
|
|
- }
|
|
|
- }
|
|
|
+ this.checkJson2 = this.checkJson;
|
|
|
+ },
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
// this.askJSONC = this.askJSON ? JSON.parse(this.askJSON)[0] : {};
|
|
|
this.askJSONC = this.askJSON ? this.askJSON : {};
|
|
|
- for(var i = 0;i<this.checkJson.length;i++){
|
|
|
- let el = this.checkJson[i]
|
|
|
- console.log(el)
|
|
|
+ for (var i = 0; i < this.checkJson.length; i++) {
|
|
|
+ let el = this.checkJson[i];
|
|
|
+ console.log(el);
|
|
|
}
|
|
|
- this.checkJson2 = this.checkJson
|
|
|
-
|
|
|
+ this.checkJson2 = this.checkJson;
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -165,7 +212,7 @@ export default {
|
|
|
width: 23px;
|
|
|
}
|
|
|
|
|
|
-.a_add_head_div img+img {
|
|
|
+.a_add_head_div img + img {
|
|
|
margin-left: 10px;
|
|
|
}
|
|
|
|
|
@@ -252,39 +299,39 @@ export default {
|
|
|
margin: 0 10px;
|
|
|
}
|
|
|
|
|
|
-.dialog_diy>>>.el-dialog__header,
|
|
|
-.dialog_diy1>>>.el-dialog__header {
|
|
|
+.dialog_diy >>> .el-dialog__header,
|
|
|
+.dialog_diy1 >>> .el-dialog__header {
|
|
|
background: #002e81 !important;
|
|
|
padding: 15px 20px;
|
|
|
}
|
|
|
|
|
|
-.dialog_diy>>>.el-dialog__title,
|
|
|
-.dialog_diy1>>>.el-dialog__title {
|
|
|
+.dialog_diy >>> .el-dialog__title,
|
|
|
+.dialog_diy1 >>> .el-dialog__title {
|
|
|
color: #fff;
|
|
|
}
|
|
|
|
|
|
-.dialog_diy>>>.el-dialog__headerbtn,
|
|
|
-.dialog_diy1>>>.el-dialog__headerbtn {
|
|
|
+.dialog_diy >>> .el-dialog__headerbtn,
|
|
|
+.dialog_diy1 >>> .el-dialog__headerbtn {
|
|
|
top: 19px;
|
|
|
}
|
|
|
|
|
|
-.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close,
|
|
|
-.dialog_diy1>>>.el-dialog__headerbtn .el-dialog__close {
|
|
|
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close,
|
|
|
+.dialog_diy1 >>> .el-dialog__headerbtn .el-dialog__close {
|
|
|
color: #fff;
|
|
|
}
|
|
|
|
|
|
-.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover,
|
|
|
-.dialog_diy1>>>.el-dialog__headerbtn .el-dialog__close:hover {
|
|
|
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover,
|
|
|
+.dialog_diy1 >>> .el-dialog__headerbtn .el-dialog__close:hover {
|
|
|
color: #fff;
|
|
|
}
|
|
|
|
|
|
-.dialog_diy1>>>.el-dialog__body {
|
|
|
+.dialog_diy1 >>> .el-dialog__body {
|
|
|
padding: 0;
|
|
|
}
|
|
|
|
|
|
-.dialog_diy>>>.el-dialog__body,
|
|
|
-.dialog_diy>>>.el-dialog__footer,
|
|
|
-.dialog_diy1>>>.el-dialog__footer {
|
|
|
+.dialog_diy >>> .el-dialog__body,
|
|
|
+.dialog_diy >>> .el-dialog__footer,
|
|
|
+.dialog_diy1 >>> .el-dialog__footer {
|
|
|
background: #fafafa;
|
|
|
}
|
|
|
|
|
@@ -323,4 +370,14 @@ export default {
|
|
|
margin-bottom: 10px;
|
|
|
border-bottom: 1px solid #d8d8d8;
|
|
|
}
|
|
|
+
|
|
|
+.inImg {
|
|
|
+ width: 100px;
|
|
|
+ height: 100px;
|
|
|
+}
|
|
|
+.inImg > img {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ object-fit: cover;
|
|
|
+}
|
|
|
</style>
|