|
@@ -19,7 +19,7 @@
|
|
|
:class="{ s_b_m_t_l_active: showType === item.value }"
|
|
|
@click="changeShowType(item.value)"
|
|
|
v-if="item.showType.includes(toolType)"
|
|
|
- >{{ item.label }}</span
|
|
|
+ >{{ (toolType == 15 && item.value ==1)? "词云" : item.label }}</span
|
|
|
>
|
|
|
</div>
|
|
|
<div class="s_b_m_t_right">
|
|
@@ -42,33 +42,33 @@
|
|
|
|
|
|
<span>题目内容</span>
|
|
|
|
|
|
- <div
|
|
|
- v-if="[45].includes(toolType)"
|
|
|
- class="s_b_m_b_i_m_choseList"
|
|
|
- v-for="(item, index) in testJson"
|
|
|
- >
|
|
|
- <div class="s_b_m_b_i_m_c_title">
|
|
|
- <span>{{ index + 1 }}</span>
|
|
|
- <svg
|
|
|
- width="16"
|
|
|
- height="16"
|
|
|
- viewBox="0 0 16 16"
|
|
|
- fill="none"
|
|
|
- xmlns="http://www.w3.org/2000/svg"
|
|
|
- >
|
|
|
- <path
|
|
|
- d="M15.3536 8.35355C15.5488 8.15829 15.5488 7.84171 15.3536 7.64645L12.1716 4.46447C11.9763 4.2692 11.6597 4.2692 11.4645 4.46447C11.2692 4.65973 11.2692 4.97631 11.4645 5.17157L14.2929 8L11.4645 10.8284C11.2692 11.0237 11.2692 11.3403 11.4645 11.5355C11.6597 11.7308 11.9763 11.7308 12.1716 11.5355L15.3536 8.35355ZM1 8.5H15V7.5H1V8.5Z"
|
|
|
- fill="#3681FC"
|
|
|
- />
|
|
|
- </svg>
|
|
|
+ <div v-if="[45].includes(toolType) && testJson">
|
|
|
+ <div
|
|
|
+ class="s_b_m_b_i_m_choseList"
|
|
|
+ v-for="(item, index) in testJson.testJson.testJson"
|
|
|
+ >
|
|
|
+ <div class="s_b_m_b_i_m_c_title">
|
|
|
+ <span>{{ index + 1 }}</span>
|
|
|
+ <svg
|
|
|
+ width="16"
|
|
|
+ height="16"
|
|
|
+ viewBox="0 0 16 16"
|
|
|
+ fill="none"
|
|
|
+ xmlns="http://www.w3.org/2000/svg"
|
|
|
+ >
|
|
|
+ <path
|
|
|
+ d="M15.3536 8.35355C15.5488 8.15829 15.5488 7.84171 15.3536 7.64645L12.1716 4.46447C11.9763 4.2692 11.6597 4.2692 11.4645 4.46447C11.2692 4.65973 11.2692 4.97631 11.4645 5.17157L14.2929 8L11.4645 10.8284C11.2692 11.0237 11.2692 11.3403 11.4645 11.5355C11.6597 11.7308 11.9763 11.7308 12.1716 11.5355L15.3536 8.35355ZM1 8.5H15V7.5H1V8.5Z"
|
|
|
+ fill="#3681FC"
|
|
|
+ />
|
|
|
+ </svg>
|
|
|
|
|
|
- <span
|
|
|
- >{{
|
|
|
- typeof item.answer === "number"
|
|
|
- ? "单选题:"
|
|
|
- : "多选题:"
|
|
|
- }}{{ item.teststitle }}</span
|
|
|
- >
|
|
|
+ <span
|
|
|
+ >{{
|
|
|
+ item.type == 1
|
|
|
+ ? "单选题:"
|
|
|
+ : "多选题:"
|
|
|
+ }}{{ item.teststitle }}</span
|
|
|
+ >
|
|
|
</div>
|
|
|
|
|
|
<div
|
|
@@ -76,35 +76,38 @@
|
|
|
v-for="(item2, index2) in item.checkList"
|
|
|
:class="{
|
|
|
s_b_m_b_i_m_c_o_right:
|
|
|
- typeof item.answer === 'number'
|
|
|
- ? item.answer === index2
|
|
|
+ item.type == 1
|
|
|
+ ? item.answer == index2
|
|
|
: item.answer.includes(index2)
|
|
|
}"
|
|
|
>
|
|
|
+
|
|
|
<div class="s_b_m_b_i_m_c_o_btn">
|
|
|
<span
|
|
|
class="s_b_m_b_i_m_c_o_btn1"
|
|
|
- v-if="typeof item.answer === 'number'"
|
|
|
+ v-if="item.type == 1"
|
|
|
>
|
|
|
- <span v-if="item.answer === index2"></span>
|
|
|
+ <span v-if="testJson.anwer[index] == index2"></span>
|
|
|
</span>
|
|
|
<span class="s_b_m_b_i_m_c_o_btn2" v-else>
|
|
|
- <span v-if="item.answer.includes(index2)">
|
|
|
- <svg
|
|
|
- width="8"
|
|
|
- height="6"
|
|
|
- viewBox="0 0 8 6"
|
|
|
- fill="none"
|
|
|
- xmlns="http://www.w3.org/2000/svg"
|
|
|
- >
|
|
|
- <path
|
|
|
- fill-rule="evenodd"
|
|
|
- clip-rule="evenodd"
|
|
|
- d="M7.44194 0.558058C7.68602 0.802136 7.68602 1.19786 7.44194 1.44194L3.44194 5.44194C3.19786 5.68602 2.80214 5.68602 2.55806 5.44194L0.558058 3.44194C0.313981 3.19786 0.313981 2.80214 0.558058 2.55806C0.802136 2.31398 1.19786 2.31398 1.44194 2.55806L3 4.11612L6.55806 0.558058C6.80214 0.313981 7.19786 0.313981 7.44194 0.558058Z"
|
|
|
- fill="white"
|
|
|
- />
|
|
|
- </svg>
|
|
|
- </span>
|
|
|
+
|
|
|
+ <span v-if="testJson.anwer[index].includes(index2)">
|
|
|
+ <svg
|
|
|
+ width="8"
|
|
|
+ height="6"
|
|
|
+ viewBox="0 0 8 6"
|
|
|
+ fill="none"
|
|
|
+ xmlns="http://www.w3.org/2000/svg"
|
|
|
+ >
|
|
|
+ <path
|
|
|
+ fill-rule="evenodd"
|
|
|
+ clip-rule="evenodd"
|
|
|
+ d="M7.44194 0.558058C7.68602 0.802136 7.68602 1.19786 7.44194 1.44194L3.44194 5.44194C3.19786 5.68602 2.80214 5.68602 2.55806 5.44194L0.558058 3.44194C0.313981 3.19786 0.313981 2.80214 0.558058 2.55806C0.802136 2.31398 1.19786 2.31398 1.44194 2.55806L3 4.11612L6.55806 0.558058C6.80214 0.313981 7.19786 0.313981 7.44194 0.558058Z"
|
|
|
+ fill="white"
|
|
|
+ />
|
|
|
+ </svg>
|
|
|
+ </span>
|
|
|
+
|
|
|
</span>
|
|
|
</div>
|
|
|
<span>
|
|
@@ -118,6 +121,8 @@
|
|
|
</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
|
|
|
<div v-if="[15].includes(toolType)" class="s_b_m_b_i_m_question">
|
|
|
<div class="s_b_m_b_i_m_c_title">
|
|
@@ -135,10 +140,10 @@
|
|
|
/>
|
|
|
</svg>
|
|
|
|
|
|
- <span>提问:{{ testData.answerQ }}</span>
|
|
|
+ <span>提问:{{ testJson.answerTitle }}</span>
|
|
|
</div>
|
|
|
- <span>
|
|
|
-
|
|
|
+ <span style="padding: 10px;">
|
|
|
+ {{ testJson.answer }}
|
|
|
</span>
|
|
|
</div>
|
|
|
|
|
@@ -148,7 +153,7 @@
|
|
|
</div>
|
|
|
<div class="sm_right">
|
|
|
<div class="sm_right_item" v-for="(item,index) in testData.selectJson.answer">
|
|
|
- <el-select v-model="testData.selectJson.answer[index]" placeholder="请选择">
|
|
|
+ <el-select v-model="testData.selectJson.answer[testJson[index]]" placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="(item2,index2) in testData.selectJson.select"
|
|
|
:disabled="item!==index2"
|
|
@@ -157,6 +162,8 @@
|
|
|
:value="index2">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
+ <span v-if="testData.selectJson.answer[index] == testJson[index]" style="color: blue;margin-left: 10px;">回答正确</span>
|
|
|
+ <span v-else><span style="color: red;margin-left: 10px;">回答错误</span> 答案:{{ testData.selectJson.select[index] }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div
|
|
@@ -188,7 +195,13 @@
|
|
|
<div class="si_b_top">
|
|
|
<span class="si_b_t_item" v-for="(item2,index2) in item.addSentence" :key="index2">{{ item.rightAnswer[index2] }}</span>
|
|
|
</div>
|
|
|
- <div class="si_b_bottom">
|
|
|
+ <div class="si_b_bottom" >
|
|
|
+ <span class="si_b_t_item" v-for="(item2,index2) in testJson.chooseSenList" :key="index2">{{ item2 }}</span>
|
|
|
+ <div v-if="JSON.stringify(item.rightAnswer) == JSON.stringify(testJson.chooseSenList)" style="color: blue;display: inline;">回答正确</div>
|
|
|
+ <div v-else style="color: red;display: inline">回答错误</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="si_b_bottom" v-if="JSON.stringify(item.rightAnswer) != JSON.stringify(testJson.chooseSenList)">
|
|
|
<span class="si_b_b_item" v-for="(item2,index2) in item.rightAnswer" :key="index2">{{ item2 }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -216,18 +229,19 @@
|
|
|
</div>
|
|
|
<div class="e_item_content">
|
|
|
<span class="e_i_c_detail">{{ item.detail?item.detail:"无内容" }}</span>
|
|
|
- <el-rate :value="item.score" disabled :max="item.score"></el-rate>
|
|
|
+ <el-rate :value="testJson.eStar[index]" disabled :max="item.score"></el-rate>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
- <span>请输入评价内容...</span>
|
|
|
+ <span style="padding: 10px;">{{ testJson.eBzText }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
<div class="s_b_m_b_item" v-if="showType === 1 && dialogTypeList[1].showType.includes(toolType)">
|
|
|
|
|
|
- <div class="s_b_m_b_i_eChartsArea">
|
|
|
+ <div v-if="toolType == 45">
|
|
|
+ <div class="s_b_m_b_i_eChartsArea">
|
|
|
<div class="s_b_m_b_i_e_title">
|
|
|
<span v-for="item in statisticsTypeList" :key="item.value" :class="{'s_b_m_b_i_e_t_active':showStatisticsType===item.value}" @click="changeShowStatisticsType(item.value)">{{item.label}}</span>
|
|
|
</div>
|
|
@@ -296,6 +310,13 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
+ <div v-if="toolType == 15">
|
|
|
+ <choseWordCloud :data="wordCloudData" :dialogVisibleWordCloud="dialogVisibleWordCloud"></choseWordCloud>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
</div>
|
|
|
<div class="s_b_m_b_item s_b_m_b_worksSubmit" v-if="showType === 2 && dialogTypeList[2].showType.includes(toolType)">
|
|
|
<div class="s_b_b_i_noSubmit">
|
|
@@ -371,7 +392,12 @@
|
|
|
v-for="item in worksStudent"
|
|
|
:key="item.userid"
|
|
|
>
|
|
|
- <div class="s_b_b_i_ws_b_i_s_i_t_top" :style="`cursor: ${[45,7,52,48].includes(toolType)?'pointer':'default'};padding: ${[7,52,48].includes(toolType)?'0px':'10px'};`" @click="openTools(item)">
|
|
|
+ <div
|
|
|
+ class="s_b_b_i_ws_b_i_s_i_t_top"
|
|
|
+ :style="`cursor: ${[45,7,52,48].includes(toolType)?'pointer':'default'};padding: ${[7,52,48].includes(toolType)?'0px':'10px'};`"
|
|
|
+ @click="StudentWork(item)"
|
|
|
+ >
|
|
|
+ <!-- @click="openTools(item)" -->
|
|
|
<div
|
|
|
class="s_b_b_i_ws_b_i_s_i_t_t_delIcon"
|
|
|
@click.stop="deleteWorks(item.wid)"
|
|
@@ -447,10 +473,13 @@
|
|
|
|
|
|
<script>
|
|
|
import eChartsView from './eChartsView.vue'
|
|
|
+import choseWordCloud from './choseWordCloud.vue'
|
|
|
+
|
|
|
export default {
|
|
|
components:{
|
|
|
eChartsView1:eChartsView,
|
|
|
- eChartsView2:eChartsView
|
|
|
+ eChartsView2:eChartsView,
|
|
|
+ choseWordCloud
|
|
|
},
|
|
|
props: {
|
|
|
worksStudentData: {
|
|
@@ -477,10 +506,13 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
show: false,
|
|
|
- showType: 0,
|
|
|
+ showType: 2,
|
|
|
+ wordCloudData:[], //词云数据
|
|
|
+ dialogVisibleWordCloud:false,
|
|
|
showStatisticsType:0,
|
|
|
data: null,
|
|
|
testJson: null,
|
|
|
+ testJsonCopy: [],
|
|
|
testData: null,
|
|
|
toolIndex: null,
|
|
|
worksStudent: [],
|
|
@@ -492,7 +524,7 @@ export default {
|
|
|
},
|
|
|
dialogTypeList: [
|
|
|
{ label: "作业详细", value: 0,showType:[45,15,41,47,40], loading: false },
|
|
|
- { label: "题目统计", value: 1,showType:[45], loading: false },
|
|
|
+ { label: "题目统计", value: 1,showType:[45,15], loading: false },
|
|
|
{ label: "学生统计", value: 2,showType:[45,15,41,47,40,7,52,48], loading: false }
|
|
|
],
|
|
|
toolList:[
|
|
@@ -526,8 +558,8 @@ export default {
|
|
|
let pushData = [];
|
|
|
|
|
|
isWorksData = this.worksStudent.map(i => JSON.parse(i.works)[0].anwer);
|
|
|
-
|
|
|
- pushData = worksJson.map((item, index) => {
|
|
|
+
|
|
|
+ pushData = worksJson.testJson.testJson.map((item, index) => {
|
|
|
return {
|
|
|
title: item.teststitle,
|
|
|
answer: item.answer,
|
|
@@ -746,12 +778,62 @@ export default {
|
|
|
this.data = data;
|
|
|
this.toolIndex = data.toolIndex;
|
|
|
this.toolType = data.toolType;
|
|
|
- if(this.dialogTypeList.findIndex(i=>i.showType.includes(this.toolType))!==-1){
|
|
|
+ if(this.dialogTypeList.findIndex(i=>i.showType.includes(this.toolType))==-1){
|
|
|
this.changeShowType(this.dialogTypeList.findIndex(i=>i.showType.includes(this.toolType)))
|
|
|
}
|
|
|
this.setData();
|
|
|
},
|
|
|
- setData() {
|
|
|
+ openWordCloud() {
|
|
|
+
|
|
|
+ let array = this.worksStudent.map(e=>{
|
|
|
+ return {name: JSON.parse(e.works)[0].answer}
|
|
|
+ });
|
|
|
+ console.log('array',array);
|
|
|
+
|
|
|
+ // for (var i = 0; i < this.worksStudent.length; i++) {
|
|
|
+ // let works = JSON.parse(this.worksStudent[i].works)[0].answer;
|
|
|
+ // array.push({ name: works });
|
|
|
+ // }
|
|
|
+ // if (this.isGroup) {
|
|
|
+ // for (var i = 0; i < this.courseGroup.group.length; i++) {
|
|
|
+ // let works = this.courseGroup.group[i].works[toolindex];
|
|
|
+ // for (var j = 0; j < works.length; j++) {
|
|
|
+ // let answer = JSON.parse(works[j].works)[0].answer;
|
|
|
+ // array.push({ name: answer });
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
+ this.wordCloudData = array;
|
|
|
+ this.dialogVisibleWordCloud = true
|
|
|
+ },
|
|
|
+ StudentWork(val){
|
|
|
+ console.log('val',val);
|
|
|
+
|
|
|
+ // console.log('val',JSON.parse(val));
|
|
|
+ console.log('toolType',this.toolType);
|
|
|
+ // console.log('this.testData',this.testData);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ if (this.toolType == 41) {
|
|
|
+ this.testJson=val.works.split(',')
|
|
|
+ }else if(this.toolType == 52 ) {
|
|
|
+ return this.openTools(val)
|
|
|
+ }else if(this.toolType == 48) {
|
|
|
+ return this.openTools(val)
|
|
|
+ return this.openTools(JSON.parse(val))
|
|
|
+ }else if(this.toolType == 40){
|
|
|
+ this.testJson=JSON.parse(val.works)
|
|
|
+ }else{
|
|
|
+ this.testJson=JSON.parse(val.works)[0]
|
|
|
+ }
|
|
|
+
|
|
|
+ console.log('this.testJson',JSON.parse(JSON.stringify(this.testJson)));
|
|
|
+
|
|
|
+ this.showType = 0;
|
|
|
+ },
|
|
|
+ setData() {
|
|
|
if (this.show && this.toolIndex !== null) {
|
|
|
this.worksStudent = JSON.parse(
|
|
|
JSON.stringify(this.worksStudentData[this.toolIndex])
|
|
@@ -763,9 +845,9 @@ export default {
|
|
|
let _tempData = this.chapInfoListData[this.courseType].chapterInfo[0]
|
|
|
.taskJson[this.taskCount].toolChoose[this.toolIndex];
|
|
|
this.testData = _tempData ? _tempData : null;
|
|
|
- this.testJson = this.testData.testJson
|
|
|
- ? this.testData.testJson.testJson
|
|
|
- : null;
|
|
|
+ // this.testJson = this.testData.testJson
|
|
|
+ // ? this.testData.testJson.testJson
|
|
|
+ // : null;
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -776,7 +858,7 @@ export default {
|
|
|
},
|
|
|
init() {
|
|
|
this.data = null;
|
|
|
- this.showType = 0;
|
|
|
+ this.showType = 2;
|
|
|
this.showStatisticsType = 0;
|
|
|
this.testJson = null;
|
|
|
this.worksStudent = [];
|
|
@@ -790,6 +872,9 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
changeShowType(type) {
|
|
|
+ if (type == 1 && this.toolType == 15) {
|
|
|
+ this.openWordCloud()
|
|
|
+ }
|
|
|
this.showType = type;
|
|
|
this.$emit("changeSplitScreenBehavior",{code: 1,
|
|
|
form: {
|
|
@@ -799,6 +884,7 @@ export default {
|
|
|
type: this.showType,
|
|
|
showStatisticsType:this.showStatisticsType
|
|
|
}})
|
|
|
+
|
|
|
},
|
|
|
deleteWorks(wid) {
|
|
|
this.$emit("deleteWorks", wid);
|
|
@@ -1421,19 +1507,19 @@ export default {
|
|
|
}
|
|
|
|
|
|
.sm_left{
|
|
|
- width: calc(100% - 300px);
|
|
|
+ width: calc(100% - 350px);
|
|
|
height: 100%;
|
|
|
}
|
|
|
|
|
|
.sm_left>img{
|
|
|
- width: 100%;
|
|
|
+ width: 85%;
|
|
|
height: auto;
|
|
|
cursor: pointer;
|
|
|
border-radius: 2px;
|
|
|
}
|
|
|
|
|
|
.sm_right{
|
|
|
- width: 300px;
|
|
|
+ width: 350px;
|
|
|
min-height: 600px;
|
|
|
box-sizing: border-box;
|
|
|
padding: 10px;
|
|
@@ -1447,13 +1533,15 @@ export default {
|
|
|
margin-bottom: 20px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- justify-content: center;
|
|
|
+ /* justify-content: center; */
|
|
|
}
|
|
|
|
|
|
.sm_right_item>>>.el-select{
|
|
|
- width: 100%;
|
|
|
+ width: 200px;
|
|
|
+}
|
|
|
+.sm_right_item >>> .el-input__inner{
|
|
|
+ width: 200px;
|
|
|
}
|
|
|
-
|
|
|
.answerSelect>span{
|
|
|
font-size: 18px;
|
|
|
font-weight: bold;
|