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 | 13 | mounted() { | 
| 14 | 14 | |
| 15 | 15 | }, | 
| 16 | - created() { | |
| 17 | - this.$nextTick(() => { | |
| 16 | + methods: { | |
| 17 | + _reSize() { | |
| 18 | + | |
| 18 | 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 | 57 | transform: scale(${scale}) ${translate}; | 
| 62 | 58 | transform-origin: top left; | 
| 63 | 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 | 66 | transform: scale(${scale}) ${translate}; | 
| 71 | 67 | transform-origin: top left; | 
| 72 | 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 | 74 | transform: scale(${scale}) ${translate}; | 
| 79 | 75 | transform-origin: top left; | 
| 80 | 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 | 90 | if (document.createEvent) { | 
| 93 | - var event = document.createEvent("HTMLEvents"); | |
| 94 | - event.initEvent("resize", true, true); | |
| 95 | - window.dispatchEvent(event); | |
| 91 | + that._reSize(); | |
| 96 | 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 | 102 | body { | 
| 107 | 103 | margin: 0px; | 
| 108 | 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 | 106 | -webkit-font-smoothing: antialiased; | 
| 111 | 107 | } | 
| 112 | 108 | ... | ... | 
src/api/apis/apis.js
| ... | ... | @@ -23,12 +23,22 @@ const downService = (url, data) => { | 
| 23 | 23 | responseType: 'arraybuffer', | 
| 24 | 24 | }); | 
| 25 | 25 | } | 
| 26 | -export default { | |
| 26 | +export default { | |
| 27 | 27 | // 知识点 | 
| 28 | 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 | 44 | gTestExamReport(data) { | 
| ... | ... | @@ -213,6 +223,9 @@ export default { | 
| 213 | 223 | periodReportList(data) { | 
| 214 | 224 | return defaltService(setUpUrls.periodReportList, data) | 
| 215 | 225 | }, | 
| 226 | + classdiffreport(data) { | |
| 227 | + return defaltService(setUpUrls.classdiffreport, data) | |
| 228 | + }, | |
| 216 | 229 | //任课老师-查询阶段问答报表 | 
| 217 | 230 | phaseAnswerReport(data) { | 
| 218 | 231 | return defaltService(setUpUrls.phaseAnswerReport, data) | 
| ... | ... | @@ -680,6 +693,9 @@ export default { | 
| 680 | 693 | pModifyPaper(data) { | 
| 681 | 694 | return defaltService(setUpUrls.pModifyPaper, data) | 
| 682 | 695 | }, | 
| 696 | + pModifyPaperNew(data) { | |
| 697 | + return defaltService(setUpUrls.pModifyPaperNew, data) | |
| 698 | + }, | |
| 683 | 699 | // 删除答题卡 | 
| 684 | 700 | pDelPaper(data) { | 
| 685 | 701 | return defaltService(setUpUrls.pDelPaper, data) | ... | ... | 
src/api/axios.js
| ... | ... | @@ -3,7 +3,7 @@ import NProgress from "nprogress"; | 
| 3 | 3 | import { Message } from "element-ui"; | 
| 4 | 4 | import router from "@/router/index"; | 
| 5 | 5 | import store from "@/store"; | 
| 6 | -import conf from "../config/index"; // 路径配置 | |
| 6 | +import conf from "@/config/index"; // 路径配置 | |
| 7 | 7 | import { getURLParams } from "@/utils"; | 
| 8 | 8 | |
| 9 | 9 | let code = getURLParams("code") || getURLParams("dockkey") || localStorage.getItem("csCode") || ""; | ... | ... | 
src/api/urls/apis.js
| 1 | 1 | |
| 2 | 2 | export default { | 
| 3 | - // 年级组长-查询报表列表 | |
| 4 | - gKnowledge: "/api_html/knowledge/list", | |
| 3 | + // 年级组长-查询报表列表 | |
| 4 | + gKnowledge: "/knowledge/list", | |
| 5 | 5 | // 年级组长-查询报表列表 | 
| 6 | 6 | gListExamReport: "/api_html/grade/manager/listExamReport", | 
| 7 | 7 | // 年级组长-查询管理的班级 | 
| ... | ... | @@ -17,6 +17,8 @@ export default { | 
| 17 | 17 | gExportPhaseInteractiveReport: "/api_html/grade/manager/exportPhaseInteractiveReport", | 
| 18 | 18 | // 年级组长-成绩测验单 | 
| 19 | 19 | gtestExamReport: "/api_html/grade/manager/testExamReport", | 
| 20 | + // 年级组长-考试概要 | |
| 21 | + gclassdiffReport: "/api_html/grade/manager/classdiffreport", | |
| 20 | 22 | // 年级组长-试题分析 | 
| 21 | 23 | gpaperExamReport: "/api_html/grade/manager/paperExamReport", | 
| 22 | 24 | // 年级组长-学生成绩排行 | 
| ... | ... | @@ -62,13 +64,15 @@ export default { | 
| 62 | 64 | |
| 63 | 65 | //任课老师-查询管理班级 | 
| 64 | 66 | tClassList: "/api_html/teaching/classList", | 
| 67 | + //任老师-报表详情 | |
| 68 | + classdiffreport: "/api_html/teaching/classdiffreport", | |
| 65 | 69 | tpaperExamReport: "/api_html/teaching/paperExamReport", | 
| 66 | 70 | // 任课老师-学生成绩排行 | 
| 67 | 71 | tstudentExamReport2: "/api_html/teaching/studentExamReport2", | 
| 68 | 72 | // 任课老师-班级情况对比 | 
| 69 | 73 | tclassdiffExamReport: "/api_html/teaching/classdiffExamReport", | 
| 70 | 74 | tClassFromGrade: "/api_html/teaching/grade/classList", | 
| 71 | - tClassGrade:'/api_html/teaching/grade', | |
| 75 | + tClassGrade: '/api_html/teaching/grade', | |
| 72 | 76 | //任课老师-测验成绩单 | 
| 73 | 77 | tTestExamReport: "/api_html/teaching/testExamReport", | 
| 74 | 78 | //任课老师-查询答题卡详情 | 
| ... | ... | @@ -82,7 +86,7 @@ export default { | 
| 82 | 86 | phaseAnswerReport: "/api_html/teaching/phaseAnswerReport", | 
| 83 | 87 | //任课老师-查询阶段互动报表 | 
| 84 | 88 | phaseInteractiveReport: "/api_html/teaching/phaseInteractiveReport", | 
| 85 | - exportPhaseExamReport: "/api_html/teaching/exportPhaseExamReport", | |
| 89 | + exportPhaseExamReport: "/api_html/teaching/exportPhaseExamReport", | |
| 86 | 90 | //任课老师-查询课时题目列表 | 
| 87 | 91 | periodQuestionList: "/api_html/teaching/periodQuestionList", | 
| 88 | 92 | //任课老师-设置课时报表答案 | 
| ... | ... | @@ -93,6 +97,8 @@ export default { | 
| 93 | 97 | periodQuestionReport: "/api_html/teaching/periodQuestionReport", | 
| 94 | 98 | //任课老师-查询课时学生答题明细 | 
| 95 | 99 | periodStudentReport: "/api_html/teaching/periodStudentReport", | 
| 100 | + // 修改答题卡 | |
| 101 | + pModifyPaperNew: "/api_html/teaching/modifyPaperNew", | |
| 96 | 102 | //任课老师-分页查询即时测报表 | 
| 97 | 103 | examReportList: "/api_html/teaching/examReportList", | 
| 98 | 104 | //任课老师-查询阶段测练报表 | ... | ... | 
src/assets/css/index.scss
| ... | ... | @@ -347,6 +347,26 @@ ul { | 
| 347 | 347 | |
| 348 | 348 | // 默认实体 | 
| 349 | 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 | 370 | font-size: 14px; | 
| 351 | 371 | font-weight: 400; | 
| 352 | 372 | color: #303133; | 
| ... | ... | @@ -386,7 +406,7 @@ ul { | 
| 386 | 406 | } | 
| 387 | 407 | |
| 388 | 408 | tr, | 
| 389 | - td { | |
| 409 | + td:not(.anwser-column) { | |
| 390 | 410 | height: 40px; | 
| 391 | 411 | padding: 5px 0px !important; | 
| 392 | 412 | border: 1px solid #ebeef5; | 
| ... | ... | @@ -432,6 +452,12 @@ ul { | 
| 432 | 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 | 461 | .filter-input, | 
| 436 | 462 | .filter-select { | 
| 437 | 463 | width: 13%; | 
| ... | ... | @@ -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 | 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 | 565 | font-size: 16px !important; | 
| 481 | 566 | } | 
| 482 | 567 | |
| 483 | 568 | .el-form :not(h1, h2, h3, h4, h5, h6), | 
| 484 | 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 | 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 | 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 | 592 | .default-body .default-filter * { | 
| 498 | 593 | line-height: 38px !important; | 
| 499 | - } | |
| 594 | + } | |
| 500 | 595 | |
| 501 | 596 | .card-content { | 
| 502 | 597 | width: 48% !important; | 
| ... | ... | @@ -506,13 +601,16 @@ ul { | 
| 506 | 601 | font-size: 24px !important; | 
| 507 | 602 | } | 
| 508 | 603 | |
| 509 | - .el-select-dropdown__item * { | |
| 604 | + .el-select-dropdown__item *, | |
| 605 | + .small-button * { | |
| 510 | 606 | font-size: 12px !important; | 
| 511 | 607 | } | 
| 512 | 608 | |
| 513 | 609 | .el-form :not(h1, h2, h3, h4, h5, h6), | 
| 514 | 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 | 614 | font-size: 12px !important; | 
| 517 | 615 | } | 
| 518 | 616 | ... | ... | 
src/components/upload.vue
| ... | ... | @@ -2,8 +2,9 @@ | 
| 2 | 2 | <div> | 
| 3 | 3 | <slot name="down"></slot> | 
| 4 | 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 | 8 | <!-- accept="application/vnd.ms-excel" --> | 
| 8 | 9 | <div class="upload-btn"> | 
| 9 | 10 | <i class="el-icon-upload"></i> | 
| ... | ... | @@ -11,10 +12,15 @@ | 
| 11 | 12 | </div> | 
| 12 | 13 | </el-upload> | 
| 13 | 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 | 19 | </div> | 
| 15 | 20 | </template> | 
| 16 | 21 | |
| 17 | 22 | <script> | 
| 23 | +import conf from "@/config/index"; // 路径配置 | |
| 18 | 24 | export default { | 
| 19 | 25 | name: "downUpData", | 
| 20 | 26 | props: { | 
| ... | ... | @@ -36,6 +42,28 @@ export default { | 
| 36 | 42 | }, | 
| 37 | 43 | }, | 
| 38 | 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 | 67 | query: function () { | 
| 40 | 68 | if (this.id) { | 
| 41 | 69 | return { | 
| ... | ... | @@ -57,12 +85,16 @@ export default { | 
| 57 | 85 | data() { | 
| 58 | 86 | return { | 
| 59 | 87 | file: null, | 
| 88 | + isOked: false | |
| 60 | 89 | }; | 
| 61 | 90 | }, | 
| 62 | 91 | methods: { | 
| 92 | + removec(file, fileList) { | |
| 93 | + this.file = null; | |
| 94 | + this.isOked = false; | |
| 95 | + }, | |
| 63 | 96 | async submitUpload() { | 
| 64 | 97 | this.$refs.upload.submit(); | 
| 65 | - | |
| 66 | 98 | // const formData = new FormData() | 
| 67 | 99 | // formData.append('id',this.componentId) | 
| 68 | 100 | // formData.append('file',new File(this.file.raw)) | 
| ... | ... | @@ -75,6 +107,7 @@ export default { | 
| 75 | 107 | // } | 
| 76 | 108 | }, | 
| 77 | 109 | upSuccess(res) { | 
| 110 | + this.isOked = true; | |
| 78 | 111 | if (res && res.status == 0) { | 
| 79 | 112 | this.$message.success("上传成功"); | 
| 80 | 113 | this.$emit("upSuccess", res); | 
| ... | ... | @@ -84,6 +117,7 @@ export default { | 
| 84 | 117 | } | 
| 85 | 118 | }, | 
| 86 | 119 | upError(res) { | 
| 120 | + this.isOked = true; | |
| 87 | 121 | if (res && res.status == 0) { | 
| 88 | 122 | this.$message.error("上传失败"); | 
| 89 | 123 | } else { | 
| ... | ... | @@ -101,11 +135,13 @@ export default { | 
| 101 | 135 | .d1 { | 
| 102 | 136 | padding: 10px; | 
| 103 | 137 | overflow: hidden; | 
| 138 | + | |
| 104 | 139 | :deep(.el-upload-list) { | 
| 105 | 140 | width: 100%; | 
| 106 | 141 | } | 
| 107 | - | |
| 142 | + | |
| 108 | 143 | } | 
| 144 | + | |
| 109 | 145 | .btn { | 
| 110 | 146 | border-radius: 8px; | 
| 111 | 147 | font-weight: normal; | 
| ... | ... | @@ -115,7 +151,7 @@ export default { | 
| 115 | 151 | display: flex; | 
| 116 | 152 | flex-direction: column; | 
| 117 | 153 | align-items: center; | 
| 118 | - | |
| 154 | + | |
| 119 | 155 | } | 
| 120 | 156 | |
| 121 | 157 | .upload-btn { | 
| ... | ... | @@ -131,3 +167,14 @@ export default { | 
| 131 | 167 | |
| 132 | 168 | } | 
| 133 | 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 | 346 | path: "/testReportDetail", | 
| 347 | 347 | iconCls: "", | 
| 348 | 348 | name: "testReportDetail", | 
| 349 | - demoRoles: ["ROLE_JIAOSHI"], | |
| 349 | + demoRoles: ["ROLE_JIAOSHI","ROLE_BANZHUREN"], | |
| 350 | 350 | component: askTestReportDetail, | 
| 351 | 351 | hidden: true, | 
| 352 | 352 | children: [] | ... | ... | 
src/store/index.js
| ... | ... | @@ -41,7 +41,7 @@ const store = new Vuex.Store({ | 
| 41 | 41 | localStorage.setItem("info", JSON.stringify(data)); | 
| 42 | 42 | }, | 
| 43 | 43 | setRouters: (state, routers) => { | 
| 44 | - console.log('current', state); | |
| 44 | + state.addRouters = []; | |
| 45 | 45 | let addrouterList = [] | 
| 46 | 46 | if (state.info.showRole == 'ROLE_PERSONAL') { | 
| 47 | 47 | addrouterList = [...addroutersPersonal] | 
| ... | ... | @@ -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 | 59 | let path = item.children[0]?.path.replace("/", ""); | 
| 61 | 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 | 62 | if (item.children) { | 
| 65 | 63 | item.children = item.children.filter((itemFilter) => { | 
| 66 | 64 | return itemFilter.demoRoles?.includes(state.info.showRole) == true | 
| ... | ... | @@ -102,7 +100,6 @@ const store = new Vuex.Store({ | 
| 102 | 100 | .then((res) => { | 
| 103 | 101 | let response = res; | 
| 104 | 102 | if (response.status == 0) { | 
| 105 | - console.log(response) | |
| 106 | 103 | const userInfo = { ...response.data }; | 
| 107 | 104 | if (userInfo.permissions && userInfo.permissions.length) { | 
| 108 | 105 | userInfo.showRoleName = response.data.permissions[0]?.roleName; | 
| ... | ... | @@ -121,6 +118,7 @@ const store = new Vuex.Store({ | 
| 121 | 118 | hidden: true, | 
| 122 | 119 | children: [], | 
| 123 | 120 | }); | 
| 121 | + sessionStorage.setItem("RouteRefresh", false); | |
| 124 | 122 | if (params.url) { | 
| 125 | 123 | window.location.href = params.url; | 
| 126 | 124 | } else { | ... | ... | 
src/utils/index.js
| ... | ... | @@ -106,30 +106,23 @@ export function deepClone(obj) { | 
| 106 | 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 | 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 | 128 | // // 3DES加密 | 
| ... | ... | @@ -854,74 +847,425 @@ export function formatGradeNameClass(data) { | 
| 854 | 847 | }); | 
| 855 | 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 | 862 | let divs = document.getElementById(id); | 
| 860 | 863 | let awin = window.open("", "_blank"); | 
| 861 | 864 | awin.document.getElementsByTagName( | 
| 862 | 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 | 1110 | </style>`; | 
| 1111 | + var splitNumber = splitParam ? splitParam : 20; | |
| 1112 | + | |
| 912 | 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 | 1258 | if (title) { | 
| 918 | 1259 | let pTit = awin.document.createElement('p') | 
| 919 | 1260 | pTit.className = "tit" | 
| 920 | 1261 | pTit.innerHTML = title | 
| 921 | 1262 | awin.document.body.append(pTit) | 
| 922 | 1263 | } | 
| 1264 | + | |
| 923 | 1265 | awin.document.body.append(aDom); | 
| 1266 | + | |
| 924 | 1267 | awin.print(); | 
| 1268 | + | |
| 925 | 1269 | awin.close() | 
| 926 | 1270 | } | 
| 927 | 1271 | ... | ... | 
src/views/admin/clientVersion/components/upLoad.vue
| ... | ... | @@ -5,7 +5,7 @@ | 
| 5 | 5 | <el-upload | 
| 6 | 6 | class="upload-demo" | 
| 7 | 7 | ref="upload" | 
| 8 | - :action="url" | |
| 8 | + :action="uploadUrl" | |
| 9 | 9 | :multiple="false" | 
| 10 | 10 | :data="{ ...query }" | 
| 11 | 11 | :limit="1" | 
| ... | ... | @@ -24,6 +24,8 @@ | 
| 24 | 24 | </template> | 
| 25 | 25 | |
| 26 | 26 | <script> | 
| 27 | +import conf from "@/config/index"; // 路径配置 | |
| 28 | + | |
| 27 | 29 | export default { | 
| 28 | 30 | name: "downUpData", | 
| 29 | 31 | props: { | 
| ... | ... | @@ -43,6 +45,24 @@ export default { | 
| 43 | 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 | 66 | methods: { | 
| 47 | 67 | async submitUpload() { | 
| 48 | 68 | this.$refs.upload.submit(); | ... | ... | 
src/views/admin/clientVersion/components/upLoadImg.vue
| ... | ... | @@ -4,7 +4,7 @@ | 
| 4 | 4 | <el-upload | 
| 5 | 5 | class="avatar-uploader" | 
| 6 | 6 | ref="upload" | 
| 7 | - :action="url" | |
| 7 | + :action="uploadUrl" | |
| 8 | 8 | :multiple="false" | 
| 9 | 9 | :data="{ ...query }" | 
| 10 | 10 | :limit="1" | 
| ... | ... | @@ -20,6 +20,8 @@ | 
| 20 | 20 | </template> | 
| 21 | 21 | |
| 22 | 22 | <script> | 
| 23 | +import conf from "@/config/index"; // 路径配置 | |
| 24 | + | |
| 23 | 25 | export default { | 
| 24 | 26 | name: "downUpData", | 
| 25 | 27 | props: { | 
| ... | ... | @@ -33,6 +35,24 @@ export default { | 
| 33 | 35 | type: String, | 
| 34 | 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 | 57 | data() { | 
| 38 | 58 | return { | ... | ... | 
src/views/basic/ask/analysis.vue
| ... | ... | @@ -132,7 +132,10 @@ export default { | 
| 132 | 132 | if (this.types == 2) { | 
| 133 | 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 | 140 | setType(type) { | 
| 138 | 141 | this.type = type; | ... | ... | 
src/views/basic/ask/archiving.vue
| ... | ... | @@ -104,8 +104,8 @@ | 
| 104 | 104 | </el-table-column> | 
| 105 | 105 | <el-table-column align="center" :label="index == 0 ? '总参与度' : '参与度'" | 
| 106 | 106 | :prop="'participationRate' + item"><template slot-scope="scoped"> | 
| 107 | - {{ scoped.row["participationRate" + item] }}% | |
| 108 | - </template> | |
| 107 | + {{ scoped.row["participationRate" + item] }}% | |
| 108 | + </template> | |
| 109 | 109 | </el-table-column> | 
| 110 | 110 | <el-table-column align="center" :label="index == 0 ? '总正确率' : '正确率'" | 
| 111 | 111 | :prop="'correctRate' + item"><template slot-scope="scoped">{{ scoped.row["correctRate" + item] | 
| ... | ... | @@ -233,8 +233,10 @@ export default { | 
| 233 | 233 | methods: { | 
| 234 | 234 | print() { | 
| 235 | 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 | 242 | changeSub(val) { | ... | ... | 
src/views/basic/ask/components/answerQustion.vue
| ... | ... | @@ -307,9 +307,9 @@ export default { | 
| 307 | 307 | detail.map((items, index) => { | 
| 308 | 308 | params["isRight" + index] = items.isRight; | 
| 309 | 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 | 314 | : items.answer; | 
| 315 | 315 | }); | ... | ... | 
src/views/basic/ask/components/example.vue
| ... | ... | @@ -17,16 +17,16 @@ | 
| 17 | 17 | scoped.row.answerCorrectRate }}%</template></el-table-column> | 
| 18 | 18 | <el-table-column prop="correctAnswer" label="正确答案" align="center"> | 
| 19 | 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 | 24 | : scoped.row.correctAnswer | 
| 25 | 25 | }}</template></el-table-column> | 
| 26 | 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 | 31 | : scoped.row.fallible | 
| 32 | 32 | }}</template></el-table-column> | ... | ... | 
src/views/basic/askTestQuestion/components/askBzrMulti.vue
| 1 | 1 | <template> | 
| 2 | 2 | <div style="margin-right: 20px;width: 100%"> | 
| 3 | 3 | <el-row class="row-type"> | 
| 4 | - <label>阶段报表类型</label> | |
| 4 | + <label>报表类型</label> | |
| 5 | 5 | <el-select class="opration-select" v-model="currentType"> | 
| 6 | 6 | <el-option v-for="(item, index) in types" :lable="item" :key="index" :value="item" /> | 
| 7 | 7 | </el-select> | 
| ... | ... | @@ -50,7 +50,8 @@ | 
| 50 | 50 | }}</template> | 
| 51 | 51 | </el-table-column> | 
| 52 | 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 | 55 | <template slot-scope="scoped"> | 
| 55 | 56 | <el-button type="text" @click="openRandarChart(scoped.row)">查看</el-button> | 
| 56 | 57 | </template> | 
| ... | ... | @@ -99,7 +100,7 @@ | 
| 99 | 100 | <el-dialog :append-to-body="true" class="chart-dia" :visible.sync="redarVisible" :title="radarChart.title" | 
| 100 | 101 | width="800"> | 
| 101 | 102 | <div class="chart-box"> | 
| 102 | - <RadarChart id="radarChart" :params="radarChart" /> | |
| 103 | + <RadarChart id="radarChart" :params="radarChart" :tooltipFormatter="true" /> | |
| 103 | 104 | </div> | 
| 104 | 105 | </el-dialog> | 
| 105 | 106 | </div> | 
| ... | ... | @@ -188,8 +189,29 @@ export default { | 
| 188 | 189 | } | 
| 189 | 190 | }, | 
| 190 | 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 | 216 | async refresh() { | 
| 195 | 217 | await this._changeType(); | 
| ... | ... | @@ -264,7 +286,7 @@ export default { | 
| 264 | 286 | |
| 265 | 287 | let subjectName = []; | 
| 266 | 288 | |
| 267 | - this.answersList = answersResponse.data.list?.map((item) => { | |
| 289 | + this.answersList = answersResponse.data?.list?.map((item) => { | |
| 268 | 290 | |
| 269 | 291 | let params = {}; | 
| 270 | 292 | |
| ... | ... | @@ -291,7 +313,6 @@ export default { | 
| 291 | 313 | |
| 292 | 314 | this.answersOptions = [...optionsList]; | 
| 293 | 315 | |
| 294 | - console.log(this.answersList) | |
| 295 | 316 | }, | 
| 296 | 317 | async _multiDisciplinaryInteraction() { | 
| 297 | 318 | |
| ... | ... | @@ -323,7 +344,7 @@ export default { | 
| 323 | 344 | |
| 324 | 345 | this.interactionList = interactionReponse.data?.list?.map((item) => { | 
| 325 | 346 | let params = {}; | 
| 326 | - item.dataList?.filter((items, index) => { | |
| 347 | + item.dataList?.filter((items, index) => { | |
| 327 | 348 | if (!subjectName.includes(items.subjectName) && items.subjectName != '全部科目') { | 
| 328 | 349 | subjectName.push(items.subjectName); | 
| 329 | 350 | } | ... | ... | 
src/views/basic/askTestQuestion/components/askListReport.vue
| ... | ... | @@ -3,35 +3,35 @@ | 
| 3 | 3 | <el-table class="default-table" :data="$props.datas" border> | 
| 4 | 4 | <el-table-column prop="subjectName" label="科目" width="180" /> | 
| 5 | 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 | 7 | <template slot-scope="scoped"> | 
| 8 | 8 | {{ scoped.row.participationRate }}% | 
| 9 | 9 | </template> | 
| 10 | 10 | </el-table-column> | 
| 11 | - <el-table-column prop="answerCorrectRate" label="已答正确率" width="180" > | |
| 11 | + <el-table-column prop="answerCorrectRate" label="已答正确率" width="180"> | |
| 12 | 12 | <template slot-scope="scoped"> | 
| 13 | 13 | {{ scoped.row.answerCorrectRate }}% | 
| 14 | 14 | </template> | 
| 15 | 15 | </el-table-column> | 
| 16 | - <el-table-column prop="classCorrectRate" label="班级正确率" width="180" > | |
| 16 | + <el-table-column prop="classCorrectRate" label="班级正确率" width="180"> | |
| 17 | 17 | <template slot-scope="scoped"> | 
| 18 | - {{ scoped.row.classCorrectRate }}% | |
| 19 | - </template> | |
| 18 | + {{ scoped.row.classCorrectRate }}% | |
| 19 | + </template> | |
| 20 | 20 | </el-table-column> | 
| 21 | 21 | <el-table-column prop="questionNum" label="题目总数" width="180" /> | 
| 22 | 22 | <el-table-column prop="startTime" label="上课时间" width="220" /> | 
| 23 | 23 | <el-table-column label="操作" width="200"> | 
| 24 | 24 | <template slot-scope="scoped"> | 
| 25 | - <template v-if="scoped.row.answerNum == 0"> | |
| 25 | + <!-- <template v-if="scoped.row.answerNum == 0"> | |
| 26 | 26 | <el-button v-if="role != 'ROLE_BANZHUREN'" type="text" | 
| 27 | 27 | @click="_edit(scoped.row)">设置答案</el-button> | 
| 28 | 28 | <template v-else>未设置答案</template> | 
| 29 | - </template> | |
| 29 | + </template> --> | |
| 30 | 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 | 32 | <el-button class="remove-test" slot="reference" type="text" style="color:red;margin-left:10px" | 
| 33 | 33 | :loading="scoped.row.loading">删除</el-button> | 
| 34 | - </el-popconfirm> | |
| 34 | + </el-popconfirm> --> | |
| 35 | 35 | </template> | 
| 36 | 36 | </el-table-column> | 
| 37 | 37 | </el-table> | 
| ... | ... | @@ -70,13 +70,15 @@ export default { | 
| 70 | 70 | }, | 
| 71 | 71 | }); | 
| 72 | 72 | }, | 
| 73 | - _edit(item) { | |
| 73 | + _edit(item) { | |
| 74 | 74 | this.$router.push({ | 
| 75 | 75 | path: "/examinationPaperEdit", | 
| 76 | 76 | query: { | 
| 77 | 77 | paperId: item.id, | 
| 78 | 78 | title: item.title, | 
| 79 | 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 | 1 | <template> | 
| 2 | 2 | <div style="margin-right: 20px;width: 100%"> | 
| 3 | 3 | <el-row class="row-type"> | 
| 4 | - <label>阶段报表类型</label> | |
| 4 | + <label>报表类型</label> | |
| 5 | 5 | <el-select class="opration-select" v-model="currentType"> | 
| 6 | 6 | <el-option v-for="(item, index) in types" :lable="item" :key="index" :value="item" /> | 
| 7 | 7 | </el-select> | 
| ... | ... | @@ -13,75 +13,75 @@ | 
| 13 | 13 | <div id="print-content"> | 
| 14 | 14 | <div v-if="currentType == '题目作答表现汇总'"> | 
| 15 | 15 | <el-row class="row-subfix" style="margin-top:10px"> | 
| 16 | - <div class="row-line"> | |
| 16 | + <div class="row-line row-line"> | |
| 17 | 17 | <span class="line-subfix">班级:</span> | 
| 18 | 18 | <span class="line-value">{{ detail.className }}</span> | 
| 19 | 19 | </div> | 
| 20 | - <div class="row-line"> | |
| 20 | + <div class="row-line row-line"> | |
| 21 | 21 | <span class="line-subfix">科目:</span> | 
| 22 | 22 | <span class="line-value">{{ detail.subjectName }}</span> | 
| 23 | 23 | </div> | 
| 24 | - <div class="row-line"> | |
| 24 | + <div class="row-line row-line"> | |
| 25 | 25 | <span class="line-subfix">课时数:</span> | 
| 26 | 26 | <span class="line-value">{{ $props.askReportIds.length }}</span> | 
| 27 | 27 | </div> | 
| 28 | - <div class="row-line"> | |
| 28 | + <div class="row-line "> | |
| 29 | 29 | <span class="line-subfix">上课时间:</span> | 
| 30 | 30 | <span class="line-value">{{ detail.startTime }}</span> | 
| 31 | 31 | </div> | 
| 32 | - <div class="row-line"> | |
| 32 | + <div class="row-line "> | |
| 33 | 33 | <span class="line-subfix">下课时间:</span> | 
| 34 | 34 | <span class="line-value">{{ detail.endTime }}</span> | 
| 35 | 35 | </div> | 
| 36 | 36 | </el-row> | 
| 37 | 37 | <el-row class="row-subfix"> | 
| 38 | - <div class="row-line"> | |
| 38 | + <div class="row-line row-line-5"> | |
| 39 | 39 | <span class="line-subfix">班级人数:</span> | 
| 40 | 40 | <span class="line-value">{{ detail.classPersonNum }}</span> | 
| 41 | 41 | </div> | 
| 42 | - <div class="row-line"> | |
| 42 | + <div class="row-line row-line-5"> | |
| 43 | 43 | <span class="line-subfix">签到人数:</span> | 
| 44 | 44 | <span class="line-value">{{ detail.checkInCount }}</span> | 
| 45 | 45 | </div> | 
| 46 | - <div class="row-line"> | |
| 46 | + <div class="row-line row-line-5"> | |
| 47 | 47 | <span class="line-subfix">题目总数:</span> | 
| 48 | 48 | <span class="line-value">{{ detail.questionNum }}</span> | 
| 49 | 49 | </div> | 
| 50 | - <div class="row-line"> | |
| 50 | + <div class="row-line row-line-5"> | |
| 51 | 51 | <span class="line-subfix">答题总数:</span> | 
| 52 | 52 | <span class="line-value">{{ detail.totalAnswersNum }}</span> | 
| 53 | 53 | </div> | 
| 54 | - <div class="row-line"> | |
| 54 | + <div class="row-line row-line-5"> | |
| 55 | 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 | 57 | </div> | 
| 58 | 58 | </el-row> | 
| 59 | 59 | <el-row class="row-subfix"> | 
| 60 | - <div class="row-line"> | |
| 60 | + <div class="row-line row-line-5"> | |
| 61 | 61 | <span class="line-subfix">答对总数:</span> | 
| 62 | 62 | <span class="line-value">{{ detail.totalCorrectAnswersNum }}</span> | 
| 63 | 63 | </div> | 
| 64 | - <div class="row-line"> | |
| 64 | + <div class="row-line row-line-5"> | |
| 65 | 65 | <span class="line-subfix">总参与度:</span> | 
| 66 | 66 | <span class="line-value">{{ detail.participationRate ? detail.participationRate : 0 }}%</span> | 
| 67 | 67 | </div> | 
| 68 | - <div class="row-line"> | |
| 68 | + <div class="row-line row-line-5"> | |
| 69 | 69 | <span class="line-subfix">班级正确率:</span> | 
| 70 | 70 | <span class="line-value">{{ detail.classCorrectRate ? detail.classCorrectRate : 0 }}%</span> | 
| 71 | 71 | </div> | 
| 72 | - <div class="row-line"> | |
| 72 | + <div class="row-line row-line-5"> | |
| 73 | 73 | <span class="line-subfix">已达正确率:</span> | 
| 74 | 74 | <span class="line-value">{{ detail.answerCorrectRate ? detail.answerCorrectRate : 0 }}%</span> | 
| 75 | 75 | </div> | 
| 76 | - <div class="row-line"> | |
| 76 | + <div class="row-line row-line-5"> | |
| 77 | 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 | 79 | </div> | 
| 80 | 80 | </el-row> | 
| 81 | 81 | <el-row class="row-table"> | 
| 82 | 82 | <el-table class="default-table" :data="singleSubjectSummary" border> | 
| 83 | 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 | 85 | <template slot-scope="scoped"> | 
| 86 | 86 | <el-button type="text" @click="openStem(scoped.row)">查看</el-button> | 
| 87 | 87 | </template> | 
| ... | ... | @@ -104,9 +104,10 @@ | 
| 104 | 104 | |
| 105 | 105 | <el-table-column prop="knowledge" label="知识点(单题)" width="150"> | 
| 106 | 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 | 109 | <span class="overflowText"> | 
| 109 | - {{ scoped.row.knowledge }} | |
| 110 | + {{ _knowledge(scoped.row.knowledge) }} | |
| 110 | 111 | </span> | 
| 111 | 112 | </el-tooltip> | 
| 112 | 113 | </template> | 
| ... | ... | @@ -114,8 +115,8 @@ | 
| 114 | 115 | <el-table-column prop="correctAnswer" label="正确答案(单题)" width="150"> | 
| 115 | 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 | 120 | scoped.row.correctAnswer | 
| 120 | 121 | }} | 
| 121 | 122 | </template> | 
| ... | ... | @@ -123,8 +124,8 @@ | 
| 123 | 124 | <el-table-column prop="fallible" label="干扰选项(单题)" width="150"> | 
| 124 | 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 | 129 | scoped.row.fallible | 
| 129 | 130 | }} | 
| 130 | 131 | </template> | 
| ... | ... | @@ -134,48 +135,52 @@ | 
| 134 | 135 | </div> | 
| 135 | 136 | <div v-if="currentType == '学生单科表现作答汇总表'"> | 
| 136 | 137 | <el-row class="row-subfix" style="margin-top:10px"> | 
| 137 | - <div class="row-line"> | |
| 138 | + <div class="row-line row-line-4"> | |
| 138 | 139 | <span class="line-subfix">班级:</span> | 
| 139 | 140 | <span class="line-value">{{ detail.className }}</span> | 
| 140 | 141 | </div> | 
| 141 | - <div class="row-line"> | |
| 142 | + <div class="row-line row-line-4"> | |
| 142 | 143 | <span class="line-subfix">科目:</span> | 
| 143 | 144 | <span class="line-value">{{ detail.subjectName }}</span> | 
| 144 | 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 | 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 | 157 | </div> | 
| 153 | - <div class="row-line"> | |
| 158 | + <!-- <div class="row-line"> | |
| 154 | 159 | <span class="line-subfix">下课时间:</span> | 
| 155 | 160 | <span class="line-value">{{ detail.endTime }}</span> | 
| 156 | - </div> | |
| 161 | + </div> --> | |
| 157 | 162 | </el-row> | 
| 158 | 163 | <el-row class="row-subfix"> | 
| 159 | - <div class="row-line"> | |
| 164 | + <div class="row-line row-line-4"> | |
| 160 | 165 | <span class="line-subfix">课时数:</span> | 
| 161 | 166 | <span class="line-value">{{ $props.askReportIds.length }}</span> | 
| 162 | 167 | </div> | 
| 163 | - <div class="row-line"> | |
| 168 | + <div class="row-line row-line-4"> | |
| 164 | 169 | <span class="line-subfix">总出题数:</span> | 
| 165 | 170 | <span class="line-value">{{ detail.questionNum }}</span> | 
| 166 | 171 | </div> | 
| 167 | - <div class="row-line"> | |
| 172 | + <div class="row-line row-line-4"> | |
| 168 | 173 | <span class="line-subfix">查询时间:</span> | 
| 169 | 174 | <span class="line-value">{{ detail.selectDate }}</span> | 
| 170 | 175 | </div> | 
| 171 | - <div class="row-line"> | |
| 176 | + <div class="row-line row-line-4"> | |
| 172 | 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 | 179 | </div> | 
| 175 | - <div class="row-line"> | |
| 180 | + <!-- <div class="row-line row-line-5"> | |
| 176 | 181 | <span class="line-subfix">课时时长:</span> | 
| 177 | 182 | <span class="line-value">{{ setDuration(detail.consumingDuration) }}</span> | 
| 178 | - </div> | |
| 183 | + </div> --> | |
| 179 | 184 | </el-row> | 
| 180 | 185 | <el-row class="row-table"> | 
| 181 | 186 | <el-table class="default-table" :data="studentPerformance"> | 
| ... | ... | @@ -194,7 +199,7 @@ | 
| 194 | 199 | <el-table-column prop="answerCorrectRate" label="已答正确率" width="120"> | 
| 195 | 200 | <template slot-scope="scoped">{{ scoped.row.answerCorrectRate }}%</template> | 
| 196 | 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 | 203 | <template slot-scope="scoped"> | 
| 199 | 204 | <el-button type="text" text @click="openLineChart(scoped.row)">查看</el-button> | 
| 200 | 205 | </template> | 
| ... | ... | @@ -225,25 +230,27 @@ | 
| 225 | 230 | </div> | 
| 226 | 231 | </el-dialog> | 
| 227 | 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 | 234 | </el-dialog> | 
| 230 | 235 | <ExportDia :exportStudent="exportStudent" :diaShow="diaShow" @cancel="cancel" @exportData="_exportData" | 
| 231 | 236 | :type="'折线图'" /> | 
| 232 | 237 | </div> | 
| 233 | 238 | </template> | 
| 234 | 239 | <script> | 
| 235 | -import { formatDate,getKnowledge } from "utils"; | |
| 240 | +import { formatDate, getKnowledge } from "utils"; | |
| 236 | 241 | import { downloadFile, tablePrint } from "@/utils"; | 
| 237 | 242 | import LineChart from "@/components/charts/lineChart"; | 
| 243 | +import Preview from "@/components/preview"; | |
| 238 | 244 | export default { | 
| 239 | 245 | name: "askSummaryReport", | 
| 240 | 246 | components: { | 
| 241 | - LineChart | |
| 247 | + LineChart, | |
| 248 | + Preview | |
| 242 | 249 | }, | 
| 243 | 250 | props: { | 
| 244 | 251 | askReportIds: Array, | 
| 245 | 252 | queryParams: Object, | 
| 246 | - role: "", | |
| 253 | + role: "", | |
| 247 | 254 | }, | 
| 248 | 255 | |
| 249 | 256 | watch: { | 
| ... | ... | @@ -282,6 +289,7 @@ export default { | 
| 282 | 289 | }, | 
| 283 | 290 | //题干数据对象 | 
| 284 | 291 | stem: { | 
| 292 | + type: "html", | |
| 285 | 293 | visible: false, | 
| 286 | 294 | src: null | 
| 287 | 295 | } | 
| ... | ... | @@ -292,13 +300,19 @@ export default { | 
| 292 | 300 | await this._detail(); | 
| 293 | 301 | }, | 
| 294 | 302 | methods: { | 
| 303 | + _knowledge(knowledgeParam) { | |
| 304 | + return getKnowledge(knowledgeParam) | |
| 305 | + }, | |
| 295 | 306 | _export() { | 
| 296 | 307 | this.diaShow = true; | 
| 297 | 308 | }, | 
| 298 | 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 | 317 | cancel() { | 
| 304 | 318 | this.diaShow = false; | 
| ... | ... | @@ -307,7 +321,9 @@ export default { | 
| 307 | 321 | |
| 308 | 322 | let studentIds = arr; | 
| 309 | 323 | |
| 310 | - let query = {}; | |
| 324 | + let query = { | |
| 325 | + size: 9999 | |
| 326 | + }; | |
| 311 | 327 | |
| 312 | 328 | if (studentIds != null) { | 
| 313 | 329 | if (studentIds.length > 0) { | 
| ... | ... | @@ -348,6 +364,7 @@ export default { | 
| 348 | 364 | await this._detail(); | 
| 349 | 365 | }, | 
| 350 | 366 | async _changeType() { | 
| 367 | + this.detail.selectDate = formatDate(new Date(), "yyyy-MM-dd"); | |
| 351 | 368 | switch (this.currentType) { | 
| 352 | 369 | case "题目作答表现汇总": { await this._singleSubjectSummary(); }; break; | 
| 353 | 370 | case "学生单科表现作答汇总表": { await this._studentPerformance(); }; break; | 
| ... | ... | @@ -422,8 +439,10 @@ export default { | 
| 422 | 439 | this.$message.error(detailReponse.info); | 
| 423 | 440 | return; | 
| 424 | 441 | } | 
| 442 | + | |
| 425 | 443 | this.detail = detailReponse.data; | 
| 426 | - this.detail.selectDate = formatDate(new Date(), "yyyy-MM-dd"); | |
| 444 | + | |
| 445 | + | |
| 427 | 446 | }, | 
| 428 | 447 | async _singleSubjectSummary() { | 
| 429 | 448 | |
| ... | ... | @@ -439,6 +458,7 @@ export default { | 
| 439 | 458 | let query = { | 
| 440 | 459 | periodIds: this.$props.askReportIds, | 
| 441 | 460 | classIds: [this.$props.queryParams.class], | 
| 461 | + size: 9999 | |
| 442 | 462 | }; | 
| 443 | 463 | |
| 444 | 464 | let periodListReponse = await periodList({ | 
| ... | ... | @@ -538,10 +558,11 @@ export default { | 
| 538 | 558 | name: "已答正确率", | 
| 539 | 559 | value: answerCorrectRate, | 
| 540 | 560 | }, | 
| 541 | - ]; | |
| 561 | + ]; | |
| 542 | 562 | }, | 
| 543 | 563 | openStem(stemRow) { | 
| 544 | 564 | this.stem.src = stemRow.screenshot ?? ""; | 
| 565 | + console.log('stem', this.stem) | |
| 545 | 566 | this.stem.visible = true; | 
| 546 | 567 | }, | 
| 547 | 568 | openExport() { | 
| ... | ... | @@ -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 | 622 | .row-table { | 
| 588 | 623 | margin-top: 20px; | 
| 589 | 624 | } | ... | ... | 
src/views/basic/askTestQuestion/components/testBzrMulti.vue
| 1 | 1 | <template> | 
| 2 | 2 | <div style="margin-right: 20px;width: 100%"> | 
| 3 | 3 | <div v-if="status == 'select'"> | 
| 4 | - <el-row class="row-type"> | |
| 4 | + <el-row class="row-type print-hidden"> | |
| 5 | 5 | |
| 6 | 6 | <div style="float: right;"> | 
| 7 | 7 | <el-button type="primary" :disabled="multipleSelection.length < 1" class="opration-btn" | 
| ... | ... | @@ -28,7 +28,10 @@ | 
| 28 | 28 | <div v-if="status == 'selected'"> | 
| 29 | 29 | <el-container style="height: 100%;width: 100%;"> | 
| 30 | 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 | 35 | <div style="float: right;"> | 
| 33 | 36 | <el-button type="primary" @click="_import" class="opration-btn" | 
| 34 | 37 | icon="el-icon-upload2">导出报表</el-button> | 
| ... | ... | @@ -83,26 +86,21 @@ | 
| 83 | 86 | }}</template> | 
| 84 | 87 | </el-table-column> | 
| 85 | 88 | </el-table-column> | 
| 86 | - <el-table-column label="查看雷达图"> | |
| 89 | + <el-table-column label="查看雷达图" class-name="print-hidden"> | |
| 87 | 90 | <template slot-scope="scoped"> | 
| 88 | 91 | <el-button type="text" @click="openRandarChart(scoped.row)">查看</el-button> | 
| 89 | 92 | </template> | 
| 90 | 93 | </el-table-column> | 
| 91 | 94 | </el-table> | 
| 92 | 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 | 97 | </el-container> | 
| 100 | 98 | |
| 101 | 99 | </div> | 
| 102 | 100 | <el-dialog class="chart-dia" :visible.sync="redarVisible" :title="radarChart.title" width="800" | 
| 103 | 101 | :append-to-body="true"> | 
| 104 | 102 | <div class="chart-box"> | 
| 105 | - <RadarChart id="testRadarChart" :params="radarChart" /> | |
| 103 | + <RadarChart id="testRadarChart" :params="radarChart" /> | |
| 106 | 104 | </div> | 
| 107 | 105 | </el-dialog> | 
| 108 | 106 | </div> | 
| ... | ... | @@ -171,7 +169,15 @@ export default { | 
| 171 | 169 | }, | 
| 172 | 170 | methods: { | 
| 173 | 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 | 182 | _checkAll() { | 
| 177 | 183 | // this.multipleSelection = [...] | 
| ... | ... | @@ -276,9 +282,9 @@ export default { | 
| 276 | 282 | this.exportStudent = []; | 
| 277 | 283 | }, | 
| 278 | 284 | openRandarChart(obj) { | 
| 279 | - | |
| 285 | + | |
| 280 | 286 | let max = 0; | 
| 281 | - | |
| 287 | + | |
| 282 | 288 | const dataList = obj.dataList.slice(1, obj.dataList.length); | 
| 283 | 289 | let subjectList = dataList.map((item) => { | 
| 284 | 290 | let score = Number(item.highestScore || item.score); | 
| ... | ... | @@ -330,10 +336,10 @@ export default { | 
| 330 | 336 | value: dataList.map((item) => item.score), | 
| 331 | 337 | name: "本人得分", | 
| 332 | 338 | }, | 
| 333 | - ]; | |
| 339 | + ]; | |
| 334 | 340 | |
| 335 | 341 | this.radarChart.title = obj.studentName + "-多科阶段作答表现图"; | 
| 336 | - console.log(this.radarChart) | |
| 342 | + | |
| 337 | 343 | this.redarVisible = true; | 
| 338 | 344 | }, | 
| 339 | 345 | async _loadData() { | ... | ... | 
src/views/basic/askTestQuestion/components/testListReport.vue
| ... | ... | @@ -150,7 +150,9 @@ export default { | 
| 150 | 150 | paperId: item.id, | 
| 151 | 151 | title: item.title, | 
| 152 | 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 | 1 | <template> | 
| 2 | 2 | <div style="margin-right: 20px;width: 100%"> | 
| 3 | 3 | <el-row class="row-type"> | 
| 4 | - <label>阶段报表类型</label> | |
| 4 | + <label>报表类型</label> | |
| 5 | 5 | <el-select class="opration-select" v-model="currentType" style="margin-left: 10px;"> | 
| 6 | 6 | <el-option v-for="(item, index) in types" :lable="item" :key="index" :value="item" /> | 
| 7 | 7 | </el-select> | 
| ... | ... | @@ -9,11 +9,12 @@ | 
| 9 | 9 | <el-row class="row-type" style="margin-top: 10px;"> | 
| 10 | 10 | <el-table v-if="$props.params" class="default-table" :data="listReport"> | 
| 11 | 11 | <el-table-column prop="subjectName" label="科目" width="100" /> | 
| 12 | - <el-table-column prop="paperName" label="试卷名称" /> | |
| 12 | + <el-table-column prop="paperName" label="试卷名称" /> | |
| 13 | 13 | <el-table-column prop="classCorrectRate" label="已考班级"> | 
| 14 | 14 | <template slot-scope="scoped"> | 
| 15 | 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 | 18 | {{ item.className }} | 
| 18 | 19 | </el-checkbox> | 
| 19 | 20 | </el-checkbox-group> | 
| ... | ... | @@ -48,7 +49,7 @@ export default { | 
| 48 | 49 | } | 
| 49 | 50 | }, | 
| 50 | 51 | methods: { | 
| 51 | - _linkToDetail(dataRow) { | |
| 52 | + _linkToDetail(dataRow) { | |
| 52 | 53 | this.$router.push({ | 
| 53 | 54 | path: "/testReportDetail", | 
| 54 | 55 | query: { | 
| ... | ... | @@ -62,7 +63,7 @@ export default { | 
| 62 | 63 | }); | 
| 63 | 64 | }, | 
| 64 | 65 | async _loadDatas() { | 
| 65 | - | |
| 66 | + | |
| 66 | 67 | var dataRequestParams = { | 
| 67 | 68 | classIds: this.$props.params.class ? [this.$props.params.class] : | 
| 68 | 69 | this.$props.params.classIds ? [...this.$props.params.classIds] : null, | 
| ... | ... | @@ -72,7 +73,7 @@ export default { | 
| 72 | 73 | subjects: this.$props.params.subject ? [this.$props.params.subject] : | 
| 73 | 74 | this.$props.params.subjects ? [...this.$props.params.subjects] : null | 
| 74 | 75 | }; | 
| 75 | - | |
| 76 | + | |
| 76 | 77 | var dataRequest = this.$request.tListExamReport; | 
| 77 | 78 | |
| 78 | 79 | ... | ... | 
src/views/basic/askTestQuestion/components/testSummaryReport.vue
| ... | ... | @@ -51,7 +51,7 @@ | 
| 51 | 51 | }}</template> | 
| 52 | 52 | </el-table-column> | 
| 53 | 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 | 55 | <template slot-scope="scoped"> | 
| 56 | 56 | <el-button type="text" @click="_openLineChart(scoped.row)">查看</el-button> | 
| 57 | 57 | </template> | 
| ... | ... | @@ -133,11 +133,15 @@ export default { | 
| 133 | 133 | let query = { | 
| 134 | 134 | examIds: this.$props.testReportIds, | 
| 135 | 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 | 145 | const { data, status, info } = await phaseExamReport({ | 
| 142 | 146 | ...query | 
| 143 | 147 | }); | 
| ... | ... | @@ -158,7 +162,7 @@ export default { | 
| 158 | 162 | } | 
| 159 | 163 | }); | 
| 160 | 164 | }); | 
| 161 | - console.log('lsit', data?.list) | |
| 165 | + | |
| 162 | 166 | this.stageReport = data?.list.map((item) => { | 
| 163 | 167 | let params = {}; | 
| 164 | 168 | dataIdsList.map((ids, index) => { | 
| ... | ... | @@ -224,10 +228,17 @@ export default { | 
| 224 | 228 | } | 
| 225 | 229 | }, | 
| 226 | 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 | 240 | _titleClick() { }, | 
| 230 | - _openLineChart(chartRow) { | |
| 241 | + _openLineChart(chartRow) { | |
| 231 | 242 | var subejct = this.$props.role == 'ROLE_BANZHUREN' ? this.$props.queryParams.subjects[0] : this.$props.queryParams.subject; | 
| 232 | 243 | this.lineChart.title = `${chartRow.studentName}-${subejct}-即时测-多卷作答表现图`; | 
| 233 | 244 | this.lineChart.visible = true; | ... | ... | 
src/views/basic/askTestQuestion/detail.vue
| 1 | 1 | <template> | 
| 2 | - <el-container class="default-body"> | |
| 2 | + <el-container class="default-body default-body-detail"> | |
| 3 | 3 | <el-header> | 
| 4 | 4 | <back-box class="detailBack"> | 
| 5 | 5 | <template slot="title"> | 
| ... | ... | @@ -11,7 +11,7 @@ | 
| 11 | 11 | </el-header> | 
| 12 | 12 | <div class="default-filter"> | 
| 13 | 13 | <el-row class="row-type"> | 
| 14 | - <label>阶段报表类型</label> | |
| 14 | + <label>报表类型</label> | |
| 15 | 15 | <el-select @change="_changeType" v-if="dataType && currentType" class="opration-select" | 
| 16 | 16 | v-model="currentType"> | 
| 17 | 17 | <el-option v-for="(item, index) in types" :lable="item.name" :key="index" :value="item.name" /> | 
| ... | ... | @@ -19,14 +19,14 @@ | 
| 19 | 19 | <div style="float: right;"> | 
| 20 | 20 | <span v-if="(dataType == '2' && currentType == '测验成绩单') || | 
| 21 | 21 | (dataType == '2' && currentType == '试题分析') || | 
| 22 | - (dataType == '3' && currentType == '学生成绩排名榜')"> | |
| 22 | + (dataType == '3' && currentType == '学生成绩排名')"> | |
| 23 | 23 | 单题低分率: | 
| 24 | 24 | <el-input-number class="parent-number" v-model="lowLevel" :min="1" :max="100" label="低分率"> | 
| 25 | 25 | </el-input-number> | 
| 26 | 26 | </span> | 
| 27 | 27 | |
| 28 | 28 | <el-button v-if="(dataType == '3' && currentType == '班级对比情况表') || | 
| 29 | - (dataType == '3' && currentType == '学生成绩排名榜')" @click="_studentLevelSet" | |
| 29 | + (dataType == '3' && currentType == '学生成绩排名')" @click="_studentLevelSet" | |
| 30 | 30 | class="green-el-button"> | 
| 31 | 31 | 设置学生成绩等级 | 
| 32 | 32 | </el-button> | 
| ... | ... | @@ -37,13 +37,13 @@ | 
| 37 | 37 | </div> | 
| 38 | 38 | </el-row> | 
| 39 | 39 | </div> | 
| 40 | - <el-main> | |
| 40 | + <el-main v-loading="loading"> | |
| 41 | 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 | 43 | v-if="paperModifyLog.modifiedTime && !status"> | 
| 44 | 44 | <p class="tips-p"> | 
| 45 | 45 | <i class="fa fa-bell-o"></i> | 
| 46 | - {{ `${paperModifyLog.modifiedTime} ${paperModifyLog.realName}` }}修改了答案,是否重新记分? | |
| 46 | + {{ `${paperModifyLog.modifiedTime} ${paperModifyLog.realName}` }}修改了试卷,是否重新记分? | |
| 47 | 47 | <el-button type="danger" round @click="_reScore" size="mini">重新计分</el-button> | 
| 48 | 48 | <el-button type="danger" round plain size="mini" | 
| 49 | 49 | @click="paperModifyLog.modifiedTime = ''">暂时不计</el-button> | 
| ... | ... | @@ -73,53 +73,53 @@ | 
| 73 | 73 | </div> | 
| 74 | 74 | </el-row> | 
| 75 | 75 | <el-row class="row-subfix"> | 
| 76 | - <div class="row-line"> | |
| 76 | + <div class="row-line row-line-5"> | |
| 77 | 77 | <span class="line-subfix">班级人数:</span> | 
| 78 | 78 | <span class="line-value">{{ detail.classPersonNum }}</span> | 
| 79 | 79 | </div> | 
| 80 | - <div class="row-line"> | |
| 80 | + <div class="row-line row-line-5"> | |
| 81 | 81 | <span class="line-subfix">签到人数:</span> | 
| 82 | 82 | <span class="line-value">{{ detail.checkInCount }}</span> | 
| 83 | 83 | </div> | 
| 84 | - <div class="row-line"> | |
| 84 | + <div class="row-line row-line-5"> | |
| 85 | 85 | <span class="line-subfix">题目总数:</span> | 
| 86 | 86 | <span class="line-value">{{ detail.questionNum }}</span> | 
| 87 | 87 | </div> | 
| 88 | - <div class="row-line"> | |
| 88 | + <div class="row-line row-line-5"> | |
| 89 | 89 | <span class="line-subfix">答题总数:</span> | 
| 90 | 90 | <span class="line-value">{{ detail.totalAnswersNum }}</span> | 
| 91 | 91 | </div> | 
| 92 | - <div class="row-line"> | |
| 92 | + <div class="row-line row-line-5"> | |
| 93 | 93 | <span class="line-subfix">课时时长:</span> | 
| 94 | 94 | <span class="line-value">{{ setDuration(detail.duration) }}</span> | 
| 95 | 95 | </div> | 
| 96 | 96 | </el-row> | 
| 97 | 97 | <el-row class="row-subfix"> | 
| 98 | - <div class="row-line"> | |
| 98 | + <div class="row-line row-line-5"> | |
| 99 | 99 | <span class="line-subfix">答对总数:</span> | 
| 100 | 100 | <span class="line-value">{{ detail.totalCorrectAnswersNum }}</span> | 
| 101 | 101 | </div> | 
| 102 | - <div class="row-line"> | |
| 102 | + <div class="row-line row-line-5"> | |
| 103 | 103 | <span class="line-subfix">总参与度:</span> | 
| 104 | 104 | <span class="line-value">{{ detail.participationRate }}%</span> | 
| 105 | 105 | </div> | 
| 106 | - <div class="row-line"> | |
| 106 | + <div class="row-line row-line-5"> | |
| 107 | 107 | <span class="line-subfix">班级正确率:</span> | 
| 108 | 108 | <span class="line-value">{{ detail.classCorrectRate }}%</span> | 
| 109 | 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 | 112 | <span class="line-value">{{ detail.answerCorrectRate }}%</span> | 
| 113 | 113 | </div> | 
| 114 | - <div class="row-line"> | |
| 114 | + <div class="row-line row-line-5"> | |
| 115 | 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 | 117 | </div> | 
| 118 | 118 | </el-row> | 
| 119 | 119 | <el-row class="row-table"> | 
| 120 | 120 | <el-table class="default-table" :data="askItemAnalysis"> | 
| 121 | 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 | 123 | <template slot-scope="scoped"> | 
| 124 | 124 | <el-button type="text" size="mini" @click="openStem(scoped.row)">查看</el-button> | 
| 125 | 125 | </template> | 
| ... | ... | @@ -140,12 +140,21 @@ | 
| 140 | 140 | <template slot-scope="scoped">{{ scoped.row.answerCorrectRate }}%</template> | 
| 141 | 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 | 153 | <el-table-column prop="correctAnswer" label="正确答案(单题)" width="150"> | 
| 145 | 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 | 158 | scoped.row.correctAnswer | 
| 150 | 159 | }} | 
| 151 | 160 | </template> | 
| ... | ... | @@ -153,8 +162,8 @@ | 
| 153 | 162 | <el-table-column prop="fallible" label="干扰选项(单题)" width="150"> | 
| 154 | 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 | 167 | scoped.row.fallible | 
| 159 | 168 | }} | 
| 160 | 169 | </template> | 
| ... | ... | @@ -168,24 +177,21 @@ | 
| 168 | 177 | <el-table-column prop="studentCode" label="学号"></el-table-column> | 
| 169 | 178 | <el-table-column prop="studentName" label="姓名"></el-table-column> | 
| 170 | 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 | 182 | </template></el-table-column> | 
| 175 | 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 | 188 | </el-table-column> | 
| 183 | 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 | 195 | <el-table-column prop="correctRate" label="正确率"><template slot-scope="scoped">{{ | 
| 190 | 196 | scoped.row.correctRate || Number(scoped.row.correctRate) === 0 | 
| 191 | 197 | ? scoped.row.correctRate + "%" | 
| ... | ... | @@ -197,11 +203,11 @@ | 
| 197 | 203 | ? scoped.row.answerCorrectRate + "%" | 
| 198 | 204 | : "-" | 
| 199 | 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 | 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 | 211 | </template> | 
| 206 | 212 | </el-table-column> | 
| 207 | 213 | </el-table> | 
| ... | ... | @@ -223,19 +229,19 @@ | 
| 223 | 229 | </div> | 
| 224 | 230 | <div v-if="dataType == '1' && currentType == '学生签到表现'"> | 
| 225 | 231 | <el-row class="row-subfix"> | 
| 226 | - <div class="row-line"> | |
| 232 | + <div class="row-line row-line-5"> | |
| 227 | 233 | <span class="line-subfix">应到人数:</span> | 
| 228 | 234 | <span class="line-value">{{ detail.classPersonNum }}</span> | 
| 229 | 235 | </div> | 
| 230 | - <div class="row-line"> | |
| 236 | + <div class="row-line row-line-5"> | |
| 231 | 237 | <span class="line-subfix">实到人数:</span> | 
| 232 | 238 | <span class="line-value">{{ detail.checkInCount }}</span> | 
| 233 | 239 | </div> | 
| 234 | - <div class="row-line"> | |
| 240 | + <div class="row-line row-line-5"> | |
| 235 | 241 | <span class="line-subfix">迟到人数:</span> | 
| 236 | 242 | <span class="line-value">{{ detail.classPersonNum - detail.checkInCount }}</span> | 
| 237 | 243 | </div> | 
| 238 | - <div class="row-line"> | |
| 244 | + <div class="row-line row-line-5"> | |
| 239 | 245 | <span class="line-subfix">未到人数:</span> | 
| 240 | 246 | <span class="line-value">{{ detail.classPersonNum - detail.checkInCount }}</span> | 
| 241 | 247 | </div> | 
| ... | ... | @@ -279,8 +285,8 @@ | 
| 279 | 285 | </el-table> | 
| 280 | 286 | </el-row> | 
| 281 | 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 | 290 | :key="index" v-for="(item, index) in studentHeader" /> | 
| 285 | 291 | </el-table> | 
| 286 | 292 | </el-row> | 
| ... | ... | @@ -399,7 +405,7 @@ | 
| 399 | 405 | {{ scoped.row.missPeopleNumber }}</span> 人 | 
| 400 | 406 | </span> | 
| 401 | 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 | 409 | 选{{ item.option }}:{{ item.students.join("/") }} | 
| 404 | 410 | </span> | 
| 405 | 411 | <span></span> | 
| ... | ... | @@ -416,7 +422,16 @@ | 
| 416 | 422 | {{ setSubPro(scope.row.questionType) }} | 
| 417 | 423 | </template> | 
| 418 | 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 | 435 | <el-table-column prop="score" width="100" label="满分值"></el-table-column> | 
| 421 | 436 | <el-table-column width="110" prop="highestScore" label="班最高分"></el-table-column> | 
| 422 | 437 | <el-table-column width="110" prop="lowestScore" label="班最低分"></el-table-column> | 
| ... | ... | @@ -433,17 +448,17 @@ | 
| 433 | 448 | <el-table-column prop="classScoringRate" width="120" label="已考得分率"> | 
| 434 | 449 | <template slot-scope="scoped"> | 
| 435 | 450 | <div v-if="scoped.row.type == 'colspan'"> | 
| 436 | - {{ scoped.row.classScoringRate }} | |
| 451 | + {{ scoped.row.scoringRate }} | |
| 437 | 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 | 455 | </div> | 
| 441 | 456 | </template> | 
| 442 | 457 | </el-table-column> | 
| 443 | 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 | 463 | : scoped.row.correctAnswer | 
| 449 | 464 | }}</template> | 
| ... | ... | @@ -501,7 +516,7 @@ | 
| 501 | 516 | <el-table-column prop="subjectiveExamScore" label="主观题分"></el-table-column> | 
| 502 | 517 | </el-table-column> | 
| 503 | 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 | 520 | </el-table-column> | 
| 506 | 521 | </el-table> | 
| 507 | 522 | </div> | 
| ... | ... | @@ -511,15 +526,15 @@ | 
| 511 | 526 | <el-table-column prop="studentName" label="姓名"></el-table-column> | 
| 512 | 527 | <el-table-column prop="className" label="班级"></el-table-column> | 
| 513 | 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 | 531 | <template slot-scope="scope"> | 
| 517 | 532 | <span v-if="studentAnsered[index]?.questionType == 5">*</span> | 
| 518 | 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 | 535 | {{ scope.row["answer" + item.id] }} | 
| 521 | 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 | 538 | </template> | 
| 524 | 539 | </el-table-column> | 
| 525 | 540 | </el-table> | 
| ... | ... | @@ -535,8 +550,8 @@ | 
| 535 | 550 | </el-table-column> | 
| 536 | 551 | <el-table-column prop="title" label="参与度" width="120"> | 
| 537 | 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 | 555 | </template> | 
| 541 | 556 | </el-table-column> | 
| 542 | 557 | <el-table-column prop="avg" label="班平均分" width="120" /> | 
| ... | ... | @@ -562,9 +577,10 @@ | 
| 562 | 577 | </el-table-column> | 
| 563 | 578 | <el-table-column prop="knowledge" label="知识点"> | 
| 564 | 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 | 582 | <span class="overflowText"> | 
| 567 | - {{ scoped.row.knowledge }} | |
| 583 | + {{ _knowledge(scoped.row.knowledge) }} | |
| 568 | 584 | </span> | 
| 569 | 585 | </el-tooltip> | 
| 570 | 586 | </template> | 
| ... | ... | @@ -572,8 +588,7 @@ | 
| 572 | 588 | <el-table-column prop="score" label="满分值" width="120" /> | 
| 573 | 589 | <el-table-column prop="avgScore" label="年级平均分" width="120"> | 
| 574 | 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 | 592 | {{ Number(scoped.row.avgScore).toFixed(2) }} % | 
| 578 | 593 | </div> | 
| 579 | 594 | <div v-else> | 
| ... | ... | @@ -581,36 +596,44 @@ | 
| 581 | 596 | </div> | 
| 582 | 597 | </template> | 
| 583 | 598 | </el-table-column> | 
| 584 | - <el-table-column prop="gradeScoringRate" label="年级得分率" width="120"> | |
| 599 | + <el-table-column prop="gradeScoringRate" label="年级已考得分率" width="120"> | |
| 585 | 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 | 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 | 609 | </div> | 
| 593 | 610 | </template> | 
| 594 | 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 | 621 | <el-table-column v-for="(item, index) in testPaperExamReportOptions" :key="index" | 
| 597 | 622 | :label="item.title" :prop="'count' + index" width="120"> | 
| 598 | 623 | <template slot-scope="scope"> | 
| 599 | 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 | 631 | </p> | 
| 609 | 632 | </template> | 
| 610 | 633 | </el-table-column> | 
| 611 | 634 | </el-table> | 
| 612 | 635 | </div> | 
| 613 | - <div v-if="dataType == '3' && currentType == '学生成绩排名榜'"> | |
| 636 | + <div v-if="dataType == '3' && currentType == '学生成绩排名'"> | |
| 614 | 637 | <el-table class="default-table" :data="testStudentExamReport"> | 
| 615 | 638 | <el-table-column prop="gradeRank" label="年级排行" /> | 
| 616 | 639 | <el-table-column prop="code" label="学号" /> | 
| ... | ... | @@ -623,7 +646,8 @@ | 
| 623 | 646 | </div> | 
| 624 | 647 | </el-main> | 
| 625 | 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 | 651 | </el-dialog> | 
| 628 | 652 | <el-dialog :append-to-body="true" :close-on-click-modal="false" title="学生等级设置" | 
| 629 | 653 | :visible.sync="studentLevelDialog" width="900px" @closed="_studentLevelClose"> | 
| ... | ... | @@ -704,10 +728,11 @@ | 
| 704 | 728 | </el-container> | 
| 705 | 729 | </template> | 
| 706 | 730 | <script> | 
| 707 | -import { formatDate, downloadFile, tablePrint } from "utils"; | |
| 731 | +import Preview from "@/components/preview"; | |
| 732 | +import { formatDate, downloadFile, tablePrint, getKnowledge } from "utils"; | |
| 708 | 733 | export default { | 
| 709 | 734 | name: "reportDetail", | 
| 710 | - components: { testScoreSet: () => import("./components/testScoreSet.vue"), }, | |
| 735 | + components: { testScoreSet: () => import("./components/testScoreSet.vue"), Preview }, | |
| 711 | 736 | async created() { | 
| 712 | 737 | this.role = | 
| 713 | 738 | |
| ... | ... | @@ -733,12 +758,11 @@ export default { | 
| 733 | 758 | |
| 734 | 759 | await this._queryDefaultLevels(); | 
| 735 | 760 | |
| 736 | - if (this.dataType == '2') { | |
| 737 | - await this._examDetail(); | |
| 738 | - } | |
| 761 | + await this._examDetail(); | |
| 739 | 762 | }, | 
| 740 | 763 | data() { | 
| 741 | 764 | return { | 
| 765 | + loading: true, | |
| 742 | 766 | status: 0, | 
| 743 | 767 | //导出相关 | 
| 744 | 768 | paperModifyLog: {}, | 
| ... | ... | @@ -808,7 +832,7 @@ export default { | 
| 808 | 832 | // 学生签到情况 | 
| 809 | 833 | askCheckinStatus: [], | 
| 810 | 834 | // 报表详情 | 
| 811 | - testReport: { | |
| 835 | + examReport: { | |
| 812 | 836 | subjectiveScore: 0, | 
| 813 | 837 | subjectiveHighestScore: "", | 
| 814 | 838 | subjectiveLowestScore: "", | 
| ... | ... | @@ -859,6 +883,22 @@ export default { | 
| 859 | 883 | return tit; | 
| 860 | 884 | }, | 
| 861 | 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 | 902 | let m = parseInt(times / 1000 / 60); | 
| 863 | 903 | let s = parseInt((times / 1000) % 60); | 
| 864 | 904 | let ms = times; | 
| ... | ... | @@ -885,7 +925,7 @@ export default { | 
| 885 | 925 | name: "试题分析" | 
| 886 | 926 | }, { | 
| 887 | 927 | dataType: "3", | 
| 888 | - name: "学生成绩排名榜" | |
| 928 | + name: "学生成绩排名" | |
| 889 | 929 | }, { | 
| 890 | 930 | dataType: "2", | 
| 891 | 931 | name: "测验成绩单" | 
| ... | ... | @@ -930,22 +970,52 @@ export default { | 
| 930 | 970 | } | 
| 931 | 971 | }, | 
| 932 | 972 | methods: { | 
| 973 | + _knowledge(param) { | |
| 974 | + return getKnowledge(param); | |
| 975 | + }, | |
| 933 | 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 | 1021 | async _reScore() { | 
| ... | ... | @@ -958,6 +1028,7 @@ export default { | 
| 958 | 1028 | await this._changeType(); | 
| 959 | 1029 | this.paperModifyLog.modifiedTime = ""; | 
| 960 | 1030 | this.paperModifyLog.realName = ""; | 
| 1031 | + location.reload(); | |
| 961 | 1032 | } else { | 
| 962 | 1033 | this.$message.error(info); | 
| 963 | 1034 | } | 
| ... | ... | @@ -1004,15 +1075,22 @@ export default { | 
| 1004 | 1075 | if (columnIndex == 0) { | 
| 1005 | 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 | 1087 | else { | 
| 1014 | 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 | 1095 | else { | 
| 1018 | 1096 | return [1, 1] | 
| ... | ... | @@ -1027,11 +1105,18 @@ export default { | 
| 1027 | 1105 | return [3, 1]; | 
| 1028 | 1106 | } | 
| 1029 | 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 | 1113 | else { | 
| 1033 | 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 | 1121 | else { | 
| 1037 | 1122 | return [1, 1] | 
| ... | ... | @@ -1141,7 +1226,6 @@ export default { | 
| 1141 | 1226 | } | 
| 1142 | 1227 | } | 
| 1143 | 1228 | else if (this.dataType == '3') { | 
| 1144 | - | |
| 1145 | 1229 | let paramObj = JSON.parse(JSON.stringify(this.fromData)) | 
| 1146 | 1230 | |
| 1147 | 1231 | if (paramObj.levelType == 0) { | 
| ... | ... | @@ -1174,9 +1258,48 @@ export default { | 
| 1174 | 1258 | |
| 1175 | 1259 | }, | 
| 1176 | 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 | 1301 | async _changeType() { | 
| 1302 | + this.loading = true; | |
| 1180 | 1303 | if (this.dataType == "1") { | 
| 1181 | 1304 | if (this.currentType == "试题分析") { | 
| 1182 | 1305 | await this._loadAskItemAnalysis(); | 
| ... | ... | @@ -1216,10 +1339,11 @@ export default { | 
| 1216 | 1339 | else if (this.currentType == "试题分析") { | 
| 1217 | 1340 | await this._testPaperExamReport(); | 
| 1218 | 1341 | } | 
| 1219 | - else if (this.currentType == "学生成绩排名榜") { | |
| 1342 | + else if (this.currentType == "学生成绩排名") { | |
| 1220 | 1343 | await this._testStudentExamReport(); | 
| 1221 | 1344 | } | 
| 1222 | 1345 | } | 
| 1346 | + this.loading = false; | |
| 1223 | 1347 | }, | 
| 1224 | 1348 | async _testPaperExamReport() { | 
| 1225 | 1349 | //主观 | 
| ... | ... | @@ -1251,31 +1375,30 @@ export default { | 
| 1251 | 1375 | let response = await request({ | 
| 1252 | 1376 | paperId: this.ids[0], | 
| 1253 | 1377 | classIds: this.classIds, | 
| 1378 | + size: 9999 | |
| 1254 | 1379 | }); | 
| 1255 | 1380 | |
| 1256 | 1381 | if (response.status != 0) { | 
| 1257 | 1382 | this.$message.error(response.info); | 
| 1258 | 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 | 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 | 1399 | optionsList.push({}) | 
| 1276 | 1400 | } | 
| 1277 | 1401 | |
| 1278 | - // let optionsList = [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}]; | |
| 1279 | 1402 | |
| 1280 | 1403 | let tableData = response.data?.map((item) => { | 
| 1281 | 1404 | |
| ... | ... | @@ -1298,6 +1421,7 @@ export default { | 
| 1298 | 1421 | |
| 1299 | 1422 | let params = {}; | 
| 1300 | 1423 | |
| 1424 | + | |
| 1301 | 1425 | const detail = item?.details ?? []; | 
| 1302 | 1426 | |
| 1303 | 1427 | let lastOPtion = detail?.find((item) => { | 
| ... | ... | @@ -1308,7 +1432,7 @@ export default { | 
| 1308 | 1432 | }); | 
| 1309 | 1433 | |
| 1310 | 1434 | optionsList.map((items, index) => { | 
| 1311 | - if (index != 4) { | |
| 1435 | + if (index < maxOption - 1) { | |
| 1312 | 1436 | params["count" + index] = | 
| 1313 | 1437 | defaultArr[index]?.option != "未答" | 
| 1314 | 1438 | ? defaultArr[index]?.count | 
| ... | ... | @@ -1319,9 +1443,9 @@ export default { | 
| 1319 | 1443 | : ""; | 
| 1320 | 1444 | params["option" + index] = | 
| 1321 | 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 | 1450 | : defaultArr[index]?.option | 
| 1327 | 1451 | : ""; | 
| ... | ... | @@ -1330,12 +1454,10 @@ export default { | 
| 1330 | 1454 | items["title"] = "未答"; | 
| 1331 | 1455 | params["count" + index] = lastOPtion?.count ?? ""; | 
| 1332 | 1456 | params["persent" + index] = lastOPtion?.persent ?? ""; | 
| 1333 | - params["option" + index] = "?"; | |
| 1457 | + params["option" + index] = "未答"; | |
| 1334 | 1458 | } | 
| 1335 | 1459 | }); | 
| 1336 | 1460 | |
| 1337 | - | |
| 1338 | - | |
| 1339 | 1461 | return { | 
| 1340 | 1462 | ...item, | 
| 1341 | 1463 | ...params, | 
| ... | ... | @@ -1347,30 +1469,29 @@ export default { | 
| 1347 | 1469 | }); | 
| 1348 | 1470 | |
| 1349 | 1471 | this.testPaperExamReportOptions = [...optionsList]; | 
| 1350 | - | |
| 1351 | 1472 | this.testPaperExamReport.push({ | 
| 1352 | 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 | 1478 | correctAnswer: "备注" | 
| 1358 | 1479 | }) | 
| 1359 | 1480 | |
| 1360 | 1481 | this.testPaperExamReport.push({ | 
| 1361 | - questionIndex: "主观题", | |
| 1482 | + questionIndex: "客观题", | |
| 1362 | 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 | 1489 | this.testPaperExamReport.push({ | 
| 1369 | 1490 | questionIndex: "合计", | 
| 1370 | 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 | 1497 | async _testStudentExamReport() { | 
| ... | ... | @@ -1466,50 +1587,43 @@ export default { | 
| 1466 | 1587 | |
| 1467 | 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 | 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 | 1627 | this.studentList = [...studentResults]; | 
| 1514 | 1628 | |
| 1515 | 1629 | var show4Area = true; //显示4选项区域 | 
| ... | ... | @@ -1530,7 +1644,9 @@ export default { | 
| 1530 | 1644 | |
| 1531 | 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 | 1651 | var missCount = 0; | 
| 1536 | 1652 | |
| ... | ... | @@ -1562,6 +1678,10 @@ export default { | 
| 1562 | 1678 | minOptions = 2; | 
| 1563 | 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 | 1687 | show4Area = minOptions <= 4; | 
| ... | ... | @@ -1593,7 +1713,9 @@ export default { | 
| 1593 | 1713 | |
| 1594 | 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 | 1720 | var details = question.details.filter(fl => { | 
| 1599 | 1721 | return fl.option.indexOf('未答') < 0; | 
| ... | ... | @@ -1615,8 +1737,8 @@ export default { | 
| 1615 | 1737 | var questionColumn = 'column' + Number(6 * col + ilr); | 
| 1616 | 1738 | |
| 1617 | 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 | 1743 | if (questionOption != "- -") questionOption += "(" + questionDetail.persent + ")"; | 
| 1622 | 1744 | |
| ... | ... | @@ -1662,7 +1784,8 @@ export default { | 
| 1662 | 1784 | |
| 1663 | 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 | 1790 | for (var ilr = 0; ilr < 9; ilr++) { | 
| 1668 | 1791 | |
| ... | ... | @@ -1719,7 +1842,8 @@ export default { | 
| 1719 | 1842 | |
| 1720 | 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 | 1848 | for (var ilr = 0; ilr < 12; ilr++) { | 
| 1725 | 1849 | |
| ... | ... | @@ -1774,7 +1898,8 @@ export default { | 
| 1774 | 1898 | : this.$request.periodDetail; | 
| 1775 | 1899 | |
| 1776 | 1900 | let response = await request({ | 
| 1777 | - periodIds: this.ids | |
| 1901 | + periodIds: this.ids, | |
| 1902 | + size: 9999 | |
| 1778 | 1903 | }); | 
| 1779 | 1904 | |
| 1780 | 1905 | if (response.status != 0) { | 
| ... | ... | @@ -1794,7 +1919,8 @@ export default { | 
| 1794 | 1919 | |
| 1795 | 1920 | let listResponse = await listRequest({ | 
| 1796 | 1921 | periodIds: this.ids, | 
| 1797 | - classIds: this.classIds | |
| 1922 | + classIds: this.classIds, | |
| 1923 | + size: 9999 | |
| 1798 | 1924 | }); | 
| 1799 | 1925 | |
| 1800 | 1926 | if (listResponse.status != 0) { | 
| ... | ... | @@ -1827,12 +1953,13 @@ export default { | 
| 1827 | 1953 | if (detail.length > this.askPeriodQuestionItemOptions.length) { | 
| 1828 | 1954 | this.askPeriodQuestionItemOptions = [...detail]; | 
| 1829 | 1955 | } | 
| 1956 | + | |
| 1830 | 1957 | detail.map((items, index) => { | 
| 1831 | 1958 | params["isRight" + index] = items.isRight; | 
| 1832 | 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 | 1964 | : items.answer; | 
| 1838 | 1965 | }); | 
| ... | ... | @@ -1878,7 +2005,6 @@ export default { | 
| 1878 | 2005 | |
| 1879 | 2006 | this.askCheckinStatus = response.data.list; | 
| 1880 | 2007 | |
| 1881 | - console.log(detailResponse, response) | |
| 1882 | 2008 | |
| 1883 | 2009 | }, | 
| 1884 | 2010 | async _loadTestDetail() { | 
| ... | ... | @@ -1934,15 +2060,16 @@ export default { | 
| 1934 | 2060 | if (detail.length > optionsList.length) { | 
| 1935 | 2061 | optionsList = [...detail]; | 
| 1936 | 2062 | } | 
| 2063 | + | |
| 1937 | 2064 | detail.map((items, index) => { | 
| 1938 | 2065 | params["que" + items.id] = items.id; | 
| 1939 | 2066 | params["score" + items.id] = String(items.score).includes(".") | 
| 1940 | 2067 | ? Number(items.score) | 
| 1941 | 2068 | : items.score; | 
| 1942 | 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 | 2071 | params["isRight" + items.id] = items.isRight; | 
| 1945 | - params["questionType" + items.id] = items.questionType; | |
| 2072 | + params["questionType" + items.id] = item.questionType; | |
| 1946 | 2073 | }); | 
| 1947 | 2074 | return { | 
| 1948 | 2075 | ...item, | 
| ... | ... | @@ -2017,22 +2144,22 @@ export default { | 
| 2017 | 2144 | min: 9999, | 
| 2018 | 2145 | answeredRate: 0 | 
| 2019 | 2146 | }; | 
| 2020 | - | |
| 2147 | + | |
| 2021 | 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 | 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 | 2163 | optionsList.push({}) | 
| 2037 | 2164 | } | 
| 2038 | 2165 | |
| ... | ... | @@ -2059,21 +2186,21 @@ export default { | 
| 2059 | 2186 | : ""; | 
| 2060 | 2187 | params["option" + index] = | 
| 2061 | 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 | 2193 | : defaultArr[index]?.option | 
| 2067 | 2194 | : ""; | 
| 2195 | + | |
| 2068 | 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 | 2206 | summary.sum += parseFloat(item.score); | 
| ... | ... | @@ -2117,47 +2244,46 @@ export default { | 
| 2117 | 2244 | questionIndex: "汇总", | 
| 2118 | 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 | 2259 | this.testQuestions.push({ | 
| 2132 | 2260 | questionIndex: "客观题", | 
| 2133 | 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 | 2274 | this.testQuestions.push({ | 
| 2149 | 2275 | questionIndex: "合计", | 
| 2150 | 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 | 2289 | keydownRange(event) { | 
| ... | ... | @@ -2192,9 +2318,12 @@ export default { | 
| 2192 | 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 | 2328 | .dia-tab-box { | 
| 2200 | 2329 | font-size: 14px; | ... | ... | 
src/views/basic/askTestQuestion/gradeAnalysisDetail.vue
| 1 | 1 | <template> | 
| 2 | - <el-container class="default-body"> | |
| 2 | + <el-container class="default-body default-body-detail"> | |
| 3 | 3 | <el-header> | 
| 4 | 4 | <back-box class="detailBack"> | 
| 5 | 5 | <template slot="title"> | 
| ... | ... | @@ -45,7 +45,7 @@ | 
| 45 | 45 | <span class="line-subfix">试卷名称:</span> | 
| 46 | 46 | <el-tooltip effect="dark" :content="item.paperName" placement="left"> | 
| 47 | 47 | <span class="line-value">{{ item.paperName }}</span> | 
| 48 | - </el-tooltip> | |
| 48 | + </el-tooltip> | |
| 49 | 49 | </div> | 
| 50 | 50 | <div class="row-line"> | 
| 51 | 51 | <span class="line-subfix">测验时间:</span> | 
| ... | ... | @@ -183,7 +183,7 @@ | 
| 183 | 183 | {{ scoped.row.missPeopleNumber }}</span> 人 | 
| 184 | 184 | </span> | 
| 185 | 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 | 187 | 选{{ item.option }}:{{ item.students.join("/") }} | 
| 188 | 188 | </span> | 
| 189 | 189 | <span></span> | 
| ... | ... | @@ -199,7 +199,7 @@ | 
| 199 | 199 | <el-button type="default" style="margin-left:0px" :size="'small'" | 
| 200 | 200 | @click="_changePage('next')">下一页</el-button> | 
| 201 | 201 | </div> | 
| 202 | - <div style="display: none;"> | |
| 202 | + <div style="height: 1px;overflow: hidden;"> | |
| 203 | 203 | <div id="test-print"> | 
| 204 | 204 | <div v-for="(testTranscript, index) in testTranscriptDatas"> | 
| 205 | 205 | <div style="margin-top:20px"> | 
| ... | ... | @@ -313,7 +313,7 @@ | 
| 313 | 313 | {{ scoped.row.missPeopleNumber }}</span> 人 | 
| 314 | 314 | </span> | 
| 315 | 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 | 317 | 选{{ item.option }}:{{ item.students.join("/") }} | 
| 318 | 318 | </span> | 
| 319 | 319 | <span></span> | 
| ... | ... | @@ -325,10 +325,9 @@ | 
| 325 | 325 | </div> | 
| 326 | 326 | </div> | 
| 327 | 327 | </div> | 
| 328 | - | |
| 329 | 328 | </el-tab-pane> | 
| 330 | 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 | 331 | <el-button @click="_studentLevelSet" class="green-el-button" type="primary"> | 
| 333 | 332 | 设置学生成绩等级 | 
| 334 | 333 | </el-button> | 
| ... | ... | @@ -382,7 +381,7 @@ | 
| 382 | 381 | </el-table> | 
| 383 | 382 | </el-tab-pane> | 
| 384 | 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 | 386 | <el-input-number class="parent-number" v-model="lowLevel" :min="1" :max="100" label="低分率"> | 
| 388 | 387 | </el-input-number> | 
| ... | ... | @@ -399,11 +398,16 @@ | 
| 399 | 398 | </el-table-column> | 
| 400 | 399 | <el-table-column prop="knowledge" label="知识点"> | 
| 401 | 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 | 411 | </template> | 
| 408 | 412 | </el-table-column> | 
| 409 | 413 | <el-table-column prop="score" label="满分值" width="120"> | 
| ... | ... | @@ -427,11 +431,11 @@ | 
| 427 | 431 | </div> | 
| 428 | 432 | </template> | 
| 429 | 433 | </el-table-column> | 
| 430 | - <el-table-column prop="gradeScoringRate" label="年级得分率" width="120"> | |
| 434 | + <el-table-column prop="gradeScoringRate" label="年级已考得分率" width="150"> | |
| 431 | 435 | <template slot-scope="scoped"> | 
| 432 | 436 | <div v-if="scoped.row.type == 'colspan'" | 
| 433 | 437 | :class="scoped.row.gradeScoringRate < lowLevel ? 'lowLevelClass' : ''"> | 
| 434 | - {{ scoped.row.gradeScoringRate }} % | |
| 438 | + {{ Number(scoped.row.gradeScoringRate).toFixed(2) }} % | |
| 435 | 439 | </div> | 
| 436 | 440 | <div v-else="scoped.row.gradeScoringRate" | 
| 437 | 441 | :class="Number(scoped.row.gradeScoringRate * 100) < lowLevel ? 'lowLevelClass' : ''"> | 
| ... | ... | @@ -458,7 +462,7 @@ | 
| 458 | 462 | </el-table> | 
| 459 | 463 | </el-tab-pane> | 
| 460 | 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 | 466 | <el-button @click="_import" type="primary" class="opration-btn" icon="el-icon-upload2">导出报表</el-button> | 
| 463 | 467 | <el-button @click="_print" type="primary" class="opration-btn" icon="el-icon-printer">打印报表</el-button> | 
| 464 | 468 | </div> | 
| ... | ... | @@ -553,7 +557,7 @@ | 
| 553 | 557 | </template> | 
| 554 | 558 | |
| 555 | 559 | <script> | 
| 556 | -import { formatDate, downloadFile, tablePrint } from "utils"; | |
| 560 | +import { formatDate, downloadFile, tablePrint, getKnowledge } from "utils"; | |
| 557 | 561 | export default { | 
| 558 | 562 | data() { | 
| 559 | 563 | return { | 
| ... | ... | @@ -577,6 +581,24 @@ export default { | 
| 577 | 581 | question10List: [], | 
| 578 | 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 | 602 | currentPage: 0, | 
| 581 | 603 | totalPage: 0, | 
| 582 | 604 | checkedClassInfos: [], | 
| ... | ... | @@ -652,8 +674,29 @@ export default { | 
| 652 | 674 | this.checkedClassInfos = this.classInfos?.map(item => item.classId); | 
| 653 | 675 | this.tabType = "成绩测验单"; | 
| 654 | 676 | await this._queryDefaultLevels(); | 
| 677 | + await this._examDetail(); | |
| 655 | 678 | }, | 
| 656 | 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 | 700 | async _anys() { | 
| 658 | 701 | this.queryLoading = true; | 
| 659 | 702 | switch (this.tabType) { | 
| ... | ... | @@ -762,12 +805,20 @@ export default { | 
| 762 | 805 | return [3, 1]; | 
| 763 | 806 | } | 
| 764 | 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 | 813 | else { | 
| 768 | 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 | 822 | else { | 
| 772 | 823 | return [1, 1] | 
| 773 | 824 | } | 
| ... | ... | @@ -810,14 +861,21 @@ export default { | 
| 810 | 861 | |
| 811 | 862 | this.testTranscriptDatas = []; | 
| 812 | 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 | 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 | 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 | 881 | async _import() { | 
| ... | ... | @@ -865,7 +923,6 @@ export default { | 
| 865 | 923 | this.$message.error("下载失败"); | 
| 866 | 924 | } | 
| 867 | 925 | }, | 
| 868 | - _detailQ(id) { }, | |
| 869 | 926 | setSubPro(type) { | 
| 870 | 927 | let tit; | 
| 871 | 928 | switch (type) { | 
| ... | ... | @@ -922,48 +979,43 @@ export default { | 
| 922 | 979 | |
| 923 | 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 | 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 | 1021 | demoTestTranscript.studentList = [...studentResults]; | 
| ... | ... | @@ -986,7 +1038,9 @@ export default { | 
| 986 | 1038 | |
| 987 | 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 | 1045 | var missCount = 0; | 
| 992 | 1046 | |
| ... | ... | @@ -1019,10 +1073,11 @@ export default { | 
| 1019 | 1073 | minOptions = 2; | 
| 1020 | 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 | 1081 | show4Area = minOptions <= 4; | 
| 1027 | 1082 | |
| 1028 | 1083 | show7Area = optionNumList.filter(o => o > 4 && o <= 7); | 
| ... | ... | @@ -1052,7 +1107,8 @@ export default { | 
| 1052 | 1107 | |
| 1053 | 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 | 1113 | var details = question.details.filter(fl => { | 
| 1058 | 1114 | return fl.option.indexOf('未答') < 0; | 
| ... | ... | @@ -1075,7 +1131,9 @@ export default { | 
| 1075 | 1131 | |
| 1076 | 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 | 1138 | if (questionOption != "- -") questionOption += "(" + questionDetail.persent + ")"; | 
| 1081 | 1139 | |
| ... | ... | @@ -1121,7 +1179,8 @@ export default { | 
| 1121 | 1179 | |
| 1122 | 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 | 1185 | for (var ilr = 0; ilr < 9; ilr++) { | 
| 1127 | 1186 | |
| ... | ... | @@ -1177,7 +1236,8 @@ export default { | 
| 1177 | 1236 | |
| 1178 | 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 | 1242 | for (var ilr = 0; ilr < 12; ilr++) { | 
| 1183 | 1243 | |
| ... | ... | @@ -1281,8 +1341,12 @@ export default { | 
| 1281 | 1341 | return item.option != "未答"; | 
| 1282 | 1342 | }); | 
| 1283 | 1343 | |
| 1344 | + if (item.questionType == 4) { | |
| 1345 | + item.correctAnswer = item.correctAnswer == 1 ? "✓" : "✗" | |
| 1346 | + } | |
| 1347 | + | |
| 1284 | 1348 | optionsList.map((items, index) => { | 
| 1285 | - if (index != 4) { | |
| 1349 | + if (index < maxOption - 1) { | |
| 1286 | 1350 | params["count" + index] = | 
| 1287 | 1351 | defaultArr[index]?.option != "未答" | 
| 1288 | 1352 | ? defaultArr[index]?.count | 
| ... | ... | @@ -1291,11 +1355,12 @@ export default { | 
| 1291 | 1355 | defaultArr[index]?.option != "未答" | 
| 1292 | 1356 | ? defaultArr[index]?.persent | 
| 1293 | 1357 | : ""; | 
| 1358 | + | |
| 1294 | 1359 | params["option" + index] = | 
| 1295 | 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 | 1365 | : defaultArr[index]?.option | 
| 1301 | 1366 | : ""; | 
| ... | ... | @@ -1304,7 +1369,7 @@ export default { | 
| 1304 | 1369 | items["title"] = "未答"; | 
| 1305 | 1370 | params["count" + index] = lastOPtion?.count ?? ""; | 
| 1306 | 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 | 1401 | |
| 1337 | 1402 | this.testPaperExamReportOptions = [...optionsList]; | 
| 1338 | 1403 | |
| 1339 | - console.log(objective, subjective, summary, Number(objective.avg / objective.sum)) | |
| 1404 | + var examReport = this.examReport; | |
| 1405 | + | |
| 1340 | 1406 | this.testPaperExamReport.push({ | 
| 1341 | 1407 | questionIndex: "汇总", | 
| 1342 | 1408 | questionType: "客观题", | 
| 1343 | 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 | 1414 | correctAnswer: "备注" | 
| 1348 | 1415 | }) | 
| 1349 | 1416 | |
| 1350 | 1417 | this.testPaperExamReport.push({ | 
| 1351 | 1418 | questionIndex: "主观题", | 
| 1352 | 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 | 1425 | this.testPaperExamReport.push({ | 
| 1359 | 1426 | questionIndex: "合计", | 
| 1360 | 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 | 1433 | async _testStudentExamReport() { | 
| 1367 | 1434 | this.testStudentExamReport = []; | 
| 1435 | + | |
| 1368 | 1436 | if (!this.checkedClassInfos || this.checkedClassInfos?.length <= 0) return; | 
| 1369 | 1437 | |
| 1370 | 1438 | const request = this.$request.gStudentExamReport; | 
| ... | ... | @@ -1427,7 +1495,6 @@ export default { | 
| 1427 | 1495 | return item; | 
| 1428 | 1496 | }); | 
| 1429 | 1497 | }, | 
| 1430 | - _delete() { }, | |
| 1431 | 1498 | }, | 
| 1432 | 1499 | }; | 
| 1433 | 1500 | </script> | ... | ... | 
src/views/basic/askTestQuestion/index.vue
| ... | ... | @@ -33,7 +33,7 @@ | 
| 33 | 33 | <el-button type="primary" @click="_serach"> | 
| 34 | 34 | 筛选 | 
| 35 | 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 | 37 | <el-radio-button label="onDay">今天</el-radio-button> | 
| 38 | 38 | <el-radio-button label="onWeek">本周</el-radio-button> | 
| 39 | 39 | <el-radio-button label="onMonth">本月</el-radio-button> | 
| ... | ... | @@ -73,7 +73,7 @@ | 
| 73 | 73 | <el-popconfirm style="color:gray !important;" | 
| 74 | 74 | @confirm="_deleteDetermineQ(item.id)" | 
| 75 | 75 | :title="dataType == 1 ? '确认删除此课件' : '确认删除此试卷'"> | 
| 76 | - <el-button style="color:#606266 !important;" | |
| 76 | + <el-button class="small-button" :size="'small'" style="color:#606266 !important;" | |
| 77 | 77 | @click.native="_delete(item.id)" type="text" | 
| 78 | 78 | slot="reference">删除</el-button> | 
| 79 | 79 | </el-popconfirm> | 
| ... | ... | @@ -109,7 +109,7 @@ | 
| 109 | 109 | <div class="pic" v-if="dataType == 2" style="margin-left: 44px;"> | 
| 110 | 110 | <img src="../../../assets/images/tishu.png" /> | 
| 111 | 111 | </div> | 
| 112 | - <div class="text" v-if="dataType == 2"> 预计时长:</div> | |
| 112 | + <div class="text" v-if="dataType == 2"> 考试时长:</div> | |
| 113 | 113 | <div class="value" v-if="dataType == 2">{{ item.examsDuration }} | 
| 114 | 114 | 分钟 | 
| 115 | 115 | </div> | 
| ... | ... | @@ -159,11 +159,12 @@ | 
| 159 | 159 | <el-dropdown-menu slot="dropdown"> | 
| 160 | 160 | <el-dropdown-item | 
| 161 | 161 | @click.native="_detailQ(item.id)">查看</el-dropdown-item> | 
| 162 | + <el-dropdown-item @click.native="_copy(item)">复制</el-dropdown-item> | |
| 162 | 163 | <el-dropdown-item> | 
| 163 | 164 | <el-popconfirm style="color:gray !important;" | 
| 164 | 165 | @confirm="_deleteDetermineQ(item.id)" | 
| 165 | 166 | :title="dataType == 1 ? '确认删除此课件' : '确认删除此试卷'"> | 
| 166 | - <el-button style="color:#606266 !important;" | |
| 167 | + <el-button class="small-button" :size="'small'" style="color:#606266 !important;" | |
| 167 | 168 | @click.native="_delete(item.id)" type="text" | 
| 168 | 169 | slot="reference">删除</el-button> | 
| 169 | 170 | </el-popconfirm> | 
| ... | ... | @@ -199,7 +200,7 @@ | 
| 199 | 200 | <div class="pic" v-if="dataType == 2" style="margin-left: 44px;"> | 
| 200 | 201 | <img src="../../../assets/images/tishu.png" /> | 
| 201 | 202 | </div> | 
| 202 | - <div class="text" v-if="dataType == 2"> 预计时长:</div> | |
| 203 | + <div class="text" v-if="dataType == 2"> 考试时长:</div> | |
| 203 | 204 | <div class="value" v-if="dataType == 2">{{ item.examsDuration }} | 
| 204 | 205 | 分钟 | 
| 205 | 206 | </div> | 
| ... | ... | @@ -231,45 +232,49 @@ | 
| 231 | 232 | </div> | 
| 232 | 233 | </el-main> | 
| 233 | 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 | 237 | </el-pagination> | 
| 237 | 238 | </el-footer> | 
| 238 | 239 | <el-dialog :append-to-body="true" :close-on-click-modal="false" title="上传word文档" :visible.sync="diaUp" | 
| 239 | 240 | width="600px"> | 
| 240 | 241 | <upload :url="url" :params="{ type: importType }" @upSuccess="upSuccess" fileName="下载"> | 
| 241 | 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 | 248 | <span class="img-box"> | 
| 248 | 249 | <el-image class="img" :src="examplePic" :preview-src-list="examplePicList"> | 
| 249 | 250 | </el-image> | 
| 250 | - 菁优网示例 </span>/ | |
| 251 | + </span> | |
| 252 | + <p> 组卷网(学科网)示例如下:</p> | |
| 251 | 253 | <span class="img-box"> | 
| 252 | 254 | <el-image class="img" :src="examplePic2" :preview-src-list="examplePicList2"> | 
| 253 | 255 | </el-image> | 
| 254 | - 组卷网(学科网)示例。 | |
| 255 | 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 | 266 | <span class="img-box"> | 
| 262 | 267 | <el-image class="img" :src="examplePic" :preview-src-list="examplePicList"> | 
| 263 | 268 | </el-image> | 
| 264 | - 菁优网示例 | |
| 269 | + | |
| 265 | 270 | </span> | 
| 266 | - / | |
| 271 | + <p> 组卷网(学科网)示例如下:</p> | |
| 267 | 272 | <span class="img-box"> | 
| 268 | 273 | <el-image class="img" :src="examplePic2" :preview-src-list="examplePicList2"> | 
| 269 | 274 | </el-image> | 
| 270 | - 组卷网(学科网)示例。 | |
| 275 | + | |
| 271 | 276 | </span> | 
| 272 | - </p> | |
| 277 | + </div> | |
| 273 | 278 | <p>第二步:上传完成编辑好的试卷。</p> | 
| 274 | 279 | </div> | 
| 275 | 280 | </upload> | 
| ... | ... | @@ -303,15 +308,15 @@ export default { | 
| 303 | 308 | sharedList: [], | 
| 304 | 309 | dataType: "1", | 
| 305 | 310 | importType: 0, | 
| 306 | - tabType: "0", | |
| 307 | - dateStatus: "-1", | |
| 311 | + tabType: "0", | |
| 308 | 312 | url: "/api_html/common/paper/upload", //上传文档地址 | 
| 309 | 313 | listPage: { | 
| 310 | 314 | page: 1, | 
| 311 | 315 | size: 8, | 
| 312 | 316 | total: 0, | 
| 313 | 317 | }, | 
| 314 | - query: { | |
| 318 | + query: { | |
| 319 | + dateStatus: "-1", | |
| 315 | 320 | title: "", | 
| 316 | 321 | class: null, | 
| 317 | 322 | subject: null, | 
| ... | ... | @@ -334,18 +339,19 @@ export default { | 
| 334 | 339 | this.listPage.page = 1; | 
| 335 | 340 | this._serach(); | 
| 336 | 341 | }, | 
| 337 | - 'dateStatus'(val) { | |
| 342 | + 'query.dateStatus'(val) { | |
| 338 | 343 | var dateRange = setDateRules(val); | 
| 344 | + | |
| 339 | 345 | this.query.dateRange = [dateRange.startDay, dateRange.endDay]; | 
| 340 | 346 | } | 
| 341 | 347 | }, | 
| 342 | - async created() { | |
| 348 | + async created() { | |
| 343 | 349 | this.dataType = location.href.endsWith("askPreparationQuestions") ? "1" : "2"; | 
| 344 | 350 | this.code = this.$store.getters.csCode; | 
| 345 | 351 | this.role = | 
| 346 | 352 | this.$store.getters.info.showRole || | 
| 347 | 353 | this.$store.getters.info.permissions[0].role; | 
| 348 | - this.dateStatus = "onWeek"; | |
| 354 | + this.query.dateStatus = "onWeek"; | |
| 349 | 355 | await this._loadQueryDatas(); | 
| 350 | 356 | }, | 
| 351 | 357 | methods: { | 
| ... | ... | @@ -534,6 +540,8 @@ export default { | 
| 534 | 540 | subjectName: "", | 
| 535 | 541 | tagId: "", | 
| 536 | 542 | title: "", | 
| 543 | + start: null, | |
| 544 | + end: null, | |
| 537 | 545 | type: this.dataType, //试卷类型 | 
| 538 | 546 | share: this.tabType, //分享类型 | 
| 539 | 547 | }; | 
| ... | ... | @@ -542,9 +550,10 @@ export default { | 
| 542 | 550 | queryParams.subjectName = this.query.subject; | 
| 543 | 551 | queryParams.tagId = this.query.tagId; | 
| 544 | 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 | 557 | const { data, status, info } = await fetchPaperList({ | 
| 549 | 558 | ...queryParams, | 
| 550 | 559 | status: 1, | 
| ... | ... | @@ -560,7 +569,7 @@ export default { | 
| 560 | 569 | this.createdCount = data?.myCount || 0; | 
| 561 | 570 | this.sharedCount = data?.gradeCount || 0; | 
| 562 | 571 | this.listPage.total = data.total; | 
| 563 | - | |
| 572 | + console.log('page', this.listPage) | |
| 564 | 573 | if (this.tabType == "0") { | 
| 565 | 574 | this.defaultList = []; | 
| 566 | 575 | if (data?.list) this.defaultList = [...data?.list]; | 
| ... | ... | @@ -696,7 +705,7 @@ export default { | 
| 696 | 705 | margin-top: 3px; | 
| 697 | 706 | } | 
| 698 | 707 | |
| 699 | - width: 48.5%; | |
| 708 | + width: 48.4%; | |
| 700 | 709 | display: inline-block; | 
| 701 | 710 | margin-bottom: 10px; | 
| 702 | 711 | min-height: 190px; | ... | ... | 
src/views/basic/askTestQuestion/report.vue
| ... | ... | @@ -4,18 +4,17 @@ | 
| 4 | 4 | <div class="default-title">{{ dataType == "1" ? '随堂问报表' : '即时测报表' }}</div> | 
| 5 | 5 | </el-header> | 
| 6 | 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 | 7 | <el-select @change="_changeClass" v-model="query.class" class="filter-select" placeholder="选择班级"> | 
| 10 | 8 | <el-option v-for="item in classList " :key="item.classId" :label="item.className" :value="item.classId" /> | 
| 11 | 9 | </el-select> | 
| 12 | 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 | 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 | 18 | </el-option> | 
| 20 | 19 | </el-select> | 
| 21 | 20 | <el-date-picker class="filter-datePicker" @change="_dateChange" v-model="query.dateRange" type="daterange" | 
| ... | ... | @@ -31,29 +30,29 @@ | 
| 31 | 30 | <el-main> | 
| 32 | 31 | <div style="position: relative"> | 
| 33 | 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 | 37 | <askSummaryReport ref="askSummaryReport" v-if="apiDatas.askReportIds" :askReportIds="apiDatas.askReportIds" | 
| 36 | 38 | :queryParams="query" /> | 
| 37 | 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 | 40 | <el-tab-pane v-if="dataType == 1 && role == 'ROLE_BANZHUREN' && query.status == 'multi'" :name="'0'" | 
| 42 | 41 | :label="`多科表现`" :queryParams="query"> | 
| 43 | 42 | <askBzrMulti v-if="apiDatas.askReportIds" :askReportIds="apiDatas.askReportIds" :queryParams="query" /> | 
| 44 | 43 | </el-tab-pane> | 
| 45 | 44 | <el-tab-pane v-if="dataType == 1 && role == 'ROLE_BANZHUREN' && query.status == 'single'" :name="'1'" | 
| 46 | 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 | 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 | 53 | <testSummaryReport v-if="apiDatas.testReportIds" :testReportIds="apiDatas.testReportIds" | 
| 52 | 54 | @headerClick="_headerClick" :queryParams="query" /> | 
| 53 | 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 | 56 | <el-tab-pane v-if="dataType == 2 && role == 'ROLE_JIAOSHI'" :name="'2'" :label="`多班对比报表`"> | 
| 58 | 57 | <testMultiClassReport :params="query" /> | 
| 59 | 58 | </el-tab-pane> | 
| ... | ... | @@ -65,7 +64,7 @@ | 
| 65 | 64 | <el-tab-pane v-if="dataType == 2 && role == 'ROLE_BANZHUREN' && query.status == 'single'" :name="'1'" | 
| 66 | 65 | :label="`单科表现`"> | 
| 67 | 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 | 68 | </el-tab-pane> | 
| 70 | 69 | <div slot="tab-bar"> | 
| 71 | 70 | <el-button type="primary" icon="el-icon-plus">新增</el-button> | 
| ... | ... | @@ -127,7 +126,7 @@ export default { | 
| 127 | 126 | }; | 
| 128 | 127 | }, | 
| 129 | 128 | watch: { | 
| 130 | - 'dateStatus'(val) { | |
| 129 | + 'dateStatus' (val) { | |
| 131 | 130 | if (val == -1) return; | 
| 132 | 131 | var dateRange = setDateRules(val); | 
| 133 | 132 | this.query.dateRange = [dateRange.startDay, dateRange.endDay]; | 
| ... | ... | @@ -136,15 +135,10 @@ export default { | 
| 136 | 135 | this.dataType = location.href.endsWith("askReport") ? "1" : "2"; | 
| 137 | 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 | 142 | if (this.role == "ROLE_BANZHUREN") { | 
| 149 | 143 | if (value.length == 1 && value[0] != '全部科目') { | 
| 150 | 144 | this.query.status = 'single'; | 
| ... | ... | @@ -153,7 +147,10 @@ export default { | 
| 153 | 147 | } | 
| 154 | 148 | else { | 
| 155 | 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 | 154 | await this._serach(); | 
| 158 | 155 | } | 
| 159 | 156 | } | 
| ... | ... | @@ -169,13 +166,19 @@ export default { | 
| 169 | 166 | this.dateStatus = "onWeek"; | 
| 170 | 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 | 174 | methods: { | 
| 173 | - _opr() { | |
| 174 | - alert('opr'); | |
| 175 | - }, | |
| 176 | 175 | _dateChange() { | 
| 177 | 176 | this.dateStatus = -1; | 
| 178 | 177 | }, | 
| 178 | + selectAllHandle() { | |
| 179 | + if (this.selectAll) this.query.subjects = []; | |
| 180 | + else this.query.subjects = [...this.subjectList] | |
| 181 | + }, | |
| 179 | 182 | async _ReScore() { | 
| 180 | 183 | //重新记分 | 
| 181 | 184 | let { data, info, status } = await this.$request.reScore({ | 
| ... | ... | @@ -210,9 +213,7 @@ export default { | 
| 210 | 213 | return; | 
| 211 | 214 | } | 
| 212 | 215 | this.subjectList = data?.subjectNames ?? []; | 
| 213 | - if (this.role == "ROLE_BANZHUREN") { | |
| 214 | - this.subjectList.unshift("全部科目"); | |
| 215 | - } | |
| 216 | + | |
| 216 | 217 | this.query.subject = data?.subjectNames[0] ?? ""; | 
| 217 | 218 | this.checkedSubject = [...this.subjectList]; | 
| 218 | 219 | this.query.subjects = this.checkedSubject; | 
| ... | ... | @@ -263,7 +264,6 @@ export default { | 
| 263 | 264 | else { | 
| 264 | 265 | queryParams.subjectNames = [this.query.subject]; | 
| 265 | 266 | } | 
| 266 | - console.log(queryParams, this.query.subject) | |
| 267 | 267 | |
| 268 | 268 | queryParams.startDay = this.query.dateRange | 
| 269 | 269 | ? this.query.dateRange[0] | 
| ... | ... | @@ -287,7 +287,9 @@ export default { | 
| 287 | 287 | this.$message.error(askReportResponse.info); | 
| 288 | 288 | return; | 
| 289 | 289 | } | 
| 290 | + | |
| 290 | 291 | this.apiDatas.askReportList = [...askReportResponse?.data?.list ?? []]; | 
| 292 | + | |
| 291 | 293 | this.apiDatas.askReportIds = [... this.apiDatas?.askReportList?.map((item) => item.id) ?? []]; | 
| 292 | 294 | |
| 293 | 295 | if (this.$refs["askSummaryReport"]) { | 
| ... | ... | @@ -367,6 +369,22 @@ export default { | 
| 367 | 369 | }; | 
| 368 | 370 | </script> | 
| 369 | 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 | 388 | .el-tabs__content { | 
| 371 | 389 | padding-left: 20px !important; | 
| 372 | 390 | padding-right: 0px !important; | ... | ... | 
src/views/basic/askTestQuestion/update.vue
| ... | ... | @@ -47,7 +47,7 @@ | 
| 47 | 47 | <div class="bigQuestionTitle" v-if="paperType != 1"> | 
| 48 | 48 | {{ question.questionTitle }} | 
| 49 | 49 | (共{{ question.subQuestions.filter(subQuestion => subQuestion && | 
| 50 | - subQuestion.questionId && subQuestion.questionType).length }}小题, | |
| 50 | + subQuestion.questionIndex && subQuestion.questionType).length }}小题, | |
| 51 | 51 | 共{{ question.score }}分) | 
| 52 | 52 | </div> | 
| 53 | 53 | <div v-if="paperType == 2 && index == 0" class="courseware-title sub-questions"> | 
| ... | ... | @@ -61,9 +61,9 @@ | 
| 61 | 61 | </div> | 
| 62 | 62 | |
| 63 | 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 | 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 | 67 | <div class="qs-stem"> | 
| 68 | 68 | <iframe style="height: 100% !important" class="screenshot" :src="subQuestion.screenshot"></iframe> | 
| 69 | 69 | </div> | 
| ... | ... | @@ -108,7 +108,7 @@ | 
| 108 | 108 | <span class="answer-s answer-opration" v-if="!isViewer" | 
| 109 | 109 | @click="openStem(subQuestion, 4, index, subIndex)">+</span> | 
| 110 | 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 | 112 | </p> | 
| 113 | 113 | <p v-if="subQuestion.questionType == 2" class="answer-box"> | 
| 114 | 114 | <template :disabled="isViewer" v-for="option in subQuestion.answerOptions.split(',')"> | 
| ... | ... | @@ -134,18 +134,18 @@ | 
| 134 | 134 | <el-button class="icon-tickets" type="text" | 
| 135 | 135 | @click="openStem(subQuestion, 2, index, subIndex)">修改解析</el-button> | 
| 136 | 136 | </div> | 
| 137 | - <div class="qs-set" v-if="false"> | |
| 137 | + <div class="qs-set"> | |
| 138 | 138 | <el-button type="text" @click="openKnowledge(subQuestion, index, subIndex)">修改知识点</el-button> | 
| 139 | 139 | </div> | 
| 140 | - <div class="qs-set" style="margin-left:10px"> | |
| 140 | + <div class="qs-set"> | |
| 141 | 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 | 143 | </el-popconfirm> | 
| 144 | 144 | </div> | 
| 145 | 145 | </div> | 
| 146 | 146 | </div> | 
| 147 | 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 | 149 | <div class="qs-stem"> | 
| 150 | 150 | <iframe style="height: 100% !important" class="screenshot" :src="question.screenshot"></iframe> | 
| 151 | 151 | </div> | 
| ... | ... | @@ -206,10 +206,10 @@ | 
| 206 | 206 | <el-button class="icon-tickets" type="text" | 
| 207 | 207 | @click="openStem(question, 2, index, 0)">修改解析</el-button> | 
| 208 | 208 | </div> | 
| 209 | - <div class="qs-set" v-if="false"> | |
| 209 | + <div class="qs-set"> | |
| 210 | 210 | <el-button type="text" @click="openKnowledge(question, index, 0)">修改知识点</el-button> | 
| 211 | 211 | </div> | 
| 212 | - <div class="qs-set" style="margin-left:10px"> | |
| 212 | + <div class="qs-set"> | |
| 213 | 213 | <el-popconfirm @confirm="_deleteDetermineQ(0, index)" title="这是一小题确定删除吗?"> | 
| 214 | 214 | <!-- <el-button style="color:red" type="text" slot="reference">删除</el-button> --> | 
| 215 | 215 | </el-popconfirm> | 
| ... | ... | @@ -221,28 +221,28 @@ | 
| 221 | 221 | </div> | 
| 222 | 222 | </div> | 
| 223 | 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 | 227 | <el-row class="row-subfix"> | 
| 228 | 228 | <div class="row-line"> | 
| 229 | 229 | <span class="line-subfix">年级:</span> | 
| 230 | 230 | <span class="line-value">{{ gradeName }}</span> | 
| 231 | 231 | </div> | 
| 232 | 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 | 234 | <span class="line-subfix" style="float: left;">班级:</span> | 
| 235 | 235 | <div class="row-line" style="float: left; | 
| 236 | 236 | background:rgb(245,247,250);padding:15px 10px;width: calc(100% - 80px);border-radius:5px;"> | 
| 237 | 237 | <span class="line-value" style="min-height: 300px;border-radius: 4px; background: rgb(247,247,250);"> | 
| 238 | 238 | <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | 
| 239 | 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 | 243 | {{ item.className }} | 
| 244 | 244 | </el-checkbox> | 
| 245 | - </el-checkbox-group> | |
| 245 | + </div> | |
| 246 | 246 | </span> | 
| 247 | 247 | </div> | 
| 248 | 248 | </el-row> | 
| ... | ... | @@ -323,23 +323,9 @@ | 
| 323 | 323 | </div> | 
| 324 | 324 | </el-dialog> | 
| 325 | 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 | 329 | </el-dialog> | 
| 344 | 330 | </div> | 
| 345 | 331 | <div class="content-fi"> | 
| ... | ... | @@ -352,7 +338,7 @@ | 
| 352 | 338 | |
| 353 | 339 | <script> | 
| 354 | 340 | import { deepClone, checkAnswer } from "utils"; | 
| 355 | -import knowledgeList from "assets/js/knowledgeList.js"; | |
| 341 | +import conf from "@/config/index"; | |
| 356 | 342 | export default { | 
| 357 | 343 | data() { | 
| 358 | 344 | return { | 
| ... | ... | @@ -409,7 +395,7 @@ export default { | 
| 409 | 395 | //v1.5 | 
| 410 | 396 | dialogStem: false, //截图开关 | 
| 411 | 397 | dialogKnowledge: false, //知识点开关 | 
| 412 | - knowledgeList: { ...knowledgeList }, | |
| 398 | + // knowledgeList: { ...knowledgeList }, | |
| 413 | 399 | classList: [], | 
| 414 | 400 | stem: { | 
| 415 | 401 | type: 1, | 
| ... | ... | @@ -420,7 +406,7 @@ export default { | 
| 420 | 406 | knowledge: [], //知识点 | 
| 421 | 407 | }, | 
| 422 | 408 | gradeClassList: [], //学段列表 | 
| 423 | - uploadUrl: "/file/uploadImgToHtml", | |
| 409 | + // uploadUrl: "/file/uploadImgToHtml", | |
| 424 | 410 | iframeLoading: false, | 
| 425 | 411 | examType: 2, | 
| 426 | 412 | }; | 
| ... | ... | @@ -439,31 +425,22 @@ export default { | 
| 439 | 425 | }, 0); | 
| 440 | 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 | 445 | created() { | 
| 469 | 446 | this.role = | 
| ... | ... | @@ -481,17 +458,47 @@ export default { | 
| 481 | 458 | this._GradeList(); | 
| 482 | 459 | }, | 
| 483 | 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 | 487 | _checkedClass() { | 
| 488 | + this.checkedClass = this.gradeClass.filter(item => item.isChecked).map(imap => imap.id); | |
| 485 | 489 | this.classSharingType = false; | 
| 486 | 490 | }, | 
| 487 | 491 | handleCheckAllChange(val) { | 
| 488 | - this.checkedClass = val ? this.gradeClass?.map(item => item.id) : []; | |
| 492 | + this.gradeClass.forEach(item => { | |
| 493 | + item.isChecked = val; | |
| 494 | + }) | |
| 489 | 495 | this.isIndeterminate = false; | 
| 490 | 496 | }, | 
| 491 | - handleCheckedClassChange(value) { | |
| 497 | + handleCheckedClassChange() { | |
| 498 | + var value = this.gradeClass.filter(item => item.isChecked); | |
| 492 | 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 | 503 | async _selectClassSharingType() { | 
| 497 | 504 | |
| ... | ... | @@ -505,10 +512,16 @@ export default { | 
| 505 | 512 | |
| 506 | 513 | if (classResponse.status != 0) { | 
| 507 | 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 | 526 | // v1.5 | 
| 514 | 527 | //上传截图 | 
| ... | ... | @@ -594,25 +607,7 @@ export default { | 
| 594 | 607 | upError(res) { | 
| 595 | 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 | 611 | //end | 
| 617 | 612 | |
| 618 | 613 | linkBack() { | 
| ... | ... | @@ -893,7 +888,7 @@ export default { | 
| 893 | 888 | modifyPaper = | 
| 894 | 889 | this.role == "ROLE_PERSONAL" | 
| 895 | 890 | ? this.$request.pModifyPaper | 
| 896 | - : this.$request.modifyPaper; | |
| 891 | + : this.$request.pModifyPaperNew; | |
| 897 | 892 | params = { | 
| 898 | 893 | classIds: this.checkedClass, | 
| 899 | 894 | sharingType: this.form.sharingType, | 
| ... | ... | @@ -936,7 +931,7 @@ export default { | 
| 936 | 931 | }); | 
| 937 | 932 | } | 
| 938 | 933 | } else { | 
| 939 | - this.$message.error(message); | |
| 934 | + this.$message.error(info); | |
| 940 | 935 | } | 
| 941 | 936 | }, | 
| 942 | 937 | async _QueryDetail() { | 
| ... | ... | @@ -1384,11 +1379,12 @@ export default { | 
| 1384 | 1379 | } | 
| 1385 | 1380 | |
| 1386 | 1381 | .qs-set { | 
| 1387 | - width: 80px; | |
| 1382 | + display: inline-block; | |
| 1383 | + padding: 0px 5px; | |
| 1388 | 1384 | } | 
| 1389 | 1385 | |
| 1390 | 1386 | .qs-oprations { | 
| 1391 | - width: 300px; | |
| 1387 | + width: 320px; | |
| 1392 | 1388 | } | 
| 1393 | 1389 | |
| 1394 | 1390 | .qs-options { | ... | ... | 
src/views/basic/down/client.vue
| ... | ... | @@ -19,12 +19,7 @@ | 
| 19 | 19 | </div> | 
| 20 | 20 | <div class="down-box"> | 
| 21 | 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 | 23 | </div> | 
| 29 | 24 | </div> | 
| 30 | 25 | <!-- <ul class="down-ul"> | 
| ... | ... | @@ -54,46 +49,35 @@ | 
| 54 | 49 | <i class="fa fa-mail-reply-all"></i> | 
| 55 | 50 | <p> | 
| 56 | 51 | {{ | 
| 57 | - `${type == 1 ? "参数设置" : formData.configName}` | |
| 58 | - }} | |
| 52 | + `${type == 1 ? "参数设置" : formData.configName}` | |
| 53 | + }} | |
| 59 | 54 | </p> | 
| 60 | 55 | </div> | 
| 61 | 56 | </div> | 
| 62 | 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 | 59 | <el-form-item label="配置名称:" prop="configName" v-if="type == 1"> | 
| 70 | 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 | 62 | </el-col> | 
| 76 | 63 | </el-form-item> | 
| 77 | 64 | <el-form-item label="主菜单设置:" prop="mainMenu"> | 
| 78 | 65 | <el-checkbox-group v-model="formData.mainMenu" :max="4"> | 
| 79 | 66 | <el-checkbox v-for="item in menuList" :label="item" :key="item">{{ | 
| 80 | - item | |
| 81 | - }}</el-checkbox> | |
| 67 | + item | |
| 68 | + }}</el-checkbox> | |
| 82 | 69 | </el-checkbox-group> | 
| 83 | 70 | </el-form-item> | 
| 84 | 71 | <el-form-item label="弹出菜单组:" prop="popupMenu"> | 
| 85 | 72 | <el-radio-group v-model="formData.popupMenu"> | 
| 86 | 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 | 76 | </p> | 
| 92 | 77 | <p class="popup-menu popup-menu1"> | 
| 93 | 78 | <el-radio :label="2"> | 
| 94 | 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 | 81 | </p> | 
| 98 | 82 | </el-radio-group> | 
| 99 | 83 | </el-form-item> | 
| ... | ... | @@ -101,56 +85,24 @@ | 
| 101 | 85 | <el-col :span="12"> | 
| 102 | 86 | <div class="silde-box"> | 
| 103 | 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 | 91 | </p> | 
| 115 | 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 | 96 | </p> | 
| 127 | 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 | 101 | </p> | 
| 139 | 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 | 106 | </p> | 
| 155 | 107 | </div> | 
| 156 | 108 | </el-col> | 
| ... | ... | @@ -161,14 +113,8 @@ | 
| 161 | 113 | <el-radio :label="1">即时抢答</el-radio> | 
| 162 | 114 | <el-radio :label="2">老师选择</el-radio> | 
| 163 | 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 | 118 | <span v-show="formData.viesAnswerSet == 0">秒</span> | 
| 173 | 119 | </el-form-item> | 
| 174 | 120 | <el-form-item label="抽答设置:" prop="ballotAnswerSet"> | 
| ... | ... | @@ -178,66 +124,28 @@ | 
| 178 | 124 | </el-radio-group> | 
| 179 | 125 | </el-form-item> | 
| 180 | 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 | 129 | </el-form-item> | 
| 192 | 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 | 133 | </el-form-item> | 
| 204 | 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 | 137 | </el-form-item> | 
| 216 | 138 | <el-form-item label="问—倒计时:" prop="askCountdown"> | 
| 217 | 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 | 142 | {{ askCount ? "秒" : "" }} | 
| 228 | 143 | </el-form-item> | 
| 229 | 144 | <el-form-item label="测—倒计时:" prop="viesAnswerSet"> | 
| 230 | 145 | <el-switch v-model="examsDuration" @change="examsDurationChange"> | 
| 231 | 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 | 149 | {{ examsDuration ? "分" : "" }} | 
| 242 | 150 | </el-form-item> | 
| 243 | 151 | <el-form-item label="答题结构展示:" prop="displayModel"> | 
| ... | ... | @@ -515,7 +423,7 @@ export default { | 
| 515 | 423 | this.$message.error(info); | 
| 516 | 424 | } | 
| 517 | 425 | }, | 
| 518 | - async getAppDownloadUrl(configId) { | |
| 426 | + async getAppDownloadUrl(configId) { | |
| 519 | 427 | const { data, status, info } = await this.$request.getAppDownloadUrl({ | 
| 520 | 428 | configId: configId || "", | 
| 521 | 429 | }); | 
| ... | ... | @@ -539,49 +447,60 @@ export default { | 
| 539 | 447 | width: 100%; | 
| 540 | 448 | position: relative; | 
| 541 | 449 | } | 
| 450 | + | |
| 542 | 451 | .page-content { | 
| 543 | 452 | padding: 30px; | 
| 453 | + | |
| 544 | 454 | .content-top { | 
| 545 | 455 | padding: 20px 50px 20px 20px; | 
| 546 | 456 | display: flex; | 
| 547 | 457 | justify-content: space-between; | 
| 548 | 458 | align-items: center; | 
| 459 | + | |
| 549 | 460 | .cont-info { | 
| 550 | 461 | flex: 1; | 
| 551 | 462 | display: flex; | 
| 552 | 463 | align-items: center; | 
| 464 | + | |
| 553 | 465 | .logo { | 
| 554 | 466 | width: 140px; | 
| 555 | 467 | margin-right: 16px; | 
| 556 | 468 | } | 
| 469 | + | |
| 557 | 470 | .name { | 
| 558 | 471 | font-size: 20px; | 
| 559 | 472 | color: #333; | 
| 560 | 473 | line-height: 24px; | 
| 561 | 474 | padding-bottom: 12px; | 
| 562 | 475 | } | 
| 476 | + | |
| 563 | 477 | .txt { | 
| 564 | 478 | font-size: 15px; | 
| 565 | 479 | color: #7f7f7f; | 
| 566 | 480 | line-height: 25px; | 
| 567 | 481 | } | 
| 568 | 482 | } | 
| 483 | + | |
| 569 | 484 | .down-box { | 
| 570 | 485 | width: 200px; | 
| 571 | 486 | text-align: center; | 
| 487 | + | |
| 572 | 488 | .txt { | 
| 573 | 489 | font-size: 16px; | 
| 574 | 490 | padding-bottom: 8px; | 
| 575 | 491 | } | 
| 492 | + | |
| 576 | 493 | .down-btn { | 
| 577 | 494 | font-size: 20px; | 
| 578 | 495 | } | 
| 579 | 496 | } | 
| 580 | 497 | } | 
| 498 | + | |
| 581 | 499 | .down-ul { | 
| 582 | 500 | display: flex; | 
| 583 | 501 | flex-wrap: wrap; | 
| 584 | 502 | padding: 0 20px; | 
| 503 | + | |
| 585 | 504 | .down-li { | 
| 586 | 505 | width: calc(50% - 12px); | 
| 587 | 506 | height: 72px; | 
| ... | ... | @@ -594,22 +513,27 @@ export default { | 
| 594 | 513 | border-radius: 10px; | 
| 595 | 514 | background: #f8f8f8; | 
| 596 | 515 | box-shadow: 2px 2px 5px #ccc; | 
| 516 | + | |
| 597 | 517 | &:nth-child(2n) { | 
| 598 | 518 | margin-right: 0; | 
| 599 | 519 | } | 
| 520 | + | |
| 600 | 521 | font-size: 16px; | 
| 601 | 522 | color: #667ffd; | 
| 523 | + | |
| 602 | 524 | .p1 { | 
| 603 | 525 | cursor: pointer; | 
| 604 | 526 | } | 
| 605 | 527 | } | 
| 606 | 528 | } | 
| 607 | 529 | } | 
| 530 | + | |
| 608 | 531 | :deep(.el-button.is-round) { | 
| 609 | 532 | width: 120px; | 
| 610 | 533 | text-align: center; | 
| 611 | 534 | padding: 10px 0; | 
| 612 | 535 | } | 
| 536 | + | |
| 613 | 537 | .edit-dia { | 
| 614 | 538 | position: absolute; | 
| 615 | 539 | left: 0; | 
| ... | ... | @@ -620,6 +544,7 @@ export default { | 
| 620 | 544 | height: calc(100vh - 80px); | 
| 621 | 545 | background: #fff; | 
| 622 | 546 | overflow-y: auto; | 
| 547 | + | |
| 623 | 548 | .back { | 
| 624 | 549 | width: 100%; | 
| 625 | 550 | height: 56px; | 
| ... | ... | @@ -628,6 +553,7 @@ export default { | 
| 628 | 553 | align-items: center; | 
| 629 | 554 | padding: 0 20px; | 
| 630 | 555 | box-sizing: border-box; | 
| 556 | + | |
| 631 | 557 | .back-l { | 
| 632 | 558 | display: flex; | 
| 633 | 559 | align-items: center; | 
| ... | ... | @@ -636,26 +562,33 @@ export default { | 
| 636 | 562 | font-size: 18px; | 
| 637 | 563 | font-weight: 500; | 
| 638 | 564 | } | 
| 565 | + | |
| 639 | 566 | .fa-mail-reply-all { | 
| 640 | 567 | font-size: 28px; | 
| 641 | 568 | color: #b3b3b3; | 
| 642 | 569 | margin-right: 12px; | 
| 643 | 570 | } | 
| 644 | 571 | } | 
| 572 | + | |
| 645 | 573 | .form-box { | 
| 646 | 574 | padding: 20px; | 
| 575 | + | |
| 647 | 576 | .popup-menu { | 
| 648 | 577 | padding-bottom: 16px; | 
| 578 | + | |
| 649 | 579 | span { | 
| 650 | 580 | padding-right: 12px; | 
| 651 | 581 | } | 
| 652 | 582 | } | 
| 583 | + | |
| 653 | 584 | .popup-menu1 { | 
| 654 | 585 | padding-bottom: 0; | 
| 655 | 586 | } | 
| 587 | + | |
| 656 | 588 | .count-down { | 
| 657 | 589 | width: 48px; | 
| 658 | 590 | margin: 0 8px 0 20px; | 
| 591 | + | |
| 659 | 592 | :deep(.el-input__inner) { | 
| 660 | 593 | width: 48px; | 
| 661 | 594 | height: 32px; | 
| ... | ... | @@ -664,25 +597,31 @@ export default { | 
| 664 | 597 | border-color: #667ffd; | 
| 665 | 598 | padding: 0; | 
| 666 | 599 | } | 
| 600 | + | |
| 667 | 601 | :deep(.el-input-number__decrease) { | 
| 668 | 602 | display: none; | 
| 669 | 603 | } | 
| 604 | + | |
| 670 | 605 | :deep(.el-input-number__increase) { | 
| 671 | 606 | display: none; | 
| 672 | 607 | } | 
| 673 | 608 | } | 
| 609 | + | |
| 674 | 610 | .count-down2 { | 
| 675 | 611 | margin-left: 0; | 
| 676 | 612 | } | 
| 613 | + | |
| 677 | 614 | .silde-box { | 
| 678 | 615 | position: relative; | 
| 679 | 616 | width: 100%; | 
| 680 | 617 | height: 60px; | 
| 618 | + | |
| 681 | 619 | .silde-p { | 
| 682 | 620 | width: 100%; | 
| 683 | 621 | position: absolute; | 
| 684 | 622 | padding-top: 20px; | 
| 685 | - & > span { | |
| 623 | + | |
| 624 | + &>span { | |
| 686 | 625 | position: absolute; | 
| 687 | 626 | width: 48px; | 
| 688 | 627 | text-align: center; | 
| ... | ... | @@ -690,19 +629,24 @@ export default { | 
| 690 | 629 | flex-shrink: 0; | 
| 691 | 630 | font-size: 12px; | 
| 692 | 631 | } | 
| 632 | + | |
| 693 | 633 | :deep(.el-slider) { | 
| 694 | 634 | flex: 1; | 
| 695 | 635 | } | 
| 636 | + | |
| 696 | 637 | :deep(.el-slider__runway) { | 
| 697 | 638 | margin: 5px 0; | 
| 698 | 639 | } | 
| 640 | + | |
| 699 | 641 | :deep(.el-slider__runway) { | 
| 700 | 642 | background-color: #409eff; | 
| 701 | 643 | } | 
| 644 | + | |
| 702 | 645 | .num { | 
| 703 | 646 | top: 0; | 
| 704 | 647 | transform: translateX(-24px); | 
| 705 | 648 | } | 
| 649 | + | |
| 706 | 650 | .txt { | 
| 707 | 651 | bottom: -20px; | 
| 708 | 652 | transform: translateX(-24px); | ... | ... | 
src/views/basic/setUp/clazz.vue
| ... | ... | @@ -82,9 +82,12 @@ | 
| 82 | 82 | <upload id="downTeacher" drag :url="url" | 
| 83 | 83 | style="border:rgb(219,226,235) dashed 1px;margin:0px auto;width: 80%;padding:40px 0px;border-radius: 5px;" | 
| 84 | 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 | 91 | </upload> | 
| 89 | 92 | </el-row> | 
| 90 | 93 | </div> | ... | ... | 
src/views/basic/setUp/student.vue
src/views/basic/setUp/teacher.vue
| ... | ... | @@ -25,6 +25,12 @@ | 
| 25 | 25 | <el-option label="行政班" :value="0"></el-option> | 
| 26 | 26 | <el-option label="教学班" :value="1"></el-option> | 
| 27 | 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 | 34 | <el-cascader size="small" class="sel sel2" clearable placeholder="选择范围" @change="_QueryData(1)" | 
| 29 | 35 | v-model="query.gradeClassSub" :options="gradeClassSubList" :props="{ | 
| 30 | 36 | multiple: true, | 
| ... | ... | @@ -59,19 +65,17 @@ | 
| 59 | 65 | <el-checkbox v-show="showDel" v-model="AllTeacher" :indeterminate="indeterminate" | 
| 60 | 66 | @change="handleCheckAllChange">{{ "" }}</el-checkbox> | 
| 61 | 67 | <span class="txt">教师列表</span> | 
| 62 | - <el-popconfirm v-show="showDel" title="确定所选教师格式化吗?" @confirm="remove"> | |
| 68 | + <el-popconfirm v-show="showDel" title="确定清除所选教师的任课信息吗?" @confirm="remove"> | |
| 63 | 69 | <img slot="reference" class="clear" src="../../../assets/images/shuazi.svg" alt="" /> | 
| 64 | 70 | </el-popconfirm> | 
| 65 | 71 | </p> | 
| 66 | 72 | <el-checkbox-group v-model="clearTeacher" @change="handleCheckedChange"> | 
| 67 | 73 | <ul class="teacher-ul"> | 
| 68 | 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 | 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 | 79 | </p> | 
| 76 | 80 | </li> | 
| 77 | 81 | </ul> | 
| ... | ... | @@ -97,6 +101,26 @@ | 
| 97 | 101 | }} | 
| 98 | 102 | </p> | 
| 99 | 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 | 124 | <div class="grade-box" v-if="teacherDetail.managerList && teacherDetail.managerList.length"> | 
| 101 | 125 | <p class="h-title">班主任</p> | 
| 102 | 126 | <ul class="grade-info"> | 
| ... | ... | @@ -119,9 +143,7 @@ | 
| 119 | 143 | </li> | 
| 120 | 144 | </ul> | 
| 121 | 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 | 147 | <p class="h-title">任课老师</p> | 
| 126 | 148 | <ul class="grade-info"> | 
| 127 | 149 | <li class="grade-li" v-for="item in teacherDetail.teacherCourseList" | 
| ... | ... | @@ -146,35 +168,6 @@ | 
| 146 | 168 | </li> | 
| 147 | 169 | </ul> | 
| 148 | 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 | 171 | </div> | 
| 179 | 172 | </div> | 
| 180 | 173 | </div> | 
| ... | ... | @@ -213,27 +206,29 @@ | 
| 213 | 206 | </el-radio-group> | 
| 214 | 207 | </el-form-item> | 
| 215 | 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 | 231 | </div> | 
| 234 | - <p class="add-box"> | |
| 235 | - <el-button icon="el-icon-plus" @click="addRoleList">添加</el-button> | |
| 236 | - </p> | |
| 237 | 232 | </el-form-item> | 
| 238 | 233 | </el-form> | 
| 239 | 234 | <div class="dialog-footer" slot="footer"> | 
| ... | ... | @@ -338,7 +333,7 @@ export default { | 
| 338 | 333 | ], | 
| 339 | 334 | sex: [{ required: true, message: "请选择性别", trigger: "blur" }], | 
| 340 | 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 | 544 | let ERR_OK = this.formTeacher.roleList.length > 0; | 
| 550 | 545 | if (ERR_OK) { | 
| 551 | 546 | let [managerList, teacherCourseList, gradeGroupList] = [[], [], []]; | 
| 547 | + console.log(this.formTeacher.roleList) | |
| 552 | 548 | this.formTeacher.roleList.map((item) => { | 
| 553 | 549 | if (item.roleId == 6) { | 
| 554 | 550 | managerList.push({ | 
| 555 | 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 | 554 | } else if (item.roleId == 7) { | 
| 561 | 555 | item.classId.map((clazz) => { | 
| 562 | 556 | teacherCourseList.push({ | 
| 563 | 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 | 559 | subjectName: clazz[1], | 
| 568 | 560 | }); | 
| 569 | 561 | }); | 
| ... | ... | @@ -571,17 +563,8 @@ export default { | 
| 571 | 563 | else if (item.roleId == 3) { | 
| 572 | 564 | gradeGroupList.push({ | 
| 573 | 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 | 569 | return { | 
| 587 | 570 | managerList, | 
| ... | ... | @@ -589,36 +572,29 @@ export default { | 
| 589 | 572 | gradeGroupList, | 
| 590 | 573 | }; | 
| 591 | 574 | } else { | 
| 592 | - return false; | |
| 575 | + if (this.setTercherType == 2) | |
| 576 | + return false; | |
| 577 | + return true; | |
| 593 | 578 | } | 
| 594 | 579 | }, | 
| 595 | 580 | //教师角色数据转换为form格式数据 | 
| 596 | 581 | toTeacherForm() { | 
| 597 | 582 | this.formTeacher.roleList = []; | 
| 583 | + //班主任 | |
| 598 | 584 | this.formTeacher.managerList?.map((item) => { | 
| 599 | 585 | this.formTeacher.roleList.push({ | 
| 600 | 586 | id: randomWord(true, 16, 20), | 
| 601 | 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 | 592 | let teacherClassId = []; | 
| 613 | 593 | this.formTeacher.teacherCourseList?.map((item) => { | 
| 614 | 594 | teacherClassId.push([ | 
| 615 | 595 | item.grade, | 
| 616 | 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 | 600 | if (teacherClassId.length) { | 
| ... | ... | @@ -628,21 +604,25 @@ export default { | 
| 628 | 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 | 618 | async delTeacherManager(obj, type) { | 
| 644 | 619 | let query; | 
| 645 | 620 | switch (type) { | 
| 621 | + case 0: | |
| 622 | + query = { | |
| 623 | + garde: obj.grade, | |
| 624 | + }; | |
| 625 | + break; | |
| 646 | 626 | case 1: | 
| 647 | 627 | query = { | 
| 648 | 628 | classId: obj.classId, | 
| ... | ... | @@ -734,7 +714,8 @@ export default { | 
| 734 | 714 | this.query.phone = ""; | 
| 735 | 715 | this.query.gradeClassSub = []; | 
| 736 | 716 | query.type = this.query.type; | 
| 737 | - } else { | |
| 717 | + } | |
| 718 | + else { | |
| 738 | 719 | query = { ...this.query }; | 
| 739 | 720 | query.grades = []; | 
| 740 | 721 | query.classIds = []; | 
| ... | ... | @@ -995,6 +976,7 @@ export default { | 
| 995 | 976 | } | 
| 996 | 977 | |
| 997 | 978 | .teacher-list { | 
| 979 | + | |
| 998 | 980 | width: 240px; | 
| 999 | 981 | |
| 1000 | 982 | .h-title { | 
| ... | ... | @@ -1122,6 +1104,7 @@ export default { | 
| 1122 | 1104 | font-weight: bold; | 
| 1123 | 1105 | line-height: 18px; | 
| 1124 | 1106 | padding-bottom: 12px; | 
| 1107 | + padding-right: 5px; | |
| 1125 | 1108 | } | 
| 1126 | 1109 | |
| 1127 | 1110 | .grade-class { | 
| ... | ... | @@ -1154,10 +1137,15 @@ export default { | 
| 1154 | 1137 | margin-right: 12px; | 
| 1155 | 1138 | } | 
| 1156 | 1139 | |
| 1140 | +.role-list-main { | |
| 1141 | + float: left; | |
| 1142 | +} | |
| 1143 | + | |
| 1157 | 1144 | .role-list { | 
| 1158 | 1145 | margin-bottom: 10px; | 
| 1159 | 1146 | position: relative; | 
| 1160 | 1147 | |
| 1148 | + | |
| 1161 | 1149 | .sel-p { | 
| 1162 | 1150 | position: absolute; | 
| 1163 | 1151 | left: 146px; | ... | ... | 
src/views/basic/test/archiving.vue
| ... | ... | @@ -7,82 +7,33 @@ | 
| 7 | 7 | </back-box> | 
| 8 | 8 | <div class="answer-header"> | 
| 9 | 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 | 12 | </el-option> | 
| 23 | 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 | 17 | </el-option> | 
| 39 | 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 | 21 | </el-option> | 
| 53 | 22 | </el-select> | 
| 54 | 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 | 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 | 30 | </el-date-picker> | 
| 72 | 31 | </div> | 
| 73 | 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 | 37 | </p> | 
| 87 | 38 | <el-button type="primary" round @click="_QueryData()">筛选</el-button> | 
| 88 | 39 | </div> | 
| ... | ... | @@ -104,71 +55,39 @@ | 
| 104 | 55 | </el-radio-group> --> | 
| 105 | 56 | <div v-show="tabIndex == 1" v-loading="loading"> | 
| 106 | 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 | 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 | 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 | 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 | 92 | </p> | 
| 174 | 93 | <template v-else> | 
| ... | ... | @@ -177,23 +96,13 @@ | 
| 177 | 96 | {{ `(${scoped.row.excellenRate}%)` }} | 
| 178 | 97 | </p> | 
| 179 | 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 | 107 | </p> | 
| 199 | 108 | <template v-else> | 
| ... | ... | @@ -202,23 +111,13 @@ | 
| 202 | 111 | {{ `(${scoped.row.goodRate}%)` }} | 
| 203 | 112 | </p> | 
| 204 | 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 | 122 | </p> | 
| 224 | 123 | <template v-else> | 
| ... | ... | @@ -227,23 +126,13 @@ | 
| 227 | 126 | {{ `(${scoped.row.passRate}%)` }} | 
| 228 | 127 | </p> | 
| 229 | 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 | 137 | </p> | 
| 249 | 138 | <template v-else> | 
| ... | ... | @@ -252,155 +141,59 @@ | 
| 252 | 141 | {{ `(${scoped.row.failedRate}%)` }} | 
| 253 | 142 | </p> | 
| 254 | 143 | </template> | 
| 255 | - </template></el-table-column | |
| 256 | - > | |
| 144 | + </template></el-table-column> | |
| 257 | 145 | <el-table-column label="操作" align="center"> | 
| 258 | 146 | <template slot-scope="scoped"> | 
| 259 | 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 | 150 | </el-tooltip> | 
| 268 | 151 | </template> | 
| 269 | 152 | </el-table-column> | 
| 270 | 153 | </el-table> | 
| 271 | 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 | 157 | </el-pagination> | 
| 282 | 158 | </div> | 
| 283 | 159 | </div> | 
| 284 | 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 | 162 | <template v-if="tableData.length && loading == false"> | 
| 291 | 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 | 173 | </el-table-column> | 
| 330 | 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 | 188 | </el-table-column> | 
| 382 | 189 | </el-table> | 
| 383 | 190 | </div> | 
| 384 | 191 | </template> | 
| 385 | 192 | </div> | 
| 386 | 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 | 197 | </p> | 
| 405 | 198 | </div> | 
| 406 | 199 | </div> | 
| ... | ... | @@ -462,7 +255,10 @@ export default { | 
| 462 | 255 | }, | 
| 463 | 256 | methods: { | 
| 464 | 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 | 263 | changeSub(val) { | 
| 468 | 264 | //科目改变触发事件 | 
| ... | ... | @@ -832,6 +628,7 @@ div::-webkit-scrollbar { | 
| 832 | 628 | width: 3px; | 
| 833 | 629 | height: 10px; | 
| 834 | 630 | } | 
| 631 | + | |
| 835 | 632 | div::-webkit-scrollbar-thumb { | 
| 836 | 633 | border-radius: 10px; | 
| 837 | 634 | background-color: #ccc; | 
| ... | ... | @@ -841,25 +638,31 @@ div::-webkit-scrollbar-thumb { | 
| 841 | 638 | .page-container { | 
| 842 | 639 | position: relative; | 
| 843 | 640 | height: 100%; | 
| 641 | + | |
| 844 | 642 | &.active { | 
| 845 | 643 | overflow: hidden; | 
| 846 | 644 | } | 
| 847 | 645 | } | 
| 646 | + | |
| 848 | 647 | .table-box { | 
| 849 | 648 | margin: 0 20px; | 
| 850 | 649 | padding: 16px; | 
| 851 | 650 | background: #f8f8f8; | 
| 852 | 651 | border-radius: 5px; | 
| 652 | + | |
| 853 | 653 | :deep(.fa-arrow-right) { | 
| 854 | 654 | padding-left: 2px; | 
| 855 | 655 | } | 
| 656 | + | |
| 856 | 657 | :deep(.fa-file-text) { | 
| 857 | 658 | padding-left: 2px; | 
| 858 | 659 | } | 
| 859 | 660 | } | 
| 661 | + | |
| 860 | 662 | .down { | 
| 861 | 663 | padding-top: 16px; | 
| 862 | 664 | } | 
| 665 | + | |
| 863 | 666 | .click-b { | 
| 864 | 667 | cursor: pointer; | 
| 865 | 668 | color: #409eff; | ... | ... | 
src/views/basic/test/components/contrast.vue
| ... | ... | @@ -47,7 +47,8 @@ | 
| 47 | 47 | </div> | 
| 48 | 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 | 52 | <el-form class="use-form"> | 
| 52 | 53 | <el-form-item class="use-form-item-box"> | 
| 53 | 54 | <el-form-item label="等级名称:" class="use-form-item"> | 
| ... | ... | @@ -87,8 +88,8 @@ | 
| 87 | 88 | <template v-if="fromData.levelType == 0"> | 
| 88 | 89 | ({{ index != 0 ? "不含" : "" | 
| 89 | 90 | }}{{ | 
| 90 | - Number(((item[1] / 100) * examPaperScore).toFixed(1)) | |
| 91 | -}}分) | |
| 91 | + Number(((item[1] / 100) * examPaperScore).toFixed(1)) | |
| 92 | + }}分) | |
| 92 | 93 | </template> | 
| 93 | 94 | <template v-else>{{ index != 0 ? "不含" : "" }}</template> | 
| 94 | 95 | </p> | 
| ... | ... | @@ -99,8 +100,8 @@ | 
| 99 | 100 | % | 
| 100 | 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 | 105 | </template> | 
| 105 | 106 | </p> | 
| 106 | 107 | <p class="item"> | 
| ... | ... | @@ -177,10 +178,10 @@ export default { | 
| 177 | 178 | } | 
| 178 | 179 | }, | 
| 179 | 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 | 186 | setType(type) { | 
| 186 | 187 | this.tableMaxHeight = this.$refs.main.offsetHeight; | ... | ... | 
src/views/basic/test/components/multipleSubTest.vue
| ... | ... | @@ -2,135 +2,71 @@ | 
| 2 | 2 | <div class="table-box" ref="main" v-loading="loading"> | 
| 3 | 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 | 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 | 10 | {{ scoped.row.studentName }} | 
| 22 | - </span></template | |
| 23 | - > | |
| 11 | + </span></template> | |
| 24 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 48 | </el-table-column> | 
| 83 | 49 | </el-table-column> | 
| 84 | 50 | <el-table-column label="查看雷达图" align="center"> | 
| 85 | 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 | 54 | </template> | 
| 94 | 55 | </el-table-column> | 
| 95 | 56 | </el-table> | 
| 96 | 57 | </div> | 
| 97 | 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 | 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 | 64 | <div class="chart-box"> | 
| 123 | 65 | <RadarChart id="radarChart" :params="chartData" /> | 
| 124 | 66 | </div> | 
| 125 | 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 | 70 | </div> | 
| 135 | 71 | </template> | 
| 136 | 72 | <script> | 
| ... | ... | @@ -188,7 +124,10 @@ export default { | 
| 188 | 124 | }, | 
| 189 | 125 | methods: { | 
| 190 | 126 | print() { | 
| 191 | - tablePrint("print-content", this.subjectName + "汇总报表"); | |
| 127 | + tablePrint({ | |
| 128 | + id: "print-content", | |
| 129 | + title: this.subjectName + "汇总报表" | |
| 130 | + }) | |
| 192 | 131 | }, | 
| 193 | 132 | toPortrait(obj) { | 
| 194 | 133 | //暂时不上线 | ... | ... | 
src/views/basic/test/components/multipleTest.vue
src/views/basic/test/components/scoreSet.vue
| ... | ... | @@ -43,7 +43,7 @@ | 
| 43 | 43 | </template> | 
| 44 | 44 | </el-table-column> | 
| 45 | 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 | 47 | align="center"> | 
| 48 | 48 | <template slot-scope="scoped"> | 
| 49 | 49 | <el-input v-if="showSetScore" type="number" :min="0" :max="question.questionScore" @input="setScore( | 
| ... | ... | @@ -174,11 +174,13 @@ export default { | 
| 174 | 174 | this.tableMaxHeight = this.$refs.scoreSet.offsetHeight - 135; | 
| 175 | 175 | }, | 
| 176 | 176 | async _QueryData() { | 
| 177 | + | |
| 177 | 178 | this.loading = true; | 
| 178 | 179 | const { data, status, info } = | 
| 179 | 180 | await this.$request.listStudentsAndQuestions({ | 
| 180 | 181 | examId: this.id, | 
| 181 | 182 | }); | 
| 183 | + | |
| 182 | 184 | this.loading = false; | 
| 183 | 185 | if (status === 0) { | 
| 184 | 186 | this.dataReponse = data; | 
| ... | ... | @@ -186,14 +188,18 @@ export default { | 
| 186 | 188 | this.questionList = this.dataReponse?.questionList || []; | 
| 187 | 189 | if (this.questionList.length == 0) { | 
| 188 | 190 | this.questionList = Object.keys(studentList[0].scoreMap).map( | 
| 189 | - (item) => { | |
| 191 | + (item) => { | |
| 192 | + var splitItem = item.split('='); | |
| 190 | 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 | 197 | questionScore: 20, | 
| 193 | 198 | }; | 
| 194 | 199 | } | 
| 195 | - ); | |
| 200 | + ); | |
| 196 | 201 | } | 
| 202 | + | |
| 197 | 203 | this.tableData = | 
| 198 | 204 | studentList.map((item) => { | 
| 199 | 205 | item.all = item.all || 0; //总分 | 
| ... | ... | @@ -249,8 +255,7 @@ export default { | 
| 249 | 255 | } else { | 
| 250 | 256 | this.$message.error(info); | 
| 251 | 257 | } | 
| 252 | - }, | |
| 253 | - | |
| 258 | + }, | |
| 254 | 259 | //导入成功 | 
| 255 | 260 | upSuccess(res) { | 
| 256 | 261 | |
| ... | ... | @@ -265,30 +270,30 @@ export default { | 
| 265 | 270 | item.object = 0; //客观题分数 | 
| 266 | 271 | item.subject = 0; //主观题分数 | 
| 267 | 272 | var detail = JSON.parse(res.data[item.studentId]); | 
| 268 | - | |
| 273 | + | |
| 269 | 274 | var scoreMap = {}; | 
| 270 | - | |
| 275 | + | |
| 271 | 276 | if (detail) { | 
| 272 | 277 | detail.forEach(item => { | 
| 273 | 278 | scoreMap[item.id] = item.score | 
| 274 | 279 | }) | 
| 275 | - } | |
| 280 | + } | |
| 276 | 281 | |
| 277 | 282 | item.scoreMap = scoreMap; | 
| 278 | - | |
| 283 | + | |
| 279 | 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 | 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 | 298 | return item; | 
| 294 | 299 | }) || []; | ... | ... | 
src/views/examinationPaper/add.vue
| ... | ... | @@ -9,25 +9,26 @@ | 
| 9 | 9 | <div class="content"> | 
| 10 | 10 | <el-dialog :close-on-click-modal="false" title="选择班级分享" :visible.sync="classSharingType" width="800" | 
| 11 | 11 | :modal-append-to-body="false" :append-to-body="true"> | 
| 12 | - <div> | |
| 12 | + <div :key="classSharingType"> | |
| 13 | 13 | <el-row class="row-subfix"> | 
| 14 | 14 | <div class="row-line"> | 
| 15 | 15 | <span class="line-subfix">年级:</span> | 
| 16 | 16 | <span class="line-value">{{ gradeName }}</span> | 
| 17 | 17 | </div> | 
| 18 | 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 | 20 | <span class="line-subfix" style="float: left;">班级:</span> | 
| 21 | 21 | <div class="row-line" style="float: left; | 
| 22 | 22 | background:rgb(245,247,250);padding:15px 10px;width: calc(100% - 80px);border-radius:5px;"> | 
| 23 | 23 | <span class="line-value" style="min-height: 300px;border-radius: 4px; background: rgb(247,247,250);"> | 
| 24 | 24 | <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | 
| 25 | 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 | 29 | {{ item.className }} | 
| 29 | 30 | </el-checkbox> | 
| 30 | - </el-checkbox-group> | |
| 31 | + </div> | |
| 31 | 32 | </span> | 
| 32 | 33 | </div> | 
| 33 | 34 | </el-row> | 
| ... | ... | @@ -252,7 +253,7 @@ | 
| 252 | 253 | <el-dialog :close-on-click-modal="false" title="添加大题" :append-to-body="true" | 
| 253 | 254 | :visible.sync="addQuestionVisible" width="600px"> | 
| 254 | 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 | 257 | <el-form-item label="标题:"> | 
| 257 | 258 | <el-col :span="20"> | 
| 258 | 259 | <el-input v-model.trim="questionForm.questionTitle" maxlength="30" placeholder="输入大题名称"></el-input> | 
| ... | ... | @@ -354,7 +355,7 @@ | 
| 354 | 355 | <p class="name">{{ form.title }}</p> | 
| 355 | 356 | <p class="totals">卷面总分:{{ allScore }}分</p> | 
| 356 | 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 | 359 | <p class="question-title"> | 
| 359 | 360 | <span>{{ setBigNum(index) }}、</span> | 
| 360 | 361 | <span class="title-txt">{{ question.questionTitle }}</span> | 
| ... | ... | @@ -374,7 +375,7 @@ | 
| 374 | 375 | <div class="qs-options qs-options2">选项设置</div> | 
| 375 | 376 | <div class="qs-upload" v-if="isUpload">题干</div> | 
| 376 | 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 | 379 | <div class="qs-set">操作</div> | 
| 379 | 380 | </li> | 
| 380 | 381 | <li v-for="(subQuestions, indexs) in question.subQuestions" :key="indexs"> | 
| ... | ... | @@ -446,11 +447,11 @@ | 
| 446 | 447 | <el-button slot="reference" class="icon-tickets" type="primary" circle size="mini" | 
| 447 | 448 | icon="el-icon-tickets" @click="openStem(subQuestions, index, indexs, 2)"></el-button> | 
| 448 | 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 | 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 | 455 | <div class="qs-set"> | 
| 455 | 456 | <el-popconfirm title="确定删除这道题吗?" @confirm="delTabData(indexs, index)"> | 
| 456 | 457 | <el-button slot="reference" class="delete" type="danger" size="mini" circle | 
| ... | ... | @@ -508,16 +509,26 @@ | 
| 508 | 509 | <el-button @click="diaSetAns = false">取 消</el-button> | 
| 509 | 510 | </div> | 
| 510 | 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 | 532 | </div> | 
| 522 | 533 | </div> | 
| 523 | 534 | <div v-if="step == 3"> | 
| ... | ... | @@ -525,7 +536,7 @@ | 
| 525 | 536 | <p class="name">{{ form.title }}</p> | 
| 526 | 537 | <p class="totals">卷面总分:{{ allScore }}分</p> | 
| 527 | 538 | </div> | 
| 528 | - <div class="question-box"> | |
| 539 | + <div class="question-box flex-content" > | |
| 529 | 540 | <template v-for="(question, index) in form.questionList"> | 
| 530 | 541 | <p class="question-title"> | 
| 531 | 542 | <span>{{ setBigNum(index) }}、</span> | 
| ... | ... | @@ -540,7 +551,7 @@ | 
| 540 | 551 | </div> | 
| 541 | 552 | </template> | 
| 542 | 553 | </div> | 
| 543 | - <div class="btn-box"> | |
| 554 | + <div class="btn-box flex-btn"> | |
| 544 | 555 | <el-button type="danger" plain round @click="linkBack">取消</el-button> | 
| 545 | 556 | <el-button round @click="toStep(2)">上一步</el-button> | 
| 546 | 557 | <el-button type="primary" round @click="save">保存</el-button> | 
| ... | ... | @@ -569,20 +580,9 @@ | 
| 569 | 580 | </div> | 
| 570 | 581 | </el-dialog> | 
| 571 | 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 | 586 | </el-dialog> | 
| 587 | 587 | </div> | 
| 588 | 588 | </div> | 
| ... | ... | @@ -590,6 +590,7 @@ | 
| 590 | 590 | |
| 591 | 591 | <script> | 
| 592 | 592 | import { deepClone, checkAnswer, cNum } from "utils"; | 
| 593 | +import conf from "@/config/index"; | |
| 593 | 594 | const questionForm = { | 
| 594 | 595 | questionTitle: "", | 
| 595 | 596 | questionType: 2, | 
| ... | ... | @@ -619,31 +620,22 @@ export default { | 
| 619 | 620 | }, 0); | 
| 620 | 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 | 640 | watch: { | 
| 649 | 641 | step: function () { | 
| ... | ... | @@ -748,7 +740,7 @@ export default { | 
| 748 | 740 | //返回列表页参数记录 | 
| 749 | 741 | listType: 1, | 
| 750 | 742 | listShare: 0, | 
| 751 | - uploadUrl: "/file/uploadImgToHtml", | |
| 743 | + // uploadUrl: "/file/uploadImgToHtml", | |
| 752 | 744 | iframeLoading: false, | 
| 753 | 745 | }; | 
| 754 | 746 | }, | 
| ... | ... | @@ -785,18 +777,47 @@ export default { | 
| 785 | 777 | } | 
| 786 | 778 | }, | 
| 787 | 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 | 805 | _checkedClass() { | 
| 806 | + this.checkedClass = this.shareClass.filter(item => item.isChecked).map(imap => imap.id); | |
| 789 | 807 | this.classSharingType = false; | 
| 790 | 808 | }, | 
| 791 | 809 | handleCheckAllChange(val) { | 
| 792 | - this.checkedClass = val ? this.shareClass?.map(item => item.id) : []; | |
| 810 | + this.shareClass.forEach(item => { | |
| 811 | + item.isChecked = val; | |
| 812 | + }) | |
| 793 | 813 | this.isIndeterminate = false; | 
| 794 | 814 | }, | 
| 795 | 815 | handleCheckedClassChange(value) { | 
| 816 | + var value = this.shareClass.filter(item => item.isChecked); | |
| 796 | 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 | 821 | // v1.5 | 
| 801 | 822 | //上传截图 | 
| 802 | 823 | openStem(obj, index, indexs, type) { | 
| ... | ... | @@ -843,21 +864,6 @@ export default { | 
| 843 | 864 | upError(res) { | 
| 844 | 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 | 869 | linkBack() { | 
| ... | ... | @@ -1252,19 +1258,26 @@ export default { | 
| 1252 | 1258 | |
| 1253 | 1259 | this.classSharingType = true; | 
| 1254 | 1260 | |
| 1261 | + this.shareClass = []; | |
| 1262 | + | |
| 1255 | 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 | 1267 | if (classResponse.status != 0) { | 
| 1260 | 1268 | this.$message.error(classResponse.info); | 
| 1269 | + return; | |
| 1261 | 1270 | } | 
| 1262 | - | |
| 1271 | + | |
| 1263 | 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 | 1282 | openQuestion() { | 
| 1270 | 1283 | this.questionForm = { ...questionForm }; | 
| ... | ... | @@ -1520,28 +1533,28 @@ export default { | 
| 1520 | 1533 | }, | 
| 1521 | 1534 | async save() { | 
| 1522 | 1535 | if (this.saveLoading) return; | 
| 1523 | - | |
| 1536 | + | |
| 1524 | 1537 | this.saveLoading = true; | 
| 1525 | - | |
| 1538 | + | |
| 1526 | 1539 | this.formatQuestionList(); | 
| 1527 | - | |
| 1540 | + | |
| 1528 | 1541 | let formDatas = deepClone(this.form); | 
| 1529 | - | |
| 1542 | + | |
| 1530 | 1543 | formDatas.questionList = formDatas.questionList.filter(item => { | 
| 1531 | 1544 | return item.subQuestions?.length >= 1; | 
| 1532 | 1545 | }); | 
| 1533 | - | |
| 1546 | + | |
| 1534 | 1547 | for (let i = 0; i < formDatas.questionList.length; i++) { | 
| 1535 | 1548 | delete formDatas.questionList[i].show; | 
| 1536 | 1549 | } | 
| 1537 | - | |
| 1550 | + | |
| 1538 | 1551 | let addPaper = | 
| 1539 | 1552 | this.role == "ROLE_PERSONAL" | 
| 1540 | 1553 | ? this.$request.pAddPaper | 
| 1541 | 1554 | : this.$request.addPaper; | 
| 1542 | 1555 | |
| 1543 | 1556 | formDatas.classIds = this.checkedClass.join(","); | 
| 1544 | - | |
| 1557 | + | |
| 1545 | 1558 | const { data, status, info } = await addPaper({ | 
| 1546 | 1559 | ...formDatas, | 
| 1547 | 1560 | }); | ... | ... | 
src/views/examinationPaper/addQs.vue
| ... | ... | @@ -7,27 +7,28 @@ | 
| 7 | 7 | </template> | 
| 8 | 8 | </back-box> | 
| 9 | 9 | <div class="content"> | 
| 10 | - | |
| 11 | 10 | <el-dialog :close-on-click-modal="false" title="选择班级分享" :visible.sync="classSharingType" width="800" | 
| 12 | 11 | :modal-append-to-body="false" :append-to-body="true"> | 
| 13 | - <div> | |
| 12 | + <div :key="classSharingType"> | |
| 14 | 13 | <el-row class="row-subfix"> | 
| 15 | 14 | <div class="row-line"> | 
| 16 | 15 | <span class="line-subfix">年级:</span> | 
| 17 | 16 | <span class="line-value">{{ gradeName }}</span> | 
| 18 | 17 | </div> | 
| 19 | 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 | 20 | <span class="line-subfix" style="float: left;">班级:</span> | 
| 22 | 21 | <div class="row-line" style="float: left; | 
| 23 | 22 | background:rgb(245,247,250);padding:15px 10px;width: calc(100% - 80px);border-radius:5px;"> | 
| 24 | 23 | <span class="line-value" style="min-height: 300px;border-radius: 4px; background: rgb(247,247,250);"> | 
| 25 | 24 | <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | 
| 26 | 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 | 32 | </span> | 
| 32 | 33 | </div> | 
| 33 | 34 | </el-row> | 
| ... | ... | @@ -81,7 +82,7 @@ | 
| 81 | 82 | <div class="answer-title"> | 
| 82 | 83 | <p class="name">{{ form.title }}</p> | 
| 83 | 84 | </div> | 
| 84 | - <div class="question-box"> | |
| 85 | + <div class="question-box flex-content" > | |
| 85 | 86 | <ul class="questions-ul"> | 
| 86 | 87 | <li class="sub-questions"> | 
| 87 | 88 | <div class="qs-num">题号</div> | 
| ... | ... | @@ -91,7 +92,7 @@ | 
| 91 | 92 | <div class="qs-options qs-options2">选项设置</div> | 
| 92 | 93 | <div class="qs-upload">题干</div> | 
| 93 | 94 | <div class="qs-upload">题目解析</div> | 
| 94 | - <div class="qs-upload" >知识点</div> | |
| 95 | + <div class="qs-upload">知识点</div> | |
| 95 | 96 | <div class="qs-set">操作</div> | 
| 96 | 97 | </li> | 
| 97 | 98 | </ul> | 
| ... | ... | @@ -157,7 +158,7 @@ | 
| 157 | 158 | <el-button class="icon-tickets" type="primary" circle size="mini" icon="el-icon-tickets" | 
| 158 | 159 | @click="openStem(question, 2, index)"></el-button> | 
| 159 | 160 | </div> | 
| 160 | - <div class="qs-upload" > | |
| 161 | + <div class="qs-upload"> | |
| 161 | 162 | <el-button type="primary" circle size="mini" icon="el-icon-price-tag" | 
| 162 | 163 | @click="openKnowledge(question, index)"></el-button> | 
| 163 | 164 | </div> | 
| ... | ... | @@ -239,7 +240,7 @@ | 
| 239 | 240 | <el-button class="icon-tickets" type="primary" circle size="mini" icon="el-icon-tickets" | 
| 240 | 241 | @click="openStem(subQuestions, 2, index, indexs)"></el-button> | 
| 241 | 242 | </div> | 
| 242 | - <div class="qs-upload" > | |
| 243 | + <div class="qs-upload"> | |
| 243 | 244 | <el-button type="primary" circle size="mini" icon="el-icon-price-tag" | 
| 244 | 245 | @click="openKnowledge(subQuestions, index, indexs)"></el-button> | 
| 245 | 246 | </div> | 
| ... | ... | @@ -302,10 +303,19 @@ | 
| 302 | 303 | <el-button @click="diaSetAns = false">取 消</el-button> | 
| 303 | 304 | </div> | 
| 304 | 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 | 319 | </div> | 
| 310 | 320 | <el-dialog :close-on-click-modal="false" :modal-append-to-body="false" | 
| 311 | 321 | :title="stem.type == 1 ? '上传题干' : '上传题目解析'" :visible.sync="dialogStem" v-if="dialogStem" width="800px"> | 
| ... | ... | @@ -329,22 +339,17 @@ | 
| 329 | 339 | <el-button @click="dialogStem = false">保存</el-button> | 
| 330 | 340 | </div> | 
| 331 | 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 | 346 | </el-dialog> | 
| 342 | 347 | </div> | 
| 343 | 348 | <div v-if="step == 2"> | 
| 344 | 349 | <div class="answer-title"> | 
| 345 | 350 | <p class="name">{{ form.title }}</p> | 
| 346 | 351 | </div> | 
| 347 | - <div class="question-box"> | |
| 352 | + <div class="question-box flex-content" > | |
| 348 | 353 | <template v-for="question in form.questionList"> | 
| 349 | 354 | <template v-if="!question.subQuestions"> | 
| 350 | 355 | <div class="screenshot-box" v-if="question.screenshot"> | 
| ... | ... | @@ -360,7 +365,7 @@ | 
| 360 | 365 | </template> | 
| 361 | 366 | </template> | 
| 362 | 367 | </div> | 
| 363 | - <div class="btn-box"> | |
| 368 | + <div class="btn-box flex-btn"> | |
| 364 | 369 | <el-button type="danger" plain round @click="linkBack">取消</el-button> | 
| 365 | 370 | <el-button round @click="toStep(1)">上一步</el-button> | 
| 366 | 371 | <el-button type="primary" round @click="save">保存</el-button> | 
| ... | ... | @@ -371,6 +376,7 @@ | 
| 371 | 376 | </template> | 
| 372 | 377 | |
| 373 | 378 | <script> | 
| 379 | +import conf from "@/config/index"; | |
| 374 | 380 | import { deepClone, checkAnswer } from "utils"; | 
| 375 | 381 | import knowledgeList from "assets/js/knowledgeList.js"; | 
| 376 | 382 | import knowledgePoints from "@/components/knowledgePoints" | 
| ... | ... | @@ -449,38 +455,11 @@ export default { | 
| 449 | 455 | //返回列表页参数记录 | 
| 450 | 456 | listType: 1, | 
| 451 | 457 | listShare: 0, | 
| 452 | - uploadUrl: "/file/uploadImgToHtml", | |
| 458 | + // uploadUrl: "/file/uploadImgToHtml", | |
| 453 | 459 | iframeLoading: false, | 
| 454 | 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 | 463 | watch: { | 
| 485 | 464 | step: function () { | 
| 486 | 465 | this.$nextTick(function () { | 
| ... | ... | @@ -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 | 488 | async created() { | 
| 492 | 489 | this.listType = this.$route.query.listType ? this.$route.query.listType : 1; | 
| 493 | 490 | this.listShare = this.$route.query.listShare | 
| ... | ... | @@ -519,30 +516,65 @@ export default { | 
| 519 | 516 | } | 
| 520 | 517 | }, | 
| 521 | 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 | 545 | _checkedClass() { | 
| 546 | + this.checkedClass = this.shareClass.filter(item => item.isChecked).map(imap => imap.id); | |
| 526 | 547 | this.classSharingType = false; | 
| 527 | 548 | }, | 
| 528 | 549 | handleCheckAllChange(val) { | 
| 529 | - this.checkedClass = val ? this.shareClass?.map(item => item.id) : []; | |
| 550 | + this.shareClass.forEach(item => { | |
| 551 | + item.isChecked = val; | |
| 552 | + }) | |
| 530 | 553 | this.isIndeterminate = false; | 
| 531 | 554 | }, | 
| 532 | 555 | handleCheckedClassChange(value) { | 
| 556 | + var value = this.shareClass.filter(item => item.isChecked); | |
| 533 | 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 | 561 | async _selectClassSharingType() { | 
| 538 | 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 | 566 | if (classResponse.status != 0) { | 
| 543 | 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 | 579 | // v1.5 | 
| 548 | 580 | //上传截图 | 
| ... | ... | @@ -601,31 +633,6 @@ export default { | 
| 601 | 633 | upError(res) { | 
| 602 | 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 | 636 | //end | 
| 630 | 637 | linkBack() { | 
| 631 | 638 | this.$confirm( | ... | ... | 
src/views/examinationPaper/edit.vue
| ... | ... | @@ -56,9 +56,7 @@ | 
| 56 | 56 | <div class="qs-set">知识点</div> | 
| 57 | 57 | </div> | 
| 58 | 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 | 61 | <el-button type="primary" @click="setFormAns(indexs, index)">批量设置答案</el-button> | 
| 64 | 62 | </p> | 
| ... | ... | @@ -88,8 +86,8 @@ | 
| 88 | 86 | <p v-if="subQuestions.questionType == 3" class="answer-box"> | 
| 89 | 87 | <template v-for="option in subQuestions.answerOptions?.split(',')"> | 
| 90 | 88 | <span v-if="option" class="answer-s" :class="subQuestions.correctAnswer?.includes(option) | 
| 91 | - ? 'active' | |
| 92 | - : '' | |
| 89 | + ? 'active' | |
| 90 | + : '' | |
| 93 | 91 | " :key="option" @click="changAnswer(subQuestions, option)">{{ option }}</span> | 
| 94 | 92 | </template> | 
| 95 | 93 | </p> | 
| ... | ... | @@ -175,8 +173,8 @@ | 
| 175 | 173 | <el-button type="danger" plain round @click="linkBack">取消</el-button> | 
| 176 | 174 | <el-button type="primary" round @click="save">保存</el-button> | 
| 177 | 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 | 178 | <div class="qs-options set-questions"> | 
| 181 | 179 | <p class="dia-tips"> | 
| 182 | 180 | 请点击选项按钮设置答案,多选题题目之间用“,”隔开,若添加5道题:“AC,AD,BD,AC,CD” | 
| ... | ... | @@ -222,18 +220,13 @@ | 
| 222 | 220 | <el-button @click="diaSetAns = false">取 消</el-button> | 
| 223 | 221 | </div> | 
| 224 | 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 | 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 | 230 | </div> | 
| 238 | 231 | <el-upload class="upload-demo" :action="uploadUrl" :limit="1" :on-success="upSuccess" :on-error="upError" | 
| 239 | 232 | accept="image/*"> | 
| ... | ... | @@ -244,31 +237,19 @@ | 
| 244 | 237 | <el-button @click="dialogStem = false">确定</el-button> | 
| 245 | 238 | </div> | 
| 246 | 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 | 244 | </el-dialog> | 
| 265 | 245 | </div> | 
| 266 | 246 | </div> | 
| 267 | 247 | </template> | 
| 268 | 248 | |
| 269 | 249 | <script> | 
| 250 | +import Preview from "@/components/preview"; | |
| 270 | 251 | import { deepClone, checkAnswer } from "utils"; | 
| 271 | -import knowledgeList from "assets/js/knowledgeList.js"; | |
| 252 | +import conf from "@/config/index"; | |
| 272 | 253 | export default { | 
| 273 | 254 | data() { | 
| 274 | 255 | return { | 
| ... | ... | @@ -306,8 +287,7 @@ export default { | 
| 306 | 287 | |
| 307 | 288 | //v1.5 | 
| 308 | 289 | dialogStem: false, //截图开关 | 
| 309 | - dialogKnowledge: false, //知识点开关 | |
| 310 | - knowledgeList: { ...knowledgeList }, | |
| 290 | + dialogKnowledge: false, //知识点开关 | |
| 311 | 291 | stem: { | 
| 312 | 292 | type: 1, | 
| 313 | 293 | index: 0, //大题位置 | 
| ... | ... | @@ -315,14 +295,32 @@ export default { | 
| 315 | 295 | screenshot: "", //题干图片地址 | 
| 316 | 296 | answerScreenshot: "", //题目解析图片地址 | 
| 317 | 297 | knowledge: [], //知识点 | 
| 298 | + sectionName: "", //题目解析图片地址 | |
| 299 | + subjectName: "" //知识点 | |
| 318 | 300 | }, | 
| 319 | 301 | gradeClassList: [], //学段列表 | 
| 320 | - uploadUrl: "/file/uploadImgToHtml", | |
| 302 | + // uploadUrl: "/file/uploadImgToHtml", | |
| 321 | 303 | iframeLoading: false, | 
| 322 | 304 | examType: 2, | 
| 323 | 305 | }; | 
| 324 | 306 | }, | 
| 325 | 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 | 324 | allScore: function () { | 
| 327 | 325 | let score = 0; | 
| 328 | 326 | this.questionList?.map((item) => { | 
| ... | ... | @@ -335,32 +333,7 @@ export default { | 
| 335 | 333 | } | 
| 336 | 334 | }, 0); | 
| 337 | 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 | 338 | created() { | 
| 366 | 339 | this.role = | 
| ... | ... | @@ -370,10 +343,27 @@ export default { | 
| 370 | 343 | this.examType = this.$route.query.examType || 2; | 
| 371 | 344 | this.paperType = this.$route.query.paperType || 2; | 
| 372 | 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 | 348 | this._QueryDetail(); | 
| 374 | 349 | this._GradeList(); | 
| 375 | 350 | }, | 
| 376 | 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 | 367 | // v1.5 | 
| 378 | 368 | //上传截图 | 
| 379 | 369 | openStem(obj, type, index, indexs) { | 
| ... | ... | @@ -394,7 +384,6 @@ export default { | 
| 394 | 384 | this.stem.answerScreenshot = obj.answerScreenshot || ""; | 
| 395 | 385 | this.stem.screenshot = ""; | 
| 396 | 386 | } | 
| 397 | - | |
| 398 | 387 | this.dialogStem = true; | 
| 399 | 388 | }, | 
| 400 | 389 | //图片上传成功 | 
| ... | ... | @@ -421,7 +410,6 @@ export default { | 
| 421 | 410 | this.stem.answerScreenshot; | 
| 422 | 411 | } | 
| 423 | 412 | } | 
| 424 | - | |
| 425 | 413 | this.$message.success("上传成功"); | 
| 426 | 414 | } else { | 
| 427 | 415 | this.$message.error(res.info); | 
| ... | ... | @@ -446,24 +434,10 @@ export default { | 
| 446 | 434 | // 打开知识点 | 
| 447 | 435 | openKnowledge(obj, index, indexs) { | 
| 448 | 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 | 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 | 441 | linkBack() { | 
| 468 | 442 | this.$router.go(-1); | 
| 469 | 443 | }, | 
| ... | ... | @@ -884,6 +858,7 @@ export default { | 
| 884 | 858 | types[i].answerList = types[i].answerList.slice(0, -1); | 
| 885 | 859 | } | 
| 886 | 860 | if (types[i].subNum >= 5) { | 
| 861 | + if (!item.subQuestions) continue; | |
| 887 | 862 | item.subQuestions.splice( | 
| 888 | 863 | types[i].index + i + 1, | 
| 889 | 864 | 0, | 
| ... | ... | @@ -969,7 +944,6 @@ export default { | 
| 969 | 944 | width: 100%; | 
| 970 | 945 | box-shadow: none; | 
| 971 | 946 | border: none; | 
| 972 | - height: 400px; | |
| 973 | 947 | } | 
| 974 | 948 | |
| 975 | 949 | .screenshot-img { | 
| ... | ... | @@ -991,7 +965,7 @@ export default { | 
| 991 | 965 | } | 
| 992 | 966 | |
| 993 | 967 | .btn-box { | 
| 994 | - width: calc(100% - 240px); | |
| 968 | + width: calc(100% - 300px); | |
| 995 | 969 | position: fixed; | 
| 996 | 970 | right: 40px; | 
| 997 | 971 | bottom: 20px; | ... | ... | 
src/views/examinationPaper/edit_Old.vue
| ... | ... | @@ -414,7 +414,7 @@ | 
| 414 | 414 | /> | 
| 415 | 415 | <el-upload | 
| 416 | 416 | class="upload-demo" | 
| 417 | - action="http://121.40.127.171/file/uploadImg" | |
| 417 | + :action="uploadUrl" | |
| 418 | 418 | :limit="1" | 
| 419 | 419 | :on-success="upSuccess" | 
| 420 | 420 | :on-error="upError" | 
| ... | ... | @@ -471,6 +471,7 @@ | 
| 471 | 471 | </template> | 
| 472 | 472 | |
| 473 | 473 | <script> | 
| 474 | +import conf from "@/config/index"; | |
| 474 | 475 | import { deepClone, checkAnswer } from "utils"; | 
| 475 | 476 | export default { | 
| 476 | 477 | data() { | 
| ... | ... | @@ -519,6 +520,22 @@ export default { | 
| 519 | 520 | }; | 
| 520 | 521 | }, | 
| 521 | 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 | 539 | allScore: function () { | 
| 523 | 540 | let score = 0; | 
| 524 | 541 | this.questionList?.map((item) => { | ... | ... | 
src/views/index/mainIndex.vue
| ... | ... | @@ -108,8 +108,16 @@ | 
| 108 | 108 | </li> | 
| 109 | 109 | </template> | 
| 110 | 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 | 121 | <li v-if="!item.path.includes('dataSync')" :key="item.path" class="nav-item item4" @click="links(item.path)"> | 
| 114 | 122 | <img class="icon" :src="getImgs(item.path)" alt="" /> | 
| 115 | 123 | <div class="text" v-if="item.path == '/examinationPaper'"> | 
| ... | ... | @@ -118,10 +126,10 @@ | 
| 118 | 126 | {{ dataInfo.paperCount }}套答题卡。 | 
| 119 | 127 | </p> | 
| 120 | 128 | </div> | 
| 121 | - <!-- <div class="text" v-else-if="item.path == '/portrait'"> | |
| 129 | + <div class="text" v-else-if="item.path == '/portrait'"> | |
| 122 | 130 | <p class="p1">学生画像</p> | 
| 123 | 131 | <p class="p2">共分析{{ dataInfo.imagesCount }}名学生成绩。</p> | 
| 124 | - </div> --> | |
| 132 | + </div> | |
| 125 | 133 | <div class="text" v-else-if="item.path == '/ask'"> | 
| 126 | 134 | <p class="p1">随堂问报表</p> | 
| 127 | 135 | <p class="p2" v-if="dataInfo.classPeriodCount"> | 
| ... | ... | @@ -138,7 +146,7 @@ | 
| 138 | 146 | <p class="p1">软件下载</p> | 
| 139 | 147 | </div> | 
| 140 | 148 | </li> | 
| 141 | - </template> | |
| 149 | + </template> --> | |
| 142 | 150 | </ul> | 
| 143 | 151 | <ul class="nav-list" v-if="type == 'ROLE_PERSONAL'"> | 
| 144 | 152 | <li class="nav-item item1" @click="links('/examinationPaper')"> | 
| ... | ... | @@ -216,10 +224,13 @@ | 
| 216 | 224 | </template> | 
| 217 | 225 | |
| 218 | 226 | <script> | 
| 227 | +import logo from "@/assets/images/EasyQuiz.png"; | |
| 228 | + | |
| 219 | 229 | export default { | 
| 220 | 230 | name: "mainIndex", | 
| 221 | 231 | data() { | 
| 222 | 232 | return { | 
| 233 | + logo: logo, | |
| 223 | 234 | type: "", | 
| 224 | 235 | navList: [], | 
| 225 | 236 | dataInfo: {}, | ... | ... | 
src/views/layout/header/header.vue
| 1 | 1 | <template> | 
| 2 | 2 | <div> | 
| 3 | 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 | 15 | <ul class="personal"> | 
| 9 | 16 | <!-- <li> | 
| 10 | 17 | <langSelect></langSelect> | 
| 11 | 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 | 20 | <div class="userInfo"> | 
| 17 | 21 | <img :src="avatar" /> | 
| 18 | 22 | <div class="txt"> | 
| ... | ... | @@ -21,19 +25,11 @@ | 
| 21 | 25 | </div> | 
| 22 | 26 | <i class="el-icon-arrow-down"></i> | 
| 23 | 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 | 29 | <div class="el-dropdown-link dropdown-link"></div> | 
| 30 | 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 | 33 | </el-dropdown-menu> | 
| 38 | 34 | </el-dropdown> | 
| 39 | 35 | </li> | 
| ... | ... | @@ -45,11 +41,7 @@ | 
| 45 | 41 | </div> | 
| 46 | 42 | </div> | 
| 47 | 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 | 45 | <div class="userInfo"> | 
| 54 | 46 | <img :src="avatar" /> | 
| 55 | 47 | <div class="txt"> | 
| ... | ... | @@ -59,87 +51,34 @@ | 
| 59 | 51 | </div> | 
| 60 | 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 | 57 | </li> | 
| 75 | 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 | 61 | </li> | 
| 84 | 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 | 65 | </li> | 
| 94 | 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 | 69 | </li> | 
| 104 | 70 | </ul> | 
| 105 | 71 | </el-header> | 
| 106 | 72 | <!-- <tabNav></tabNav> --> | 
| 107 | 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 | 82 | </el-form> | 
| 144 | 83 | <div class="dialog-footer" slot="footer"> | 
| 145 | 84 | <el-button @click="editPass">确 定</el-button> | 
| ... | ... | @@ -307,7 +246,7 @@ export default { | 
| 307 | 246 | window.location.href = data; | 
| 308 | 247 | } else { | 
| 309 | 248 | localStorage.setItem("token", ""); | 
| 310 | - sessionStorage.setItem("addTab","") | |
| 249 | + sessionStorage.setItem("addTab", "") | |
| 311 | 250 | this.$store.commit("setToken", ""); | 
| 312 | 251 | this.$store.commit("setInfo", ""); | 
| 313 | 252 | this.$store.commit("setRouters", ""); | 
| ... | ... | @@ -331,7 +270,11 @@ $top: top; | 
| 331 | 270 | $bottom: bottom; | 
| 332 | 271 | $left: left; | 
| 333 | 272 | $right: right; | 
| 334 | -$leftright: ($left, $right); | |
| 273 | +$leftright: ( | |
| 274 | + $left, | |
| 275 | + $right | |
| 276 | +); | |
| 277 | + | |
| 335 | 278 | %w100 { | 
| 336 | 279 | width: 100%; | 
| 337 | 280 | } | 
| ... | ... | @@ -368,16 +311,24 @@ ul.el-menu { | 
| 368 | 311 | justify-content: space-between; | 
| 369 | 312 | color: #fff; | 
| 370 | 313 | padding: 0 20px 0 10px; | 
| 314 | + | |
| 315 | + .routeMap { | |
| 316 | + display: inline-block; | |
| 317 | + } | |
| 318 | + | |
| 371 | 319 | .hideAside { | 
| 372 | 320 | @extend %cursor; | 
| 321 | + | |
| 373 | 322 | i { | 
| 374 | 323 | font-size: 24px; | 
| 375 | 324 | line-height: 70px; | 
| 376 | 325 | } | 
| 377 | 326 | } | 
| 327 | + | |
| 378 | 328 | .personal { | 
| 379 | 329 | display: flex; | 
| 380 | 330 | flex-direction: row; | 
| 331 | + | |
| 381 | 332 | li { | 
| 382 | 333 | @include set-value(margin, 8px); | 
| 383 | 334 | font-size: 12px; | 
| ... | ... | @@ -386,40 +337,48 @@ ul.el-menu { | 
| 386 | 337 | line-height: 70px; | 
| 387 | 338 | } | 
| 388 | 339 | } | 
| 340 | + | |
| 389 | 341 | .userInfo { | 
| 390 | 342 | display: flex; | 
| 391 | 343 | align-items: center; | 
| 392 | 344 | height: 70px; | 
| 393 | 345 | @extend %cursor; | 
| 346 | + | |
| 394 | 347 | .txt { | 
| 395 | 348 | display: flex; | 
| 396 | 349 | flex-direction: column; | 
| 397 | 350 | justify-content: center; | 
| 398 | 351 | margin: 0 5px; | 
| 352 | + | |
| 399 | 353 | p { | 
| 400 | 354 | line-height: 20px; | 
| 401 | 355 | font-size: 12px; | 
| 402 | 356 | } | 
| 403 | 357 | } | 
| 358 | + | |
| 404 | 359 | img { | 
| 405 | 360 | border-radius: 5px; | 
| 406 | 361 | width: 28px; | 
| 407 | 362 | height: 28px; | 
| 408 | 363 | } | 
| 409 | 364 | } | 
| 365 | + | |
| 410 | 366 | .el-icon { | 
| 411 | 367 | font-size: 20px; | 
| 412 | 368 | line-height: 50px; | 
| 413 | 369 | } | 
| 370 | + | |
| 414 | 371 | .fa-lg { | 
| 415 | 372 | color: #fff; | 
| 416 | 373 | } | 
| 374 | + | |
| 417 | 375 | .dropdown { | 
| 418 | 376 | position: absolute; | 
| 419 | 377 | top: 0; | 
| 420 | 378 | right: 0; | 
| 421 | 379 | bottom: 0; | 
| 422 | 380 | left: 0; | 
| 381 | + | |
| 423 | 382 | .dropdown-link { | 
| 424 | 383 | height: 70px; | 
| 425 | 384 | } | ... | ... | 
src/views/login/index.vue
| ... | ... | @@ -171,9 +171,9 @@ $cursor: #000; | 
| 171 | 171 | } | 
| 172 | 172 | .login-container { | 
| 173 | 173 | width: 100%; | 
| 174 | - height: 150vh; | |
| 174 | + height: 100%; | |
| 175 | 175 | background: url("../../assets/images/login-bg.png") no-repeat; | 
| 176 | - background-size: cover; | |
| 176 | + background-size: 100% 100%; | |
| 177 | 177 | overflow: hidden; | 
| 178 | 178 | display: flex; | 
| 179 | 179 | justify-content: center; | ... | ... | 
vue.config.js
| ... | ... | @@ -24,7 +24,8 @@ module.exports = { | 
| 24 | 24 | "/": { | 
| 25 | 25 | // target:"http://ezquiz.sunvotecloud.cn", | 
| 26 | 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 | 29 | // target:"http://127.0.0.1:8089", | 
| 29 | 30 | changeOrigin: true, | 
| 30 | 31 | ws: true, | 
| ... | ... | @@ -49,6 +50,7 @@ module.exports = { | 
| 49 | 50 | .set("utils", resolve("src/utils")) | 
| 50 | 51 | .set("store", resolve("src/store")) | 
| 51 | 52 | .set("views", resolve("src/views")) | 
| 53 | + .set("config", resolve("src/config")) | |
| 52 | 54 | .set("api", resolve("src/api")); | 
| 53 | 55 | if (IS_PROD) { | 
| 54 | 56 | config.plugin("webpack-report").use(BundleAnalyzerPlugin, [ | ... | ... | 
