Commit b2575784 authored by Mac's avatar Mac
parents 7ecbc612 32e4fab1
......@@ -2,12 +2,6 @@
.examForm .q-table__bottom {
min-height: 10px;
}
.greenStyle{
color:green;
}
.color_shz{color: #1273BC}
.color_tg{color: #4BCA81}
.color_bh{color: #c94052}
</style>
<template>
......@@ -28,9 +22,9 @@
</template>
</div>
<div>
<q-btn v-if="multipleSelection&&multipleSelection.length>0&&IsMovePaper" color="accent" size="sm" class="q-mr-md"
<q-btn v-if="multipleSelection&&multipleSelection.length>0" color="accent" size="sm" class="q-mr-md"
@click="movePaperFile()" label="移动到" />
<q-btn v-if="multipleSelection&&multipleSelection.length>0&&IsDelPaper" color="accent" size="sm" class="q-mr-md"
<q-btn v-if="multipleSelection&&multipleSelection.length>0" color="accent" size="sm" class="q-mr-md"
label="删除" @click="batchDelete()" />
</div>
</div>
......@@ -106,20 +100,14 @@
</template>
<template v-slot:body-cell-ExamineStatusStr="props">
<q-td :props="props">
<template v-if="props.row.ExamineStatus==4||props.row.ExamineStatus==3">
<el-popover
placement="bottom"
title="驳回原因"
width="350"
trigger="hover"
:content='props.row.ExamineRemark'>
<span slot="reference" class="color_bh">{{props.row.ExamineStatusStr}}</span>
</el-popover>
</template>
<template v-else>
<span :class="{'color_tg':props.row.ExamineStatus==2||props.row.ExamineStatus==5,
'color_bh':props.row.ExamineStatus==6}">{{props.row.ExamineStatusStr}}</span>
</template>
<el-popover
placement="bottom"
title="驳回原因"
width="350"
trigger="hover"
:content='props.row.ExamineRemark'>
<span slot="reference">{{props.row.ExamineStatusStr}}</span>
</el-popover>
</q-td>
</template>
<template v-slot:body-cell-PaperType="props">
......@@ -130,7 +118,7 @@
</template>
<template v-if="props.row.PaperType==2">
<q-btn flat size="xs" color="primary" style="font-weight:400" @click="goExameEdit(props.row)" label="编辑"
/>
v-if="currentUserInfo.Id==props.row.CreateBy &&(props.row.ExamineStatus==0||props.row.ExamineStatus==3||props.row.ExamineStatus==4)" />
</template>
<q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left: 10px">
<q-list>
......@@ -238,8 +226,6 @@
MoveIds: '',
currentUserInfo: {}, //当前登录用户
IsPaperManager: false,
IsMovePaper: false, //是否可以移动文件
IsDelPaper: false, //是否删除试卷
pageMsg: {
rowsPerPage: 10,
},
......@@ -303,12 +289,6 @@
if (x.FunctionCode == "Paper_Manager") { //判断是否是试卷管理员
this.IsPaperManager = true;
}
if (x.FunctionCode == "Paper_Move"){ //判断是否有移动文件权限
this.IsMovePaper = true;
}
if (x.FunctionCode == "Paper_Delete"){ //判断是否有删除文件夹权限
this.IsDelPaper = true;
}
})
},
mounted() {},
......
......@@ -16,6 +16,7 @@
display: flex;
justify-content: space-between;
align-items: center;
margin-top:10px;
}
.v_readingComprehensioQuestion .clozeTest_question_tit i {
......@@ -44,7 +45,7 @@
<tbody>
<tr>
<td colspan="3">
<div v-html="item.SubTitle"></div>
<div style="margin:16px 0;" v-html="item.SubTitle"></div>
</td>
</tr>
<!--选择题-->
......
......@@ -11,9 +11,17 @@
<tbody v-for="(item,index) in data.QuestionContentObj" :key="index">
<tr>
<td style="width:40px;text-align:center;">
<div class="Answer_List2">
{{item.Name}}
</div>
<template v-if="isOperate">
<div class="Answer_List2" style="cursor:pointer;" @click="ChangeItem(item)"
:class="{'Is_Answer':item.IsAnswer}">
{{item.Name}}
</div>
</template>
<template v-else>
<div class="Answer_List2">
{{item.Name}}
</div>
</template>
</td>
<td>
<div class="InpDIV" style="border:0;" v-html="item.Content"></div>
......@@ -41,7 +49,12 @@
isShowAnswer: {
type: Boolean,
default: false,
}
},
//是否可操作(PC端考试使用)
isOperate: {
type: Boolean,
default: false,
},
},
data() {
return {
......@@ -51,7 +64,17 @@
mounted() {},
methods: {
ChangeItem(item) {
if (this.data.QuestionContentObj && this.data.QuestionContentObj.length > 0) {
this.data.QuestionContentObj.forEach(item => {
item.IsAnswer = false;
})
}
item.IsAnswer = true;
this.data.Answer = item.Name;
console.log("this.data",this.data);
},
},
watch: {
isShowAnswer: {
......
......@@ -49,7 +49,7 @@
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<q-btn flat color="primary" size="xs" style="font-weight:400;display:none;" class="q-mr-md" label="学员考试"
<q-btn flat color="primary" size="xs" style="font-weight:400;" class="q-mr-md" label="学员考试"
@click="gotoExamTest(props.row)" />
</q-td>
</template>
......
......@@ -249,8 +249,8 @@
<div>
<div>
{{DataObj.PaperName}} <br />
创建人:{{DataObj.CreateByName}} &nbsp;&nbsp;&nbsp;题量:{{examNum}} &nbsp;&nbsp;&nbsp; 满分:{{examScore}}
<q-checkbox size="xs" v-model="isShowAnswer" label="显示答案" />
题量:{{examNum}} &nbsp;&nbsp;&nbsp; 满分:{{examScore}}
</div>
</div>
<div style="width:20%;text-align:right;">
......@@ -270,7 +270,7 @@
</span>
<!--单选题-->
<v-single v-if="dItem.QuestionTypeKey=='single'||dItem.QuestionTypeKey=='single-number'"
:questionObj="dItem" :isShowAnswer="isShowAnswer">
:questionObj="dItem" :isShowAnswer="isShowAnswer" :isOperate="isOperate">
</v-single>
<!--多选题-->
<v-multiple v-if="dItem.QuestionTypeKey=='multiple'" :questionObj="dItem" :isShowAnswer="isShowAnswer">
......@@ -328,7 +328,7 @@
import vReadingcomprehensio from '../../components/questiontype/v-readingcomprehensio'
import vSharingchoose from '../../components/questiontype/v-sharingchoose'
import {
GetPaperDetails,
queryPaperDetails,
} from '../../api/teacher/index';
export default {
components: {
......@@ -361,16 +361,11 @@
DataObj: {
PaperId: 0, //试卷编号
PaperName: '', //试卷名称
QuestionBandIds: "", //关联题库编号
DifficultyType: 1, //试卷难易程度
GenerateType: 2, //组卷类型(1-智能组卷,2-手动组卷,3-智能导入)
CreateNum: 1, //生成试卷套数
PaperType: 2, //试卷类型(1-文件夹,2-试卷)
ParentId: 0, //父节点编号,
GroupList: [], //试卷答题分类
CreateByName: "", //创建人
},
PaperConfig: {}, //试卷配置
isShowAnswer: false, //是否显示答案
isOperate:true,//是否可操作
examScore: 0, //总分,
examNum: 0, //总题量
}
......@@ -379,7 +374,7 @@
},
mounted() {
this.GetPaperDetails()
this.GetPaperInfo()
},
methods: {
NoToChinese(str) {
......@@ -413,22 +408,16 @@
},
//获取试卷详情
GetPaperInfo() {
GetPaper(this.msg).then(res => {
queryPaperDetails(this.msg).then(res => {
var tempData = res.Data;
console.log("tempData",tempData);
console.log("tempData", tempData);
if (res.Code == 1) {
this.DataObj.PaperId = tempData.PaperId;
this.DataObj.PaperName = tempData.PaperName;
this.DataObj.QuestionBandIds = tempData.QuestionBandIds;
this.DataObj.DifficultyType = tempData.DifficultyType;
this.DataObj.GenerateType = tempData.GenerateType;
this.DataObj.CreateNum = tempData.CreateNum;
this.DataObj.PaperType = tempData.PaperType;
this.DataObj.ParentId = tempData.ParentId;
this.DataObj.CreateByName = tempData.CreateByName;
if (tempData.GroupList && tempData.GroupList.length > 0) {
this.DataObj.GroupList = tempData.GroupList;
this.DataObj.PaperId = tempData.Paper.PaperId;
this.DataObj.PaperName = tempData.Paper.PaperName;
if (tempData.Paper.GroupList && tempData.Paper.GroupList.length > 0) {
this.DataObj.GroupList = tempData.Paper.GroupList;
}
this.PaperConfig = tempData.Publish;
this.calcPaper();
}
})
......
......@@ -11,7 +11,7 @@
.Exam-main {
height: auto !important;
overflow: hidden;
margin: 20px 100px;
margin: 0 100px;
}
.Exam-left {
......@@ -263,11 +263,13 @@
<div class="pGNameDiv"><span class="pGroupName">{{NoToChinese(gIndex+1)}}{{gItem.GroupName}}</span> (共
{{gItem.DetailsList.length}} 题,{{gItem.GScore}}分)</div>
<div v-for="(dItem,dIndex) in gItem.DetailsList" :key="dIndex">
<span>{{dIndex+1}}</span>
<span class="paper_Title" v-html="dItem.Title"></span>
<span style="margin:10px 0;display:inline-block;">
({{dItem.Score}}分)
</span>
<div style="display:flex;align-items:top;margin:20px 0;">
<span>{{dIndex+1}}</span>
<span class="paper_Title" v-html="dItem.Title"></span>
<span style="display:inline-block;min-width:40px;">
({{dItem.Score}}分)
</span>
</div>
<!--单选题-->
<v-single v-if="dItem.QuestionTypeKey=='single'||dItem.QuestionTypeKey=='single-number'"
:questionObj="dItem" :isShowAnswer="isShowAnswer">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment