Commit 6c98fe79 authored by zhengke's avatar zhengke

修改

parent e1618602
<style> <style>
.examPaper_Top { .examPaperInfo_Top {
width: 100%;
height: 83px; height: 83px;
border-bottom: 1px solid #d9d9d9; border-bottom: 1px solid #d9d9d9;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin: 0 100px;
} }
.Exam-main { .Exam-main {
width: 100%;
height: auto !important; height: auto !important;
overflow: hidden; overflow: hidden;
margin-top: 20px; margin: 20px 100px;
} }
.Exam-left { .Exam-left {
...@@ -221,12 +220,34 @@ ...@@ -221,12 +220,34 @@
color: #2961fe; color: #2961fe;
} }
.pGroupName {
color: #202020;
font-size: 16px;
}
.paper_Title p {
display: inline;
}
.pGNameDiv {
font-size: 12px;
margin-top: 20px;
}
.Exam-main .common_TiTable {
border-spacing: 0;
}
.examPaperInfo_Top .vClozeQuestion .clozeTest_question_tit {
margin: 15px 0;
}
</style> </style>
<template> <template>
<div class="examPaper page-body"> <div class="examPaper page-body">
<div class="examPaper_Top"> <div class="examPaperInfo_Top">
<div style="width:80%;display:flex;"> <div>
<div style="width:36%;margin-right:20px;"> <div>
{{DataObj.PaperName}} <br /> {{DataObj.PaperName}} <br />
创建人: &nbsp;&nbsp;&nbsp;题量:{{examNum}} &nbsp;&nbsp;&nbsp; 满分:{{examScore}} 创建人: &nbsp;&nbsp;&nbsp;题量:{{examNum}} &nbsp;&nbsp;&nbsp; 满分:{{examScore}}
<q-checkbox size="xs" v-model="isShowAnswer" label="显示答案" /> <q-checkbox size="xs" v-model="isShowAnswer" label="显示答案" />
...@@ -239,14 +260,14 @@ ...@@ -239,14 +260,14 @@
<div class="Exam-main"> <div class="Exam-main">
<template v-if="DataObj&&DataObj.GroupList&&DataObj.GroupList.length>0"> <template v-if="DataObj&&DataObj.GroupList&&DataObj.GroupList.length>0">
<div v-for="(gItem,gIndex) in DataObj.GroupList" :key="gIndex"> <div v-for="(gItem,gIndex) in DataObj.GroupList" :key="gIndex">
<span>{{gIndex+1}}{{gItem.GroupName}} (共 {{gItem.DetailsList.length}} 题,{{gItem.GScore}}分)</span> <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"> <div v-for="(dItem,dIndex) in gItem.DetailsList" :key="dIndex">
<span>{{dIndex+1}}</span> <span>{{dIndex+1}}</span>
<span v-html="dItem.Title"></span> <span class="paper_Title" v-html="dItem.Title"></span>
<span> <span style="margin:10px 0;display:inline-block;">
({{dItem.Score}}分) ({{dItem.Score}}分)
</span> </span>
<br />
<!--单选题--> <!--单选题-->
<v-single v-if="dItem.QuestionTypeKey=='single'||dItem.QuestionTypeKey=='single-number'" <v-single v-if="dItem.QuestionTypeKey=='single'||dItem.QuestionTypeKey=='single-number'"
:questionObj="dItem" :isShowAnswer="isShowAnswer"> :questionObj="dItem" :isShowAnswer="isShowAnswer">
...@@ -362,6 +383,35 @@ ...@@ -362,6 +383,35 @@
} }
}, },
methods: { methods: {
NoToChinese(str) {
str = str + '';
var len = str.length - 1;
var idxs = ['', '十', '百', '千', '万', '十', '百', '千', '亿', '十', '百', '千', '万', '十', '百', '千', '亿'];
var num = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
return str.replace(/([1-9]|0+)/g, function ($, $1, idx, full) {
var pos = 0;
if ($1[0] != '0') {
pos = len - idx;
if (idx == 0 && $1[0] == 1 && idxs[len - idx] == '十') {
return idxs[len - idx];
}
return num[$1[0]] + idxs[len - idx];
} else {
var left = len - idx;
var right = len - idx + $1.length;
if (Math.floor(right / 4) - Math.floor(left / 4) > 0) {
pos = left - left % 4;
}
if (pos) {
return idxs[pos] + num[$1[0]];
} else if (idx + $1.length >= len) {
return '';
} else {
return num[$1[0]]
}
}
});
},
//获取试卷详情 //获取试卷详情
GetPaperInfo() { GetPaperInfo() {
GetPaper(this.msg).then(res => { GetPaper(this.msg).then(res => {
......
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