Commit ef16e57e44cc35452a97631094f164e361015342
1 parent
6bca489d
fix:前端版本迭代
Showing
46 changed files
with
2297 additions
and
1781 deletions
public/static/课件模板.docx
No preview for this file type
src/App.vue
| @@ -13,88 +13,84 @@ export default { | @@ -13,88 +13,84 @@ export default { | ||
| 13 | mounted() { | 13 | mounted() { |
| 14 | 14 | ||
| 15 | }, | 15 | }, |
| 16 | - created() { | ||
| 17 | - this.$nextTick(() => { | 16 | + methods: { |
| 17 | + _reSize() { | ||
| 18 | + | ||
| 18 | const $app = this.$refs.app; | 19 | const $app = this.$refs.app; |
| 19 | - // 设置 屏幕 百分比 尺寸 适配 | ||
| 20 | - const standardScale = "100%" / "100%"; | ||
| 21 | - window.addEventListener( | ||
| 22 | - "resize", | ||
| 23 | - _.debounce(function () { | ||
| 24 | 20 | ||
| 25 | - const docHeight = document.body.clientHeight; | 21 | + const standardScale = "100%" / "100%"; |
| 26 | 22 | ||
| 27 | - const docWidth = document.body.clientWidth; | 23 | + const docHeight = document.body.clientHeight; |
| 28 | 24 | ||
| 29 | - if (docWidth < 1700) { | 25 | + const docWidth = document.body.clientWidth; |
| 26 | + | ||
| 27 | + if (docWidth < 1700) { | ||
| 28 | + const currentScale = docHeight / docWidth; | ||
| 30 | 29 | ||
| 31 | - const currentScale = docHeight / docWidth; | 30 | + let [scale, translate] = [0, 0]; |
| 31 | + if (currentScale < standardScale) { | ||
| 32 | + // 以高度计算 | ||
| 33 | + scale = docHeight / 1080; | ||
| 32 | 34 | ||
| 33 | - let [scale, translate] = [0, 0]; | 35 | + const shouleWidth = 1920 * scale; |
| 34 | 36 | ||
| 35 | - if (currentScale < standardScale) { | ||
| 36 | - // 以高度计算 | ||
| 37 | - scale = docHeight / 1080; | 37 | + const offsetWidth = docWidth - shouleWidth; |
| 38 | 38 | ||
| 39 | - const shouleWidth = 1920 * scale; | 39 | + translate = |
| 40 | + offsetWidth > 0 ? `translate(${offsetWidth / 2}px, 0)` : ""; | ||
| 40 | 41 | ||
| 41 | - const offsetWidth = docWidth - shouleWidth; | 42 | + } else { |
| 43 | + // 以宽度计算 | ||
| 44 | + scale = docWidth / 1920; | ||
| 42 | 45 | ||
| 43 | - translate = | ||
| 44 | - offsetWidth > 0 ? `translate(${offsetWidth / 2}px, 0)` : ""; | ||
| 45 | - | ||
| 46 | - } else { | ||
| 47 | - // 以宽度计算 | ||
| 48 | - scale = docWidth / 1920; | 46 | + const shouleHeight = 1080 * scale; |
| 49 | 47 | ||
| 50 | - const shouleHeight = 1080 * scale; | 48 | + const offsetHeight = docHeight - shouleHeight; |
| 51 | 49 | ||
| 52 | - const offsetHeight = docHeight - shouleHeight; | 50 | + translate = |
| 51 | + offsetHeight > 0 ? `translate(0, ${offsetHeight / 2}px)` : ""; | ||
| 52 | + } | ||
| 53 | 53 | ||
| 54 | - translate = | ||
| 55 | - offsetHeight > 0 ? `translate(0, ${offsetHeight / 2}px)` : ""; | ||
| 56 | - } | ||
| 57 | - | ||
| 58 | - if (docHeight <= 700) { | 54 | + if (docHeight <= 700) { |
| 59 | 55 | ||
| 60 | - $app.style.cssText = ` | 56 | + $app.style.cssText = ` |
| 61 | transform: scale(${scale}) ${translate}; | 57 | transform: scale(${scale}) ${translate}; |
| 62 | transform-origin: top left; | 58 | transform-origin: top left; |
| 63 | min-width: 1920px; | 59 | min-width: 1920px; |
| 64 | - min-height: 850px; | ||
| 65 | - `; | ||
| 66 | - } | ||
| 67 | - else if (docHeight <= 750) { | ||
| 68 | - | ||
| 69 | - $app.style.cssText = ` | 60 | + min-height: 885px; |
| 61 | + `; | ||
| 62 | + } | ||
| 63 | + else if (docHeight <= 780) { | ||
| 64 | + | ||
| 65 | + $app.style.cssText = ` | ||
| 70 | transform: scale(${scale}) ${translate}; | 66 | transform: scale(${scale}) ${translate}; |
| 71 | transform-origin: top left; | 67 | transform-origin: top left; |
| 72 | min-width: 1920px; | 68 | min-width: 1920px; |
| 73 | - min-height:920px; | ||
| 74 | - `; | ||
| 75 | - } | ||
| 76 | - else { | ||
| 77 | - $app.style.cssText = ` | 69 | + min-height:910px; |
| 70 | + `; | ||
| 71 | + } | ||
| 72 | + else { | ||
| 73 | + $app.style.cssText = ` | ||
| 78 | transform: scale(${scale}) ${translate}; | 74 | transform: scale(${scale}) ${translate}; |
| 79 | transform-origin: top left; | 75 | transform-origin: top left; |
| 80 | min-width: 1920px; | 76 | min-width: 1920px; |
| 81 | - min-height:1080px; | ||
| 82 | - `; | ||
| 83 | - } | 77 | + min-height:1045px; |
| 78 | + `; | ||
| 79 | + } | ||
| 84 | 80 | ||
| 85 | - } else { | ||
| 86 | - $app.style.cssText = ''; | ||
| 87 | - } | ||
| 88 | - }), | ||
| 89 | - 300 | ||
| 90 | - ); | 81 | + } else { |
| 82 | + $app.style.cssText = ''; | ||
| 83 | + } | ||
| 84 | + }, | ||
| 85 | + }, | ||
| 86 | + created() { | ||
| 87 | + let that = this; | ||
| 91 | 88 | ||
| 89 | + this.$nextTick(() => { | ||
| 92 | if (document.createEvent) { | 90 | if (document.createEvent) { |
| 93 | - var event = document.createEvent("HTMLEvents"); | ||
| 94 | - event.initEvent("resize", true, true); | ||
| 95 | - window.dispatchEvent(event); | 91 | + that._reSize(); |
| 96 | } else if (document.createEventObject) { | 92 | } else if (document.createEventObject) { |
| 97 | - window.fireEvent("onresize"); | 93 | + that._reSize(); |
| 98 | } | 94 | } |
| 99 | }); | 95 | }); |
| 100 | } | 96 | } |
| @@ -106,7 +102,7 @@ export default { | @@ -106,7 +102,7 @@ export default { | ||
| 106 | body { | 102 | body { |
| 107 | margin: 0px; | 103 | margin: 0px; |
| 108 | padding: 0px; | 104 | padding: 0px; |
| 109 | - font-family: Microsoft YaHei, Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, SimSun, sans-serif; | 105 | + font-family: Microsoft YaHei, Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, SimSun, sans-serif; |
| 110 | -webkit-font-smoothing: antialiased; | 106 | -webkit-font-smoothing: antialiased; |
| 111 | } | 107 | } |
| 112 | 108 |
src/api/apis/apis.js
| @@ -23,12 +23,22 @@ const downService = (url, data) => { | @@ -23,12 +23,22 @@ const downService = (url, data) => { | ||
| 23 | responseType: 'arraybuffer', | 23 | responseType: 'arraybuffer', |
| 24 | }); | 24 | }); |
| 25 | } | 25 | } |
| 26 | -export default { | 26 | +export default { |
| 27 | // 知识点 | 27 | // 知识点 |
| 28 | gKnowledge(section, subject) { | 28 | gKnowledge(section, subject) { |
| 29 | - return defaltService(setUpUrls.gtestExamReport, { | ||
| 30 | - ...subject, ...section | ||
| 31 | - }) | 29 | + var requestParams = []; |
| 30 | + if (section) { | ||
| 31 | + requestParams.push("section=" + section); | ||
| 32 | + } | ||
| 33 | + if (subject) { | ||
| 34 | + requestParams.push("subject=" + subject); | ||
| 35 | + } | ||
| 36 | + var requestUrl = setUpUrls.gKnowledge + (requestParams.length >= 1 ? "?" + requestParams.join("&") : ""); | ||
| 37 | + return defaltGetService(requestUrl) | ||
| 38 | + }, | ||
| 39 | + // 年级组长-成绩概要 | ||
| 40 | + gclassdiffReport(data) { | ||
| 41 | + return defaltService(setUpUrls.gclassdiffReport, data) | ||
| 32 | }, | 42 | }, |
| 33 | // 年级组长-成绩测验单 | 43 | // 年级组长-成绩测验单 |
| 34 | gTestExamReport(data) { | 44 | gTestExamReport(data) { |
| @@ -213,6 +223,9 @@ export default { | @@ -213,6 +223,9 @@ export default { | ||
| 213 | periodReportList(data) { | 223 | periodReportList(data) { |
| 214 | return defaltService(setUpUrls.periodReportList, data) | 224 | return defaltService(setUpUrls.periodReportList, data) |
| 215 | }, | 225 | }, |
| 226 | + classdiffreport(data) { | ||
| 227 | + return defaltService(setUpUrls.classdiffreport, data) | ||
| 228 | + }, | ||
| 216 | //任课老师-查询阶段问答报表 | 229 | //任课老师-查询阶段问答报表 |
| 217 | phaseAnswerReport(data) { | 230 | phaseAnswerReport(data) { |
| 218 | return defaltService(setUpUrls.phaseAnswerReport, data) | 231 | return defaltService(setUpUrls.phaseAnswerReport, data) |
| @@ -680,6 +693,9 @@ export default { | @@ -680,6 +693,9 @@ export default { | ||
| 680 | pModifyPaper(data) { | 693 | pModifyPaper(data) { |
| 681 | return defaltService(setUpUrls.pModifyPaper, data) | 694 | return defaltService(setUpUrls.pModifyPaper, data) |
| 682 | }, | 695 | }, |
| 696 | + pModifyPaperNew(data) { | ||
| 697 | + return defaltService(setUpUrls.pModifyPaperNew, data) | ||
| 698 | + }, | ||
| 683 | // 删除答题卡 | 699 | // 删除答题卡 |
| 684 | pDelPaper(data) { | 700 | pDelPaper(data) { |
| 685 | return defaltService(setUpUrls.pDelPaper, data) | 701 | return defaltService(setUpUrls.pDelPaper, data) |
src/api/axios.js
| @@ -3,7 +3,7 @@ import NProgress from "nprogress"; | @@ -3,7 +3,7 @@ import NProgress from "nprogress"; | ||
| 3 | import { Message } from "element-ui"; | 3 | import { Message } from "element-ui"; |
| 4 | import router from "@/router/index"; | 4 | import router from "@/router/index"; |
| 5 | import store from "@/store"; | 5 | import store from "@/store"; |
| 6 | -import conf from "../config/index"; // 路径配置 | 6 | +import conf from "@/config/index"; // 路径配置 |
| 7 | import { getURLParams } from "@/utils"; | 7 | import { getURLParams } from "@/utils"; |
| 8 | 8 | ||
| 9 | let code = getURLParams("code") || getURLParams("dockkey") || localStorage.getItem("csCode") || ""; | 9 | let code = getURLParams("code") || getURLParams("dockkey") || localStorage.getItem("csCode") || ""; |
src/api/urls/apis.js
| 1 | 1 | ||
| 2 | export default { | 2 | export default { |
| 3 | - // 年级组长-查询报表列表 | ||
| 4 | - gKnowledge: "/api_html/knowledge/list", | 3 | + // 年级组长-查询报表列表 |
| 4 | + gKnowledge: "/knowledge/list", | ||
| 5 | // 年级组长-查询报表列表 | 5 | // 年级组长-查询报表列表 |
| 6 | gListExamReport: "/api_html/grade/manager/listExamReport", | 6 | gListExamReport: "/api_html/grade/manager/listExamReport", |
| 7 | // 年级组长-查询管理的班级 | 7 | // 年级组长-查询管理的班级 |
| @@ -17,6 +17,8 @@ export default { | @@ -17,6 +17,8 @@ export default { | ||
| 17 | gExportPhaseInteractiveReport: "/api_html/grade/manager/exportPhaseInteractiveReport", | 17 | gExportPhaseInteractiveReport: "/api_html/grade/manager/exportPhaseInteractiveReport", |
| 18 | // 年级组长-成绩测验单 | 18 | // 年级组长-成绩测验单 |
| 19 | gtestExamReport: "/api_html/grade/manager/testExamReport", | 19 | gtestExamReport: "/api_html/grade/manager/testExamReport", |
| 20 | + // 年级组长-考试概要 | ||
| 21 | + gclassdiffReport: "/api_html/grade/manager/classdiffreport", | ||
| 20 | // 年级组长-试题分析 | 22 | // 年级组长-试题分析 |
| 21 | gpaperExamReport: "/api_html/grade/manager/paperExamReport", | 23 | gpaperExamReport: "/api_html/grade/manager/paperExamReport", |
| 22 | // 年级组长-学生成绩排行 | 24 | // 年级组长-学生成绩排行 |
| @@ -62,13 +64,15 @@ export default { | @@ -62,13 +64,15 @@ export default { | ||
| 62 | 64 | ||
| 63 | //任课老师-查询管理班级 | 65 | //任课老师-查询管理班级 |
| 64 | tClassList: "/api_html/teaching/classList", | 66 | tClassList: "/api_html/teaching/classList", |
| 67 | + //任老师-报表详情 | ||
| 68 | + classdiffreport: "/api_html/teaching/classdiffreport", | ||
| 65 | tpaperExamReport: "/api_html/teaching/paperExamReport", | 69 | tpaperExamReport: "/api_html/teaching/paperExamReport", |
| 66 | // 任课老师-学生成绩排行 | 70 | // 任课老师-学生成绩排行 |
| 67 | tstudentExamReport2: "/api_html/teaching/studentExamReport2", | 71 | tstudentExamReport2: "/api_html/teaching/studentExamReport2", |
| 68 | // 任课老师-班级情况对比 | 72 | // 任课老师-班级情况对比 |
| 69 | tclassdiffExamReport: "/api_html/teaching/classdiffExamReport", | 73 | tclassdiffExamReport: "/api_html/teaching/classdiffExamReport", |
| 70 | tClassFromGrade: "/api_html/teaching/grade/classList", | 74 | tClassFromGrade: "/api_html/teaching/grade/classList", |
| 71 | - tClassGrade:'/api_html/teaching/grade', | 75 | + tClassGrade: '/api_html/teaching/grade', |
| 72 | //任课老师-测验成绩单 | 76 | //任课老师-测验成绩单 |
| 73 | tTestExamReport: "/api_html/teaching/testExamReport", | 77 | tTestExamReport: "/api_html/teaching/testExamReport", |
| 74 | //任课老师-查询答题卡详情 | 78 | //任课老师-查询答题卡详情 |
| @@ -82,7 +86,7 @@ export default { | @@ -82,7 +86,7 @@ export default { | ||
| 82 | phaseAnswerReport: "/api_html/teaching/phaseAnswerReport", | 86 | phaseAnswerReport: "/api_html/teaching/phaseAnswerReport", |
| 83 | //任课老师-查询阶段互动报表 | 87 | //任课老师-查询阶段互动报表 |
| 84 | phaseInteractiveReport: "/api_html/teaching/phaseInteractiveReport", | 88 | phaseInteractiveReport: "/api_html/teaching/phaseInteractiveReport", |
| 85 | - exportPhaseExamReport: "/api_html/teaching/exportPhaseExamReport", | 89 | + exportPhaseExamReport: "/api_html/teaching/exportPhaseExamReport", |
| 86 | //任课老师-查询课时题目列表 | 90 | //任课老师-查询课时题目列表 |
| 87 | periodQuestionList: "/api_html/teaching/periodQuestionList", | 91 | periodQuestionList: "/api_html/teaching/periodQuestionList", |
| 88 | //任课老师-设置课时报表答案 | 92 | //任课老师-设置课时报表答案 |
| @@ -93,6 +97,8 @@ export default { | @@ -93,6 +97,8 @@ export default { | ||
| 93 | periodQuestionReport: "/api_html/teaching/periodQuestionReport", | 97 | periodQuestionReport: "/api_html/teaching/periodQuestionReport", |
| 94 | //任课老师-查询课时学生答题明细 | 98 | //任课老师-查询课时学生答题明细 |
| 95 | periodStudentReport: "/api_html/teaching/periodStudentReport", | 99 | periodStudentReport: "/api_html/teaching/periodStudentReport", |
| 100 | + // 修改答题卡 | ||
| 101 | + pModifyPaperNew: "/api_html/teaching/modifyPaperNew", | ||
| 96 | //任课老师-分页查询即时测报表 | 102 | //任课老师-分页查询即时测报表 |
| 97 | examReportList: "/api_html/teaching/examReportList", | 103 | examReportList: "/api_html/teaching/examReportList", |
| 98 | //任课老师-查询阶段测练报表 | 104 | //任课老师-查询阶段测练报表 |
src/assets/css/index.scss
| @@ -347,6 +347,26 @@ ul { | @@ -347,6 +347,26 @@ ul { | ||
| 347 | 347 | ||
| 348 | // 默认实体 | 348 | // 默认实体 |
| 349 | .default-body { | 349 | .default-body { |
| 350 | + | ||
| 351 | + .anwser-column { | ||
| 352 | + border: 1px solid #ebeef5; | ||
| 353 | + | ||
| 354 | + padding: 0px !important; | ||
| 355 | + | ||
| 356 | + .cell { | ||
| 357 | + height: 100%; | ||
| 358 | + width: calc(100% - 2px); | ||
| 359 | + } | ||
| 360 | + | ||
| 361 | + .red { | ||
| 362 | + height: 100%; | ||
| 363 | + width: 100%; | ||
| 364 | + background: #FBEEDC; | ||
| 365 | + color: red; | ||
| 366 | + display: block; | ||
| 367 | + } | ||
| 368 | + } | ||
| 369 | + | ||
| 350 | font-size: 14px; | 370 | font-size: 14px; |
| 351 | font-weight: 400; | 371 | font-weight: 400; |
| 352 | color: #303133; | 372 | color: #303133; |
| @@ -386,7 +406,7 @@ ul { | @@ -386,7 +406,7 @@ ul { | ||
| 386 | } | 406 | } |
| 387 | 407 | ||
| 388 | tr, | 408 | tr, |
| 389 | - td { | 409 | + td:not(.anwser-column) { |
| 390 | height: 40px; | 410 | height: 40px; |
| 391 | padding: 5px 0px !important; | 411 | padding: 5px 0px !important; |
| 392 | border: 1px solid #ebeef5; | 412 | border: 1px solid #ebeef5; |
| @@ -432,6 +452,12 @@ ul { | @@ -432,6 +452,12 @@ ul { | ||
| 432 | line-height: 40px; | 452 | line-height: 40px; |
| 433 | } | 453 | } |
| 434 | 454 | ||
| 455 | + .el-tag__close { | ||
| 456 | + height: 100% !important; | ||
| 457 | + line-height: 1.2; | ||
| 458 | + min-width: 20px; | ||
| 459 | + } | ||
| 460 | + | ||
| 435 | .filter-input, | 461 | .filter-input, |
| 436 | .filter-select { | 462 | .filter-select { |
| 437 | width: 13%; | 463 | width: 13%; |
| @@ -464,39 +490,108 @@ ul { | @@ -464,39 +490,108 @@ ul { | ||
| 464 | } | 490 | } |
| 465 | } | 491 | } |
| 466 | 492 | ||
| 467 | -@media screen and (max-width: 1921px) and (max-height: 1081px) { | ||
| 468 | - * :not(.p1, .fa, .el-button, .el-icon-upload, h1, h2, h3, h4, h5, h6) { | 493 | +@media screen and (max-width: 1200px) { |
| 494 | + .flex-content { | ||
| 495 | + padding: 55px !important; | ||
| 496 | + } | ||
| 497 | + | ||
| 498 | + .flex-btn { | ||
| 499 | + position: fixed !important; | ||
| 500 | + z-index: 999 !important; | ||
| 501 | + bottom: 30px !important; | ||
| 502 | + padding: 10px 10px !important; | ||
| 503 | + right: 0px !important; | ||
| 504 | + background-color: white !important; | ||
| 505 | + width: calc(100% - 280px) !important; | ||
| 506 | + } | ||
| 507 | +} | ||
| 508 | + | ||
| 509 | +@media screen and (max-width: 1500px) and (min-width: 1201px) { | ||
| 510 | + .flex-content { | ||
| 511 | + padding: 55px !important; | ||
| 512 | + } | ||
| 513 | + | ||
| 514 | + .flex-btn { | ||
| 515 | + position: fixed !important; | ||
| 516 | + z-index: 999 !important; | ||
| 517 | + bottom: 30px !important; | ||
| 518 | + padding: 10px 10px !important; | ||
| 519 | + right: 0px !important; | ||
| 520 | + background-color: white !important; | ||
| 521 | + width: calc(100% - 280px) !important; | ||
| 522 | + } | ||
| 523 | +} | ||
| 524 | + | ||
| 525 | +@media screen and (min-width: 1501px) { | ||
| 526 | + .flex-content { | ||
| 527 | + padding: 25px !important; | ||
| 528 | + } | ||
| 529 | + | ||
| 530 | + .flex-btn { | ||
| 531 | + position: fixed !important; | ||
| 532 | + z-index: 999 !important; | ||
| 533 | + bottom: -10px !important; | ||
| 534 | + padding: 10px 0px !important; | ||
| 535 | + right: 30px !important; | ||
| 536 | + background-color: white !important; | ||
| 537 | + width: calc(100% - 280px) !important; | ||
| 538 | + } | ||
| 539 | + | ||
| 540 | +} | ||
| 541 | + | ||
| 542 | + | ||
| 543 | +@media screen and (max-width: 1920px) { | ||
| 544 | + * :not(.p1, .fa, .el-button, .el-icon-upload, h1, h2, h3, h4, h5, h6, .el-progress__text) { | ||
| 545 | + | ||
| 469 | font-size: 18px !important; | 546 | font-size: 18px !important; |
| 470 | 547 | ||
| 471 | - .default-title { | ||
| 472 | - font-size: 24px !important; | 548 | + |
| 549 | + | ||
| 550 | + .default-body-detail * { | ||
| 551 | + font-size: 15px !important; | ||
| 552 | + | ||
| 553 | + .cell { | ||
| 554 | + padding-left: 2px !important; | ||
| 555 | + padding-right: 2px !important; | ||
| 556 | + } | ||
| 473 | } | 557 | } |
| 474 | 558 | ||
| 475 | - .el-button * { | ||
| 476 | - font-size: 16px !important; | 559 | + .default-title { |
| 560 | + font-size: 24px !important; | ||
| 477 | } | 561 | } |
| 478 | 562 | ||
| 479 | - .el-select-dropdown__item * { | 563 | + .el-select-dropdown__item *, |
| 564 | + .small-button * { | ||
| 480 | font-size: 16px !important; | 565 | font-size: 16px !important; |
| 481 | } | 566 | } |
| 482 | 567 | ||
| 483 | .el-form :not(h1, h2, h3, h4, h5, h6), | 568 | .el-form :not(h1, h2, h3, h4, h5, h6), |
| 484 | .el-dropdown-menu__item, | 569 | .el-dropdown-menu__item, |
| 485 | - .el-cascader-node__label { | 570 | + .el-form-item__error, |
| 571 | + .el-dialog__body .el-checkbox *, | ||
| 572 | + .el-checkbox__label { | ||
| 486 | font-size: 16px !important; | 573 | font-size: 16px !important; |
| 487 | } | 574 | } |
| 488 | - | ||
| 489 | } | 575 | } |
| 490 | } | 576 | } |
| 491 | 577 | ||
| 492 | -@media screen and (min-width: 1921px) and (min-height: 1081px) { | ||
| 493 | - * :not(.p1, .fa, .el-button, .el-icon-upload, h1, h2, h3, h4, h5, h6) { | 578 | +@media screen and (min-width: 1921px) { |
| 579 | + * :not(.p1, .fa, .el-button, .el-icon-upload, h1, h2, h3, h4, h5, h6, .el-progress__text) { | ||
| 494 | 580 | ||
| 495 | font-size: 14px !important; | 581 | font-size: 14px !important; |
| 496 | 582 | ||
| 583 | + .default-body-detail * { | ||
| 584 | + font-size: 13px !important; | ||
| 585 | + | ||
| 586 | + .cell { | ||
| 587 | + padding-left: 4px !important; | ||
| 588 | + padding-right: 4px !important; | ||
| 589 | + } | ||
| 590 | + } | ||
| 591 | + | ||
| 497 | .default-body .default-filter * { | 592 | .default-body .default-filter * { |
| 498 | line-height: 38px !important; | 593 | line-height: 38px !important; |
| 499 | - } | 594 | + } |
| 500 | 595 | ||
| 501 | .card-content { | 596 | .card-content { |
| 502 | width: 48% !important; | 597 | width: 48% !important; |
| @@ -506,13 +601,16 @@ ul { | @@ -506,13 +601,16 @@ ul { | ||
| 506 | font-size: 24px !important; | 601 | font-size: 24px !important; |
| 507 | } | 602 | } |
| 508 | 603 | ||
| 509 | - .el-select-dropdown__item * { | 604 | + .el-select-dropdown__item *, |
| 605 | + .small-button * { | ||
| 510 | font-size: 12px !important; | 606 | font-size: 12px !important; |
| 511 | } | 607 | } |
| 512 | 608 | ||
| 513 | .el-form :not(h1, h2, h3, h4, h5, h6), | 609 | .el-form :not(h1, h2, h3, h4, h5, h6), |
| 514 | .el-dropdown-menu__item, | 610 | .el-dropdown-menu__item, |
| 515 | - .el-cascader-node__label { | 611 | + .el-form-item__error, |
| 612 | + .el-dialog__body .el-checkbox *, | ||
| 613 | + .el-checkbox__label { | ||
| 516 | font-size: 12px !important; | 614 | font-size: 12px !important; |
| 517 | } | 615 | } |
| 518 | 616 |
src/components/upload.vue
| @@ -2,8 +2,9 @@ | @@ -2,8 +2,9 @@ | ||
| 2 | <div> | 2 | <div> |
| 3 | <slot name="down"></slot> | 3 | <slot name="down"></slot> |
| 4 | <div class="d1"> | 4 | <div class="d1"> |
| 5 | - <el-upload class="upload-demo" ref="upload" :action="url" :multiple="false" :data="{ ...query }" | ||
| 6 | - :with-credentials="true" :limit="1" :on-change="change" :on-success="upSuccess" :on-error="upError"> | 5 | + <el-upload class="upload-demo" ref="upload" :action="uploadUrl" :multiple="false" :data="{ ...query }" |
| 6 | + :with-credentials="true" :limit="1" :on-remove="removec" :on-change="change" :on-success="upSuccess" | ||
| 7 | + :on-error="upError"> | ||
| 7 | <!-- accept="application/vnd.ms-excel" --> | 8 | <!-- accept="application/vnd.ms-excel" --> |
| 8 | <div class="upload-btn"> | 9 | <div class="upload-btn"> |
| 9 | <i class="el-icon-upload"></i> | 10 | <i class="el-icon-upload"></i> |
| @@ -11,10 +12,15 @@ | @@ -11,10 +12,15 @@ | ||
| 11 | </div> | 12 | </div> |
| 12 | </el-upload> | 13 | </el-upload> |
| 13 | </div> | 14 | </div> |
| 15 | + <div class="d1"> | ||
| 16 | + <el-progress :percentage="percent" v-if="percent > 0"></el-progress> | ||
| 17 | + </div> | ||
| 18 | + <slot name="descption"></slot> | ||
| 14 | </div> | 19 | </div> |
| 15 | </template> | 20 | </template> |
| 16 | 21 | ||
| 17 | <script> | 22 | <script> |
| 23 | +import conf from "@/config/index"; // 路径配置 | ||
| 18 | export default { | 24 | export default { |
| 19 | name: "downUpData", | 25 | name: "downUpData", |
| 20 | props: { | 26 | props: { |
| @@ -36,6 +42,28 @@ export default { | @@ -36,6 +42,28 @@ export default { | ||
| 36 | }, | 42 | }, |
| 37 | }, | 43 | }, |
| 38 | computed: { | 44 | computed: { |
| 45 | + percent: function () { | ||
| 46 | + var _percentage = 0; | ||
| 47 | + console.log(this.isOked) | ||
| 48 | + if (this.file?.percentage) _percentage = this.file?.percentage; | ||
| 49 | + if (_percentage >= 100) { | ||
| 50 | + if (!this.isOked) _percentage = 96; | ||
| 51 | + else _percentage = 100; | ||
| 52 | + } | ||
| 53 | + return _percentage; | ||
| 54 | + }, | ||
| 55 | + uploadUrl: function () { | ||
| 56 | + var requestUrl = ''; | ||
| 57 | + var ogrinUrl = this.$props.url; | ||
| 58 | + var baseUrl = conf.baseURL; | ||
| 59 | + if (baseUrl == '/' && ogrinUrl.indexOf('/') == 0) { | ||
| 60 | + requestUrl = ogrinUrl; | ||
| 61 | + } | ||
| 62 | + else { | ||
| 63 | + requestUrl = baseUrl + ogrinUrl | ||
| 64 | + } | ||
| 65 | + return requestUrl; | ||
| 66 | + }, | ||
| 39 | query: function () { | 67 | query: function () { |
| 40 | if (this.id) { | 68 | if (this.id) { |
| 41 | return { | 69 | return { |
| @@ -57,12 +85,16 @@ export default { | @@ -57,12 +85,16 @@ export default { | ||
| 57 | data() { | 85 | data() { |
| 58 | return { | 86 | return { |
| 59 | file: null, | 87 | file: null, |
| 88 | + isOked: false | ||
| 60 | }; | 89 | }; |
| 61 | }, | 90 | }, |
| 62 | methods: { | 91 | methods: { |
| 92 | + removec(file, fileList) { | ||
| 93 | + this.file = null; | ||
| 94 | + this.isOked = false; | ||
| 95 | + }, | ||
| 63 | async submitUpload() { | 96 | async submitUpload() { |
| 64 | this.$refs.upload.submit(); | 97 | this.$refs.upload.submit(); |
| 65 | - | ||
| 66 | // const formData = new FormData() | 98 | // const formData = new FormData() |
| 67 | // formData.append('id',this.componentId) | 99 | // formData.append('id',this.componentId) |
| 68 | // formData.append('file',new File(this.file.raw)) | 100 | // formData.append('file',new File(this.file.raw)) |
| @@ -75,6 +107,7 @@ export default { | @@ -75,6 +107,7 @@ export default { | ||
| 75 | // } | 107 | // } |
| 76 | }, | 108 | }, |
| 77 | upSuccess(res) { | 109 | upSuccess(res) { |
| 110 | + this.isOked = true; | ||
| 78 | if (res && res.status == 0) { | 111 | if (res && res.status == 0) { |
| 79 | this.$message.success("上传成功"); | 112 | this.$message.success("上传成功"); |
| 80 | this.$emit("upSuccess", res); | 113 | this.$emit("upSuccess", res); |
| @@ -84,6 +117,7 @@ export default { | @@ -84,6 +117,7 @@ export default { | ||
| 84 | } | 117 | } |
| 85 | }, | 118 | }, |
| 86 | upError(res) { | 119 | upError(res) { |
| 120 | + this.isOked = true; | ||
| 87 | if (res && res.status == 0) { | 121 | if (res && res.status == 0) { |
| 88 | this.$message.error("上传失败"); | 122 | this.$message.error("上传失败"); |
| 89 | } else { | 123 | } else { |
| @@ -101,11 +135,13 @@ export default { | @@ -101,11 +135,13 @@ export default { | ||
| 101 | .d1 { | 135 | .d1 { |
| 102 | padding: 10px; | 136 | padding: 10px; |
| 103 | overflow: hidden; | 137 | overflow: hidden; |
| 138 | + | ||
| 104 | :deep(.el-upload-list) { | 139 | :deep(.el-upload-list) { |
| 105 | width: 100%; | 140 | width: 100%; |
| 106 | } | 141 | } |
| 107 | - | 142 | + |
| 108 | } | 143 | } |
| 144 | + | ||
| 109 | .btn { | 145 | .btn { |
| 110 | border-radius: 8px; | 146 | border-radius: 8px; |
| 111 | font-weight: normal; | 147 | font-weight: normal; |
| @@ -115,7 +151,7 @@ export default { | @@ -115,7 +151,7 @@ export default { | ||
| 115 | display: flex; | 151 | display: flex; |
| 116 | flex-direction: column; | 152 | flex-direction: column; |
| 117 | align-items: center; | 153 | align-items: center; |
| 118 | - | 154 | + |
| 119 | } | 155 | } |
| 120 | 156 | ||
| 121 | .upload-btn { | 157 | .upload-btn { |
| @@ -131,3 +167,14 @@ export default { | @@ -131,3 +167,14 @@ export default { | ||
| 131 | 167 | ||
| 132 | } | 168 | } |
| 133 | </style> | 169 | </style> |
| 170 | + | ||
| 171 | +<style> | ||
| 172 | +.el-progress__text { | ||
| 173 | + margin-left: 10px !important; | ||
| 174 | + font-size: 14px !important; | ||
| 175 | +} | ||
| 176 | + | ||
| 177 | +.el-upload-list .el-progress { | ||
| 178 | + display: none !important; | ||
| 179 | +} | ||
| 180 | +</style> |
src/config/index.js
src/router/index.js
| @@ -346,7 +346,7 @@ let addrouters = [ | @@ -346,7 +346,7 @@ let addrouters = [ | ||
| 346 | path: "/testReportDetail", | 346 | path: "/testReportDetail", |
| 347 | iconCls: "", | 347 | iconCls: "", |
| 348 | name: "testReportDetail", | 348 | name: "testReportDetail", |
| 349 | - demoRoles: ["ROLE_JIAOSHI"], | 349 | + demoRoles: ["ROLE_JIAOSHI","ROLE_BANZHUREN"], |
| 350 | component: askTestReportDetail, | 350 | component: askTestReportDetail, |
| 351 | hidden: true, | 351 | hidden: true, |
| 352 | children: [] | 352 | children: [] |
src/store/index.js
| @@ -41,7 +41,7 @@ const store = new Vuex.Store({ | @@ -41,7 +41,7 @@ const store = new Vuex.Store({ | ||
| 41 | localStorage.setItem("info", JSON.stringify(data)); | 41 | localStorage.setItem("info", JSON.stringify(data)); |
| 42 | }, | 42 | }, |
| 43 | setRouters: (state, routers) => { | 43 | setRouters: (state, routers) => { |
| 44 | - console.log('current', state); | 44 | + state.addRouters = []; |
| 45 | let addrouterList = [] | 45 | let addrouterList = [] |
| 46 | if (state.info.showRole == 'ROLE_PERSONAL') { | 46 | if (state.info.showRole == 'ROLE_PERSONAL') { |
| 47 | addrouterList = [...addroutersPersonal] | 47 | addrouterList = [...addroutersPersonal] |
| @@ -55,12 +55,10 @@ const store = new Vuex.Store({ | @@ -55,12 +55,10 @@ const store = new Vuex.Store({ | ||
| 55 | } | 55 | } |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | - let aRouters = addrouterList.filter((item) => { | ||
| 59 | - | 58 | + let aRouters = addrouterList.filter((item) => { |
| 60 | let path = item.children[0]?.path.replace("/", ""); | 59 | let path = item.children[0]?.path.replace("/", ""); |
| 61 | if (routers?.includes(path) == true) return item; | 60 | if (routers?.includes(path) == true) return item; |
| 62 | - else if (item.demoRoles?.includes(state.info.showRole) == true) return item; | ||
| 63 | - | 61 | + else if (item.demoRoles?.includes(state.info.showRole) == true) return item; |
| 64 | if (item.children) { | 62 | if (item.children) { |
| 65 | item.children = item.children.filter((itemFilter) => { | 63 | item.children = item.children.filter((itemFilter) => { |
| 66 | return itemFilter.demoRoles?.includes(state.info.showRole) == true | 64 | return itemFilter.demoRoles?.includes(state.info.showRole) == true |
| @@ -102,7 +100,6 @@ const store = new Vuex.Store({ | @@ -102,7 +100,6 @@ const store = new Vuex.Store({ | ||
| 102 | .then((res) => { | 100 | .then((res) => { |
| 103 | let response = res; | 101 | let response = res; |
| 104 | if (response.status == 0) { | 102 | if (response.status == 0) { |
| 105 | - console.log(response) | ||
| 106 | const userInfo = { ...response.data }; | 103 | const userInfo = { ...response.data }; |
| 107 | if (userInfo.permissions && userInfo.permissions.length) { | 104 | if (userInfo.permissions && userInfo.permissions.length) { |
| 108 | userInfo.showRoleName = response.data.permissions[0]?.roleName; | 105 | userInfo.showRoleName = response.data.permissions[0]?.roleName; |
| @@ -121,6 +118,7 @@ const store = new Vuex.Store({ | @@ -121,6 +118,7 @@ const store = new Vuex.Store({ | ||
| 121 | hidden: true, | 118 | hidden: true, |
| 122 | children: [], | 119 | children: [], |
| 123 | }); | 120 | }); |
| 121 | + sessionStorage.setItem("RouteRefresh", false); | ||
| 124 | if (params.url) { | 122 | if (params.url) { |
| 125 | window.location.href = params.url; | 123 | window.location.href = params.url; |
| 126 | } else { | 124 | } else { |
src/utils/index.js
| @@ -106,30 +106,23 @@ export function deepClone(obj) { | @@ -106,30 +106,23 @@ export function deepClone(obj) { | ||
| 106 | return result; | 106 | return result; |
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | -export function getKnowledge(knowledge) { | 109 | +export function getKnowledge(knowledgeParam) { |
| 110 | + if (!knowledgeParam) return ""; | ||
| 110 | 111 | ||
| 111 | - if (!knowledge) return ""; | 112 | + var knowledge = knowledgeParam + ""; |
| 112 | 113 | ||
| 113 | - var splitPoints = s.Split(','); | 114 | + var knowledges = knowledge.split(','); |
| 114 | 115 | ||
| 115 | - var result = ""; | ||
| 116 | - | ||
| 117 | - splitPoints.forEach(split => { | ||
| 118 | - | ||
| 119 | - var ss = split.Split('#').filter(dd => dd.length >= 1); | 116 | + var resultArray = []; |
| 120 | 117 | ||
| 118 | + knowledges.forEach(ksplit => { | ||
| 119 | + var ss = ksplit.split('#').filter(dd => dd.length >= 1); | ||
| 121 | if (ss.length > 0) { | 120 | if (ss.length > 0) { |
| 122 | - result += ss[ss.Length - 1] + ";"; | 121 | + resultArray.push(ss[ss.length - 1]); |
| 123 | } | 122 | } |
| 124 | }) | 123 | }) |
| 125 | 124 | ||
| 126 | - if (result.length > 1) result = result.substring(0, result.length - 1); | ||
| 127 | - | ||
| 128 | - if (result.length == 1) { | ||
| 129 | - return ""; | ||
| 130 | - } | ||
| 131 | - | ||
| 132 | - return result; | 125 | + return resultArray.join(';'); |
| 133 | } | 126 | } |
| 134 | 127 | ||
| 135 | // // 3DES加密 | 128 | // // 3DES加密 |
| @@ -854,74 +847,425 @@ export function formatGradeNameClass(data) { | @@ -854,74 +847,425 @@ export function formatGradeNameClass(data) { | ||
| 854 | }); | 847 | }); |
| 855 | return gradeNameArr; | 848 | return gradeNameArr; |
| 856 | } | 849 | } |
| 850 | +_ | ||
| 851 | + | ||
| 852 | +export function tablePrint(options) { | ||
| 857 | 853 | ||
| 858 | -export function tablePrint(id, title, type = null) { | 854 | + var id = options.id; |
| 855 | + var title = options.title; | ||
| 856 | + var lindex = options.lindex; | ||
| 857 | + var splitParam = options.splitParam ?? 20; | ||
| 858 | + var printType = options.printType; | ||
| 859 | + var fixedColumn = options.fixedColumn ?? 0; | ||
| 860 | + var diffNumber = options.diffNumber ?? 0; | ||
| 861 | + var diffStNumber = options.diffStNumber ?? 0; | ||
| 859 | let divs = document.getElementById(id); | 862 | let divs = document.getElementById(id); |
| 860 | let awin = window.open("", "_blank"); | 863 | let awin = window.open("", "_blank"); |
| 861 | awin.document.getElementsByTagName( | 864 | awin.document.getElementsByTagName( |
| 862 | "head" | 865 | "head" |
| 863 | - )[0].innerHTML = `<style> @media print {@page {size:A4 landscape;margin:10mm} | ||
| 864 | - body{margin:5mm;font-size:8px;}} | ||
| 865 | - body{-webkit-print-color-adjust: exact;} | ||
| 866 | - .tit{text-align:center;font-size:20px;color:#333;line-height:24px;font-weight:700;padding:10px 0;margin:0;} | ||
| 867 | - .table-box,.el-table,.el-table__body-wrapper,.el-table--border{max-height:99999999px!important;height:auto;width:auto!important;max-width:1400px;margin: 0 auto;} | ||
| 868 | - .el-table{width:100%} | ||
| 869 | - .print-hidden{display:none;} | ||
| 870 | - .el-table,.el-table__body-wrapper{max-height:auto} | ||
| 871 | - .el-table .el-table__cell{padding:12px 0} | ||
| 872 | - .el-table thead tr:first-child th.el-table__cell{border-top: 1px solid #ccc} | ||
| 873 | - .el-table thead tr:first-child th.el-table__cell:first-child{border-left: 1px solid #ccc;} | ||
| 874 | - .el-table thead tr th.el-table__cell{background:#ccc} | ||
| 875 | - .el-table tbody tr td.el-table__cell:first-child{border-left: 1px solid #ccc;} | ||
| 876 | - .el-table td.el-table__cell{border-bottom: 1px solid #ccc;} | ||
| 877 | - .el-table--border .el-table__cell{border-right: 1px solid #ccc;} | ||
| 878 | - .el-table--border th.el-table__cell, .el-table__fixed-right-patch{border-bottom: 1px solid #ccc;} | ||
| 879 | - .el-table .el-table__cell.gutter{border:none!important;} | ||
| 880 | - .el-table__fixed{display:none!important} | ||
| 881 | - .el-table .el-table__cell.is-center{text-align:center!important} | ||
| 882 | - .el-table .el-table__cell.is-hidden>*{visibility: inherit;} | ||
| 883 | - .el-table__cell.gutter{display:none} | ||
| 884 | - ul,li{margin:0;padding:0;list-style:none} | ||
| 885 | - .hui-box{display: flex;text-align: center;} | ||
| 886 | - .hui-box .s-txt{width: 61px;line-height: 144px;background: #ccc;font-size: 16px;color: #fff;font-weight: 700;border:1px solid #ccc;box-sizing:border-box} | ||
| 887 | - .hui-li{display: flex;} | ||
| 888 | - .hui-s{height: 48px;line-height: 48px;border-right: 1px solid #ccc;border-bottom: 1px solid #ccc;box-sizing: border-box;} | ||
| 889 | - .hui-s.s1{width: 100px;} | ||
| 890 | - .hui-s.s2{ width: 110px;} | ||
| 891 | - .hui-s.s3{width: 120px;} | ||
| 892 | - .info { display: flex;flex-wrap: wrap;border-left: 1px solid #ccc;border-top: 1px solid #ccc;margin-bottom: 12px;} | ||
| 893 | - .info-item {width: 25%;height: 50px;box-sizing: border-box;flex-shrink: 0;background: #f8f8f8;border-right: 1px solid #ccc;border-bottom: 1px solid #ccc;line-height: 50px;text-align: center;} | ||
| 894 | - .row-line { width: calc(20% - 2px); | ||
| 895 | - border: 1px solid #ebeef5; | ||
| 896 | - background: #f5f7fa; | ||
| 897 | - display: inline-block; | ||
| 898 | - height: 40px; | ||
| 899 | - line-height: 40px; | ||
| 900 | - | ||
| 901 | - .line-subfix { | ||
| 902 | - margin-left: 10px; | ||
| 903 | - }} | ||
| 904 | - | ||
| 905 | - .el-table__header,.el-table__body{width:100%!important;} | ||
| 906 | - #print-table{max-width:1400px;margin: 0 auto;width: 100%;} | ||
| 907 | - .hide{max-width:1400px;margin: 0 auto;width: 100%;border-left: 1px solid #ccc;border-spacing:0;box-sizing:border-box} | ||
| 908 | - .hide thead th{background:#ccc;line-height: 48px;border-right: 1px solid #ccc;box-sizing:border-box} | ||
| 909 | - .hide tbody tr td{line-height: 48px;border-right: 1px solid #ccc;text-align:center;box-sizing:border-box} | ||
| 910 | - .hide td{border-bottom: 1px solid #ccc;} | 866 | + )[0].innerHTML = `<style> |
| 867 | + @media print { | ||
| 868 | + @page { | ||
| 869 | + size: A4 portrait; | ||
| 870 | + margin: 4mm | ||
| 871 | + } | ||
| 872 | + | ||
| 873 | + | ||
| 874 | + body { | ||
| 875 | + margin: 2mm; | ||
| 876 | + font-size: 8px; | ||
| 877 | + } | ||
| 878 | + } | ||
| 879 | + | ||
| 880 | + * :not(.tit) { | ||
| 881 | + font-size: 10px; | ||
| 882 | + } | ||
| 883 | + | ||
| 884 | + | ||
| 885 | + body { | ||
| 886 | + -webkit-print-color-adjust: exact; | ||
| 887 | + } | ||
| 888 | + .el-table__fixed-right{ | ||
| 889 | + display: none; | ||
| 890 | + } | ||
| 891 | + .tit { | ||
| 892 | + text-align: center; | ||
| 893 | + font-size: 14px; | ||
| 894 | + color: #333; | ||
| 895 | + line-height: 24px; | ||
| 896 | + font-weight: 700; | ||
| 897 | + /* padding: 10px 0; */ | ||
| 898 | + margin: 0; | ||
| 899 | + } | ||
| 900 | + | ||
| 901 | + .table-box, | ||
| 902 | + .el-table, | ||
| 903 | + .el-table__body-wrapper, | ||
| 904 | + .el-table--border { | ||
| 905 | + max-height: 99999999px !important; | ||
| 906 | + height: auto; | ||
| 907 | + width: auto !important; | ||
| 908 | + max-width: 1400px; | ||
| 909 | + margin: 5px auto; | ||
| 910 | + } | ||
| 911 | + | ||
| 912 | + .el-table,table { | ||
| 913 | + width: 100%; | ||
| 914 | + margin-bottom:10px; | ||
| 915 | + } | ||
| 916 | + | ||
| 917 | + .print-hidden,.el-tabs__nav { | ||
| 918 | + display: none; | ||
| 919 | + } | ||
| 920 | + | ||
| 921 | + .el-table, | ||
| 922 | + .el-table__body-wrapper { | ||
| 923 | + max-height: auto | ||
| 924 | + } | ||
| 925 | + | ||
| 926 | + .el-table .el-table__cell { | ||
| 927 | + padding: 2px 0; | ||
| 928 | + border-right: 1px solid black; | ||
| 929 | + min-width:50px; | ||
| 930 | + } | ||
| 931 | + | ||
| 932 | + .el-table thead tr:first-child th.el-table__cell { | ||
| 933 | + border-top: 1px solid black; | ||
| 934 | + } | ||
| 935 | + | ||
| 936 | + .el-table thead tr:first-child th.el-table__cell:first-child { | ||
| 937 | + border-left: 1px solid black; | ||
| 938 | + } | ||
| 939 | + | ||
| 940 | + .el-table thead tr th.el-table__cell { | ||
| 941 | + background: #ccc | ||
| 942 | + } | ||
| 943 | + .el-table thead tr th{ | ||
| 944 | + height:auto; | ||
| 945 | + word-wrap:break-word; | ||
| 946 | + word-break:break-all; | ||
| 947 | + overflow:hidden; | ||
| 948 | + } | ||
| 949 | + .el-table tbody tr td.el-table__cell:first-child { | ||
| 950 | + border-left: 1px solid black; | ||
| 951 | + } | ||
| 952 | + | ||
| 953 | + .el-table td.el-table__cell { | ||
| 954 | + border-bottom: 1px solid black; | ||
| 955 | + } | ||
| 956 | + | ||
| 957 | + .el-table--border .el-table__cell { | ||
| 958 | + border-right: 1px solid black; | ||
| 959 | + } | ||
| 960 | + | ||
| 961 | + .el-table--border th.el-table__cell, | ||
| 962 | + .el-table__fixed-right-patch { | ||
| 963 | + border-bottom: 1px solid black; | ||
| 964 | + } | ||
| 965 | + | ||
| 966 | + .el-table .el-table__cell.gutter { | ||
| 967 | + border: none !important; | ||
| 968 | + } | ||
| 969 | + | ||
| 970 | + .el-table__fixed { | ||
| 971 | + display: none !important | ||
| 972 | + } | ||
| 973 | + | ||
| 974 | + .el-table .el-table__cell { | ||
| 975 | + text-align: center !important | ||
| 976 | + } | ||
| 977 | + | ||
| 978 | + .el-table .el-table__cell.is-hidden>* { | ||
| 979 | + visibility: inherit; | ||
| 980 | + } | ||
| 981 | + | ||
| 982 | + .el-table__cell.gutter { | ||
| 983 | + display: none | ||
| 984 | + } | ||
| 985 | + | ||
| 986 | + ul, | ||
| 987 | + li { | ||
| 988 | + margin: 0; | ||
| 989 | + padding: 0; | ||
| 990 | + list-style: none | ||
| 991 | + } | ||
| 992 | + | ||
| 993 | + .hui-box { | ||
| 994 | + display: flex; | ||
| 995 | + text-align: center; | ||
| 996 | + } | ||
| 997 | + | ||
| 998 | + .hui-box .s-txt { | ||
| 999 | + width: 61px; | ||
| 1000 | + line-height: 144px; | ||
| 1001 | + background: #ccc; | ||
| 1002 | + font-size: 16px; | ||
| 1003 | + color: #fff; | ||
| 1004 | + font-weight: 700; | ||
| 1005 | + border: 1px solid #ccc; | ||
| 1006 | + box-sizing: border-box | ||
| 1007 | + } | ||
| 1008 | + | ||
| 1009 | + .hui-li { | ||
| 1010 | + display: flex; | ||
| 1011 | + } | ||
| 1012 | + | ||
| 1013 | + .hui-s { | ||
| 1014 | + height: 48px; | ||
| 1015 | + line-height: 48px; | ||
| 1016 | + border-right: 1px solid #ccc; | ||
| 1017 | + border-bottom: 1px solid #ccc; | ||
| 1018 | + box-sizing: border-box; | ||
| 1019 | + } | ||
| 1020 | + | ||
| 1021 | + .hui-s.s1 { | ||
| 1022 | + width: 100px; | ||
| 1023 | + } | ||
| 1024 | + | ||
| 1025 | + .hui-s.s2 { | ||
| 1026 | + width: 110px; | ||
| 1027 | + } | ||
| 1028 | + | ||
| 1029 | + .hui-s.s3 { | ||
| 1030 | + width: 120px; | ||
| 1031 | + } | ||
| 1032 | + | ||
| 1033 | + .info { | ||
| 1034 | + display: flex; | ||
| 1035 | + flex-wrap: wrap; | ||
| 1036 | + border-left: 1px solid #ccc; | ||
| 1037 | + border-top: 1px solid #ccc; | ||
| 1038 | + margin-bottom: 12px; | ||
| 1039 | + } | ||
| 1040 | + | ||
| 1041 | + .info-item { | ||
| 1042 | + width: 25%; | ||
| 1043 | + height: 50px; | ||
| 1044 | + box-sizing: border-box; | ||
| 1045 | + flex-shrink: 0; | ||
| 1046 | + background: #f8f8f8; | ||
| 1047 | + border-right: 1px solid #ccc; | ||
| 1048 | + border-bottom: 1px solid #ccc; | ||
| 1049 | + line-height: 50px; | ||
| 1050 | + text-align: center; | ||
| 1051 | + } | ||
| 1052 | + | ||
| 1053 | + .row-line { | ||
| 1054 | + width: 33%; | ||
| 1055 | + border: 1px solid #ebeef5; | ||
| 1056 | + background: #f5f7fa; | ||
| 1057 | + display: inline-block; | ||
| 1058 | + height: 30px; | ||
| 1059 | + line-height: 30px; | ||
| 1060 | + | ||
| 1061 | + .line-subfix { | ||
| 1062 | + margin-left: 10px; | ||
| 1063 | + } | ||
| 1064 | + } | ||
| 1065 | + | ||
| 1066 | + .row-line-5 { | ||
| 1067 | + width: 19.5% !important; | ||
| 1068 | + } | ||
| 1069 | + | ||
| 1070 | + .row-line-4 { | ||
| 1071 | + width: 24.5% !important; | ||
| 1072 | + } | ||
| 1073 | + .el-table__header, | ||
| 1074 | + .el-table__body { | ||
| 1075 | + width: 100% !important; | ||
| 1076 | + } | ||
| 1077 | + | ||
| 1078 | + #print-table { | ||
| 1079 | + max-width: 1400px; | ||
| 1080 | + margin: 0 auto; | ||
| 1081 | + width: 100%; | ||
| 1082 | + } | ||
| 1083 | + | ||
| 1084 | + .hide { | ||
| 1085 | + max-width: 1400px; | ||
| 1086 | + margin: 0 auto; | ||
| 1087 | + width: 100%; | ||
| 1088 | + border-left: 1px solid #ccc; | ||
| 1089 | + border-spacing: 0; | ||
| 1090 | + box-sizing: border-box | ||
| 1091 | + } | ||
| 1092 | + | ||
| 1093 | + .hide thead th { | ||
| 1094 | + background: #ccc; | ||
| 1095 | + line-height: 48px; | ||
| 1096 | + border-right: 1px solid #ccc; | ||
| 1097 | + box-sizing: border-box | ||
| 1098 | + } | ||
| 1099 | + | ||
| 1100 | + .hide tbody tr td { | ||
| 1101 | + line-height: 48px; | ||
| 1102 | + border-right: 1px solid #ccc; | ||
| 1103 | + text-align: center; | ||
| 1104 | + box-sizing: border-box | ||
| 1105 | + } | ||
| 1106 | + | ||
| 1107 | + .hide td { | ||
| 1108 | + border-bottom: 1px solid #ccc; | ||
| 1109 | + } | ||
| 911 | </style>`; | 1110 | </style>`; |
| 1111 | + var splitNumber = splitParam ? splitParam : 20; | ||
| 1112 | + | ||
| 912 | let aDom = divs.cloneNode(true); | 1113 | let aDom = divs.cloneNode(true); |
| 913 | - if (!type) { | ||
| 914 | - let aTbody = aDom.getElementsByClassName("el-table__body")[0]?.getElementsByTagName("tbody")[0]; | ||
| 915 | - aDom.getElementsByClassName("el-table__header")[0].append(aTbody); | 1114 | + |
| 1115 | + let thead = aDom.querySelectorAll('.el-table__header-wrapper thead'); | ||
| 1116 | + | ||
| 1117 | + let tbody = aDom.querySelectorAll('.el-table__body-wrapper table'); | ||
| 1118 | + | ||
| 1119 | + var lastNotHiddenNumber = 0; | ||
| 1120 | + | ||
| 1121 | + if (tbody.length >= 1) { | ||
| 1122 | + | ||
| 1123 | + for (var tb = 0; tb < tbody.length; tb++) { | ||
| 1124 | + | ||
| 1125 | + var currentTbody = tbody[tb]; | ||
| 1126 | + | ||
| 1127 | + var currentThead = thead[tb]; | ||
| 1128 | + | ||
| 1129 | + var headTrs = currentThead.querySelectorAll('tr'); | ||
| 1130 | + | ||
| 1131 | + var headThs = null; | ||
| 1132 | + | ||
| 1133 | + if (lindex != null && lindex >= 0) | ||
| 1134 | + headThs = headTrs[lindex].querySelectorAll('th'); | ||
| 1135 | + else | ||
| 1136 | + headThs = headTrs[headTrs.length - 1].querySelectorAll('th'); | ||
| 1137 | + | ||
| 1138 | + if (headThs.length > splitNumber) { | ||
| 1139 | + | ||
| 1140 | + var bodyTrs = currentTbody.querySelectorAll('tr'); | ||
| 1141 | + | ||
| 1142 | + var roas = Math.ceil(headThs.length / splitNumber); | ||
| 1143 | + | ||
| 1144 | + if (fixedColumn) { | ||
| 1145 | + | ||
| 1146 | + var thLength = headThs.length; | ||
| 1147 | + | ||
| 1148 | + thLength -= splitNumber; | ||
| 1149 | + | ||
| 1150 | + roas = 1; | ||
| 1151 | + | ||
| 1152 | + splitNumber -= fixedColumn; | ||
| 1153 | + | ||
| 1154 | + roas += Math.ceil(thLength / splitNumber); | ||
| 1155 | + | ||
| 1156 | + } else fixedColumn = 0; | ||
| 1157 | + | ||
| 1158 | + for (var stao = 1; stao < roas; stao++) { | ||
| 1159 | + | ||
| 1160 | + var newThead = currentThead.cloneNode(true); | ||
| 1161 | + | ||
| 1162 | + var newTbody = currentTbody.cloneNode(); | ||
| 1163 | + | ||
| 1164 | + var newTrs = newThead.querySelectorAll('tr'); | ||
| 1165 | + | ||
| 1166 | + for (var trds = 0; trds < newTrs.length; trds++) { | ||
| 1167 | + | ||
| 1168 | + var newThs = newTrs[trds].querySelectorAll('th'); | ||
| 1169 | + | ||
| 1170 | + var index = 0; | ||
| 1171 | + | ||
| 1172 | + for (var lpss = 0; lpss < newThs.length; lpss++) { | ||
| 1173 | + | ||
| 1174 | + var newTh = newThs[lpss]; | ||
| 1175 | + | ||
| 1176 | + if (!newTh) continue; | ||
| 1177 | + | ||
| 1178 | + if (stao == roas - 1 && index >= (splitNumber + fixedColumn)) { | ||
| 1179 | + var currentTh = headTrs[trds].querySelectorAll('th')[lpss]; | ||
| 1180 | + if (currentTh) { | ||
| 1181 | + currentTh.style.display = "none"; | ||
| 1182 | + } | ||
| 1183 | + } | ||
| 1184 | + | ||
| 1185 | + var min = (stao + 1) * splitNumber; | ||
| 1186 | + | ||
| 1187 | + var max = stao * splitNumber; | ||
| 1188 | + | ||
| 1189 | + if (fixedColumn != 0) { | ||
| 1190 | + min += fixedColumn; | ||
| 1191 | + max += fixedColumn; | ||
| 1192 | + } | ||
| 1193 | + | ||
| 1194 | + if (index >= min || index < max) { | ||
| 1195 | + if (trds == 0 && fixedColumn != 0 && lpss < fixedColumn) { | ||
| 1196 | + if (stao == roas - 1) lastNotHiddenNumber += 1; | ||
| 1197 | + continue; | ||
| 1198 | + } | ||
| 1199 | + newTh.style.display = "none"; | ||
| 1200 | + } | ||
| 1201 | + else if (stao == roas - 1) lastNotHiddenNumber += 1; | ||
| 1202 | + | ||
| 1203 | + | ||
| 1204 | + var colspan = Number(newTh.getAttribute('colspan')) || 0; | ||
| 1205 | + | ||
| 1206 | + index += 1; | ||
| 1207 | + | ||
| 1208 | + if (colspan > 1) { | ||
| 1209 | + index += colspan - 1; | ||
| 1210 | + } | ||
| 1211 | + } | ||
| 1212 | + } | ||
| 1213 | + | ||
| 1214 | + for (var trd = 0; trd < bodyTrs.length; trd++) { | ||
| 1215 | + var currentTr = bodyTrs[trd]; | ||
| 1216 | + var newTr = currentTr.cloneNode(true); | ||
| 1217 | + var currentTds = currentTr.querySelectorAll('td'); | ||
| 1218 | + var newTds = newTr.querySelectorAll('td'); | ||
| 1219 | + var length = headThs.length + diffNumber; | ||
| 1220 | + for (var lps = 0; lps < length; lps++) { | ||
| 1221 | + var lpsIndex = lps; | ||
| 1222 | + if (lps > diffStNumber) lpsIndex = lps - diffNumber; | ||
| 1223 | + var newTd = newTds[lps]; | ||
| 1224 | + if (!newTd) continue; | ||
| 1225 | + if (stao == roas - 1 && lpsIndex >= (splitNumber + fixedColumn)) { | ||
| 1226 | + var currentTd = currentTds[lps]; | ||
| 1227 | + if (currentTd) { | ||
| 1228 | + currentTd.style.display = "none"; | ||
| 1229 | + } | ||
| 1230 | + } | ||
| 1231 | + var min = (stao + 1) * splitNumber; | ||
| 1232 | + var max = stao * splitNumber; | ||
| 1233 | + if (fixedColumn != 0) { | ||
| 1234 | + min += fixedColumn; | ||
| 1235 | + max += fixedColumn; | ||
| 1236 | + } | ||
| 1237 | + if (lpsIndex >= min || lpsIndex < max) { | ||
| 1238 | + if (fixedColumn != 0 && lpsIndex < fixedColumn) continue; | ||
| 1239 | + newTd.style.display = "none"; | ||
| 1240 | + } | ||
| 1241 | + } | ||
| 1242 | + newTbody.appendChild(newTr); | ||
| 1243 | + } | ||
| 1244 | + | ||
| 1245 | + if (lastNotHiddenNumber == fixedColumn) continue; | ||
| 1246 | + newTbody.appendChild(newThead); | ||
| 1247 | + | ||
| 1248 | + newTbody.classList.add('_addedList'); | ||
| 1249 | + | ||
| 1250 | + currentTbody.parentNode.parentNode.append(newTbody); | ||
| 1251 | + } | ||
| 1252 | + } | ||
| 1253 | + | ||
| 1254 | + currentTbody.appendChild(currentThead); | ||
| 1255 | + } | ||
| 916 | } | 1256 | } |
| 1257 | + | ||
| 917 | if (title) { | 1258 | if (title) { |
| 918 | let pTit = awin.document.createElement('p') | 1259 | let pTit = awin.document.createElement('p') |
| 919 | pTit.className = "tit" | 1260 | pTit.className = "tit" |
| 920 | pTit.innerHTML = title | 1261 | pTit.innerHTML = title |
| 921 | awin.document.body.append(pTit) | 1262 | awin.document.body.append(pTit) |
| 922 | } | 1263 | } |
| 1264 | + | ||
| 923 | awin.document.body.append(aDom); | 1265 | awin.document.body.append(aDom); |
| 1266 | + | ||
| 924 | awin.print(); | 1267 | awin.print(); |
| 1268 | + | ||
| 925 | awin.close() | 1269 | awin.close() |
| 926 | } | 1270 | } |
| 927 | 1271 |
src/views/admin/clientVersion/components/upLoad.vue
| @@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
| 5 | <el-upload | 5 | <el-upload |
| 6 | class="upload-demo" | 6 | class="upload-demo" |
| 7 | ref="upload" | 7 | ref="upload" |
| 8 | - :action="url" | 8 | + :action="uploadUrl" |
| 9 | :multiple="false" | 9 | :multiple="false" |
| 10 | :data="{ ...query }" | 10 | :data="{ ...query }" |
| 11 | :limit="1" | 11 | :limit="1" |
| @@ -24,6 +24,8 @@ | @@ -24,6 +24,8 @@ | ||
| 24 | </template> | 24 | </template> |
| 25 | 25 | ||
| 26 | <script> | 26 | <script> |
| 27 | +import conf from "@/config/index"; // 路径配置 | ||
| 28 | + | ||
| 27 | export default { | 29 | export default { |
| 28 | name: "downUpData", | 30 | name: "downUpData", |
| 29 | props: { | 31 | props: { |
| @@ -43,6 +45,24 @@ export default { | @@ -43,6 +45,24 @@ export default { | ||
| 43 | file: null, | 45 | file: null, |
| 44 | }; | 46 | }; |
| 45 | }, | 47 | }, |
| 48 | + computed: { | ||
| 49 | + uploadUrl: function () { | ||
| 50 | + | ||
| 51 | + var requestUrl = ''; | ||
| 52 | + | ||
| 53 | + var ogrinUrl = this.$props.url; | ||
| 54 | + | ||
| 55 | + var baseUrl = conf.baseURL; | ||
| 56 | + | ||
| 57 | + if (baseUrl == '/' && ogrinUrl.indexOf('/') == 0) { | ||
| 58 | + requestUrl = ogrinUrl; | ||
| 59 | + } | ||
| 60 | + else { | ||
| 61 | + requestUrl = baseUrl + ogrinUrl | ||
| 62 | + } | ||
| 63 | + return requestUrl; | ||
| 64 | + } | ||
| 65 | + }, | ||
| 46 | methods: { | 66 | methods: { |
| 47 | async submitUpload() { | 67 | async submitUpload() { |
| 48 | this.$refs.upload.submit(); | 68 | this.$refs.upload.submit(); |
src/views/admin/clientVersion/components/upLoadImg.vue
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | <el-upload | 4 | <el-upload |
| 5 | class="avatar-uploader" | 5 | class="avatar-uploader" |
| 6 | ref="upload" | 6 | ref="upload" |
| 7 | - :action="url" | 7 | + :action="uploadUrl" |
| 8 | :multiple="false" | 8 | :multiple="false" |
| 9 | :data="{ ...query }" | 9 | :data="{ ...query }" |
| 10 | :limit="1" | 10 | :limit="1" |
| @@ -20,6 +20,8 @@ | @@ -20,6 +20,8 @@ | ||
| 20 | </template> | 20 | </template> |
| 21 | 21 | ||
| 22 | <script> | 22 | <script> |
| 23 | +import conf from "@/config/index"; // 路径配置 | ||
| 24 | + | ||
| 23 | export default { | 25 | export default { |
| 24 | name: "downUpData", | 26 | name: "downUpData", |
| 25 | props: { | 27 | props: { |
| @@ -33,6 +35,24 @@ export default { | @@ -33,6 +35,24 @@ export default { | ||
| 33 | type: String, | 35 | type: String, |
| 34 | default: "", | 36 | default: "", |
| 35 | }, | 37 | }, |
| 38 | + }, | ||
| 39 | + computed: { | ||
| 40 | + uploadUrl: function () { | ||
| 41 | + | ||
| 42 | + var requestUrl = ''; | ||
| 43 | + | ||
| 44 | + var ogrinUrl = this.$props.url; | ||
| 45 | + | ||
| 46 | + var baseUrl = conf.baseURL; | ||
| 47 | + | ||
| 48 | + if (baseUrl == '/' && ogrinUrl.indexOf('/') == 0) { | ||
| 49 | + requestUrl = ogrinUrl; | ||
| 50 | + } | ||
| 51 | + else { | ||
| 52 | + requestUrl = baseUrl + ogrinUrl | ||
| 53 | + } | ||
| 54 | + return requestUrl; | ||
| 55 | + } | ||
| 36 | }, | 56 | }, |
| 37 | data() { | 57 | data() { |
| 38 | return { | 58 | return { |
src/views/basic/ask/analysis.vue
| @@ -132,7 +132,10 @@ export default { | @@ -132,7 +132,10 @@ export default { | ||
| 132 | if (this.types == 2) { | 132 | if (this.types == 2) { |
| 133 | title = this.subjectNames.join(); | 133 | title = this.subjectNames.join(); |
| 134 | } | 134 | } |
| 135 | - tablePrint("print-content", this.className + title + "_" + name); | 135 | + tablePrint({ |
| 136 | + id: "print-content", | ||
| 137 | + title: this.className + title + "_" + name | ||
| 138 | + }); | ||
| 136 | }, | 139 | }, |
| 137 | setType(type) { | 140 | setType(type) { |
| 138 | this.type = type; | 141 | this.type = type; |
src/views/basic/ask/archiving.vue
| @@ -104,8 +104,8 @@ | @@ -104,8 +104,8 @@ | ||
| 104 | </el-table-column> | 104 | </el-table-column> |
| 105 | <el-table-column align="center" :label="index == 0 ? '总参与度' : '参与度'" | 105 | <el-table-column align="center" :label="index == 0 ? '总参与度' : '参与度'" |
| 106 | :prop="'participationRate' + item"><template slot-scope="scoped"> | 106 | :prop="'participationRate' + item"><template slot-scope="scoped"> |
| 107 | - {{ scoped.row["participationRate" + item] }}% | ||
| 108 | - </template> | 107 | + {{ scoped.row["participationRate" + item] }}% |
| 108 | + </template> | ||
| 109 | </el-table-column> | 109 | </el-table-column> |
| 110 | <el-table-column align="center" :label="index == 0 ? '总正确率' : '正确率'" | 110 | <el-table-column align="center" :label="index == 0 ? '总正确率' : '正确率'" |
| 111 | :prop="'correctRate' + item"><template slot-scope="scoped">{{ scoped.row["correctRate" + item] | 111 | :prop="'correctRate' + item"><template slot-scope="scoped">{{ scoped.row["correctRate" + item] |
| @@ -233,8 +233,10 @@ export default { | @@ -233,8 +233,10 @@ export default { | ||
| 233 | methods: { | 233 | methods: { |
| 234 | print() { | 234 | print() { |
| 235 | tablePrint( | 235 | tablePrint( |
| 236 | - "print-content", | ||
| 237 | - "随堂问-已归档" + this.tabList[this.tabIndex - 1] | 236 | + { |
| 237 | + id: "print-content", | ||
| 238 | + title: "随堂问-已归档" + this.tabList[this.tabIndex - 1] | ||
| 239 | + } | ||
| 238 | ); | 240 | ); |
| 239 | }, | 241 | }, |
| 240 | changeSub(val) { | 242 | changeSub(val) { |
src/views/basic/ask/components/answerQustion.vue
| @@ -307,9 +307,9 @@ export default { | @@ -307,9 +307,9 @@ export default { | ||
| 307 | detail.map((items, index) => { | 307 | detail.map((items, index) => { |
| 308 | params["isRight" + index] = items.isRight; | 308 | params["isRight" + index] = items.isRight; |
| 309 | params["answer" + index] = | 309 | params["answer" + index] = |
| 310 | - items.answer == 1 | 310 | + items.answer == 1 && items.questionType == 4 |
| 311 | ? "✓" | 311 | ? "✓" |
| 312 | - : items.answer == 2 | 312 | + : items.answer == 2 && items.questionType == 4 |
| 313 | ? "✗" | 313 | ? "✗" |
| 314 | : items.answer; | 314 | : items.answer; |
| 315 | }); | 315 | }); |
src/views/basic/ask/components/example.vue
| @@ -17,16 +17,16 @@ | @@ -17,16 +17,16 @@ | ||
| 17 | scoped.row.answerCorrectRate }}%</template></el-table-column> | 17 | scoped.row.answerCorrectRate }}%</template></el-table-column> |
| 18 | <el-table-column prop="correctAnswer" label="正确答案" align="center"> | 18 | <el-table-column prop="correctAnswer" label="正确答案" align="center"> |
| 19 | <template slot-scope="scoped">{{ | 19 | <template slot-scope="scoped">{{ |
| 20 | - scoped.row.correctAnswer == 1 | 20 | + scoped.row.correctAnswer == 1 && scoped.row.questionType == 4 |
| 21 | ? "✓" | 21 | ? "✓" |
| 22 | - : scoped.row.correctAnswer == 2 | 22 | + : scoped.row.correctAnswer == 2 && scoped.row.questionType == 4 |
| 23 | ? "✗" | 23 | ? "✗" |
| 24 | : scoped.row.correctAnswer | 24 | : scoped.row.correctAnswer |
| 25 | }}</template></el-table-column> | 25 | }}</template></el-table-column> |
| 26 | <el-table-column prop="fallible" label="干扰答案" align="center"><template slot-scope="scoped">{{ | 26 | <el-table-column prop="fallible" label="干扰答案" align="center"><template slot-scope="scoped">{{ |
| 27 | - scoped.row.fallible == 1 | 27 | + scoped.row.fallible == 1 && scoped.row.questionType == 4 |
| 28 | ? "✓" | 28 | ? "✓" |
| 29 | - : scoped.row.fallible == 2 | 29 | + : scoped.row.fallible == 2 && scoped.row.questionType == 4 |
| 30 | ? "✗" | 30 | ? "✗" |
| 31 | : scoped.row.fallible | 31 | : scoped.row.fallible |
| 32 | }}</template></el-table-column> | 32 | }}</template></el-table-column> |
src/views/basic/askTestQuestion/components/askBzrMulti.vue
| 1 | <template> | 1 | <template> |
| 2 | <div style="margin-right: 20px;width: 100%"> | 2 | <div style="margin-right: 20px;width: 100%"> |
| 3 | <el-row class="row-type"> | 3 | <el-row class="row-type"> |
| 4 | - <label>阶段报表类型</label> | 4 | + <label>报表类型</label> |
| 5 | <el-select class="opration-select" v-model="currentType"> | 5 | <el-select class="opration-select" v-model="currentType"> |
| 6 | <el-option v-for="(item, index) in types" :lable="item" :key="index" :value="item" /> | 6 | <el-option v-for="(item, index) in types" :lable="item" :key="index" :value="item" /> |
| 7 | </el-select> | 7 | </el-select> |
| @@ -50,7 +50,8 @@ | @@ -50,7 +50,8 @@ | ||
| 50 | }}</template> | 50 | }}</template> |
| 51 | </el-table-column> | 51 | </el-table-column> |
| 52 | </el-table-column> | 52 | </el-table-column> |
| 53 | - <el-table-column label="查看雷达图" fixed="right" width="100" align="center"> | 53 | + <el-table-column label="查看雷达图" fixed="right" width="100" align="center" |
| 54 | + class-name="print-hidden"> | ||
| 54 | <template slot-scope="scoped"> | 55 | <template slot-scope="scoped"> |
| 55 | <el-button type="text" @click="openRandarChart(scoped.row)">查看</el-button> | 56 | <el-button type="text" @click="openRandarChart(scoped.row)">查看</el-button> |
| 56 | </template> | 57 | </template> |
| @@ -99,7 +100,7 @@ | @@ -99,7 +100,7 @@ | ||
| 99 | <el-dialog :append-to-body="true" class="chart-dia" :visible.sync="redarVisible" :title="radarChart.title" | 100 | <el-dialog :append-to-body="true" class="chart-dia" :visible.sync="redarVisible" :title="radarChart.title" |
| 100 | width="800"> | 101 | width="800"> |
| 101 | <div class="chart-box"> | 102 | <div class="chart-box"> |
| 102 | - <RadarChart id="radarChart" :params="radarChart" /> | 103 | + <RadarChart id="radarChart" :params="radarChart" :tooltipFormatter="true" /> |
| 103 | </div> | 104 | </div> |
| 104 | </el-dialog> | 105 | </el-dialog> |
| 105 | </div> | 106 | </div> |
| @@ -188,8 +189,29 @@ export default { | @@ -188,8 +189,29 @@ export default { | ||
| 188 | } | 189 | } |
| 189 | }, | 190 | }, |
| 190 | _print() { | 191 | _print() { |
| 192 | + var splitParam = 0; | ||
| 193 | + var diffNumber = 0; | ||
| 194 | + var diffStNumber = 0; | ||
| 195 | + if (this.currentType == '学生多科作答表现') { | ||
| 196 | + splitParam = 16; | ||
| 197 | + diffNumber = 2; | ||
| 198 | + diffStNumber = 15; | ||
| 199 | + } | ||
| 200 | + else if (this.currentType == '学生多科互动表现') { | ||
| 201 | + splitParam = 15; | ||
| 202 | + diffNumber = 4; | ||
| 203 | + diffStNumber = 14; | ||
| 204 | + } | ||
| 191 | 205 | ||
| 192 | - tablePrint("print-content", this.currentType); | 206 | + tablePrint({ |
| 207 | + id: "print-content", | ||
| 208 | + title: this.currentType, | ||
| 209 | + lindex: 1, | ||
| 210 | + splitParam: splitParam, | ||
| 211 | + fixedColumn: 2, | ||
| 212 | + diffNumber: diffNumber, | ||
| 213 | + diffStNumber: diffStNumber | ||
| 214 | + }); | ||
| 193 | }, | 215 | }, |
| 194 | async refresh() { | 216 | async refresh() { |
| 195 | await this._changeType(); | 217 | await this._changeType(); |
| @@ -264,7 +286,7 @@ export default { | @@ -264,7 +286,7 @@ export default { | ||
| 264 | 286 | ||
| 265 | let subjectName = []; | 287 | let subjectName = []; |
| 266 | 288 | ||
| 267 | - this.answersList = answersResponse.data.list?.map((item) => { | 289 | + this.answersList = answersResponse.data?.list?.map((item) => { |
| 268 | 290 | ||
| 269 | let params = {}; | 291 | let params = {}; |
| 270 | 292 | ||
| @@ -291,7 +313,6 @@ export default { | @@ -291,7 +313,6 @@ export default { | ||
| 291 | 313 | ||
| 292 | this.answersOptions = [...optionsList]; | 314 | this.answersOptions = [...optionsList]; |
| 293 | 315 | ||
| 294 | - console.log(this.answersList) | ||
| 295 | }, | 316 | }, |
| 296 | async _multiDisciplinaryInteraction() { | 317 | async _multiDisciplinaryInteraction() { |
| 297 | 318 | ||
| @@ -323,7 +344,7 @@ export default { | @@ -323,7 +344,7 @@ export default { | ||
| 323 | 344 | ||
| 324 | this.interactionList = interactionReponse.data?.list?.map((item) => { | 345 | this.interactionList = interactionReponse.data?.list?.map((item) => { |
| 325 | let params = {}; | 346 | let params = {}; |
| 326 | - item.dataList?.filter((items, index) => { | 347 | + item.dataList?.filter((items, index) => { |
| 327 | if (!subjectName.includes(items.subjectName) && items.subjectName != '全部科目') { | 348 | if (!subjectName.includes(items.subjectName) && items.subjectName != '全部科目') { |
| 328 | subjectName.push(items.subjectName); | 349 | subjectName.push(items.subjectName); |
| 329 | } | 350 | } |
src/views/basic/askTestQuestion/components/askListReport.vue
| @@ -3,35 +3,35 @@ | @@ -3,35 +3,35 @@ | ||
| 3 | <el-table class="default-table" :data="$props.datas" border> | 3 | <el-table class="default-table" :data="$props.datas" border> |
| 4 | <el-table-column prop="subjectName" label="科目" width="180" /> | 4 | <el-table-column prop="subjectName" label="科目" width="180" /> |
| 5 | <el-table-column prop="title" label="课时名称" /> | 5 | <el-table-column prop="title" label="课时名称" /> |
| 6 | - <el-table-column prop="participationRate" label="总参与度" width="180" > | 6 | + <el-table-column prop="participationRate" label="总参与度" width="180"> |
| 7 | <template slot-scope="scoped"> | 7 | <template slot-scope="scoped"> |
| 8 | {{ scoped.row.participationRate }}% | 8 | {{ scoped.row.participationRate }}% |
| 9 | </template> | 9 | </template> |
| 10 | </el-table-column> | 10 | </el-table-column> |
| 11 | - <el-table-column prop="answerCorrectRate" label="已答正确率" width="180" > | 11 | + <el-table-column prop="answerCorrectRate" label="已答正确率" width="180"> |
| 12 | <template slot-scope="scoped"> | 12 | <template slot-scope="scoped"> |
| 13 | {{ scoped.row.answerCorrectRate }}% | 13 | {{ scoped.row.answerCorrectRate }}% |
| 14 | </template> | 14 | </template> |
| 15 | </el-table-column> | 15 | </el-table-column> |
| 16 | - <el-table-column prop="classCorrectRate" label="班级正确率" width="180" > | 16 | + <el-table-column prop="classCorrectRate" label="班级正确率" width="180"> |
| 17 | <template slot-scope="scoped"> | 17 | <template slot-scope="scoped"> |
| 18 | - {{ scoped.row.classCorrectRate }}% | ||
| 19 | - </template> | 18 | + {{ scoped.row.classCorrectRate }}% |
| 19 | + </template> | ||
| 20 | </el-table-column> | 20 | </el-table-column> |
| 21 | <el-table-column prop="questionNum" label="题目总数" width="180" /> | 21 | <el-table-column prop="questionNum" label="题目总数" width="180" /> |
| 22 | <el-table-column prop="startTime" label="上课时间" width="220" /> | 22 | <el-table-column prop="startTime" label="上课时间" width="220" /> |
| 23 | <el-table-column label="操作" width="200"> | 23 | <el-table-column label="操作" width="200"> |
| 24 | <template slot-scope="scoped"> | 24 | <template slot-scope="scoped"> |
| 25 | - <template v-if="scoped.row.answerNum == 0"> | 25 | + <!-- <template v-if="scoped.row.answerNum == 0"> |
| 26 | <el-button v-if="role != 'ROLE_BANZHUREN'" type="text" | 26 | <el-button v-if="role != 'ROLE_BANZHUREN'" type="text" |
| 27 | @click="_edit(scoped.row)">设置答案</el-button> | 27 | @click="_edit(scoped.row)">设置答案</el-button> |
| 28 | <template v-else>未设置答案</template> | 28 | <template v-else>未设置答案</template> |
| 29 | - </template> | 29 | + </template> --> |
| 30 | <el-button type="text" @click="_linkToDetail(scoped.row)">查看</el-button> | 30 | <el-button type="text" @click="_linkToDetail(scoped.row)">查看</el-button> |
| 31 | - <el-popconfirm v-if="role != 'ROLE_BANZHUREN'" title="确定删除吗?" @confirm="_remove(scoped.row)"> | 31 | + <!-- <el-popconfirm v-if="role != 'ROLE_BANZHUREN'" title="确定删除吗?" @confirm="_remove(scoped.row)"> |
| 32 | <el-button class="remove-test" slot="reference" type="text" style="color:red;margin-left:10px" | 32 | <el-button class="remove-test" slot="reference" type="text" style="color:red;margin-left:10px" |
| 33 | :loading="scoped.row.loading">删除</el-button> | 33 | :loading="scoped.row.loading">删除</el-button> |
| 34 | - </el-popconfirm> | 34 | + </el-popconfirm> --> |
| 35 | </template> | 35 | </template> |
| 36 | </el-table-column> | 36 | </el-table-column> |
| 37 | </el-table> | 37 | </el-table> |
| @@ -70,13 +70,15 @@ export default { | @@ -70,13 +70,15 @@ export default { | ||
| 70 | }, | 70 | }, |
| 71 | }); | 71 | }); |
| 72 | }, | 72 | }, |
| 73 | - _edit(item) { | 73 | + _edit(item) { |
| 74 | this.$router.push({ | 74 | this.$router.push({ |
| 75 | path: "/examinationPaperEdit", | 75 | path: "/examinationPaperEdit", |
| 76 | query: { | 76 | query: { |
| 77 | paperId: item.id, | 77 | paperId: item.id, |
| 78 | title: item.title, | 78 | title: item.title, |
| 79 | type: 3, | 79 | type: 3, |
| 80 | + subjectName: item.subjectName, | ||
| 81 | + sectionName: item.sectionName | ||
| 80 | }, | 82 | }, |
| 81 | }); | 83 | }); |
| 82 | }, | 84 | }, |
src/views/basic/askTestQuestion/components/askSummaryReport.vue
| 1 | <template> | 1 | <template> |
| 2 | <div style="margin-right: 20px;width: 100%"> | 2 | <div style="margin-right: 20px;width: 100%"> |
| 3 | <el-row class="row-type"> | 3 | <el-row class="row-type"> |
| 4 | - <label>阶段报表类型</label> | 4 | + <label>报表类型</label> |
| 5 | <el-select class="opration-select" v-model="currentType"> | 5 | <el-select class="opration-select" v-model="currentType"> |
| 6 | <el-option v-for="(item, index) in types" :lable="item" :key="index" :value="item" /> | 6 | <el-option v-for="(item, index) in types" :lable="item" :key="index" :value="item" /> |
| 7 | </el-select> | 7 | </el-select> |
| @@ -13,75 +13,75 @@ | @@ -13,75 +13,75 @@ | ||
| 13 | <div id="print-content"> | 13 | <div id="print-content"> |
| 14 | <div v-if="currentType == '题目作答表现汇总'"> | 14 | <div v-if="currentType == '题目作答表现汇总'"> |
| 15 | <el-row class="row-subfix" style="margin-top:10px"> | 15 | <el-row class="row-subfix" style="margin-top:10px"> |
| 16 | - <div class="row-line"> | 16 | + <div class="row-line row-line"> |
| 17 | <span class="line-subfix">班级:</span> | 17 | <span class="line-subfix">班级:</span> |
| 18 | <span class="line-value">{{ detail.className }}</span> | 18 | <span class="line-value">{{ detail.className }}</span> |
| 19 | </div> | 19 | </div> |
| 20 | - <div class="row-line"> | 20 | + <div class="row-line row-line"> |
| 21 | <span class="line-subfix">科目:</span> | 21 | <span class="line-subfix">科目:</span> |
| 22 | <span class="line-value">{{ detail.subjectName }}</span> | 22 | <span class="line-value">{{ detail.subjectName }}</span> |
| 23 | </div> | 23 | </div> |
| 24 | - <div class="row-line"> | 24 | + <div class="row-line row-line"> |
| 25 | <span class="line-subfix">课时数:</span> | 25 | <span class="line-subfix">课时数:</span> |
| 26 | <span class="line-value">{{ $props.askReportIds.length }}</span> | 26 | <span class="line-value">{{ $props.askReportIds.length }}</span> |
| 27 | </div> | 27 | </div> |
| 28 | - <div class="row-line"> | 28 | + <div class="row-line "> |
| 29 | <span class="line-subfix">上课时间:</span> | 29 | <span class="line-subfix">上课时间:</span> |
| 30 | <span class="line-value">{{ detail.startTime }}</span> | 30 | <span class="line-value">{{ detail.startTime }}</span> |
| 31 | </div> | 31 | </div> |
| 32 | - <div class="row-line"> | 32 | + <div class="row-line "> |
| 33 | <span class="line-subfix">下课时间:</span> | 33 | <span class="line-subfix">下课时间:</span> |
| 34 | <span class="line-value">{{ detail.endTime }}</span> | 34 | <span class="line-value">{{ detail.endTime }}</span> |
| 35 | </div> | 35 | </div> |
| 36 | </el-row> | 36 | </el-row> |
| 37 | <el-row class="row-subfix"> | 37 | <el-row class="row-subfix"> |
| 38 | - <div class="row-line"> | 38 | + <div class="row-line row-line-5"> |
| 39 | <span class="line-subfix">班级人数:</span> | 39 | <span class="line-subfix">班级人数:</span> |
| 40 | <span class="line-value">{{ detail.classPersonNum }}</span> | 40 | <span class="line-value">{{ detail.classPersonNum }}</span> |
| 41 | </div> | 41 | </div> |
| 42 | - <div class="row-line"> | 42 | + <div class="row-line row-line-5"> |
| 43 | <span class="line-subfix">签到人数:</span> | 43 | <span class="line-subfix">签到人数:</span> |
| 44 | <span class="line-value">{{ detail.checkInCount }}</span> | 44 | <span class="line-value">{{ detail.checkInCount }}</span> |
| 45 | </div> | 45 | </div> |
| 46 | - <div class="row-line"> | 46 | + <div class="row-line row-line-5"> |
| 47 | <span class="line-subfix">题目总数:</span> | 47 | <span class="line-subfix">题目总数:</span> |
| 48 | <span class="line-value">{{ detail.questionNum }}</span> | 48 | <span class="line-value">{{ detail.questionNum }}</span> |
| 49 | </div> | 49 | </div> |
| 50 | - <div class="row-line"> | 50 | + <div class="row-line row-line-5"> |
| 51 | <span class="line-subfix">答题总数:</span> | 51 | <span class="line-subfix">答题总数:</span> |
| 52 | <span class="line-value">{{ detail.totalAnswersNum }}</span> | 52 | <span class="line-value">{{ detail.totalAnswersNum }}</span> |
| 53 | </div> | 53 | </div> |
| 54 | - <div class="row-line"> | 54 | + <div class="row-line row-line-5"> |
| 55 | <span class="line-subfix">课时时长:</span> | 55 | <span class="line-subfix">课时时长:</span> |
| 56 | - <span class="line-value">{{ setDuration(detail.duration) }}</span> | 56 | + <span class="line-value">{{ setDuration(detail.consumingDuration) }}</span> |
| 57 | </div> | 57 | </div> |
| 58 | </el-row> | 58 | </el-row> |
| 59 | <el-row class="row-subfix"> | 59 | <el-row class="row-subfix"> |
| 60 | - <div class="row-line"> | 60 | + <div class="row-line row-line-5"> |
| 61 | <span class="line-subfix">答对总数:</span> | 61 | <span class="line-subfix">答对总数:</span> |
| 62 | <span class="line-value">{{ detail.totalCorrectAnswersNum }}</span> | 62 | <span class="line-value">{{ detail.totalCorrectAnswersNum }}</span> |
| 63 | </div> | 63 | </div> |
| 64 | - <div class="row-line"> | 64 | + <div class="row-line row-line-5"> |
| 65 | <span class="line-subfix">总参与度:</span> | 65 | <span class="line-subfix">总参与度:</span> |
| 66 | <span class="line-value">{{ detail.participationRate ? detail.participationRate : 0 }}%</span> | 66 | <span class="line-value">{{ detail.participationRate ? detail.participationRate : 0 }}%</span> |
| 67 | </div> | 67 | </div> |
| 68 | - <div class="row-line"> | 68 | + <div class="row-line row-line-5"> |
| 69 | <span class="line-subfix">班级正确率:</span> | 69 | <span class="line-subfix">班级正确率:</span> |
| 70 | <span class="line-value">{{ detail.classCorrectRate ? detail.classCorrectRate : 0 }}%</span> | 70 | <span class="line-value">{{ detail.classCorrectRate ? detail.classCorrectRate : 0 }}%</span> |
| 71 | </div> | 71 | </div> |
| 72 | - <div class="row-line"> | 72 | + <div class="row-line row-line-5"> |
| 73 | <span class="line-subfix">已达正确率:</span> | 73 | <span class="line-subfix">已达正确率:</span> |
| 74 | <span class="line-value">{{ detail.answerCorrectRate ? detail.answerCorrectRate : 0 }}%</span> | 74 | <span class="line-value">{{ detail.answerCorrectRate ? detail.answerCorrectRate : 0 }}%</span> |
| 75 | </div> | 75 | </div> |
| 76 | - <div class="row-line"> | 76 | + <div class="row-line row-line-5"> |
| 77 | <span class="line-subfix">反馈时长:</span> | 77 | <span class="line-subfix">反馈时长:</span> |
| 78 | - <span class="line-value">{{ setDuration(detail.consumingDuration) }}</span> | 78 | + <span class="line-value">{{ setDuration(detail.duration) }}</span> |
| 79 | </div> | 79 | </div> |
| 80 | </el-row> | 80 | </el-row> |
| 81 | <el-row class="row-table"> | 81 | <el-row class="row-table"> |
| 82 | <el-table class="default-table" :data="singleSubjectSummary" border> | 82 | <el-table class="default-table" :data="singleSubjectSummary" border> |
| 83 | <el-table-column prop="title" label="课时-题号" /> | 83 | <el-table-column prop="title" label="课时-题号" /> |
| 84 | - <el-table-column label="题干" width="80"> | 84 | + <el-table-column label="题干" class-name="print-hidden" width="80"> |
| 85 | <template slot-scope="scoped"> | 85 | <template slot-scope="scoped"> |
| 86 | <el-button type="text" @click="openStem(scoped.row)">查看</el-button> | 86 | <el-button type="text" @click="openStem(scoped.row)">查看</el-button> |
| 87 | </template> | 87 | </template> |
| @@ -104,9 +104,10 @@ | @@ -104,9 +104,10 @@ | ||
| 104 | 104 | ||
| 105 | <el-table-column prop="knowledge" label="知识点(单题)" width="150"> | 105 | <el-table-column prop="knowledge" label="知识点(单题)" width="150"> |
| 106 | <template slot-scope="scoped"> | 106 | <template slot-scope="scoped"> |
| 107 | - <el-tooltip effect="dark" :content="scoped.row.knowledge" placement="left"> | 107 | + <el-tooltip effect="dark" :content="_knowledge(scoped.row.knowledge)" |
| 108 | + placement="bottom"> | ||
| 108 | <span class="overflowText"> | 109 | <span class="overflowText"> |
| 109 | - {{ scoped.row.knowledge }} | 110 | + {{ _knowledge(scoped.row.knowledge) }} |
| 110 | </span> | 111 | </span> |
| 111 | </el-tooltip> | 112 | </el-tooltip> |
| 112 | </template> | 113 | </template> |
| @@ -114,8 +115,8 @@ | @@ -114,8 +115,8 @@ | ||
| 114 | <el-table-column prop="correctAnswer" label="正确答案(单题)" width="150"> | 115 | <el-table-column prop="correctAnswer" label="正确答案(单题)" width="150"> |
| 115 | <template slot-scope="scoped"> | 116 | <template slot-scope="scoped"> |
| 116 | {{ | 117 | {{ |
| 117 | - scoped.row.correctAnswer == 1 ? "✓" : | ||
| 118 | - scoped.row.correctAnswer == 2 ? "✗" : | 118 | + scoped.row.questionType == 4 && scoped.row.correctAnswer == 1 ? "✓" : |
| 119 | + scoped.row.questionType == 4 && scoped.row.correctAnswer == 2 ? "✗" : | ||
| 119 | scoped.row.correctAnswer | 120 | scoped.row.correctAnswer |
| 120 | }} | 121 | }} |
| 121 | </template> | 122 | </template> |
| @@ -123,8 +124,8 @@ | @@ -123,8 +124,8 @@ | ||
| 123 | <el-table-column prop="fallible" label="干扰选项(单题)" width="150"> | 124 | <el-table-column prop="fallible" label="干扰选项(单题)" width="150"> |
| 124 | <template slot-scope="scoped"> | 125 | <template slot-scope="scoped"> |
| 125 | {{ | 126 | {{ |
| 126 | - scoped.row.fallible == 1 ? "✓" : | ||
| 127 | - scoped.row.fallible == 2 ? "✗" : | 127 | + scoped.row.questionType == 4 && scoped.row.fallible == 1 ? "✓" : |
| 128 | + scoped.row.questionType == 4 && scoped.row.fallible == 2 ? "✗" : | ||
| 128 | scoped.row.fallible | 129 | scoped.row.fallible |
| 129 | }} | 130 | }} |
| 130 | </template> | 131 | </template> |
| @@ -134,48 +135,52 @@ | @@ -134,48 +135,52 @@ | ||
| 134 | </div> | 135 | </div> |
| 135 | <div v-if="currentType == '学生单科表现作答汇总表'"> | 136 | <div v-if="currentType == '学生单科表现作答汇总表'"> |
| 136 | <el-row class="row-subfix" style="margin-top:10px"> | 137 | <el-row class="row-subfix" style="margin-top:10px"> |
| 137 | - <div class="row-line"> | 138 | + <div class="row-line row-line-4"> |
| 138 | <span class="line-subfix">班级:</span> | 139 | <span class="line-subfix">班级:</span> |
| 139 | <span class="line-value">{{ detail.className }}</span> | 140 | <span class="line-value">{{ detail.className }}</span> |
| 140 | </div> | 141 | </div> |
| 141 | - <div class="row-line"> | 142 | + <div class="row-line row-line-4"> |
| 142 | <span class="line-subfix">科目:</span> | 143 | <span class="line-subfix">科目:</span> |
| 143 | <span class="line-value">{{ detail.subjectName }}</span> | 144 | <span class="line-value">{{ detail.subjectName }}</span> |
| 144 | </div> | 145 | </div> |
| 145 | - <div class="row-line"> | ||
| 146 | - <span class="line-subfix">开始时间:</span> | ||
| 147 | - <span class="line-value">{{ $props.queryParams.dateRange[0] }}</span> | 146 | + <div class="row-line row-line-4"> |
| 147 | + <span class="line-subfix">开始日期:</span> | ||
| 148 | + <span class="line-value">{{ $props.queryParams.dateRange && $props.queryParams.dateRange.length | ||
| 149 | + > 1 ? | ||
| 150 | + $props.queryParams.dateRange[0] : "" }}</span> | ||
| 148 | </div> | 151 | </div> |
| 149 | - <div class="row-line"> | ||
| 150 | - <span class="line-subfix">截止时间:</span> | ||
| 151 | - <span class="line-value">{{ $props.queryParams.dateRange[1] }}</span> | 152 | + <div class="row-line row-line-4"> |
| 153 | + <span class="line-subfix">截止日期:</span> | ||
| 154 | + <span class="line-value">{{ $props.queryParams.dateRange && $props.queryParams.dateRange.length | ||
| 155 | + > 1 ? | ||
| 156 | + $props.queryParams.dateRange[1] : "" }}</span> | ||
| 152 | </div> | 157 | </div> |
| 153 | - <div class="row-line"> | 158 | + <!-- <div class="row-line"> |
| 154 | <span class="line-subfix">下课时间:</span> | 159 | <span class="line-subfix">下课时间:</span> |
| 155 | <span class="line-value">{{ detail.endTime }}</span> | 160 | <span class="line-value">{{ detail.endTime }}</span> |
| 156 | - </div> | 161 | + </div> --> |
| 157 | </el-row> | 162 | </el-row> |
| 158 | <el-row class="row-subfix"> | 163 | <el-row class="row-subfix"> |
| 159 | - <div class="row-line"> | 164 | + <div class="row-line row-line-4"> |
| 160 | <span class="line-subfix">课时数:</span> | 165 | <span class="line-subfix">课时数:</span> |
| 161 | <span class="line-value">{{ $props.askReportIds.length }}</span> | 166 | <span class="line-value">{{ $props.askReportIds.length }}</span> |
| 162 | </div> | 167 | </div> |
| 163 | - <div class="row-line"> | 168 | + <div class="row-line row-line-4"> |
| 164 | <span class="line-subfix">总出题数:</span> | 169 | <span class="line-subfix">总出题数:</span> |
| 165 | <span class="line-value">{{ detail.questionNum }}</span> | 170 | <span class="line-value">{{ detail.questionNum }}</span> |
| 166 | </div> | 171 | </div> |
| 167 | - <div class="row-line"> | 172 | + <div class="row-line row-line-4"> |
| 168 | <span class="line-subfix">查询时间:</span> | 173 | <span class="line-subfix">查询时间:</span> |
| 169 | <span class="line-value">{{ detail.selectDate }}</span> | 174 | <span class="line-value">{{ detail.selectDate }}</span> |
| 170 | </div> | 175 | </div> |
| 171 | - <div class="row-line"> | 176 | + <div class="row-line row-line-4"> |
| 172 | <span class="line-subfix">查询老师:</span> | 177 | <span class="line-subfix">查询老师:</span> |
| 173 | - <span class="line-value">{{ detail.answerCorrectRate }}</span> | 178 | + <span class="line-value">{{ this.$store.getters.info.name }}</span> |
| 174 | </div> | 179 | </div> |
| 175 | - <div class="row-line"> | 180 | + <!-- <div class="row-line row-line-5"> |
| 176 | <span class="line-subfix">课时时长:</span> | 181 | <span class="line-subfix">课时时长:</span> |
| 177 | <span class="line-value">{{ setDuration(detail.consumingDuration) }}</span> | 182 | <span class="line-value">{{ setDuration(detail.consumingDuration) }}</span> |
| 178 | - </div> | 183 | + </div> --> |
| 179 | </el-row> | 184 | </el-row> |
| 180 | <el-row class="row-table"> | 185 | <el-row class="row-table"> |
| 181 | <el-table class="default-table" :data="studentPerformance"> | 186 | <el-table class="default-table" :data="studentPerformance"> |
| @@ -194,7 +199,7 @@ | @@ -194,7 +199,7 @@ | ||
| 194 | <el-table-column prop="answerCorrectRate" label="已答正确率" width="120"> | 199 | <el-table-column prop="answerCorrectRate" label="已答正确率" width="120"> |
| 195 | <template slot-scope="scoped">{{ scoped.row.answerCorrectRate }}%</template> | 200 | <template slot-scope="scoped">{{ scoped.row.answerCorrectRate }}%</template> |
| 196 | </el-table-column> | 201 | </el-table-column> |
| 197 | - <el-table-column prop="correctAnswerNum" label="查看折线图" width="120"> | 202 | + <el-table-column prop="correctAnswerNum" label="查看折线图" class-name="print-hidden" width="120"> |
| 198 | <template slot-scope="scoped"> | 203 | <template slot-scope="scoped"> |
| 199 | <el-button type="text" text @click="openLineChart(scoped.row)">查看</el-button> | 204 | <el-button type="text" text @click="openLineChart(scoped.row)">查看</el-button> |
| 200 | </template> | 205 | </template> |
| @@ -225,25 +230,27 @@ | @@ -225,25 +230,27 @@ | ||
| 225 | </div> | 230 | </div> |
| 226 | </el-dialog> | 231 | </el-dialog> |
| 227 | <el-dialog :append-to-body="true" class="stem" :visible.sync="stem.visible" :title="'题干'" width="800"> | 232 | <el-dialog :append-to-body="true" class="stem" :visible.sync="stem.visible" :title="'题干'" width="800"> |
| 228 | - <iframe v-if="stem && stem.src" :src="stem.src" style="width: 100%;min-height: 400px;" /> | 233 | + <Preview v-if="stem && stem.src" :src="stem.src" :key="stem.src" /> |
| 229 | </el-dialog> | 234 | </el-dialog> |
| 230 | <ExportDia :exportStudent="exportStudent" :diaShow="diaShow" @cancel="cancel" @exportData="_exportData" | 235 | <ExportDia :exportStudent="exportStudent" :diaShow="diaShow" @cancel="cancel" @exportData="_exportData" |
| 231 | :type="'折线图'" /> | 236 | :type="'折线图'" /> |
| 232 | </div> | 237 | </div> |
| 233 | </template> | 238 | </template> |
| 234 | <script> | 239 | <script> |
| 235 | -import { formatDate,getKnowledge } from "utils"; | 240 | +import { formatDate, getKnowledge } from "utils"; |
| 236 | import { downloadFile, tablePrint } from "@/utils"; | 241 | import { downloadFile, tablePrint } from "@/utils"; |
| 237 | import LineChart from "@/components/charts/lineChart"; | 242 | import LineChart from "@/components/charts/lineChart"; |
| 243 | +import Preview from "@/components/preview"; | ||
| 238 | export default { | 244 | export default { |
| 239 | name: "askSummaryReport", | 245 | name: "askSummaryReport", |
| 240 | components: { | 246 | components: { |
| 241 | - LineChart | 247 | + LineChart, |
| 248 | + Preview | ||
| 242 | }, | 249 | }, |
| 243 | props: { | 250 | props: { |
| 244 | askReportIds: Array, | 251 | askReportIds: Array, |
| 245 | queryParams: Object, | 252 | queryParams: Object, |
| 246 | - role: "", | 253 | + role: "", |
| 247 | }, | 254 | }, |
| 248 | 255 | ||
| 249 | watch: { | 256 | watch: { |
| @@ -282,6 +289,7 @@ export default { | @@ -282,6 +289,7 @@ export default { | ||
| 282 | }, | 289 | }, |
| 283 | //题干数据对象 | 290 | //题干数据对象 |
| 284 | stem: { | 291 | stem: { |
| 292 | + type: "html", | ||
| 285 | visible: false, | 293 | visible: false, |
| 286 | src: null | 294 | src: null |
| 287 | } | 295 | } |
| @@ -292,13 +300,19 @@ export default { | @@ -292,13 +300,19 @@ export default { | ||
| 292 | await this._detail(); | 300 | await this._detail(); |
| 293 | }, | 301 | }, |
| 294 | methods: { | 302 | methods: { |
| 303 | + _knowledge(knowledgeParam) { | ||
| 304 | + return getKnowledge(knowledgeParam) | ||
| 305 | + }, | ||
| 295 | _export() { | 306 | _export() { |
| 296 | this.diaShow = true; | 307 | this.diaShow = true; |
| 297 | }, | 308 | }, |
| 298 | _print() { | 309 | _print() { |
| 299 | - let title = this.detail.title || this.subjectNames.join(); | ||
| 300 | 310 | ||
| 301 | - tablePrint("print-content", title + "_" + this.currentType); | 311 | + let title = this.detail.title || this.subjectNames?.join(); |
| 312 | + tablePrint({ | ||
| 313 | + id: "print-content", | ||
| 314 | + title: title + "_" + this.currentType | ||
| 315 | + }); | ||
| 302 | }, | 316 | }, |
| 303 | cancel() { | 317 | cancel() { |
| 304 | this.diaShow = false; | 318 | this.diaShow = false; |
| @@ -307,7 +321,9 @@ export default { | @@ -307,7 +321,9 @@ export default { | ||
| 307 | 321 | ||
| 308 | let studentIds = arr; | 322 | let studentIds = arr; |
| 309 | 323 | ||
| 310 | - let query = {}; | 324 | + let query = { |
| 325 | + size: 9999 | ||
| 326 | + }; | ||
| 311 | 327 | ||
| 312 | if (studentIds != null) { | 328 | if (studentIds != null) { |
| 313 | if (studentIds.length > 0) { | 329 | if (studentIds.length > 0) { |
| @@ -348,6 +364,7 @@ export default { | @@ -348,6 +364,7 @@ export default { | ||
| 348 | await this._detail(); | 364 | await this._detail(); |
| 349 | }, | 365 | }, |
| 350 | async _changeType() { | 366 | async _changeType() { |
| 367 | + this.detail.selectDate = formatDate(new Date(), "yyyy-MM-dd"); | ||
| 351 | switch (this.currentType) { | 368 | switch (this.currentType) { |
| 352 | case "题目作答表现汇总": { await this._singleSubjectSummary(); }; break; | 369 | case "题目作答表现汇总": { await this._singleSubjectSummary(); }; break; |
| 353 | case "学生单科表现作答汇总表": { await this._studentPerformance(); }; break; | 370 | case "学生单科表现作答汇总表": { await this._studentPerformance(); }; break; |
| @@ -422,8 +439,10 @@ export default { | @@ -422,8 +439,10 @@ export default { | ||
| 422 | this.$message.error(detailReponse.info); | 439 | this.$message.error(detailReponse.info); |
| 423 | return; | 440 | return; |
| 424 | } | 441 | } |
| 442 | + | ||
| 425 | this.detail = detailReponse.data; | 443 | this.detail = detailReponse.data; |
| 426 | - this.detail.selectDate = formatDate(new Date(), "yyyy-MM-dd"); | 444 | + |
| 445 | + | ||
| 427 | }, | 446 | }, |
| 428 | async _singleSubjectSummary() { | 447 | async _singleSubjectSummary() { |
| 429 | 448 | ||
| @@ -439,6 +458,7 @@ export default { | @@ -439,6 +458,7 @@ export default { | ||
| 439 | let query = { | 458 | let query = { |
| 440 | periodIds: this.$props.askReportIds, | 459 | periodIds: this.$props.askReportIds, |
| 441 | classIds: [this.$props.queryParams.class], | 460 | classIds: [this.$props.queryParams.class], |
| 461 | + size: 9999 | ||
| 442 | }; | 462 | }; |
| 443 | 463 | ||
| 444 | let periodListReponse = await periodList({ | 464 | let periodListReponse = await periodList({ |
| @@ -538,10 +558,11 @@ export default { | @@ -538,10 +558,11 @@ export default { | ||
| 538 | name: "已答正确率", | 558 | name: "已答正确率", |
| 539 | value: answerCorrectRate, | 559 | value: answerCorrectRate, |
| 540 | }, | 560 | }, |
| 541 | - ]; | 561 | + ]; |
| 542 | }, | 562 | }, |
| 543 | openStem(stemRow) { | 563 | openStem(stemRow) { |
| 544 | this.stem.src = stemRow.screenshot ?? ""; | 564 | this.stem.src = stemRow.screenshot ?? ""; |
| 565 | + console.log('stem', this.stem) | ||
| 545 | this.stem.visible = true; | 566 | this.stem.visible = true; |
| 546 | }, | 567 | }, |
| 547 | openExport() { | 568 | openExport() { |
| @@ -584,6 +605,20 @@ export default { | @@ -584,6 +605,20 @@ export default { | ||
| 584 | } | 605 | } |
| 585 | } | 606 | } |
| 586 | 607 | ||
| 608 | +.row-line-4 { | ||
| 609 | + width: calc(25% - 4px); | ||
| 610 | + border: 1px solid #ebeef5; | ||
| 611 | + background: #f5f7fa; | ||
| 612 | + display: inline-block; | ||
| 613 | + height: 40px; | ||
| 614 | + line-height: 40px; | ||
| 615 | + | ||
| 616 | + .line-subfix { | ||
| 617 | + margin-left: 10px; | ||
| 618 | + | ||
| 619 | + } | ||
| 620 | +} | ||
| 621 | + | ||
| 587 | .row-table { | 622 | .row-table { |
| 588 | margin-top: 20px; | 623 | margin-top: 20px; |
| 589 | } | 624 | } |
src/views/basic/askTestQuestion/components/testBzrMulti.vue
| 1 | <template> | 1 | <template> |
| 2 | <div style="margin-right: 20px;width: 100%"> | 2 | <div style="margin-right: 20px;width: 100%"> |
| 3 | <div v-if="status == 'select'"> | 3 | <div v-if="status == 'select'"> |
| 4 | - <el-row class="row-type"> | 4 | + <el-row class="row-type print-hidden"> |
| 5 | 5 | ||
| 6 | <div style="float: right;"> | 6 | <div style="float: right;"> |
| 7 | <el-button type="primary" :disabled="multipleSelection.length < 1" class="opration-btn" | 7 | <el-button type="primary" :disabled="multipleSelection.length < 1" class="opration-btn" |
| @@ -28,7 +28,10 @@ | @@ -28,7 +28,10 @@ | ||
| 28 | <div v-if="status == 'selected'"> | 28 | <div v-if="status == 'selected'"> |
| 29 | <el-container style="height: 100%;width: 100%;"> | 29 | <el-container style="height: 100%;width: 100%;"> |
| 30 | <el-main id="print-content"> | 30 | <el-main id="print-content"> |
| 31 | - <el-row class="row-type"> | 31 | + <el-row class="row-type print-hidden"> |
| 32 | + <div style="float: left;"> | ||
| 33 | + <el-button @click="_backa">返回</el-button> | ||
| 34 | + </div> | ||
| 32 | <div style="float: right;"> | 35 | <div style="float: right;"> |
| 33 | <el-button type="primary" @click="_import" class="opration-btn" | 36 | <el-button type="primary" @click="_import" class="opration-btn" |
| 34 | icon="el-icon-upload2">导出报表</el-button> | 37 | icon="el-icon-upload2">导出报表</el-button> |
| @@ -83,26 +86,21 @@ | @@ -83,26 +86,21 @@ | ||
| 83 | }}</template> | 86 | }}</template> |
| 84 | </el-table-column> | 87 | </el-table-column> |
| 85 | </el-table-column> | 88 | </el-table-column> |
| 86 | - <el-table-column label="查看雷达图"> | 89 | + <el-table-column label="查看雷达图" class-name="print-hidden"> |
| 87 | <template slot-scope="scoped"> | 90 | <template slot-scope="scoped"> |
| 88 | <el-button type="text" @click="openRandarChart(scoped.row)">查看</el-button> | 91 | <el-button type="text" @click="openRandarChart(scoped.row)">查看</el-button> |
| 89 | </template> | 92 | </template> |
| 90 | </el-table-column> | 93 | </el-table-column> |
| 91 | </el-table> | 94 | </el-table> |
| 92 | </el-row> | 95 | </el-row> |
| 93 | - </el-main> | ||
| 94 | - <el-footer> | ||
| 95 | - <div style="float: right;margin-top: 10px;"> | ||
| 96 | - <el-button @click="_backa">返回</el-button> | ||
| 97 | - </div> | ||
| 98 | - </el-footer> | 96 | + </el-main> |
| 99 | </el-container> | 97 | </el-container> |
| 100 | 98 | ||
| 101 | </div> | 99 | </div> |
| 102 | <el-dialog class="chart-dia" :visible.sync="redarVisible" :title="radarChart.title" width="800" | 100 | <el-dialog class="chart-dia" :visible.sync="redarVisible" :title="radarChart.title" width="800" |
| 103 | :append-to-body="true"> | 101 | :append-to-body="true"> |
| 104 | <div class="chart-box"> | 102 | <div class="chart-box"> |
| 105 | - <RadarChart id="testRadarChart" :params="radarChart" /> | 103 | + <RadarChart id="testRadarChart" :params="radarChart" /> |
| 106 | </div> | 104 | </div> |
| 107 | </el-dialog> | 105 | </el-dialog> |
| 108 | </div> | 106 | </div> |
| @@ -171,7 +169,15 @@ export default { | @@ -171,7 +169,15 @@ export default { | ||
| 171 | }, | 169 | }, |
| 172 | methods: { | 170 | methods: { |
| 173 | _print() { | 171 | _print() { |
| 174 | - tablePrint("print-content", this.currentType); | 172 | + tablePrint({ |
| 173 | + id: "print-content", | ||
| 174 | + title: this.currentType, | ||
| 175 | + lindex: 1, | ||
| 176 | + splitParam: 16, | ||
| 177 | + fixedColumn: 2, | ||
| 178 | + diffNumber: 2, | ||
| 179 | + diffStNumber: 15 | ||
| 180 | + }); | ||
| 175 | }, | 181 | }, |
| 176 | _checkAll() { | 182 | _checkAll() { |
| 177 | // this.multipleSelection = [...] | 183 | // this.multipleSelection = [...] |
| @@ -276,9 +282,9 @@ export default { | @@ -276,9 +282,9 @@ export default { | ||
| 276 | this.exportStudent = []; | 282 | this.exportStudent = []; |
| 277 | }, | 283 | }, |
| 278 | openRandarChart(obj) { | 284 | openRandarChart(obj) { |
| 279 | - | 285 | + |
| 280 | let max = 0; | 286 | let max = 0; |
| 281 | - | 287 | + |
| 282 | const dataList = obj.dataList.slice(1, obj.dataList.length); | 288 | const dataList = obj.dataList.slice(1, obj.dataList.length); |
| 283 | let subjectList = dataList.map((item) => { | 289 | let subjectList = dataList.map((item) => { |
| 284 | let score = Number(item.highestScore || item.score); | 290 | let score = Number(item.highestScore || item.score); |
| @@ -330,10 +336,10 @@ export default { | @@ -330,10 +336,10 @@ export default { | ||
| 330 | value: dataList.map((item) => item.score), | 336 | value: dataList.map((item) => item.score), |
| 331 | name: "本人得分", | 337 | name: "本人得分", |
| 332 | }, | 338 | }, |
| 333 | - ]; | 339 | + ]; |
| 334 | 340 | ||
| 335 | this.radarChart.title = obj.studentName + "-多科阶段作答表现图"; | 341 | this.radarChart.title = obj.studentName + "-多科阶段作答表现图"; |
| 336 | - console.log(this.radarChart) | 342 | + |
| 337 | this.redarVisible = true; | 343 | this.redarVisible = true; |
| 338 | }, | 344 | }, |
| 339 | async _loadData() { | 345 | async _loadData() { |
src/views/basic/askTestQuestion/components/testListReport.vue
| @@ -150,7 +150,9 @@ export default { | @@ -150,7 +150,9 @@ export default { | ||
| 150 | paperId: item.id, | 150 | paperId: item.id, |
| 151 | title: item.title, | 151 | title: item.title, |
| 152 | type: 2, //搜索题目详情类型 | 152 | type: 2, //搜索题目详情类型 |
| 153 | - examType: item.examPaperId == 0 ? 1 : 2, | 153 | + examType: item.examPaperId == 0 ? 1 : 2, |
| 154 | + subjectName: item.subjectName, | ||
| 155 | + sectionName: item.sectionName | ||
| 154 | }, | 156 | }, |
| 155 | }); | 157 | }); |
| 156 | }, | 158 | }, |
src/views/basic/askTestQuestion/components/testMultiClassReport.vue
| 1 | <template> | 1 | <template> |
| 2 | <div style="margin-right: 20px;width: 100%"> | 2 | <div style="margin-right: 20px;width: 100%"> |
| 3 | <el-row class="row-type"> | 3 | <el-row class="row-type"> |
| 4 | - <label>阶段报表类型</label> | 4 | + <label>报表类型</label> |
| 5 | <el-select class="opration-select" v-model="currentType" style="margin-left: 10px;"> | 5 | <el-select class="opration-select" v-model="currentType" style="margin-left: 10px;"> |
| 6 | <el-option v-for="(item, index) in types" :lable="item" :key="index" :value="item" /> | 6 | <el-option v-for="(item, index) in types" :lable="item" :key="index" :value="item" /> |
| 7 | </el-select> | 7 | </el-select> |
| @@ -9,11 +9,12 @@ | @@ -9,11 +9,12 @@ | ||
| 9 | <el-row class="row-type" style="margin-top: 10px;"> | 9 | <el-row class="row-type" style="margin-top: 10px;"> |
| 10 | <el-table v-if="$props.params" class="default-table" :data="listReport"> | 10 | <el-table v-if="$props.params" class="default-table" :data="listReport"> |
| 11 | <el-table-column prop="subjectName" label="科目" width="100" /> | 11 | <el-table-column prop="subjectName" label="科目" width="100" /> |
| 12 | - <el-table-column prop="paperName" label="试卷名称" /> | 12 | + <el-table-column prop="paperName" label="试卷名称" /> |
| 13 | <el-table-column prop="classCorrectRate" label="已考班级"> | 13 | <el-table-column prop="classCorrectRate" label="已考班级"> |
| 14 | <template slot-scope="scoped"> | 14 | <template slot-scope="scoped"> |
| 15 | <el-checkbox-group v-model="scoped.row.checkedClassList"> | 15 | <el-checkbox-group v-model="scoped.row.checkedClassList"> |
| 16 | - <el-checkbox :key="index" v-for="(item, index) in scoped.row.classInfos" :label="item.classId"> | 16 | + <el-checkbox :key="index" v-for="(item, index) in scoped.row.classInfos" |
| 17 | + :label="item.classId"> | ||
| 17 | {{ item.className }} | 18 | {{ item.className }} |
| 18 | </el-checkbox> | 19 | </el-checkbox> |
| 19 | </el-checkbox-group> | 20 | </el-checkbox-group> |
| @@ -48,7 +49,7 @@ export default { | @@ -48,7 +49,7 @@ export default { | ||
| 48 | } | 49 | } |
| 49 | }, | 50 | }, |
| 50 | methods: { | 51 | methods: { |
| 51 | - _linkToDetail(dataRow) { | 52 | + _linkToDetail(dataRow) { |
| 52 | this.$router.push({ | 53 | this.$router.push({ |
| 53 | path: "/testReportDetail", | 54 | path: "/testReportDetail", |
| 54 | query: { | 55 | query: { |
| @@ -62,7 +63,7 @@ export default { | @@ -62,7 +63,7 @@ export default { | ||
| 62 | }); | 63 | }); |
| 63 | }, | 64 | }, |
| 64 | async _loadDatas() { | 65 | async _loadDatas() { |
| 65 | - | 66 | + |
| 66 | var dataRequestParams = { | 67 | var dataRequestParams = { |
| 67 | classIds: this.$props.params.class ? [this.$props.params.class] : | 68 | classIds: this.$props.params.class ? [this.$props.params.class] : |
| 68 | this.$props.params.classIds ? [...this.$props.params.classIds] : null, | 69 | this.$props.params.classIds ? [...this.$props.params.classIds] : null, |
| @@ -72,7 +73,7 @@ export default { | @@ -72,7 +73,7 @@ export default { | ||
| 72 | subjects: this.$props.params.subject ? [this.$props.params.subject] : | 73 | subjects: this.$props.params.subject ? [this.$props.params.subject] : |
| 73 | this.$props.params.subjects ? [...this.$props.params.subjects] : null | 74 | this.$props.params.subjects ? [...this.$props.params.subjects] : null |
| 74 | }; | 75 | }; |
| 75 | - | 76 | + |
| 76 | var dataRequest = this.$request.tListExamReport; | 77 | var dataRequest = this.$request.tListExamReport; |
| 77 | 78 | ||
| 78 | 79 |
src/views/basic/askTestQuestion/components/testSummaryReport.vue
| @@ -51,7 +51,7 @@ | @@ -51,7 +51,7 @@ | ||
| 51 | }}</template> | 51 | }}</template> |
| 52 | </el-table-column> | 52 | </el-table-column> |
| 53 | </el-table-column> | 53 | </el-table-column> |
| 54 | - <el-table-column label="查看折线图" fixed="right" align="center" width="120"> | 54 | + <el-table-column label="查看折线图" class-name="print-hidden" fixed="right" align="center" width="120"> |
| 55 | <template slot-scope="scoped"> | 55 | <template slot-scope="scoped"> |
| 56 | <el-button type="text" @click="_openLineChart(scoped.row)">查看</el-button> | 56 | <el-button type="text" @click="_openLineChart(scoped.row)">查看</el-button> |
| 57 | </template> | 57 | </template> |
| @@ -133,11 +133,15 @@ export default { | @@ -133,11 +133,15 @@ export default { | ||
| 133 | let query = { | 133 | let query = { |
| 134 | examIds: this.$props.testReportIds, | 134 | examIds: this.$props.testReportIds, |
| 135 | classIds: [this.$props.queryParams.class], | 135 | classIds: [this.$props.queryParams.class], |
| 136 | - subjectName: [this.$props.queryParams.subject], | ||
| 137 | - startDay: this.$props.queryParams.dateRange[0] ?? null, | ||
| 138 | - endDay: this.$props.queryParams.dateRange[1] ?? null, | 136 | + subjectName: [this.$props.queryParams.subject] |
| 139 | }; | 137 | }; |
| 140 | 138 | ||
| 139 | + if (this.$props.queryParams.dateRange && this.$props.queryParams.dateRange.length >= 2) { | ||
| 140 | + query.startDay = this.$props.queryParams.dateRange[0]; | ||
| 141 | + query.endDay = this.$props.queryParams.dateRange[1]; | ||
| 142 | + } | ||
| 143 | + | ||
| 144 | + | ||
| 141 | const { data, status, info } = await phaseExamReport({ | 145 | const { data, status, info } = await phaseExamReport({ |
| 142 | ...query | 146 | ...query |
| 143 | }); | 147 | }); |
| @@ -158,7 +162,7 @@ export default { | @@ -158,7 +162,7 @@ export default { | ||
| 158 | } | 162 | } |
| 159 | }); | 163 | }); |
| 160 | }); | 164 | }); |
| 161 | - console.log('lsit', data?.list) | 165 | + |
| 162 | this.stageReport = data?.list.map((item) => { | 166 | this.stageReport = data?.list.map((item) => { |
| 163 | let params = {}; | 167 | let params = {}; |
| 164 | dataIdsList.map((ids, index) => { | 168 | dataIdsList.map((ids, index) => { |
| @@ -224,10 +228,17 @@ export default { | @@ -224,10 +228,17 @@ export default { | ||
| 224 | } | 228 | } |
| 225 | }, | 229 | }, |
| 226 | _print() { | 230 | _print() { |
| 227 | - tablePrint("print-content", "即时测-已归档单课时报表"); | 231 | + tablePrint({ |
| 232 | + id: "print-content", | ||
| 233 | + title: "即时测-阶段报表", | ||
| 234 | + splitParam: 18, | ||
| 235 | + fixedColumn: 2, | ||
| 236 | + diffNumber: 2, | ||
| 237 | + diffStNumber: 3 | ||
| 238 | + }); | ||
| 228 | }, | 239 | }, |
| 229 | _titleClick() { }, | 240 | _titleClick() { }, |
| 230 | - _openLineChart(chartRow) { | 241 | + _openLineChart(chartRow) { |
| 231 | var subejct = this.$props.role == 'ROLE_BANZHUREN' ? this.$props.queryParams.subjects[0] : this.$props.queryParams.subject; | 242 | var subejct = this.$props.role == 'ROLE_BANZHUREN' ? this.$props.queryParams.subjects[0] : this.$props.queryParams.subject; |
| 232 | this.lineChart.title = `${chartRow.studentName}-${subejct}-即时测-多卷作答表现图`; | 243 | this.lineChart.title = `${chartRow.studentName}-${subejct}-即时测-多卷作答表现图`; |
| 233 | this.lineChart.visible = true; | 244 | this.lineChart.visible = true; |
src/views/basic/askTestQuestion/detail.vue
| 1 | <template> | 1 | <template> |
| 2 | - <el-container class="default-body"> | 2 | + <el-container class="default-body default-body-detail"> |
| 3 | <el-header> | 3 | <el-header> |
| 4 | <back-box class="detailBack"> | 4 | <back-box class="detailBack"> |
| 5 | <template slot="title"> | 5 | <template slot="title"> |
| @@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
| 11 | </el-header> | 11 | </el-header> |
| 12 | <div class="default-filter"> | 12 | <div class="default-filter"> |
| 13 | <el-row class="row-type"> | 13 | <el-row class="row-type"> |
| 14 | - <label>阶段报表类型</label> | 14 | + <label>报表类型</label> |
| 15 | <el-select @change="_changeType" v-if="dataType && currentType" class="opration-select" | 15 | <el-select @change="_changeType" v-if="dataType && currentType" class="opration-select" |
| 16 | v-model="currentType"> | 16 | v-model="currentType"> |
| 17 | <el-option v-for="(item, index) in types" :lable="item.name" :key="index" :value="item.name" /> | 17 | <el-option v-for="(item, index) in types" :lable="item.name" :key="index" :value="item.name" /> |
| @@ -19,14 +19,14 @@ | @@ -19,14 +19,14 @@ | ||
| 19 | <div style="float: right;"> | 19 | <div style="float: right;"> |
| 20 | <span v-if="(dataType == '2' && currentType == '测验成绩单') || | 20 | <span v-if="(dataType == '2' && currentType == '测验成绩单') || |
| 21 | (dataType == '2' && currentType == '试题分析') || | 21 | (dataType == '2' && currentType == '试题分析') || |
| 22 | - (dataType == '3' && currentType == '学生成绩排名榜')"> | 22 | + (dataType == '3' && currentType == '学生成绩排名')"> |
| 23 | 单题低分率: | 23 | 单题低分率: |
| 24 | <el-input-number class="parent-number" v-model="lowLevel" :min="1" :max="100" label="低分率"> | 24 | <el-input-number class="parent-number" v-model="lowLevel" :min="1" :max="100" label="低分率"> |
| 25 | </el-input-number> | 25 | </el-input-number> |
| 26 | </span> | 26 | </span> |
| 27 | 27 | ||
| 28 | <el-button v-if="(dataType == '3' && currentType == '班级对比情况表') || | 28 | <el-button v-if="(dataType == '3' && currentType == '班级对比情况表') || |
| 29 | - (dataType == '3' && currentType == '学生成绩排名榜')" @click="_studentLevelSet" | 29 | + (dataType == '3' && currentType == '学生成绩排名')" @click="_studentLevelSet" |
| 30 | class="green-el-button"> | 30 | class="green-el-button"> |
| 31 | 设置学生成绩等级 | 31 | 设置学生成绩等级 |
| 32 | </el-button> | 32 | </el-button> |
| @@ -37,13 +37,13 @@ | @@ -37,13 +37,13 @@ | ||
| 37 | </div> | 37 | </div> |
| 38 | </el-row> | 38 | </el-row> |
| 39 | </div> | 39 | </div> |
| 40 | - <el-main> | 40 | + <el-main v-loading="loading"> |
| 41 | <div style=" padding: 20px;" id="print-content"> | 41 | <div style=" padding: 20px;" id="print-content"> |
| 42 | - <div style="margin-bottom:20px;background:#ffb3b3;padding:10px 20px;" class="tips" | 42 | + <div style="margin-bottom:20px;background:#ffb3b3;padding:10px 20px;" class="tips print-hidden" |
| 43 | v-if="paperModifyLog.modifiedTime && !status"> | 43 | v-if="paperModifyLog.modifiedTime && !status"> |
| 44 | <p class="tips-p"> | 44 | <p class="tips-p"> |
| 45 | <i class="fa fa-bell-o"></i> | 45 | <i class="fa fa-bell-o"></i> |
| 46 | - {{ `${paperModifyLog.modifiedTime} ${paperModifyLog.realName}` }}修改了答案,是否重新记分? | 46 | + {{ `${paperModifyLog.modifiedTime} ${paperModifyLog.realName}` }}修改了试卷,是否重新记分? |
| 47 | <el-button type="danger" round @click="_reScore" size="mini">重新计分</el-button> | 47 | <el-button type="danger" round @click="_reScore" size="mini">重新计分</el-button> |
| 48 | <el-button type="danger" round plain size="mini" | 48 | <el-button type="danger" round plain size="mini" |
| 49 | @click="paperModifyLog.modifiedTime = ''">暂时不计</el-button> | 49 | @click="paperModifyLog.modifiedTime = ''">暂时不计</el-button> |
| @@ -73,53 +73,53 @@ | @@ -73,53 +73,53 @@ | ||
| 73 | </div> | 73 | </div> |
| 74 | </el-row> | 74 | </el-row> |
| 75 | <el-row class="row-subfix"> | 75 | <el-row class="row-subfix"> |
| 76 | - <div class="row-line"> | 76 | + <div class="row-line row-line-5"> |
| 77 | <span class="line-subfix">班级人数:</span> | 77 | <span class="line-subfix">班级人数:</span> |
| 78 | <span class="line-value">{{ detail.classPersonNum }}</span> | 78 | <span class="line-value">{{ detail.classPersonNum }}</span> |
| 79 | </div> | 79 | </div> |
| 80 | - <div class="row-line"> | 80 | + <div class="row-line row-line-5"> |
| 81 | <span class="line-subfix">签到人数:</span> | 81 | <span class="line-subfix">签到人数:</span> |
| 82 | <span class="line-value">{{ detail.checkInCount }}</span> | 82 | <span class="line-value">{{ detail.checkInCount }}</span> |
| 83 | </div> | 83 | </div> |
| 84 | - <div class="row-line"> | 84 | + <div class="row-line row-line-5"> |
| 85 | <span class="line-subfix">题目总数:</span> | 85 | <span class="line-subfix">题目总数:</span> |
| 86 | <span class="line-value">{{ detail.questionNum }}</span> | 86 | <span class="line-value">{{ detail.questionNum }}</span> |
| 87 | </div> | 87 | </div> |
| 88 | - <div class="row-line"> | 88 | + <div class="row-line row-line-5"> |
| 89 | <span class="line-subfix">答题总数:</span> | 89 | <span class="line-subfix">答题总数:</span> |
| 90 | <span class="line-value">{{ detail.totalAnswersNum }}</span> | 90 | <span class="line-value">{{ detail.totalAnswersNum }}</span> |
| 91 | </div> | 91 | </div> |
| 92 | - <div class="row-line"> | 92 | + <div class="row-line row-line-5"> |
| 93 | <span class="line-subfix">课时时长:</span> | 93 | <span class="line-subfix">课时时长:</span> |
| 94 | <span class="line-value">{{ setDuration(detail.duration) }}</span> | 94 | <span class="line-value">{{ setDuration(detail.duration) }}</span> |
| 95 | </div> | 95 | </div> |
| 96 | </el-row> | 96 | </el-row> |
| 97 | <el-row class="row-subfix"> | 97 | <el-row class="row-subfix"> |
| 98 | - <div class="row-line"> | 98 | + <div class="row-line row-line-5"> |
| 99 | <span class="line-subfix">答对总数:</span> | 99 | <span class="line-subfix">答对总数:</span> |
| 100 | <span class="line-value">{{ detail.totalCorrectAnswersNum }}</span> | 100 | <span class="line-value">{{ detail.totalCorrectAnswersNum }}</span> |
| 101 | </div> | 101 | </div> |
| 102 | - <div class="row-line"> | 102 | + <div class="row-line row-line-5"> |
| 103 | <span class="line-subfix">总参与度:</span> | 103 | <span class="line-subfix">总参与度:</span> |
| 104 | <span class="line-value">{{ detail.participationRate }}%</span> | 104 | <span class="line-value">{{ detail.participationRate }}%</span> |
| 105 | </div> | 105 | </div> |
| 106 | - <div class="row-line"> | 106 | + <div class="row-line row-line-5"> |
| 107 | <span class="line-subfix">班级正确率:</span> | 107 | <span class="line-subfix">班级正确率:</span> |
| 108 | <span class="line-value">{{ detail.classCorrectRate }}%</span> | 108 | <span class="line-value">{{ detail.classCorrectRate }}%</span> |
| 109 | </div> | 109 | </div> |
| 110 | - <div class="row-line"> | ||
| 111 | - <span class="line-subfix">已达正确率:</span> | 110 | + <div class="row-line row-line-5"> |
| 111 | + <span class="line-subfix">已答正确率:</span> | ||
| 112 | <span class="line-value">{{ detail.answerCorrectRate }}%</span> | 112 | <span class="line-value">{{ detail.answerCorrectRate }}%</span> |
| 113 | </div> | 113 | </div> |
| 114 | - <div class="row-line"> | 114 | + <div class="row-line row-line-5"> |
| 115 | <span class="line-subfix">反馈时长:</span> | 115 | <span class="line-subfix">反馈时长:</span> |
| 116 | - <span class="line-value">{{ setDuration(detail.consumingDuration) }}</span> | 116 | + <span class="line-value">{{ setDuration1000(detail.consumingDuration) }}</span> |
| 117 | </div> | 117 | </div> |
| 118 | </el-row> | 118 | </el-row> |
| 119 | <el-row class="row-table"> | 119 | <el-row class="row-table"> |
| 120 | <el-table class="default-table" :data="askItemAnalysis"> | 120 | <el-table class="default-table" :data="askItemAnalysis"> |
| 121 | <el-table-column prop="title" label="课时-题号" /> | 121 | <el-table-column prop="title" label="课时-题号" /> |
| 122 | - <el-table-column label="题干" width="80"> | 122 | + <el-table-column label="题干" class-name="print-hidden" width="80"> |
| 123 | <template slot-scope="scoped"> | 123 | <template slot-scope="scoped"> |
| 124 | <el-button type="text" size="mini" @click="openStem(scoped.row)">查看</el-button> | 124 | <el-button type="text" size="mini" @click="openStem(scoped.row)">查看</el-button> |
| 125 | </template> | 125 | </template> |
| @@ -140,12 +140,21 @@ | @@ -140,12 +140,21 @@ | ||
| 140 | <template slot-scope="scoped">{{ scoped.row.answerCorrectRate }}%</template> | 140 | <template slot-scope="scoped">{{ scoped.row.answerCorrectRate }}%</template> |
| 141 | </el-table-column> | 141 | </el-table-column> |
| 142 | 142 | ||
| 143 | - <el-table-column prop="knowledge" label="知识点(单题)" width="150" /> | 143 | + <el-table-column prop="knowledge" label="知识点(单题)" width="150"> |
| 144 | + <template slot-scope="scoped"> | ||
| 145 | + <el-tooltip effect="dark" :content="_knowledge(scoped.row.knowledge)" | ||
| 146 | + placement="bottom"> | ||
| 147 | + <span class="overflowText"> | ||
| 148 | + {{ _knowledge(scoped.row.knowledge) }} | ||
| 149 | + </span> | ||
| 150 | + </el-tooltip> | ||
| 151 | + </template> | ||
| 152 | + </el-table-column> | ||
| 144 | <el-table-column prop="correctAnswer" label="正确答案(单题)" width="150"> | 153 | <el-table-column prop="correctAnswer" label="正确答案(单题)" width="150"> |
| 145 | <template slot-scope="scoped"> | 154 | <template slot-scope="scoped"> |
| 146 | {{ | 155 | {{ |
| 147 | - scoped.row.correctAnswer == 1 ? "✓" : | ||
| 148 | - scoped.row.correctAnswer == 2 ? "✗" : | 156 | + scoped.row.correctAnswer == 1 && scoped.row.questionType == 4 ? "✓" : |
| 157 | + scoped.row.correctAnswer == 2 && scoped.row.questionType == 4 ? "✗" : | ||
| 149 | scoped.row.correctAnswer | 158 | scoped.row.correctAnswer |
| 150 | }} | 159 | }} |
| 151 | </template> | 160 | </template> |
| @@ -153,8 +162,8 @@ | @@ -153,8 +162,8 @@ | ||
| 153 | <el-table-column prop="fallible" label="干扰选项(单题)" width="150"> | 162 | <el-table-column prop="fallible" label="干扰选项(单题)" width="150"> |
| 154 | <template slot-scope="scoped"> | 163 | <template slot-scope="scoped"> |
| 155 | {{ | 164 | {{ |
| 156 | - scoped.row.fallible == 1 ? "✓" : | ||
| 157 | - scoped.row.fallible == 2 ? "✗" : | 165 | + scoped.row.fallible == 1 && scoped.row.questionType == 4 ? "✓" : |
| 166 | + scoped.row.fallible == 2 && scoped.row.questionType == 4 ? "✗" : | ||
| 158 | scoped.row.fallible | 167 | scoped.row.fallible |
| 159 | }} | 168 | }} |
| 160 | </template> | 169 | </template> |
| @@ -168,24 +177,21 @@ | @@ -168,24 +177,21 @@ | ||
| 168 | <el-table-column prop="studentCode" label="学号"></el-table-column> | 177 | <el-table-column prop="studentCode" label="学号"></el-table-column> |
| 169 | <el-table-column prop="studentName" label="姓名"></el-table-column> | 178 | <el-table-column prop="studentName" label="姓名"></el-table-column> |
| 170 | <el-table-column prop="answerTimes" label="答题次数"></el-table-column> | 179 | <el-table-column prop="answerTimes" label="答题次数"></el-table-column> |
| 171 | - <el-table-column prop="consumingDuration" label="答题耗时"><template slot-scope="scoped">{{ | ||
| 172 | - setDuration(scoped.row.consumingDuration) | ||
| 173 | - }} | 180 | + <el-table-column prop="consumingDuration" label="答题耗时"><template slot-scope="scoped"> |
| 181 | + {{ setDuration1000(scoped.row.consumingDuration) }} | ||
| 174 | </template></el-table-column> | 182 | </template></el-table-column> |
| 175 | <el-table-column prop="correctAnswerTimes" label="答对次数"> | 183 | <el-table-column prop="correctAnswerTimes" label="答对次数"> |
| 176 | - <template slot-scope="scoped">{{ | ||
| 177 | - scoped.row.correctAnswerTimes || | ||
| 178 | - Number(scoped.row.correctAnswerTimes) === 0 | ||
| 179 | - ? scoped.row.correctAnswerTimes | ||
| 180 | - : "-" | ||
| 181 | - }}</template> | 184 | + <template slot-scope="scoped"> |
| 185 | + {{ scoped.row.correctAnswerTimes || Number(scoped.row.correctAnswerTimes) === 0 ? | ||
| 186 | + scoped.row.correctAnswerTimes : "-" }} | ||
| 187 | + </template> | ||
| 182 | </el-table-column> | 188 | </el-table-column> |
| 183 | <el-table-column prop="participationRate" label="参与度"><template slot-scope="scoped">{{ | 189 | <el-table-column prop="participationRate" label="参与度"><template slot-scope="scoped">{{ |
| 184 | - scoped.row.participationRate || | ||
| 185 | - Number(scoped.row.participationRate) === 0 | ||
| 186 | - ? scoped.row.participationRate + "%" | ||
| 187 | - : "-" | ||
| 188 | - }}</template></el-table-column> | 190 | + scoped.row.participationRate || |
| 191 | + Number(scoped.row.participationRate) === 0 | ||
| 192 | + ? scoped.row.participationRate + "%" | ||
| 193 | + : "-" | ||
| 194 | + }}</template></el-table-column> | ||
| 189 | <el-table-column prop="correctRate" label="正确率"><template slot-scope="scoped">{{ | 195 | <el-table-column prop="correctRate" label="正确率"><template slot-scope="scoped">{{ |
| 190 | scoped.row.correctRate || Number(scoped.row.correctRate) === 0 | 196 | scoped.row.correctRate || Number(scoped.row.correctRate) === 0 |
| 191 | ? scoped.row.correctRate + "%" | 197 | ? scoped.row.correctRate + "%" |
| @@ -197,11 +203,11 @@ | @@ -197,11 +203,11 @@ | ||
| 197 | ? scoped.row.answerCorrectRate + "%" | 203 | ? scoped.row.answerCorrectRate + "%" |
| 198 | : "-" | 204 | : "-" |
| 199 | }}</template></el-table-column> | 205 | }}</template></el-table-column> |
| 200 | - <el-table-column v-for="(item, index) in askPeriodQuestionItemOptions" :key="index" | 206 | + <el-table-column class-name="anwser-column" |
| 207 | + v-for="(item, index) in askPeriodQuestionItemOptions" :key="index" | ||
| 201 | :label="'Q' + (index + 1)"><template slot-scope="scoped"> | 208 | :label="'Q' + (index + 1)"><template slot-scope="scoped"> |
| 202 | - <span :class="scoped.row['isRight' + index] ? '' : 'red'">{{ | ||
| 203 | - scoped.row["answer" + index] || "-" | ||
| 204 | - }}</span> | 209 | + <div :class="scoped.row['isRight' + index] ? '' : 'red'">{{ scoped.row["answer" + |
| 210 | + index] || "-" }}</div> | ||
| 205 | </template> | 211 | </template> |
| 206 | </el-table-column> | 212 | </el-table-column> |
| 207 | </el-table> | 213 | </el-table> |
| @@ -223,19 +229,19 @@ | @@ -223,19 +229,19 @@ | ||
| 223 | </div> | 229 | </div> |
| 224 | <div v-if="dataType == '1' && currentType == '学生签到表现'"> | 230 | <div v-if="dataType == '1' && currentType == '学生签到表现'"> |
| 225 | <el-row class="row-subfix"> | 231 | <el-row class="row-subfix"> |
| 226 | - <div class="row-line"> | 232 | + <div class="row-line row-line-5"> |
| 227 | <span class="line-subfix">应到人数:</span> | 233 | <span class="line-subfix">应到人数:</span> |
| 228 | <span class="line-value">{{ detail.classPersonNum }}</span> | 234 | <span class="line-value">{{ detail.classPersonNum }}</span> |
| 229 | </div> | 235 | </div> |
| 230 | - <div class="row-line"> | 236 | + <div class="row-line row-line-5"> |
| 231 | <span class="line-subfix">实到人数:</span> | 237 | <span class="line-subfix">实到人数:</span> |
| 232 | <span class="line-value">{{ detail.checkInCount }}</span> | 238 | <span class="line-value">{{ detail.checkInCount }}</span> |
| 233 | </div> | 239 | </div> |
| 234 | - <div class="row-line"> | 240 | + <div class="row-line row-line-5"> |
| 235 | <span class="line-subfix">迟到人数:</span> | 241 | <span class="line-subfix">迟到人数:</span> |
| 236 | <span class="line-value">{{ detail.classPersonNum - detail.checkInCount }}</span> | 242 | <span class="line-value">{{ detail.classPersonNum - detail.checkInCount }}</span> |
| 237 | </div> | 243 | </div> |
| 238 | - <div class="row-line"> | 244 | + <div class="row-line row-line-5"> |
| 239 | <span class="line-subfix">未到人数:</span> | 245 | <span class="line-subfix">未到人数:</span> |
| 240 | <span class="line-value">{{ detail.classPersonNum - detail.checkInCount }}</span> | 246 | <span class="line-value">{{ detail.classPersonNum - detail.checkInCount }}</span> |
| 241 | </div> | 247 | </div> |
| @@ -279,8 +285,8 @@ | @@ -279,8 +285,8 @@ | ||
| 279 | </el-table> | 285 | </el-table> |
| 280 | </el-row> | 286 | </el-row> |
| 281 | <el-row class="row-subfix"> | 287 | <el-row class="row-subfix"> |
| 282 | - <el-table class="default-table" style="margin-top: 10px" :data="studentList"> | ||
| 283 | - <el-table-column :width="item.label == '学号' ? 120 : 0" :prop="item.prop" :label="item.label" | 288 | + <el-table class="default-table" style="margin-top: 10px" :data="studentList" ref="table"> |
| 289 | + <el-table-column :width="item.label == '学号' ? 90 : 0" :prop="item.prop" :label="item.label" | ||
| 284 | :key="index" v-for="(item, index) in studentHeader" /> | 290 | :key="index" v-for="(item, index) in studentHeader" /> |
| 285 | </el-table> | 291 | </el-table> |
| 286 | </el-row> | 292 | </el-row> |
| @@ -399,7 +405,7 @@ | @@ -399,7 +405,7 @@ | ||
| 399 | {{ scoped.row.missPeopleNumber }}</span> 人 | 405 | {{ scoped.row.missPeopleNumber }}</span> 人 |
| 400 | </span> | 406 | </span> |
| 401 | <span style="margin: 10px 0;" | 407 | <span style="margin: 10px 0;" |
| 402 | - v-for="(item, index) in scoped.row.details.filter(item => !item.right)"> | 408 | + v-for="(item, index) in scoped.row.details.filter(item => item.option.indexOf('未答') < 0 && !item.right)"> |
| 403 | 选{{ item.option }}:{{ item.students.join("/") }} | 409 | 选{{ item.option }}:{{ item.students.join("/") }} |
| 404 | </span> | 410 | </span> |
| 405 | <span></span> | 411 | <span></span> |
| @@ -416,7 +422,16 @@ | @@ -416,7 +422,16 @@ | ||
| 416 | {{ setSubPro(scope.row.questionType) }} | 422 | {{ setSubPro(scope.row.questionType) }} |
| 417 | </template> | 423 | </template> |
| 418 | </el-table-column> | 424 | </el-table-column> |
| 419 | - <el-table-column prop="knowledge" width="100" label="知识点"></el-table-column> | 425 | + <el-table-column prop="knowledge" width="100" label="知识点"> |
| 426 | + <template slot-scope="scoped"> | ||
| 427 | + <el-tooltip effect="dark" :content="_knowledge(scoped.row.knowledge)" | ||
| 428 | + placement="bottom"> | ||
| 429 | + <span class="overflowText"> | ||
| 430 | + {{ _knowledge(scoped.row.knowledge) }} | ||
| 431 | + </span> | ||
| 432 | + </el-tooltip> | ||
| 433 | + </template> | ||
| 434 | + </el-table-column> | ||
| 420 | <el-table-column prop="score" width="100" label="满分值"></el-table-column> | 435 | <el-table-column prop="score" width="100" label="满分值"></el-table-column> |
| 421 | <el-table-column width="110" prop="highestScore" label="班最高分"></el-table-column> | 436 | <el-table-column width="110" prop="highestScore" label="班最高分"></el-table-column> |
| 422 | <el-table-column width="110" prop="lowestScore" label="班最低分"></el-table-column> | 437 | <el-table-column width="110" prop="lowestScore" label="班最低分"></el-table-column> |
| @@ -433,17 +448,17 @@ | @@ -433,17 +448,17 @@ | ||
| 433 | <el-table-column prop="classScoringRate" width="120" label="已考得分率"> | 448 | <el-table-column prop="classScoringRate" width="120" label="已考得分率"> |
| 434 | <template slot-scope="scoped"> | 449 | <template slot-scope="scoped"> |
| 435 | <div v-if="scoped.row.type == 'colspan'"> | 450 | <div v-if="scoped.row.type == 'colspan'"> |
| 436 | - {{ scoped.row.classScoringRate }} | 451 | + {{ scoped.row.scoringRate }} |
| 437 | </div> | 452 | </div> |
| 438 | - <div :class="scoped.row.classScoringRate <= lowLevel ? 'lowLevelClass' : ''" v-else> | ||
| 439 | - {{ Number(scoped.row.classScoringRate).toFixed(2) }}% | 453 | + <div :class="scoped.row.scoringRate <= lowLevel ? 'lowLevelClass' : ''" v-else> |
| 454 | + {{ Number(scoped.row.scoringRate).toFixed(2) }}% | ||
| 440 | </div> | 455 | </div> |
| 441 | </template> | 456 | </template> |
| 442 | </el-table-column> | 457 | </el-table-column> |
| 443 | <el-table-column prop="correctAnswer" label="答案"><template slot-scope="scoped">{{ | 458 | <el-table-column prop="correctAnswer" label="答案"><template slot-scope="scoped">{{ |
| 444 | - scoped.row.correctAnswer == 1 | 459 | + scoped.row.correctAnswer == 1 && scoped.row.questionType == 4 |
| 445 | ? "✓" | 460 | ? "✓" |
| 446 | - : scoped.row.correctAnswer == 2 | 461 | + : scoped.row.correctAnswer == 2 && scoped.row.questionType == 4 |
| 447 | ? "✗" | 462 | ? "✗" |
| 448 | : scoped.row.correctAnswer | 463 | : scoped.row.correctAnswer |
| 449 | }}</template> | 464 | }}</template> |
| @@ -501,7 +516,7 @@ | @@ -501,7 +516,7 @@ | ||
| 501 | <el-table-column prop="subjectiveExamScore" label="主观题分"></el-table-column> | 516 | <el-table-column prop="subjectiveExamScore" label="主观题分"></el-table-column> |
| 502 | </el-table-column> | 517 | </el-table-column> |
| 503 | <el-table-column v-for="(item, index) in studentQuestionOptions" :key="index" | 518 | <el-table-column v-for="(item, index) in studentQuestionOptions" :key="index" |
| 504 | - :label="'Q' + item.id" :prop="'score' + item.id"> | 519 | + :label="'Q' + item.questionIndex" :prop="'score' + item.id"> |
| 505 | </el-table-column> | 520 | </el-table-column> |
| 506 | </el-table> | 521 | </el-table> |
| 507 | </div> | 522 | </div> |
| @@ -511,15 +526,15 @@ | @@ -511,15 +526,15 @@ | ||
| 511 | <el-table-column prop="studentName" label="姓名"></el-table-column> | 526 | <el-table-column prop="studentName" label="姓名"></el-table-column> |
| 512 | <el-table-column prop="className" label="班级"></el-table-column> | 527 | <el-table-column prop="className" label="班级"></el-table-column> |
| 513 | <el-table-column prop="examScore" label="总分"></el-table-column> | 528 | <el-table-column prop="examScore" label="总分"></el-table-column> |
| 514 | - <el-table-column v-for="(item, index) in studentAnseredOptions" :key="index" | ||
| 515 | - :label="'Q' + item.id"> | 529 | + <el-table-column class-name="anwser-column" v-for="(item, index) in studentAnseredOptions" |
| 530 | + :key="index" :label="'Q' + item.questionIndex"> | ||
| 516 | <template slot-scope="scope"> | 531 | <template slot-scope="scope"> |
| 517 | <span v-if="studentAnsered[index]?.questionType == 5">*</span> | 532 | <span v-if="studentAnsered[index]?.questionType == 5">*</span> |
| 518 | <span v-else-if="scope.row['answer' + item.id]" | 533 | <span v-else-if="scope.row['answer' + item.id]" |
| 519 | - :class="scope.row['isRight' + item.id] ? '' : 'error'"> | 534 | + :class="scope.row['isRight' + item.id] ? '' : 'red'"> |
| 520 | {{ scope.row["answer" + item.id] }} | 535 | {{ scope.row["answer" + item.id] }} |
| 521 | </span> | 536 | </span> |
| 522 | - <span v-else :class="scope.row['questionType' + item.id] == 5 ? '' : 'error'">-</span> | 537 | + <span v-else :class="scope.row['questionType' + item.id] == 5 ? '' : 'red'">-</span> |
| 523 | </template> | 538 | </template> |
| 524 | </el-table-column> | 539 | </el-table-column> |
| 525 | </el-table> | 540 | </el-table> |
| @@ -535,8 +550,8 @@ | @@ -535,8 +550,8 @@ | ||
| 535 | </el-table-column> | 550 | </el-table-column> |
| 536 | <el-table-column prop="title" label="参与度" width="120"> | 551 | <el-table-column prop="title" label="参与度" width="120"> |
| 537 | <template slot-scope="scoped"> | 552 | <template slot-scope="scoped"> |
| 538 | - {{ Number(scoped.row.testCount * 100 / scoped.row.classCount).toFixed(2) }}% | ||
| 539 | - | 553 | + {{ Number(scoped.row.testCount * 100 / scoped.row.classCount).toFixed(2) }}% |
| 554 | + | ||
| 540 | </template> | 555 | </template> |
| 541 | </el-table-column> | 556 | </el-table-column> |
| 542 | <el-table-column prop="avg" label="班平均分" width="120" /> | 557 | <el-table-column prop="avg" label="班平均分" width="120" /> |
| @@ -562,9 +577,10 @@ | @@ -562,9 +577,10 @@ | ||
| 562 | </el-table-column> | 577 | </el-table-column> |
| 563 | <el-table-column prop="knowledge" label="知识点"> | 578 | <el-table-column prop="knowledge" label="知识点"> |
| 564 | <template slot-scope="scoped"> | 579 | <template slot-scope="scoped"> |
| 565 | - <el-tooltip effect="dark" :content="scoped.row.knowledge" placement="left"> | 580 | + <el-tooltip effect="dark" :content="_knowledge(scoped.row.knowledge)" |
| 581 | + placement="bottom"> | ||
| 566 | <span class="overflowText"> | 582 | <span class="overflowText"> |
| 567 | - {{ scoped.row.knowledge }} | 583 | + {{ _knowledge(scoped.row.knowledge) }} |
| 568 | </span> | 584 | </span> |
| 569 | </el-tooltip> | 585 | </el-tooltip> |
| 570 | </template> | 586 | </template> |
| @@ -572,8 +588,7 @@ | @@ -572,8 +588,7 @@ | ||
| 572 | <el-table-column prop="score" label="满分值" width="120" /> | 588 | <el-table-column prop="score" label="满分值" width="120" /> |
| 573 | <el-table-column prop="avgScore" label="年级平均分" width="120"> | 589 | <el-table-column prop="avgScore" label="年级平均分" width="120"> |
| 574 | <template slot-scope="scoped"> | 590 | <template slot-scope="scoped"> |
| 575 | - <div v-if="scoped.row.type == 'colspan'" | ||
| 576 | - :class="scoped.row.avgScore <= lowLevel ? 'lowLevelClass' : ''"> | 591 | + <div v-if="scoped.row.type == 'colspan'"> |
| 577 | {{ Number(scoped.row.avgScore).toFixed(2) }} % | 592 | {{ Number(scoped.row.avgScore).toFixed(2) }} % |
| 578 | </div> | 593 | </div> |
| 579 | <div v-else> | 594 | <div v-else> |
| @@ -581,36 +596,44 @@ | @@ -581,36 +596,44 @@ | ||
| 581 | </div> | 596 | </div> |
| 582 | </template> | 597 | </template> |
| 583 | </el-table-column> | 598 | </el-table-column> |
| 584 | - <el-table-column prop="gradeScoringRate" label="年级得分率" width="120"> | 599 | + <el-table-column prop="gradeScoringRate" label="年级已考得分率" width="120"> |
| 585 | <template slot-scope="scoped"> | 600 | <template slot-scope="scoped"> |
| 586 | - <div v-if="scoped.row.type == 'colspan'"> | ||
| 587 | - {{ scoped.row.gradeScoringRate }} | 601 | + <div v-if="scoped.row.questionIndex == '汇总'"> |
| 602 | + {{ scoped.row.gradeScoringRate.toFixed(2) }} % | ||
| 603 | + </div> | ||
| 604 | + <div v-else-if="scoped.row.type == 'colspan'"> | ||
| 605 | + {{ scoped.row.gradeScoringRate.toFixed(2) }} | ||
| 588 | </div> | 606 | </div> |
| 589 | - <div v-else="scoped.row.gradeScoringRate" | ||
| 590 | - :class="scoped.row.gradeScoringRate <= lowLevel ? 'lowLevelClass' : ''"> | ||
| 591 | - {{ Number(scoped.row.gradeScoringRate).toFixed(2) }} % | 607 | + <div v-else="scoped.row.gradeScoringRate"> |
| 608 | + {{ Number(scoped.row.gradeScoringRate * 100).toFixed(2) }} % | ||
| 592 | </div> | 609 | </div> |
| 593 | </template> | 610 | </template> |
| 594 | </el-table-column> | 611 | </el-table-column> |
| 595 | - <el-table-column prop="correctAnswer" label="答案" width="120" /> | 612 | + <el-table-column prop="correctAnswer" label="答案" width="120"> |
| 613 | + <template slot-scope="scoped"> | ||
| 614 | + {{ | ||
| 615 | + scoped.row.correctAnswer == 1 && scoped.row.questionType == 4 ? "✓" : | ||
| 616 | + scoped.row.correctAnswer == 2 && scoped.row.questionType == 4 ? "✗" : | ||
| 617 | + scoped.row.correctAnswer | ||
| 618 | + }} | ||
| 619 | + </template> | ||
| 620 | + </el-table-column> | ||
| 596 | <el-table-column v-for="(item, index) in testPaperExamReportOptions" :key="index" | 621 | <el-table-column v-for="(item, index) in testPaperExamReportOptions" :key="index" |
| 597 | :label="item.title" :prop="'count' + index" width="120"> | 622 | :label="item.title" :prop="'count' + index" width="120"> |
| 598 | <template slot-scope="scope"> | 623 | <template slot-scope="scope"> |
| 599 | <p class="persent"> | 624 | <p class="persent"> |
| 600 | {{ | 625 | {{ |
| 601 | - scope.row.questionType == "5" | ||
| 602 | - ? "" | ||
| 603 | - : scope.row["option" + index] | ||
| 604 | - ? `${scope.row["option" + index]}(${scope.row["persent" + index] ?? "0" | ||
| 605 | - })` | ||
| 606 | - : "" | 626 | + scope.row.questionType == "5" ? "" : scope.row["option" + index] |
| 627 | + ? `${scope.row["option" + index]}(${scope.row["persent" + index] ?? "0" | ||
| 628 | + })` | ||
| 629 | + : "" | ||
| 607 | }} | 630 | }} |
| 608 | </p> | 631 | </p> |
| 609 | </template> | 632 | </template> |
| 610 | </el-table-column> | 633 | </el-table-column> |
| 611 | </el-table> | 634 | </el-table> |
| 612 | </div> | 635 | </div> |
| 613 | - <div v-if="dataType == '3' && currentType == '学生成绩排名榜'"> | 636 | + <div v-if="dataType == '3' && currentType == '学生成绩排名'"> |
| 614 | <el-table class="default-table" :data="testStudentExamReport"> | 637 | <el-table class="default-table" :data="testStudentExamReport"> |
| 615 | <el-table-column prop="gradeRank" label="年级排行" /> | 638 | <el-table-column prop="gradeRank" label="年级排行" /> |
| 616 | <el-table-column prop="code" label="学号" /> | 639 | <el-table-column prop="code" label="学号" /> |
| @@ -623,7 +646,8 @@ | @@ -623,7 +646,8 @@ | ||
| 623 | </div> | 646 | </div> |
| 624 | </el-main> | 647 | </el-main> |
| 625 | <el-dialog class="stem" :visible.sync="stem.visible" :title="'题干'" width="800" :append-to-body="true"> | 648 | <el-dialog class="stem" :visible.sync="stem.visible" :title="'题干'" width="800" :append-to-body="true"> |
| 626 | - <iframe v-if="stem && stem.src" :src="stem.src" style="width: 100%;min-height: 400px;" /> | 649 | + <Preview v-if="stem && stem.src" :src="stem.src" :key="stem.src" /> |
| 650 | + <!-- <iframe v-if="stem && stem.src" :src="stem.src" style="width: 100%;min-height: 400px;" /> --> | ||
| 627 | </el-dialog> | 651 | </el-dialog> |
| 628 | <el-dialog :append-to-body="true" :close-on-click-modal="false" title="学生等级设置" | 652 | <el-dialog :append-to-body="true" :close-on-click-modal="false" title="学生等级设置" |
| 629 | :visible.sync="studentLevelDialog" width="900px" @closed="_studentLevelClose"> | 653 | :visible.sync="studentLevelDialog" width="900px" @closed="_studentLevelClose"> |
| @@ -704,10 +728,11 @@ | @@ -704,10 +728,11 @@ | ||
| 704 | </el-container> | 728 | </el-container> |
| 705 | </template> | 729 | </template> |
| 706 | <script> | 730 | <script> |
| 707 | -import { formatDate, downloadFile, tablePrint } from "utils"; | 731 | +import Preview from "@/components/preview"; |
| 732 | +import { formatDate, downloadFile, tablePrint, getKnowledge } from "utils"; | ||
| 708 | export default { | 733 | export default { |
| 709 | name: "reportDetail", | 734 | name: "reportDetail", |
| 710 | - components: { testScoreSet: () => import("./components/testScoreSet.vue"), }, | 735 | + components: { testScoreSet: () => import("./components/testScoreSet.vue"), Preview }, |
| 711 | async created() { | 736 | async created() { |
| 712 | this.role = | 737 | this.role = |
| 713 | 738 | ||
| @@ -733,12 +758,11 @@ export default { | @@ -733,12 +758,11 @@ export default { | ||
| 733 | 758 | ||
| 734 | await this._queryDefaultLevels(); | 759 | await this._queryDefaultLevels(); |
| 735 | 760 | ||
| 736 | - if (this.dataType == '2') { | ||
| 737 | - await this._examDetail(); | ||
| 738 | - } | 761 | + await this._examDetail(); |
| 739 | }, | 762 | }, |
| 740 | data() { | 763 | data() { |
| 741 | return { | 764 | return { |
| 765 | + loading: true, | ||
| 742 | status: 0, | 766 | status: 0, |
| 743 | //导出相关 | 767 | //导出相关 |
| 744 | paperModifyLog: {}, | 768 | paperModifyLog: {}, |
| @@ -808,7 +832,7 @@ export default { | @@ -808,7 +832,7 @@ export default { | ||
| 808 | // 学生签到情况 | 832 | // 学生签到情况 |
| 809 | askCheckinStatus: [], | 833 | askCheckinStatus: [], |
| 810 | // 报表详情 | 834 | // 报表详情 |
| 811 | - testReport: { | 835 | + examReport: { |
| 812 | subjectiveScore: 0, | 836 | subjectiveScore: 0, |
| 813 | subjectiveHighestScore: "", | 837 | subjectiveHighestScore: "", |
| 814 | subjectiveLowestScore: "", | 838 | subjectiveLowestScore: "", |
| @@ -859,6 +883,22 @@ export default { | @@ -859,6 +883,22 @@ export default { | ||
| 859 | return tit; | 883 | return tit; |
| 860 | }, | 884 | }, |
| 861 | setDuration(times) { | 885 | setDuration(times) { |
| 886 | + let m = parseInt(times / 60); | ||
| 887 | + let s = parseInt(times % 60); | ||
| 888 | + console.log(times) | ||
| 889 | + let aTime; | ||
| 890 | + if (times == 0) { | ||
| 891 | + aTime = `0`; | ||
| 892 | + } else { | ||
| 893 | + if (m == 0 && times != 0) { | ||
| 894 | + aTime = `${times}秒`; | ||
| 895 | + } else if (m != 0 && times != 0) { | ||
| 896 | + aTime = `${m}分${s}秒`; | ||
| 897 | + } | ||
| 898 | + } | ||
| 899 | + return aTime; | ||
| 900 | + }, | ||
| 901 | + setDuration1000(times) { | ||
| 862 | let m = parseInt(times / 1000 / 60); | 902 | let m = parseInt(times / 1000 / 60); |
| 863 | let s = parseInt((times / 1000) % 60); | 903 | let s = parseInt((times / 1000) % 60); |
| 864 | let ms = times; | 904 | let ms = times; |
| @@ -885,7 +925,7 @@ export default { | @@ -885,7 +925,7 @@ export default { | ||
| 885 | name: "试题分析" | 925 | name: "试题分析" |
| 886 | }, { | 926 | }, { |
| 887 | dataType: "3", | 927 | dataType: "3", |
| 888 | - name: "学生成绩排名榜" | 928 | + name: "学生成绩排名" |
| 889 | }, { | 929 | }, { |
| 890 | dataType: "2", | 930 | dataType: "2", |
| 891 | name: "测验成绩单" | 931 | name: "测验成绩单" |
| @@ -930,22 +970,52 @@ export default { | @@ -930,22 +970,52 @@ export default { | ||
| 930 | } | 970 | } |
| 931 | }, | 971 | }, |
| 932 | methods: { | 972 | methods: { |
| 973 | + _knowledge(param) { | ||
| 974 | + return getKnowledge(param); | ||
| 975 | + }, | ||
| 933 | async _examDetail() { | 976 | async _examDetail() { |
| 934 | - const examDetail = | ||
| 935 | - this.role == "ROLE_PERSONAL" | ||
| 936 | - ? this.$request.pExamDetail | ||
| 937 | - : this.$request.examDetail; | 977 | + if (this.dataType == 2) { |
| 978 | + const examDetail = | ||
| 979 | + this.role == "ROLE_PERSONAL" | ||
| 980 | + ? this.$request.pExamDetail | ||
| 981 | + : this.$request.examDetail; | ||
| 938 | 982 | ||
| 939 | - let { data, info, status } = await examDetail({ | ||
| 940 | - examId: this.ids[0], | ||
| 941 | - }); | ||
| 942 | - console.log('detail', data, data.paperModifyLog) | ||
| 943 | - if (status === 0) { | ||
| 944 | - if (data.paperModifyLog) { | ||
| 945 | - this.paperModifyLog = { ...data?.paperModifyLog }; | 983 | + let { data, info, status } = await examDetail({ |
| 984 | + examId: this.ids[0], | ||
| 985 | + }); | ||
| 986 | + | ||
| 987 | + if (status === 0) { | ||
| 988 | + this.examReport = { ...data?.examReport }; | ||
| 989 | + | ||
| 990 | + if (data.paperModifyLog) { | ||
| 991 | + this.paperModifyLog = { ...data?.paperModifyLog }; | ||
| 992 | + } | ||
| 993 | + } else { | ||
| 994 | + this.$message.error(info); | ||
| 946 | } | 995 | } |
| 947 | - } else { | ||
| 948 | - this.$message.error(info); | 996 | + } |
| 997 | + else if (this.dataType == 3) { | ||
| 998 | + let paramObj = JSON.parse(JSON.stringify(this.fromData)) | ||
| 999 | + if (paramObj.levelType == 0) { | ||
| 1000 | + paramObj.levels = paramObj.levels.map((item) => { | ||
| 1001 | + item[1] = ((item[1] / 100) * this.examPaperScore).toFixed(1); | ||
| 1002 | + item[2] = ((item[2] / 100) * this.examPaperScore).toFixed(1); | ||
| 1003 | + return item; | ||
| 1004 | + }); | ||
| 1005 | + } | ||
| 1006 | + | ||
| 1007 | + let { data, info, status } = await this.$request.classdiffreport({ | ||
| 1008 | + paperId: this.ids[0], | ||
| 1009 | + classIds: this.classIds, | ||
| 1010 | + reportRange: paramObj | ||
| 1011 | + }); | ||
| 1012 | + | ||
| 1013 | + if (status != 0) { | ||
| 1014 | + this.$message.error(info); | ||
| 1015 | + return; | ||
| 1016 | + } | ||
| 1017 | + | ||
| 1018 | + this.examReport = { ...data }; | ||
| 949 | } | 1019 | } |
| 950 | }, | 1020 | }, |
| 951 | async _reScore() { | 1021 | async _reScore() { |
| @@ -958,6 +1028,7 @@ export default { | @@ -958,6 +1028,7 @@ export default { | ||
| 958 | await this._changeType(); | 1028 | await this._changeType(); |
| 959 | this.paperModifyLog.modifiedTime = ""; | 1029 | this.paperModifyLog.modifiedTime = ""; |
| 960 | this.paperModifyLog.realName = ""; | 1030 | this.paperModifyLog.realName = ""; |
| 1031 | + location.reload(); | ||
| 961 | } else { | 1032 | } else { |
| 962 | this.$message.error(info); | 1033 | this.$message.error(info); |
| 963 | } | 1034 | } |
| @@ -1004,15 +1075,22 @@ export default { | @@ -1004,15 +1075,22 @@ export default { | ||
| 1004 | if (columnIndex == 0) { | 1075 | if (columnIndex == 0) { |
| 1005 | return [3, 1]; | 1076 | return [3, 1]; |
| 1006 | } | 1077 | } |
| 1007 | - // else if (columnIndex == 6) { | ||
| 1008 | - // return [3, 1]; | ||
| 1009 | - // } | ||
| 1010 | - // else if (columnIndex == 7) { | ||
| 1011 | - // return [3, 5]; | ||
| 1012 | - // } | 1078 | + else if (columnIndex == 8) { |
| 1079 | + return [3, 1]; | ||
| 1080 | + } | ||
| 1081 | + else if (columnIndex == 9) { | ||
| 1082 | + return [3, this.testQuestionOptions.length]; | ||
| 1083 | + } | ||
| 1084 | + else if (columnIndex >= 9) { | ||
| 1085 | + return [0, 0]; | ||
| 1086 | + } | ||
| 1013 | else { | 1087 | else { |
| 1014 | return [1, 1] | 1088 | return [1, 1] |
| 1015 | } | 1089 | } |
| 1090 | + } else if (rowIndex > this.testQuestions?.length - 3) { | ||
| 1091 | + if (columnIndex >= 7) { | ||
| 1092 | + return [0, 0]; | ||
| 1093 | + } | ||
| 1016 | } | 1094 | } |
| 1017 | else { | 1095 | else { |
| 1018 | return [1, 1] | 1096 | return [1, 1] |
| @@ -1027,11 +1105,18 @@ export default { | @@ -1027,11 +1105,18 @@ export default { | ||
| 1027 | return [3, 1]; | 1105 | return [3, 1]; |
| 1028 | } | 1106 | } |
| 1029 | else if (columnIndex == 7) { | 1107 | else if (columnIndex == 7) { |
| 1030 | - return [3, 5]; | 1108 | + return [3, this.testPaperExamReportOptions.length]; |
| 1109 | + } | ||
| 1110 | + else if (columnIndex >= 7) { | ||
| 1111 | + return [0, 0]; | ||
| 1031 | } | 1112 | } |
| 1032 | else { | 1113 | else { |
| 1033 | return [1, 1] | 1114 | return [1, 1] |
| 1034 | } | 1115 | } |
| 1116 | + } else if (rowIndex > this.testPaperExamReport?.length - 3) { | ||
| 1117 | + if (columnIndex >= 5) { | ||
| 1118 | + return [0, 0]; | ||
| 1119 | + } | ||
| 1035 | } | 1120 | } |
| 1036 | else { | 1121 | else { |
| 1037 | return [1, 1] | 1122 | return [1, 1] |
| @@ -1141,7 +1226,6 @@ export default { | @@ -1141,7 +1226,6 @@ export default { | ||
| 1141 | } | 1226 | } |
| 1142 | } | 1227 | } |
| 1143 | else if (this.dataType == '3') { | 1228 | else if (this.dataType == '3') { |
| 1144 | - | ||
| 1145 | let paramObj = JSON.parse(JSON.stringify(this.fromData)) | 1229 | let paramObj = JSON.parse(JSON.stringify(this.fromData)) |
| 1146 | 1230 | ||
| 1147 | if (paramObj.levelType == 0) { | 1231 | if (paramObj.levelType == 0) { |
| @@ -1174,9 +1258,48 @@ export default { | @@ -1174,9 +1258,48 @@ export default { | ||
| 1174 | 1258 | ||
| 1175 | }, | 1259 | }, |
| 1176 | _print() { | 1260 | _print() { |
| 1177 | - tablePrint("print-content", this.title + "_" + this.currentType); | 1261 | + var splitNumber = null; |
| 1262 | + var index = null; | ||
| 1263 | + var printType = 0; | ||
| 1264 | + var fixedColumn = null; | ||
| 1265 | + var diffNumber = null; | ||
| 1266 | + var diffStNumber = null; | ||
| 1267 | + if (this.dataType == '1' && this.currentType == '学生作答表现') { | ||
| 1268 | + splitNumber = 18; | ||
| 1269 | + fixedColumn = 2; | ||
| 1270 | + diffNumber = 2; | ||
| 1271 | + diffStNumber = 17; | ||
| 1272 | + } | ||
| 1273 | + else if (this.dataType == '2' && this.currentType == '小题分报表') { | ||
| 1274 | + splitNumber = 18; | ||
| 1275 | + index = 0; | ||
| 1276 | + fixedColumn = 2; | ||
| 1277 | + diffNumber = 2; | ||
| 1278 | + diffStNumber = 3; | ||
| 1279 | + printType = '即时测-小题分报表'; | ||
| 1280 | + } | ||
| 1281 | + else if (this.dataType == '2' && this.currentType == '试题分析') { | ||
| 1282 | + splitNumber = 17; | ||
| 1283 | + } | ||
| 1284 | + else if (this.dataType == '2' && this.currentType == '作答明细') { | ||
| 1285 | + fixedColumn = 3; | ||
| 1286 | + diffNumber = 3; | ||
| 1287 | + diffStNumber = 17; | ||
| 1288 | + splitNumber = 18; | ||
| 1289 | + } | ||
| 1290 | + tablePrint({ | ||
| 1291 | + id: "print-content", | ||
| 1292 | + title: this.title + "_" + this.currentType, | ||
| 1293 | + lindex: index, | ||
| 1294 | + splitParam: splitNumber, | ||
| 1295 | + printType: printType, | ||
| 1296 | + fixedColumn: fixedColumn, | ||
| 1297 | + diffNumber: diffNumber, | ||
| 1298 | + diffStNumber: diffStNumber | ||
| 1299 | + }); | ||
| 1178 | }, | 1300 | }, |
| 1179 | async _changeType() { | 1301 | async _changeType() { |
| 1302 | + this.loading = true; | ||
| 1180 | if (this.dataType == "1") { | 1303 | if (this.dataType == "1") { |
| 1181 | if (this.currentType == "试题分析") { | 1304 | if (this.currentType == "试题分析") { |
| 1182 | await this._loadAskItemAnalysis(); | 1305 | await this._loadAskItemAnalysis(); |
| @@ -1216,10 +1339,11 @@ export default { | @@ -1216,10 +1339,11 @@ export default { | ||
| 1216 | else if (this.currentType == "试题分析") { | 1339 | else if (this.currentType == "试题分析") { |
| 1217 | await this._testPaperExamReport(); | 1340 | await this._testPaperExamReport(); |
| 1218 | } | 1341 | } |
| 1219 | - else if (this.currentType == "学生成绩排名榜") { | 1342 | + else if (this.currentType == "学生成绩排名") { |
| 1220 | await this._testStudentExamReport(); | 1343 | await this._testStudentExamReport(); |
| 1221 | } | 1344 | } |
| 1222 | } | 1345 | } |
| 1346 | + this.loading = false; | ||
| 1223 | }, | 1347 | }, |
| 1224 | async _testPaperExamReport() { | 1348 | async _testPaperExamReport() { |
| 1225 | //主观 | 1349 | //主观 |
| @@ -1251,31 +1375,30 @@ export default { | @@ -1251,31 +1375,30 @@ export default { | ||
| 1251 | let response = await request({ | 1375 | let response = await request({ |
| 1252 | paperId: this.ids[0], | 1376 | paperId: this.ids[0], |
| 1253 | classIds: this.classIds, | 1377 | classIds: this.classIds, |
| 1378 | + size: 9999 | ||
| 1254 | }); | 1379 | }); |
| 1255 | 1380 | ||
| 1256 | if (response.status != 0) { | 1381 | if (response.status != 0) { |
| 1257 | this.$message.error(response.info); | 1382 | this.$message.error(response.info); |
| 1258 | return; | 1383 | return; |
| 1259 | } | 1384 | } |
| 1260 | - | ||
| 1261 | - var maxOption = 0; | ||
| 1262 | - response.data.forEach((item) =>{ | ||
| 1263 | - if(item.details){ | ||
| 1264 | - if(maxOption < item.details.length) | ||
| 1265 | - { | 1385 | + |
| 1386 | + var maxOption = 0; | ||
| 1387 | + response.data.forEach((item) => { | ||
| 1388 | + if (item.details) { | ||
| 1389 | + if (maxOption < item.details.length) { | ||
| 1266 | maxOption = item.details.length; | 1390 | maxOption = item.details.length; |
| 1267 | - } | 1391 | + } |
| 1268 | } | 1392 | } |
| 1269 | - | ||
| 1270 | - }) | ||
| 1271 | - | ||
| 1272 | - let optionsList = []; | ||
| 1273 | 1393 | ||
| 1274 | - for(var io=0;io<maxOption;io++){ | 1394 | + }) |
| 1395 | + | ||
| 1396 | + let optionsList = []; | ||
| 1397 | + | ||
| 1398 | + for (var io = 0; io < maxOption; io++) { | ||
| 1275 | optionsList.push({}) | 1399 | optionsList.push({}) |
| 1276 | } | 1400 | } |
| 1277 | 1401 | ||
| 1278 | - // let optionsList = [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}]; | ||
| 1279 | 1402 | ||
| 1280 | let tableData = response.data?.map((item) => { | 1403 | let tableData = response.data?.map((item) => { |
| 1281 | 1404 | ||
| @@ -1298,6 +1421,7 @@ export default { | @@ -1298,6 +1421,7 @@ export default { | ||
| 1298 | 1421 | ||
| 1299 | let params = {}; | 1422 | let params = {}; |
| 1300 | 1423 | ||
| 1424 | + | ||
| 1301 | const detail = item?.details ?? []; | 1425 | const detail = item?.details ?? []; |
| 1302 | 1426 | ||
| 1303 | let lastOPtion = detail?.find((item) => { | 1427 | let lastOPtion = detail?.find((item) => { |
| @@ -1308,7 +1432,7 @@ export default { | @@ -1308,7 +1432,7 @@ export default { | ||
| 1308 | }); | 1432 | }); |
| 1309 | 1433 | ||
| 1310 | optionsList.map((items, index) => { | 1434 | optionsList.map((items, index) => { |
| 1311 | - if (index != 4) { | 1435 | + if (index < maxOption - 1) { |
| 1312 | params["count" + index] = | 1436 | params["count" + index] = |
| 1313 | defaultArr[index]?.option != "未答" | 1437 | defaultArr[index]?.option != "未答" |
| 1314 | ? defaultArr[index]?.count | 1438 | ? defaultArr[index]?.count |
| @@ -1319,9 +1443,9 @@ export default { | @@ -1319,9 +1443,9 @@ export default { | ||
| 1319 | : ""; | 1443 | : ""; |
| 1320 | params["option" + index] = | 1444 | params["option" + index] = |
| 1321 | defaultArr[index]?.option != "未答" | 1445 | defaultArr[index]?.option != "未答" |
| 1322 | - ? defaultArr[index]?.option == 1 | 1446 | + ? defaultArr[index]?.option == 1 && item.questionType == 4 |
| 1323 | ? "✓" | 1447 | ? "✓" |
| 1324 | - : defaultArr[index]?.option == 2 | 1448 | + : defaultArr[index]?.option == 2 && item.questionType == 4 |
| 1325 | ? "✗" | 1449 | ? "✗" |
| 1326 | : defaultArr[index]?.option | 1450 | : defaultArr[index]?.option |
| 1327 | : ""; | 1451 | : ""; |
| @@ -1330,12 +1454,10 @@ export default { | @@ -1330,12 +1454,10 @@ export default { | ||
| 1330 | items["title"] = "未答"; | 1454 | items["title"] = "未答"; |
| 1331 | params["count" + index] = lastOPtion?.count ?? ""; | 1455 | params["count" + index] = lastOPtion?.count ?? ""; |
| 1332 | params["persent" + index] = lastOPtion?.persent ?? ""; | 1456 | params["persent" + index] = lastOPtion?.persent ?? ""; |
| 1333 | - params["option" + index] = "?"; | 1457 | + params["option" + index] = "未答"; |
| 1334 | } | 1458 | } |
| 1335 | }); | 1459 | }); |
| 1336 | 1460 | ||
| 1337 | - | ||
| 1338 | - | ||
| 1339 | return { | 1461 | return { |
| 1340 | ...item, | 1462 | ...item, |
| 1341 | ...params, | 1463 | ...params, |
| @@ -1347,30 +1469,29 @@ export default { | @@ -1347,30 +1469,29 @@ export default { | ||
| 1347 | }); | 1469 | }); |
| 1348 | 1470 | ||
| 1349 | this.testPaperExamReportOptions = [...optionsList]; | 1471 | this.testPaperExamReportOptions = [...optionsList]; |
| 1350 | - | ||
| 1351 | this.testPaperExamReport.push({ | 1472 | this.testPaperExamReport.push({ |
| 1352 | questionIndex: "汇总", | 1473 | questionIndex: "汇总", |
| 1353 | - questionType: "客观题", | ||
| 1354 | - score: objective.sum, | ||
| 1355 | - avgScore: objective.avg == 0 ? 0 : Number(objective.avg).toFixed(2), | ||
| 1356 | - gradeScoringRate: objective.avg == 0 ? 0 : Number(objective.avg * 100 / objective.sum).toFixed(2), | 1474 | + questionType: "主观题", |
| 1475 | + score: this.examReport.subjectiveScore, | ||
| 1476 | + avgScore: this.examReport.subjectiveAvgScore, | ||
| 1477 | + gradeScoringRate: this.examReport.subjectiveRate, | ||
| 1357 | correctAnswer: "备注" | 1478 | correctAnswer: "备注" |
| 1358 | }) | 1479 | }) |
| 1359 | 1480 | ||
| 1360 | this.testPaperExamReport.push({ | 1481 | this.testPaperExamReport.push({ |
| 1361 | - questionIndex: "主观题", | 1482 | + questionIndex: "客观题", |
| 1362 | type: "colspan", | 1483 | type: "colspan", |
| 1363 | - knowledge: subjective.sum, | ||
| 1364 | - score: subjective.avg == 0 ? 0 : Number(subjective.avg).toFixed(2), | ||
| 1365 | - avgScore: subjective.avg == 0 ? 0 : Number(subjective.avg * 100 / subjective.sum).toFixed(2) | 1484 | + knowledge: this.examReport.objectiveScore, |
| 1485 | + score: this.examReport.objectiveAvgScore, | ||
| 1486 | + avgScore: this.examReport.objectiveRate | ||
| 1366 | }) | 1487 | }) |
| 1367 | 1488 | ||
| 1368 | this.testPaperExamReport.push({ | 1489 | this.testPaperExamReport.push({ |
| 1369 | questionIndex: "合计", | 1490 | questionIndex: "合计", |
| 1370 | type: "colspan", | 1491 | type: "colspan", |
| 1371 | - knowledge: summary.sum, | ||
| 1372 | - score: summary.avg == 0 ? 0 : Number(summary.avg).toFixed(2), | ||
| 1373 | - avgScore: summary.avg == 0 ? 0 : Number(summary.avg * 100 / summary.sum).toFixed(2) | 1492 | + knowledge: this.examReport.examPaperScore, |
| 1493 | + score: this.examReport.avg, | ||
| 1494 | + avgScore: this.examReport.rate | ||
| 1374 | }) | 1495 | }) |
| 1375 | }, | 1496 | }, |
| 1376 | async _testStudentExamReport() { | 1497 | async _testStudentExamReport() { |
| @@ -1466,50 +1587,43 @@ export default { | @@ -1466,50 +1587,43 @@ export default { | ||
| 1466 | 1587 | ||
| 1467 | var studentResults = []; | 1588 | var studentResults = []; |
| 1468 | 1589 | ||
| 1469 | - for (var iheader = 0; iheader < 3; iheader++) { | ||
| 1470 | - for ( | ||
| 1471 | - var imapping = 0; | ||
| 1472 | - imapping < this.studentMapping.length; | ||
| 1473 | - imapping++ | ||
| 1474 | - ) { | ||
| 1475 | - studentHeaders.push({ | ||
| 1476 | - prop: this.studentMapping[imapping].key + "_" + iheader, | ||
| 1477 | - label: this.studentMapping[imapping].label, | ||
| 1478 | - key: this.studentMapping[imapping].key, | ||
| 1479 | - }); | ||
| 1480 | - } | 1590 | + for (var iheader = 0; iheader < 17; iheader++) { |
| 1591 | + studentHeaders.push({ | ||
| 1592 | + prop: "column" + iheader, | ||
| 1593 | + label: this.studentMapping[iheader % this.studentMapping.length].label, | ||
| 1594 | + key: this.studentMapping[iheader % this.studentMapping.length].key, | ||
| 1595 | + }); | ||
| 1481 | } | 1596 | } |
| 1482 | 1597 | ||
| 1598 | + var studentList = response.data.gradeExamStudentReports; | ||
| 1599 | + | ||
| 1483 | this.studentHeader = [...studentHeaders]; | 1600 | this.studentHeader = [...studentHeaders]; |
| 1484 | 1601 | ||
| 1485 | - for (var isp = 0; isp < response.data.gradeExamStudentReports.length; isp++) { | 1602 | + var stuRow = Math.ceil(studentList.length * 1.00 / 3); |
| 1486 | 1603 | ||
| 1487 | - var item = {}; | 1604 | + for (var isp = 0; isp < studentList.length; isp++) { |
| 1488 | 1605 | ||
| 1489 | - for ( | ||
| 1490 | - var iamapping = 0; | ||
| 1491 | - iamapping < studentHeaders.length; | ||
| 1492 | - iamapping++ | ||
| 1493 | - ) { | ||
| 1494 | - var currentData = response.data.gradeExamStudentReports[isp]; | 1606 | + var row = isp % stuRow; |
| 1495 | 1607 | ||
| 1496 | - if (!currentData) continue; | 1608 | + var col = parseInt(isp / stuRow); |
| 1497 | 1609 | ||
| 1498 | - var currentHeader = studentHeaders[iamapping]; | 1610 | + var item = {}; |
| 1499 | 1611 | ||
| 1500 | - item[currentHeader.prop] = currentData[currentHeader.key]; | 1612 | + if (studentResults.length <= row) |
| 1613 | + studentResults.push({}); | ||
| 1501 | 1614 | ||
| 1502 | - if ( | ||
| 1503 | - iamapping >= this.studentMapping.length - 1 && | ||
| 1504 | - iamapping % this.studentMapping.length == 0 | ||
| 1505 | - ) { | ||
| 1506 | - isp += 1; | ||
| 1507 | - } | ||
| 1508 | - } | 1615 | + item = studentResults[row]; |
| 1509 | 1616 | ||
| 1510 | - studentResults.push(item); | ||
| 1511 | - } | 1617 | + var studentResult = studentList[isp]; |
| 1512 | 1618 | ||
| 1619 | + item["column" + (6 * col)] = studentResult.code; | ||
| 1620 | + item["column" + (6 * col + 1)] = studentResult.name; | ||
| 1621 | + item["column" + (6 * col + 2)] = studentResult.gradeRank; | ||
| 1622 | + item["column" + (6 * col + 3)] = studentResult.exam; | ||
| 1623 | + item["column" + (6 * col + 4)] = studentResult.objective; | ||
| 1624 | + item["column" + (6 * col + 5)] = studentResult.subjective; | ||
| 1625 | + } | ||
| 1626 | + console.log(studentResults) | ||
| 1513 | this.studentList = [...studentResults]; | 1627 | this.studentList = [...studentResults]; |
| 1514 | 1628 | ||
| 1515 | var show4Area = true; //显示4选项区域 | 1629 | var show4Area = true; //显示4选项区域 |
| @@ -1530,7 +1644,9 @@ export default { | @@ -1530,7 +1644,9 @@ export default { | ||
| 1530 | 1644 | ||
| 1531 | for (var i = 0; i < questionList.length; i++) { | 1645 | for (var i = 0; i < questionList.length; i++) { |
| 1532 | 1646 | ||
| 1533 | - var correctAnswerValue = questionList[i].correctAnswer == "1" ? "✓" : questionList[i].correctAnswer == 2 ? "✗" : questionList[i].correctAnswer; | 1647 | + var correctAnswerValue = |
| 1648 | + questionList[i].questionType == 4 && questionList[i].correctAnswer == "1" ? "✓" : | ||
| 1649 | + questionList[i].questionType == 4 && questionList[i].correctAnswer == "2" ? "✗" : questionList[i].correctAnswer; | ||
| 1534 | 1650 | ||
| 1535 | var missCount = 0; | 1651 | var missCount = 0; |
| 1536 | 1652 | ||
| @@ -1562,6 +1678,10 @@ export default { | @@ -1562,6 +1678,10 @@ export default { | ||
| 1562 | minOptions = 2; | 1678 | minOptions = 2; |
| 1563 | optionNumList.push(2); | 1679 | optionNumList.push(2); |
| 1564 | } | 1680 | } |
| 1681 | + if (questionList[i].questionType == 3) { | ||
| 1682 | + if (minOptions > 4) minOptions = 4; | ||
| 1683 | + } | ||
| 1684 | + | ||
| 1565 | } | 1685 | } |
| 1566 | 1686 | ||
| 1567 | show4Area = minOptions <= 4; | 1687 | show4Area = minOptions <= 4; |
| @@ -1593,7 +1713,9 @@ export default { | @@ -1593,7 +1713,9 @@ export default { | ||
| 1593 | 1713 | ||
| 1594 | var currentRow = areaList[row]; | 1714 | var currentRow = areaList[row]; |
| 1595 | 1715 | ||
| 1596 | - var correctAnswerValue = question.correctAnswer == "1" ? "✓" : question.correctAnswer == "2" ? "✗" : question.correctAnswer; | 1716 | + var correctAnswerValue = |
| 1717 | + question.questionType == 4 && question.correctAnswer == "1" ? "✓" : | ||
| 1718 | + question.questionType == 4 && question.correctAnswer == "2" ? "✗" : question.correctAnswer; | ||
| 1597 | 1719 | ||
| 1598 | var details = question.details.filter(fl => { | 1720 | var details = question.details.filter(fl => { |
| 1599 | return fl.option.indexOf('未答') < 0; | 1721 | return fl.option.indexOf('未答') < 0; |
| @@ -1615,8 +1737,8 @@ export default { | @@ -1615,8 +1737,8 @@ export default { | ||
| 1615 | var questionColumn = 'column' + Number(6 * col + ilr); | 1737 | var questionColumn = 'column' + Number(6 * col + ilr); |
| 1616 | 1738 | ||
| 1617 | if (details.length <= 4) { | 1739 | if (details.length <= 4) { |
| 1618 | - | ||
| 1619 | - var questionOption = questionDetail ? (questionDetail.option == "1" ? "✓" : questionDetail.option == "2" ? "✗" : questionDetail.option) : "- -" | 1740 | + var questionOption = questionDetail ? (question.questionType == 4 && questionDetail.option == "1" ? "✓" : |
| 1741 | + question.questionType == 4 && questionDetail.option == "2" ? "✗" : questionDetail.option) : "- -" | ||
| 1620 | 1742 | ||
| 1621 | if (questionOption != "- -") questionOption += "(" + questionDetail.persent + ")"; | 1743 | if (questionOption != "- -") questionOption += "(" + questionDetail.persent + ")"; |
| 1622 | 1744 | ||
| @@ -1662,7 +1784,8 @@ export default { | @@ -1662,7 +1784,8 @@ export default { | ||
| 1662 | 1784 | ||
| 1663 | var currentRow = areaList[row]; | 1785 | var currentRow = areaList[row]; |
| 1664 | 1786 | ||
| 1665 | - var correctAnswerValue = question.correctAnswer == "1" ? "✓" : question.correctAnswer == 2 ? "✗" : question.correctAnswer; | 1787 | + var correctAnswerValue = question.questionType == 4 && question.correctAnswer == "1" ? "✓" : |
| 1788 | + question.questionType == 4 && question.correctAnswer == "2" ? "✗" : question.correctAnswer; | ||
| 1666 | 1789 | ||
| 1667 | for (var ilr = 0; ilr < 9; ilr++) { | 1790 | for (var ilr = 0; ilr < 9; ilr++) { |
| 1668 | 1791 | ||
| @@ -1719,7 +1842,8 @@ export default { | @@ -1719,7 +1842,8 @@ export default { | ||
| 1719 | 1842 | ||
| 1720 | var currentRow = areaList[row]; | 1843 | var currentRow = areaList[row]; |
| 1721 | 1844 | ||
| 1722 | - var correctAnswerValue = question.correctAnswer == "1" ? "✓" : question.correctAnswer == 2 ? "✗" : question.correctAnswer; | 1845 | + var correctAnswerValue = question.questionType == 4 && question.correctAnswer == "1" ? "✓" : |
| 1846 | + question.questionType == 4 && question.correctAnswer == "2" ? "✗" : question.correctAnswer; | ||
| 1723 | 1847 | ||
| 1724 | for (var ilr = 0; ilr < 12; ilr++) { | 1848 | for (var ilr = 0; ilr < 12; ilr++) { |
| 1725 | 1849 | ||
| @@ -1774,7 +1898,8 @@ export default { | @@ -1774,7 +1898,8 @@ export default { | ||
| 1774 | : this.$request.periodDetail; | 1898 | : this.$request.periodDetail; |
| 1775 | 1899 | ||
| 1776 | let response = await request({ | 1900 | let response = await request({ |
| 1777 | - periodIds: this.ids | 1901 | + periodIds: this.ids, |
| 1902 | + size: 9999 | ||
| 1778 | }); | 1903 | }); |
| 1779 | 1904 | ||
| 1780 | if (response.status != 0) { | 1905 | if (response.status != 0) { |
| @@ -1794,7 +1919,8 @@ export default { | @@ -1794,7 +1919,8 @@ export default { | ||
| 1794 | 1919 | ||
| 1795 | let listResponse = await listRequest({ | 1920 | let listResponse = await listRequest({ |
| 1796 | periodIds: this.ids, | 1921 | periodIds: this.ids, |
| 1797 | - classIds: this.classIds | 1922 | + classIds: this.classIds, |
| 1923 | + size: 9999 | ||
| 1798 | }); | 1924 | }); |
| 1799 | 1925 | ||
| 1800 | if (listResponse.status != 0) { | 1926 | if (listResponse.status != 0) { |
| @@ -1827,12 +1953,13 @@ export default { | @@ -1827,12 +1953,13 @@ export default { | ||
| 1827 | if (detail.length > this.askPeriodQuestionItemOptions.length) { | 1953 | if (detail.length > this.askPeriodQuestionItemOptions.length) { |
| 1828 | this.askPeriodQuestionItemOptions = [...detail]; | 1954 | this.askPeriodQuestionItemOptions = [...detail]; |
| 1829 | } | 1955 | } |
| 1956 | + | ||
| 1830 | detail.map((items, index) => { | 1957 | detail.map((items, index) => { |
| 1831 | params["isRight" + index] = items.isRight; | 1958 | params["isRight" + index] = items.isRight; |
| 1832 | params["answer" + index] = | 1959 | params["answer" + index] = |
| 1833 | - items.answer == 1 | 1960 | + items.answer == "1" && items.questionType == 4 |
| 1834 | ? "✓" | 1961 | ? "✓" |
| 1835 | - : items.answer == 2 | 1962 | + : items.answer == "2" && items.questionType == 4 |
| 1836 | ? "✗" | 1963 | ? "✗" |
| 1837 | : items.answer; | 1964 | : items.answer; |
| 1838 | }); | 1965 | }); |
| @@ -1878,7 +2005,6 @@ export default { | @@ -1878,7 +2005,6 @@ export default { | ||
| 1878 | 2005 | ||
| 1879 | this.askCheckinStatus = response.data.list; | 2006 | this.askCheckinStatus = response.data.list; |
| 1880 | 2007 | ||
| 1881 | - console.log(detailResponse, response) | ||
| 1882 | 2008 | ||
| 1883 | }, | 2009 | }, |
| 1884 | async _loadTestDetail() { | 2010 | async _loadTestDetail() { |
| @@ -1934,15 +2060,16 @@ export default { | @@ -1934,15 +2060,16 @@ export default { | ||
| 1934 | if (detail.length > optionsList.length) { | 2060 | if (detail.length > optionsList.length) { |
| 1935 | optionsList = [...detail]; | 2061 | optionsList = [...detail]; |
| 1936 | } | 2062 | } |
| 2063 | + | ||
| 1937 | detail.map((items, index) => { | 2064 | detail.map((items, index) => { |
| 1938 | params["que" + items.id] = items.id; | 2065 | params["que" + items.id] = items.id; |
| 1939 | params["score" + items.id] = String(items.score).includes(".") | 2066 | params["score" + items.id] = String(items.score).includes(".") |
| 1940 | ? Number(items.score) | 2067 | ? Number(items.score) |
| 1941 | : items.score; | 2068 | : items.score; |
| 1942 | params["answer" + items.id] = | 2069 | params["answer" + items.id] = |
| 1943 | - items.answer == 1 ? "✓" : items.answer == 2 ? "✗" : items.answer; | 2070 | + items.questionType == 4 && items.answer == "1" ? "✓" : items.questionType == 4 && items.answer == "2" ? "✗" : items.answer; |
| 1944 | params["isRight" + items.id] = items.isRight; | 2071 | params["isRight" + items.id] = items.isRight; |
| 1945 | - params["questionType" + items.id] = items.questionType; | 2072 | + params["questionType" + items.id] = item.questionType; |
| 1946 | }); | 2073 | }); |
| 1947 | return { | 2074 | return { |
| 1948 | ...item, | 2075 | ...item, |
| @@ -2017,22 +2144,22 @@ export default { | @@ -2017,22 +2144,22 @@ export default { | ||
| 2017 | min: 9999, | 2144 | min: 9999, |
| 2018 | answeredRate: 0 | 2145 | answeredRate: 0 |
| 2019 | }; | 2146 | }; |
| 2020 | - | 2147 | + |
| 2021 | var maxOption = 0; | 2148 | var maxOption = 0; |
| 2022 | - | ||
| 2023 | - data?.list?.forEach((item) =>{ | ||
| 2024 | - | ||
| 2025 | - const detail = JSON.parse(item.detail); | ||
| 2026 | - | ||
| 2027 | - if(maxOption < detail.length) | ||
| 2028 | - { | 2149 | + |
| 2150 | + data?.list?.forEach((item) => { | ||
| 2151 | + | ||
| 2152 | + const detail = JSON.parse(item.detail); | ||
| 2153 | + | ||
| 2154 | + if (maxOption < detail.length) { | ||
| 2155 | + | ||
| 2029 | maxOption = detail.length; | 2156 | maxOption = detail.length; |
| 2030 | - } | 2157 | + } |
| 2031 | }) | 2158 | }) |
| 2032 | - | ||
| 2033 | - let optionsList = []; | ||
| 2034 | 2159 | ||
| 2035 | - for(var io=0;io<maxOption;io++){ | 2160 | + let optionsList = []; |
| 2161 | + | ||
| 2162 | + for (var io = 0; io < maxOption; io++) { | ||
| 2036 | optionsList.push({}) | 2163 | optionsList.push({}) |
| 2037 | } | 2164 | } |
| 2038 | 2165 | ||
| @@ -2059,21 +2186,21 @@ export default { | @@ -2059,21 +2186,21 @@ export default { | ||
| 2059 | : ""; | 2186 | : ""; |
| 2060 | params["option" + index] = | 2187 | params["option" + index] = |
| 2061 | defaultArr[index]?.option != "未答" | 2188 | defaultArr[index]?.option != "未答" |
| 2062 | - ? defaultArr[index]?.option == 1 | 2189 | + ? defaultArr[index]?.option == "1" && item?.questionType == 4 |
| 2063 | ? "✓" | 2190 | ? "✓" |
| 2064 | - : defaultArr[index]?.option == 2 | 2191 | + : defaultArr[index]?.option == "2" && item?.questionType == 4 |
| 2065 | ? "✗" | 2192 | ? "✗" |
| 2066 | : defaultArr[index]?.option | 2193 | : defaultArr[index]?.option |
| 2067 | : ""; | 2194 | : ""; |
| 2195 | + | ||
| 2068 | items["title"] = "选项" + (index + 1); | 2196 | items["title"] = "选项" + (index + 1); |
| 2069 | - // if (index != 4) { | ||
| 2070 | - | ||
| 2071 | - // } else { | ||
| 2072 | - // items["title"] = "未答"; | ||
| 2073 | - // params["count" + index] = lastOPtion.count; | ||
| 2074 | - // params["persent" + index] = lastOPtion.persent; | ||
| 2075 | - // params["option" + index] = "?"; | ||
| 2076 | - // } | 2197 | + if (index >= optionsList.length - 1) { |
| 2198 | + items["title"] = "未答"; | ||
| 2199 | + params["count" + index] = lastOPtion.count; | ||
| 2200 | + params["persent" + index] = lastOPtion.persent; | ||
| 2201 | + params["option" + index] = "未答"; | ||
| 2202 | + } | ||
| 2203 | + | ||
| 2077 | }); | 2204 | }); |
| 2078 | 2205 | ||
| 2079 | summary.sum += parseFloat(item.score); | 2206 | summary.sum += parseFloat(item.score); |
| @@ -2117,47 +2244,46 @@ export default { | @@ -2117,47 +2244,46 @@ export default { | ||
| 2117 | questionIndex: "汇总", | 2244 | questionIndex: "汇总", |
| 2118 | questionType: "主观题", | 2245 | questionType: "主观题", |
| 2119 | //满分值 | 2246 | //满分值 |
| 2120 | - score: subjective.sum, | 2247 | + score: this.examReport.subjectiveScore, |
| 2121 | //最高分 | 2248 | //最高分 |
| 2122 | - highestScore: subjective.max, | 2249 | + highestScore: this.examReport.subjectiveHighestScore, |
| 2123 | //最低分 | 2250 | //最低分 |
| 2124 | - lowestScore: subjective.min == 9999 ? 0 : subjective.min, | 2251 | + lowestScore: this.examReport.subjectiveLowestScore, |
| 2125 | //平均分 | 2252 | //平均分 |
| 2126 | - avgScore: subjective.avg == 0 ? 0 : Number(subjective.avg).toFixed(2), | 2253 | + avgScore: this.examReport.subjectiveAvgScore, |
| 2127 | //已考得分率 | 2254 | //已考得分率 |
| 2128 | - classScoringRate: subjective.sum == 0 ? 0 : Number(subjective.avg * 100 / subjective.sum).toFixed(2) | 2255 | + scoringRate: this.examReport.subjectiveScoringRate, |
| 2256 | + correctAnswer: "备注" | ||
| 2129 | }) | 2257 | }) |
| 2130 | 2258 | ||
| 2131 | this.testQuestions.push({ | 2259 | this.testQuestions.push({ |
| 2132 | questionIndex: "客观题", | 2260 | questionIndex: "客观题", |
| 2133 | type: "colspan", | 2261 | type: "colspan", |
| 2134 | //满分值 | 2262 | //满分值 |
| 2135 | - knowledge: objective.sum, | 2263 | + knowledge: this.examReport.objectiveScore, |
| 2136 | //最高分 | 2264 | //最高分 |
| 2137 | - score: objective.max, | 2265 | + score: this.examReport.objectiveHighestScore, |
| 2138 | //最低分 | 2266 | //最低分 |
| 2139 | - highestScore: objective.min == 9999 ? 0 : objective.min, | 2267 | + highestScore: this.examReport.objectiveLowestScore, |
| 2140 | //平均分 | 2268 | //平均分 |
| 2141 | - lowestScore: objective.avg == 0 ? 0 : Number(objective.avg).toFixed(2), | 2269 | + lowestScore: this.examReport.objectiveAvgScore, |
| 2142 | //已考得分率 | 2270 | //已考得分率 |
| 2143 | - avgScore: objective.sum == 0 ? 0 : Number(objective.avg * 100 / objective.sum).toFixed(2) | 2271 | + avgScore: this.examReport.objectiveScoringRate |
| 2144 | }) | 2272 | }) |
| 2145 | 2273 | ||
| 2146 | - | ||
| 2147 | - | ||
| 2148 | this.testQuestions.push({ | 2274 | this.testQuestions.push({ |
| 2149 | questionIndex: "合计", | 2275 | questionIndex: "合计", |
| 2150 | type: "colspan", | 2276 | type: "colspan", |
| 2151 | //满分值 | 2277 | //满分值 |
| 2152 | - knowledge: summary.sum, | 2278 | + knowledge: this.examReport.examPaperScore, |
| 2153 | //最高分 | 2279 | //最高分 |
| 2154 | - score: summary.max, | 2280 | + score: this.examReport.highestScore, |
| 2155 | //最低分 | 2281 | //最低分 |
| 2156 | - highestScore: summary.min == 9999 ? 0 : summary.min, | 2282 | + highestScore: this.examReport.lowestScore, |
| 2157 | //平均分 | 2283 | //平均分 |
| 2158 | - lowestScore: summary.avg == 0 ? 0 : Number(summary.avg).toFixed(2), | 2284 | + lowestScore: this.examReport.avgScore, |
| 2159 | //已考得分率 | 2285 | //已考得分率 |
| 2160 | - avgScore: summary.sum == 0 ? 0 : Number(summary.avg / summary.sum * 100).toFixed(2) | 2286 | + avgScore: this.examReport.scoringRate |
| 2161 | }) | 2287 | }) |
| 2162 | }, | 2288 | }, |
| 2163 | keydownRange(event) { | 2289 | keydownRange(event) { |
| @@ -2192,9 +2318,12 @@ export default { | @@ -2192,9 +2318,12 @@ export default { | ||
| 2192 | margin-top: 20px; | 2318 | margin-top: 20px; |
| 2193 | } | 2319 | } |
| 2194 | 2320 | ||
| 2195 | -.red { | ||
| 2196 | - color: #f30; | ||
| 2197 | -} | 2321 | + |
| 2322 | + | ||
| 2323 | + | ||
| 2324 | +// .red { | ||
| 2325 | +// color: #f30; | ||
| 2326 | +// } | ||
| 2198 | 2327 | ||
| 2199 | .dia-tab-box { | 2328 | .dia-tab-box { |
| 2200 | font-size: 14px; | 2329 | font-size: 14px; |
src/views/basic/askTestQuestion/gradeAnalysisDetail.vue
| 1 | <template> | 1 | <template> |
| 2 | - <el-container class="default-body"> | 2 | + <el-container class="default-body default-body-detail"> |
| 3 | <el-header> | 3 | <el-header> |
| 4 | <back-box class="detailBack"> | 4 | <back-box class="detailBack"> |
| 5 | <template slot="title"> | 5 | <template slot="title"> |
| @@ -45,7 +45,7 @@ | @@ -45,7 +45,7 @@ | ||
| 45 | <span class="line-subfix">试卷名称:</span> | 45 | <span class="line-subfix">试卷名称:</span> |
| 46 | <el-tooltip effect="dark" :content="item.paperName" placement="left"> | 46 | <el-tooltip effect="dark" :content="item.paperName" placement="left"> |
| 47 | <span class="line-value">{{ item.paperName }}</span> | 47 | <span class="line-value">{{ item.paperName }}</span> |
| 48 | - </el-tooltip> | 48 | + </el-tooltip> |
| 49 | </div> | 49 | </div> |
| 50 | <div class="row-line"> | 50 | <div class="row-line"> |
| 51 | <span class="line-subfix">测验时间:</span> | 51 | <span class="line-subfix">测验时间:</span> |
| @@ -183,7 +183,7 @@ | @@ -183,7 +183,7 @@ | ||
| 183 | {{ scoped.row.missPeopleNumber }}</span> 人 | 183 | {{ scoped.row.missPeopleNumber }}</span> 人 |
| 184 | </span> | 184 | </span> |
| 185 | <span style="margin: 10px 0;" | 185 | <span style="margin: 10px 0;" |
| 186 | - v-for="(item, index) in scoped.row.details.filter(item => !item.right)"> | 186 | + v-for="(item, index) in scoped.row.details.filter(item => item.option.indexOf('未答') < 0 && !item.right)"> |
| 187 | 选{{ item.option }}:{{ item.students.join("/") }} | 187 | 选{{ item.option }}:{{ item.students.join("/") }} |
| 188 | </span> | 188 | </span> |
| 189 | <span></span> | 189 | <span></span> |
| @@ -199,7 +199,7 @@ | @@ -199,7 +199,7 @@ | ||
| 199 | <el-button type="default" style="margin-left:0px" :size="'small'" | 199 | <el-button type="default" style="margin-left:0px" :size="'small'" |
| 200 | @click="_changePage('next')">下一页</el-button> | 200 | @click="_changePage('next')">下一页</el-button> |
| 201 | </div> | 201 | </div> |
| 202 | - <div style="display: none;"> | 202 | + <div style="height: 1px;overflow: hidden;"> |
| 203 | <div id="test-print"> | 203 | <div id="test-print"> |
| 204 | <div v-for="(testTranscript, index) in testTranscriptDatas"> | 204 | <div v-for="(testTranscript, index) in testTranscriptDatas"> |
| 205 | <div style="margin-top:20px"> | 205 | <div style="margin-top:20px"> |
| @@ -313,7 +313,7 @@ | @@ -313,7 +313,7 @@ | ||
| 313 | {{ scoped.row.missPeopleNumber }}</span> 人 | 313 | {{ scoped.row.missPeopleNumber }}</span> 人 |
| 314 | </span> | 314 | </span> |
| 315 | <span style="margin: 10px 0;" | 315 | <span style="margin: 10px 0;" |
| 316 | - v-for="(item, index) in scoped.row.details.filter(item => !item.right)"> | 316 | + v-for="(item, index) in scoped.row.details.filter(item => item.option.indexOf('未答') < 0 && !item.right)"> |
| 317 | 选{{ item.option }}:{{ item.students.join("/") }} | 317 | 选{{ item.option }}:{{ item.students.join("/") }} |
| 318 | </span> | 318 | </span> |
| 319 | <span></span> | 319 | <span></span> |
| @@ -325,10 +325,9 @@ | @@ -325,10 +325,9 @@ | ||
| 325 | </div> | 325 | </div> |
| 326 | </div> | 326 | </div> |
| 327 | </div> | 327 | </div> |
| 328 | - | ||
| 329 | </el-tab-pane> | 328 | </el-tab-pane> |
| 330 | <el-tab-pane :name="'班级对比情况'" :label="`班级对比情况`" style="padding: 0 20px"> | 329 | <el-tab-pane :name="'班级对比情况'" :label="`班级对比情况`" style="padding: 0 20px"> |
| 331 | - <div style="float: right;margin-bottom: 20px;"> | 330 | + <div class="print-hidden" style="float: right;margin-bottom: 20px;"> |
| 332 | <el-button @click="_studentLevelSet" class="green-el-button" type="primary"> | 331 | <el-button @click="_studentLevelSet" class="green-el-button" type="primary"> |
| 333 | 设置学生成绩等级 | 332 | 设置学生成绩等级 |
| 334 | </el-button> | 333 | </el-button> |
| @@ -382,7 +381,7 @@ | @@ -382,7 +381,7 @@ | ||
| 382 | </el-table> | 381 | </el-table> |
| 383 | </el-tab-pane> | 382 | </el-tab-pane> |
| 384 | <el-tab-pane :name="'试题分析表'" :label="`试题分析表`" style="padding: 0 20px"> | 383 | <el-tab-pane :name="'试题分析表'" :label="`试题分析表`" style="padding: 0 20px"> |
| 385 | - <div style="float: right;margin-bottom: 20px;"> | 384 | + <div class="print-hidden" style="float: right;margin-bottom: 20px;"> |
| 386 | 单题低分率 | 385 | 单题低分率 |
| 387 | <el-input-number class="parent-number" v-model="lowLevel" :min="1" :max="100" label="低分率"> | 386 | <el-input-number class="parent-number" v-model="lowLevel" :min="1" :max="100" label="低分率"> |
| 388 | </el-input-number> | 387 | </el-input-number> |
| @@ -399,11 +398,16 @@ | @@ -399,11 +398,16 @@ | ||
| 399 | </el-table-column> | 398 | </el-table-column> |
| 400 | <el-table-column prop="knowledge" label="知识点"> | 399 | <el-table-column prop="knowledge" label="知识点"> |
| 401 | <template slot-scope="scoped"> | 400 | <template slot-scope="scoped"> |
| 402 | - <el-tooltip effect="dark" :content="scoped.row.knowledge" placement="left"> | ||
| 403 | - <span class="overflowText"> | ||
| 404 | - {{ scoped.row.knowledge }} | ||
| 405 | - </span> | ||
| 406 | - </el-tooltip> | 401 | + <div v-if="scoped.row.type == 'colspan'"> |
| 402 | + {{ scoped.row.knowledge }} | ||
| 403 | + </div> | ||
| 404 | + <div v-else> | ||
| 405 | + <el-tooltip effect="dark" :content="_knowledge(scoped.row.knowledge)" placement="bottom"> | ||
| 406 | + <span class="overflowText"> | ||
| 407 | + {{ _knowledge(scoped.row.knowledge) }} | ||
| 408 | + </span> | ||
| 409 | + </el-tooltip> | ||
| 410 | + </div> | ||
| 407 | </template> | 411 | </template> |
| 408 | </el-table-column> | 412 | </el-table-column> |
| 409 | <el-table-column prop="score" label="满分值" width="120"> | 413 | <el-table-column prop="score" label="满分值" width="120"> |
| @@ -427,11 +431,11 @@ | @@ -427,11 +431,11 @@ | ||
| 427 | </div> | 431 | </div> |
| 428 | </template> | 432 | </template> |
| 429 | </el-table-column> | 433 | </el-table-column> |
| 430 | - <el-table-column prop="gradeScoringRate" label="年级得分率" width="120"> | 434 | + <el-table-column prop="gradeScoringRate" label="年级已考得分率" width="150"> |
| 431 | <template slot-scope="scoped"> | 435 | <template slot-scope="scoped"> |
| 432 | <div v-if="scoped.row.type == 'colspan'" | 436 | <div v-if="scoped.row.type == 'colspan'" |
| 433 | :class="scoped.row.gradeScoringRate < lowLevel ? 'lowLevelClass' : ''"> | 437 | :class="scoped.row.gradeScoringRate < lowLevel ? 'lowLevelClass' : ''"> |
| 434 | - {{ scoped.row.gradeScoringRate }} % | 438 | + {{ Number(scoped.row.gradeScoringRate).toFixed(2) }} % |
| 435 | </div> | 439 | </div> |
| 436 | <div v-else="scoped.row.gradeScoringRate" | 440 | <div v-else="scoped.row.gradeScoringRate" |
| 437 | :class="Number(scoped.row.gradeScoringRate * 100) < lowLevel ? 'lowLevelClass' : ''"> | 441 | :class="Number(scoped.row.gradeScoringRate * 100) < lowLevel ? 'lowLevelClass' : ''"> |
| @@ -458,7 +462,7 @@ | @@ -458,7 +462,7 @@ | ||
| 458 | </el-table> | 462 | </el-table> |
| 459 | </el-tab-pane> | 463 | </el-tab-pane> |
| 460 | <el-tab-pane :name="'学生成绩排行'" :label="`学生成绩排行`" style="padding: 0 20px"> | 464 | <el-tab-pane :name="'学生成绩排行'" :label="`学生成绩排行`" style="padding: 0 20px"> |
| 461 | - <div style="float: right;margin-bottom: 20px;"> | 465 | + <div class="print-hidden" style="float: right;margin-bottom: 20px;"> |
| 462 | <el-button @click="_import" type="primary" class="opration-btn" icon="el-icon-upload2">导出报表</el-button> | 466 | <el-button @click="_import" type="primary" class="opration-btn" icon="el-icon-upload2">导出报表</el-button> |
| 463 | <el-button @click="_print" type="primary" class="opration-btn" icon="el-icon-printer">打印报表</el-button> | 467 | <el-button @click="_print" type="primary" class="opration-btn" icon="el-icon-printer">打印报表</el-button> |
| 464 | </div> | 468 | </div> |
| @@ -553,7 +557,7 @@ | @@ -553,7 +557,7 @@ | ||
| 553 | </template> | 557 | </template> |
| 554 | 558 | ||
| 555 | <script> | 559 | <script> |
| 556 | -import { formatDate, downloadFile, tablePrint } from "utils"; | 560 | +import { formatDate, downloadFile, tablePrint, getKnowledge } from "utils"; |
| 557 | export default { | 561 | export default { |
| 558 | data() { | 562 | data() { |
| 559 | return { | 563 | return { |
| @@ -577,6 +581,24 @@ export default { | @@ -577,6 +581,24 @@ export default { | ||
| 577 | question10List: [], | 581 | question10List: [], |
| 578 | questionTotal: [], | 582 | questionTotal: [], |
| 579 | }, | 583 | }, |
| 584 | + // 报表详情 | ||
| 585 | + examReport: { | ||
| 586 | + subjectiveScore: 0, | ||
| 587 | + subjectiveHighestScore: "", | ||
| 588 | + subjectiveLowestScore: "", | ||
| 589 | + subjectiveAvgScore: "", | ||
| 590 | + subjectiveClassScoringRate: "", | ||
| 591 | + objectiveScore: "", | ||
| 592 | + objectiveHighestScore: "", | ||
| 593 | + objectiveLowestScore: "", | ||
| 594 | + objectiveAvgScore: "", | ||
| 595 | + objectiveClassScoringRate: "", | ||
| 596 | + examPaperScore: "", | ||
| 597 | + highestScore: "", | ||
| 598 | + lowestScore: "", | ||
| 599 | + avgScore: "", | ||
| 600 | + classScoringRate: "", | ||
| 601 | + }, | ||
| 580 | currentPage: 0, | 602 | currentPage: 0, |
| 581 | totalPage: 0, | 603 | totalPage: 0, |
| 582 | checkedClassInfos: [], | 604 | checkedClassInfos: [], |
| @@ -652,8 +674,29 @@ export default { | @@ -652,8 +674,29 @@ export default { | ||
| 652 | this.checkedClassInfos = this.classInfos?.map(item => item.classId); | 674 | this.checkedClassInfos = this.classInfos?.map(item => item.classId); |
| 653 | this.tabType = "成绩测验单"; | 675 | this.tabType = "成绩测验单"; |
| 654 | await this._queryDefaultLevels(); | 676 | await this._queryDefaultLevels(); |
| 677 | + await this._examDetail(); | ||
| 655 | }, | 678 | }, |
| 656 | methods: { | 679 | methods: { |
| 680 | + _knowledge(knowledgeParam) { | ||
| 681 | + return getKnowledge(knowledgeParam) | ||
| 682 | + }, | ||
| 683 | + async _examDetail() { | ||
| 684 | + | ||
| 685 | + const request = this.$request.gclassdiffReport; | ||
| 686 | + | ||
| 687 | + let { data, info, status } = await request({ | ||
| 688 | + paperId: this.paperId, | ||
| 689 | + classIds: this.checkedClassInfos, | ||
| 690 | + }); | ||
| 691 | + | ||
| 692 | + if (status != 0) { | ||
| 693 | + this.$message.error(info); | ||
| 694 | + return; | ||
| 695 | + } | ||
| 696 | + | ||
| 697 | + this.examReport = { ...data }; | ||
| 698 | + | ||
| 699 | + }, | ||
| 657 | async _anys() { | 700 | async _anys() { |
| 658 | this.queryLoading = true; | 701 | this.queryLoading = true; |
| 659 | switch (this.tabType) { | 702 | switch (this.tabType) { |
| @@ -762,12 +805,20 @@ export default { | @@ -762,12 +805,20 @@ export default { | ||
| 762 | return [3, 1]; | 805 | return [3, 1]; |
| 763 | } | 806 | } |
| 764 | else if (columnIndex == 7) { | 807 | else if (columnIndex == 7) { |
| 765 | - return [3, 5]; | 808 | + return [3, this.testPaperExamReportOptions.length]; |
| 809 | + } | ||
| 810 | + else if (columnIndex >= 7) { | ||
| 811 | + return [0, 0]; | ||
| 766 | } | 812 | } |
| 767 | else { | 813 | else { |
| 768 | return [1, 1] | 814 | return [1, 1] |
| 769 | } | 815 | } |
| 770 | } | 816 | } |
| 817 | + else if (rowIndex > this.testPaperExamReport?.length - 3) { | ||
| 818 | + if (columnIndex >= 5) { | ||
| 819 | + return [0, 0]; | ||
| 820 | + } | ||
| 821 | + } | ||
| 771 | else { | 822 | else { |
| 772 | return [1, 1] | 823 | return [1, 1] |
| 773 | } | 824 | } |
| @@ -810,14 +861,21 @@ export default { | @@ -810,14 +861,21 @@ export default { | ||
| 810 | 861 | ||
| 811 | this.testTranscriptDatas = []; | 862 | this.testTranscriptDatas = []; |
| 812 | for (var page = 0; page < this.checkedClassInfos.length; page++) { | 863 | for (var page = 0; page < this.checkedClassInfos.length; page++) { |
| 813 | - this.testTranscriptDatas.push(await this._testExamReport(page)); | 864 | + this.testTranscriptDatas.push(await this._testExamReport(page, 1)); |
| 814 | } | 865 | } |
| 815 | setTimeout(() => { | 866 | setTimeout(() => { |
| 816 | - tablePrint("test-print", this.tabType); | ||
| 817 | - }, 500); | 867 | + tablePrint({ |
| 868 | + id: "test-print", | ||
| 869 | + title: this.tabType | ||
| 870 | + }); | ||
| 871 | + }, 1000); | ||
| 818 | } | 872 | } |
| 819 | else { | 873 | else { |
| 820 | - tablePrint("print-content", this.tabType); | 874 | + tablePrint({ |
| 875 | + id: "print-content", | ||
| 876 | + title: this.tabType, | ||
| 877 | + printType: '年级组长-' + this.tabType | ||
| 878 | + }); | ||
| 821 | } | 879 | } |
| 822 | }, | 880 | }, |
| 823 | async _import() { | 881 | async _import() { |
| @@ -865,7 +923,6 @@ export default { | @@ -865,7 +923,6 @@ export default { | ||
| 865 | this.$message.error("下载失败"); | 923 | this.$message.error("下载失败"); |
| 866 | } | 924 | } |
| 867 | }, | 925 | }, |
| 868 | - _detailQ(id) { }, | ||
| 869 | setSubPro(type) { | 926 | setSubPro(type) { |
| 870 | let tit; | 927 | let tit; |
| 871 | switch (type) { | 928 | switch (type) { |
| @@ -922,48 +979,43 @@ export default { | @@ -922,48 +979,43 @@ export default { | ||
| 922 | 979 | ||
| 923 | var studentResults = []; | 980 | var studentResults = []; |
| 924 | 981 | ||
| 925 | - for (var iheader = 0; iheader < 3; iheader++) { | ||
| 926 | - for ( | ||
| 927 | - var imapping = 0; | ||
| 928 | - imapping < this.studentMapping.length; | ||
| 929 | - imapping++ | ||
| 930 | - ) { | ||
| 931 | - studentHeaders.push({ | ||
| 932 | - prop: this.studentMapping[imapping].key + "_" + iheader, | ||
| 933 | - label: this.studentMapping[imapping].label, | ||
| 934 | - key: this.studentMapping[imapping].key, | ||
| 935 | - }); | ||
| 936 | - } | 982 | + for (var iheader = 0; iheader < 17; iheader++) { |
| 983 | + studentHeaders.push({ | ||
| 984 | + prop: "column" + iheader, | ||
| 985 | + label: this.studentMapping[iheader % this.studentMapping.length].label, | ||
| 986 | + key: this.studentMapping[iheader % this.studentMapping.length].key, | ||
| 987 | + }); | ||
| 937 | } | 988 | } |
| 938 | 989 | ||
| 939 | demoTestTranscript.studentHeader = [...studentHeaders]; | 990 | demoTestTranscript.studentHeader = [...studentHeaders]; |
| 940 | 991 | ||
| 941 | - for (var isp = 0; isp < response.data.gradeExamStudentReports.length; isp++) { | 992 | + var studentList = response.data.gradeExamStudentReports; |
| 942 | 993 | ||
| 943 | - var item = {}; | 994 | + this.studentHeader = [...studentHeaders]; |
| 944 | 995 | ||
| 945 | - for ( | ||
| 946 | - var iamapping = 0; | ||
| 947 | - iamapping < studentHeaders.length; | ||
| 948 | - iamapping++ | ||
| 949 | - ) { | ||
| 950 | - var currentData = response.data.gradeExamStudentReports[isp]; | 996 | + var stuRow = Math.ceil(studentList.length * 1.00 / 3); |
| 951 | 997 | ||
| 952 | - if (!currentData) continue; | 998 | + for (var isp = 0; isp < studentList.length; isp++) { |
| 953 | 999 | ||
| 954 | - var currentHeader = studentHeaders[iamapping]; | 1000 | + var row = isp % stuRow; |
| 955 | 1001 | ||
| 956 | - item[currentHeader.prop] = currentData[currentHeader.key]; | 1002 | + var col = parseInt(isp / stuRow); |
| 957 | 1003 | ||
| 958 | - if ( | ||
| 959 | - iamapping >= this.studentMapping.length - 1 && | ||
| 960 | - iamapping % this.studentMapping.length == 0 | ||
| 961 | - ) { | ||
| 962 | - isp += 1; | ||
| 963 | - } | ||
| 964 | - } | 1004 | + var item = {}; |
| 1005 | + | ||
| 1006 | + if (studentResults.length <= row) | ||
| 1007 | + studentResults.push({}); | ||
| 1008 | + | ||
| 1009 | + item = studentResults[row]; | ||
| 965 | 1010 | ||
| 966 | - studentResults.push(item); | 1011 | + var studentResult = studentList[isp]; |
| 1012 | + | ||
| 1013 | + item["column" + (6 * col)] = studentResult.code; | ||
| 1014 | + item["column" + (6 * col + 1)] = studentResult.name; | ||
| 1015 | + item["column" + (6 * col + 2)] = studentResult.gradeRank; | ||
| 1016 | + item["column" + (6 * col + 3)] = studentResult.exam; | ||
| 1017 | + item["column" + (6 * col + 4)] = studentResult.objective; | ||
| 1018 | + item["column" + (6 * col + 5)] = studentResult.subjective; | ||
| 967 | } | 1019 | } |
| 968 | 1020 | ||
| 969 | demoTestTranscript.studentList = [...studentResults]; | 1021 | demoTestTranscript.studentList = [...studentResults]; |
| @@ -986,7 +1038,9 @@ export default { | @@ -986,7 +1038,9 @@ export default { | ||
| 986 | 1038 | ||
| 987 | for (var i = 0; i < questionList.length; i++) { | 1039 | for (var i = 0; i < questionList.length; i++) { |
| 988 | 1040 | ||
| 989 | - var correctAnswerValue = questionList[i].correctAnswer == "1" ? "✓" : questionList[i].correctAnswer == 2 ? "✗" : questionList[i].correctAnswer; | 1041 | + var correctAnswerValue = |
| 1042 | + questionList[i].questionType == 4 && questionList[i].correctAnswer == "1" ? "✓" : | ||
| 1043 | + questionList[i].questionType == 4 && questionList[i].correctAnswer == "2" ? "✗" : questionList[i].correctAnswer; | ||
| 990 | 1044 | ||
| 991 | var missCount = 0; | 1045 | var missCount = 0; |
| 992 | 1046 | ||
| @@ -1019,10 +1073,11 @@ export default { | @@ -1019,10 +1073,11 @@ export default { | ||
| 1019 | minOptions = 2; | 1073 | minOptions = 2; |
| 1020 | optionNumList.push(2); | 1074 | optionNumList.push(2); |
| 1021 | } | 1075 | } |
| 1076 | + if (questionList[i].questionType == 3) { | ||
| 1077 | + if (minOptions > 4) minOptions = 4; | ||
| 1078 | + } | ||
| 1022 | } | 1079 | } |
| 1023 | 1080 | ||
| 1024 | - console.log(demoTestTranscript.questionTotal) | ||
| 1025 | - | ||
| 1026 | show4Area = minOptions <= 4; | 1081 | show4Area = minOptions <= 4; |
| 1027 | 1082 | ||
| 1028 | show7Area = optionNumList.filter(o => o > 4 && o <= 7); | 1083 | show7Area = optionNumList.filter(o => o > 4 && o <= 7); |
| @@ -1052,7 +1107,8 @@ export default { | @@ -1052,7 +1107,8 @@ export default { | ||
| 1052 | 1107 | ||
| 1053 | var currentRow = areaList[row]; | 1108 | var currentRow = areaList[row]; |
| 1054 | 1109 | ||
| 1055 | - var correctAnswerValue = question.correctAnswer == "1" ? "✓" : question.correctAnswer == 2 ? "✗" : question.correctAnswer; | 1110 | + var correctAnswerValue = question.questionType == 4 && question.correctAnswer == "1" ? "✓" : |
| 1111 | + question.questionType == 4 && question.correctAnswer == "2" ? "✗" : question.correctAnswer; | ||
| 1056 | 1112 | ||
| 1057 | var details = question.details.filter(fl => { | 1113 | var details = question.details.filter(fl => { |
| 1058 | return fl.option.indexOf('未答') < 0; | 1114 | return fl.option.indexOf('未答') < 0; |
| @@ -1075,7 +1131,9 @@ export default { | @@ -1075,7 +1131,9 @@ export default { | ||
| 1075 | 1131 | ||
| 1076 | if (details.length <= 4) { | 1132 | if (details.length <= 4) { |
| 1077 | 1133 | ||
| 1078 | - var questionOption = questionDetail ? (questionDetail.option == "1" ? "✓" : questionDetail.option == "2" ? "✗" : questionDetail.option) : "- -" | 1134 | + var questionOption = questionDetail ? ( |
| 1135 | + question.questionType == 4 && questionDetail.option == "1" ? "✓" : | ||
| 1136 | + question.questionType == 4 && questionDetail.option == "2" ? "✗" : questionDetail.option) : "- -" | ||
| 1079 | 1137 | ||
| 1080 | if (questionOption != "- -") questionOption += "(" + questionDetail.persent + ")"; | 1138 | if (questionOption != "- -") questionOption += "(" + questionDetail.persent + ")"; |
| 1081 | 1139 | ||
| @@ -1121,7 +1179,8 @@ export default { | @@ -1121,7 +1179,8 @@ export default { | ||
| 1121 | 1179 | ||
| 1122 | var currentRow = areaList[row]; | 1180 | var currentRow = areaList[row]; |
| 1123 | 1181 | ||
| 1124 | - var correctAnswerValue = question.correctAnswer == "1" ? "✓" : question.correctAnswer == 2 ? "✗" : question.correctAnswer; | 1182 | + var correctAnswerValue = question.questionType == 4 && question.correctAnswer == "1" ? "✓" : |
| 1183 | + question.questionType == 4 && question.correctAnswer == "2" ? "✗" : question.correctAnswer; | ||
| 1125 | 1184 | ||
| 1126 | for (var ilr = 0; ilr < 9; ilr++) { | 1185 | for (var ilr = 0; ilr < 9; ilr++) { |
| 1127 | 1186 | ||
| @@ -1177,7 +1236,8 @@ export default { | @@ -1177,7 +1236,8 @@ export default { | ||
| 1177 | 1236 | ||
| 1178 | var currentRow = areaList[row]; | 1237 | var currentRow = areaList[row]; |
| 1179 | 1238 | ||
| 1180 | - var correctAnswerValue = question.correctAnswer == "1" ? "✓" : question.correctAnswer == 2 ? "✗" : question.correctAnswer; | 1239 | + var correctAnswerValue = question.questionType == 4 && question.correctAnswer == "1" ? "✓" : |
| 1240 | + question.questionType == 4 && question.correctAnswer == "2" ? "✗" : question.correctAnswer; | ||
| 1181 | 1241 | ||
| 1182 | for (var ilr = 0; ilr < 12; ilr++) { | 1242 | for (var ilr = 0; ilr < 12; ilr++) { |
| 1183 | 1243 | ||
| @@ -1281,8 +1341,12 @@ export default { | @@ -1281,8 +1341,12 @@ export default { | ||
| 1281 | return item.option != "未答"; | 1341 | return item.option != "未答"; |
| 1282 | }); | 1342 | }); |
| 1283 | 1343 | ||
| 1344 | + if (item.questionType == 4) { | ||
| 1345 | + item.correctAnswer = item.correctAnswer == 1 ? "✓" : "✗" | ||
| 1346 | + } | ||
| 1347 | + | ||
| 1284 | optionsList.map((items, index) => { | 1348 | optionsList.map((items, index) => { |
| 1285 | - if (index != 4) { | 1349 | + if (index < maxOption - 1) { |
| 1286 | params["count" + index] = | 1350 | params["count" + index] = |
| 1287 | defaultArr[index]?.option != "未答" | 1351 | defaultArr[index]?.option != "未答" |
| 1288 | ? defaultArr[index]?.count | 1352 | ? defaultArr[index]?.count |
| @@ -1291,11 +1355,12 @@ export default { | @@ -1291,11 +1355,12 @@ export default { | ||
| 1291 | defaultArr[index]?.option != "未答" | 1355 | defaultArr[index]?.option != "未答" |
| 1292 | ? defaultArr[index]?.persent | 1356 | ? defaultArr[index]?.persent |
| 1293 | : ""; | 1357 | : ""; |
| 1358 | + | ||
| 1294 | params["option" + index] = | 1359 | params["option" + index] = |
| 1295 | defaultArr[index]?.option != "未答" | 1360 | defaultArr[index]?.option != "未答" |
| 1296 | - ? defaultArr[index]?.option == 1 | 1361 | + ? defaultArr[index]?.option == 1 && item?.questionType == 4 |
| 1297 | ? "✓" | 1362 | ? "✓" |
| 1298 | - : defaultArr[index]?.option == 2 | 1363 | + : defaultArr[index]?.option == 2 && item?.questionType == 4 |
| 1299 | ? "✗" | 1364 | ? "✗" |
| 1300 | : defaultArr[index]?.option | 1365 | : defaultArr[index]?.option |
| 1301 | : ""; | 1366 | : ""; |
| @@ -1304,7 +1369,7 @@ export default { | @@ -1304,7 +1369,7 @@ export default { | ||
| 1304 | items["title"] = "未答"; | 1369 | items["title"] = "未答"; |
| 1305 | params["count" + index] = lastOPtion?.count ?? ""; | 1370 | params["count" + index] = lastOPtion?.count ?? ""; |
| 1306 | params["persent" + index] = lastOPtion?.persent ?? ""; | 1371 | params["persent" + index] = lastOPtion?.persent ?? ""; |
| 1307 | - params["option" + index] = "?"; | 1372 | + params["option" + index] = "未答"; |
| 1308 | } | 1373 | } |
| 1309 | }); | 1374 | }); |
| 1310 | 1375 | ||
| @@ -1336,35 +1401,38 @@ export default { | @@ -1336,35 +1401,38 @@ export default { | ||
| 1336 | 1401 | ||
| 1337 | this.testPaperExamReportOptions = [...optionsList]; | 1402 | this.testPaperExamReportOptions = [...optionsList]; |
| 1338 | 1403 | ||
| 1339 | - console.log(objective, subjective, summary, Number(objective.avg / objective.sum)) | 1404 | + var examReport = this.examReport; |
| 1405 | + | ||
| 1340 | this.testPaperExamReport.push({ | 1406 | this.testPaperExamReport.push({ |
| 1341 | questionIndex: "汇总", | 1407 | questionIndex: "汇总", |
| 1342 | questionType: "客观题", | 1408 | questionType: "客观题", |
| 1343 | type: "colspan", | 1409 | type: "colspan", |
| 1344 | - score: objective.sum, | ||
| 1345 | - avgScore: objective.avg == 0 ? 0 : Number(objective.avg).toFixed(2), | ||
| 1346 | - gradeScoringRate: objective.avg == 0 ? 0 : Number(objective.avg * 100 / objective.sum).toFixed(2), | 1410 | + knowledge: "", |
| 1411 | + score: examReport.objectiveScore.toFixed(2), | ||
| 1412 | + avgScore: examReport.objectiveAvgScore == 0 ? 0.00 : Number(examReport.objectiveAvgScore).toFixed(2), | ||
| 1413 | + gradeScoringRate: examReport.objectiveRate == 0 ? 0.00 : Number(examReport.objectiveRate).toFixed(2), | ||
| 1347 | correctAnswer: "备注" | 1414 | correctAnswer: "备注" |
| 1348 | }) | 1415 | }) |
| 1349 | 1416 | ||
| 1350 | this.testPaperExamReport.push({ | 1417 | this.testPaperExamReport.push({ |
| 1351 | questionIndex: "主观题", | 1418 | questionIndex: "主观题", |
| 1352 | type: "colspan", | 1419 | type: "colspan", |
| 1353 | - knowledge: subjective.sum, | ||
| 1354 | - score: subjective.avg == 0 ? 0 : Number(subjective.avg).toFixed(2), | ||
| 1355 | - avgScore: subjective.avg == 0 ? 0 : Number(subjective.avg * 100 / subjective.sum).toFixed(2) | 1420 | + knowledge: examReport.subjectiveScore == 0 ? 0.00 : Number(examReport.subjectiveScore).toFixed(2), |
| 1421 | + score: examReport.subjectiveAvgScore == 0 ? 0.00 : Number(examReport.subjectiveAvgScore).toFixed(2), | ||
| 1422 | + avgScore: examReport.subjectiveRate == 0 ? 0.00 : Number(examReport.subjectiveRate).toFixed(2) | ||
| 1356 | }) | 1423 | }) |
| 1357 | 1424 | ||
| 1358 | this.testPaperExamReport.push({ | 1425 | this.testPaperExamReport.push({ |
| 1359 | questionIndex: "合计", | 1426 | questionIndex: "合计", |
| 1360 | type: "colspan", | 1427 | type: "colspan", |
| 1361 | - knowledge: summary.sum, | ||
| 1362 | - score: summary.avg == 0 ? 0 : Number(summary.avg).toFixed(2), | ||
| 1363 | - avgScore: summary.avg == 0 ? 0 : Number(summary.avg * 100 / summary.sum).toFixed(2) | 1428 | + knowledge: examReport.examPaperScore.toFixed(2), |
| 1429 | + score: examReport.avg == 0 ? 0.00 : Number(examReport.avg).toFixed(2), | ||
| 1430 | + avgScore: examReport.rate == 0 ? 0.00 : Number(examReport.rate).toFixed(2) | ||
| 1364 | }) | 1431 | }) |
| 1365 | }, | 1432 | }, |
| 1366 | async _testStudentExamReport() { | 1433 | async _testStudentExamReport() { |
| 1367 | this.testStudentExamReport = []; | 1434 | this.testStudentExamReport = []; |
| 1435 | + | ||
| 1368 | if (!this.checkedClassInfos || this.checkedClassInfos?.length <= 0) return; | 1436 | if (!this.checkedClassInfos || this.checkedClassInfos?.length <= 0) return; |
| 1369 | 1437 | ||
| 1370 | const request = this.$request.gStudentExamReport; | 1438 | const request = this.$request.gStudentExamReport; |
| @@ -1427,7 +1495,6 @@ export default { | @@ -1427,7 +1495,6 @@ export default { | ||
| 1427 | return item; | 1495 | return item; |
| 1428 | }); | 1496 | }); |
| 1429 | }, | 1497 | }, |
| 1430 | - _delete() { }, | ||
| 1431 | }, | 1498 | }, |
| 1432 | }; | 1499 | }; |
| 1433 | </script> | 1500 | </script> |
src/views/basic/askTestQuestion/index.vue
| @@ -33,7 +33,7 @@ | @@ -33,7 +33,7 @@ | ||
| 33 | <el-button type="primary" @click="_serach"> | 33 | <el-button type="primary" @click="_serach"> |
| 34 | 筛选 | 34 | 筛选 |
| 35 | </el-button> | 35 | </el-button> |
| 36 | - <el-radio-group v-model="dateStatus" class="default-date-radio-group"> | 36 | + <el-radio-group v-model="query.dateStatus" class="default-date-radio-group"> |
| 37 | <el-radio-button label="onDay">今天</el-radio-button> | 37 | <el-radio-button label="onDay">今天</el-radio-button> |
| 38 | <el-radio-button label="onWeek">本周</el-radio-button> | 38 | <el-radio-button label="onWeek">本周</el-radio-button> |
| 39 | <el-radio-button label="onMonth">本月</el-radio-button> | 39 | <el-radio-button label="onMonth">本月</el-radio-button> |
| @@ -73,7 +73,7 @@ | @@ -73,7 +73,7 @@ | ||
| 73 | <el-popconfirm style="color:gray !important;" | 73 | <el-popconfirm style="color:gray !important;" |
| 74 | @confirm="_deleteDetermineQ(item.id)" | 74 | @confirm="_deleteDetermineQ(item.id)" |
| 75 | :title="dataType == 1 ? '确认删除此课件' : '确认删除此试卷'"> | 75 | :title="dataType == 1 ? '确认删除此课件' : '确认删除此试卷'"> |
| 76 | - <el-button style="color:#606266 !important;" | 76 | + <el-button class="small-button" :size="'small'" style="color:#606266 !important;" |
| 77 | @click.native="_delete(item.id)" type="text" | 77 | @click.native="_delete(item.id)" type="text" |
| 78 | slot="reference">删除</el-button> | 78 | slot="reference">删除</el-button> |
| 79 | </el-popconfirm> | 79 | </el-popconfirm> |
| @@ -109,7 +109,7 @@ | @@ -109,7 +109,7 @@ | ||
| 109 | <div class="pic" v-if="dataType == 2" style="margin-left: 44px;"> | 109 | <div class="pic" v-if="dataType == 2" style="margin-left: 44px;"> |
| 110 | <img src="../../../assets/images/tishu.png" /> | 110 | <img src="../../../assets/images/tishu.png" /> |
| 111 | </div> | 111 | </div> |
| 112 | - <div class="text" v-if="dataType == 2"> 预计时长:</div> | 112 | + <div class="text" v-if="dataType == 2"> 考试时长:</div> |
| 113 | <div class="value" v-if="dataType == 2">{{ item.examsDuration }} | 113 | <div class="value" v-if="dataType == 2">{{ item.examsDuration }} |
| 114 | 分钟 | 114 | 分钟 |
| 115 | </div> | 115 | </div> |
| @@ -159,11 +159,12 @@ | @@ -159,11 +159,12 @@ | ||
| 159 | <el-dropdown-menu slot="dropdown"> | 159 | <el-dropdown-menu slot="dropdown"> |
| 160 | <el-dropdown-item | 160 | <el-dropdown-item |
| 161 | @click.native="_detailQ(item.id)">查看</el-dropdown-item> | 161 | @click.native="_detailQ(item.id)">查看</el-dropdown-item> |
| 162 | + <el-dropdown-item @click.native="_copy(item)">复制</el-dropdown-item> | ||
| 162 | <el-dropdown-item> | 163 | <el-dropdown-item> |
| 163 | <el-popconfirm style="color:gray !important;" | 164 | <el-popconfirm style="color:gray !important;" |
| 164 | @confirm="_deleteDetermineQ(item.id)" | 165 | @confirm="_deleteDetermineQ(item.id)" |
| 165 | :title="dataType == 1 ? '确认删除此课件' : '确认删除此试卷'"> | 166 | :title="dataType == 1 ? '确认删除此课件' : '确认删除此试卷'"> |
| 166 | - <el-button style="color:#606266 !important;" | 167 | + <el-button class="small-button" :size="'small'" style="color:#606266 !important;" |
| 167 | @click.native="_delete(item.id)" type="text" | 168 | @click.native="_delete(item.id)" type="text" |
| 168 | slot="reference">删除</el-button> | 169 | slot="reference">删除</el-button> |
| 169 | </el-popconfirm> | 170 | </el-popconfirm> |
| @@ -199,7 +200,7 @@ | @@ -199,7 +200,7 @@ | ||
| 199 | <div class="pic" v-if="dataType == 2" style="margin-left: 44px;"> | 200 | <div class="pic" v-if="dataType == 2" style="margin-left: 44px;"> |
| 200 | <img src="../../../assets/images/tishu.png" /> | 201 | <img src="../../../assets/images/tishu.png" /> |
| 201 | </div> | 202 | </div> |
| 202 | - <div class="text" v-if="dataType == 2"> 预计时长:</div> | 203 | + <div class="text" v-if="dataType == 2"> 考试时长:</div> |
| 203 | <div class="value" v-if="dataType == 2">{{ item.examsDuration }} | 204 | <div class="value" v-if="dataType == 2">{{ item.examsDuration }} |
| 204 | 分钟 | 205 | 分钟 |
| 205 | </div> | 206 | </div> |
| @@ -231,45 +232,49 @@ | @@ -231,45 +232,49 @@ | ||
| 231 | </div> | 232 | </div> |
| 232 | </el-main> | 233 | </el-main> |
| 233 | <el-footer class="el-footer-pagination"> | 234 | <el-footer class="el-footer-pagination"> |
| 234 | - <el-pagination @current-change="pageSizeChange" background layout="prev, pager, next" :size="listPage.size" | ||
| 235 | - :current-page="listPage.page" :total="listPage.total"> | 235 | + <el-pagination @current-change="pageSizeChange" background layout="prev, pager, next" |
| 236 | + :page-size="listPage.size" :current-page="listPage.page" :total="listPage.total"> | ||
| 236 | </el-pagination> | 237 | </el-pagination> |
| 237 | </el-footer> | 238 | </el-footer> |
| 238 | <el-dialog :append-to-body="true" :close-on-click-modal="false" title="上传word文档" :visible.sync="diaUp" | 239 | <el-dialog :append-to-body="true" :close-on-click-modal="false" title="上传word文档" :visible.sync="diaUp" |
| 239 | width="600px"> | 240 | width="600px"> |
| 240 | <upload :url="url" :params="{ type: importType }" @upSuccess="upSuccess" fileName="下载"> | 241 | <upload :url="url" :params="{ type: importType }" @upSuccess="upSuccess" fileName="下载"> |
| 241 | <div class="down-box p0" slot="down"> | 242 | <div class="down-box p0" slot="down"> |
| 242 | - <p class="down-head" v-if="importType == 1"> | ||
| 243 | - <span>第一步:</span> | ||
| 244 | - <!-- <el-link type="primary" @click="downExcel">下载模板,</el-link> --> | ||
| 245 | - <span>或者导出菁优网试卷/组卷网(学科网)试卷; | ||
| 246 | - 为保证第三方试卷导入成功,请注意参考导出示例:</span> | 243 | + <div class="down-head" v-if="importType == 1"> |
| 244 | + <span>第一步: | ||
| 245 | + 导出菁优网试卷/组卷网(学科网)试卷;为保证第三方试卷导入成功,请注意参考导出示例: | ||
| 246 | + </span> | ||
| 247 | + <p> 菁优网示例如下:</p> | ||
| 247 | <span class="img-box"> | 248 | <span class="img-box"> |
| 248 | <el-image class="img" :src="examplePic" :preview-src-list="examplePicList"> | 249 | <el-image class="img" :src="examplePic" :preview-src-list="examplePicList"> |
| 249 | </el-image> | 250 | </el-image> |
| 250 | - 菁优网示例 </span>/ | 251 | + </span> |
| 252 | + <p> 组卷网(学科网)示例如下:</p> | ||
| 251 | <span class="img-box"> | 253 | <span class="img-box"> |
| 252 | <el-image class="img" :src="examplePic2" :preview-src-list="examplePicList2"> | 254 | <el-image class="img" :src="examplePic2" :preview-src-list="examplePicList2"> |
| 253 | </el-image> | 255 | </el-image> |
| 254 | - 组卷网(学科网)示例。 | ||
| 255 | </span> | 256 | </span> |
| 256 | - </p> | ||
| 257 | - <p class="down-head" v-if="importType == 2"> | ||
| 258 | - <span>第一步: | ||
| 259 | - <el-link type="primary" @click="downExcel">下载模板,</el-link> | ||
| 260 | - 导出菁优网试卷/组卷网(学科网)试卷;为保证第三方试卷导入成功,请注意参考导出示例:</span> | 257 | + </div> |
| 258 | + | ||
| 259 | + <div class="down-head" v-if="importType == 2"> | ||
| 260 | + <span> | ||
| 261 | + 第一步: | ||
| 262 | + <el-link type="primary" @click="downExcel">下载模板</el-link>, | ||
| 263 | + 或者导出菁优网试卷/组卷网(学科网)试卷;为保证第三方试卷导入成功,请注意参考导出示例: | ||
| 264 | + </span> | ||
| 265 | + <p> 菁优网示例如下:</p> | ||
| 261 | <span class="img-box"> | 266 | <span class="img-box"> |
| 262 | <el-image class="img" :src="examplePic" :preview-src-list="examplePicList"> | 267 | <el-image class="img" :src="examplePic" :preview-src-list="examplePicList"> |
| 263 | </el-image> | 268 | </el-image> |
| 264 | - 菁优网示例 | 269 | + |
| 265 | </span> | 270 | </span> |
| 266 | - / | 271 | + <p> 组卷网(学科网)示例如下:</p> |
| 267 | <span class="img-box"> | 272 | <span class="img-box"> |
| 268 | <el-image class="img" :src="examplePic2" :preview-src-list="examplePicList2"> | 273 | <el-image class="img" :src="examplePic2" :preview-src-list="examplePicList2"> |
| 269 | </el-image> | 274 | </el-image> |
| 270 | - 组卷网(学科网)示例。 | 275 | + |
| 271 | </span> | 276 | </span> |
| 272 | - </p> | 277 | + </div> |
| 273 | <p>第二步:上传完成编辑好的试卷。</p> | 278 | <p>第二步:上传完成编辑好的试卷。</p> |
| 274 | </div> | 279 | </div> |
| 275 | </upload> | 280 | </upload> |
| @@ -303,15 +308,15 @@ export default { | @@ -303,15 +308,15 @@ export default { | ||
| 303 | sharedList: [], | 308 | sharedList: [], |
| 304 | dataType: "1", | 309 | dataType: "1", |
| 305 | importType: 0, | 310 | importType: 0, |
| 306 | - tabType: "0", | ||
| 307 | - dateStatus: "-1", | 311 | + tabType: "0", |
| 308 | url: "/api_html/common/paper/upload", //上传文档地址 | 312 | url: "/api_html/common/paper/upload", //上传文档地址 |
| 309 | listPage: { | 313 | listPage: { |
| 310 | page: 1, | 314 | page: 1, |
| 311 | size: 8, | 315 | size: 8, |
| 312 | total: 0, | 316 | total: 0, |
| 313 | }, | 317 | }, |
| 314 | - query: { | 318 | + query: { |
| 319 | + dateStatus: "-1", | ||
| 315 | title: "", | 320 | title: "", |
| 316 | class: null, | 321 | class: null, |
| 317 | subject: null, | 322 | subject: null, |
| @@ -334,18 +339,19 @@ export default { | @@ -334,18 +339,19 @@ export default { | ||
| 334 | this.listPage.page = 1; | 339 | this.listPage.page = 1; |
| 335 | this._serach(); | 340 | this._serach(); |
| 336 | }, | 341 | }, |
| 337 | - 'dateStatus'(val) { | 342 | + 'query.dateStatus'(val) { |
| 338 | var dateRange = setDateRules(val); | 343 | var dateRange = setDateRules(val); |
| 344 | + | ||
| 339 | this.query.dateRange = [dateRange.startDay, dateRange.endDay]; | 345 | this.query.dateRange = [dateRange.startDay, dateRange.endDay]; |
| 340 | } | 346 | } |
| 341 | }, | 347 | }, |
| 342 | - async created() { | 348 | + async created() { |
| 343 | this.dataType = location.href.endsWith("askPreparationQuestions") ? "1" : "2"; | 349 | this.dataType = location.href.endsWith("askPreparationQuestions") ? "1" : "2"; |
| 344 | this.code = this.$store.getters.csCode; | 350 | this.code = this.$store.getters.csCode; |
| 345 | this.role = | 351 | this.role = |
| 346 | this.$store.getters.info.showRole || | 352 | this.$store.getters.info.showRole || |
| 347 | this.$store.getters.info.permissions[0].role; | 353 | this.$store.getters.info.permissions[0].role; |
| 348 | - this.dateStatus = "onWeek"; | 354 | + this.query.dateStatus = "onWeek"; |
| 349 | await this._loadQueryDatas(); | 355 | await this._loadQueryDatas(); |
| 350 | }, | 356 | }, |
| 351 | methods: { | 357 | methods: { |
| @@ -534,6 +540,8 @@ export default { | @@ -534,6 +540,8 @@ export default { | ||
| 534 | subjectName: "", | 540 | subjectName: "", |
| 535 | tagId: "", | 541 | tagId: "", |
| 536 | title: "", | 542 | title: "", |
| 543 | + start: null, | ||
| 544 | + end: null, | ||
| 537 | type: this.dataType, //试卷类型 | 545 | type: this.dataType, //试卷类型 |
| 538 | share: this.tabType, //分享类型 | 546 | share: this.tabType, //分享类型 |
| 539 | }; | 547 | }; |
| @@ -542,9 +550,10 @@ export default { | @@ -542,9 +550,10 @@ export default { | ||
| 542 | queryParams.subjectName = this.query.subject; | 550 | queryParams.subjectName = this.query.subject; |
| 543 | queryParams.tagId = this.query.tagId; | 551 | queryParams.tagId = this.query.tagId; |
| 544 | queryParams.title = this.query.paper; | 552 | queryParams.title = this.query.paper; |
| 545 | - // queryParams.start = this.query.dateRange[0]; | ||
| 546 | - // queryParams.end = this.query.dateRange[1]; | ||
| 547 | - | 553 | + if (this.query?.dateRange?.length >= 2) { |
| 554 | + queryParams.start = this.query.dateRange[0] ?? ""; | ||
| 555 | + queryParams.end = this.query.dateRange[1] ?? ""; | ||
| 556 | + } | ||
| 548 | const { data, status, info } = await fetchPaperList({ | 557 | const { data, status, info } = await fetchPaperList({ |
| 549 | ...queryParams, | 558 | ...queryParams, |
| 550 | status: 1, | 559 | status: 1, |
| @@ -560,7 +569,7 @@ export default { | @@ -560,7 +569,7 @@ export default { | ||
| 560 | this.createdCount = data?.myCount || 0; | 569 | this.createdCount = data?.myCount || 0; |
| 561 | this.sharedCount = data?.gradeCount || 0; | 570 | this.sharedCount = data?.gradeCount || 0; |
| 562 | this.listPage.total = data.total; | 571 | this.listPage.total = data.total; |
| 563 | - | 572 | + console.log('page', this.listPage) |
| 564 | if (this.tabType == "0") { | 573 | if (this.tabType == "0") { |
| 565 | this.defaultList = []; | 574 | this.defaultList = []; |
| 566 | if (data?.list) this.defaultList = [...data?.list]; | 575 | if (data?.list) this.defaultList = [...data?.list]; |
| @@ -696,7 +705,7 @@ export default { | @@ -696,7 +705,7 @@ export default { | ||
| 696 | margin-top: 3px; | 705 | margin-top: 3px; |
| 697 | } | 706 | } |
| 698 | 707 | ||
| 699 | - width: 48.5%; | 708 | + width: 48.4%; |
| 700 | display: inline-block; | 709 | display: inline-block; |
| 701 | margin-bottom: 10px; | 710 | margin-bottom: 10px; |
| 702 | min-height: 190px; | 711 | min-height: 190px; |
src/views/basic/askTestQuestion/report.vue
| @@ -4,18 +4,17 @@ | @@ -4,18 +4,17 @@ | ||
| 4 | <div class="default-title">{{ dataType == "1" ? '随堂问报表' : '即时测报表' }}</div> | 4 | <div class="default-title">{{ dataType == "1" ? '随堂问报表' : '即时测报表' }}</div> |
| 5 | </el-header> | 5 | </el-header> |
| 6 | <div class="default-filter"> | 6 | <div class="default-filter"> |
| 7 | - <!-- <el-input v-model="query.paper" placeholder="报表名称" suffix-icon="el-icon-search" class="filter-input" type="number" | ||
| 8 | - clearable /> --> | ||
| 9 | <el-select @change="_changeClass" v-model="query.class" class="filter-select" placeholder="选择班级"> | 7 | <el-select @change="_changeClass" v-model="query.class" class="filter-select" placeholder="选择班级"> |
| 10 | <el-option v-for="item in classList " :key="item.classId" :label="item.className" :value="item.classId" /> | 8 | <el-option v-for="item in classList " :key="item.classId" :label="item.className" :value="item.classId" /> |
| 11 | </el-select> | 9 | </el-select> |
| 12 | <el-select v-model="query.subject" v-if="role == 'ROLE_JIAOSHI'" placeholder="选择科目" class="filter-select"> | 10 | <el-select v-model="query.subject" v-if="role == 'ROLE_JIAOSHI'" placeholder="选择科目" class="filter-select"> |
| 13 | - <el-option v-for=" item in subjectList" :key="item" :label="item" :value="item" /> | 11 | + <el-option v-for="item in subjectList" :key="item" :label="item" :value="item" /> |
| 14 | </el-select> | 12 | </el-select> |
| 15 | - <el-select v-model="query.subjects" style="width: 18%;" collapse-tags v-if="role == 'ROLE_BANZHUREN'" multiple placeholder="选择科目" | ||
| 16 | - class="filter-select"> | ||
| 17 | - <el-option v-for="item in subjectList" :key="item" :label="item" :value="item"> | ||
| 18 | - <!-- <el-checkbox :checked="checkedSubject.indexOf(item) >= 0" @click="subjectCheck(item)">{{ item }}</el-checkbox> --> | 13 | + <el-select v-model="query.subjects" multiple popper-class="select-popover-class" v-if="role == 'ROLE_BANZHUREN'" |
| 14 | + placeholder="选择科目" collapse-tags class="filter-select" style="width: 18%;"> | ||
| 15 | + <el-checkbox :value="selectAll" @change="selectAllHandle">全部科目</el-checkbox> | ||
| 16 | + <el-option v-for="(item, index) in subjectList" :key="index" :value="item" :label="item"> | ||
| 17 | + <el-checkbox :value="query.subjects.includes(item)" :label="item" /> | ||
| 19 | </el-option> | 18 | </el-option> |
| 20 | </el-select> | 19 | </el-select> |
| 21 | <el-date-picker class="filter-datePicker" @change="_dateChange" v-model="query.dateRange" type="daterange" | 20 | <el-date-picker class="filter-datePicker" @change="_dateChange" v-model="query.dateRange" type="daterange" |
| @@ -31,29 +30,29 @@ | @@ -31,29 +30,29 @@ | ||
| 31 | <el-main> | 30 | <el-main> |
| 32 | <div style="position: relative"> | 31 | <div style="position: relative"> |
| 33 | <el-tabs v-model="tabType" v-loading="queryLoading" type="card" class="default-tabs" :key="tabIndexs"> | 32 | <el-tabs v-model="tabType" v-loading="queryLoading" type="card" class="default-tabs" :key="tabIndexs"> |
| 34 | - <el-tab-pane v-if="dataType == 1 && role == 'ROLE_JIAOSHI'" :name="'0'" :label="`阶段报表`"> | 33 | + <el-tab-pane v-if="dataType == 1 && role == 'ROLE_JIAOSHI'" :name="'0'" :label="`单课时报表`"> |
| 34 | + <askListReport v-if="apiDatas.askReportList" :datas="apiDatas.askReportList" @opration="_serach" /> | ||
| 35 | + </el-tab-pane> | ||
| 36 | + <el-tab-pane v-if="dataType == 1 && role == 'ROLE_JIAOSHI'" :name="'1'" :label="`阶段报表`"> | ||
| 35 | <askSummaryReport ref="askSummaryReport" v-if="apiDatas.askReportIds" :askReportIds="apiDatas.askReportIds" | 37 | <askSummaryReport ref="askSummaryReport" v-if="apiDatas.askReportIds" :askReportIds="apiDatas.askReportIds" |
| 36 | :queryParams="query" /> | 38 | :queryParams="query" /> |
| 37 | </el-tab-pane> | 39 | </el-tab-pane> |
| 38 | - <el-tab-pane v-if="dataType == 1 && role == 'ROLE_JIAOSHI'" :name="'1'" :label="`单课时报表`"> | ||
| 39 | - <askListReport v-if="apiDatas.askReportList" :datas="apiDatas.askReportList" @opration="_serach" /> | ||
| 40 | - </el-tab-pane> | ||
| 41 | <el-tab-pane v-if="dataType == 1 && role == 'ROLE_BANZHUREN' && query.status == 'multi'" :name="'0'" | 40 | <el-tab-pane v-if="dataType == 1 && role == 'ROLE_BANZHUREN' && query.status == 'multi'" :name="'0'" |
| 42 | :label="`多科表现`" :queryParams="query"> | 41 | :label="`多科表现`" :queryParams="query"> |
| 43 | <askBzrMulti v-if="apiDatas.askReportIds" :askReportIds="apiDatas.askReportIds" :queryParams="query" /> | 42 | <askBzrMulti v-if="apiDatas.askReportIds" :askReportIds="apiDatas.askReportIds" :queryParams="query" /> |
| 44 | </el-tab-pane> | 43 | </el-tab-pane> |
| 45 | <el-tab-pane v-if="dataType == 1 && role == 'ROLE_BANZHUREN' && query.status == 'single'" :name="'1'" | 44 | <el-tab-pane v-if="dataType == 1 && role == 'ROLE_BANZHUREN' && query.status == 'single'" :name="'1'" |
| 46 | :label="`单科表现`" :queryParams="query"> | 45 | :label="`单科表现`" :queryParams="query"> |
| 47 | - <askSummaryReport :role="role" ref="askSummaryReport" v-if="apiDatas.askReportIds" :askReportIds="apiDatas.askReportIds" | ||
| 48 | - :queryParams="query" /> | 46 | + <askSummaryReport :role="role" ref="askSummaryReport" v-if="apiDatas.askReportIds" |
| 47 | + :askReportIds="apiDatas.askReportIds" :queryParams="query" /> | ||
| 48 | + </el-tab-pane> | ||
| 49 | + <el-tab-pane v-if="dataType == 2 && role == 'ROLE_JIAOSHI'" :name="'0'" :label="`单卷报表`"> | ||
| 50 | + <testListReport :datas="apiDatas.testReportList" @opration="_serach" /> | ||
| 49 | </el-tab-pane> | 51 | </el-tab-pane> |
| 50 | - <el-tab-pane v-if="dataType == 2 && role == 'ROLE_JIAOSHI'" :name="'0'" :label="`阶段报表`"> | 52 | + <el-tab-pane v-if="dataType == 2 && role == 'ROLE_JIAOSHI'" :name="'1'" :label="`阶段报表`"> |
| 51 | <testSummaryReport v-if="apiDatas.testReportIds" :testReportIds="apiDatas.testReportIds" | 53 | <testSummaryReport v-if="apiDatas.testReportIds" :testReportIds="apiDatas.testReportIds" |
| 52 | @headerClick="_headerClick" :queryParams="query" /> | 54 | @headerClick="_headerClick" :queryParams="query" /> |
| 53 | </el-tab-pane> | 55 | </el-tab-pane> |
| 54 | - <el-tab-pane v-if="dataType == 2 && role == 'ROLE_JIAOSHI'" :name="'1'" :label="`单卷报表`"> | ||
| 55 | - <testListReport :datas="apiDatas.testReportList" @opration="_serach" /> | ||
| 56 | - </el-tab-pane> | ||
| 57 | <el-tab-pane v-if="dataType == 2 && role == 'ROLE_JIAOSHI'" :name="'2'" :label="`多班对比报表`"> | 56 | <el-tab-pane v-if="dataType == 2 && role == 'ROLE_JIAOSHI'" :name="'2'" :label="`多班对比报表`"> |
| 58 | <testMultiClassReport :params="query" /> | 57 | <testMultiClassReport :params="query" /> |
| 59 | </el-tab-pane> | 58 | </el-tab-pane> |
| @@ -65,7 +64,7 @@ | @@ -65,7 +64,7 @@ | ||
| 65 | <el-tab-pane v-if="dataType == 2 && role == 'ROLE_BANZHUREN' && query.status == 'single'" :name="'1'" | 64 | <el-tab-pane v-if="dataType == 2 && role == 'ROLE_BANZHUREN' && query.status == 'single'" :name="'1'" |
| 66 | :label="`单科表现`"> | 65 | :label="`单科表现`"> |
| 67 | <testSummaryReport v-if="apiDatas.testReportIds" :role="role" :list="apiDatas.testReportList" | 66 | <testSummaryReport v-if="apiDatas.testReportIds" :role="role" :list="apiDatas.testReportList" |
| 68 | - :testReportIds="apiDatas.testReportIds" :queryParams="query" /> | 67 | + :testReportIds="apiDatas.testReportIds" :queryParams="query" @headerClick="_headerClick" /> |
| 69 | </el-tab-pane> | 68 | </el-tab-pane> |
| 70 | <div slot="tab-bar"> | 69 | <div slot="tab-bar"> |
| 71 | <el-button type="primary" icon="el-icon-plus">新增</el-button> | 70 | <el-button type="primary" icon="el-icon-plus">新增</el-button> |
| @@ -127,7 +126,7 @@ export default { | @@ -127,7 +126,7 @@ export default { | ||
| 127 | }; | 126 | }; |
| 128 | }, | 127 | }, |
| 129 | watch: { | 128 | watch: { |
| 130 | - 'dateStatus'(val) { | 129 | + 'dateStatus' (val) { |
| 131 | if (val == -1) return; | 130 | if (val == -1) return; |
| 132 | var dateRange = setDateRules(val); | 131 | var dateRange = setDateRules(val); |
| 133 | this.query.dateRange = [dateRange.startDay, dateRange.endDay]; | 132 | this.query.dateRange = [dateRange.startDay, dateRange.endDay]; |
| @@ -136,15 +135,10 @@ export default { | @@ -136,15 +135,10 @@ export default { | ||
| 136 | this.dataType = location.href.endsWith("askReport") ? "1" : "2"; | 135 | this.dataType = location.href.endsWith("askReport") ? "1" : "2"; |
| 137 | this._loadQueryDatas(); | 136 | this._loadQueryDatas(); |
| 138 | }, | 137 | }, |
| 139 | - 'dataType'() { | ||
| 140 | - if (this.dataType == "1") { | ||
| 141 | - this.tabType = "0" | ||
| 142 | - } | ||
| 143 | - else if (this.dataType == "2") { | ||
| 144 | - this.tabType = "0" | ||
| 145 | - } | 138 | + 'query'(value) { |
| 139 | + | ||
| 146 | }, | 140 | }, |
| 147 | - async 'query.subjects'(value) { | 141 | + async 'query.subjects' (value) { |
| 148 | if (this.role == "ROLE_BANZHUREN") { | 142 | if (this.role == "ROLE_BANZHUREN") { |
| 149 | if (value.length == 1 && value[0] != '全部科目') { | 143 | if (value.length == 1 && value[0] != '全部科目') { |
| 150 | this.query.status = 'single'; | 144 | this.query.status = 'single'; |
| @@ -153,7 +147,10 @@ export default { | @@ -153,7 +147,10 @@ export default { | ||
| 153 | } | 147 | } |
| 154 | else { | 148 | else { |
| 155 | this.query.status = 'multi'; | 149 | this.query.status = 'multi'; |
| 156 | - this.tabType = '0'; | 150 | + if (this.role == 'ROLE_BANZHUREN') |
| 151 | + this.tabType = '0'; | ||
| 152 | + else | ||
| 153 | + this.tabType = '1'; | ||
| 157 | await this._serach(); | 154 | await this._serach(); |
| 158 | } | 155 | } |
| 159 | } | 156 | } |
| @@ -169,13 +166,19 @@ export default { | @@ -169,13 +166,19 @@ export default { | ||
| 169 | this.dateStatus = "onWeek"; | 166 | this.dateStatus = "onWeek"; |
| 170 | await this._loadQueryDatas(); | 167 | await this._loadQueryDatas(); |
| 171 | }, | 168 | }, |
| 169 | + computed: { | ||
| 170 | + selectAll() { | ||
| 171 | + return this.query?.subjects?.filter(f => f != '全部科目').length === this.subjectList.length; | ||
| 172 | + } | ||
| 173 | + }, | ||
| 172 | methods: { | 174 | methods: { |
| 173 | - _opr() { | ||
| 174 | - alert('opr'); | ||
| 175 | - }, | ||
| 176 | _dateChange() { | 175 | _dateChange() { |
| 177 | this.dateStatus = -1; | 176 | this.dateStatus = -1; |
| 178 | }, | 177 | }, |
| 178 | + selectAllHandle() { | ||
| 179 | + if (this.selectAll) this.query.subjects = []; | ||
| 180 | + else this.query.subjects = [...this.subjectList] | ||
| 181 | + }, | ||
| 179 | async _ReScore() { | 182 | async _ReScore() { |
| 180 | //重新记分 | 183 | //重新记分 |
| 181 | let { data, info, status } = await this.$request.reScore({ | 184 | let { data, info, status } = await this.$request.reScore({ |
| @@ -210,9 +213,7 @@ export default { | @@ -210,9 +213,7 @@ export default { | ||
| 210 | return; | 213 | return; |
| 211 | } | 214 | } |
| 212 | this.subjectList = data?.subjectNames ?? []; | 215 | this.subjectList = data?.subjectNames ?? []; |
| 213 | - if (this.role == "ROLE_BANZHUREN") { | ||
| 214 | - this.subjectList.unshift("全部科目"); | ||
| 215 | - } | 216 | + |
| 216 | this.query.subject = data?.subjectNames[0] ?? ""; | 217 | this.query.subject = data?.subjectNames[0] ?? ""; |
| 217 | this.checkedSubject = [...this.subjectList]; | 218 | this.checkedSubject = [...this.subjectList]; |
| 218 | this.query.subjects = this.checkedSubject; | 219 | this.query.subjects = this.checkedSubject; |
| @@ -263,7 +264,6 @@ export default { | @@ -263,7 +264,6 @@ export default { | ||
| 263 | else { | 264 | else { |
| 264 | queryParams.subjectNames = [this.query.subject]; | 265 | queryParams.subjectNames = [this.query.subject]; |
| 265 | } | 266 | } |
| 266 | - console.log(queryParams, this.query.subject) | ||
| 267 | 267 | ||
| 268 | queryParams.startDay = this.query.dateRange | 268 | queryParams.startDay = this.query.dateRange |
| 269 | ? this.query.dateRange[0] | 269 | ? this.query.dateRange[0] |
| @@ -287,7 +287,9 @@ export default { | @@ -287,7 +287,9 @@ export default { | ||
| 287 | this.$message.error(askReportResponse.info); | 287 | this.$message.error(askReportResponse.info); |
| 288 | return; | 288 | return; |
| 289 | } | 289 | } |
| 290 | + | ||
| 290 | this.apiDatas.askReportList = [...askReportResponse?.data?.list ?? []]; | 291 | this.apiDatas.askReportList = [...askReportResponse?.data?.list ?? []]; |
| 292 | + | ||
| 291 | this.apiDatas.askReportIds = [... this.apiDatas?.askReportList?.map((item) => item.id) ?? []]; | 293 | this.apiDatas.askReportIds = [... this.apiDatas?.askReportList?.map((item) => item.id) ?? []]; |
| 292 | 294 | ||
| 293 | if (this.$refs["askSummaryReport"]) { | 295 | if (this.$refs["askSummaryReport"]) { |
| @@ -367,6 +369,22 @@ export default { | @@ -367,6 +369,22 @@ export default { | ||
| 367 | }; | 369 | }; |
| 368 | </script> | 370 | </script> |
| 369 | <style lang="scss"> | 371 | <style lang="scss"> |
| 372 | +/* 控制全选按钮样式 */ | ||
| 373 | +.select-popover-class .el-scrollbar__view>.el-checkbox { | ||
| 374 | + padding: 5px 20px; | ||
| 375 | +} | ||
| 376 | + | ||
| 377 | +/* 取消多选框触发事件 */ | ||
| 378 | +.select-popover-class .el-scrollbar__view>li .el-checkbox { | ||
| 379 | + pointer-events: none; | ||
| 380 | +} | ||
| 381 | + | ||
| 382 | +/* 隐藏多选框选中勾选样式 √ */ | ||
| 383 | +.select-popover-class .el-scrollbar__view>li::after { | ||
| 384 | + display: none; | ||
| 385 | +} | ||
| 386 | + | ||
| 387 | + | ||
| 370 | .el-tabs__content { | 388 | .el-tabs__content { |
| 371 | padding-left: 20px !important; | 389 | padding-left: 20px !important; |
| 372 | padding-right: 0px !important; | 390 | padding-right: 0px !important; |
src/views/basic/askTestQuestion/update.vue
| @@ -47,7 +47,7 @@ | @@ -47,7 +47,7 @@ | ||
| 47 | <div class="bigQuestionTitle" v-if="paperType != 1"> | 47 | <div class="bigQuestionTitle" v-if="paperType != 1"> |
| 48 | {{ question.questionTitle }} | 48 | {{ question.questionTitle }} |
| 49 | (共{{ question.subQuestions.filter(subQuestion => subQuestion && | 49 | (共{{ question.subQuestions.filter(subQuestion => subQuestion && |
| 50 | - subQuestion.questionId && subQuestion.questionType).length }}小题, | 50 | + subQuestion.questionIndex && subQuestion.questionType).length }}小题, |
| 51 | 共{{ question.score }}分) | 51 | 共{{ question.score }}分) |
| 52 | </div> | 52 | </div> |
| 53 | <div v-if="paperType == 2 && index == 0" class="courseware-title sub-questions"> | 53 | <div v-if="paperType == 2 && index == 0" class="courseware-title sub-questions"> |
| @@ -61,9 +61,9 @@ | @@ -61,9 +61,9 @@ | ||
| 61 | </div> | 61 | </div> |
| 62 | 62 | ||
| 63 | <div class="courseware-content sub-questions" v-if="subQuestion && | 63 | <div class="courseware-content sub-questions" v-if="subQuestion && |
| 64 | - subQuestion.questionId && subQuestion.questionType && question.subQuestions" | 64 | + subQuestion.questionIndex && subQuestion.questionType && question.subQuestions" |
| 65 | v-for="(subQuestion, subIndex) in question.subQuestions"> | 65 | v-for="(subQuestion, subIndex) in question.subQuestions"> |
| 66 | - <div class="qs-num">{{ subQuestion.questionId }}</div> | 66 | + <div class="qs-num">{{ subQuestion.questionIndex }}</div> |
| 67 | <div class="qs-stem"> | 67 | <div class="qs-stem"> |
| 68 | <iframe style="height: 100% !important" class="screenshot" :src="subQuestion.screenshot"></iframe> | 68 | <iframe style="height: 100% !important" class="screenshot" :src="subQuestion.screenshot"></iframe> |
| 69 | </div> | 69 | </div> |
| @@ -108,7 +108,7 @@ | @@ -108,7 +108,7 @@ | ||
| 108 | <span class="answer-s answer-opration" v-if="!isViewer" | 108 | <span class="answer-s answer-opration" v-if="!isViewer" |
| 109 | @click="openStem(subQuestion, 4, index, subIndex)">+</span> | 109 | @click="openStem(subQuestion, 4, index, subIndex)">+</span> |
| 110 | <span class="answer-s answer-opration" v-if="!isViewer" | 110 | <span class="answer-s answer-opration" v-if="!isViewer" |
| 111 | - @click="openStem(subQuestion, 4, index, subIndex)">-</span> | 111 | + @click="openStem(subQuestion, 5, index, subIndex)">-</span> |
| 112 | </p> | 112 | </p> |
| 113 | <p v-if="subQuestion.questionType == 2" class="answer-box"> | 113 | <p v-if="subQuestion.questionType == 2" class="answer-box"> |
| 114 | <template :disabled="isViewer" v-for="option in subQuestion.answerOptions.split(',')"> | 114 | <template :disabled="isViewer" v-for="option in subQuestion.answerOptions.split(',')"> |
| @@ -134,18 +134,18 @@ | @@ -134,18 +134,18 @@ | ||
| 134 | <el-button class="icon-tickets" type="text" | 134 | <el-button class="icon-tickets" type="text" |
| 135 | @click="openStem(subQuestion, 2, index, subIndex)">修改解析</el-button> | 135 | @click="openStem(subQuestion, 2, index, subIndex)">修改解析</el-button> |
| 136 | </div> | 136 | </div> |
| 137 | - <div class="qs-set" v-if="false"> | 137 | + <div class="qs-set"> |
| 138 | <el-button type="text" @click="openKnowledge(subQuestion, index, subIndex)">修改知识点</el-button> | 138 | <el-button type="text" @click="openKnowledge(subQuestion, index, subIndex)">修改知识点</el-button> |
| 139 | </div> | 139 | </div> |
| 140 | - <div class="qs-set" style="margin-left:10px"> | 140 | + <div class="qs-set"> |
| 141 | <el-popconfirm @confirm="_deleteDetermineQ(subIndex, index)" title="这是一小题确定删除吗?"> | 141 | <el-popconfirm @confirm="_deleteDetermineQ(subIndex, index)" title="这是一小题确定删除吗?"> |
| 142 | - <!-- <el-button style="color:red" type="text" slot="reference">删除</el-button> --> | 142 | + <!-- <el-button style="color:red; " type="text" slot="reference">删除</el-button> --> |
| 143 | </el-popconfirm> | 143 | </el-popconfirm> |
| 144 | </div> | 144 | </div> |
| 145 | </div> | 145 | </div> |
| 146 | </div> | 146 | </div> |
| 147 | <div v-if="!question.subQuestions" class="courseware-content sub-questions"> | 147 | <div v-if="!question.subQuestions" class="courseware-content sub-questions"> |
| 148 | - <div class="qs-num">{{ question.questionId }}</div> | 148 | + <div class="qs-num">{{ question.questionIndex }}</div> |
| 149 | <div class="qs-stem"> | 149 | <div class="qs-stem"> |
| 150 | <iframe style="height: 100% !important" class="screenshot" :src="question.screenshot"></iframe> | 150 | <iframe style="height: 100% !important" class="screenshot" :src="question.screenshot"></iframe> |
| 151 | </div> | 151 | </div> |
| @@ -206,10 +206,10 @@ | @@ -206,10 +206,10 @@ | ||
| 206 | <el-button class="icon-tickets" type="text" | 206 | <el-button class="icon-tickets" type="text" |
| 207 | @click="openStem(question, 2, index, 0)">修改解析</el-button> | 207 | @click="openStem(question, 2, index, 0)">修改解析</el-button> |
| 208 | </div> | 208 | </div> |
| 209 | - <div class="qs-set" v-if="false"> | 209 | + <div class="qs-set"> |
| 210 | <el-button type="text" @click="openKnowledge(question, index, 0)">修改知识点</el-button> | 210 | <el-button type="text" @click="openKnowledge(question, index, 0)">修改知识点</el-button> |
| 211 | </div> | 211 | </div> |
| 212 | - <div class="qs-set" style="margin-left:10px"> | 212 | + <div class="qs-set"> |
| 213 | <el-popconfirm @confirm="_deleteDetermineQ(0, index)" title="这是一小题确定删除吗?"> | 213 | <el-popconfirm @confirm="_deleteDetermineQ(0, index)" title="这是一小题确定删除吗?"> |
| 214 | <!-- <el-button style="color:red" type="text" slot="reference">删除</el-button> --> | 214 | <!-- <el-button style="color:red" type="text" slot="reference">删除</el-button> --> |
| 215 | </el-popconfirm> | 215 | </el-popconfirm> |
| @@ -221,28 +221,28 @@ | @@ -221,28 +221,28 @@ | ||
| 221 | </div> | 221 | </div> |
| 222 | </div> | 222 | </div> |
| 223 | </div> | 223 | </div> |
| 224 | - <el-dialog :close-on-click-modal="false" title="选择班级分享" :visible.sync="classSharingType" width="800" | ||
| 225 | - :modal-append-to-body="false" :append-to-body="true"> | ||
| 226 | - <div> | 224 | + <el-dialog title="选择班级分享" :visible.sync="classSharingType" width="800" :close-on-click-modal="false" |
| 225 | + :append-to-body="true"> | ||
| 226 | + <div :key="classSharingType"> | ||
| 227 | <el-row class="row-subfix"> | 227 | <el-row class="row-subfix"> |
| 228 | <div class="row-line"> | 228 | <div class="row-line"> |
| 229 | <span class="line-subfix">年级:</span> | 229 | <span class="line-subfix">年级:</span> |
| 230 | <span class="line-value">{{ gradeName }}</span> | 230 | <span class="line-value">{{ gradeName }}</span> |
| 231 | </div> | 231 | </div> |
| 232 | </el-row> | 232 | </el-row> |
| 233 | - <el-row class="row-subfix" style="margin-top: 20px;"> | 233 | + <el-row v-if="gradeClass.length >= 1" class="row-subfix" style="margin-top: 20px;"> |
| 234 | <span class="line-subfix" style="float: left;">班级:</span> | 234 | <span class="line-subfix" style="float: left;">班级:</span> |
| 235 | <div class="row-line" style="float: left; | 235 | <div class="row-line" style="float: left; |
| 236 | background:rgb(245,247,250);padding:15px 10px;width: calc(100% - 80px);border-radius:5px;"> | 236 | background:rgb(245,247,250);padding:15px 10px;width: calc(100% - 80px);border-radius:5px;"> |
| 237 | <span class="line-value" style="min-height: 300px;border-radius: 4px; background: rgb(247,247,250);"> | 237 | <span class="line-value" style="min-height: 300px;border-radius: 4px; background: rgb(247,247,250);"> |
| 238 | <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | 238 | <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" |
| 239 | @change="handleCheckAllChange">全选</el-checkbox> | 239 | @change="handleCheckAllChange">全选</el-checkbox> |
| 240 | - <el-checkbox-group v-model="checkedClass" style="margin-top: 15px;" | ||
| 241 | - @change="handleCheckedClassChange"> | ||
| 242 | - <el-checkbox v-for="(item, index) in gradeClass" :label="item.id" :key="item.id"> | 240 | + <div> |
| 241 | + <el-checkbox @change="handleCheckedClassChange" v-model="item.isChecked" :key="index" | ||
| 242 | + v-for="(item, index) in gradeClass" :label="item.id"> | ||
| 243 | {{ item.className }} | 243 | {{ item.className }} |
| 244 | </el-checkbox> | 244 | </el-checkbox> |
| 245 | - </el-checkbox-group> | 245 | + </div> |
| 246 | </span> | 246 | </span> |
| 247 | </div> | 247 | </div> |
| 248 | </el-row> | 248 | </el-row> |
| @@ -323,23 +323,9 @@ | @@ -323,23 +323,9 @@ | ||
| 323 | </div> | 323 | </div> |
| 324 | </el-dialog> | 324 | </el-dialog> |
| 325 | <el-dialog :append-to-body="true" :close-on-click-modal="false" title="知识点" :visible.sync="dialogKnowledge" | 325 | <el-dialog :append-to-body="true" :close-on-click-modal="false" title="知识点" :visible.sync="dialogKnowledge" |
| 326 | - width="500px"> | ||
| 327 | - <div> | ||
| 328 | - <el-form ref="form" :model="stem" label-width="160px"> | ||
| 329 | - <el-form-item label="知识点:"> | ||
| 330 | - <el-cascader size="small" filterable :show-all-levels="false" clearable placeholder="选择知识点" | ||
| 331 | - v-model="stem.knowledge" :options="knowledgeData" :props="{ | ||
| 332 | - expandTrigger: 'hover', | ||
| 333 | - multiple: true, | ||
| 334 | - checkStrictly: true, | ||
| 335 | - }"></el-cascader> | ||
| 336 | - </el-form-item> | ||
| 337 | - </el-form> | ||
| 338 | - </div> | ||
| 339 | - <div slot="footer"> | ||
| 340 | - <el-button @click="dialogKnowledge = false">取 消</el-button> | ||
| 341 | - <el-button type="primary" @click="setKnowledge">确 定</el-button> | ||
| 342 | - </div> | 326 | + width="60%"> |
| 327 | + <knowledgePoints :key="dialogKnowledge" @opration="knowledgeOpration" :sectionName="stem.sectionName" | ||
| 328 | + :subjectName="stem.subjectName" :knowledges="stem.knowledge" /> | ||
| 343 | </el-dialog> | 329 | </el-dialog> |
| 344 | </div> | 330 | </div> |
| 345 | <div class="content-fi"> | 331 | <div class="content-fi"> |
| @@ -352,7 +338,7 @@ | @@ -352,7 +338,7 @@ | ||
| 352 | 338 | ||
| 353 | <script> | 339 | <script> |
| 354 | import { deepClone, checkAnswer } from "utils"; | 340 | import { deepClone, checkAnswer } from "utils"; |
| 355 | -import knowledgeList from "assets/js/knowledgeList.js"; | 341 | +import conf from "@/config/index"; |
| 356 | export default { | 342 | export default { |
| 357 | data() { | 343 | data() { |
| 358 | return { | 344 | return { |
| @@ -409,7 +395,7 @@ export default { | @@ -409,7 +395,7 @@ export default { | ||
| 409 | //v1.5 | 395 | //v1.5 |
| 410 | dialogStem: false, //截图开关 | 396 | dialogStem: false, //截图开关 |
| 411 | dialogKnowledge: false, //知识点开关 | 397 | dialogKnowledge: false, //知识点开关 |
| 412 | - knowledgeList: { ...knowledgeList }, | 398 | + // knowledgeList: { ...knowledgeList }, |
| 413 | classList: [], | 399 | classList: [], |
| 414 | stem: { | 400 | stem: { |
| 415 | type: 1, | 401 | type: 1, |
| @@ -420,7 +406,7 @@ export default { | @@ -420,7 +406,7 @@ export default { | ||
| 420 | knowledge: [], //知识点 | 406 | knowledge: [], //知识点 |
| 421 | }, | 407 | }, |
| 422 | gradeClassList: [], //学段列表 | 408 | gradeClassList: [], //学段列表 |
| 423 | - uploadUrl: "/file/uploadImgToHtml", | 409 | + // uploadUrl: "/file/uploadImgToHtml", |
| 424 | iframeLoading: false, | 410 | iframeLoading: false, |
| 425 | examType: 2, | 411 | examType: 2, |
| 426 | }; | 412 | }; |
| @@ -439,31 +425,22 @@ export default { | @@ -439,31 +425,22 @@ export default { | ||
| 439 | }, 0); | 425 | }, 0); |
| 440 | return Number(score).toFixed(2); | 426 | return Number(score).toFixed(2); |
| 441 | }, | 427 | }, |
| 442 | - // 知识点列表 根据学段-科目筛选 | ||
| 443 | - knowledgeData: function () { | ||
| 444 | - let jsons = []; | ||
| 445 | - if (this.form.gradeName && this.form.subjectName) { | ||
| 446 | - let sectionName = ""; | ||
| 447 | - this.gradeClassList?.map((item) => { | ||
| 448 | - if (this.form.gradeName == item.gradeName) { | ||
| 449 | - sectionName = item.sectionName; | ||
| 450 | - } | ||
| 451 | - }); | ||
| 452 | - if ( | ||
| 453 | - sectionName && | ||
| 454 | - Object.keys(this.knowledgeList).includes(sectionName) | ||
| 455 | - ) { | ||
| 456 | - if ( | ||
| 457 | - Object.keys(this.knowledgeList[sectionName]).includes( | ||
| 458 | - this.form.subjectName | ||
| 459 | - ) | ||
| 460 | - ) { | ||
| 461 | - jsons = this.knowledgeList[sectionName][this.form.subjectName]; | ||
| 462 | - } | ||
| 463 | - } | 428 | + uploadUrl: function () { |
| 429 | + var requestUrl = ''; | ||
| 430 | + | ||
| 431 | + var ogrinUrl = '/file/uploadImgToHtml'; | ||
| 432 | + | ||
| 433 | + var baseUrl = conf.baseURL; | ||
| 434 | + | ||
| 435 | + if (baseUrl == '/' && ogrinUrl.indexOf('/') == 0) { | ||
| 436 | + requestUrl = ogrinUrl; | ||
| 464 | } | 437 | } |
| 465 | - return jsons; | ||
| 466 | - }, | 438 | + else { |
| 439 | + requestUrl = baseUrl + ogrinUrl | ||
| 440 | + } | ||
| 441 | + | ||
| 442 | + return requestUrl; | ||
| 443 | + } | ||
| 467 | }, | 444 | }, |
| 468 | created() { | 445 | created() { |
| 469 | this.role = | 446 | this.role = |
| @@ -481,17 +458,47 @@ export default { | @@ -481,17 +458,47 @@ export default { | ||
| 481 | this._GradeList(); | 458 | this._GradeList(); |
| 482 | }, | 459 | }, |
| 483 | methods: { | 460 | methods: { |
| 461 | + // 知识点 | ||
| 462 | + openKnowledge(obj, index, indexs) { | ||
| 463 | + this.stem.index = index; | ||
| 464 | + this.stem.indexs = indexs; | ||
| 465 | + this.stem.knowledge = obj.knowledge; | ||
| 466 | + if (this.form.gradeName && this.form.subjectName) { | ||
| 467 | + var matchClass = this.gradeClassList.find((item) => { | ||
| 468 | + if (this.form.gradeName == item.gradeName) { | ||
| 469 | + return item.sectionName; | ||
| 470 | + } | ||
| 471 | + }); | ||
| 472 | + this.stem.sectionName = matchClass?.sectionName ?? ""; | ||
| 473 | + this.stem.subjectName = this.form.subjectName ?? ""; | ||
| 474 | + } | ||
| 475 | + this.dialogKnowledge = true; | ||
| 476 | + }, | ||
| 477 | + knowledgeOpration(target) { | ||
| 478 | + if (target.opration == 'confirm') { | ||
| 479 | + this.form.questionList[this.stem.index]. | ||
| 480 | + subQuestions[this.stem.indexs].knowledge = target.knowledges.join(","); | ||
| 481 | + this.dialogKnowledge = false; | ||
| 482 | + } | ||
| 483 | + else { | ||
| 484 | + this.dialogKnowledge = false; | ||
| 485 | + } | ||
| 486 | + }, | ||
| 484 | _checkedClass() { | 487 | _checkedClass() { |
| 488 | + this.checkedClass = this.gradeClass.filter(item => item.isChecked).map(imap => imap.id); | ||
| 485 | this.classSharingType = false; | 489 | this.classSharingType = false; |
| 486 | }, | 490 | }, |
| 487 | handleCheckAllChange(val) { | 491 | handleCheckAllChange(val) { |
| 488 | - this.checkedClass = val ? this.gradeClass?.map(item => item.id) : []; | 492 | + this.gradeClass.forEach(item => { |
| 493 | + item.isChecked = val; | ||
| 494 | + }) | ||
| 489 | this.isIndeterminate = false; | 495 | this.isIndeterminate = false; |
| 490 | }, | 496 | }, |
| 491 | - handleCheckedClassChange(value) { | 497 | + handleCheckedClassChange() { |
| 498 | + var value = this.gradeClass.filter(item => item.isChecked); | ||
| 492 | let checkedCount = value.length; | 499 | let checkedCount = value.length; |
| 493 | - this.checkAll = checkedCount === this.checkedClass.length; | ||
| 494 | - this.isIndeterminate = checkedCount > 0 && checkedCount < this.checkedClass.length; | 500 | + this.checkAll = checkedCount === this.gradeClass.length; |
| 501 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.gradeClass.length; | ||
| 495 | }, | 502 | }, |
| 496 | async _selectClassSharingType() { | 503 | async _selectClassSharingType() { |
| 497 | 504 | ||
| @@ -505,10 +512,16 @@ export default { | @@ -505,10 +512,16 @@ export default { | ||
| 505 | 512 | ||
| 506 | if (classResponse.status != 0) { | 513 | if (classResponse.status != 0) { |
| 507 | this.$message.error(classResponse.info); | 514 | this.$message.error(classResponse.info); |
| 515 | + return; | ||
| 508 | } | 516 | } |
| 509 | 517 | ||
| 510 | - this.gradeClass = [...classResponse.data]; | ||
| 511 | - | 518 | + this.gradeClass = [...classResponse.data.map(item => { |
| 519 | + return { | ||
| 520 | + isChecked: this.checkedClass.includes(item.id), | ||
| 521 | + id: item.id, | ||
| 522 | + className: item.className | ||
| 523 | + } | ||
| 524 | + })]; | ||
| 512 | }, | 525 | }, |
| 513 | // v1.5 | 526 | // v1.5 |
| 514 | //上传截图 | 527 | //上传截图 |
| @@ -594,25 +607,7 @@ export default { | @@ -594,25 +607,7 @@ export default { | ||
| 594 | upError(res) { | 607 | upError(res) { |
| 595 | this.$message.error("上传失败"); | 608 | this.$message.error("上传失败"); |
| 596 | }, | 609 | }, |
| 597 | - // 打开知识点 | ||
| 598 | - openKnowledge(obj, index, indexs) { | ||
| 599 | - this.stem.index = index; | ||
| 600 | - this.stem.indexs = indexs || 0; | ||
| 601 | - this.stem.knowledge = (obj.knowledge && obj.knowledge.split("#")) || []; | ||
| 602 | - this.dialogKnowledge = true; | ||
| 603 | - }, | ||
| 604 | - // 选择知识点 | ||
| 605 | - setKnowledge() { | ||
| 606 | - if (this.questionList[0]?.subQuestions) { | ||
| 607 | - this.questionList[this.stem.index].subQuestions[ | ||
| 608 | - this.stem.indexs | ||
| 609 | - ].knowledge = this.stem.knowledge.join("#"); | ||
| 610 | - } else { | ||
| 611 | - this.questionList[this.stem.index].knowledge = | ||
| 612 | - this.stem.knowledge.join("#"); | ||
| 613 | - } | ||
| 614 | - this.dialogKnowledge = false; | ||
| 615 | - }, | 610 | + |
| 616 | //end | 611 | //end |
| 617 | 612 | ||
| 618 | linkBack() { | 613 | linkBack() { |
| @@ -893,7 +888,7 @@ export default { | @@ -893,7 +888,7 @@ export default { | ||
| 893 | modifyPaper = | 888 | modifyPaper = |
| 894 | this.role == "ROLE_PERSONAL" | 889 | this.role == "ROLE_PERSONAL" |
| 895 | ? this.$request.pModifyPaper | 890 | ? this.$request.pModifyPaper |
| 896 | - : this.$request.modifyPaper; | 891 | + : this.$request.pModifyPaperNew; |
| 897 | params = { | 892 | params = { |
| 898 | classIds: this.checkedClass, | 893 | classIds: this.checkedClass, |
| 899 | sharingType: this.form.sharingType, | 894 | sharingType: this.form.sharingType, |
| @@ -936,7 +931,7 @@ export default { | @@ -936,7 +931,7 @@ export default { | ||
| 936 | }); | 931 | }); |
| 937 | } | 932 | } |
| 938 | } else { | 933 | } else { |
| 939 | - this.$message.error(message); | 934 | + this.$message.error(info); |
| 940 | } | 935 | } |
| 941 | }, | 936 | }, |
| 942 | async _QueryDetail() { | 937 | async _QueryDetail() { |
| @@ -1384,11 +1379,12 @@ export default { | @@ -1384,11 +1379,12 @@ export default { | ||
| 1384 | } | 1379 | } |
| 1385 | 1380 | ||
| 1386 | .qs-set { | 1381 | .qs-set { |
| 1387 | - width: 80px; | 1382 | + display: inline-block; |
| 1383 | + padding: 0px 5px; | ||
| 1388 | } | 1384 | } |
| 1389 | 1385 | ||
| 1390 | .qs-oprations { | 1386 | .qs-oprations { |
| 1391 | - width: 300px; | 1387 | + width: 320px; |
| 1392 | } | 1388 | } |
| 1393 | 1389 | ||
| 1394 | .qs-options { | 1390 | .qs-options { |
src/views/basic/down/client.vue
| @@ -19,12 +19,7 @@ | @@ -19,12 +19,7 @@ | ||
| 19 | </div> | 19 | </div> |
| 20 | <div class="down-box"> | 20 | <div class="down-box"> |
| 21 | <p class="txt">默认参数配置</p> | 21 | <p class="txt">默认参数配置</p> |
| 22 | - <el-button | ||
| 23 | - class="down-btn" | ||
| 24 | - type="primary" | ||
| 25 | - @click="getAppDownloadUrl(false)" | ||
| 26 | - >立即下载</el-button | ||
| 27 | - > | 22 | + <el-button class="down-btn" type="primary" @click="getAppDownloadUrl(false)">立即下载</el-button> |
| 28 | </div> | 23 | </div> |
| 29 | </div> | 24 | </div> |
| 30 | <!-- <ul class="down-ul"> | 25 | <!-- <ul class="down-ul"> |
| @@ -54,46 +49,35 @@ | @@ -54,46 +49,35 @@ | ||
| 54 | <i class="fa fa-mail-reply-all"></i> | 49 | <i class="fa fa-mail-reply-all"></i> |
| 55 | <p> | 50 | <p> |
| 56 | {{ | 51 | {{ |
| 57 | - `${type == 1 ? "参数设置" : formData.configName}` | ||
| 58 | - }} | 52 | + `${type == 1 ? "参数设置" : formData.configName}` |
| 53 | + }} | ||
| 59 | </p> | 54 | </p> |
| 60 | </div> | 55 | </div> |
| 61 | </div> | 56 | </div> |
| 62 | <div class="form-box"> | 57 | <div class="form-box"> |
| 63 | - <el-form | ||
| 64 | - ref="forms" | ||
| 65 | - :model="formData" | ||
| 66 | - :rules="ruleForm" | ||
| 67 | - label-width="180px" | ||
| 68 | - > | 58 | + <el-form ref="forms" :model="formData" :rules="ruleForm" label-width="180px"> |
| 69 | <el-form-item label="配置名称:" prop="configName" v-if="type == 1"> | 59 | <el-form-item label="配置名称:" prop="configName" v-if="type == 1"> |
| 70 | <el-col :span="12"> | 60 | <el-col :span="12"> |
| 71 | - <el-input | ||
| 72 | - v-model.trim="formData.configName" | ||
| 73 | - placeholder="请填写配置名称" | ||
| 74 | - ></el-input> | 61 | + <el-input v-model.trim="formData.configName" placeholder="请填写配置名称"></el-input> |
| 75 | </el-col> | 62 | </el-col> |
| 76 | </el-form-item> | 63 | </el-form-item> |
| 77 | <el-form-item label="主菜单设置:" prop="mainMenu"> | 64 | <el-form-item label="主菜单设置:" prop="mainMenu"> |
| 78 | <el-checkbox-group v-model="formData.mainMenu" :max="4"> | 65 | <el-checkbox-group v-model="formData.mainMenu" :max="4"> |
| 79 | <el-checkbox v-for="item in menuList" :label="item" :key="item">{{ | 66 | <el-checkbox v-for="item in menuList" :label="item" :key="item">{{ |
| 80 | - item | ||
| 81 | - }}</el-checkbox> | 67 | + item |
| 68 | + }}</el-checkbox> | ||
| 82 | </el-checkbox-group> | 69 | </el-checkbox-group> |
| 83 | </el-form-item> | 70 | </el-form-item> |
| 84 | <el-form-item label="弹出菜单组:" prop="popupMenu"> | 71 | <el-form-item label="弹出菜单组:" prop="popupMenu"> |
| 85 | <el-radio-group v-model="formData.popupMenu"> | 72 | <el-radio-group v-model="formData.popupMenu"> |
| 86 | <p class="popup-menu"> | 73 | <p class="popup-menu"> |
| 87 | - <el-radio :label="1" | ||
| 88 | - ><span>1:签到点名</span> <span> 2:导入导出</span> | ||
| 89 | - <span>3:班级管理</span> <span>4:系统设置</span></el-radio | ||
| 90 | - > | 74 | + <el-radio :label="1"><span>1:签到点名</span> <span> 2:导入导出</span> |
| 75 | + <span>3:班级管理</span> <span>4:系统设置</span></el-radio> | ||
| 91 | </p> | 76 | </p> |
| 92 | <p class="popup-menu popup-menu1"> | 77 | <p class="popup-menu popup-menu1"> |
| 93 | <el-radio :label="2"> | 78 | <el-radio :label="2"> |
| 94 | <span>1:签到点名</span> <span> 2:导入导出</span> | 79 | <span>1:签到点名</span> <span> 2:导入导出</span> |
| 95 | - <span>3:考试任务</span> <span>4:系统设置</span></el-radio | ||
| 96 | - > | 80 | + <span>3:考试任务</span> <span>4:系统设置</span></el-radio> |
| 97 | </p> | 81 | </p> |
| 98 | </el-radio-group> | 82 | </el-radio-group> |
| 99 | </el-form-item> | 83 | </el-form-item> |
| @@ -101,56 +85,24 @@ | @@ -101,56 +85,24 @@ | ||
| 101 | <el-col :span="12"> | 85 | <el-col :span="12"> |
| 102 | <div class="silde-box"> | 86 | <div class="silde-box"> |
| 103 | <p class="silde-p"> | 87 | <p class="silde-p"> |
| 104 | - <span class="num" :style="{ left: formData.failedSet + '%' }" | ||
| 105 | - >{{ formData.failedSet }}%</span | ||
| 106 | - > | ||
| 107 | - <el-slider | ||
| 108 | - v-model="formData.failedSet" | ||
| 109 | - :show-tooltip="false" | ||
| 110 | - ></el-slider | ||
| 111 | - ><span class="txt" :style="{ left: formData.failedSet + '%' }" | ||
| 112 | - >不及格</span | ||
| 113 | - > | 88 | + <span class="num" :style="{ left: formData.failedSet + '%' }">{{ formData.failedSet }}%</span> |
| 89 | + <el-slider v-model="formData.failedSet" :show-tooltip="false"></el-slider><span class="txt" | ||
| 90 | + :style="{ left: formData.failedSet + '%' }">不及格</span> | ||
| 114 | </p> | 91 | </p> |
| 115 | <p class="silde-p"> | 92 | <p class="silde-p"> |
| 116 | - <span class="num" :style="{ left: formData.passSet + '%' }" | ||
| 117 | - >{{ formData.passSet }}%</span | ||
| 118 | - > | ||
| 119 | - <el-slider | ||
| 120 | - v-model="formData.passSet" | ||
| 121 | - :show-tooltip="false" | ||
| 122 | - ></el-slider | ||
| 123 | - ><span class="txt" :style="{ left: formData.passSet + '%' }" | ||
| 124 | - >及格</span | ||
| 125 | - > | 93 | + <span class="num" :style="{ left: formData.passSet + '%' }">{{ formData.passSet }}%</span> |
| 94 | + <el-slider v-model="formData.passSet" :show-tooltip="false"></el-slider><span class="txt" | ||
| 95 | + :style="{ left: formData.passSet + '%' }">及格</span> | ||
| 126 | </p> | 96 | </p> |
| 127 | <p class="silde-p"> | 97 | <p class="silde-p"> |
| 128 | - <span class="num" :style="{ left: formData.goodSet + '%' }" | ||
| 129 | - >{{ formData.goodSet }}%</span | ||
| 130 | - > | ||
| 131 | - <el-slider | ||
| 132 | - v-model="formData.goodSet" | ||
| 133 | - :show-tooltip="false" | ||
| 134 | - ></el-slider | ||
| 135 | - ><span class="txt" :style="{ left: formData.goodSet + '%' }" | ||
| 136 | - >良好</span | ||
| 137 | - > | 98 | + <span class="num" :style="{ left: formData.goodSet + '%' }">{{ formData.goodSet }}%</span> |
| 99 | + <el-slider v-model="formData.goodSet" :show-tooltip="false"></el-slider><span class="txt" | ||
| 100 | + :style="{ left: formData.goodSet + '%' }">良好</span> | ||
| 138 | </p> | 101 | </p> |
| 139 | <p class="silde-p"> | 102 | <p class="silde-p"> |
| 140 | - <span | ||
| 141 | - class="num" | ||
| 142 | - :style="{ left: formData.excellenSet + '%' }" | ||
| 143 | - >{{ formData.excellenSet }}%</span | ||
| 144 | - > | ||
| 145 | - <el-slider | ||
| 146 | - v-model="formData.excellenSet" | ||
| 147 | - :show-tooltip="false" | ||
| 148 | - ></el-slider | ||
| 149 | - ><span | ||
| 150 | - class="txt" | ||
| 151 | - :style="{ left: formData.excellenSet + '%' }" | ||
| 152 | - >优秀</span | ||
| 153 | - > | 103 | + <span class="num" :style="{ left: formData.excellenSet + '%' }">{{ formData.excellenSet }}%</span> |
| 104 | + <el-slider v-model="formData.excellenSet" :show-tooltip="false"></el-slider><span class="txt" | ||
| 105 | + :style="{ left: formData.excellenSet + '%' }">优秀</span> | ||
| 154 | </p> | 106 | </p> |
| 155 | </div> | 107 | </div> |
| 156 | </el-col> | 108 | </el-col> |
| @@ -161,14 +113,8 @@ | @@ -161,14 +113,8 @@ | ||
| 161 | <el-radio :label="1">即时抢答</el-radio> | 113 | <el-radio :label="1">即时抢答</el-radio> |
| 162 | <el-radio :label="2">老师选择</el-radio> | 114 | <el-radio :label="2">老师选择</el-radio> |
| 163 | </el-radio-group> | 115 | </el-radio-group> |
| 164 | - <el-input-number | ||
| 165 | - v-show="formData.viesAnswerSet === 0" | ||
| 166 | - size="small" | ||
| 167 | - class="count-down" | ||
| 168 | - v-model="formData.countdown" | ||
| 169 | - :step="1" | ||
| 170 | - :step-strictly="true" | ||
| 171 | - ></el-input-number> | 116 | + <el-input-number v-show="formData.viesAnswerSet === 0" size="small" class="count-down" |
| 117 | + v-model="formData.countdown" :step="1" :step-strictly="true"></el-input-number> | ||
| 172 | <span v-show="formData.viesAnswerSet == 0">秒</span> | 118 | <span v-show="formData.viesAnswerSet == 0">秒</span> |
| 173 | </el-form-item> | 119 | </el-form-item> |
| 174 | <el-form-item label="抽答设置:" prop="ballotAnswerSet"> | 120 | <el-form-item label="抽答设置:" prop="ballotAnswerSet"> |
| @@ -178,66 +124,28 @@ | @@ -178,66 +124,28 @@ | ||
| 178 | </el-radio-group> | 124 | </el-radio-group> |
| 179 | </el-form-item> | 125 | </el-form-item> |
| 180 | <el-form-item label="单选题选项默认个数:" prop="singleChoiceNum"> | 126 | <el-form-item label="单选题选项默认个数:" prop="singleChoiceNum"> |
| 181 | - <el-input-number | ||
| 182 | - size="small" | ||
| 183 | - class="count-down count-down2" | ||
| 184 | - v-model="formData.singleChoiceNum" | ||
| 185 | - :min="2" | ||
| 186 | - :max="7" | ||
| 187 | - :step="1" | ||
| 188 | - :step-strictly="true" | ||
| 189 | - ></el-input-number | ||
| 190 | - >个 | 127 | + <el-input-number size="small" class="count-down count-down2" v-model="formData.singleChoiceNum" :min="2" |
| 128 | + :max="7" :step="1" :step-strictly="true"></el-input-number>个 | ||
| 191 | </el-form-item> | 129 | </el-form-item> |
| 192 | <el-form-item label="多选题选项默认个数:" prop="multipleChoiceNum"> | 130 | <el-form-item label="多选题选项默认个数:" prop="multipleChoiceNum"> |
| 193 | - <el-input-number | ||
| 194 | - size="small" | ||
| 195 | - class="count-down count-down2" | ||
| 196 | - v-model="formData.multipleChoiceNum" | ||
| 197 | - :min="2" | ||
| 198 | - :max="7" | ||
| 199 | - :step="1" | ||
| 200 | - :step-strictly="true" | ||
| 201 | - ></el-input-number | ||
| 202 | - >个 | 131 | + <el-input-number size="small" class="count-down count-down2" v-model="formData.multipleChoiceNum" :min="2" |
| 132 | + :max="7" :step="1" :step-strictly="true"></el-input-number>个 | ||
| 203 | </el-form-item> | 133 | </el-form-item> |
| 204 | <el-form-item label="测—单题型默认题数:" prop="singleTypeNum"> | 134 | <el-form-item label="测—单题型默认题数:" prop="singleTypeNum"> |
| 205 | - <el-input-number | ||
| 206 | - size="small" | ||
| 207 | - class="count-down count-down2" | ||
| 208 | - v-model="formData.singleTypeNum" | ||
| 209 | - :min="2" | ||
| 210 | - :max="25" | ||
| 211 | - :step="1" | ||
| 212 | - :step-strictly="true" | ||
| 213 | - ></el-input-number | ||
| 214 | - >个 | 135 | + <el-input-number size="small" class="count-down count-down2" v-model="formData.singleTypeNum" :min="2" |
| 136 | + :max="25" :step="1" :step-strictly="true"></el-input-number>个 | ||
| 215 | </el-form-item> | 137 | </el-form-item> |
| 216 | <el-form-item label="问—倒计时:" prop="askCountdown"> | 138 | <el-form-item label="问—倒计时:" prop="askCountdown"> |
| 217 | <el-switch v-model="askCount" @change="askCountChange"> </el-switch> | 139 | <el-switch v-model="askCount" @change="askCountChange"> </el-switch> |
| 218 | - <el-input-number | ||
| 219 | - v-show="askCount" | ||
| 220 | - size="small" | ||
| 221 | - class="count-down" | ||
| 222 | - v-model="formData.askCountdown" | ||
| 223 | - :min="0" | ||
| 224 | - :step="1" | ||
| 225 | - :step-strictly="true" | ||
| 226 | - ></el-input-number> | 140 | + <el-input-number v-show="askCount" size="small" class="count-down" v-model="formData.askCountdown" :min="0" |
| 141 | + :step="1" :step-strictly="true"></el-input-number> | ||
| 227 | {{ askCount ? "秒" : "" }} | 142 | {{ askCount ? "秒" : "" }} |
| 228 | </el-form-item> | 143 | </el-form-item> |
| 229 | <el-form-item label="测—倒计时:" prop="viesAnswerSet"> | 144 | <el-form-item label="测—倒计时:" prop="viesAnswerSet"> |
| 230 | <el-switch v-model="examsDuration" @change="examsDurationChange"> | 145 | <el-switch v-model="examsDuration" @change="examsDurationChange"> |
| 231 | </el-switch> | 146 | </el-switch> |
| 232 | - <el-input-number | ||
| 233 | - v-show="examsDuration" | ||
| 234 | - size="small" | ||
| 235 | - class="count-down" | ||
| 236 | - v-model="formData.examsDuration" | ||
| 237 | - :min="0" | ||
| 238 | - :step="1" | ||
| 239 | - :step-strictly="true" | ||
| 240 | - ></el-input-number> | 147 | + <el-input-number v-show="examsDuration" size="small" class="count-down" v-model="formData.examsDuration" |
| 148 | + :min="0" :step="1" :step-strictly="true"></el-input-number> | ||
| 241 | {{ examsDuration ? "分" : "" }} | 149 | {{ examsDuration ? "分" : "" }} |
| 242 | </el-form-item> | 150 | </el-form-item> |
| 243 | <el-form-item label="答题结构展示:" prop="displayModel"> | 151 | <el-form-item label="答题结构展示:" prop="displayModel"> |
| @@ -515,7 +423,7 @@ export default { | @@ -515,7 +423,7 @@ export default { | ||
| 515 | this.$message.error(info); | 423 | this.$message.error(info); |
| 516 | } | 424 | } |
| 517 | }, | 425 | }, |
| 518 | - async getAppDownloadUrl(configId) { | 426 | + async getAppDownloadUrl(configId) { |
| 519 | const { data, status, info } = await this.$request.getAppDownloadUrl({ | 427 | const { data, status, info } = await this.$request.getAppDownloadUrl({ |
| 520 | configId: configId || "", | 428 | configId: configId || "", |
| 521 | }); | 429 | }); |
| @@ -539,49 +447,60 @@ export default { | @@ -539,49 +447,60 @@ export default { | ||
| 539 | width: 100%; | 447 | width: 100%; |
| 540 | position: relative; | 448 | position: relative; |
| 541 | } | 449 | } |
| 450 | + | ||
| 542 | .page-content { | 451 | .page-content { |
| 543 | padding: 30px; | 452 | padding: 30px; |
| 453 | + | ||
| 544 | .content-top { | 454 | .content-top { |
| 545 | padding: 20px 50px 20px 20px; | 455 | padding: 20px 50px 20px 20px; |
| 546 | display: flex; | 456 | display: flex; |
| 547 | justify-content: space-between; | 457 | justify-content: space-between; |
| 548 | align-items: center; | 458 | align-items: center; |
| 459 | + | ||
| 549 | .cont-info { | 460 | .cont-info { |
| 550 | flex: 1; | 461 | flex: 1; |
| 551 | display: flex; | 462 | display: flex; |
| 552 | align-items: center; | 463 | align-items: center; |
| 464 | + | ||
| 553 | .logo { | 465 | .logo { |
| 554 | width: 140px; | 466 | width: 140px; |
| 555 | margin-right: 16px; | 467 | margin-right: 16px; |
| 556 | } | 468 | } |
| 469 | + | ||
| 557 | .name { | 470 | .name { |
| 558 | font-size: 20px; | 471 | font-size: 20px; |
| 559 | color: #333; | 472 | color: #333; |
| 560 | line-height: 24px; | 473 | line-height: 24px; |
| 561 | padding-bottom: 12px; | 474 | padding-bottom: 12px; |
| 562 | } | 475 | } |
| 476 | + | ||
| 563 | .txt { | 477 | .txt { |
| 564 | font-size: 15px; | 478 | font-size: 15px; |
| 565 | color: #7f7f7f; | 479 | color: #7f7f7f; |
| 566 | line-height: 25px; | 480 | line-height: 25px; |
| 567 | } | 481 | } |
| 568 | } | 482 | } |
| 483 | + | ||
| 569 | .down-box { | 484 | .down-box { |
| 570 | width: 200px; | 485 | width: 200px; |
| 571 | text-align: center; | 486 | text-align: center; |
| 487 | + | ||
| 572 | .txt { | 488 | .txt { |
| 573 | font-size: 16px; | 489 | font-size: 16px; |
| 574 | padding-bottom: 8px; | 490 | padding-bottom: 8px; |
| 575 | } | 491 | } |
| 492 | + | ||
| 576 | .down-btn { | 493 | .down-btn { |
| 577 | font-size: 20px; | 494 | font-size: 20px; |
| 578 | } | 495 | } |
| 579 | } | 496 | } |
| 580 | } | 497 | } |
| 498 | + | ||
| 581 | .down-ul { | 499 | .down-ul { |
| 582 | display: flex; | 500 | display: flex; |
| 583 | flex-wrap: wrap; | 501 | flex-wrap: wrap; |
| 584 | padding: 0 20px; | 502 | padding: 0 20px; |
| 503 | + | ||
| 585 | .down-li { | 504 | .down-li { |
| 586 | width: calc(50% - 12px); | 505 | width: calc(50% - 12px); |
| 587 | height: 72px; | 506 | height: 72px; |
| @@ -594,22 +513,27 @@ export default { | @@ -594,22 +513,27 @@ export default { | ||
| 594 | border-radius: 10px; | 513 | border-radius: 10px; |
| 595 | background: #f8f8f8; | 514 | background: #f8f8f8; |
| 596 | box-shadow: 2px 2px 5px #ccc; | 515 | box-shadow: 2px 2px 5px #ccc; |
| 516 | + | ||
| 597 | &:nth-child(2n) { | 517 | &:nth-child(2n) { |
| 598 | margin-right: 0; | 518 | margin-right: 0; |
| 599 | } | 519 | } |
| 520 | + | ||
| 600 | font-size: 16px; | 521 | font-size: 16px; |
| 601 | color: #667ffd; | 522 | color: #667ffd; |
| 523 | + | ||
| 602 | .p1 { | 524 | .p1 { |
| 603 | cursor: pointer; | 525 | cursor: pointer; |
| 604 | } | 526 | } |
| 605 | } | 527 | } |
| 606 | } | 528 | } |
| 607 | } | 529 | } |
| 530 | + | ||
| 608 | :deep(.el-button.is-round) { | 531 | :deep(.el-button.is-round) { |
| 609 | width: 120px; | 532 | width: 120px; |
| 610 | text-align: center; | 533 | text-align: center; |
| 611 | padding: 10px 0; | 534 | padding: 10px 0; |
| 612 | } | 535 | } |
| 536 | + | ||
| 613 | .edit-dia { | 537 | .edit-dia { |
| 614 | position: absolute; | 538 | position: absolute; |
| 615 | left: 0; | 539 | left: 0; |
| @@ -620,6 +544,7 @@ export default { | @@ -620,6 +544,7 @@ export default { | ||
| 620 | height: calc(100vh - 80px); | 544 | height: calc(100vh - 80px); |
| 621 | background: #fff; | 545 | background: #fff; |
| 622 | overflow-y: auto; | 546 | overflow-y: auto; |
| 547 | + | ||
| 623 | .back { | 548 | .back { |
| 624 | width: 100%; | 549 | width: 100%; |
| 625 | height: 56px; | 550 | height: 56px; |
| @@ -628,6 +553,7 @@ export default { | @@ -628,6 +553,7 @@ export default { | ||
| 628 | align-items: center; | 553 | align-items: center; |
| 629 | padding: 0 20px; | 554 | padding: 0 20px; |
| 630 | box-sizing: border-box; | 555 | box-sizing: border-box; |
| 556 | + | ||
| 631 | .back-l { | 557 | .back-l { |
| 632 | display: flex; | 558 | display: flex; |
| 633 | align-items: center; | 559 | align-items: center; |
| @@ -636,26 +562,33 @@ export default { | @@ -636,26 +562,33 @@ export default { | ||
| 636 | font-size: 18px; | 562 | font-size: 18px; |
| 637 | font-weight: 500; | 563 | font-weight: 500; |
| 638 | } | 564 | } |
| 565 | + | ||
| 639 | .fa-mail-reply-all { | 566 | .fa-mail-reply-all { |
| 640 | font-size: 28px; | 567 | font-size: 28px; |
| 641 | color: #b3b3b3; | 568 | color: #b3b3b3; |
| 642 | margin-right: 12px; | 569 | margin-right: 12px; |
| 643 | } | 570 | } |
| 644 | } | 571 | } |
| 572 | + | ||
| 645 | .form-box { | 573 | .form-box { |
| 646 | padding: 20px; | 574 | padding: 20px; |
| 575 | + | ||
| 647 | .popup-menu { | 576 | .popup-menu { |
| 648 | padding-bottom: 16px; | 577 | padding-bottom: 16px; |
| 578 | + | ||
| 649 | span { | 579 | span { |
| 650 | padding-right: 12px; | 580 | padding-right: 12px; |
| 651 | } | 581 | } |
| 652 | } | 582 | } |
| 583 | + | ||
| 653 | .popup-menu1 { | 584 | .popup-menu1 { |
| 654 | padding-bottom: 0; | 585 | padding-bottom: 0; |
| 655 | } | 586 | } |
| 587 | + | ||
| 656 | .count-down { | 588 | .count-down { |
| 657 | width: 48px; | 589 | width: 48px; |
| 658 | margin: 0 8px 0 20px; | 590 | margin: 0 8px 0 20px; |
| 591 | + | ||
| 659 | :deep(.el-input__inner) { | 592 | :deep(.el-input__inner) { |
| 660 | width: 48px; | 593 | width: 48px; |
| 661 | height: 32px; | 594 | height: 32px; |
| @@ -664,25 +597,31 @@ export default { | @@ -664,25 +597,31 @@ export default { | ||
| 664 | border-color: #667ffd; | 597 | border-color: #667ffd; |
| 665 | padding: 0; | 598 | padding: 0; |
| 666 | } | 599 | } |
| 600 | + | ||
| 667 | :deep(.el-input-number__decrease) { | 601 | :deep(.el-input-number__decrease) { |
| 668 | display: none; | 602 | display: none; |
| 669 | } | 603 | } |
| 604 | + | ||
| 670 | :deep(.el-input-number__increase) { | 605 | :deep(.el-input-number__increase) { |
| 671 | display: none; | 606 | display: none; |
| 672 | } | 607 | } |
| 673 | } | 608 | } |
| 609 | + | ||
| 674 | .count-down2 { | 610 | .count-down2 { |
| 675 | margin-left: 0; | 611 | margin-left: 0; |
| 676 | } | 612 | } |
| 613 | + | ||
| 677 | .silde-box { | 614 | .silde-box { |
| 678 | position: relative; | 615 | position: relative; |
| 679 | width: 100%; | 616 | width: 100%; |
| 680 | height: 60px; | 617 | height: 60px; |
| 618 | + | ||
| 681 | .silde-p { | 619 | .silde-p { |
| 682 | width: 100%; | 620 | width: 100%; |
| 683 | position: absolute; | 621 | position: absolute; |
| 684 | padding-top: 20px; | 622 | padding-top: 20px; |
| 685 | - & > span { | 623 | + |
| 624 | + &>span { | ||
| 686 | position: absolute; | 625 | position: absolute; |
| 687 | width: 48px; | 626 | width: 48px; |
| 688 | text-align: center; | 627 | text-align: center; |
| @@ -690,19 +629,24 @@ export default { | @@ -690,19 +629,24 @@ export default { | ||
| 690 | flex-shrink: 0; | 629 | flex-shrink: 0; |
| 691 | font-size: 12px; | 630 | font-size: 12px; |
| 692 | } | 631 | } |
| 632 | + | ||
| 693 | :deep(.el-slider) { | 633 | :deep(.el-slider) { |
| 694 | flex: 1; | 634 | flex: 1; |
| 695 | } | 635 | } |
| 636 | + | ||
| 696 | :deep(.el-slider__runway) { | 637 | :deep(.el-slider__runway) { |
| 697 | margin: 5px 0; | 638 | margin: 5px 0; |
| 698 | } | 639 | } |
| 640 | + | ||
| 699 | :deep(.el-slider__runway) { | 641 | :deep(.el-slider__runway) { |
| 700 | background-color: #409eff; | 642 | background-color: #409eff; |
| 701 | } | 643 | } |
| 644 | + | ||
| 702 | .num { | 645 | .num { |
| 703 | top: 0; | 646 | top: 0; |
| 704 | transform: translateX(-24px); | 647 | transform: translateX(-24px); |
| 705 | } | 648 | } |
| 649 | + | ||
| 706 | .txt { | 650 | .txt { |
| 707 | bottom: -20px; | 651 | bottom: -20px; |
| 708 | transform: translateX(-24px); | 652 | transform: translateX(-24px); |
src/views/basic/setUp/clazz.vue
| @@ -82,9 +82,12 @@ | @@ -82,9 +82,12 @@ | ||
| 82 | <upload id="downTeacher" drag :url="url" | 82 | <upload id="downTeacher" drag :url="url" |
| 83 | style="border:rgb(219,226,235) dashed 1px;margin:0px auto;width: 80%;padding:40px 0px;border-radius: 5px;" | 83 | style="border:rgb(219,226,235) dashed 1px;margin:0px auto;width: 80%;padding:40px 0px;border-radius: 5px;" |
| 84 | @upSuccess="upSuccess" fileName="班级名单"> | 84 | @upSuccess="upSuccess" fileName="班级名单"> |
| 85 | - <p class="down-txt" slot="down"> | ||
| 86 | - 通过Excel名单导入班级名单模板 | ||
| 87 | - </p> | 85 | + <div class="down-txt" slot="down" style="padding: 0px !important;"> |
| 86 | + <span style="text-align: center;margin:0px auto;">通过Excel名单导入班级名单模板</span> | ||
| 87 | + </div> | ||
| 88 | + <div class="down-txt" slot="descption" style="padding: 0px !important;"> | ||
| 89 | + <span style="text-align: center;margin:0px auto;color:red;">为避免导入班级类型出错,上传文件的名称必须包含“行政班”或“教学班”。</span> | ||
| 90 | + </div> | ||
| 88 | </upload> | 91 | </upload> |
| 89 | </el-row> | 92 | </el-row> |
| 90 | </div> | 93 | </div> |
src/views/basic/setUp/student.vue
| @@ -230,7 +230,7 @@ | @@ -230,7 +230,7 @@ | ||
| 230 | @change="changeClazz()" | 230 | @change="changeClazz()" |
| 231 | placeholder="选择当前班级" | 231 | placeholder="选择当前班级" |
| 232 | > | 232 | > |
| 233 | - <el-option | 233 | + <el-option :key="index" |
| 234 | v-for="(item, index) in formStuCla.classList" | 234 | v-for="(item, index) in formStuCla.classList" |
| 235 | :label="item.className" | 235 | :label="item.className" |
| 236 | :value="item.id" | 236 | :value="item.id" |
src/views/basic/setUp/teacher.vue
| @@ -25,6 +25,12 @@ | @@ -25,6 +25,12 @@ | ||
| 25 | <el-option label="行政班" :value="0"></el-option> | 25 | <el-option label="行政班" :value="0"></el-option> |
| 26 | <el-option label="教学班" :value="1"></el-option> | 26 | <el-option label="教学班" :value="1"></el-option> |
| 27 | </el-select> | 27 | </el-select> |
| 28 | + <el-select class="sel" @change="_QueryData(5)" v-model="query.role" placeholder="选择角色"> | ||
| 29 | + <el-option disabled label="请选择" :value="9"></el-option> | ||
| 30 | + <el-option label="年级组长" :value="'年级组长'"></el-option> | ||
| 31 | + <el-option label="班主任" :value="'班主任'"></el-option> | ||
| 32 | + <el-option label="任课老师" :value="'任课老师'"></el-option> | ||
| 33 | + </el-select> | ||
| 28 | <el-cascader size="small" class="sel sel2" clearable placeholder="选择范围" @change="_QueryData(1)" | 34 | <el-cascader size="small" class="sel sel2" clearable placeholder="选择范围" @change="_QueryData(1)" |
| 29 | v-model="query.gradeClassSub" :options="gradeClassSubList" :props="{ | 35 | v-model="query.gradeClassSub" :options="gradeClassSubList" :props="{ |
| 30 | multiple: true, | 36 | multiple: true, |
| @@ -59,19 +65,17 @@ | @@ -59,19 +65,17 @@ | ||
| 59 | <el-checkbox v-show="showDel" v-model="AllTeacher" :indeterminate="indeterminate" | 65 | <el-checkbox v-show="showDel" v-model="AllTeacher" :indeterminate="indeterminate" |
| 60 | @change="handleCheckAllChange">{{ "" }}</el-checkbox> | 66 | @change="handleCheckAllChange">{{ "" }}</el-checkbox> |
| 61 | <span class="txt">教师列表</span> | 67 | <span class="txt">教师列表</span> |
| 62 | - <el-popconfirm v-show="showDel" title="确定所选教师格式化吗?" @confirm="remove"> | 68 | + <el-popconfirm v-show="showDel" title="确定清除所选教师的任课信息吗?" @confirm="remove"> |
| 63 | <img slot="reference" class="clear" src="../../../assets/images/shuazi.svg" alt="" /> | 69 | <img slot="reference" class="clear" src="../../../assets/images/shuazi.svg" alt="" /> |
| 64 | </el-popconfirm> | 70 | </el-popconfirm> |
| 65 | </p> | 71 | </p> |
| 66 | <el-checkbox-group v-model="clearTeacher" @change="handleCheckedChange"> | 72 | <el-checkbox-group v-model="clearTeacher" @change="handleCheckedChange"> |
| 67 | <ul class="teacher-ul"> | 73 | <ul class="teacher-ul"> |
| 68 | <li class="teacher-item" v-for="item in teacherList" :key="item.id"> | 74 | <li class="teacher-item" v-for="item in teacherList" :key="item.id"> |
| 69 | - <el-checkbox v-show="showDel" :label="item.id">{{ | ||
| 70 | - "" | ||
| 71 | - }}</el-checkbox> | 75 | + <el-checkbox v-show="showDel" :label="item.id">{{ "" }}</el-checkbox> |
| 72 | <p class="name" :class="showTId == item.id ? 'active' : ''" @click="showTeacher(item)"> | 76 | <p class="name" :class="showTId == item.id ? 'active' : ''" @click="showTeacher(item)"> |
| 73 | - {{ item.realName | ||
| 74 | - }}<template v-if="setClass(item)">({{ setClass(item) }})</template> | 77 | + {{ item.realName }} |
| 78 | + <template v-if="setClass(item)">({{ setClass(item) }})</template> | ||
| 75 | </p> | 79 | </p> |
| 76 | </li> | 80 | </li> |
| 77 | </ul> | 81 | </ul> |
| @@ -97,6 +101,26 @@ | @@ -97,6 +101,26 @@ | ||
| 97 | }} | 101 | }} |
| 98 | </p> | 102 | </p> |
| 99 | </div> | 103 | </div> |
| 104 | + <div class="grade-box" v-if="teacherDetail.teacherGradeList && teacherDetail.teacherGradeList.length"> | ||
| 105 | + <p class="h-title">年级组长</p> | ||
| 106 | + <ul class="grade-info"> | ||
| 107 | + <li class="grade-li" v-for="item in teacherDetail.teacherGradeList" :key="item.classId"> | ||
| 108 | + <el-popconfirm title="确定删除吗?" @confirm="delTeacherManager(item, 0)" v-if="!code"> | ||
| 109 | + <i class="el-icon-delete" slot="reference"></i> | ||
| 110 | + </el-popconfirm> | ||
| 111 | + <div class="grade-item"> | ||
| 112 | + <p class="grade-name"> | ||
| 113 | + {{ item.gradeName }} | ||
| 114 | + </p> | ||
| 115 | + <div class="grade-class"> | ||
| 116 | + <p> | ||
| 117 | + <i class="fa fa-address-book-o"></i>学生:{{ item.studentNum }}个 | ||
| 118 | + </p> | ||
| 119 | + </div> | ||
| 120 | + </div> | ||
| 121 | + </li> | ||
| 122 | + </ul> | ||
| 123 | + </div> | ||
| 100 | <div class="grade-box" v-if="teacherDetail.managerList && teacherDetail.managerList.length"> | 124 | <div class="grade-box" v-if="teacherDetail.managerList && teacherDetail.managerList.length"> |
| 101 | <p class="h-title">班主任</p> | 125 | <p class="h-title">班主任</p> |
| 102 | <ul class="grade-info"> | 126 | <ul class="grade-info"> |
| @@ -119,9 +143,7 @@ | @@ -119,9 +143,7 @@ | ||
| 119 | </li> | 143 | </li> |
| 120 | </ul> | 144 | </ul> |
| 121 | </div> | 145 | </div> |
| 122 | - <div class="grade-box" v-if="teacherDetail.teacherCourseList && | ||
| 123 | - teacherDetail.teacherCourseList.length | ||
| 124 | - "> | 146 | + <div class="grade-box" v-if="teacherDetail.teacherCourseList && teacherDetail.teacherCourseList.length"> |
| 125 | <p class="h-title">任课老师</p> | 147 | <p class="h-title">任课老师</p> |
| 126 | <ul class="grade-info"> | 148 | <ul class="grade-info"> |
| 127 | <li class="grade-li" v-for="item in teacherDetail.teacherCourseList" | 149 | <li class="grade-li" v-for="item in teacherDetail.teacherCourseList" |
| @@ -146,35 +168,6 @@ | @@ -146,35 +168,6 @@ | ||
| 146 | </li> | 168 | </li> |
| 147 | </ul> | 169 | </ul> |
| 148 | </div> | 170 | </div> |
| 149 | - <!-- <div | ||
| 150 | - class="grade-box" | ||
| 151 | - v-if=" | ||
| 152 | - teacherDetail.teacherGradeList && | ||
| 153 | - teacherDetail.teacherGradeList.length | ||
| 154 | - " | ||
| 155 | - > | ||
| 156 | - <p class="h-title">备课组长</p> | ||
| 157 | - <ul | ||
| 158 | - class="grade-info" | ||
| 159 | - v-for="item in teacherDetail.teacherGradeList" | ||
| 160 | - :key="item.grade" | ||
| 161 | - > | ||
| 162 | - <li class="grade-li"> | ||
| 163 | - <el-popconfirm | ||
| 164 | - title="确定删除吗?" | ||
| 165 | - @confirm="delTeacherManager(item, 3)" | ||
| 166 | - v-if="!code" | ||
| 167 | - > | ||
| 168 | - <i class="el-icon-delete" slot="reference"></i> | ||
| 169 | - </el-popconfirm> | ||
| 170 | - <div class="grade-item"> | ||
| 171 | - <p class="grade-name"> | ||
| 172 | - {{ item.gradeName }}({{ item.subjectName }}) | ||
| 173 | - </p> | ||
| 174 | - </div> | ||
| 175 | - </li> | ||
| 176 | - </ul> | ||
| 177 | - </div> --> | ||
| 178 | </div> | 171 | </div> |
| 179 | </div> | 172 | </div> |
| 180 | </div> | 173 | </div> |
| @@ -213,27 +206,29 @@ | @@ -213,27 +206,29 @@ | ||
| 213 | </el-radio-group> | 206 | </el-radio-group> |
| 214 | </el-form-item> | 207 | </el-form-item> |
| 215 | <el-form-item v-show="isAdd || (!isAdd && setTercherType == 2)" label="教师角色:" prop="roleList"> | 208 | <el-form-item v-show="isAdd || (!isAdd && setTercherType == 2)" label="教师角色:" prop="roleList"> |
| 216 | - <div class="role-list" v-for="(item, index) in formTeacher.roleList" :key="item.id"> | ||
| 217 | - <el-select class="sel-c" v-model="item.roleId" placeholder="选择角色" @change="item.classId = []"> | ||
| 218 | - <el-option v-for="item in teacherRoleList" :key="item.value" :label="item.label" :value="item.value"> | ||
| 219 | - </el-option> | ||
| 220 | - </el-select> | ||
| 221 | - <el-cascader size="small" v-if="item.roleId == 6" class="sel-t" collapse clearable placeholder="选择年级-班级" | ||
| 222 | - v-model="item.classId" :options="gradeClassList" :props="{ expandTrigger: 'hover' }"></el-cascader> | ||
| 223 | - <el-cascader size="small" v-if="item.roleId == 7" class="sel-t teacher-cascader" collapse clearable | ||
| 224 | - placeholder="选择年级-科目-班级" v-model="item.classId" :options="gradeSubListClass" | ||
| 225 | - :props="{ expandTrigger: 'hover', multiple: true }" popperClass="cascader-clazz"></el-cascader> | ||
| 226 | - <el-cascader size="small" v-if="item.roleId == 8" class="sel-t" collapse clearable placeholder="选择年级-科目" | ||
| 227 | - v-model="item.classId" :options="gradeList" :props="{ expandTrigger: 'hover' }"></el-cascader> | ||
| 228 | - <el-select v-if="item.roleId == 3" v-model="item.gradeId" placeholder="选择年级"> | ||
| 229 | - <el-option v-for="item in gradeList" :key="item.value" :label="item.label" :value="item.value"> | ||
| 230 | - </el-option> | ||
| 231 | - </el-select> | ||
| 232 | - <i class="el-icon-close" @click="removeRoleList(index)"></i> | 209 | + <div class="role-list-main"> |
| 210 | + <div class="role-list" v-for="(item, index) in formTeacher.roleList" :key="item.id"> | ||
| 211 | + <el-select class="sel-c" v-model="item.roleId" placeholder="选择角色" @change="item.classId = []"> | ||
| 212 | + <el-option v-for="item in teacherRoleList" :key="item.value" :label="item.label" :value="item.value"> | ||
| 213 | + </el-option> | ||
| 214 | + </el-select> | ||
| 215 | + <el-cascader size="small" v-if="item.roleId == 6" class="sel-t" collapse clearable placeholder="选择年级-班级" | ||
| 216 | + v-model="item.classId" :options="gradeClassList" :props="{ expandTrigger: 'hover' }"></el-cascader> | ||
| 217 | + <el-cascader size="small" v-if="item.roleId == 7" class="sel-t teacher-cascader" collapse clearable | ||
| 218 | + placeholder="选择年级-科目-班级" v-model="item.classId" :options="gradeSubListClass" | ||
| 219 | + :props="{ expandTrigger: 'hover', multiple: true }" popperClass="cascader-clazz"></el-cascader> | ||
| 220 | + <el-cascader size="small" v-if="item.roleId == 8" class="sel-t" collapse clearable placeholder="选择年级-科目" | ||
| 221 | + v-model="item.classId" :options="gradeList" :props="{ expandTrigger: 'hover' }"></el-cascader> | ||
| 222 | + <el-select v-if="item.roleId == 3" v-model="item.gradeId" placeholder="选择年级"> | ||
| 223 | + <el-option v-for="item in gradeList" :key="item.value" :label="item.label" :value="item.value"> | ||
| 224 | + </el-option> | ||
| 225 | + </el-select> | ||
| 226 | + <i class="el-icon-close" @click="removeRoleList(index)"></i> | ||
| 227 | + </div> | ||
| 228 | + <p class="add-box"> | ||
| 229 | + <el-button icon="el-icon-plus" @click="addRoleList">添加</el-button> | ||
| 230 | + </p> | ||
| 233 | </div> | 231 | </div> |
| 234 | - <p class="add-box"> | ||
| 235 | - <el-button icon="el-icon-plus" @click="addRoleList">添加</el-button> | ||
| 236 | - </p> | ||
| 237 | </el-form-item> | 232 | </el-form-item> |
| 238 | </el-form> | 233 | </el-form> |
| 239 | <div class="dialog-footer" slot="footer"> | 234 | <div class="dialog-footer" slot="footer"> |
| @@ -338,7 +333,7 @@ export default { | @@ -338,7 +333,7 @@ export default { | ||
| 338 | ], | 333 | ], |
| 339 | sex: [{ required: true, message: "请选择性别", trigger: "blur" }], | 334 | sex: [{ required: true, message: "请选择性别", trigger: "blur" }], |
| 340 | roleList: [ | 335 | roleList: [ |
| 341 | - { required: true, message: "请选择角色信息", trigger: "blur" }, | 336 | + { required: false, message: "请选择角色信息", trigger: "blur" }, |
| 342 | ], | 337 | ], |
| 343 | }, | 338 | }, |
| 344 | 339 | ||
| @@ -549,21 +544,18 @@ export default { | @@ -549,21 +544,18 @@ export default { | ||
| 549 | let ERR_OK = this.formTeacher.roleList.length > 0; | 544 | let ERR_OK = this.formTeacher.roleList.length > 0; |
| 550 | if (ERR_OK) { | 545 | if (ERR_OK) { |
| 551 | let [managerList, teacherCourseList, gradeGroupList] = [[], [], []]; | 546 | let [managerList, teacherCourseList, gradeGroupList] = [[], [], []]; |
| 547 | + console.log(this.formTeacher.roleList) | ||
| 552 | this.formTeacher.roleList.map((item) => { | 548 | this.formTeacher.roleList.map((item) => { |
| 553 | if (item.roleId == 6) { | 549 | if (item.roleId == 6) { |
| 554 | managerList.push({ | 550 | managerList.push({ |
| 555 | classId: item.classId[1], | 551 | classId: item.classId[1], |
| 556 | - className: | ||
| 557 | - this.classList.find((items) => items.value == item.classId[1]) | ||
| 558 | - ?.label || "", | 552 | + className: this.classList.find((items) => items.value == item.classId[1])?.label || "", |
| 559 | }); | 553 | }); |
| 560 | } else if (item.roleId == 7) { | 554 | } else if (item.roleId == 7) { |
| 561 | item.classId.map((clazz) => { | 555 | item.classId.map((clazz) => { |
| 562 | teacherCourseList.push({ | 556 | teacherCourseList.push({ |
| 563 | classId: clazz[2], | 557 | classId: clazz[2], |
| 564 | - className: | ||
| 565 | - this.classList.find((items) => items.value == clazz[2]) | ||
| 566 | - ?.label || "", | 558 | + className: this.classList.find((items) => items.value == clazz[2])?.label || "", |
| 567 | subjectName: clazz[1], | 559 | subjectName: clazz[1], |
| 568 | }); | 560 | }); |
| 569 | }); | 561 | }); |
| @@ -571,17 +563,8 @@ export default { | @@ -571,17 +563,8 @@ export default { | ||
| 571 | else if (item.roleId == 3) { | 563 | else if (item.roleId == 3) { |
| 572 | gradeGroupList.push({ | 564 | gradeGroupList.push({ |
| 573 | grade: item.gradeId | 565 | grade: item.gradeId |
| 574 | - }) | 566 | + }) |
| 575 | } | 567 | } |
| 576 | - // else { | ||
| 577 | - // gradeGroupList.push({ | ||
| 578 | - // grade: item.classId[0], | ||
| 579 | - // gradeName: | ||
| 580 | - // this.gradeList.find((items) => items.id == item.classId[0]) | ||
| 581 | - // ?.label || "", | ||
| 582 | - // subjectName: item.classId[1], | ||
| 583 | - // }); | ||
| 584 | - // } | ||
| 585 | }); | 568 | }); |
| 586 | return { | 569 | return { |
| 587 | managerList, | 570 | managerList, |
| @@ -589,36 +572,29 @@ export default { | @@ -589,36 +572,29 @@ export default { | ||
| 589 | gradeGroupList, | 572 | gradeGroupList, |
| 590 | }; | 573 | }; |
| 591 | } else { | 574 | } else { |
| 592 | - return false; | 575 | + if (this.setTercherType == 2) |
| 576 | + return false; | ||
| 577 | + return true; | ||
| 593 | } | 578 | } |
| 594 | }, | 579 | }, |
| 595 | //教师角色数据转换为form格式数据 | 580 | //教师角色数据转换为form格式数据 |
| 596 | toTeacherForm() { | 581 | toTeacherForm() { |
| 597 | this.formTeacher.roleList = []; | 582 | this.formTeacher.roleList = []; |
| 583 | + //班主任 | ||
| 598 | this.formTeacher.managerList?.map((item) => { | 584 | this.formTeacher.managerList?.map((item) => { |
| 599 | this.formTeacher.roleList.push({ | 585 | this.formTeacher.roleList.push({ |
| 600 | id: randomWord(true, 16, 20), | 586 | id: randomWord(true, 16, 20), |
| 601 | roleId: 6, | 587 | roleId: 6, |
| 602 | - classId: [ | ||
| 603 | - this.classList.find( | ||
| 604 | - (items) => | ||
| 605 | - items.value == item.classId || | ||
| 606 | - items.label.includes(item.className) | ||
| 607 | - )?.grade, | ||
| 608 | - item.classId, | ||
| 609 | - ], | 588 | + classId: [item.grade, item.classId], |
| 610 | }); | 589 | }); |
| 611 | }); | 590 | }); |
| 591 | + //任课老师 | ||
| 612 | let teacherClassId = []; | 592 | let teacherClassId = []; |
| 613 | this.formTeacher.teacherCourseList?.map((item) => { | 593 | this.formTeacher.teacherCourseList?.map((item) => { |
| 614 | teacherClassId.push([ | 594 | teacherClassId.push([ |
| 615 | item.grade, | 595 | item.grade, |
| 616 | item.subjectName, | 596 | item.subjectName, |
| 617 | - this.classList.find( | ||
| 618 | - (items) => | ||
| 619 | - items.value == item.classId || | ||
| 620 | - items.label.includes(item.className) | ||
| 621 | - ).value, | 597 | + this.classList.find((items) => items.value == item.classId).value, |
| 622 | ]); | 598 | ]); |
| 623 | }); | 599 | }); |
| 624 | if (teacherClassId.length) { | 600 | if (teacherClassId.length) { |
| @@ -628,21 +604,25 @@ export default { | @@ -628,21 +604,25 @@ export default { | ||
| 628 | classId: [...teacherClassId], | 604 | classId: [...teacherClassId], |
| 629 | }); | 605 | }); |
| 630 | } | 606 | } |
| 631 | - // this.formTeacher.gradeGroupList?.map((item) => { | ||
| 632 | - // this.formTeacher.roleList.push({ | ||
| 633 | - // id: randomWord(true, 16, 20), | ||
| 634 | - // roleId: 8, | ||
| 635 | - // classId: [ | ||
| 636 | - // this.gradeList.find((items) => items.id == item.classId[0]).id, | ||
| 637 | - // item.subjectName, | ||
| 638 | - // ], | ||
| 639 | - // }); | ||
| 640 | - // }); | 607 | + //年级组长 |
| 608 | + this.formTeacher.teacherGradeList?.map((item) => { | ||
| 609 | + this.formTeacher.roleList.push({ | ||
| 610 | + id: randomWord(true, 16, 20), | ||
| 611 | + roleId: 3, | ||
| 612 | + gradeId: item.grade | ||
| 613 | + }); | ||
| 614 | + }); | ||
| 615 | + console.log(this.formTeacher) | ||
| 641 | }, | 616 | }, |
| 642 | //删除教师角色 | 617 | //删除教师角色 |
| 643 | async delTeacherManager(obj, type) { | 618 | async delTeacherManager(obj, type) { |
| 644 | let query; | 619 | let query; |
| 645 | switch (type) { | 620 | switch (type) { |
| 621 | + case 0: | ||
| 622 | + query = { | ||
| 623 | + garde: obj.grade, | ||
| 624 | + }; | ||
| 625 | + break; | ||
| 646 | case 1: | 626 | case 1: |
| 647 | query = { | 627 | query = { |
| 648 | classId: obj.classId, | 628 | classId: obj.classId, |
| @@ -734,7 +714,8 @@ export default { | @@ -734,7 +714,8 @@ export default { | ||
| 734 | this.query.phone = ""; | 714 | this.query.phone = ""; |
| 735 | this.query.gradeClassSub = []; | 715 | this.query.gradeClassSub = []; |
| 736 | query.type = this.query.type; | 716 | query.type = this.query.type; |
| 737 | - } else { | 717 | + } |
| 718 | + else { | ||
| 738 | query = { ...this.query }; | 719 | query = { ...this.query }; |
| 739 | query.grades = []; | 720 | query.grades = []; |
| 740 | query.classIds = []; | 721 | query.classIds = []; |
| @@ -995,6 +976,7 @@ export default { | @@ -995,6 +976,7 @@ export default { | ||
| 995 | } | 976 | } |
| 996 | 977 | ||
| 997 | .teacher-list { | 978 | .teacher-list { |
| 979 | + | ||
| 998 | width: 240px; | 980 | width: 240px; |
| 999 | 981 | ||
| 1000 | .h-title { | 982 | .h-title { |
| @@ -1122,6 +1104,7 @@ export default { | @@ -1122,6 +1104,7 @@ export default { | ||
| 1122 | font-weight: bold; | 1104 | font-weight: bold; |
| 1123 | line-height: 18px; | 1105 | line-height: 18px; |
| 1124 | padding-bottom: 12px; | 1106 | padding-bottom: 12px; |
| 1107 | + padding-right: 5px; | ||
| 1125 | } | 1108 | } |
| 1126 | 1109 | ||
| 1127 | .grade-class { | 1110 | .grade-class { |
| @@ -1154,10 +1137,15 @@ export default { | @@ -1154,10 +1137,15 @@ export default { | ||
| 1154 | margin-right: 12px; | 1137 | margin-right: 12px; |
| 1155 | } | 1138 | } |
| 1156 | 1139 | ||
| 1140 | +.role-list-main { | ||
| 1141 | + float: left; | ||
| 1142 | +} | ||
| 1143 | + | ||
| 1157 | .role-list { | 1144 | .role-list { |
| 1158 | margin-bottom: 10px; | 1145 | margin-bottom: 10px; |
| 1159 | position: relative; | 1146 | position: relative; |
| 1160 | 1147 | ||
| 1148 | + | ||
| 1161 | .sel-p { | 1149 | .sel-p { |
| 1162 | position: absolute; | 1150 | position: absolute; |
| 1163 | left: 146px; | 1151 | left: 146px; |
src/views/basic/test/archiving.vue
| @@ -7,82 +7,33 @@ | @@ -7,82 +7,33 @@ | ||
| 7 | </back-box> | 7 | </back-box> |
| 8 | <div class="answer-header"> | 8 | <div class="answer-header"> |
| 9 | <div class="sel-box"> | 9 | <div class="sel-box"> |
| 10 | - <el-select | ||
| 11 | - class="sel" | ||
| 12 | - v-model="query.classId" | ||
| 13 | - placeholder="选择班级" | ||
| 14 | - @change="changeclass" | ||
| 15 | - > | ||
| 16 | - <el-option | ||
| 17 | - v-for="item in classList" | ||
| 18 | - :key="item.value" | ||
| 19 | - :label="item.label" | ||
| 20 | - :value="item.value" | ||
| 21 | - > | 10 | + <el-select class="sel" v-model="query.classId" placeholder="选择班级" @change="changeclass"> |
| 11 | + <el-option v-for="item in classList" :key="item.value" :label="item.label" :value="item.value"> | ||
| 22 | </el-option> | 12 | </el-option> |
| 23 | </el-select> | 13 | </el-select> |
| 24 | - <el-select | ||
| 25 | - v-if="role == 'ROLE_BANZHUREN'" | ||
| 26 | - class="sel" | ||
| 27 | - multiple | ||
| 28 | - v-model="query.subjectNames" | ||
| 29 | - placeholder="选择科目" | ||
| 30 | - @change="changeSub" | ||
| 31 | - > | ||
| 32 | - <el-option | ||
| 33 | - v-for="item in subjectList" | ||
| 34 | - :key="item.value" | ||
| 35 | - :label="item.label" | ||
| 36 | - :value="item.value" | ||
| 37 | - > | 14 | + <el-select v-if="role == 'ROLE_BANZHUREN'" class="sel" multiple v-model="query.subjectNames" placeholder="选择科目" |
| 15 | + @change="changeSub"> | ||
| 16 | + <el-option v-for="item in subjectList" :key="item.value" :label="item.label" :value="item.value"> | ||
| 38 | </el-option> | 17 | </el-option> |
| 39 | </el-select> | 18 | </el-select> |
| 40 | - <el-select | ||
| 41 | - v-else | ||
| 42 | - class="sel" | ||
| 43 | - v-model="query.subjectNames" | ||
| 44 | - placeholder="选择科目" | ||
| 45 | - > | ||
| 46 | - <el-option | ||
| 47 | - v-for="item in subjectList" | ||
| 48 | - :key="item.value" | ||
| 49 | - :label="item.label" | ||
| 50 | - :value="item.value" | ||
| 51 | - > | 19 | + <el-select v-else class="sel" v-model="query.subjectNames" placeholder="选择科目"> |
| 20 | + <el-option v-for="item in subjectList" :key="item.value" :label="item.label" :value="item.value"> | ||
| 52 | </el-option> | 21 | </el-option> |
| 53 | </el-select> | 22 | </el-select> |
| 54 | <div class="d1"> | 23 | <div class="d1"> |
| 55 | - <el-date-picker | ||
| 56 | - v-model="query.startDay" | ||
| 57 | - type="date" | ||
| 58 | - @change="handleChangeTimeStart" | ||
| 59 | - placeholder="选择日期时间" | ||
| 60 | - value-format="yyyy-MM-dd" | ||
| 61 | - > | 24 | + <el-date-picker v-model="query.startDay" type="date" @change="handleChangeTimeStart" placeholder="选择日期时间" |
| 25 | + value-format="yyyy-MM-dd"> | ||
| 62 | </el-date-picker> | 26 | </el-date-picker> |
| 63 | ~ | 27 | ~ |
| 64 | - <el-date-picker | ||
| 65 | - v-model="query.endDay" | ||
| 66 | - type="date" | ||
| 67 | - placeholder="选择日期时间" | ||
| 68 | - @change="handleChangeTimeEnd" | ||
| 69 | - value-format="yyyy-MM-dd" | ||
| 70 | - > | 28 | + <el-date-picker v-model="query.endDay" type="date" placeholder="选择日期时间" @change="handleChangeTimeEnd" |
| 29 | + value-format="yyyy-MM-dd"> | ||
| 71 | </el-date-picker> | 30 | </el-date-picker> |
| 72 | </div> | 31 | </div> |
| 73 | <p class="p1"> | 32 | <p class="p1"> |
| 74 | - <span @click="setDate(1)" :class="[date == 1 ? 'active' : '', 's1']" | ||
| 75 | - >今天</span | ||
| 76 | - > | ||
| 77 | - <span @click="setDate(2)" :class="[date == 2 ? 'active' : '', 's1']" | ||
| 78 | - >本周</span | ||
| 79 | - > | ||
| 80 | - <span @click="setDate(3)" :class="[date == 3 ? 'active' : '', 's1']" | ||
| 81 | - >本月</span | ||
| 82 | - > | ||
| 83 | - <span @click="setDate(4)" :class="[date == 4 ? 'active' : '', 's1']" | ||
| 84 | - >本季度</span | ||
| 85 | - > | 33 | + <span @click="setDate(1)" :class="[date == 1 ? 'active' : '', 's1']">今天</span> |
| 34 | + <span @click="setDate(2)" :class="[date == 2 ? 'active' : '', 's1']">本周</span> | ||
| 35 | + <span @click="setDate(3)" :class="[date == 3 ? 'active' : '', 's1']">本月</span> | ||
| 36 | + <span @click="setDate(4)" :class="[date == 4 ? 'active' : '', 's1']">本季度</span> | ||
| 86 | </p> | 37 | </p> |
| 87 | <el-button type="primary" round @click="_QueryData()">筛选</el-button> | 38 | <el-button type="primary" round @click="_QueryData()">筛选</el-button> |
| 88 | </div> | 39 | </div> |
| @@ -104,71 +55,39 @@ | @@ -104,71 +55,39 @@ | ||
| 104 | </el-radio-group> --> | 55 | </el-radio-group> --> |
| 105 | <div v-show="tabIndex == 1" v-loading="loading"> | 56 | <div v-show="tabIndex == 1" v-loading="loading"> |
| 106 | <el-table :data="tableData" border style="width: 100%"> | 57 | <el-table :data="tableData" border style="width: 100%"> |
| 107 | - <el-table-column | ||
| 108 | - prop="title" | ||
| 109 | - label="试卷名称" | ||
| 110 | - fixed | ||
| 111 | - align="center" | ||
| 112 | - ></el-table-column> | ||
| 113 | - <el-table-column | ||
| 114 | - prop="examPaperScore" | ||
| 115 | - label="卷面分" | ||
| 116 | - align="center" | ||
| 117 | - width="68" | ||
| 118 | - ></el-table-column> | ||
| 119 | - <el-table-column prop="answeredNum" label="测验人数" align="center" | ||
| 120 | - ><template slot-scope="scoped">{{ | ||
| 121 | - `${scoped.row.answeredNum}/${scoped.row.classPersonNum}` | ||
| 122 | - }}</template></el-table-column | ||
| 123 | - > | ||
| 124 | - <el-table-column | ||
| 125 | - prop="examStartTime" | ||
| 126 | - label="测验时间" | ||
| 127 | - width="100" | ||
| 128 | - align="center" | ||
| 129 | - ></el-table-column> | ||
| 130 | - <el-table-column prop="avgScore" label="班平均分" align="center" | ||
| 131 | - ><template slot-scope="scoped">{{ | ||
| 132 | - (scoped.row.subjectiveScore == scoped.row.examPaperScore || | ||
| 133 | - scoped.row.answerNum == 0) && | 58 | + <el-table-column prop="title" label="试卷名称" fixed align="center"></el-table-column> |
| 59 | + <el-table-column prop="examPaperScore" label="卷面分" align="center" width="68"></el-table-column> | ||
| 60 | + <el-table-column prop="answeredNum" label="测验人数" align="center"><template slot-scope="scoped">{{ | ||
| 61 | + `${scoped.row.answeredNum}/${scoped.row.classPersonNum}` | ||
| 62 | + }}</template></el-table-column> | ||
| 63 | + <el-table-column prop="examStartTime" label="测验时间" width="100" align="center"></el-table-column> | ||
| 64 | + <el-table-column prop="avgScore" label="班平均分" align="center"><template slot-scope="scoped">{{ | ||
| 65 | + (scoped.row.subjectiveScore == scoped.row.examPaperScore || | ||
| 66 | + scoped.row.answerNum == 0) && | ||
| 134 | scoped.row.recordStatus == 0 | 67 | scoped.row.recordStatus == 0 |
| 135 | - ? "-" | ||
| 136 | - : scoped.row.avgScore | ||
| 137 | - }}</template></el-table-column | ||
| 138 | - > | ||
| 139 | - <el-table-column prop="highestScore" label="班最高分" align="center" | ||
| 140 | - ><template slot-scope="scoped">{{ | ||
| 141 | - (scoped.row.subjectiveScore == scoped.row.examPaperScore || | ||
| 142 | - scoped.row.answerNum == 0) && | 68 | + ? "-" |
| 69 | + : scoped.row.avgScore | ||
| 70 | + }}</template></el-table-column> | ||
| 71 | + <el-table-column prop="highestScore" label="班最高分" align="center"><template slot-scope="scoped">{{ | ||
| 72 | + (scoped.row.subjectiveScore == scoped.row.examPaperScore || | ||
| 73 | + scoped.row.answerNum == 0) && | ||
| 143 | scoped.row.recordStatus == 0 | 74 | scoped.row.recordStatus == 0 |
| 144 | - ? "-" | ||
| 145 | - : scoped.row.highestScore | ||
| 146 | - }}</template></el-table-column | ||
| 147 | - > | ||
| 148 | - <el-table-column prop="lowestScore" label="班最低分" align="center" | ||
| 149 | - ><template slot-scope="scoped">{{ | ||
| 150 | - (scoped.row.subjectiveScore == scoped.row.examPaperScore || | ||
| 151 | - scoped.row.answerNum == 0) && | 75 | + ? "-" |
| 76 | + : scoped.row.highestScore | ||
| 77 | + }}</template></el-table-column> | ||
| 78 | + <el-table-column prop="lowestScore" label="班最低分" align="center"><template slot-scope="scoped">{{ | ||
| 79 | + (scoped.row.subjectiveScore == scoped.row.examPaperScore || | ||
| 80 | + scoped.row.answerNum == 0) && | ||
| 152 | scoped.row.recordStatus == 0 | 81 | scoped.row.recordStatus == 0 |
| 153 | - ? "-" | ||
| 154 | - : scoped.row.lowestScore | ||
| 155 | - }}</template></el-table-column | ||
| 156 | - > | ||
| 157 | - <el-table-column | ||
| 158 | - prop="excellenRate" | ||
| 159 | - label="优秀数(率)" | ||
| 160 | - sortable | ||
| 161 | - align="center" | ||
| 162 | - width="110" | ||
| 163 | - class-name="p0" | ||
| 164 | - ><template slot-scope="scoped"> | ||
| 165 | - <p | ||
| 166 | - v-if=" | ||
| 167 | - (scoped.row.subjectiveScore == scoped.row.examPaperScore || | ||
| 168 | - scoped.row.answerNum == 0) && | ||
| 169 | - scoped.row.arecordStatus == 0 | ||
| 170 | - " | ||
| 171 | - > | 82 | + ? "-" |
| 83 | + : scoped.row.lowestScore | ||
| 84 | + }}</template></el-table-column> | ||
| 85 | + <el-table-column prop="excellenRate" label="优秀数(率)" sortable align="center" width="110" | ||
| 86 | + class-name="p0"><template slot-scope="scoped"> | ||
| 87 | + <p v-if="(scoped.row.subjectiveScore == scoped.row.examPaperScore || | ||
| 88 | + scoped.row.answerNum == 0) && | ||
| 89 | + scoped.row.arecordStatus == 0 | ||
| 90 | + "> | ||
| 172 | "-" | 91 | "-" |
| 173 | </p> | 92 | </p> |
| 174 | <template v-else> | 93 | <template v-else> |
| @@ -177,23 +96,13 @@ | @@ -177,23 +96,13 @@ | ||
| 177 | {{ `(${scoped.row.excellenRate}%)` }} | 96 | {{ `(${scoped.row.excellenRate}%)` }} |
| 178 | </p> | 97 | </p> |
| 179 | </template> | 98 | </template> |
| 180 | - </template></el-table-column | ||
| 181 | - > | ||
| 182 | - <el-table-column | ||
| 183 | - prop="goodRate" | ||
| 184 | - label="良好数(率)" | ||
| 185 | - sortable | ||
| 186 | - align="center" | ||
| 187 | - width="110" | ||
| 188 | - class-name="p0" | ||
| 189 | - ><template slot-scope="scoped"> | ||
| 190 | - <p | ||
| 191 | - v-if=" | ||
| 192 | - (scoped.row.subjectiveScore == scoped.row.examPaperScore || | ||
| 193 | - scoped.row.answerNum == 0) && | ||
| 194 | - scoped.row.arecordStatus == 0 | ||
| 195 | - " | ||
| 196 | - > | 99 | + </template></el-table-column> |
| 100 | + <el-table-column prop="goodRate" label="良好数(率)" sortable align="center" width="110" class-name="p0"><template | ||
| 101 | + slot-scope="scoped"> | ||
| 102 | + <p v-if="(scoped.row.subjectiveScore == scoped.row.examPaperScore || | ||
| 103 | + scoped.row.answerNum == 0) && | ||
| 104 | + scoped.row.arecordStatus == 0 | ||
| 105 | + "> | ||
| 197 | "-" | 106 | "-" |
| 198 | </p> | 107 | </p> |
| 199 | <template v-else> | 108 | <template v-else> |
| @@ -202,23 +111,13 @@ | @@ -202,23 +111,13 @@ | ||
| 202 | {{ `(${scoped.row.goodRate}%)` }} | 111 | {{ `(${scoped.row.goodRate}%)` }} |
| 203 | </p> | 112 | </p> |
| 204 | </template> | 113 | </template> |
| 205 | - </template></el-table-column | ||
| 206 | - > | ||
| 207 | - <el-table-column | ||
| 208 | - prop="passRate" | ||
| 209 | - label="及格数(率)" | ||
| 210 | - sortable | ||
| 211 | - align="center" | ||
| 212 | - width="110" | ||
| 213 | - class-name="p0" | ||
| 214 | - ><template slot-scope="scoped"> | ||
| 215 | - <p | ||
| 216 | - v-if=" | ||
| 217 | - (scoped.row.subjectiveScore == scoped.row.examPaperScore || | ||
| 218 | - scoped.row.answerNum == 0) && | ||
| 219 | - scoped.row.arecordStatus == 0 | ||
| 220 | - " | ||
| 221 | - > | 114 | + </template></el-table-column> |
| 115 | + <el-table-column prop="passRate" label="及格数(率)" sortable align="center" width="110" class-name="p0"><template | ||
| 116 | + slot-scope="scoped"> | ||
| 117 | + <p v-if="(scoped.row.subjectiveScore == scoped.row.examPaperScore || | ||
| 118 | + scoped.row.answerNum == 0) && | ||
| 119 | + scoped.row.arecordStatus == 0 | ||
| 120 | + "> | ||
| 222 | "-" | 121 | "-" |
| 223 | </p> | 122 | </p> |
| 224 | <template v-else> | 123 | <template v-else> |
| @@ -227,23 +126,13 @@ | @@ -227,23 +126,13 @@ | ||
| 227 | {{ `(${scoped.row.passRate}%)` }} | 126 | {{ `(${scoped.row.passRate}%)` }} |
| 228 | </p> | 127 | </p> |
| 229 | </template> | 128 | </template> |
| 230 | - </template></el-table-column | ||
| 231 | - > | ||
| 232 | - <el-table-column | ||
| 233 | - prop="failedRate" | ||
| 234 | - label="不及格数(率)" | ||
| 235 | - sortable | ||
| 236 | - align="center" | ||
| 237 | - width="130" | ||
| 238 | - class-name="p0" | ||
| 239 | - ><template slot-scope="scoped"> | ||
| 240 | - <p | ||
| 241 | - v-if=" | ||
| 242 | - (scoped.row.subjectiveScore == scoped.row.examPaperScore || | ||
| 243 | - scoped.row.answerNum == 0) && | ||
| 244 | - scoped.row.arecordStatus == 0 | ||
| 245 | - " | ||
| 246 | - > | 129 | + </template></el-table-column> |
| 130 | + <el-table-column prop="failedRate" label="不及格数(率)" sortable align="center" width="130" | ||
| 131 | + class-name="p0"><template slot-scope="scoped"> | ||
| 132 | + <p v-if="(scoped.row.subjectiveScore == scoped.row.examPaperScore || | ||
| 133 | + scoped.row.answerNum == 0) && | ||
| 134 | + scoped.row.arecordStatus == 0 | ||
| 135 | + "> | ||
| 247 | "-" | 136 | "-" |
| 248 | </p> | 137 | </p> |
| 249 | <template v-else> | 138 | <template v-else> |
| @@ -252,155 +141,59 @@ | @@ -252,155 +141,59 @@ | ||
| 252 | {{ `(${scoped.row.failedRate}%)` }} | 141 | {{ `(${scoped.row.failedRate}%)` }} |
| 253 | </p> | 142 | </p> |
| 254 | </template> | 143 | </template> |
| 255 | - </template></el-table-column | ||
| 256 | - > | 144 | + </template></el-table-column> |
| 257 | <el-table-column label="操作" align="center"> | 145 | <el-table-column label="操作" align="center"> |
| 258 | <template slot-scope="scoped"> | 146 | <template slot-scope="scoped"> |
| 259 | <el-tooltip effect="dark" content="详情" placement="top"> | 147 | <el-tooltip effect="dark" content="详情" placement="top"> |
| 260 | - <el-button | ||
| 261 | - type="primary" | ||
| 262 | - circle | ||
| 263 | - size="mini" | ||
| 264 | - icon="fa fa-arrow-right" | ||
| 265 | - @click="linkTo(scoped.row)" | ||
| 266 | - ></el-button> | 148 | + <el-button type="primary" circle size="mini" icon="fa fa-arrow-right" |
| 149 | + @click="linkTo(scoped.row)"></el-button> | ||
| 267 | </el-tooltip> | 150 | </el-tooltip> |
| 268 | </template> | 151 | </template> |
| 269 | </el-table-column> | 152 | </el-table-column> |
| 270 | </el-table> | 153 | </el-table> |
| 271 | <div class="pagination-box"> | 154 | <div class="pagination-box"> |
| 272 | - <el-pagination | ||
| 273 | - small="" | ||
| 274 | - layout="total,prev, pager, next" | ||
| 275 | - :hide-on-single-page="true" | ||
| 276 | - :total="total" | ||
| 277 | - @current-change="changePage" | ||
| 278 | - :current-page="page" | ||
| 279 | - :page-size="size" | ||
| 280 | - > | 155 | + <el-pagination small="" layout="total,prev, pager, next" :hide-on-single-page="true" :total="total" |
| 156 | + @current-change="changePage" :current-page="page" :page-size="size"> | ||
| 281 | </el-pagination> | 157 | </el-pagination> |
| 282 | </div> | 158 | </div> |
| 283 | </div> | 159 | </div> |
| 284 | <div v-show="tabIndex == 2" v-loading="loading"> | 160 | <div v-show="tabIndex == 2" v-loading="loading"> |
| 285 | - <el-empty | ||
| 286 | - :image-size="100" | ||
| 287 | - v-if="!tableData.length && loading == false" | ||
| 288 | - description="没有更多数据" | ||
| 289 | - ></el-empty> | 161 | + <el-empty :image-size="100" v-if="!tableData.length && loading == false" description="没有更多数据"></el-empty> |
| 290 | <template v-if="tableData.length && loading == false"> | 162 | <template v-if="tableData.length && loading == false"> |
| 291 | <div id="print-content"> | 163 | <div id="print-content"> |
| 292 | - <el-table | ||
| 293 | - :max-height="tableMaxHeight" | ||
| 294 | - v-if="role == 'ROLE_JIAOSHI'" | ||
| 295 | - :data="tableData" | ||
| 296 | - border | ||
| 297 | - style="width: 100%" | ||
| 298 | - > | ||
| 299 | - <el-table-column | ||
| 300 | - prop="studentCode" | ||
| 301 | - label="学号" | ||
| 302 | - align="center" | ||
| 303 | - fixed | ||
| 304 | - ></el-table-column> | ||
| 305 | - <el-table-column | ||
| 306 | - prop="studentName" | ||
| 307 | - label="姓名" | ||
| 308 | - fixed | ||
| 309 | - align="center" | ||
| 310 | - ></el-table-column> | ||
| 311 | - <el-table-column | ||
| 312 | - align="center" | ||
| 313 | - v-for="(item, index) in answerList" | ||
| 314 | - :key="index" | ||
| 315 | - :label="item.title" | ||
| 316 | - > | ||
| 317 | - <el-table-column | ||
| 318 | - :prop="'score' + index" | ||
| 319 | - :label="index == 0 ? '总分' : '成绩'" | ||
| 320 | - align="center" | ||
| 321 | - :class-name="index % 2 == 0 ? 'bg' : ''" | ||
| 322 | - ></el-table-column> | ||
| 323 | - <el-table-column | ||
| 324 | - :prop="'classRank' + index" | ||
| 325 | - label="班名" | ||
| 326 | - align="center" | ||
| 327 | - :class-name="index % 2 == 0 ? 'bg' : ''" | ||
| 328 | - ></el-table-column> | 164 | + <el-table :max-height="tableMaxHeight" v-if="role == 'ROLE_JIAOSHI'" :data="tableData" border |
| 165 | + style="width: 100%"> | ||
| 166 | + <el-table-column prop="studentCode" label="学号" align="center" fixed></el-table-column> | ||
| 167 | + <el-table-column prop="studentName" label="姓名" fixed align="center"></el-table-column> | ||
| 168 | + <el-table-column align="center" v-for="(item, index) in answerList" :key="index" :label="item.title"> | ||
| 169 | + <el-table-column :prop="'score' + index" :label="index == 0 ? '总分' : '成绩'" align="center" | ||
| 170 | + :class-name="index % 2 == 0 ? 'bg' : ''"></el-table-column> | ||
| 171 | + <el-table-column :prop="'classRank' + index" label="班名" align="center" | ||
| 172 | + :class-name="index % 2 == 0 ? 'bg' : ''"></el-table-column> | ||
| 329 | </el-table-column> | 173 | </el-table-column> |
| 330 | </el-table> | 174 | </el-table> |
| 331 | - <el-table | ||
| 332 | - v-else | ||
| 333 | - :data="tableData" | ||
| 334 | - :max-height="tableMaxHeight" | ||
| 335 | - border | ||
| 336 | - style="width: 100%" | ||
| 337 | - > | ||
| 338 | - <el-table-column | ||
| 339 | - prop="studentCode" | ||
| 340 | - label="学号" | ||
| 341 | - align="center" | ||
| 342 | - fixed | ||
| 343 | - ></el-table-column> | 175 | + <el-table v-else :data="tableData" :max-height="tableMaxHeight" border style="width: 100%"> |
| 176 | + <el-table-column prop="studentCode" label="学号" align="center" fixed></el-table-column> | ||
| 344 | 177 | ||
| 345 | - <el-table-column | ||
| 346 | - prop="studentName" | ||
| 347 | - label="姓名" | ||
| 348 | - fixed | ||
| 349 | - align="center" | ||
| 350 | - ></el-table-column> | ||
| 351 | - <el-table-column | ||
| 352 | - align="center" | ||
| 353 | - v-for="(item, index) in answerList" | ||
| 354 | - :key="index" | ||
| 355 | - :label="item" | ||
| 356 | - > | ||
| 357 | - <el-table-column | ||
| 358 | - :prop="'examCount' + item" | ||
| 359 | - label="测练数" | ||
| 360 | - align="center" | ||
| 361 | - :class-name="index % 2 == 0 ? 'bg' : ''" | ||
| 362 | - ></el-table-column> | ||
| 363 | - <el-table-column | ||
| 364 | - :prop="'participationCount' + item" | ||
| 365 | - label="参与数" | ||
| 366 | - align="center" | ||
| 367 | - :class-name="index % 2 == 0 ? 'bg' : ''" | ||
| 368 | - ></el-table-column> | ||
| 369 | - <el-table-column | ||
| 370 | - :prop="'score' + item" | ||
| 371 | - label="总分" | ||
| 372 | - align="center" | ||
| 373 | - :class-name="index % 2 == 0 ? 'bg' : ''" | ||
| 374 | - ></el-table-column> | ||
| 375 | - <el-table-column | ||
| 376 | - :prop="'classRank' + item" | ||
| 377 | - label="班名" | ||
| 378 | - align="center" | ||
| 379 | - :class-name="index % 2 == 0 ? 'bg' : ''" | ||
| 380 | - ></el-table-column> | 178 | + <el-table-column prop="studentName" label="姓名" fixed align="center"></el-table-column> |
| 179 | + <el-table-column align="center" v-for="(item, index) in answerList" :key="index" :label="item"> | ||
| 180 | + <el-table-column :prop="'examCount' + item" label="测练数" align="center" | ||
| 181 | + :class-name="index % 2 == 0 ? 'bg' : ''"></el-table-column> | ||
| 182 | + <el-table-column :prop="'participationCount' + item" label="参与数" align="center" | ||
| 183 | + :class-name="index % 2 == 0 ? 'bg' : ''"></el-table-column> | ||
| 184 | + <el-table-column :prop="'score' + item" label="总分" align="center" | ||
| 185 | + :class-name="index % 2 == 0 ? 'bg' : ''"></el-table-column> | ||
| 186 | + <el-table-column :prop="'classRank' + item" label="班名" align="center" | ||
| 187 | + :class-name="index % 2 == 0 ? 'bg' : ''"></el-table-column> | ||
| 381 | </el-table-column> | 188 | </el-table-column> |
| 382 | </el-table> | 189 | </el-table> |
| 383 | </div> | 190 | </div> |
| 384 | </template> | 191 | </template> |
| 385 | </div> | 192 | </div> |
| 386 | <p class="down" v-if="tabIndex == 2 && tableData.length"> | 193 | <p class="down" v-if="tabIndex == 2 && tableData.length"> |
| 387 | - <el-button | ||
| 388 | - type="primary" | ||
| 389 | - plain | ||
| 390 | - round | ||
| 391 | - icon="fa fa-cloud-download" | ||
| 392 | - @click="downExl" | ||
| 393 | - >导出报表</el-button | ||
| 394 | - > | ||
| 395 | - <el-button | ||
| 396 | - v-if="!this.$store.getters.code" | ||
| 397 | - @click="print" | ||
| 398 | - type="primary" | ||
| 399 | - plain | ||
| 400 | - round | ||
| 401 | - icon="el-icon-printer" | ||
| 402 | - >打印</el-button | ||
| 403 | - > | 194 | + <el-button type="primary" plain round icon="fa fa-cloud-download" @click="downExl">导出报表</el-button> |
| 195 | + <el-button v-if="!this.$store.getters.code" @click="print" type="primary" plain round | ||
| 196 | + icon="el-icon-printer">打印</el-button> | ||
| 404 | </p> | 197 | </p> |
| 405 | </div> | 198 | </div> |
| 406 | </div> | 199 | </div> |
| @@ -462,7 +255,10 @@ export default { | @@ -462,7 +255,10 @@ export default { | ||
| 462 | }, | 255 | }, |
| 463 | methods: { | 256 | methods: { |
| 464 | print() { | 257 | print() { |
| 465 | - tablePrint("print-content", "即时测-" + this.tabList[this.tabIndex - 1]); | 258 | + tablePrint({ |
| 259 | + id: "print-content", | ||
| 260 | + title: "即时测-" + this.tabList[this.tabIndex - 1] | ||
| 261 | + }); | ||
| 466 | }, | 262 | }, |
| 467 | changeSub(val) { | 263 | changeSub(val) { |
| 468 | //科目改变触发事件 | 264 | //科目改变触发事件 |
| @@ -832,6 +628,7 @@ div::-webkit-scrollbar { | @@ -832,6 +628,7 @@ div::-webkit-scrollbar { | ||
| 832 | width: 3px; | 628 | width: 3px; |
| 833 | height: 10px; | 629 | height: 10px; |
| 834 | } | 630 | } |
| 631 | + | ||
| 835 | div::-webkit-scrollbar-thumb { | 632 | div::-webkit-scrollbar-thumb { |
| 836 | border-radius: 10px; | 633 | border-radius: 10px; |
| 837 | background-color: #ccc; | 634 | background-color: #ccc; |
| @@ -841,25 +638,31 @@ div::-webkit-scrollbar-thumb { | @@ -841,25 +638,31 @@ div::-webkit-scrollbar-thumb { | ||
| 841 | .page-container { | 638 | .page-container { |
| 842 | position: relative; | 639 | position: relative; |
| 843 | height: 100%; | 640 | height: 100%; |
| 641 | + | ||
| 844 | &.active { | 642 | &.active { |
| 845 | overflow: hidden; | 643 | overflow: hidden; |
| 846 | } | 644 | } |
| 847 | } | 645 | } |
| 646 | + | ||
| 848 | .table-box { | 647 | .table-box { |
| 849 | margin: 0 20px; | 648 | margin: 0 20px; |
| 850 | padding: 16px; | 649 | padding: 16px; |
| 851 | background: #f8f8f8; | 650 | background: #f8f8f8; |
| 852 | border-radius: 5px; | 651 | border-radius: 5px; |
| 652 | + | ||
| 853 | :deep(.fa-arrow-right) { | 653 | :deep(.fa-arrow-right) { |
| 854 | padding-left: 2px; | 654 | padding-left: 2px; |
| 855 | } | 655 | } |
| 656 | + | ||
| 856 | :deep(.fa-file-text) { | 657 | :deep(.fa-file-text) { |
| 857 | padding-left: 2px; | 658 | padding-left: 2px; |
| 858 | } | 659 | } |
| 859 | } | 660 | } |
| 661 | + | ||
| 860 | .down { | 662 | .down { |
| 861 | padding-top: 16px; | 663 | padding-top: 16px; |
| 862 | } | 664 | } |
| 665 | + | ||
| 863 | .click-b { | 666 | .click-b { |
| 864 | cursor: pointer; | 667 | cursor: pointer; |
| 865 | color: #409eff; | 668 | color: #409eff; |
src/views/basic/test/components/contrast.vue
| @@ -47,7 +47,8 @@ | @@ -47,7 +47,8 @@ | ||
| 47 | </div> | 47 | </div> |
| 48 | </div> | 48 | </div> |
| 49 | 49 | ||
| 50 | - <el-dialog :append-to-body="true" :close-on-click-modal="false" title="等级设置" :visible.sync="diaLogBox" width="800px" @closed="closeDia"> | 50 | + <el-dialog :append-to-body="true" :close-on-click-modal="false" title="等级设置" :visible.sync="diaLogBox" |
| 51 | + width="800px" @closed="closeDia"> | ||
| 51 | <el-form class="use-form"> | 52 | <el-form class="use-form"> |
| 52 | <el-form-item class="use-form-item-box"> | 53 | <el-form-item class="use-form-item-box"> |
| 53 | <el-form-item label="等级名称:" class="use-form-item"> | 54 | <el-form-item label="等级名称:" class="use-form-item"> |
| @@ -87,8 +88,8 @@ | @@ -87,8 +88,8 @@ | ||
| 87 | <template v-if="fromData.levelType == 0"> | 88 | <template v-if="fromData.levelType == 0"> |
| 88 | ({{ index != 0 ? "不含" : "" | 89 | ({{ index != 0 ? "不含" : "" |
| 89 | }}{{ | 90 | }}{{ |
| 90 | - Number(((item[1] / 100) * examPaperScore).toFixed(1)) | ||
| 91 | -}}分) | 91 | + Number(((item[1] / 100) * examPaperScore).toFixed(1)) |
| 92 | + }}分) | ||
| 92 | </template> | 93 | </template> |
| 93 | <template v-else>{{ index != 0 ? "不含" : "" }}</template> | 94 | <template v-else>{{ index != 0 ? "不含" : "" }}</template> |
| 94 | </p> | 95 | </p> |
| @@ -99,8 +100,8 @@ | @@ -99,8 +100,8 @@ | ||
| 99 | % | 100 | % |
| 100 | <template v-if="fromData.levelType == 0"> | 101 | <template v-if="fromData.levelType == 0"> |
| 101 | ({{ | 102 | ({{ |
| 102 | - Number(((item[2] / 100) * examPaperScore).toFixed(1)) | ||
| 103 | - }}分) | 103 | + Number(((item[2] / 100) * examPaperScore).toFixed(1)) |
| 104 | + }}分) | ||
| 104 | </template> | 105 | </template> |
| 105 | </p> | 106 | </p> |
| 106 | <p class="item"> | 107 | <p class="item"> |
| @@ -177,10 +178,10 @@ export default { | @@ -177,10 +178,10 @@ export default { | ||
| 177 | } | 178 | } |
| 178 | }, | 179 | }, |
| 179 | print() { | 180 | print() { |
| 180 | - tablePrint( | ||
| 181 | - "print-content", | ||
| 182 | - `多班_${this.subjectName}_${this.title}_测练成绩对比分析` | ||
| 183 | - ); | 181 | + tablePrint({ |
| 182 | + id: "print-content", | ||
| 183 | + title: `多班_${this.subjectName}_${this.title}_测练成绩对比分析` | ||
| 184 | + }) | ||
| 184 | }, | 185 | }, |
| 185 | setType(type) { | 186 | setType(type) { |
| 186 | this.tableMaxHeight = this.$refs.main.offsetHeight; | 187 | this.tableMaxHeight = this.$refs.main.offsetHeight; |
src/views/basic/test/components/multipleSubTest.vue
| @@ -2,135 +2,71 @@ | @@ -2,135 +2,71 @@ | ||
| 2 | <div class="table-box" ref="main" v-loading="loading"> | 2 | <div class="table-box" ref="main" v-loading="loading"> |
| 3 | <div id="print-content"> | 3 | <div id="print-content"> |
| 4 | <!-- 多科多卷 --> | 4 | <!-- 多科多卷 --> |
| 5 | - <el-table | ||
| 6 | - :data="tableData" | ||
| 7 | - :max-height="tableMaxHeight" | ||
| 8 | - border | ||
| 9 | - style="width: 100%" | ||
| 10 | - > | ||
| 11 | - <el-table-column | ||
| 12 | - prop="studentCode" | ||
| 13 | - label="学号" | ||
| 14 | - align="center" | ||
| 15 | - fixed | ||
| 16 | - ></el-table-column> | 5 | + <el-table :data="tableData" :max-height="tableMaxHeight" border style="width: 100%"> |
| 6 | + <el-table-column prop="studentCode" label="学号" align="center" fixed></el-table-column> | ||
| 17 | 7 | ||
| 18 | <el-table-column prop="studentName" label="姓名" fixed align="center"> | 8 | <el-table-column prop="studentName" label="姓名" fixed align="center"> |
| 19 | - <template slot-scope="scoped" | ||
| 20 | - ><span class="click-b" @click="toPortrait(scoped.row)"> | 9 | + <template slot-scope="scoped"><span class="click-b" @click="toPortrait(scoped.row)"> |
| 21 | {{ scoped.row.studentName }} | 10 | {{ scoped.row.studentName }} |
| 22 | - </span></template | ||
| 23 | - > | 11 | + </span></template> |
| 24 | </el-table-column> | 12 | </el-table-column> |
| 25 | - <el-table-column | ||
| 26 | - align="center" | ||
| 27 | - v-for="(item, index) in answerList" | ||
| 28 | - :key="index" | ||
| 29 | - :label="item" | ||
| 30 | - > | ||
| 31 | - <el-table-column | ||
| 32 | - :prop="'examCount' + item" | ||
| 33 | - label="测练数" | ||
| 34 | - align="center" | ||
| 35 | - :class-name="index % 2 == 0 ? 'bg' : ''" | ||
| 36 | - > | 13 | + <el-table-column align="center" v-for="(item, index) in answerList" :key="index" :label="item"> |
| 14 | + <el-table-column :prop="'examCount' + item" label="测练数" align="center" | ||
| 15 | + :class-name="index % 2 == 0 ? 'bg' : ''"> | ||
| 37 | <template slot-scope="scoped">{{ | 16 | <template slot-scope="scoped">{{ |
| 38 | - scoped.row["examCount" + item] || | ||
| 39 | - Number(scoped.row["examCount" + item]) === 0 | ||
| 40 | - ? scoped.row["examCount" + item] | ||
| 41 | - : "-" | ||
| 42 | - }}</template> | 17 | + scoped.row["examCount" + item] || |
| 18 | + Number(scoped.row["examCount" + item]) === 0 | ||
| 19 | + ? scoped.row["examCount" + item] | ||
| 20 | + : "-" | ||
| 21 | + }}</template> | ||
| 43 | </el-table-column> | 22 | </el-table-column> |
| 44 | - <el-table-column | ||
| 45 | - :prop="'participationCount' + item" | ||
| 46 | - label="参与数" | ||
| 47 | - align="center" | ||
| 48 | - :class-name="index % 2 == 0 ? 'bg' : ''" | ||
| 49 | - > | 23 | + <el-table-column :prop="'participationCount' + item" label="参与数" align="center" |
| 24 | + :class-name="index % 2 == 0 ? 'bg' : ''"> | ||
| 50 | <template slot-scope="scoped">{{ | 25 | <template slot-scope="scoped">{{ |
| 51 | - scoped.row["participationCount" + item] || | ||
| 52 | - Number(scoped.row["participationCount" + item]) === 0 | ||
| 53 | - ? scoped.row["participationCount" + item] | ||
| 54 | - : "-" | ||
| 55 | - }}</template> | 26 | + scoped.row["participationCount" + item] || |
| 27 | + Number(scoped.row["participationCount" + item]) === 0 | ||
| 28 | + ? scoped.row["participationCount" + item] | ||
| 29 | + : "-" | ||
| 30 | + }}</template> | ||
| 56 | </el-table-column> | 31 | </el-table-column> |
| 57 | - <el-table-column | ||
| 58 | - :prop="'score' + item" | ||
| 59 | - label="总分" | ||
| 60 | - align="center" | ||
| 61 | - :class-name="index % 2 == 0 ? 'bg' : ''" | ||
| 62 | - > | 32 | + <el-table-column :prop="'score' + item" label="总分" align="center" :class-name="index % 2 == 0 ? 'bg' : ''"> |
| 63 | <template slot-scope="scoped">{{ | 33 | <template slot-scope="scoped">{{ |
| 64 | - scoped.row["score" + item] || | ||
| 65 | - Number(scoped.row["score" + item]) === 0 | ||
| 66 | - ? scoped.row["score" + item] | ||
| 67 | - : "-" | ||
| 68 | - }}</template> | 34 | + scoped.row["score" + item] || |
| 35 | + Number(scoped.row["score" + item]) === 0 | ||
| 36 | + ? scoped.row["score" + item] | ||
| 37 | + : "-" | ||
| 38 | + }}</template> | ||
| 69 | </el-table-column> | 39 | </el-table-column> |
| 70 | - <el-table-column | ||
| 71 | - :prop="'classRank' + item" | ||
| 72 | - label="班名" | ||
| 73 | - align="center" | ||
| 74 | - :class-name="index % 2 == 0 ? 'bg' : ''" | ||
| 75 | - > | 40 | + <el-table-column :prop="'classRank' + item" label="班名" align="center" |
| 41 | + :class-name="index % 2 == 0 ? 'bg' : ''"> | ||
| 76 | <template slot-scope="scoped">{{ | 42 | <template slot-scope="scoped">{{ |
| 77 | - scoped.row["classRank" + item] || | ||
| 78 | - Number(scoped.row["classRank" + item]) === 0 | ||
| 79 | - ? scoped.row["classRank" + item] | ||
| 80 | - : "-" | ||
| 81 | - }}</template> | 43 | + scoped.row["classRank" + item] || |
| 44 | + Number(scoped.row["classRank" + item]) === 0 | ||
| 45 | + ? scoped.row["classRank" + item] | ||
| 46 | + : "-" | ||
| 47 | + }}</template> | ||
| 82 | </el-table-column> | 48 | </el-table-column> |
| 83 | </el-table-column> | 49 | </el-table-column> |
| 84 | <el-table-column label="查看雷达图" align="center"> | 50 | <el-table-column label="查看雷达图" align="center"> |
| 85 | <template slot-scope="scoped"> | 51 | <template slot-scope="scoped"> |
| 86 | - <el-button | ||
| 87 | - @click="openChart(scoped.row)" | ||
| 88 | - type="primary" | ||
| 89 | - size="mini" | ||
| 90 | - circle | ||
| 91 | - icon="el-icon-arrow-right" | ||
| 92 | - ></el-button> | 52 | + <el-button @click="openChart(scoped.row)" type="primary" size="mini" circle |
| 53 | + icon="el-icon-arrow-right"></el-button> | ||
| 93 | </template> | 54 | </template> |
| 94 | </el-table-column> | 55 | </el-table-column> |
| 95 | </el-table> | 56 | </el-table> |
| 96 | </div> | 57 | </div> |
| 97 | <div class="down"> | 58 | <div class="down"> |
| 98 | - <el-button | ||
| 99 | - @click="openDown" | ||
| 100 | - type="primary" | ||
| 101 | - plain | ||
| 102 | - round | ||
| 103 | - icon="fa fa-cloud-download" | ||
| 104 | - >导出报表</el-button | ||
| 105 | - > | ||
| 106 | - <el-button | ||
| 107 | - v-if="!this.$store.getters.code" | ||
| 108 | - @click="print" | ||
| 109 | - type="primary" | ||
| 110 | - plain | ||
| 111 | - round | ||
| 112 | - icon="el-icon-printer" | ||
| 113 | - >打印</el-button | ||
| 114 | - > | 59 | + <el-button @click="openDown" type="primary" plain round icon="fa fa-cloud-download">导出报表</el-button> |
| 60 | + <el-button v-if="!this.$store.getters.code" @click="print" type="primary" plain round | ||
| 61 | + icon="el-icon-printer">打印</el-button> | ||
| 115 | </div> | 62 | </div> |
| 116 | - <el-dialog :append-to-body="true" | ||
| 117 | - class="chart-dia" | ||
| 118 | - :visible.sync="chartDia" | ||
| 119 | - :title="chartTitle" | ||
| 120 | - width="800" | ||
| 121 | - > | 63 | + <el-dialog :append-to-body="true" class="chart-dia" :visible.sync="chartDia" :title="chartTitle" width="800"> |
| 122 | <div class="chart-box"> | 64 | <div class="chart-box"> |
| 123 | <RadarChart id="radarChart" :params="chartData" /> | 65 | <RadarChart id="radarChart" :params="chartData" /> |
| 124 | </div> | 66 | </div> |
| 125 | </el-dialog> | 67 | </el-dialog> |
| 126 | - <ExportDia | ||
| 127 | - :exportStudent="exportStudent" | ||
| 128 | - :diaShow="diaShow" | ||
| 129 | - @cancel="cancel" | ||
| 130 | - @exportData="exportData" | ||
| 131 | - lastLabel="总分" | ||
| 132 | - type="雷达图" | ||
| 133 | - /> | 68 | + <ExportDia :exportStudent="exportStudent" :diaShow="diaShow" @cancel="cancel" @exportData="exportData" |
| 69 | + lastLabel="总分" type="雷达图" /> | ||
| 134 | </div> | 70 | </div> |
| 135 | </template> | 71 | </template> |
| 136 | <script> | 72 | <script> |
| @@ -188,7 +124,10 @@ export default { | @@ -188,7 +124,10 @@ export default { | ||
| 188 | }, | 124 | }, |
| 189 | methods: { | 125 | methods: { |
| 190 | print() { | 126 | print() { |
| 191 | - tablePrint("print-content", this.subjectName + "汇总报表"); | 127 | + tablePrint({ |
| 128 | + id: "print-content", | ||
| 129 | + title: this.subjectName + "汇总报表" | ||
| 130 | + }) | ||
| 192 | }, | 131 | }, |
| 193 | toPortrait(obj) { | 132 | toPortrait(obj) { |
| 194 | //暂时不上线 | 133 | //暂时不上线 |
src/views/basic/test/components/multipleTest.vue
| @@ -91,7 +91,10 @@ export default { | @@ -91,7 +91,10 @@ export default { | ||
| 91 | }, | 91 | }, |
| 92 | methods: { | 92 | methods: { |
| 93 | print() { | 93 | print() { |
| 94 | - tablePrint("print-content", this.subjectName + "汇总报表"); | 94 | + tablePrint({ |
| 95 | + id: "print-content", | ||
| 96 | + title: this.subjectName + "汇总报表" | ||
| 97 | + }) | ||
| 95 | }, | 98 | }, |
| 96 | //查看折线图 | 99 | //查看折线图 |
| 97 | openChart(obj) { | 100 | openChart(obj) { |
src/views/basic/test/components/scoreSet.vue
| @@ -43,7 +43,7 @@ | @@ -43,7 +43,7 @@ | ||
| 43 | </template> | 43 | </template> |
| 44 | </el-table-column> | 44 | </el-table-column> |
| 45 | <!-- <el-table-column v-for="(item, index) in questionList" :key="index" :label="'第' + cNum[index] + '大题'" --> | 45 | <!-- <el-table-column v-for="(item, index) in questionList" :key="index" :label="'第' + cNum[index] + '大题'" --> |
| 46 | - <el-table-column v-for="(question, index) in questionList" :key="index" :label="'Q' + question.questionId" | 46 | + <el-table-column v-for="(question, index) in questionList" :key="index" :label="'Q' + question.questionIndex" |
| 47 | align="center"> | 47 | align="center"> |
| 48 | <template slot-scope="scoped"> | 48 | <template slot-scope="scoped"> |
| 49 | <el-input v-if="showSetScore" type="number" :min="0" :max="question.questionScore" @input="setScore( | 49 | <el-input v-if="showSetScore" type="number" :min="0" :max="question.questionScore" @input="setScore( |
| @@ -174,11 +174,13 @@ export default { | @@ -174,11 +174,13 @@ export default { | ||
| 174 | this.tableMaxHeight = this.$refs.scoreSet.offsetHeight - 135; | 174 | this.tableMaxHeight = this.$refs.scoreSet.offsetHeight - 135; |
| 175 | }, | 175 | }, |
| 176 | async _QueryData() { | 176 | async _QueryData() { |
| 177 | + | ||
| 177 | this.loading = true; | 178 | this.loading = true; |
| 178 | const { data, status, info } = | 179 | const { data, status, info } = |
| 179 | await this.$request.listStudentsAndQuestions({ | 180 | await this.$request.listStudentsAndQuestions({ |
| 180 | examId: this.id, | 181 | examId: this.id, |
| 181 | }); | 182 | }); |
| 183 | + | ||
| 182 | this.loading = false; | 184 | this.loading = false; |
| 183 | if (status === 0) { | 185 | if (status === 0) { |
| 184 | this.dataReponse = data; | 186 | this.dataReponse = data; |
| @@ -186,14 +188,18 @@ export default { | @@ -186,14 +188,18 @@ export default { | ||
| 186 | this.questionList = this.dataReponse?.questionList || []; | 188 | this.questionList = this.dataReponse?.questionList || []; |
| 187 | if (this.questionList.length == 0) { | 189 | if (this.questionList.length == 0) { |
| 188 | this.questionList = Object.keys(studentList[0].scoreMap).map( | 190 | this.questionList = Object.keys(studentList[0].scoreMap).map( |
| 189 | - (item) => { | 191 | + (item) => { |
| 192 | + var splitItem = item.split('='); | ||
| 190 | return { | 193 | return { |
| 191 | - questionId: item, | 194 | + questionIndex: splitItem.length >= 1 ? splitItem[0] : null, |
| 195 | + questionId: splitItem.length >= 1 ? splitItem[1] : null, | ||
| 196 | + // questionId: item, | ||
| 192 | questionScore: 20, | 197 | questionScore: 20, |
| 193 | }; | 198 | }; |
| 194 | } | 199 | } |
| 195 | - ); | 200 | + ); |
| 196 | } | 201 | } |
| 202 | + | ||
| 197 | this.tableData = | 203 | this.tableData = |
| 198 | studentList.map((item) => { | 204 | studentList.map((item) => { |
| 199 | item.all = item.all || 0; //总分 | 205 | item.all = item.all || 0; //总分 |
| @@ -249,8 +255,7 @@ export default { | @@ -249,8 +255,7 @@ export default { | ||
| 249 | } else { | 255 | } else { |
| 250 | this.$message.error(info); | 256 | this.$message.error(info); |
| 251 | } | 257 | } |
| 252 | - }, | ||
| 253 | - | 258 | + }, |
| 254 | //导入成功 | 259 | //导入成功 |
| 255 | upSuccess(res) { | 260 | upSuccess(res) { |
| 256 | 261 | ||
| @@ -265,30 +270,30 @@ export default { | @@ -265,30 +270,30 @@ export default { | ||
| 265 | item.object = 0; //客观题分数 | 270 | item.object = 0; //客观题分数 |
| 266 | item.subject = 0; //主观题分数 | 271 | item.subject = 0; //主观题分数 |
| 267 | var detail = JSON.parse(res.data[item.studentId]); | 272 | var detail = JSON.parse(res.data[item.studentId]); |
| 268 | - | 273 | + |
| 269 | var scoreMap = {}; | 274 | var scoreMap = {}; |
| 270 | - | 275 | + |
| 271 | if (detail) { | 276 | if (detail) { |
| 272 | detail.forEach(item => { | 277 | detail.forEach(item => { |
| 273 | scoreMap[item.id] = item.score | 278 | scoreMap[item.id] = item.score |
| 274 | }) | 279 | }) |
| 275 | - } | 280 | + } |
| 276 | 281 | ||
| 277 | item.scoreMap = scoreMap; | 282 | item.scoreMap = scoreMap; |
| 278 | - | 283 | + |
| 279 | this.questionList.map((question) => { | 284 | this.questionList.map((question) => { |
| 280 | - let keys = question.questionId; | ||
| 281 | - if (!item.scoreMap[keys]) { | ||
| 282 | - if (item.scoreMap[keys] == 0) { | ||
| 283 | - item.scoreMap[keys] = 0; | ||
| 284 | - } else { | ||
| 285 | - item.scoreMap[keys] = ""; | ||
| 286 | - } | 285 | + let keys = question.questionId; |
| 286 | + if (!item.scoreMap[keys]) { | ||
| 287 | + if (item.scoreMap[keys] == 0) { | ||
| 288 | + item.scoreMap[keys] = 0; | ||
| 287 | } else { | 289 | } else { |
| 288 | - let num = Number(item.scoreMap[keys]); | ||
| 289 | - item.scoreMap[keys] = num; | 290 | + item.scoreMap[keys] = ""; |
| 290 | } | 291 | } |
| 291 | - }); | 292 | + } else { |
| 293 | + let num = Number(item.scoreMap[keys]); | ||
| 294 | + item.scoreMap[keys] = num; | ||
| 295 | + } | ||
| 296 | + }); | ||
| 292 | 297 | ||
| 293 | return item; | 298 | return item; |
| 294 | }) || []; | 299 | }) || []; |
src/views/examinationPaper/add.vue
| @@ -9,25 +9,26 @@ | @@ -9,25 +9,26 @@ | ||
| 9 | <div class="content"> | 9 | <div class="content"> |
| 10 | <el-dialog :close-on-click-modal="false" title="选择班级分享" :visible.sync="classSharingType" width="800" | 10 | <el-dialog :close-on-click-modal="false" title="选择班级分享" :visible.sync="classSharingType" width="800" |
| 11 | :modal-append-to-body="false" :append-to-body="true"> | 11 | :modal-append-to-body="false" :append-to-body="true"> |
| 12 | - <div> | 12 | + <div :key="classSharingType"> |
| 13 | <el-row class="row-subfix"> | 13 | <el-row class="row-subfix"> |
| 14 | <div class="row-line"> | 14 | <div class="row-line"> |
| 15 | <span class="line-subfix">年级:</span> | 15 | <span class="line-subfix">年级:</span> |
| 16 | <span class="line-value">{{ gradeName }}</span> | 16 | <span class="line-value">{{ gradeName }}</span> |
| 17 | </div> | 17 | </div> |
| 18 | </el-row> | 18 | </el-row> |
| 19 | - <el-row class="row-subfix" style="margin-top: 20px;"> | 19 | + <el-row v-if="shareClass.length >= 1" class="row-subfix" style="margin-top: 20px;"> |
| 20 | <span class="line-subfix" style="float: left;">班级:</span> | 20 | <span class="line-subfix" style="float: left;">班级:</span> |
| 21 | <div class="row-line" style="float: left; | 21 | <div class="row-line" style="float: left; |
| 22 | background:rgb(245,247,250);padding:15px 10px;width: calc(100% - 80px);border-radius:5px;"> | 22 | background:rgb(245,247,250);padding:15px 10px;width: calc(100% - 80px);border-radius:5px;"> |
| 23 | <span class="line-value" style="min-height: 300px;border-radius: 4px; background: rgb(247,247,250);"> | 23 | <span class="line-value" style="min-height: 300px;border-radius: 4px; background: rgb(247,247,250);"> |
| 24 | <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | 24 | <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" |
| 25 | @change="handleCheckAllChange">全选</el-checkbox> | 25 | @change="handleCheckAllChange">全选</el-checkbox> |
| 26 | - <el-checkbox-group v-model="checkedClass" style="margin-top: 15px;" @change="handleCheckedClassChange"> | ||
| 27 | - <el-checkbox v-for="(item, index) in shareClass" :label="item.id" :key="item.id"> | 26 | + <div> |
| 27 | + <el-checkbox @change="handleCheckedClassChange" v-model="item.isChecked" :key="index" | ||
| 28 | + v-for="(item, index) in shareClass" :label="item.id"> | ||
| 28 | {{ item.className }} | 29 | {{ item.className }} |
| 29 | </el-checkbox> | 30 | </el-checkbox> |
| 30 | - </el-checkbox-group> | 31 | + </div> |
| 31 | </span> | 32 | </span> |
| 32 | </div> | 33 | </div> |
| 33 | </el-row> | 34 | </el-row> |
| @@ -252,7 +253,7 @@ | @@ -252,7 +253,7 @@ | ||
| 252 | <el-dialog :close-on-click-modal="false" title="添加大题" :append-to-body="true" | 253 | <el-dialog :close-on-click-modal="false" title="添加大题" :append-to-body="true" |
| 253 | :visible.sync="addQuestionVisible" width="600px"> | 254 | :visible.sync="addQuestionVisible" width="600px"> |
| 254 | <div class="dia-content"> | 255 | <div class="dia-content"> |
| 255 | - <el-form ref="form" :model="questionForm" :rules="questionFormRules" label-width="100px"> | 256 | + <el-form ref="form" :model="questionForm" :rules="questionFormRules" label-width="150px"> |
| 256 | <el-form-item label="标题:"> | 257 | <el-form-item label="标题:"> |
| 257 | <el-col :span="20"> | 258 | <el-col :span="20"> |
| 258 | <el-input v-model.trim="questionForm.questionTitle" maxlength="30" placeholder="输入大题名称"></el-input> | 259 | <el-input v-model.trim="questionForm.questionTitle" maxlength="30" placeholder="输入大题名称"></el-input> |
| @@ -354,7 +355,7 @@ | @@ -354,7 +355,7 @@ | ||
| 354 | <p class="name">{{ form.title }}</p> | 355 | <p class="name">{{ form.title }}</p> |
| 355 | <p class="totals">卷面总分:{{ allScore }}分</p> | 356 | <p class="totals">卷面总分:{{ allScore }}分</p> |
| 356 | </div> | 357 | </div> |
| 357 | - <div class="question-box" v-for="(question, index) in form.questionList" :key="index"> | 358 | + <div class="question-box flex-content" v-for="(question, index) in form.questionList" :key="index"> |
| 358 | <p class="question-title"> | 359 | <p class="question-title"> |
| 359 | <span>{{ setBigNum(index) }}、</span> | 360 | <span>{{ setBigNum(index) }}、</span> |
| 360 | <span class="title-txt">{{ question.questionTitle }}</span> | 361 | <span class="title-txt">{{ question.questionTitle }}</span> |
| @@ -374,7 +375,7 @@ | @@ -374,7 +375,7 @@ | ||
| 374 | <div class="qs-options qs-options2">选项设置</div> | 375 | <div class="qs-options qs-options2">选项设置</div> |
| 375 | <div class="qs-upload" v-if="isUpload">题干</div> | 376 | <div class="qs-upload" v-if="isUpload">题干</div> |
| 376 | <div class="qs-upload" v-if="isUpload">题目解析</div> | 377 | <div class="qs-upload" v-if="isUpload">题目解析</div> |
| 377 | - <div class="qs-upload" v-if="isUpload">知识点</div> | 378 | + <div class="qs-upload">知识点</div> |
| 378 | <div class="qs-set">操作</div> | 379 | <div class="qs-set">操作</div> |
| 379 | </li> | 380 | </li> |
| 380 | <li v-for="(subQuestions, indexs) in question.subQuestions" :key="indexs"> | 381 | <li v-for="(subQuestions, indexs) in question.subQuestions" :key="indexs"> |
| @@ -446,11 +447,11 @@ | @@ -446,11 +447,11 @@ | ||
| 446 | <el-button slot="reference" class="icon-tickets" type="primary" circle size="mini" | 447 | <el-button slot="reference" class="icon-tickets" type="primary" circle size="mini" |
| 447 | icon="el-icon-tickets" @click="openStem(subQuestions, index, indexs, 2)"></el-button> | 448 | icon="el-icon-tickets" @click="openStem(subQuestions, index, indexs, 2)"></el-button> |
| 448 | </div> | 449 | </div> |
| 449 | - <div class="qs-upload"> | ||
| 450 | - <el-button type="primary" circle size="mini" icon="el-icon-price-tag" | ||
| 451 | - @click="openKnowledge(subQuestions, index, indexs)"></el-button> | ||
| 452 | - </div> | ||
| 453 | </template> | 450 | </template> |
| 451 | + <div class="qs-upload"> | ||
| 452 | + <el-button type="primary" circle size="mini" icon="el-icon-price-tag" | ||
| 453 | + @click="openKnowledge(subQuestions, index, indexs)"></el-button> | ||
| 454 | + </div> | ||
| 454 | <div class="qs-set"> | 455 | <div class="qs-set"> |
| 455 | <el-popconfirm title="确定删除这道题吗?" @confirm="delTabData(indexs, index)"> | 456 | <el-popconfirm title="确定删除这道题吗?" @confirm="delTabData(indexs, index)"> |
| 456 | <el-button slot="reference" class="delete" type="danger" size="mini" circle | 457 | <el-button slot="reference" class="delete" type="danger" size="mini" circle |
| @@ -508,16 +509,26 @@ | @@ -508,16 +509,26 @@ | ||
| 508 | <el-button @click="diaSetAns = false">取 消</el-button> | 509 | <el-button @click="diaSetAns = false">取 消</el-button> |
| 509 | </div> | 510 | </div> |
| 510 | </el-dialog> | 511 | </el-dialog> |
| 511 | - <div class="btn-box"> | ||
| 512 | - <el-button type="danger" plain round @click="linkBack">取消</el-button> | ||
| 513 | - <template v-if="!isUpload"> | ||
| 514 | - <el-button round @click="toStep(1)">上一步</el-button> | ||
| 515 | - <el-button type="primary" round @click="save">保存</el-button> | ||
| 516 | - </template> | ||
| 517 | - <template v-else> | ||
| 518 | - <el-button round @click="step = 0">上一步</el-button> | ||
| 519 | - <el-button type="primary" round @click="toStep(3)">下一步</el-button> | ||
| 520 | - </template> | 512 | + <div class="btn-box flex-btn" style="text-align: center; "> |
| 513 | + <div style="display: inline-block;line-height: 45px;"> | ||
| 514 | + <label>请仔细核对 | ||
| 515 | + <label style="color:red;">“题型” </label> | ||
| 516 | + 和 | ||
| 517 | + <label style="color:red;">“答案”</label> | ||
| 518 | + 等是否识别正确 | ||
| 519 | + </label> | ||
| 520 | + </div> | ||
| 521 | + <div style="display: inline;;float: right"> | ||
| 522 | + <el-button type="danger" plain round @click="linkBack">取消</el-button> | ||
| 523 | + <template v-if="!isUpload"> | ||
| 524 | + <el-button round @click="toStep(1)">上一步</el-button> | ||
| 525 | + <el-button type="primary" round @click="save">保存</el-button> | ||
| 526 | + </template> | ||
| 527 | + <template v-else> | ||
| 528 | + <el-button round @click="step = 0">上一步</el-button> | ||
| 529 | + <el-button type="primary" round @click="toStep(3)">下一步</el-button> | ||
| 530 | + </template> | ||
| 531 | + </div> | ||
| 521 | </div> | 532 | </div> |
| 522 | </div> | 533 | </div> |
| 523 | <div v-if="step == 3"> | 534 | <div v-if="step == 3"> |
| @@ -525,7 +536,7 @@ | @@ -525,7 +536,7 @@ | ||
| 525 | <p class="name">{{ form.title }}</p> | 536 | <p class="name">{{ form.title }}</p> |
| 526 | <p class="totals">卷面总分:{{ allScore }}分</p> | 537 | <p class="totals">卷面总分:{{ allScore }}分</p> |
| 527 | </div> | 538 | </div> |
| 528 | - <div class="question-box"> | 539 | + <div class="question-box flex-content" > |
| 529 | <template v-for="(question, index) in form.questionList"> | 540 | <template v-for="(question, index) in form.questionList"> |
| 530 | <p class="question-title"> | 541 | <p class="question-title"> |
| 531 | <span>{{ setBigNum(index) }}、</span> | 542 | <span>{{ setBigNum(index) }}、</span> |
| @@ -540,7 +551,7 @@ | @@ -540,7 +551,7 @@ | ||
| 540 | </div> | 551 | </div> |
| 541 | </template> | 552 | </template> |
| 542 | </div> | 553 | </div> |
| 543 | - <div class="btn-box"> | 554 | + <div class="btn-box flex-btn"> |
| 544 | <el-button type="danger" plain round @click="linkBack">取消</el-button> | 555 | <el-button type="danger" plain round @click="linkBack">取消</el-button> |
| 545 | <el-button round @click="toStep(2)">上一步</el-button> | 556 | <el-button round @click="toStep(2)">上一步</el-button> |
| 546 | <el-button type="primary" round @click="save">保存</el-button> | 557 | <el-button type="primary" round @click="save">保存</el-button> |
| @@ -569,20 +580,9 @@ | @@ -569,20 +580,9 @@ | ||
| 569 | </div> | 580 | </div> |
| 570 | </el-dialog> | 581 | </el-dialog> |
| 571 | <el-dialog :close-on-click-modal="false" :append-to-body="true" title="知识点" :visible.sync="dialogKnowledge" | 582 | <el-dialog :close-on-click-modal="false" :append-to-body="true" title="知识点" :visible.sync="dialogKnowledge" |
| 572 | - width="1200px"> | ||
| 573 | - <div> | ||
| 574 | - <el-form ref="form" :model="stem" label-width="160px"> | ||
| 575 | - <el-form-item label="知识点:"> | ||
| 576 | - <el-cascader size="small" filterable :show-all-levels="false" collapse clearable placeholder="选择知识点" | ||
| 577 | - v-model="stem.knowledge" :options="knowledgeData" | ||
| 578 | - :props="{ expandTrigger: 'hover', multiple: true }"></el-cascader> | ||
| 579 | - </el-form-item> | ||
| 580 | - </el-form> | ||
| 581 | - </div> | ||
| 582 | - <div slot="footer"> | ||
| 583 | - <el-button @click="dialogKnowledge = false">取 消</el-button> | ||
| 584 | - <el-button type="primary" @click="setKnowledge">确 定</el-button> | ||
| 585 | - </div> | 583 | + width="60%"> |
| 584 | + <knowledgePoints :key="dialogKnowledge" @opration="knowledgeOpration" :sectionName="stem.sectionName" | ||
| 585 | + :subjectName="stem.subjectName" :knowledges="stem.knowledge" /> | ||
| 586 | </el-dialog> | 586 | </el-dialog> |
| 587 | </div> | 587 | </div> |
| 588 | </div> | 588 | </div> |
| @@ -590,6 +590,7 @@ | @@ -590,6 +590,7 @@ | ||
| 590 | 590 | ||
| 591 | <script> | 591 | <script> |
| 592 | import { deepClone, checkAnswer, cNum } from "utils"; | 592 | import { deepClone, checkAnswer, cNum } from "utils"; |
| 593 | +import conf from "@/config/index"; | ||
| 593 | const questionForm = { | 594 | const questionForm = { |
| 594 | questionTitle: "", | 595 | questionTitle: "", |
| 595 | questionType: 2, | 596 | questionType: 2, |
| @@ -619,31 +620,22 @@ export default { | @@ -619,31 +620,22 @@ export default { | ||
| 619 | }, 0); | 620 | }, 0); |
| 620 | return Number(score).toFixed(2); | 621 | return Number(score).toFixed(2); |
| 621 | }, | 622 | }, |
| 622 | - // 知识点列表 根据学段-科目筛选 | ||
| 623 | - knowledgeData: function () { | ||
| 624 | - let jsons = []; | ||
| 625 | - if (this.form.gradeName && this.form.subjectName) { | ||
| 626 | - let sectionName = ""; | ||
| 627 | - this.gradeClassList.map((item) => { | ||
| 628 | - if (this.form.gradeName == item.gradeName) { | ||
| 629 | - sectionName = item.sectionName; | ||
| 630 | - } | ||
| 631 | - }); | ||
| 632 | - if ( | ||
| 633 | - sectionName && | ||
| 634 | - Object.keys(this.knowledgeList).includes(sectionName) | ||
| 635 | - ) { | ||
| 636 | - if ( | ||
| 637 | - Object.keys(this.knowledgeList[sectionName]).includes( | ||
| 638 | - this.form.subjectName | ||
| 639 | - ) | ||
| 640 | - ) { | ||
| 641 | - jsons = this.knowledgeList[sectionName][this.form.subjectName]; | ||
| 642 | - } | ||
| 643 | - } | 623 | + uploadUrl: function () { |
| 624 | + var requestUrl = ''; | ||
| 625 | + | ||
| 626 | + var ogrinUrl = '/file/uploadImgToHtml'; | ||
| 627 | + | ||
| 628 | + var baseUrl = conf.baseURL; | ||
| 629 | + | ||
| 630 | + if (baseUrl == '/' && ogrinUrl.indexOf('/') == 0) { | ||
| 631 | + requestUrl = ogrinUrl; | ||
| 644 | } | 632 | } |
| 645 | - return jsons; | ||
| 646 | - }, | 633 | + else { |
| 634 | + requestUrl = baseUrl + ogrinUrl | ||
| 635 | + } | ||
| 636 | + | ||
| 637 | + return requestUrl; | ||
| 638 | + } | ||
| 647 | }, | 639 | }, |
| 648 | watch: { | 640 | watch: { |
| 649 | step: function () { | 641 | step: function () { |
| @@ -748,7 +740,7 @@ export default { | @@ -748,7 +740,7 @@ export default { | ||
| 748 | //返回列表页参数记录 | 740 | //返回列表页参数记录 |
| 749 | listType: 1, | 741 | listType: 1, |
| 750 | listShare: 0, | 742 | listShare: 0, |
| 751 | - uploadUrl: "/file/uploadImgToHtml", | 743 | + // uploadUrl: "/file/uploadImgToHtml", |
| 752 | iframeLoading: false, | 744 | iframeLoading: false, |
| 753 | }; | 745 | }; |
| 754 | }, | 746 | }, |
| @@ -785,18 +777,47 @@ export default { | @@ -785,18 +777,47 @@ export default { | ||
| 785 | } | 777 | } |
| 786 | }, | 778 | }, |
| 787 | methods: { | 779 | methods: { |
| 780 | + openKnowledge(obj, index, indexs) { | ||
| 781 | + this.stem.index = index; | ||
| 782 | + this.stem.indexs = indexs || 0; | ||
| 783 | + this.stem.knowledge = obj.knowledge; | ||
| 784 | + if (this.form.gradeName && this.form.subjectName) { | ||
| 785 | + var matchClass = this.gradeClassList.find((item) => { | ||
| 786 | + if (this.form.gradeName == item.gradeName) { | ||
| 787 | + return item.sectionName; | ||
| 788 | + } | ||
| 789 | + }); | ||
| 790 | + this.stem.sectionName = matchClass?.sectionName ?? ""; | ||
| 791 | + this.stem.subjectName = this.form.subjectName ?? ""; | ||
| 792 | + } | ||
| 793 | + this.dialogKnowledge = true; | ||
| 794 | + }, | ||
| 795 | + knowledgeOpration(target) { | ||
| 796 | + if (target.opration == 'confirm') { | ||
| 797 | + this.form.questionList[this.stem.index]. | ||
| 798 | + subQuestions[this.stem.indexs].knowledge = target.knowledges.join(","); | ||
| 799 | + this.dialogKnowledge = false; | ||
| 800 | + } | ||
| 801 | + else { | ||
| 802 | + this.dialogKnowledge = false; | ||
| 803 | + } | ||
| 804 | + }, | ||
| 788 | _checkedClass() { | 805 | _checkedClass() { |
| 806 | + this.checkedClass = this.shareClass.filter(item => item.isChecked).map(imap => imap.id); | ||
| 789 | this.classSharingType = false; | 807 | this.classSharingType = false; |
| 790 | }, | 808 | }, |
| 791 | handleCheckAllChange(val) { | 809 | handleCheckAllChange(val) { |
| 792 | - this.checkedClass = val ? this.shareClass?.map(item => item.id) : []; | 810 | + this.shareClass.forEach(item => { |
| 811 | + item.isChecked = val; | ||
| 812 | + }) | ||
| 793 | this.isIndeterminate = false; | 813 | this.isIndeterminate = false; |
| 794 | }, | 814 | }, |
| 795 | handleCheckedClassChange(value) { | 815 | handleCheckedClassChange(value) { |
| 816 | + var value = this.shareClass.filter(item => item.isChecked); | ||
| 796 | let checkedCount = value.length; | 817 | let checkedCount = value.length; |
| 797 | - this.checkAll = checkedCount === this.checkedClass.length; | ||
| 798 | - this.isIndeterminate = checkedCount > 0 && checkedCount < this.checkedClass.length; | ||
| 799 | - }, | 818 | + this.checkAll = checkedCount === this.shareClass.length; |
| 819 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.shareClass.length; | ||
| 820 | + }, | ||
| 800 | // v1.5 | 821 | // v1.5 |
| 801 | //上传截图 | 822 | //上传截图 |
| 802 | openStem(obj, index, indexs, type) { | 823 | openStem(obj, index, indexs, type) { |
| @@ -843,21 +864,6 @@ export default { | @@ -843,21 +864,6 @@ export default { | ||
| 843 | upError(res) { | 864 | upError(res) { |
| 844 | this.$message.error("上传失败"); | 865 | this.$message.error("上传失败"); |
| 845 | }, | 866 | }, |
| 846 | - // 打开知识点 | ||
| 847 | - openKnowledge(obj, index, indexs) { | ||
| 848 | - this.stem.index = index; | ||
| 849 | - this.stem.indexs = indexs; | ||
| 850 | - this.stem.knowledge = (obj.knowledge && obj.knowledge.split("#")) || []; | ||
| 851 | - this.dialogKnowledge = true; | ||
| 852 | - }, | ||
| 853 | - // 选择知识点 | ||
| 854 | - setKnowledge() { | ||
| 855 | - this.form.questionList[this.stem.index].subQuestions[ | ||
| 856 | - this.stem.indexs | ||
| 857 | - ].knowledge = this.stem.knowledge.join("#"); | ||
| 858 | - this.dialogKnowledge = false; | ||
| 859 | - }, | ||
| 860 | - //end | ||
| 861 | 867 | ||
| 862 | //取消创建 | 868 | //取消创建 |
| 863 | linkBack() { | 869 | linkBack() { |
| @@ -1252,19 +1258,26 @@ export default { | @@ -1252,19 +1258,26 @@ export default { | ||
| 1252 | 1258 | ||
| 1253 | this.classSharingType = true; | 1259 | this.classSharingType = true; |
| 1254 | 1260 | ||
| 1261 | + this.shareClass = []; | ||
| 1262 | + | ||
| 1255 | var grade = this.gradeClassList.find(item => item.gradeName == this.form.gradeName); | 1263 | var grade = this.gradeClassList.find(item => item.gradeName == this.form.gradeName); |
| 1256 | 1264 | ||
| 1257 | - var classResponse = await this.$request.tClassGrade(grade?.grade,this.form.subjectName); | 1265 | + var classResponse = await this.$request.tClassGrade(grade?.grade, this.form.subjectName); |
| 1258 | 1266 | ||
| 1259 | if (classResponse.status != 0) { | 1267 | if (classResponse.status != 0) { |
| 1260 | this.$message.error(classResponse.info); | 1268 | this.$message.error(classResponse.info); |
| 1269 | + return; | ||
| 1261 | } | 1270 | } |
| 1262 | - | 1271 | + |
| 1263 | this.gradeName = grade.gradeName; | 1272 | this.gradeName = grade.gradeName; |
| 1264 | - | ||
| 1265 | - this.shareClass = classResponse.data; | ||
| 1266 | - | ||
| 1267 | 1273 | ||
| 1274 | + this.shareClass = [...classResponse.data.map(item => { | ||
| 1275 | + return { | ||
| 1276 | + isChecked: this.checkedClass.includes(item.id), | ||
| 1277 | + id: item.id, | ||
| 1278 | + className: item.className | ||
| 1279 | + } | ||
| 1280 | + })]; | ||
| 1268 | }, | 1281 | }, |
| 1269 | openQuestion() { | 1282 | openQuestion() { |
| 1270 | this.questionForm = { ...questionForm }; | 1283 | this.questionForm = { ...questionForm }; |
| @@ -1520,28 +1533,28 @@ export default { | @@ -1520,28 +1533,28 @@ export default { | ||
| 1520 | }, | 1533 | }, |
| 1521 | async save() { | 1534 | async save() { |
| 1522 | if (this.saveLoading) return; | 1535 | if (this.saveLoading) return; |
| 1523 | - | 1536 | + |
| 1524 | this.saveLoading = true; | 1537 | this.saveLoading = true; |
| 1525 | - | 1538 | + |
| 1526 | this.formatQuestionList(); | 1539 | this.formatQuestionList(); |
| 1527 | - | 1540 | + |
| 1528 | let formDatas = deepClone(this.form); | 1541 | let formDatas = deepClone(this.form); |
| 1529 | - | 1542 | + |
| 1530 | formDatas.questionList = formDatas.questionList.filter(item => { | 1543 | formDatas.questionList = formDatas.questionList.filter(item => { |
| 1531 | return item.subQuestions?.length >= 1; | 1544 | return item.subQuestions?.length >= 1; |
| 1532 | }); | 1545 | }); |
| 1533 | - | 1546 | + |
| 1534 | for (let i = 0; i < formDatas.questionList.length; i++) { | 1547 | for (let i = 0; i < formDatas.questionList.length; i++) { |
| 1535 | delete formDatas.questionList[i].show; | 1548 | delete formDatas.questionList[i].show; |
| 1536 | } | 1549 | } |
| 1537 | - | 1550 | + |
| 1538 | let addPaper = | 1551 | let addPaper = |
| 1539 | this.role == "ROLE_PERSONAL" | 1552 | this.role == "ROLE_PERSONAL" |
| 1540 | ? this.$request.pAddPaper | 1553 | ? this.$request.pAddPaper |
| 1541 | : this.$request.addPaper; | 1554 | : this.$request.addPaper; |
| 1542 | 1555 | ||
| 1543 | formDatas.classIds = this.checkedClass.join(","); | 1556 | formDatas.classIds = this.checkedClass.join(","); |
| 1544 | - | 1557 | + |
| 1545 | const { data, status, info } = await addPaper({ | 1558 | const { data, status, info } = await addPaper({ |
| 1546 | ...formDatas, | 1559 | ...formDatas, |
| 1547 | }); | 1560 | }); |
src/views/examinationPaper/addQs.vue
| @@ -7,27 +7,28 @@ | @@ -7,27 +7,28 @@ | ||
| 7 | </template> | 7 | </template> |
| 8 | </back-box> | 8 | </back-box> |
| 9 | <div class="content"> | 9 | <div class="content"> |
| 10 | - | ||
| 11 | <el-dialog :close-on-click-modal="false" title="选择班级分享" :visible.sync="classSharingType" width="800" | 10 | <el-dialog :close-on-click-modal="false" title="选择班级分享" :visible.sync="classSharingType" width="800" |
| 12 | :modal-append-to-body="false" :append-to-body="true"> | 11 | :modal-append-to-body="false" :append-to-body="true"> |
| 13 | - <div> | 12 | + <div :key="classSharingType"> |
| 14 | <el-row class="row-subfix"> | 13 | <el-row class="row-subfix"> |
| 15 | <div class="row-line"> | 14 | <div class="row-line"> |
| 16 | <span class="line-subfix">年级:</span> | 15 | <span class="line-subfix">年级:</span> |
| 17 | <span class="line-value">{{ gradeName }}</span> | 16 | <span class="line-value">{{ gradeName }}</span> |
| 18 | </div> | 17 | </div> |
| 19 | </el-row> | 18 | </el-row> |
| 20 | - <el-row class="row-subfix" style="margin-top: 20px;"> | 19 | + <el-row v-if="shareClass.length >= 1" class="row-subfix" style="margin-top: 20px;"> |
| 21 | <span class="line-subfix" style="float: left;">班级:</span> | 20 | <span class="line-subfix" style="float: left;">班级:</span> |
| 22 | <div class="row-line" style="float: left; | 21 | <div class="row-line" style="float: left; |
| 23 | background:rgb(245,247,250);padding:15px 10px;width: calc(100% - 80px);border-radius:5px;"> | 22 | background:rgb(245,247,250);padding:15px 10px;width: calc(100% - 80px);border-radius:5px;"> |
| 24 | <span class="line-value" style="min-height: 300px;border-radius: 4px; background: rgb(247,247,250);"> | 23 | <span class="line-value" style="min-height: 300px;border-radius: 4px; background: rgb(247,247,250);"> |
| 25 | <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | 24 | <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" |
| 26 | @change="handleCheckAllChange">全选</el-checkbox> | 25 | @change="handleCheckAllChange">全选</el-checkbox> |
| 27 | - <el-checkbox-group v-model="checkedClass" style="margin-top: 15px;" @change="handleCheckedClassChange"> | ||
| 28 | - <el-checkbox v-for="(item, index) in shareClass" :label="item.id" :key="item.id">{{ | ||
| 29 | - item.className }}</el-checkbox> | ||
| 30 | - </el-checkbox-group> | 26 | + <div> |
| 27 | + <el-checkbox @change="handleCheckedClassChange" v-model="item.isChecked" :key="index" | ||
| 28 | + v-for="(item, index) in shareClass" :label="item.id"> | ||
| 29 | + {{ item.className }} | ||
| 30 | + </el-checkbox> | ||
| 31 | + </div> | ||
| 31 | </span> | 32 | </span> |
| 32 | </div> | 33 | </div> |
| 33 | </el-row> | 34 | </el-row> |
| @@ -81,7 +82,7 @@ | @@ -81,7 +82,7 @@ | ||
| 81 | <div class="answer-title"> | 82 | <div class="answer-title"> |
| 82 | <p class="name">{{ form.title }}</p> | 83 | <p class="name">{{ form.title }}</p> |
| 83 | </div> | 84 | </div> |
| 84 | - <div class="question-box"> | 85 | + <div class="question-box flex-content" > |
| 85 | <ul class="questions-ul"> | 86 | <ul class="questions-ul"> |
| 86 | <li class="sub-questions"> | 87 | <li class="sub-questions"> |
| 87 | <div class="qs-num">题号</div> | 88 | <div class="qs-num">题号</div> |
| @@ -91,7 +92,7 @@ | @@ -91,7 +92,7 @@ | ||
| 91 | <div class="qs-options qs-options2">选项设置</div> | 92 | <div class="qs-options qs-options2">选项设置</div> |
| 92 | <div class="qs-upload">题干</div> | 93 | <div class="qs-upload">题干</div> |
| 93 | <div class="qs-upload">题目解析</div> | 94 | <div class="qs-upload">题目解析</div> |
| 94 | - <div class="qs-upload" >知识点</div> | 95 | + <div class="qs-upload">知识点</div> |
| 95 | <div class="qs-set">操作</div> | 96 | <div class="qs-set">操作</div> |
| 96 | </li> | 97 | </li> |
| 97 | </ul> | 98 | </ul> |
| @@ -157,7 +158,7 @@ | @@ -157,7 +158,7 @@ | ||
| 157 | <el-button class="icon-tickets" type="primary" circle size="mini" icon="el-icon-tickets" | 158 | <el-button class="icon-tickets" type="primary" circle size="mini" icon="el-icon-tickets" |
| 158 | @click="openStem(question, 2, index)"></el-button> | 159 | @click="openStem(question, 2, index)"></el-button> |
| 159 | </div> | 160 | </div> |
| 160 | - <div class="qs-upload" > | 161 | + <div class="qs-upload"> |
| 161 | <el-button type="primary" circle size="mini" icon="el-icon-price-tag" | 162 | <el-button type="primary" circle size="mini" icon="el-icon-price-tag" |
| 162 | @click="openKnowledge(question, index)"></el-button> | 163 | @click="openKnowledge(question, index)"></el-button> |
| 163 | </div> | 164 | </div> |
| @@ -239,7 +240,7 @@ | @@ -239,7 +240,7 @@ | ||
| 239 | <el-button class="icon-tickets" type="primary" circle size="mini" icon="el-icon-tickets" | 240 | <el-button class="icon-tickets" type="primary" circle size="mini" icon="el-icon-tickets" |
| 240 | @click="openStem(subQuestions, 2, index, indexs)"></el-button> | 241 | @click="openStem(subQuestions, 2, index, indexs)"></el-button> |
| 241 | </div> | 242 | </div> |
| 242 | - <div class="qs-upload" > | 243 | + <div class="qs-upload"> |
| 243 | <el-button type="primary" circle size="mini" icon="el-icon-price-tag" | 244 | <el-button type="primary" circle size="mini" icon="el-icon-price-tag" |
| 244 | @click="openKnowledge(subQuestions, index, indexs)"></el-button> | 245 | @click="openKnowledge(subQuestions, index, indexs)"></el-button> |
| 245 | </div> | 246 | </div> |
| @@ -302,10 +303,19 @@ | @@ -302,10 +303,19 @@ | ||
| 302 | <el-button @click="diaSetAns = false">取 消</el-button> | 303 | <el-button @click="diaSetAns = false">取 消</el-button> |
| 303 | </div> | 304 | </div> |
| 304 | </el-dialog> | 305 | </el-dialog> |
| 305 | - <div class="btn-box"> | ||
| 306 | - <el-button type="danger" plain round @click="linkBack">取消</el-button> | ||
| 307 | - <el-button round @click="step = 0">上一步</el-button> | ||
| 308 | - <el-button type="primary" round @click="toStep(2)">下一步</el-button> | 306 | + <div class="btn-box flex-btn" style="text-align: center; "> |
| 307 | + <div style="display: inline-block;line-height: 45px;"> | ||
| 308 | + <label>请仔细核对 | ||
| 309 | + <label style="color:red;">“题型” </label> | ||
| 310 | + 和 | ||
| 311 | + <label style="color:red;">“答案”</label>等是否识别正确 | ||
| 312 | + </label> | ||
| 313 | + </div> | ||
| 314 | + <div style="display: inline;;float: right"> | ||
| 315 | + <el-button type="danger" plain round @click="linkBack">取消</el-button> | ||
| 316 | + <el-button round @click="step = 0">上一步</el-button> | ||
| 317 | + <el-button type="primary" round @click="toStep(2)">下一步</el-button> | ||
| 318 | + </div> | ||
| 309 | </div> | 319 | </div> |
| 310 | <el-dialog :close-on-click-modal="false" :modal-append-to-body="false" | 320 | <el-dialog :close-on-click-modal="false" :modal-append-to-body="false" |
| 311 | :title="stem.type == 1 ? '上传题干' : '上传题目解析'" :visible.sync="dialogStem" v-if="dialogStem" width="800px"> | 321 | :title="stem.type == 1 ? '上传题干' : '上传题目解析'" :visible.sync="dialogStem" v-if="dialogStem" width="800px"> |
| @@ -329,22 +339,17 @@ | @@ -329,22 +339,17 @@ | ||
| 329 | <el-button @click="dialogStem = false">保存</el-button> | 339 | <el-button @click="dialogStem = false">保存</el-button> |
| 330 | </div> | 340 | </div> |
| 331 | </el-dialog> | 341 | </el-dialog> |
| 332 | - <el-dialog :close-on-click-modal="false" :modal-append-to-body="false" title="知识点" | ||
| 333 | - :visible.sync="dialogKnowledge" width="60%" > | ||
| 334 | - <div> | ||
| 335 | - <knowledgePoints :sectionName="stem.sectionName" :subjectName="stem.subjectName" :knowledges="stem.knowledge" @points="_points" /> | ||
| 336 | - </div> | ||
| 337 | - <div slot="footer"> | ||
| 338 | - <el-button @click="dialogKnowledge = false">取 消</el-button> | ||
| 339 | - <el-button type="primary" @click="setKnowledge">确 定</el-button> | ||
| 340 | - </div> | 342 | + <el-dialog :append-to-body="true" :destroy-on-close="true" title="知识点" :visible.sync="dialogKnowledge" |
| 343 | + width="60%"> | ||
| 344 | + <knowledgePoints :key="dialogKnowledge" @opration="knowledgeOpration" :sectionName="stem.sectionName" | ||
| 345 | + :subjectName="stem.subjectName" :knowledges="stem.knowledge" /> | ||
| 341 | </el-dialog> | 346 | </el-dialog> |
| 342 | </div> | 347 | </div> |
| 343 | <div v-if="step == 2"> | 348 | <div v-if="step == 2"> |
| 344 | <div class="answer-title"> | 349 | <div class="answer-title"> |
| 345 | <p class="name">{{ form.title }}</p> | 350 | <p class="name">{{ form.title }}</p> |
| 346 | </div> | 351 | </div> |
| 347 | - <div class="question-box"> | 352 | + <div class="question-box flex-content" > |
| 348 | <template v-for="question in form.questionList"> | 353 | <template v-for="question in form.questionList"> |
| 349 | <template v-if="!question.subQuestions"> | 354 | <template v-if="!question.subQuestions"> |
| 350 | <div class="screenshot-box" v-if="question.screenshot"> | 355 | <div class="screenshot-box" v-if="question.screenshot"> |
| @@ -360,7 +365,7 @@ | @@ -360,7 +365,7 @@ | ||
| 360 | </template> | 365 | </template> |
| 361 | </template> | 366 | </template> |
| 362 | </div> | 367 | </div> |
| 363 | - <div class="btn-box"> | 368 | + <div class="btn-box flex-btn"> |
| 364 | <el-button type="danger" plain round @click="linkBack">取消</el-button> | 369 | <el-button type="danger" plain round @click="linkBack">取消</el-button> |
| 365 | <el-button round @click="toStep(1)">上一步</el-button> | 370 | <el-button round @click="toStep(1)">上一步</el-button> |
| 366 | <el-button type="primary" round @click="save">保存</el-button> | 371 | <el-button type="primary" round @click="save">保存</el-button> |
| @@ -371,6 +376,7 @@ | @@ -371,6 +376,7 @@ | ||
| 371 | </template> | 376 | </template> |
| 372 | 377 | ||
| 373 | <script> | 378 | <script> |
| 379 | +import conf from "@/config/index"; | ||
| 374 | import { deepClone, checkAnswer } from "utils"; | 380 | import { deepClone, checkAnswer } from "utils"; |
| 375 | import knowledgeList from "assets/js/knowledgeList.js"; | 381 | import knowledgeList from "assets/js/knowledgeList.js"; |
| 376 | import knowledgePoints from "@/components/knowledgePoints" | 382 | import knowledgePoints from "@/components/knowledgePoints" |
| @@ -449,38 +455,11 @@ export default { | @@ -449,38 +455,11 @@ export default { | ||
| 449 | //返回列表页参数记录 | 455 | //返回列表页参数记录 |
| 450 | listType: 1, | 456 | listType: 1, |
| 451 | listShare: 0, | 457 | listShare: 0, |
| 452 | - uploadUrl: "/file/uploadImgToHtml", | 458 | + // uploadUrl: "/file/uploadImgToHtml", |
| 453 | iframeLoading: false, | 459 | iframeLoading: false, |
| 454 | subjectName: "", | 460 | subjectName: "", |
| 455 | }; | 461 | }; |
| 456 | }, | 462 | }, |
| 457 | - // computed: { | ||
| 458 | - // // 知识点列表 根据学段-科目筛选 | ||
| 459 | - // knowledgeData: function () { | ||
| 460 | - // let jsons = []; | ||
| 461 | - // if (this.form.gradeName && this.form.subjectName) { | ||
| 462 | - // let sectionName = ""; | ||
| 463 | - // this.gradeClassList.map((item) => { | ||
| 464 | - // if (this.form.gradeName == item.gradeName) { | ||
| 465 | - // sectionName = item.sectionName; | ||
| 466 | - // } | ||
| 467 | - // }); | ||
| 468 | - // if ( | ||
| 469 | - // sectionName && | ||
| 470 | - // Object.keys(this.knowledgeList).includes(sectionName) | ||
| 471 | - // ) { | ||
| 472 | - // if ( | ||
| 473 | - // Object.keys(this.knowledgeList[sectionName]).includes( | ||
| 474 | - // this.form.subjectName | ||
| 475 | - // ) | ||
| 476 | - // ) { | ||
| 477 | - // jsons = this.knowledgeList[sectionName][this.form.subjectName]; | ||
| 478 | - // } | ||
| 479 | - // } | ||
| 480 | - // } | ||
| 481 | - // return jsons; | ||
| 482 | - // }, | ||
| 483 | - // }, | ||
| 484 | watch: { | 463 | watch: { |
| 485 | step: function () { | 464 | step: function () { |
| 486 | this.$nextTick(function () { | 465 | this.$nextTick(function () { |
| @@ -488,6 +467,24 @@ export default { | @@ -488,6 +467,24 @@ export default { | ||
| 488 | }); | 467 | }); |
| 489 | }, | 468 | }, |
| 490 | }, | 469 | }, |
| 470 | + computed: { | ||
| 471 | + uploadUrl: function () { | ||
| 472 | + var requestUrl = ''; | ||
| 473 | + | ||
| 474 | + var ogrinUrl = '/file/uploadImgToHtml'; | ||
| 475 | + | ||
| 476 | + var baseUrl = conf.baseURL; | ||
| 477 | + | ||
| 478 | + if (baseUrl == '/' && ogrinUrl.indexOf('/') == 0) { | ||
| 479 | + requestUrl = ogrinUrl; | ||
| 480 | + } | ||
| 481 | + else { | ||
| 482 | + requestUrl = baseUrl + ogrinUrl | ||
| 483 | + } | ||
| 484 | + | ||
| 485 | + return requestUrl; | ||
| 486 | + } | ||
| 487 | + }, | ||
| 491 | async created() { | 488 | async created() { |
| 492 | this.listType = this.$route.query.listType ? this.$route.query.listType : 1; | 489 | this.listType = this.$route.query.listType ? this.$route.query.listType : 1; |
| 493 | this.listShare = this.$route.query.listShare | 490 | this.listShare = this.$route.query.listShare |
| @@ -519,30 +516,65 @@ export default { | @@ -519,30 +516,65 @@ export default { | ||
| 519 | } | 516 | } |
| 520 | }, | 517 | }, |
| 521 | methods: { | 518 | methods: { |
| 522 | - _points(point) { | ||
| 523 | - | 519 | + // 知识点 |
| 520 | + openKnowledge(obj, index, indexs) { | ||
| 521 | + this.stem.index = index; | ||
| 522 | + this.stem.indexs = indexs; | ||
| 523 | + this.stem.knowledge = obj.knowledge; | ||
| 524 | + if (this.form.gradeName && this.form.subjectName) { | ||
| 525 | + var matchClass = this.gradeClassList.find((item) => { | ||
| 526 | + if (this.form.gradeName == item.gradeName) { | ||
| 527 | + return item.sectionName; | ||
| 528 | + } | ||
| 529 | + }); | ||
| 530 | + this.stem.sectionName = matchClass?.sectionName ?? ""; | ||
| 531 | + this.stem.subjectName = this.form.subjectName ?? ""; | ||
| 532 | + } | ||
| 533 | + this.dialogKnowledge = true; | ||
| 534 | + }, | ||
| 535 | + knowledgeOpration(target) { | ||
| 536 | + if (target.opration == 'confirm') { | ||
| 537 | + this.form.questionList[this.stem.index]. | ||
| 538 | + subQuestions[this.stem.indexs].knowledge = target.knowledges.join(","); | ||
| 539 | + this.dialogKnowledge = false; | ||
| 540 | + } | ||
| 541 | + else { | ||
| 542 | + this.dialogKnowledge = false; | ||
| 543 | + } | ||
| 524 | }, | 544 | }, |
| 525 | _checkedClass() { | 545 | _checkedClass() { |
| 546 | + this.checkedClass = this.shareClass.filter(item => item.isChecked).map(imap => imap.id); | ||
| 526 | this.classSharingType = false; | 547 | this.classSharingType = false; |
| 527 | }, | 548 | }, |
| 528 | handleCheckAllChange(val) { | 549 | handleCheckAllChange(val) { |
| 529 | - this.checkedClass = val ? this.shareClass?.map(item => item.id) : []; | 550 | + this.shareClass.forEach(item => { |
| 551 | + item.isChecked = val; | ||
| 552 | + }) | ||
| 530 | this.isIndeterminate = false; | 553 | this.isIndeterminate = false; |
| 531 | }, | 554 | }, |
| 532 | handleCheckedClassChange(value) { | 555 | handleCheckedClassChange(value) { |
| 556 | + var value = this.shareClass.filter(item => item.isChecked); | ||
| 533 | let checkedCount = value.length; | 557 | let checkedCount = value.length; |
| 534 | - this.checkAll = checkedCount === this.checkedClass.length; | ||
| 535 | - this.isIndeterminate = checkedCount > 0 && checkedCount < this.checkedClass.length; | 558 | + this.checkAll = checkedCount === this.shareClass.length; |
| 559 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.shareClass.length; | ||
| 536 | }, | 560 | }, |
| 537 | async _selectClassSharingType() { | 561 | async _selectClassSharingType() { |
| 538 | this.classSharingType = true; | 562 | this.classSharingType = true; |
| 539 | - var findGrade = this.gradeClassList.find(item => item.gradeName == this.form.gradeName); | ||
| 540 | - this.gradeName = findGrade.gradeName; | ||
| 541 | - var classResponse = await this.$request.tClassGrade(findGrade.grade, this.form.subjectName); | 563 | + this.shareClass = []; |
| 564 | + var grade = this.gradeClassList.find(item => item.gradeName == this.form.gradeName); | ||
| 565 | + var classResponse = await this.$request.tClassGrade(grade?.grade, this.form.subjectName); | ||
| 542 | if (classResponse.status != 0) { | 566 | if (classResponse.status != 0) { |
| 543 | this.$message.error(classResponse.info); | 567 | this.$message.error(classResponse.info); |
| 568 | + return; | ||
| 544 | } | 569 | } |
| 545 | - this.shareClass = classResponse.data; | 570 | + this.gradeName = grade.gradeName; |
| 571 | + this.shareClass = [...classResponse.data.map(item => { | ||
| 572 | + return { | ||
| 573 | + isChecked: this.checkedClass.includes(item.id), | ||
| 574 | + id: item.id, | ||
| 575 | + className: item.className | ||
| 576 | + } | ||
| 577 | + })]; | ||
| 546 | }, | 578 | }, |
| 547 | // v1.5 | 579 | // v1.5 |
| 548 | //上传截图 | 580 | //上传截图 |
| @@ -601,31 +633,6 @@ export default { | @@ -601,31 +633,6 @@ export default { | ||
| 601 | upError(res) { | 633 | upError(res) { |
| 602 | this.$message.error("上传失败"); | 634 | this.$message.error("上传失败"); |
| 603 | }, | 635 | }, |
| 604 | - // 知识点 | ||
| 605 | - openKnowledge(obj, index, indexs) { | ||
| 606 | - this.stem.index = index; | ||
| 607 | - this.stem.indexs = indexs; | ||
| 608 | - this.stem.knowledge = (obj.knowledge && obj.knowledge.split("#")) || []; | ||
| 609 | - if (this.form.gradeName && this.form.subjectName) { | ||
| 610 | - var matchClass = this.gradeClassList.find((item) => { | ||
| 611 | - if (this.form.gradeName == item.gradeName) { | ||
| 612 | - return item.sectionName; | ||
| 613 | - } | ||
| 614 | - }); | ||
| 615 | - this.stem.sectionName = matchClass?.sectionName ?? ""; | ||
| 616 | - this.stem.subjectName = this.form.subjectName ?? ""; | ||
| 617 | - } | ||
| 618 | - // this.stem.sectionName = | ||
| 619 | - this.dialogKnowledge = true; | ||
| 620 | - }, | ||
| 621 | - // 知识点 | ||
| 622 | - setKnowledge() { | ||
| 623 | - this.form.questionList[this.stem.index].subQuestions[ | ||
| 624 | - this.stem.indexs | ||
| 625 | - ].knowledge = this.stem.knowledge.join("#"); | ||
| 626 | - this.dialogKnowledge = false; | ||
| 627 | - }, | ||
| 628 | - | ||
| 629 | //end | 636 | //end |
| 630 | linkBack() { | 637 | linkBack() { |
| 631 | this.$confirm( | 638 | this.$confirm( |
src/views/examinationPaper/edit.vue
| @@ -56,9 +56,7 @@ | @@ -56,9 +56,7 @@ | ||
| 56 | <div class="qs-set">知识点</div> | 56 | <div class="qs-set">知识点</div> |
| 57 | </div> | 57 | </div> |
| 58 | <div v-for="(subQuestions, indexs) in question.subQuestions" :key="indexs"> | 58 | <div v-for="(subQuestions, indexs) in question.subQuestions" :key="indexs"> |
| 59 | - <p class="set-ans-btn" v-if="subQuestions.qusType && | ||
| 60 | - subQuestions.subNum && | ||
| 61 | - subQuestions.subNum > 4 | 59 | + <p class="set-ans-btn" v-if="subQuestions.qusType && subQuestions.subNum && subQuestions.subNum > 4 |
| 62 | "> | 60 | "> |
| 63 | <el-button type="primary" @click="setFormAns(indexs, index)">批量设置答案</el-button> | 61 | <el-button type="primary" @click="setFormAns(indexs, index)">批量设置答案</el-button> |
| 64 | </p> | 62 | </p> |
| @@ -88,8 +86,8 @@ | @@ -88,8 +86,8 @@ | ||
| 88 | <p v-if="subQuestions.questionType == 3" class="answer-box"> | 86 | <p v-if="subQuestions.questionType == 3" class="answer-box"> |
| 89 | <template v-for="option in subQuestions.answerOptions?.split(',')"> | 87 | <template v-for="option in subQuestions.answerOptions?.split(',')"> |
| 90 | <span v-if="option" class="answer-s" :class="subQuestions.correctAnswer?.includes(option) | 88 | <span v-if="option" class="answer-s" :class="subQuestions.correctAnswer?.includes(option) |
| 91 | - ? 'active' | ||
| 92 | - : '' | 89 | + ? 'active' |
| 90 | + : '' | ||
| 93 | " :key="option" @click="changAnswer(subQuestions, option)">{{ option }}</span> | 91 | " :key="option" @click="changAnswer(subQuestions, option)">{{ option }}</span> |
| 94 | </template> | 92 | </template> |
| 95 | </p> | 93 | </p> |
| @@ -175,8 +173,8 @@ | @@ -175,8 +173,8 @@ | ||
| 175 | <el-button type="danger" plain round @click="linkBack">取消</el-button> | 173 | <el-button type="danger" plain round @click="linkBack">取消</el-button> |
| 176 | <el-button type="primary" round @click="save">保存</el-button> | 174 | <el-button type="primary" round @click="save">保存</el-button> |
| 177 | </div> | 175 | </div> |
| 178 | - <el-dialog :append-to-body="true" :close-on-click-modal="false" title="批量设置答案" :visible.sync="diaSetAns" width="400" | ||
| 179 | - :modal-append-to-body="false"> | 176 | + <el-dialog :append-to-body="true" :close-on-click-modal="false" title="批量设置答案" :visible.sync="diaSetAns" |
| 177 | + width="400" :modal-append-to-body="false"> | ||
| 180 | <div class="qs-options set-questions"> | 178 | <div class="qs-options set-questions"> |
| 181 | <p class="dia-tips"> | 179 | <p class="dia-tips"> |
| 182 | 请点击选项按钮设置答案,多选题题目之间用“,”隔开,若添加5道题:“AC,AD,BD,AC,CD” | 180 | 请点击选项按钮设置答案,多选题题目之间用“,”隔开,若添加5道题:“AC,AD,BD,AC,CD” |
| @@ -222,18 +220,13 @@ | @@ -222,18 +220,13 @@ | ||
| 222 | <el-button @click="diaSetAns = false">取 消</el-button> | 220 | <el-button @click="diaSetAns = false">取 消</el-button> |
| 223 | </div> | 221 | </div> |
| 224 | </el-dialog> | 222 | </el-dialog> |
| 225 | - <el-dialog :append-to-body="true" :close-on-click-modal="false" :title="stem.type == 1 ? '上传题干' : '上传题目解析'" :visible.sync="dialogStem" | ||
| 226 | - v-if="dialogStem" width="800px"> | 223 | + <el-dialog :append-to-body="true" :close-on-click-modal="false" :title="stem.type == 1 ? '上传题干' : '上传题目解析'" |
| 224 | + :visible.sync="dialogStem" v-if="dialogStem" width="800"> | ||
| 227 | <div class="upload-box"> | 225 | <div class="upload-box"> |
| 228 | - <div v-loading="iframeLoading"> | ||
| 229 | - <template v-if="stem.type == 1"> | ||
| 230 | - <iframe ref="screenshot" class="screenshot" v-if="stem.screenshot" :src="stem.screenshot" | ||
| 231 | - @load="iframeLoading = false"></iframe> | ||
| 232 | - </template> | ||
| 233 | - <template v-else> | ||
| 234 | - <iframe ref="screenshot" class="screenshot" v-if="stem.answerScreenshot" :src="stem.answerScreenshot" | ||
| 235 | - @load="iframeLoading = false"></iframe> | ||
| 236 | - </template> | 226 | + <div> |
| 227 | + <Preview ref="screenshot" class="screenshot" | ||
| 228 | + :src="stem.type == 1 ? stem.screenshot : stem.answerScreenshot"> | ||
| 229 | + </Preview> | ||
| 237 | </div> | 230 | </div> |
| 238 | <el-upload class="upload-demo" :action="uploadUrl" :limit="1" :on-success="upSuccess" :on-error="upError" | 231 | <el-upload class="upload-demo" :action="uploadUrl" :limit="1" :on-success="upSuccess" :on-error="upError" |
| 239 | accept="image/*"> | 232 | accept="image/*"> |
| @@ -244,31 +237,19 @@ | @@ -244,31 +237,19 @@ | ||
| 244 | <el-button @click="dialogStem = false">确定</el-button> | 237 | <el-button @click="dialogStem = false">确定</el-button> |
| 245 | </div> | 238 | </div> |
| 246 | </el-dialog> | 239 | </el-dialog> |
| 247 | - <el-dialog :append-to-body="true" :close-on-click-modal="false" title="知识点" :visible.sync="dialogKnowledge" width="500px"> | ||
| 248 | - <div> | ||
| 249 | - <el-form ref="form" :model="stem" label-width="160px"> | ||
| 250 | - <el-form-item label="知识点:"> | ||
| 251 | - <el-cascader size="small" filterable :show-all-levels="false" clearable placeholder="选择知识点" | ||
| 252 | - v-model="stem.knowledge" :options="knowledgeData" :props="{ | ||
| 253 | - expandTrigger: 'hover', | ||
| 254 | - multiple: true, | ||
| 255 | - checkStrictly: true, | ||
| 256 | - }"></el-cascader> | ||
| 257 | - </el-form-item> | ||
| 258 | - </el-form> | ||
| 259 | - </div> | ||
| 260 | - <div slot="footer"> | ||
| 261 | - <el-button @click="dialogKnowledge = false">取 消</el-button> | ||
| 262 | - <el-button type="primary" @click="setKnowledge">确 定</el-button> | ||
| 263 | - </div> | 240 | + <el-dialog :append-to-body="true" :close-on-click-modal="false" title="知识点" :visible.sync="dialogKnowledge" |
| 241 | + width="60%"> | ||
| 242 | + <knowledgePoints :key="dialogKnowledge" @opration="knowledgeOpration" :sectionName="stem.sectionName" | ||
| 243 | + :subjectName="stem.subjectName" :knowledges="stem.knowledge" /> | ||
| 264 | </el-dialog> | 244 | </el-dialog> |
| 265 | </div> | 245 | </div> |
| 266 | </div> | 246 | </div> |
| 267 | </template> | 247 | </template> |
| 268 | 248 | ||
| 269 | <script> | 249 | <script> |
| 250 | +import Preview from "@/components/preview"; | ||
| 270 | import { deepClone, checkAnswer } from "utils"; | 251 | import { deepClone, checkAnswer } from "utils"; |
| 271 | -import knowledgeList from "assets/js/knowledgeList.js"; | 252 | +import conf from "@/config/index"; |
| 272 | export default { | 253 | export default { |
| 273 | data() { | 254 | data() { |
| 274 | return { | 255 | return { |
| @@ -306,8 +287,7 @@ export default { | @@ -306,8 +287,7 @@ export default { | ||
| 306 | 287 | ||
| 307 | //v1.5 | 288 | //v1.5 |
| 308 | dialogStem: false, //截图开关 | 289 | dialogStem: false, //截图开关 |
| 309 | - dialogKnowledge: false, //知识点开关 | ||
| 310 | - knowledgeList: { ...knowledgeList }, | 290 | + dialogKnowledge: false, //知识点开关 |
| 311 | stem: { | 291 | stem: { |
| 312 | type: 1, | 292 | type: 1, |
| 313 | index: 0, //大题位置 | 293 | index: 0, //大题位置 |
| @@ -315,14 +295,32 @@ export default { | @@ -315,14 +295,32 @@ export default { | ||
| 315 | screenshot: "", //题干图片地址 | 295 | screenshot: "", //题干图片地址 |
| 316 | answerScreenshot: "", //题目解析图片地址 | 296 | answerScreenshot: "", //题目解析图片地址 |
| 317 | knowledge: [], //知识点 | 297 | knowledge: [], //知识点 |
| 298 | + sectionName: "", //题目解析图片地址 | ||
| 299 | + subjectName: "" //知识点 | ||
| 318 | }, | 300 | }, |
| 319 | gradeClassList: [], //学段列表 | 301 | gradeClassList: [], //学段列表 |
| 320 | - uploadUrl: "/file/uploadImgToHtml", | 302 | + // uploadUrl: "/file/uploadImgToHtml", |
| 321 | iframeLoading: false, | 303 | iframeLoading: false, |
| 322 | examType: 2, | 304 | examType: 2, |
| 323 | }; | 305 | }; |
| 324 | }, | 306 | }, |
| 325 | computed: { | 307 | computed: { |
| 308 | + uploadUrl: function () { | ||
| 309 | + var requestUrl = ''; | ||
| 310 | + | ||
| 311 | + var ogrinUrl = '/file/uploadImgToHtml'; | ||
| 312 | + | ||
| 313 | + var baseUrl = conf.baseURL; | ||
| 314 | + | ||
| 315 | + if (baseUrl == '/' && ogrinUrl.indexOf('/') == 0) { | ||
| 316 | + requestUrl = ogrinUrl; | ||
| 317 | + } | ||
| 318 | + else { | ||
| 319 | + requestUrl = baseUrl + ogrinUrl | ||
| 320 | + } | ||
| 321 | + | ||
| 322 | + return requestUrl; | ||
| 323 | + }, | ||
| 326 | allScore: function () { | 324 | allScore: function () { |
| 327 | let score = 0; | 325 | let score = 0; |
| 328 | this.questionList?.map((item) => { | 326 | this.questionList?.map((item) => { |
| @@ -335,32 +333,7 @@ export default { | @@ -335,32 +333,7 @@ export default { | ||
| 335 | } | 333 | } |
| 336 | }, 0); | 334 | }, 0); |
| 337 | return Number(score).toFixed(2); | 335 | return Number(score).toFixed(2); |
| 338 | - }, | ||
| 339 | - // 知识点列表 根据学段-科目筛选 | ||
| 340 | - knowledgeData: function () { | ||
| 341 | - let jsons = []; | ||
| 342 | - if (this.form.gradeName && this.form.subjectName) { | ||
| 343 | - let sectionName = ""; | ||
| 344 | - this.gradeClassList?.map((item) => { | ||
| 345 | - if (this.form.gradeName == item.gradeName) { | ||
| 346 | - sectionName = item.sectionName; | ||
| 347 | - } | ||
| 348 | - }); | ||
| 349 | - if ( | ||
| 350 | - sectionName && | ||
| 351 | - Object.keys(this.knowledgeList).includes(sectionName) | ||
| 352 | - ) { | ||
| 353 | - if ( | ||
| 354 | - Object.keys(this.knowledgeList[sectionName]).includes( | ||
| 355 | - this.form.subjectName | ||
| 356 | - ) | ||
| 357 | - ) { | ||
| 358 | - jsons = this.knowledgeList[sectionName][this.form.subjectName]; | ||
| 359 | - } | ||
| 360 | - } | ||
| 361 | - } | ||
| 362 | - return jsons; | ||
| 363 | - }, | 336 | + } |
| 364 | }, | 337 | }, |
| 365 | created() { | 338 | created() { |
| 366 | this.role = | 339 | this.role = |
| @@ -370,10 +343,27 @@ export default { | @@ -370,10 +343,27 @@ export default { | ||
| 370 | this.examType = this.$route.query.examType || 2; | 343 | this.examType = this.$route.query.examType || 2; |
| 371 | this.paperType = this.$route.query.paperType || 2; | 344 | this.paperType = this.$route.query.paperType || 2; |
| 372 | this.form.title = this.$route.query.title || ""; | 345 | this.form.title = this.$route.query.title || ""; |
| 346 | + this.stem.sectionName = this.$route.query.sectionName || ""; | ||
| 347 | + this.stem.subjectName = this.$route.query.subjectName || ""; | ||
| 373 | this._QueryDetail(); | 348 | this._QueryDetail(); |
| 374 | this._GradeList(); | 349 | this._GradeList(); |
| 375 | }, | 350 | }, |
| 376 | methods: { | 351 | methods: { |
| 352 | + knowledgeOpration(target) { | ||
| 353 | + if (target.opration == 'confirm') { | ||
| 354 | + if (this.questionList[0]?.subQuestions) { | ||
| 355 | + this.questionList[this.stem.index].subQuestions[ | ||
| 356 | + this.stem.indexs | ||
| 357 | + ].knowledge = target.knowledges.join(","); | ||
| 358 | + } else { | ||
| 359 | + this.questionList[this.stem.index].knowledge = target.knowledges.join(","); | ||
| 360 | + } | ||
| 361 | + this.dialogKnowledge = false; | ||
| 362 | + } | ||
| 363 | + else { | ||
| 364 | + this.dialogKnowledge = false; | ||
| 365 | + } | ||
| 366 | + }, | ||
| 377 | // v1.5 | 367 | // v1.5 |
| 378 | //上传截图 | 368 | //上传截图 |
| 379 | openStem(obj, type, index, indexs) { | 369 | openStem(obj, type, index, indexs) { |
| @@ -394,7 +384,6 @@ export default { | @@ -394,7 +384,6 @@ export default { | ||
| 394 | this.stem.answerScreenshot = obj.answerScreenshot || ""; | 384 | this.stem.answerScreenshot = obj.answerScreenshot || ""; |
| 395 | this.stem.screenshot = ""; | 385 | this.stem.screenshot = ""; |
| 396 | } | 386 | } |
| 397 | - | ||
| 398 | this.dialogStem = true; | 387 | this.dialogStem = true; |
| 399 | }, | 388 | }, |
| 400 | //图片上传成功 | 389 | //图片上传成功 |
| @@ -421,7 +410,6 @@ export default { | @@ -421,7 +410,6 @@ export default { | ||
| 421 | this.stem.answerScreenshot; | 410 | this.stem.answerScreenshot; |
| 422 | } | 411 | } |
| 423 | } | 412 | } |
| 424 | - | ||
| 425 | this.$message.success("上传成功"); | 413 | this.$message.success("上传成功"); |
| 426 | } else { | 414 | } else { |
| 427 | this.$message.error(res.info); | 415 | this.$message.error(res.info); |
| @@ -446,24 +434,10 @@ export default { | @@ -446,24 +434,10 @@ export default { | ||
| 446 | // 打开知识点 | 434 | // 打开知识点 |
| 447 | openKnowledge(obj, index, indexs) { | 435 | openKnowledge(obj, index, indexs) { |
| 448 | this.stem.index = index; | 436 | this.stem.index = index; |
| 449 | - this.stem.indexs = indexs || 0; | ||
| 450 | - this.stem.knowledge = (obj.knowledge && obj.knowledge.split("#")) || []; | 437 | + this.stem.indexs = indexs || 0; |
| 438 | + this.stem.knowledge = obj?.knowledge ?? ""; | ||
| 451 | this.dialogKnowledge = true; | 439 | this.dialogKnowledge = true; |
| 452 | }, | 440 | }, |
| 453 | - // 选择知识点 | ||
| 454 | - setKnowledge() { | ||
| 455 | - if (this.questionList[0]?.subQuestions) { | ||
| 456 | - this.questionList[this.stem.index].subQuestions[ | ||
| 457 | - this.stem.indexs | ||
| 458 | - ].knowledge = this.stem.knowledge.join("#"); | ||
| 459 | - } else { | ||
| 460 | - this.questionList[this.stem.index].knowledge = | ||
| 461 | - this.stem.knowledge.join("#"); | ||
| 462 | - } | ||
| 463 | - this.dialogKnowledge = false; | ||
| 464 | - }, | ||
| 465 | - //end | ||
| 466 | - | ||
| 467 | linkBack() { | 441 | linkBack() { |
| 468 | this.$router.go(-1); | 442 | this.$router.go(-1); |
| 469 | }, | 443 | }, |
| @@ -884,6 +858,7 @@ export default { | @@ -884,6 +858,7 @@ export default { | ||
| 884 | types[i].answerList = types[i].answerList.slice(0, -1); | 858 | types[i].answerList = types[i].answerList.slice(0, -1); |
| 885 | } | 859 | } |
| 886 | if (types[i].subNum >= 5) { | 860 | if (types[i].subNum >= 5) { |
| 861 | + if (!item.subQuestions) continue; | ||
| 887 | item.subQuestions.splice( | 862 | item.subQuestions.splice( |
| 888 | types[i].index + i + 1, | 863 | types[i].index + i + 1, |
| 889 | 0, | 864 | 0, |
| @@ -969,7 +944,6 @@ export default { | @@ -969,7 +944,6 @@ export default { | ||
| 969 | width: 100%; | 944 | width: 100%; |
| 970 | box-shadow: none; | 945 | box-shadow: none; |
| 971 | border: none; | 946 | border: none; |
| 972 | - height: 400px; | ||
| 973 | } | 947 | } |
| 974 | 948 | ||
| 975 | .screenshot-img { | 949 | .screenshot-img { |
| @@ -991,7 +965,7 @@ export default { | @@ -991,7 +965,7 @@ export default { | ||
| 991 | } | 965 | } |
| 992 | 966 | ||
| 993 | .btn-box { | 967 | .btn-box { |
| 994 | - width: calc(100% - 240px); | 968 | + width: calc(100% - 300px); |
| 995 | position: fixed; | 969 | position: fixed; |
| 996 | right: 40px; | 970 | right: 40px; |
| 997 | bottom: 20px; | 971 | bottom: 20px; |
src/views/examinationPaper/edit_Old.vue
| @@ -414,7 +414,7 @@ | @@ -414,7 +414,7 @@ | ||
| 414 | /> | 414 | /> |
| 415 | <el-upload | 415 | <el-upload |
| 416 | class="upload-demo" | 416 | class="upload-demo" |
| 417 | - action="http://121.40.127.171/file/uploadImg" | 417 | + :action="uploadUrl" |
| 418 | :limit="1" | 418 | :limit="1" |
| 419 | :on-success="upSuccess" | 419 | :on-success="upSuccess" |
| 420 | :on-error="upError" | 420 | :on-error="upError" |
| @@ -471,6 +471,7 @@ | @@ -471,6 +471,7 @@ | ||
| 471 | </template> | 471 | </template> |
| 472 | 472 | ||
| 473 | <script> | 473 | <script> |
| 474 | +import conf from "@/config/index"; | ||
| 474 | import { deepClone, checkAnswer } from "utils"; | 475 | import { deepClone, checkAnswer } from "utils"; |
| 475 | export default { | 476 | export default { |
| 476 | data() { | 477 | data() { |
| @@ -519,6 +520,22 @@ export default { | @@ -519,6 +520,22 @@ export default { | ||
| 519 | }; | 520 | }; |
| 520 | }, | 521 | }, |
| 521 | computed: { | 522 | computed: { |
| 523 | + uploadUrl: function () { | ||
| 524 | + var requestUrl = ''; | ||
| 525 | + | ||
| 526 | + var ogrinUrl = '/file/uploadImg'; | ||
| 527 | + | ||
| 528 | + var baseUrl = conf.baseURL; | ||
| 529 | + | ||
| 530 | + if (baseUrl == '/' && ogrinUrl.indexOf('/') == 0) { | ||
| 531 | + requestUrl = ogrinUrl; | ||
| 532 | + } | ||
| 533 | + else { | ||
| 534 | + requestUrl = baseUrl + ogrinUrl | ||
| 535 | + } | ||
| 536 | + | ||
| 537 | + return requestUrl; | ||
| 538 | + }, | ||
| 522 | allScore: function () { | 539 | allScore: function () { |
| 523 | let score = 0; | 540 | let score = 0; |
| 524 | this.questionList?.map((item) => { | 541 | this.questionList?.map((item) => { |
src/views/index/mainIndex.vue
| @@ -108,8 +108,16 @@ | @@ -108,8 +108,16 @@ | ||
| 108 | </li> | 108 | </li> |
| 109 | </template> | 109 | </template> |
| 110 | </ul> | 110 | </ul> |
| 111 | - <ul class="nav-list" v-if="type == 'ROLE_JIAOSHI' || type == 'ROLE_BANZHUREN'"> | ||
| 112 | - <template v-for="item in navList"> | 111 | + <ul v-if="type == 'ROLE_JIAOSHI' || type == 'ROLE_BANZHUREN' || type == 'ROLE_NIANJI'"> |
| 112 | + <template> | ||
| 113 | + <div style="margin: auto;"> | ||
| 114 | + <el-image :src="logo" /> | ||
| 115 | + </div> | ||
| 116 | + <div style="margin: auto;text-align: center;"> | ||
| 117 | + <h1 style="font-size: 26px;">欢迎使用中天易教</h1> | ||
| 118 | + </div> | ||
| 119 | + </template> | ||
| 120 | + <!-- <template v-for="item in navList"> | ||
| 113 | <li v-if="!item.path.includes('dataSync')" :key="item.path" class="nav-item item4" @click="links(item.path)"> | 121 | <li v-if="!item.path.includes('dataSync')" :key="item.path" class="nav-item item4" @click="links(item.path)"> |
| 114 | <img class="icon" :src="getImgs(item.path)" alt="" /> | 122 | <img class="icon" :src="getImgs(item.path)" alt="" /> |
| 115 | <div class="text" v-if="item.path == '/examinationPaper'"> | 123 | <div class="text" v-if="item.path == '/examinationPaper'"> |
| @@ -118,10 +126,10 @@ | @@ -118,10 +126,10 @@ | ||
| 118 | {{ dataInfo.paperCount }}套答题卡。 | 126 | {{ dataInfo.paperCount }}套答题卡。 |
| 119 | </p> | 127 | </p> |
| 120 | </div> | 128 | </div> |
| 121 | - <!-- <div class="text" v-else-if="item.path == '/portrait'"> | 129 | + <div class="text" v-else-if="item.path == '/portrait'"> |
| 122 | <p class="p1">学生画像</p> | 130 | <p class="p1">学生画像</p> |
| 123 | <p class="p2">共分析{{ dataInfo.imagesCount }}名学生成绩。</p> | 131 | <p class="p2">共分析{{ dataInfo.imagesCount }}名学生成绩。</p> |
| 124 | - </div> --> | 132 | + </div> |
| 125 | <div class="text" v-else-if="item.path == '/ask'"> | 133 | <div class="text" v-else-if="item.path == '/ask'"> |
| 126 | <p class="p1">随堂问报表</p> | 134 | <p class="p1">随堂问报表</p> |
| 127 | <p class="p2" v-if="dataInfo.classPeriodCount"> | 135 | <p class="p2" v-if="dataInfo.classPeriodCount"> |
| @@ -138,7 +146,7 @@ | @@ -138,7 +146,7 @@ | ||
| 138 | <p class="p1">软件下载</p> | 146 | <p class="p1">软件下载</p> |
| 139 | </div> | 147 | </div> |
| 140 | </li> | 148 | </li> |
| 141 | - </template> | 149 | + </template> --> |
| 142 | </ul> | 150 | </ul> |
| 143 | <ul class="nav-list" v-if="type == 'ROLE_PERSONAL'"> | 151 | <ul class="nav-list" v-if="type == 'ROLE_PERSONAL'"> |
| 144 | <li class="nav-item item1" @click="links('/examinationPaper')"> | 152 | <li class="nav-item item1" @click="links('/examinationPaper')"> |
| @@ -216,10 +224,13 @@ | @@ -216,10 +224,13 @@ | ||
| 216 | </template> | 224 | </template> |
| 217 | 225 | ||
| 218 | <script> | 226 | <script> |
| 227 | +import logo from "@/assets/images/EasyQuiz.png"; | ||
| 228 | + | ||
| 219 | export default { | 229 | export default { |
| 220 | name: "mainIndex", | 230 | name: "mainIndex", |
| 221 | data() { | 231 | data() { |
| 222 | return { | 232 | return { |
| 233 | + logo: logo, | ||
| 223 | type: "", | 234 | type: "", |
| 224 | navList: [], | 235 | navList: [], |
| 225 | dataInfo: {}, | 236 | dataInfo: {}, |
src/views/layout/header/header.vue
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | <el-header id="header"> | 3 | <el-header id="header"> |
| 4 | - <span class="hideAside" @click="collapse" | ||
| 5 | - ><i class="el-icon-s-fold" v-show="!isCollapse"></i> | ||
| 6 | - <i class="el-icon-s-unfold" v-show="isCollapse"></i | ||
| 7 | - ></span> | 4 | + <span class="hideAside" @click="collapse"> |
| 5 | + <i class="el-icon-s-fold" style="font-size: 24px !important;" v-show="!isCollapse"></i> | ||
| 6 | + <i class="el-icon-s-unfold" style="font-size: 24px !important;" v-show="isCollapse"></i> | ||
| 7 | + <i class="routeMap"> | ||
| 8 | + <!-- <el-breadcrumb separator="/"> | ||
| 9 | + <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item> | ||
| 10 | + <el-breadcrumb-item><a href="/">活动管理</a></el-breadcrumb-item> | ||
| 11 | + <el-breadcrumb-item>活动列表</el-breadcrumb-item> | ||
| 12 | + </el-breadcrumb> --> | ||
| 13 | + </i> | ||
| 14 | + </span> | ||
| 8 | <ul class="personal"> | 15 | <ul class="personal"> |
| 9 | <!-- <li> | 16 | <!-- <li> |
| 10 | <langSelect></langSelect> | 17 | <langSelect></langSelect> |
| 11 | </li> --> | 18 | </li> --> |
| 12 | - <li | ||
| 13 | - class="dropdown-box" | ||
| 14 | - v-if="role != 'ROLE_PERSONAL' && role != 'ROLE_PINGTAI'" | ||
| 15 | - > | 19 | + <li class="dropdown-box" v-if="role != 'ROLE_PERSONAL' && role != 'ROLE_PINGTAI'"> |
| 16 | <div class="userInfo"> | 20 | <div class="userInfo"> |
| 17 | <img :src="avatar" /> | 21 | <img :src="avatar" /> |
| 18 | <div class="txt"> | 22 | <div class="txt"> |
| @@ -21,19 +25,11 @@ | @@ -21,19 +25,11 @@ | ||
| 21 | </div> | 25 | </div> |
| 22 | <i class="el-icon-arrow-down"></i> | 26 | <i class="el-icon-arrow-down"></i> |
| 23 | </div> | 27 | </div> |
| 24 | - <el-dropdown | ||
| 25 | - class="dropdown" | ||
| 26 | - @command="handleCommand" | ||
| 27 | - trigger="click" | ||
| 28 | - > | 28 | + <el-dropdown class="dropdown" @command="handleCommand" trigger="click"> |
| 29 | <div class="el-dropdown-link dropdown-link"></div> | 29 | <div class="el-dropdown-link dropdown-link"></div> |
| 30 | <el-dropdown-menu slot="dropdown" v-if="permissions.length"> | 30 | <el-dropdown-menu slot="dropdown" v-if="permissions.length"> |
| 31 | - <el-dropdown-item | ||
| 32 | - v-for="item in permissions" | ||
| 33 | - :key="item.role" | ||
| 34 | - :command="item.role" | ||
| 35 | - >{{ item.roleName }}</el-dropdown-item | ||
| 36 | - > | 31 | + <el-dropdown-item v-for="item in permissions" :key="item.role" :command="item.role">{{ item.roleName |
| 32 | + }}</el-dropdown-item> | ||
| 37 | </el-dropdown-menu> | 33 | </el-dropdown-menu> |
| 38 | </el-dropdown> | 34 | </el-dropdown> |
| 39 | </li> | 35 | </li> |
| @@ -45,11 +41,7 @@ | @@ -45,11 +41,7 @@ | ||
| 45 | </div> | 41 | </div> |
| 46 | </div> | 42 | </div> |
| 47 | </li> | 43 | </li> |
| 48 | - <li | ||
| 49 | - class="dropdown-box" | ||
| 50 | - v-if="role == 'ROLE_PERSONAL'" | ||
| 51 | - @click="linkToUserInfo" | ||
| 52 | - > | 44 | + <li class="dropdown-box" v-if="role == 'ROLE_PERSONAL'" @click="linkToUserInfo"> |
| 53 | <div class="userInfo"> | 45 | <div class="userInfo"> |
| 54 | <img :src="avatar" /> | 46 | <img :src="avatar" /> |
| 55 | <div class="txt"> | 47 | <div class="txt"> |
| @@ -59,87 +51,34 @@ | @@ -59,87 +51,34 @@ | ||
| 59 | </div> | 51 | </div> |
| 60 | </li> | 52 | </li> |
| 61 | 53 | ||
| 62 | - <li | ||
| 63 | - class="fullScreen" | ||
| 64 | - v-if="role != 'ROLE_PERSONAL' && !code" | ||
| 65 | - @click="openPwd" | ||
| 66 | - > | ||
| 67 | - <el-tooltip | ||
| 68 | - class="item" | ||
| 69 | - effect="dark" | ||
| 70 | - content="修改密码" | ||
| 71 | - placement="bottom" | ||
| 72 | - ><i class="el-icon el-icon-key"></i | ||
| 73 | - ></el-tooltip> | 54 | + <li class="fullScreen" v-if="role != 'ROLE_PERSONAL' && !code" @click="openPwd"> |
| 55 | + <el-tooltip class="item" effect="dark" content="修改密码" placement="bottom"><i | ||
| 56 | + class="el-icon el-icon-key"></i></el-tooltip> | ||
| 74 | </li> | 57 | </li> |
| 75 | <li class="fullScreen" @click="fullScreen"> | 58 | <li class="fullScreen" @click="fullScreen"> |
| 76 | - <el-tooltip | ||
| 77 | - class="item" | ||
| 78 | - effect="dark" | ||
| 79 | - content="全屏" | ||
| 80 | - placement="bottom" | ||
| 81 | - ><i class="el-icon el-icon-full-screen"></i | ||
| 82 | - ></el-tooltip> | 59 | + <el-tooltip class="item" effect="dark" content="全屏" placement="bottom"><i |
| 60 | + class="el-icon el-icon-full-screen"></i></el-tooltip> | ||
| 83 | </li> | 61 | </li> |
| 84 | <li v-if="code && (role == 'ROLE_BANZHUREN' || role == 'ROLE_JIAOSHI')"> | 62 | <li v-if="code && (role == 'ROLE_BANZHUREN' || role == 'ROLE_JIAOSHI')"> |
| 85 | - <el-tooltip | ||
| 86 | - class="item" | ||
| 87 | - effect="dark" | ||
| 88 | - content="老平台入口" | ||
| 89 | - placement="bottom" | ||
| 90 | - > | ||
| 91 | - <i @click="_LinkOld" class="el-icon el-icon-guide"></i | ||
| 92 | - ></el-tooltip> | 63 | + <el-tooltip class="item" effect="dark" content="老平台入口" placement="bottom"> |
| 64 | + <i @click="_LinkOld" class="el-icon el-icon-guide"></i></el-tooltip> | ||
| 93 | </li> | 65 | </li> |
| 94 | <li> | 66 | <li> |
| 95 | - <el-tooltip | ||
| 96 | - class="item" | ||
| 97 | - effect="dark" | ||
| 98 | - content="退出" | ||
| 99 | - placement="bottom" | ||
| 100 | - > | ||
| 101 | - <i @click="logOut" class="el-icon el-icon-switch-button"></i | ||
| 102 | - ></el-tooltip> | 67 | + <el-tooltip class="item" effect="dark" content="退出" placement="bottom"> |
| 68 | + <i @click="logOut" class="el-icon el-icon-switch-button"></i></el-tooltip> | ||
| 103 | </li> | 69 | </li> |
| 104 | </ul> | 70 | </ul> |
| 105 | </el-header> | 71 | </el-header> |
| 106 | <!-- <tabNav></tabNav> --> | 72 | <!-- <tabNav></tabNav> --> |
| 107 | <el-dialog :append-to-body="true" :close-on-click-modal="false" title="修改密码" :visible.sync="diaPass" width="400"> | 73 | <el-dialog :append-to-body="true" :close-on-click-modal="false" title="修改密码" :visible.sync="diaPass" width="400"> |
| 108 | - <el-form | ||
| 109 | - v-loading="loading" | ||
| 110 | - ref="formPass" | ||
| 111 | - class="form-box" | ||
| 112 | - :model="password" | ||
| 113 | - :rules="rulesPassword" | ||
| 114 | - label-width="160px" | ||
| 115 | - > | ||
| 116 | - <el-form-item label="旧密码:" prop="oldPassword" | ||
| 117 | - ><el-col :span="10" | ||
| 118 | - ><el-input | ||
| 119 | - maxlength="30" | ||
| 120 | - v-model="password.oldPassword" | ||
| 121 | - placeholder="请输入密码" | ||
| 122 | - show-password | ||
| 123 | - ></el-input></el-col | ||
| 124 | - ></el-form-item> | ||
| 125 | - <el-form-item label="新密码:" prop="password" | ||
| 126 | - ><el-col :span="10" | ||
| 127 | - ><el-input | ||
| 128 | - maxlength="30" | ||
| 129 | - v-model="password.password" | ||
| 130 | - placeholder="请输入新密码" | ||
| 131 | - show-password | ||
| 132 | - ></el-input></el-col | ||
| 133 | - ></el-form-item> | ||
| 134 | - <el-form-item label="确认密码:" prop="resetPassword" | ||
| 135 | - ><el-col :span="10" | ||
| 136 | - ><el-input | ||
| 137 | - maxlength="30" | ||
| 138 | - v-model="password.resetPassword" | ||
| 139 | - placeholder="请输入新密码" | ||
| 140 | - show-password | ||
| 141 | - ></el-input></el-col | ||
| 142 | - ></el-form-item> | 74 | + <el-form v-loading="loading" ref="formPass" class="form-box" :model="password" :rules="rulesPassword" |
| 75 | + label-width="160px"> | ||
| 76 | + <el-form-item label="旧密码:" prop="oldPassword"><el-col :span="10"><el-input maxlength="30" | ||
| 77 | + v-model="password.oldPassword" placeholder="请输入密码" show-password></el-input></el-col></el-form-item> | ||
| 78 | + <el-form-item label="新密码:" prop="password"><el-col :span="10"><el-input maxlength="30" | ||
| 79 | + v-model="password.password" placeholder="请输入新密码" show-password></el-input></el-col></el-form-item> | ||
| 80 | + <el-form-item label="确认密码:" prop="resetPassword"><el-col :span="10"><el-input maxlength="30" | ||
| 81 | + v-model="password.resetPassword" placeholder="请输入新密码" show-password></el-input></el-col></el-form-item> | ||
| 143 | </el-form> | 82 | </el-form> |
| 144 | <div class="dialog-footer" slot="footer"> | 83 | <div class="dialog-footer" slot="footer"> |
| 145 | <el-button @click="editPass">确 定</el-button> | 84 | <el-button @click="editPass">确 定</el-button> |
| @@ -307,7 +246,7 @@ export default { | @@ -307,7 +246,7 @@ export default { | ||
| 307 | window.location.href = data; | 246 | window.location.href = data; |
| 308 | } else { | 247 | } else { |
| 309 | localStorage.setItem("token", ""); | 248 | localStorage.setItem("token", ""); |
| 310 | - sessionStorage.setItem("addTab","") | 249 | + sessionStorage.setItem("addTab", "") |
| 311 | this.$store.commit("setToken", ""); | 250 | this.$store.commit("setToken", ""); |
| 312 | this.$store.commit("setInfo", ""); | 251 | this.$store.commit("setInfo", ""); |
| 313 | this.$store.commit("setRouters", ""); | 252 | this.$store.commit("setRouters", ""); |
| @@ -331,7 +270,11 @@ $top: top; | @@ -331,7 +270,11 @@ $top: top; | ||
| 331 | $bottom: bottom; | 270 | $bottom: bottom; |
| 332 | $left: left; | 271 | $left: left; |
| 333 | $right: right; | 272 | $right: right; |
| 334 | -$leftright: ($left, $right); | 273 | +$leftright: ( |
| 274 | + $left, | ||
| 275 | + $right | ||
| 276 | +); | ||
| 277 | + | ||
| 335 | %w100 { | 278 | %w100 { |
| 336 | width: 100%; | 279 | width: 100%; |
| 337 | } | 280 | } |
| @@ -368,16 +311,24 @@ ul.el-menu { | @@ -368,16 +311,24 @@ ul.el-menu { | ||
| 368 | justify-content: space-between; | 311 | justify-content: space-between; |
| 369 | color: #fff; | 312 | color: #fff; |
| 370 | padding: 0 20px 0 10px; | 313 | padding: 0 20px 0 10px; |
| 314 | + | ||
| 315 | + .routeMap { | ||
| 316 | + display: inline-block; | ||
| 317 | + } | ||
| 318 | + | ||
| 371 | .hideAside { | 319 | .hideAside { |
| 372 | @extend %cursor; | 320 | @extend %cursor; |
| 321 | + | ||
| 373 | i { | 322 | i { |
| 374 | font-size: 24px; | 323 | font-size: 24px; |
| 375 | line-height: 70px; | 324 | line-height: 70px; |
| 376 | } | 325 | } |
| 377 | } | 326 | } |
| 327 | + | ||
| 378 | .personal { | 328 | .personal { |
| 379 | display: flex; | 329 | display: flex; |
| 380 | flex-direction: row; | 330 | flex-direction: row; |
| 331 | + | ||
| 381 | li { | 332 | li { |
| 382 | @include set-value(margin, 8px); | 333 | @include set-value(margin, 8px); |
| 383 | font-size: 12px; | 334 | font-size: 12px; |
| @@ -386,40 +337,48 @@ ul.el-menu { | @@ -386,40 +337,48 @@ ul.el-menu { | ||
| 386 | line-height: 70px; | 337 | line-height: 70px; |
| 387 | } | 338 | } |
| 388 | } | 339 | } |
| 340 | + | ||
| 389 | .userInfo { | 341 | .userInfo { |
| 390 | display: flex; | 342 | display: flex; |
| 391 | align-items: center; | 343 | align-items: center; |
| 392 | height: 70px; | 344 | height: 70px; |
| 393 | @extend %cursor; | 345 | @extend %cursor; |
| 346 | + | ||
| 394 | .txt { | 347 | .txt { |
| 395 | display: flex; | 348 | display: flex; |
| 396 | flex-direction: column; | 349 | flex-direction: column; |
| 397 | justify-content: center; | 350 | justify-content: center; |
| 398 | margin: 0 5px; | 351 | margin: 0 5px; |
| 352 | + | ||
| 399 | p { | 353 | p { |
| 400 | line-height: 20px; | 354 | line-height: 20px; |
| 401 | font-size: 12px; | 355 | font-size: 12px; |
| 402 | } | 356 | } |
| 403 | } | 357 | } |
| 358 | + | ||
| 404 | img { | 359 | img { |
| 405 | border-radius: 5px; | 360 | border-radius: 5px; |
| 406 | width: 28px; | 361 | width: 28px; |
| 407 | height: 28px; | 362 | height: 28px; |
| 408 | } | 363 | } |
| 409 | } | 364 | } |
| 365 | + | ||
| 410 | .el-icon { | 366 | .el-icon { |
| 411 | font-size: 20px; | 367 | font-size: 20px; |
| 412 | line-height: 50px; | 368 | line-height: 50px; |
| 413 | } | 369 | } |
| 370 | + | ||
| 414 | .fa-lg { | 371 | .fa-lg { |
| 415 | color: #fff; | 372 | color: #fff; |
| 416 | } | 373 | } |
| 374 | + | ||
| 417 | .dropdown { | 375 | .dropdown { |
| 418 | position: absolute; | 376 | position: absolute; |
| 419 | top: 0; | 377 | top: 0; |
| 420 | right: 0; | 378 | right: 0; |
| 421 | bottom: 0; | 379 | bottom: 0; |
| 422 | left: 0; | 380 | left: 0; |
| 381 | + | ||
| 423 | .dropdown-link { | 382 | .dropdown-link { |
| 424 | height: 70px; | 383 | height: 70px; |
| 425 | } | 384 | } |
src/views/login/index.vue
| @@ -171,9 +171,9 @@ $cursor: #000; | @@ -171,9 +171,9 @@ $cursor: #000; | ||
| 171 | } | 171 | } |
| 172 | .login-container { | 172 | .login-container { |
| 173 | width: 100%; | 173 | width: 100%; |
| 174 | - height: 150vh; | 174 | + height: 100%; |
| 175 | background: url("../../assets/images/login-bg.png") no-repeat; | 175 | background: url("../../assets/images/login-bg.png") no-repeat; |
| 176 | - background-size: cover; | 176 | + background-size: 100% 100%; |
| 177 | overflow: hidden; | 177 | overflow: hidden; |
| 178 | display: flex; | 178 | display: flex; |
| 179 | justify-content: center; | 179 | justify-content: center; |
vue.config.js
| @@ -24,7 +24,8 @@ module.exports = { | @@ -24,7 +24,8 @@ module.exports = { | ||
| 24 | "/": { | 24 | "/": { |
| 25 | // target:"http://ezquiz.sunvotecloud.cn", | 25 | // target:"http://ezquiz.sunvotecloud.cn", |
| 26 | // target:"http://192.168.1.151:8089", | 26 | // target:"http://192.168.1.151:8089", |
| 27 | - target: "http://121.40.127.171:8089", | 27 | + target: "http://121.40.127.171:8090", |
| 28 | + // target: "http://121.40.127.171", | ||
| 28 | // target:"http://127.0.0.1:8089", | 29 | // target:"http://127.0.0.1:8089", |
| 29 | changeOrigin: true, | 30 | changeOrigin: true, |
| 30 | ws: true, | 31 | ws: true, |
| @@ -49,6 +50,7 @@ module.exports = { | @@ -49,6 +50,7 @@ module.exports = { | ||
| 49 | .set("utils", resolve("src/utils")) | 50 | .set("utils", resolve("src/utils")) |
| 50 | .set("store", resolve("src/store")) | 51 | .set("store", resolve("src/store")) |
| 51 | .set("views", resolve("src/views")) | 52 | .set("views", resolve("src/views")) |
| 53 | + .set("config", resolve("src/config")) | ||
| 52 | .set("api", resolve("src/api")); | 54 | .set("api", resolve("src/api")); |
| 53 | if (IS_PROD) { | 55 | if (IS_PROD) { |
| 54 | config.plugin("webpack-report").use(BundleAnalyzerPlugin, [ | 56 | config.plugin("webpack-report").use(BundleAnalyzerPlugin, [ |