Commit 5f80d60efe8639faf5e72cd8c0ccf32fa034c58c

Authored by 梁保满
1 parent 049db2b2

备题试卷模版

public/1.html deleted
1 -<html xmlns="http://www.w3.org/1998/Math/MathML">  
2 - <head>  
3 - <meta charset="UTF-8"/>  
4 - <title>MathML示例</title>  
5 - <style>  
6 - math {  
7 - size: 14px;  
8 -}  
9 - </style>  
10 -<script id="MathJax-script" async src="tex-mml-chtml.js"></script>  
11 -<script>  
12 -MathJax = {  
13 - tex: {  
14 - inlineMath: [['$', '$']]  
15 - }  
16 -};  
17 -</script>  
18 - </head>  
19 - <body>  
20 - <p>一、我是题干我是题干我是题干我是题干我是题干我是题干我是题干</p>  
21 - <p>A.  
22 -<math xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mfrac><mrow><mn>1</mn></mrow><mrow><mn>2</mn></mrow></mfrac><msup><mrow><mo>)</mo></mrow><mrow><mo>-</mo><mn>1</mn></mrow></msup><mo>+</mo><mn>3</mn><mi>t</mi><mi>a</mi><mi>n</mi><mn>30</mn><mo>°</mo><mo>-</mo><mo>(</mo><msqrt><mn>3</mn></msqrt><mo>-</mo><mi>π</mi><msup><mrow><mo>)</mo></mrow><mrow><mn>0</mn></mrow></msup><mo>-</mo><mroot><mrow><mn>8</mn></mrow><mrow><mn>3</mn></mrow></mroot></math>  
23 - </p>  
24 - <p>B. 2$a$<sup>2</sup>  
25 -<math xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:mml="http://www.w3.org/1998/Math/MathML">  
26 - <mfenced open="{" close="">  
27 - <mrow>  
28 - <mtable columnalign="left">  
29 - <mtr>  
30 - <mtd>  
31 - <mn>4</mn>  
32 - <mi>x</mi>  
33 - <mo>-</mo>  
34 - <mn>6</mn>  
35 - <mo><</mo>  
36 - <mn>5</mn>  
37 - <mo>(</mo>  
38 - <mi>x</mi>  
39 - <mo>-</mo>  
40 - <mn>1</mn>  
41 - <mo>)</mo>  
42 - <mo>①</mo>  
43 - </mtd>  
44 - </mtr>  
45 - <mtr>  
46 - <mtd>  
47 - <mfrac>  
48 - <mrow>  
49 - <mi>x</mi>  
50 - </mrow>  
51 - <mrow>  
52 - <mn>3</mn>  
53 - </mrow>  
54 - </mfrac>  
55 - <mo><</mo>  
56 - <mn>2</mn>  
57 - <mo>-</mo>  
58 - <mfrac>  
59 - <mrow>  
60 - <mi>x</mi>  
61 - <mo>-</mo>  
62 - <mn>2</mn>  
63 - </mrow>  
64 - <mrow>  
65 - <mn>6</mn>  
66 - </mrow>  
67 - </mfrac>  
68 - <mi>②</mi>  
69 - </mtd>  
70 - </mtr>  
71 - </mtable>  
72 - </mrow>  
73 - </mfenced>  
74 -</math>  
75 - </p>  
76 - <p>  
77 - C. <math xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mi>y</mi><mo>=</mo><mfrac><mrow><mn>2</mn></mrow><mrow><mi>x</mi></mrow></mfrac></math>  
78 - </p>  
79 - </body>  
80 -</html>  
81 \ No newline at end of file 0 \ No newline at end of file
public/static/试卷模板.docx 0 → 100644
No preview for this file type
src/components/charts/radarChart.vue
@@ -41,7 +41,9 @@ export default { @@ -41,7 +41,9 @@ export default {
41 let marker = param.marker 41 let marker = param.marker
42 let oHtml = `<p>${marker}${param.name}</p>` 42 let oHtml = `<p>${marker}${param.name}</p>`
43 param.value.map((item, index) => { 43 param.value.map((item, index) => {
44 - oHtml += `<p>${that.params.indicator[index].name}:${item}</p>` 44 + if (that.params.indicator[index].name) {
  45 + oHtml += `<p>${that.params.indicator[index].name}:${item}</p>`
  46 + }
45 }) 47 })
46 return oHtml 48 return oHtml
47 } 49 }
@@ -57,8 +59,8 @@ export default { @@ -57,8 +59,8 @@ export default {
57 radar: { 59 radar: {
58 indicator: [...that.params.indicator], 60 indicator: [...that.params.indicator],
59 splitNumber: 5, 61 splitNumber: 5,
60 - center: ['50%', '65%'],  
61 - radius: "90%", 62 + center: ['50%', '55%'],
  63 + radius: "80%",
62 shape: "polygon", 64 shape: "polygon",
63 nameGap: 6, 65 nameGap: 6,
64 axisLine: { 66 axisLine: {
src/views/basic/ask/components/answerQustion.vue
@@ -174,23 +174,7 @@ export default { @@ -174,23 +174,7 @@ export default {
174 return resultData 174 return resultData
175 } 175 }
176 }, 176 },
177 - created() {RadarChart  
178 - if (this.types == 3) {  
179 - this.chartData = {  
180 - indicator: [  
181 - {  
182 - name: '', max: 100,  
183 - axisLabel: {  
184 - show: true,  
185 - showMaxLabel: true,  
186 - formatter: '{value}%'  
187 - },  
188 - },  
189 - ],  
190 - seriesData: []  
191 - }  
192 - }  
193 - }, 177 + created() { },
194 methods: { 178 methods: {
195 setDuration(times) { 179 setDuration(times) {
196 if (times) { 180 if (times) {
@@ -219,7 +203,8 @@ export default { @@ -219,7 +203,8 @@ export default {
219 let participationRate = [] 203 let participationRate = []
220 let correctRate = [] 204 let correctRate = []
221 let answerCorrectRate = [] 205 let answerCorrectRate = []
222 - this.xAxis = obj.dataList.map(item => { 206 + let dataList = obj.dataList
  207 + this.xAxis = dataList.map(item => {
223 participationRate.push(item.participationRate) 208 participationRate.push(item.participationRate)
224 correctRate.push(item.correctRate) 209 correctRate.push(item.correctRate)
225 answerCorrectRate.push(item.answerCorrectRate) 210 answerCorrectRate.push(item.answerCorrectRate)
@@ -242,8 +227,22 @@ export default { @@ -242,8 +227,22 @@ export default {
242 227
243 }, 228 },
244 openRandarChart(obj) { 229 openRandarChart(obj) {
  230 + this.chartData = {
  231 + indicator: [
  232 + {
  233 + name: '', max: 100,
  234 + axisLabel: {
  235 + show: true,
  236 + showMaxLabel: true,
  237 + formatter: '{value}%'
  238 + },
  239 + },
  240 + ],
  241 + seriesData: []
  242 + }
245 this.chartTitle = obj.studentName + '-多科-多课时作答表现图' 243 this.chartTitle = obj.studentName + '-多科-多课时作答表现图'
246 - let subjectList = obj.dataList.map(item => item.subjectName) 244 + let dataList = obj.dataList.slice(1, obj.dataList.length)
  245 + let subjectList = dataList.map(item => item.subjectName)
247 subjectList.map((item, index) => { 246 subjectList.map((item, index) => {
248 if (index < 1) { 247 if (index < 1) {
249 this.chartData.indicator[index].name = item 248 this.chartData.indicator[index].name = item
@@ -260,13 +259,15 @@ export default { @@ -260,13 +259,15 @@ export default {
260 } 259 }
261 } 260 }
262 } 261 }
  262 + let participationRate = dataList.map(item => item.participationRate)
  263 + let correctRate = dataList.map(item => item.correctRate)
263 this.chartData.seriesData = [ 264 this.chartData.seriesData = [
264 { 265 {
265 - value: obj.dataList.map(item => item.participationRate), 266 + value: participationRate,
266 name: '参与度' 267 name: '参与度'
267 }, 268 },
268 { 269 {
269 - value: obj.dataList.map(item => item.correctRate), 270 + value: correctRate,
270 name: '正确率' 271 name: '正确率'
271 }, 272 },
272 ] 273 ]
src/views/basic/test/components/multipleSubTest.vue
@@ -138,7 +138,8 @@ export default { @@ -138,7 +138,8 @@ export default {
138 138
139 this.chartTitle = obj.studentName + '-多科-多课时作答表现图' 139 this.chartTitle = obj.studentName + '-多科-多课时作答表现图'
140 let max = 0; 140 let max = 0;
141 - let subjectList = obj.dataList.map(item => { 141 + const dataList = obj.dataList.slice(1, obj.dataList.length)
  142 + let subjectList = dataList.map(item => {
142 let score = Number(item.highestScore || item.score) 143 let score = Number(item.highestScore || item.score)
143 max = score > max ? score : max 144 max = score > max ? score : max
144 return item.subjectName 145 return item.subjectName
@@ -176,15 +177,15 @@ export default { @@ -176,15 +177,15 @@ export default {
176 } 177 }
177 this.chartData.seriesData = [ 178 this.chartData.seriesData = [
178 { 179 {
179 - value: obj.dataList.map(item => item.highestScore), 180 + value: dataList.map(item => item.highestScore),
180 name: '班级最高分' 181 name: '班级最高分'
181 }, 182 },
182 { 183 {
183 - value: obj.dataList.map(item => item.avgScore), 184 + value: dataList.map(item => item.avgScore),
184 name: '班平均分' 185 name: '班平均分'
185 }, 186 },
186 { 187 {
187 - value: obj.dataList.map(item => item.score), 188 + value: dataList.map(item => item.score),
188 name: '本人得分' 189 name: '本人得分'
189 }, 190 },
190 ] 191 ]
src/views/basic/test/components/multipleTest.vue
@@ -122,7 +122,8 @@ export default { @@ -122,7 +122,8 @@ export default {
122 let score = [] 122 let score = []
123 let classRank = [] 123 let classRank = []
124 let avgScore = [] 124 let avgScore = []
125 - this.xAxis = obj.examList.map(item => { 125 + const examList = obj.examList.slice(1,obj.examList.length)
  126 + this.xAxis = examList.map(item => {
126 score.push(item.score) 127 score.push(item.score)
127 classRank.push(item.classRank) 128 classRank.push(item.classRank)
128 avgScore.push(item.avgScore) 129 avgScore.push(item.avgScore)
src/views/examinationPaper/index.vue
@@ -147,6 +147,7 @@ @@ -147,6 +147,7 @@
147 147
148 <script> 148 <script>
149 import { downloadFile } from "@/utils"; 149 import { downloadFile } from "@/utils";
  150 +import axios from "axios";
150 export default { 151 export default {
151 name: "examinationPaper", 152 name: "examinationPaper",
152 data() { 153 data() {
@@ -463,15 +464,14 @@ export default { @@ -463,15 +464,14 @@ export default {
463 464
464 465
465 async downExcel() { 466 async downExcel() {
466 - let data = await this.$request.teacherTemplate();  
467 - if (data && !data.code) {  
468 - let blob = new Blob([data], {  
469 - type: "application/vnd.ms-excel;charset=utf-8", 467 + axios("static/试卷模板.docx", {
  468 + responseType: "arraybuffer"
  469 + }).then(res => {
  470 + let blob = new Blob([res.data], {
  471 + type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
470 }); 472 });
471 - downloadFile(`试卷模版.xlsx`, blob);  
472 - } else {  
473 - this.$message.error(data.info);  
474 - } 473 + downloadFile("试卷模板.docx", blob);
  474 + })
475 }, 475 },
476 }, 476 },
477 }; 477 };