Commit d01c579977b4b1678afe470771afda0410a4de66

Authored by 梁保满
1 parent 4c2f99b0

随堂问 报表开发

src/api/apis/apis.js
@@ -1622,4 +1622,12 @@ export default { @@ -1622,4 +1622,12 @@ export default {
1622 data 1622 data
1623 }); 1623 });
1624 }, 1624 },
  1625 + // 删除随堂问报表
  1626 + deletePaperReport(data) {
  1627 + return service({
  1628 + url: setUpUrls.deletePaperReport,
  1629 + method: "POST",
  1630 + data
  1631 + });
  1632 + },
1625 }; 1633 };
src/api/urls/apis.js
@@ -424,4 +424,6 @@ export default { @@ -424,4 +424,6 @@ export default {
424 paperShareCount: "/api_html/common/paper/paperShareCount", 424 paperShareCount: "/api_html/common/paper/paperShareCount",
425 //教师/个人版导入备题组卷Word文档 425 //教师/个人版导入备题组卷Word文档
426 paperWordUpload: "/api_html/common/paper/upload", 426 paperWordUpload: "/api_html/common/paper/upload",
  427 + //删除随堂问报表
  428 + deletePaperReport: "/api_html/teaching/deletePaperReport",
427 } 429 }
src/router/index.js
1 -import en from "../i18n/lang/en"  
2 import Vue from "vue" 1 import Vue from "vue"
3 import Router from "vue-router" 2 import Router from "vue-router"
4 import Login from "@/views/login/index" 3 import Login from "@/views/login/index"
@@ -19,6 +18,7 @@ const PortraitDetail = () => import("@/views/portrait/detail") @@ -19,6 +18,7 @@ const PortraitDetail = () => import("@/views/portrait/detail")
19 18
20 19
21 const Ask = () => import("@/views/basic/ask/index") 20 const Ask = () => import("@/views/basic/ask/index")
  21 +const AskList = () => import("@/views/basic/ask/list")
22 const AskAnalysis = () => import("@/views/basic/ask/analysis") 22 const AskAnalysis = () => import("@/views/basic/ask/analysis")
23 const AskArchiving = () => import("@/views/basic/ask/archiving") 23 const AskArchiving = () => import("@/views/basic/ask/archiving")
24 const Test = () => import("@/views/basic/test/index") 24 const Test = () => import("@/views/basic/test/index")
@@ -37,18 +37,20 @@ const SetUpSchool = () => import("@/views/basic/setUp/school") @@ -37,18 +37,20 @@ const SetUpSchool = () => import("@/views/basic/setUp/school")
37 const SetUpTeacher = () => import("@/views/basic/setUp/teacher") 37 const SetUpTeacher = () => import("@/views/basic/setUp/teacher")
38 const SetUpStudent = () => import("@/views/basic/setUp/student") 38 const SetUpStudent = () => import("@/views/basic/setUp/student")
39 const ArchivedClazz = () => import("@/views/basic/setUp/archivedClazz") 39 const ArchivedClazz = () => import("@/views/basic/setUp/archivedClazz")
  40 +const UserInfo = () => import("@/views/basic/userInfo/index")
40 41
41 // 个人版 42 // 个人版
42 -const PersonalAsk = () => import("@/views/personal/ask/index")  
43 -const PersonalAskAnalysis = () => import("@/views/personal/ask/analysis")  
44 -const PersonalArchiving = () => import("@/views/personal/ask/archiving")  
45 -const PersonalTest = () => import("@/views/personal/test/index")  
46 -const PersonalTestAnalysis = () => import("@/views/personal/test/analysis")  
47 -const PersonalTestArchiving = () => import("@/views/personal/test/archiving")  
48 -const PersonalDataSync = () => import("@/views/personal/dataSync/index")  
49 -const PersonalSetUpStudent = () => import("@/views/personal/setUp/student")  
50 -const PersonalDown = () => import("@/views/personal/down/index")  
51 -const PersonalUserInfo = () => import("@/views/personal/userInfo/index") 43 +// const PersonalAsk = () => import("@/views/personal/ask/index")
  44 +// const PersonalAskAnalysis = () => import("@/views/personal/ask/analysis")
  45 +// const PersonalArchiving = () => import("@/views/personal/ask/archiving")
  46 +// const PersonalTest = () => import("@/views/personal/test/index")
  47 +// const PersonalTestAnalysis = () => import("@/views/personal/test/analysis")
  48 +// const PersonalTestArchiving = () => import("@/views/personal/test/archiving")
  49 +// const PersonalDataSync = () => import("@/views/personal/dataSync/index")
  50 +// const PersonalSetUpStudent = () => import("@/views/personal/setUp/student")
  51 +// const PersonalDown = () => import("@/views/personal/down/index")
  52 +// const PersonalUserInfo = () => import("@/views/personal/userInfo/index")
  53 +
52 54
53 // 超级管理员 55 // 超级管理员
54 const AdminDevice = () => import("@/views/admin/device/index") 56 const AdminDevice = () => import("@/views/admin/device/index")
@@ -127,7 +129,7 @@ let defaultRouter = [ @@ -127,7 +129,7 @@ let defaultRouter = [
127 path: "/userInfo", 129 path: "/userInfo",
128 iconCls: "fa fa-user", // 图标样式class 130 iconCls: "fa fa-user", // 图标样式class
129 name: "个人信息", 131 name: "个人信息",
130 - component: PersonalUserInfo, 132 + component: UserInfo,
131 children: [] 133 children: []
132 } 134 }
133 ] 135 ]
@@ -209,7 +211,6 @@ let addrouters = [ @@ -209,7 +211,6 @@ let addrouters = [
209 { 211 {
210 path: "/ask", 212 path: "/ask",
211 iconCls: "fa fa-bar-chart", // 图标样式class 213 iconCls: "fa fa-bar-chart", // 图标样式class
212 - name: "ask",  
213 name: "随堂问报表", 214 name: "随堂问报表",
214 component: Ask, 215 component: Ask,
215 meta: { 216 meta: {
@@ -219,12 +220,21 @@ let addrouters = [ @@ -219,12 +220,21 @@ let addrouters = [
219 220
220 }, 221 },
221 { 222 {
222 - path: "/askAnalysis",  
223 - iconCls: "", // 图标样式class  
224 - name: "随堂问报表分析",  
225 - component: AskAnalysis,  
226 - parent: "ask",  
227 - children: [] 223 + path: "/askList",
  224 + iconCls: "fa fa-bar-chart", // 图标样式class
  225 + name: "随堂问报表",
  226 + component: AskList,
  227 + children: [
  228 + {
  229 + path: "/askAnalysis",
  230 + iconCls: "", // 图标样式class
  231 + name: "随堂问报表分析",
  232 + component: AskAnalysis,
  233 + parent: "askList",
  234 + children: []
  235 + },
  236 +
  237 + ],
228 }, 238 },
229 { 239 {
230 path: "/askArchiving", 240 path: "/askArchiving",
@@ -489,21 +499,21 @@ let addrouters = [ @@ -489,21 +499,21 @@ let addrouters = [
489 let csAddrouters = [ 499 let csAddrouters = [
490 { 500 {
491 path: "/examinationPaper", 501 path: "/examinationPaper",
492 - iconCls: "fa fa-file-text", 502 + iconCls: "fa fa-file-text",
493 name: "备题组卷", 503 name: "备题组卷",
494 component: Layout, 504 component: Layout,
495 alone: true, 505 alone: true,
496 children: [ 506 children: [
497 { 507 {
498 path: "/examinationPaper", 508 path: "/examinationPaper",
499 - iconCls: "fa fa-file-text", 509 + iconCls: "fa fa-file-text",
500 name: "examinationPaper", 510 name: "examinationPaper",
501 component: ExaminationPaper, 511 component: ExaminationPaper,
502 children: [] 512 children: []
503 }, 513 },
504 { 514 {
505 path: "/examinationPaperAdd", 515 path: "/examinationPaperAdd",
506 - iconCls: "", 516 + iconCls: "",
507 name: "examinationPaperAdd", 517 name: "examinationPaperAdd",
508 component: ExaminationPaperAdd, 518 component: ExaminationPaperAdd,
509 parent: "examinationPaper", 519 parent: "examinationPaper",
@@ -511,7 +521,7 @@ let csAddrouters = [ @@ -511,7 +521,7 @@ let csAddrouters = [
511 }, 521 },
512 { 522 {
513 path: "/examinationPaperEdit", 523 path: "/examinationPaperEdit",
514 - iconCls: "", 524 + iconCls: "",
515 name: "修改答题卡", 525 name: "修改答题卡",
516 component: ExaminationPaperEdit, 526 component: ExaminationPaperEdit,
517 parent: "examinationPaper", 527 parent: "examinationPaper",
@@ -519,7 +529,7 @@ let csAddrouters = [ @@ -519,7 +529,7 @@ let csAddrouters = [
519 }, 529 },
520 { 530 {
521 path: "/examinationPaperRecycle", 531 path: "/examinationPaperRecycle",
522 - iconCls: "", 532 + iconCls: "",
523 name: "回收站答题卡", 533 name: "回收站答题卡",
524 component: ExaminationPaperRecycle, 534 component: ExaminationPaperRecycle,
525 parent: "examinationPaper", 535 parent: "examinationPaper",
@@ -527,7 +537,7 @@ let csAddrouters = [ @@ -527,7 +537,7 @@ let csAddrouters = [
527 }, 537 },
528 { 538 {
529 path: "/examinationPaperArchiving", 539 path: "/examinationPaperArchiving",
530 - iconCls: "", 540 + iconCls: "",
531 name: "已归档答题卡", 541 name: "已归档答题卡",
532 component: ExaminationPaperArchiving, 542 component: ExaminationPaperArchiving,
533 parent: "examinationPaper", 543 parent: "examinationPaper",
@@ -538,14 +548,14 @@ let csAddrouters = [ @@ -538,14 +548,14 @@ let csAddrouters = [
538 }, 548 },
539 { 549 {
540 path: "/ask", 550 path: "/ask",
541 - iconCls: "fa fa-bar-chart", 551 + iconCls: "fa fa-bar-chart",
542 name: "随堂问报表", 552 name: "随堂问报表",
543 component: Layout, 553 component: Layout,
544 alone: true, 554 alone: true,
545 children: [ 555 children: [
546 { 556 {
547 path: "/ask", 557 path: "/ask",
548 - iconCls: "fa fa-bar-chart", 558 + iconCls: "fa fa-bar-chart",
549 name: "ask", 559 name: "ask",
550 name: "随堂问报表", 560 name: "随堂问报表",
551 component: Ask, 561 component: Ask,
@@ -557,7 +567,7 @@ let csAddrouters = [ @@ -557,7 +567,7 @@ let csAddrouters = [
557 }, 567 },
558 { 568 {
559 path: "/askAnalysis", 569 path: "/askAnalysis",
560 - iconCls: "", 570 + iconCls: "",
561 name: "随堂问报表分析", 571 name: "随堂问报表分析",
562 component: AskAnalysis, 572 component: AskAnalysis,
563 parent: "ask", 573 parent: "ask",
@@ -567,14 +577,14 @@ let csAddrouters = [ @@ -567,14 +577,14 @@ let csAddrouters = [
567 }, 577 },
568 { 578 {
569 path: "/test", 579 path: "/test",
570 - iconCls: "fa fa-pie-chart", 580 + iconCls: "fa fa-pie-chart",
571 name: "即时测报表", 581 name: "即时测报表",
572 component: Layout, 582 component: Layout,
573 alone: true, 583 alone: true,
574 children: [ 584 children: [
575 { 585 {
576 path: "/test", 586 path: "/test",
577 - iconCls: "fa fa-pie-chart", 587 + iconCls: "fa fa-pie-chart",
578 name: "", 588 name: "",
579 component: Test, 589 component: Test,
580 meta: { 590 meta: {
@@ -584,7 +594,7 @@ let csAddrouters = [ @@ -584,7 +594,7 @@ let csAddrouters = [
584 }, 594 },
585 { 595 {
586 path: "/testAnalysis", 596 path: "/testAnalysis",
587 - iconCls: "", 597 + iconCls: "",
588 name: "即时测报表分析", 598 name: "即时测报表分析",
589 component: TestAnalysis, 599 component: TestAnalysis,
590 parent: "test", 600 parent: "test",
@@ -595,7 +605,7 @@ let csAddrouters = [ @@ -595,7 +605,7 @@ let csAddrouters = [
595 }, 605 },
596 { 606 {
597 path: "/setUpConglomerate", 607 path: "/setUpConglomerate",
598 - iconCls: "fa fa-building", 608 + iconCls: "fa fa-building",
599 name: "学校管理", 609 name: "学校管理",
600 component: Layout, 610 component: Layout,
601 alone: true, 611 alone: true,
@@ -611,7 +621,7 @@ let csAddrouters = [ @@ -611,7 +621,7 @@ let csAddrouters = [
611 }, 621 },
612 { 622 {
613 path: "/setUpAccount", 623 path: "/setUpAccount",
614 - iconCls: "fa fa-id-card-o", 624 + iconCls: "fa fa-id-card-o",
615 name: "账号管理", 625 name: "账号管理",
616 component: Layout, 626 component: Layout,
617 alone: true, 627 alone: true,
@@ -656,14 +666,14 @@ let csAddrouters = [ @@ -656,14 +666,14 @@ let csAddrouters = [
656 }, 666 },
657 { 667 {
658 path: "/card", 668 path: "/card",
659 - iconCls: "fa fa-id-card", 669 + iconCls: "fa fa-id-card",
660 name: "发卡记录", 670 name: "发卡记录",
661 component: Layout, 671 component: Layout,
662 alone: true, 672 alone: true,
663 children: [ 673 children: [
664 { 674 {
665 path: "/card", 675 path: "/card",
666 - iconCls: "fa fa-id-card", 676 + iconCls: "fa fa-id-card",
667 name: "", 677 name: "",
668 component: Card, 678 component: Card,
669 children: [] 679 children: []
@@ -672,14 +682,14 @@ let csAddrouters = [ @@ -672,14 +682,14 @@ let csAddrouters = [
672 }, 682 },
673 { 683 {
674 path: "/device", 684 path: "/device",
675 - iconCls: "fa fa-dashboard", 685 + iconCls: "fa fa-dashboard",
676 name: "设备状态", 686 name: "设备状态",
677 component: Layout, 687 component: Layout,
678 alone: true, 688 alone: true,
679 children: [ 689 children: [
680 { 690 {
681 path: "/device", 691 path: "/device",
682 - iconCls: "fa fa-dashboard", 692 + iconCls: "fa fa-dashboard",
683 name: "", 693 name: "",
684 component: Device, 694 component: Device,
685 meta: { 695 meta: {
@@ -689,7 +699,7 @@ let csAddrouters = [ @@ -689,7 +699,7 @@ let csAddrouters = [
689 }, 699 },
690 { 700 {
691 path: "/deviceLog", 701 path: "/deviceLog",
692 - iconCls: "fa fa-list-alt", 702 + iconCls: "fa fa-list-alt",
693 name: "", 703 name: "",
694 component: DeviceLog, 704 component: DeviceLog,
695 parent: "device", 705 parent: "device",
@@ -699,14 +709,14 @@ let csAddrouters = [ @@ -699,14 +709,14 @@ let csAddrouters = [
699 }, 709 },
700 { 710 {
701 path: "/analysis", 711 path: "/analysis",
702 - iconCls: "fa fa-area-chart", 712 + iconCls: "fa fa-area-chart",
703 name: "使用分析", 713 name: "使用分析",
704 component: Layout, 714 component: Layout,
705 alone: true, 715 alone: true,
706 children: [ 716 children: [
707 { 717 {
708 path: "/analysis", 718 path: "/analysis",
709 - iconCls: "fa fa-area-chart", 719 + iconCls: "fa fa-area-chart",
710 name: "", 720 name: "",
711 component: Analysis, 721 component: Analysis,
712 children: [] 722 children: []
@@ -715,21 +725,21 @@ let csAddrouters = [ @@ -715,21 +725,21 @@ let csAddrouters = [
715 }, 725 },
716 { 726 {
717 path: "/down", 727 path: "/down",
718 - iconCls: "fa fa-download", 728 + iconCls: "fa fa-download",
719 name: "软件下载", 729 name: "软件下载",
720 component: Layout, 730 component: Layout,
721 alone: true, 731 alone: true,
722 children: [ 732 children: [
723 { 733 {
724 path: "/down", 734 path: "/down",
725 - iconCls: "fa fa-download", 735 + iconCls: "fa fa-download",
726 name: "发卡软件", 736 name: "发卡软件",
727 component: Down, 737 component: Down,
728 children: [] 738 children: []
729 }, 739 },
730 { 740 {
731 path: "/downClient", 741 path: "/downClient",
732 - iconCls: "", 742 + iconCls: "",
733 name: "授课端软件", 743 name: "授课端软件",
734 component: DownClient, 744 component: DownClient,
735 parent: "down", 745 parent: "down",
@@ -739,14 +749,14 @@ let csAddrouters = [ @@ -739,14 +749,14 @@ let csAddrouters = [
739 }, 749 },
740 { 750 {
741 path: "/dataSync", 751 path: "/dataSync",
742 - iconCls: "fa fa-random", 752 + iconCls: "fa fa-random",
743 name: "数据同步", 753 name: "数据同步",
744 component: Layout, 754 component: Layout,
745 alone: true, 755 alone: true,
746 children: [ 756 children: [
747 { 757 {
748 path: "/dataSync", 758 path: "/dataSync",
749 - iconCls: "fa fa-random", 759 + iconCls: "fa fa-random",
750 name: "", 760 name: "",
751 component: DataSync, 761 component: DataSync,
752 children: [] 762 children: []
@@ -768,28 +778,28 @@ const addroutersPersonal = [ @@ -768,28 +778,28 @@ const addroutersPersonal = [
768 path: "/setUpStudent", 778 path: "/setUpStudent",
769 iconCls: "a fa-mortar-board", 779 iconCls: "a fa-mortar-board",
770 name: '', 780 name: '',
771 - component: PersonalSetUpStudent, 781 + component: SetUpStudent,
772 children: [] 782 children: []
773 }, 783 },
774 ] 784 ]
775 }, 785 },
776 { 786 {
777 path: "/examinationPaper", 787 path: "/examinationPaper",
778 - iconCls: "fa fa-file-text", 788 + iconCls: "fa fa-file-text",
779 name: "备题组卷", 789 name: "备题组卷",
780 component: Layout, 790 component: Layout,
781 alone: true, 791 alone: true,
782 children: [ 792 children: [
783 { 793 {
784 path: "/examinationPaper", 794 path: "/examinationPaper",
785 - iconCls: "fa fa-file-text", 795 + iconCls: "fa fa-file-text",
786 name: "examinationPaper", 796 name: "examinationPaper",
787 component: ExaminationPaper, 797 component: ExaminationPaper,
788 children: [] 798 children: []
789 }, 799 },
790 { 800 {
791 path: "/examinationPaperAdd", 801 path: "/examinationPaperAdd",
792 - iconCls: "", 802 + iconCls: "",
793 name: "examinationPaperAdd", 803 name: "examinationPaperAdd",
794 component: ExaminationPaperAdd, 804 component: ExaminationPaperAdd,
795 parent: "examinationPaper", 805 parent: "examinationPaper",
@@ -797,7 +807,7 @@ const addroutersPersonal = [ @@ -797,7 +807,7 @@ const addroutersPersonal = [
797 }, 807 },
798 { 808 {
799 path: "/examinationPaperAddAsk", 809 path: "/examinationPaperAddAsk",
800 - iconCls: "", 810 + iconCls: "",
801 name: "examinationPaperAddAsk", 811 name: "examinationPaperAddAsk",
802 component: ExaminationPaperAddAsk, 812 component: ExaminationPaperAddAsk,
803 parent: "examinationPaper", 813 parent: "examinationPaper",
@@ -805,7 +815,7 @@ const addroutersPersonal = [ @@ -805,7 +815,7 @@ const addroutersPersonal = [
805 }, 815 },
806 { 816 {
807 path: "/examinationPaperEdit", 817 path: "/examinationPaperEdit",
808 - iconCls: "", 818 + iconCls: "",
809 name: "修改答题卡", 819 name: "修改答题卡",
810 component: ExaminationPaperEdit, 820 component: ExaminationPaperEdit,
811 parent: "examinationPaper", 821 parent: "examinationPaper",
@@ -813,7 +823,7 @@ const addroutersPersonal = [ @@ -813,7 +823,7 @@ const addroutersPersonal = [
813 }, 823 },
814 { 824 {
815 path: "/examinationPaperRecycle", 825 path: "/examinationPaperRecycle",
816 - iconCls: "", 826 + iconCls: "",
817 name: "回收站答题卡", 827 name: "回收站答题卡",
818 component: ExaminationPaperRecycle, 828 component: ExaminationPaperRecycle,
819 parent: "examinationPaper", 829 parent: "examinationPaper",
@@ -821,7 +831,7 @@ const addroutersPersonal = [ @@ -821,7 +831,7 @@ const addroutersPersonal = [
821 }, 831 },
822 { 832 {
823 path: "/examinationPaperArchiving", 833 path: "/examinationPaperArchiving",
824 - iconCls: "", 834 + iconCls: "",
825 name: "已归档答题卡", 835 name: "已归档答题卡",
826 component: ExaminationPaperArchiving, 836 component: ExaminationPaperArchiving,
827 parent: "examinationPaper", 837 parent: "examinationPaper",
@@ -832,54 +842,66 @@ const addroutersPersonal = [ @@ -832,54 +842,66 @@ const addroutersPersonal = [
832 }, 842 },
833 { 843 {
834 path: "/ask", 844 path: "/ask",
835 - iconCls: "fa fa-bar-chart", 845 + iconCls: "fa fa-bar-chart",
836 name: "随堂问报表", 846 name: "随堂问报表",
837 component: Layout, 847 component: Layout,
838 alone: true, 848 alone: true,
839 children: [ 849 children: [
840 { 850 {
841 path: "/ask", 851 path: "/ask",
842 - iconCls: "fa fa-bar-chart", 852 + iconCls: "fa fa-bar-chart",
843 name: "ask", 853 name: "ask",
844 name: "随堂问报表", 854 name: "随堂问报表",
845 - component: PersonalAsk, 855 + component: Ask,
846 meta: { 856 meta: {
847 - keepAlive: true, 857 + keepAlive: false,
848 }, 858 },
849 children: [] 859 children: []
850 860
851 }, 861 },
852 { 862 {
853 - path: "/askAnalysis",  
854 - iconCls: "",  
855 - name: "随堂问报表分析",  
856 - component: PersonalAskAnalysis,  
857 - parent: "ask",  
858 - children: [] 863 + path: "/askList",
  864 + iconCls: "fa fa-bar-chart", // 图标样式class
  865 + name: "ask",
  866 + name: "随堂问报表",
  867 + component: AskList,
  868 + meta: {
  869 + keepAlive: true,
  870 + },
  871 + children: [
  872 + {
  873 + path: "/askAnalysis",
  874 + iconCls: "",
  875 + name: "随堂问报表分析",
  876 + component: AskAnalysis,
  877 + parent: "ask",
  878 + children: []
  879 + },
  880 + {
  881 + path: "/askArchiving",
  882 + iconCls: "",
  883 + name: "随堂问已归档报表分析",
  884 + component: AskArchiving,
  885 + parent: "ask",
  886 + hidden: true,
  887 + children: []
  888 + }
  889 + ]
859 }, 890 },
860 - {  
861 - path: "/askArchiving",  
862 - iconCls: "",  
863 - name: "随堂已归档问报表分析",  
864 - component: PersonalArchiving,  
865 - parent: "ask",  
866 - hidden: true,  
867 - children: []  
868 - }  
869 ] 891 ]
870 }, 892 },
871 { 893 {
872 path: "/test", 894 path: "/test",
873 - iconCls: "fa fa-pie-chart", 895 + iconCls: "fa fa-pie-chart",
874 name: "即时测报表", 896 name: "即时测报表",
875 component: Layout, 897 component: Layout,
876 alone: true, 898 alone: true,
877 children: [ 899 children: [
878 { 900 {
879 path: "/test", 901 path: "/test",
880 - iconCls: "fa fa-pie-chart", 902 + iconCls: "fa fa-pie-chart",
881 name: "", 903 name: "",
882 - component: PersonalTest, 904 + component: Test,
883 meta: { 905 meta: {
884 keepAlive: true, 906 keepAlive: true,
885 }, 907 },
@@ -887,17 +909,17 @@ const addroutersPersonal = [ @@ -887,17 +909,17 @@ const addroutersPersonal = [
887 }, 909 },
888 { 910 {
889 path: "/testAnalysis", 911 path: "/testAnalysis",
890 - iconCls: "", 912 + iconCls: "",
891 name: "即时测报表分析", 913 name: "即时测报表分析",
892 - component: PersonalTestAnalysis, 914 + component: TestAnalysis,
893 parent: "test", 915 parent: "test",
894 children: [] 916 children: []
895 }, 917 },
896 { 918 {
897 path: "/testArchiving", 919 path: "/testArchiving",
898 - iconCls: "",  
899 - name: "即时已归档测报表分析",  
900 - component: PersonalTestArchiving, 920 + iconCls: "",
  921 + name: "即时测已归档报表分析",
  922 + component: TestArchiving,
901 parent: "test", 923 parent: "test",
902 hidden: true, 924 hidden: true,
903 children: [] 925 children: []
@@ -907,14 +929,14 @@ const addroutersPersonal = [ @@ -907,14 +929,14 @@ const addroutersPersonal = [
907 }, 929 },
908 { 930 {
909 path: "/portrait", 931 path: "/portrait",
910 - iconCls: "fa fa-users", 932 + iconCls: "fa fa-users",
911 name: "学生画像", 933 name: "学生画像",
912 component: Layout, 934 component: Layout,
913 alone: true, 935 alone: true,
914 children: [ 936 children: [
915 { 937 {
916 path: "/portrait", 938 path: "/portrait",
917 - iconCls: "fa fa-users", 939 + iconCls: "fa fa-users",
918 name: "", 940 name: "",
919 component: Portrait, 941 component: Portrait,
920 meta: { 942 meta: {
@@ -924,7 +946,7 @@ const addroutersPersonal = [ @@ -924,7 +946,7 @@ const addroutersPersonal = [
924 }, 946 },
925 { 947 {
926 path: "/portraitDetail", 948 path: "/portraitDetail",
927 - iconCls: "", 949 + iconCls: "",
928 name: "授课端软件", 950 name: "授课端软件",
929 component: PortraitDetail, 951 component: PortraitDetail,
930 parent: "down", 952 parent: "down",
@@ -934,32 +956,32 @@ const addroutersPersonal = [ @@ -934,32 +956,32 @@ const addroutersPersonal = [
934 }, 956 },
935 { 957 {
936 path: "/dataSync", 958 path: "/dataSync",
937 - iconCls: "fa fa-random", 959 + iconCls: "fa fa-random",
938 name: "数据同步", 960 name: "数据同步",
939 component: Layout, 961 component: Layout,
940 alone: true, 962 alone: true,
941 children: [ 963 children: [
942 { 964 {
943 path: "/dataSync", 965 path: "/dataSync",
944 - iconCls: "fa fa-random", 966 + iconCls: "fa fa-random",
945 name: "", 967 name: "",
946 - component: PersonalDataSync, 968 + component: DataSync,
947 children: [] 969 children: []
948 } 970 }
949 ] 971 ]
950 }, 972 },
951 { 973 {
952 path: "/down", 974 path: "/down",
953 - iconCls: "fa fa-download", 975 + iconCls: "fa fa-download",
954 name: "软件下载", 976 name: "软件下载",
955 component: Layout, 977 component: Layout,
956 alone: true, 978 alone: true,
957 children: [ 979 children: [
958 { 980 {
959 path: "/down", 981 path: "/down",
960 - iconCls: "fa fa-download", 982 + iconCls: "fa fa-download",
961 name: "发卡软件", 983 name: "发卡软件",
962 - component: PersonalDown, 984 + component: Down,
963 children: [] 985 children: []
964 } 986 }
965 ] 987 ]
@@ -970,7 +992,7 @@ const addroutersPersonal = [ @@ -970,7 +992,7 @@ const addroutersPersonal = [
970 const addRoutersAdmin = [ 992 const addRoutersAdmin = [
971 { 993 {
972 path: "/account", 994 path: "/account",
973 - iconCls: "fa fa-id-card-o", 995 + iconCls: "fa fa-id-card-o",
974 name: "账号管理", 996 name: "账号管理",
975 component: Layout, 997 component: Layout,
976 alone: true, 998 alone: true,
@@ -986,14 +1008,14 @@ const addRoutersAdmin = [ @@ -986,14 +1008,14 @@ const addRoutersAdmin = [
986 }, 1008 },
987 { 1009 {
988 path: "/device", 1010 path: "/device",
989 - iconCls: "fa fa-dashboard", 1011 + iconCls: "fa fa-dashboard",
990 name: "设备状态", 1012 name: "设备状态",
991 component: Layout, 1013 component: Layout,
992 alone: true, 1014 alone: true,
993 children: [ 1015 children: [
994 { 1016 {
995 path: "/device", 1017 path: "/device",
996 - iconCls: "fa fa-dashboard", 1018 + iconCls: "fa fa-dashboard",
997 name: "", 1019 name: "",
998 component: AdminDevice, 1020 component: AdminDevice,
999 meta: { 1021 meta: {
@@ -1003,7 +1025,7 @@ const addRoutersAdmin = [ @@ -1003,7 +1025,7 @@ const addRoutersAdmin = [
1003 }, 1025 },
1004 { 1026 {
1005 path: "/deviceLog", 1027 path: "/deviceLog",
1006 - iconCls: "fa fa-list-alt", 1028 + iconCls: "fa fa-list-alt",
1007 name: "", 1029 name: "",
1008 component: AdminDeviceLog, 1030 component: AdminDeviceLog,
1009 parent: "device", 1031 parent: "device",
src/router/permission.js
@@ -5,6 +5,17 @@ import store from "../store"; @@ -5,6 +5,17 @@ import store from "../store";
5 // 获取角色信息,根据用户权限动态加载路由 5 // 获取角色信息,根据用户权限动态加载路由
6 router.beforeEach((to, from, next) => { 6 router.beforeEach((to, from, next) => {
7 NProgress.start(); 7 NProgress.start();
  8 + let fromRouteName = from.name
  9 + if (fromRouteName == '随堂问报表分析') {
  10 + sessionStorage.setItem('isFromAskDetail', 1)
  11 + } else {
  12 + sessionStorage.setItem('isFromAskDetail', "")
  13 + }
  14 + if (fromRouteName == '即时测报表分析') {
  15 + sessionStorage.setItem('isFromTestDetail', 1)
  16 + } else {
  17 + sessionStorage.setItem('isFromTestDetail', "")
  18 + }
8 if (to.path === "/login") { 19 if (to.path === "/login") {
9 next(); 20 next();
10 } else { 21 } else {
src/views/basic/ask/analysis.vue
@@ -7,351 +7,116 @@ @@ -7,351 +7,116 @@
7 </back-box> 7 </back-box>
8 <div class="page-content"> 8 <div class="page-content">
9 <div class="tab-box"> 9 <div class="tab-box">
10 - <span  
11 - class="tab-item"  
12 - v-for="(item, index) in tabList"  
13 - :key="index"  
14 - :class="type == index + 1 ? 'active' : ''"  
15 - @click="setType(index + 1)"  
16 - >{{ item }}</span  
17 - > 10 + <span class="tab-item" v-for="(item, index) in tabList" :key="index" :class="type == item.value ? 'active' : ''"
  11 + @click="setType(item.value)">{{ item.name }}</span>
18 </div> 12 </div>
19 <div v-loading="loading"> 13 <div v-loading="loading">
20 <div id="print-content"> 14 <div id="print-content">
21 - <ul class="info" v-if="type == 1">  
22 - <li class="info-item">科目:{{ detail.subjectName }}</li>  
23 - <li class="info-item">课时:{{ detail.title }}</li>  
24 - <li class="info-item">上课时间:{{ detail.startTime }}</li>  
25 - <li class="info-item">下课时间:{{ detail.endTime }}</li>  
26 - <li class="info-item">签到人数:{{ detail.answeredNum }}</li>  
27 - <li class="info-item">题目总数:{{ detail.questionNum }}</li>  
28 - <li class="info-item">答题总数:{{ detail.totalAnswersNum }}</li>  
29 - <li class="info-item">课时时长:{{ detail.duration }}分钟</li>  
30 - <li class="info-item">  
31 - 总参与度::{{ detail.participationRate }}%  
32 - </li>  
33 - <li class="info-item">  
34 - 班级总正确率:{{ detail.classCorrectRate }}%  
35 - </li>  
36 - <li class="info-item">  
37 - 已答总正确率:{{ detail.answerCorrectRate }}%  
38 - </li>  
39 - <li class="info-item">  
40 - 反馈时长:{{ setDuration(detail.consumingDuration) }}  
41 - </li>  
42 - </ul>  
43 - <el-table  
44 - v-if="type == 1"  
45 - :data="tableData"  
46 - border  
47 - style="width: 100%"  
48 - >  
49 - <el-table-column prop="questionIndex" label="题号" align="center"  
50 - ><template slot-scope="scoped"  
51 - >Q{{ scoped.row.questionIndex }}</template  
52 - ></el-table-column  
53 - >  
54 - <el-table-column prop="questionType" label="题型" align="center">  
55 - <template slot-scope="scoped">{{  
56 - setSubPro(scoped.row.questionType)  
57 - }}</template>  
58 - </el-table-column>  
59 - <el-table-column  
60 - prop="answeredNum"  
61 - label="答题人数"  
62 - sortable  
63 - align="center"  
64 - ></el-table-column>  
65 - <el-table-column  
66 - prop="correctAnswerNum"  
67 - label="答对人数"  
68 - sortable  
69 - align="center"  
70 - ></el-table-column>  
71 - <el-table-column  
72 - prop="participationRate"  
73 - label="班级参与度"  
74 - sortable  
75 - align="center"  
76 - ><template slot-scope="scoped"  
77 - >{{ scoped.row.participationRate }}%</template  
78 - ></el-table-column  
79 - >  
80 - <el-table-column  
81 - prop="classCorrectRate"  
82 - label="班级正确率"  
83 - sortable  
84 - align="center"  
85 - ><template slot-scope="scoped"  
86 - >{{ scoped.row.classCorrectRate }}%</template  
87 - ></el-table-column  
88 - >  
89 - <el-table-column  
90 - prop="answerCorrectRate"  
91 - label="已答正确率"  
92 - sortable  
93 - align="center"  
94 - ><template slot-scope="scoped"  
95 - >{{ scoped.row.answerCorrectRate }}%</template  
96 - ></el-table-column  
97 - >  
98 - <el-table-column  
99 - prop="correctAnswer"  
100 - label="正确答案"  
101 - align="center"  
102 - >  
103 - <template slot-scope="scoped">{{  
104 - scoped.row.correctAnswer == 1  
105 - ? "✓"  
106 - : scoped.row.correctAnswer == 2  
107 - ? "✗"  
108 - : scoped.row.correctAnswer  
109 - }}</template></el-table-column  
110 - >  
111 - <el-table-column prop="fallible" label="干扰答案" align="center"  
112 - ><template slot-scope="scoped">{{  
113 - scoped.row.fallible == 1  
114 - ? "✓"  
115 - : scoped.row.fallible == 2  
116 - ? "✗"  
117 - : scoped.row.fallible  
118 - }}</template></el-table-column  
119 - >  
120 - <!-- <el-table-column prop="screenshot" label="题干" align="center">  
121 - <template slot-scope="scoped">  
122 - <el-image  
123 - v-if="scoped.row.screenshot"  
124 - style="width: 60px; height: 40px"  
125 - :src="scoped.row.screenshot"  
126 - :preview-src-list="[scoped.row.screenshot]"  
127 - >  
128 - </el-image><span v-else>暂无</span></template  
129 - ></el-table-column> -->  
130 - </el-table>  
131 - <el-table  
132 - v-if="type == 2"  
133 - :data="tableData"  
134 - border  
135 - style="width: 100%"  
136 - >  
137 - <el-table-column  
138 - prop="studentCode"  
139 - label="学号"  
140 - align="center"  
141 - ></el-table-column>  
142 - <el-table-column  
143 - prop="studentName"  
144 - label="姓名"  
145 - align="center"  
146 - ></el-table-column>  
147 - <el-table-column  
148 - prop="answerTimes"  
149 - label="答题次数"  
150 - align="center"  
151 - ></el-table-column>  
152 - <el-table-column  
153 - prop="consumingDuration"  
154 - label="答题耗时"  
155 - align="center"  
156 - ><template slot-scope="scoped">{{  
157 - setDuration(scoped.row.consumingDuration)  
158 - }}</template></el-table-column  
159 - >  
160 - <el-table-column  
161 - prop="correctAnswerTimes"  
162 - label="答对次数"  
163 - align="center"  
164 - ></el-table-column>  
165 - <el-table-column  
166 - prop="participationRate"  
167 - label="参与度"  
168 - sortable  
169 - align="center"  
170 - ><template slot-scope="scoped"  
171 - >{{ scoped.row.participationRate }}%</template  
172 - ></el-table-column  
173 - >  
174 - <el-table-column  
175 - prop="correctRate"  
176 - label="正确率"  
177 - sortable  
178 - align="center"  
179 - ><template slot-scope="scoped"  
180 - >{{ scoped.row.correctRate }}%</template  
181 - ></el-table-column  
182 - >  
183 - <el-table-column  
184 - prop="answerCorrectRate"  
185 - label="已答正确率"  
186 - sortable  
187 - align="center"  
188 - ><template slot-scope="scoped"  
189 - >{{ scoped.row.answerCorrectRate }}%</template  
190 - ></el-table-column  
191 - >  
192 - <el-table-column  
193 - v-for="(item, index) in optionsList"  
194 - :key="index"  
195 - :label="'Q' + (index + 1)"  
196 - align="center"  
197 - ><template slot-scope="scoped">  
198 - <span :class="scoped.row['isRight' + index] ? '' : 'red'">{{  
199 - scoped.row["answer" + index]  
200 - }}</span>  
201 - </template>  
202 - </el-table-column>  
203 - </el-table>  
204 - <el-table  
205 - v-if="type == 3"  
206 - :data="tableData"  
207 - border  
208 - style="width: 100%"  
209 - >  
210 - <el-table-column  
211 - prop="studentCode"  
212 - label="学号"  
213 - align="center"  
214 - ></el-table-column>  
215 - <el-table-column  
216 - prop="studentName"  
217 - label="姓名"  
218 - align="center"  
219 - ></el-table-column>  
220 - <el-table-column  
221 - prop="rushAnswerTimes"  
222 - label="抢答成功次数"  
223 - sortable  
224 - align="center"  
225 - ></el-table-column>  
226 - <el-table-column  
227 - prop="rushAnswerCorrectTimes"  
228 - label="答对次数"  
229 - sortable  
230 - align="center"  
231 - ></el-table-column>  
232 - <el-table-column  
233 - prop="checkAnswerTimes"  
234 - label="抽答次数"  
235 - sortable  
236 - align="center"  
237 - ></el-table-column>  
238 - <el-table-column  
239 - prop="checkAnswerCorrectTimes"  
240 - label="抽答答对次数"  
241 - sortable  
242 - align="center"  
243 - ></el-table-column>  
244 - <el-table-column  
245 - prop="interactionsNum"  
246 - label="参与得分"  
247 - sortable  
248 - align="center"  
249 - ></el-table-column>  
250 - <el-table-column  
251 - prop="interactionsCorrectNum"  
252 - label="对错得分"  
253 - sortable  
254 - align="center"  
255 - ></el-table-column>  
256 - </el-table>  
257 - <el-table  
258 - v-if="type == 4"  
259 - :data="tableData"  
260 - border  
261 - style="width: 100%"  
262 - >  
263 - <el-table-column  
264 - prop="studentName"  
265 - label="姓名"  
266 - align="center"  
267 - ></el-table-column>  
268 - <el-table-column  
269 - prop="checkInTime"  
270 - label="签到时间"  
271 - sortable  
272 - align="center"  
273 - ></el-table-column>  
274 - <el-table-column  
275 - prop="makeUpTime"  
276 - label="补签时间"  
277 - sortable  
278 - align="center"  
279 - ></el-table-column>  
280 - </el-table> 15 +
  16 + <!-- 学生答题情况 -->
  17 + <Detail v-if="type == 1" :types="types" :detail="detail" />
  18 + <!-- 学生答题情况 -->
  19 + <Example v-if="type == 1" :types="types" :tableData="tableData" />
  20 + <!-- 学生问答 -->
  21 + <AnswerQustion v-if="type == 2" :types="types" :tableData="tableData" />
  22 + <!-- 学生互动表现 -->
  23 + <Interact v-if="type == 3" :types="types" :tableData="tableData" />
  24 + <!-- 签到明细 -->
  25 + <Report v-if="type == 4" :tableData="tableData" />
281 </div> 26 </div>
282 <div class="pagination-box" v-show="type == 1"> 27 <div class="pagination-box" v-show="type == 1">
283 - <el-pagination  
284 - small=""  
285 - layout="total,prev, pager, next"  
286 - :hide-on-single-page="true"  
287 - :total="total"  
288 - @current-change="changePage"  
289 - :current-page="page"  
290 - :page-size="size"  
291 - > 28 + <el-pagination small="" layout="total,prev, pager, next" :hide-on-single-page="true" :total="total"
  29 + @current-change="changePage" :current-page="page" :page-size="size">
292 </el-pagination> 30 </el-pagination>
293 </div> 31 </div>
294 <p class="down"> 32 <p class="down">
295 - <el-button  
296 - @click="exportData"  
297 - type="primary"  
298 - plain  
299 - round  
300 - icon="fa fa-cloud-download"  
301 - >导出报表</el-button  
302 - >  
303 - <el-button  
304 - v-if="!this.$store.getters.code"  
305 - @click="print"  
306 - type="primary"  
307 - plain  
308 - round  
309 - icon="el-icon-printer"  
310 - >打印</el-button  
311 - >  
312 - <!-- <el-button @click="edit" type="primary" round>修改答案</el-button> --> 33 + <el-button @click="openDown" type="primary" plain round icon="fa fa-cloud-download">导出报表</el-button>
  34 + <el-button v-if="!this.$store.getters.code" @click="print" type="primary" plain round
  35 + icon="el-icon-printer">打印</el-button>
313 </p> 36 </p>
314 </div> 37 </div>
  38 + <el-dialog :close-on-click-modal="false" :visible.sync="diaDown" width="360px">
  39 + <div v-show="exportType == 1">
  40 + <div class="down-item">
  41 + <p class="tit">是否将学生表现折线图一起导出</p>
  42 + <el-radio-group v-model="downType" @change="changeDownType">
  43 + <el-radio :label="1">不导出</el-radio>
  44 + <el-radio :label="2">导出</el-radio>
  45 + </el-radio-group>
  46 + </div>
  47 + <div class="down-item">
  48 + <p class="tit">选择要导出的学生</p>
  49 + <el-radio-group v-model="exportType">
  50 + <el-radio :label="1">导出全部</el-radio>
  51 + <el-radio :label="2">导出制定学生</el-radio>
  52 + </el-radio-group>
  53 + </div>
  54 + </div>
  55 + <ul v-show="exportType == 2">
  56 + <li v-for="item in exportStudent"></li>
  57 + </ul>
  58 + <div class="dialog-footer" slot="footer">
  59 + <el-button size="small" type="primary" round @click="exportData">确 定</el-button>
  60 + <el-button size="small" type="danger" round @click="cancel">取 消</el-button>
  61 + </div>
  62 + </el-dialog>
315 </div> 63 </div>
316 -  
317 - <set-answer  
318 - :diaVisible="dialogVisible"  
319 - :questionList="form.questionList"  
320 - :paperId="form.id"  
321 - @saveSuccess="handleSuccess"  
322 - @cancel="cancel"  
323 - />  
324 </div> 64 </div>
325 </template> 65 </template>
326 66
327 <script> 67 <script>
328 import { downloadFile, tablePrint } from "@/utils"; 68 import { downloadFile, tablePrint } from "@/utils";
  69 +import Detail from "./components/detail.vue"
  70 +import Example from "./components/example.vue"
  71 +import AnswerQustion from "./components/answerQustion.vue"
  72 +import Interact from "./components/interact.vue"
  73 +import Report from "./components/report.vue"
329 export default { 74 export default {
  75 + components: {
  76 + Detail, Example, AnswerQustion, Interact, Report
  77 + },
330 data() { 78 data() {
331 return { 79 return {
332 - dialogVisible: false, 80 + role: "",
333 loading: false, 81 loading: false,
334 - id: "", 82 + id: [],
335 type: 1, 83 type: 1,
336 - form: {  
337 - id: "",  
338 - questionList: [],  
339 - },  
340 - tabList: ["答题表现", "学生问答表现", "学生互动表现", "签到明细"], 84 + tabList: [],
341 detail: {}, 85 detail: {},
342 tableData: [], 86 tableData: [],
343 - optionsList: [],  
344 page: 1, 87 page: 1,
345 size: 20, 88 size: 20,
346 total: 0, 89 total: 0,
347 status: 0, 90 status: 0,
  91 + diaDown: false,
  92 + downType: 1,
  93 + exportType: 1,
  94 + exportStudent: []
348 }; 95 };
349 }, 96 },
350 created() { 97 created() {
351 - this.id = this.$route.query.id; 98 + this.role =
  99 + this.$store.getters.info.showRole ||
  100 + this.$store.getters.info.permissions[0].role;
  101 + this.types = Number(this.$route.query.types)
  102 + if (this.types == 1) {
  103 + this.tabList = [{ name: "答题表现", value: 1 },
  104 + { name: "学生问答表现", value: 2 },
  105 + { name: "学生互动表现", value: 3 },
  106 + { name: "签到明细", value: 4 },]
  107 + } else if (this.types == 2) {
  108 + this.tabList = [{ name: "答题表现", value: 1 },
  109 + { name: "学生问答表现", value: 2 },
  110 + { name: "学生互动表现", value: 3 }]
  111 + } else if (this.types == 3) {
  112 + this.tabList = [
  113 + { name: "学生问答表现", value: 2 },
  114 + { name: "学生互动表现", value: 3 }]
  115 + }
  116 + this.id = JSON.parse(this.$route.query.id)
352 this.status = this.$route.query.status ? this.$route.query.status : 0; 117 this.status = this.$route.query.status ? this.$route.query.status : 0;
353 this._QueryData(); 118 this._QueryData();
354 - this.periodDetail(); 119 + this.types != 3 ? this.periodDetail() : '';
355 }, 120 },
356 methods: { 121 methods: {
357 print() { 122 print() {
@@ -364,6 +129,7 @@ export default { @@ -364,6 +129,7 @@ export default {
364 this.type = type; 129 this.type = type;
365 this.page = 1; 130 this.page = 1;
366 this._QueryData(); 131 this._QueryData();
  132 + this._QueryDataQuestionRank()
367 }, 133 },
368 setDuration(times) { 134 setDuration(times) {
369 let m = parseInt(times / 1000 / 60); 135 let m = parseInt(times / 1000 / 60);
@@ -383,55 +149,16 @@ export default { @@ -383,55 +149,16 @@ export default {
383 } 149 }
384 return aTime; 150 return aTime;
385 }, 151 },
386 - setSubPro(type) {  
387 - let tit;  
388 - switch (type) {  
389 - case 2:  
390 - tit = "单选题";  
391 - break;  
392 - case 3:  
393 - tit = "多选题";  
394 - break;  
395 - case 4:  
396 - tit = "判断题";  
397 - break;  
398 - case 5:  
399 - tit = "主观题";  
400 - break;  
401 - default:  
402 - tit = "其他";  
403 - }  
404 - return tit;  
405 - },  
406 - cancel() {  
407 - this.dialogVisible = false;  
408 - },  
409 - handleSuccess() {  
410 - this.dialogVisible = false;  
411 - this._QueryData();  
412 - },  
413 - async edit() {  
414 - if (this.editLoading) return;  
415 - this.editLoading = true;  
416 - const { data, status, info } = await this.$request.periodQuestionList({  
417 - periodId: this.id,  
418 - });  
419 - this.editLoading = false;  
420 - if (status === 0) {  
421 - this.form.id = this.id;  
422 - this.form.questionList = (data.list && [...data.list]) || [];  
423 - this.dialogVisible = true;  
424 - } else {  
425 - this.$message.error(info);  
426 - }  
427 - },  
428 changePage(page) { 152 changePage(page) {
429 this.page = page; 153 this.page = page;
430 this._QueryData(); 154 this._QueryData();
431 }, 155 },
432 async periodDetail() { 156 async periodDetail() {
433 - let { data, info, status } = await this.$request.periodDetail({  
434 - periodId: this.id, 157 + const periodDetail = this.role == "ROLE_PERSONAL" ?
  158 + this.$request.pPeriodDetail :
  159 + this.$request.periodDetail;
  160 + let { data, info, status } = await periodDetail({
  161 + periodId: this.id[0],
435 }); 162 });
436 if (status == 0) { 163 if (status == 0) {
437 this.detail = { ...data }; 164 this.detail = { ...data };
@@ -446,50 +173,57 @@ export default { @@ -446,50 +173,57 @@ export default {
446 } 173 }
447 }, 174 },
448 async _QueryData() { 175 async _QueryData() {
449 - const queryData =  
450 - this.type == 1  
451 - ? this.$request.periodQuestionReport  
452 - : this.$request.periodStudentReport; 176 + let queryData;
453 let query = {}; 177 let query = {};
454 - if (this.type == 2) {  
455 - query.type = 1;  
456 - } else if (this.type == 3) {  
457 - query.type = 2;  
458 - } else if (this.type == 4) {  
459 - query.type = 3; 178 + if (this.role == "ROLE_PERSONAL") {
  179 + if (this.types == 1) {
  180 + query.page = this.page
  181 + query.size = this.size
  182 + queryData = this.type == 1
  183 + ? this.$request.pPeriodQuestionReport
  184 + : this.$request.pPeriodStudentReport
  185 + }
  186 + else if (this.types == 2) {
  187 + queryData = this.type == 1
  188 + ? this.$request.pPeriodQuestionReport
  189 + : this.type == 2 ? this.$request.phaseAnswerReport : this.$request.phaseInteractiveReport;
  190 + } else if (this.types == 3) {
  191 + this.type == 1
  192 + ? this.$request.pPeriodQuestionReport
  193 + : this.type == 2 ? this.$request.pPhaseAnswerReport : this.$request.pPhaseInteractiveReport;
  194 + }
  195 + } else {
  196 + if (this.types == 1) {
  197 + query.page = this.page
  198 + query.size = this.size
  199 + queryData = this.type == 1
  200 + ? this.$request.periodQuestionReport
  201 + : this.$request.periodStudentReport
  202 + } else if (this.types == 2) {
  203 + queryData = this.type == 1
  204 + ? this.$request.periodQuestionReport
  205 + : this.type == 2 ? this.$request.phaseAnswerReport : this.$request.phaseInteractiveReport;
  206 + } else if (this.types == 3) {
  207 + queryData = this.type == 1
  208 + ? this.$request.periodQuestionReport
  209 + : this.type == 2 ? this.$request.cTPhaseAnswerReport : this.$request.cTPhaseInteractiveReport;
  210 + }
  211 + }
  212 +
  213 +
  214 + if (this.types == 1) {
  215 + query.type = this.type
460 } 216 }
461 this.loading = true; 217 this.loading = true;
462 let { data, info, status } = await queryData({ 218 let { data, info, status } = await queryData({
463 - periodId: this.id,  
464 - page: this.page,  
465 - size: this.size, 219 + // periodId: this.id,
  220 + periodId: this.id[0],
466 ...query, 221 ...query,
467 }); 222 });
468 this.loading = false; 223 this.loading = false;
469 if (status === 0) { 224 if (status === 0) {
470 if (this.type == 2) { 225 if (this.type == 2) {
471 - let optionsList = [];  
472 - this.tableData = data?.list.map((item) => {  
473 - let params = {};  
474 - const detail = JSON.parse(item.detail);  
475 - if (detail.length > optionsList.length) {  
476 - optionsList = [...detail];  
477 - }  
478 - detail.map((items, index) => {  
479 - params["isRight" + index] = items.isRight;  
480 - params["answer" + index] =  
481 - items.answer == 1  
482 - ? "✓"  
483 - : items.answer == 2  
484 - ? "✗"  
485 - : items.answer;  
486 - });  
487 - return {  
488 - ...item,  
489 - ...params,  
490 - };  
491 - });  
492 - this.optionsList = [...optionsList]; 226 + this.tableData = data?.list || []
493 } else { 227 } else {
494 this.tableData = data?.list.sort((a, b) => { 228 this.tableData = data?.list.sort((a, b) => {
495 return a.questionIndex - b.questionIndex; 229 return a.questionIndex - b.questionIndex;
@@ -500,19 +234,89 @@ export default { @@ -500,19 +234,89 @@ export default {
500 this.$message.error(info); 234 this.$message.error(info);
501 } 235 }
502 }, 236 },
  237 + async _QueryDataQuestionRank() {
  238 + let queryData;
  239 + if (this.role == "ROLE_PERSONAL") {
  240 + if (this.types == 1) {
  241 + queryData = this.type == 1
  242 + ? this.$request.pPeriodQuestionReport
  243 + : this.$request.pPeriodStudentReport
  244 + }
  245 + else if (this.types == 2) {
  246 + queryData = this.type == 1
  247 + ? this.$request.pPeriodQuestionReport
  248 + : this.type == 2 ? this.$request.phaseAnswerReport : this.$request.phaseInteractiveReport;
  249 + } else if (this.types == 3) {
  250 + this.type == 1
  251 + ? this.$request.pPeriodQuestionReport
  252 + : this.type == 2 ? this.$request.pPhaseAnswerReport : this.$request.pPhaseInteractiveReport;
  253 + }
  254 + } else {
  255 + if (this.types == 1) {
  256 + queryData = this.type == 1
  257 + ? this.$request.periodQuestionReport
  258 + : this.$request.periodStudentReport
  259 + } else if (this.types == 2) {
  260 + queryData = this.type == 1
  261 + ? this.$request.periodQuestionReport
  262 + : this.type == 2 ? this.$request.phaseAnswerReport : this.$request.phaseInteractiveReport;
  263 + } else if (this.types == 3) {
  264 + queryData = this.type == 1
  265 + ? this.$request.periodQuestionReport
  266 + : this.type == 2 ? this.$request.cTPhaseAnswerReport : this.$request.cTPhaseInteractiveReport;
  267 + }
  268 + }
  269 +
  270 + let query = {};
  271 + if (this.types == 1) {
  272 + query.type = this.type
  273 + }
  274 + this.loading = true;
  275 + let { data, info, status } = await queryData({
  276 + // periodId: this.id,
  277 + periodId: this.id[0],
  278 + onlyRate: true,
  279 + ...query,
  280 + });
  281 + this.loading = false;
  282 + if (status === 0) {
  283 + this.exportStudent = [...data?.list] || []
  284 + } else {
  285 + this.$message.error(info);
  286 + }
  287 + },
  288 +
  289 +
  290 + openDown() {
  291 + this.diaDown = true;
  292 + this.downType = 1
  293 + },
  294 + cancel() {
  295 + if (this.exportType == 2) {
  296 + this.exportType = 1
  297 + } else {
  298 + this.diaDown = false;
  299 + }
  300 + },
  301 + changeDownType() {
  302 + this.exportType = 1
  303 + },
  304 +
503 //导出 305 //导出
504 async exportData() { 306 async exportData() {
505 if (this.exportLoading == true) return; 307 if (this.exportLoading == true) return;
506 this.exportLoading = true; 308 this.exportLoading = true;
  309 + let studentIds = []
507 const data = await this.$request.exportPeriodReport({ 310 const data = await this.$request.exportPeriodReport({
508 - periodId: this.id, 311 + // periodId: this.id,
  312 + periodId: this.id[0],
509 }); 313 });
510 this.exportLoading = false; 314 this.exportLoading = false;
511 if (data) { 315 if (data) {
512 let blob = new Blob([data], { 316 let blob = new Blob([data], {
513 type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", 317 type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
514 }); 318 });
515 - downloadFile(this.status?"随堂问-已归档单课时报表.xlsx":"随堂问-单课时报表.xlsx", blob); 319 + downloadFile(this.status ? "随堂问-已归档单课时报表.xlsx" : "随堂问-单课时报表.xlsx", blob);
516 } else { 320 } else {
517 this.$message.error("下载失败"); 321 this.$message.error("下载失败");
518 } 322 }
@@ -525,6 +329,7 @@ div::-webkit-scrollbar { @@ -525,6 +329,7 @@ div::-webkit-scrollbar {
525 width: 3px; 329 width: 3px;
526 height: 10px; 330 height: 10px;
527 } 331 }
  332 +
528 div::-webkit-scrollbar-thumb { 333 div::-webkit-scrollbar-thumb {
529 border-radius: 10px; 334 border-radius: 10px;
530 background-color: #ccc; 335 background-color: #ccc;
@@ -537,18 +342,22 @@ div::-webkit-scrollbar-thumb { @@ -537,18 +342,22 @@ div::-webkit-scrollbar-thumb {
537 display: flex; 342 display: flex;
538 justify-content: space-between; 343 justify-content: space-between;
539 } 344 }
  345 +
540 .red { 346 .red {
541 color: #f30; 347 color: #f30;
542 } 348 }
  349 +
543 .page-content { 350 .page-content {
544 padding: 20px 20px 0; 351 padding: 20px 20px 0;
545 } 352 }
  353 +
546 .tab-box { 354 .tab-box {
547 width: 800px; 355 width: 800px;
548 margin: 0 auto 12px; 356 margin: 0 auto 12px;
549 background: #f8f8f8; 357 background: #f8f8f8;
550 border-radius: 20px; 358 border-radius: 20px;
551 display: flex; 359 display: flex;
  360 +
552 .tab-item { 361 .tab-item {
553 flex: 1; 362 flex: 1;
554 height: 40px; 363 height: 40px;
@@ -560,28 +369,27 @@ div::-webkit-scrollbar-thumb { @@ -560,28 +369,27 @@ div::-webkit-scrollbar-thumb {
560 background: transparent; 369 background: transparent;
561 border-radius: 20px; 370 border-radius: 20px;
562 cursor: pointer; 371 cursor: pointer;
  372 +
563 &.active { 373 &.active {
564 background: #667ffd; 374 background: #667ffd;
565 color: #fff; 375 color: #fff;
566 } 376 }
567 } 377 }
568 } 378 }
569 -.info {  
570 - display: flex;  
571 - flex-wrap: wrap;  
572 - border-left: 1px solid #e2e2e2;  
573 - border-top: 1px solid #e2e2e2;  
574 - margin-bottom: 12px;  
575 - .info-item {  
576 - width: 25%;  
577 - height: 50px;  
578 - box-sizing: border-box;  
579 - flex-shrink: 0;  
580 - background: #f8f8f8;  
581 - border-right: 1px solid #e2e2e2;  
582 - border-bottom: 1px solid #e2e2e2;  
583 - line-height: 50px;  
584 - text-align: center; 379 +
  380 +.el-dialog {
  381 + .down-item {
  382 + font-size: 15px;
  383 + margin-bottom: 10px;
  384 +
  385 + .tit {
  386 + line-height: 18px;
  387 + padding: 10px 0;
  388 + }
585 } 389 }
586 } 390 }
  391 +
  392 +.dialog-footer {
  393 + text-align: center;
  394 +}
587 </style> 395 </style>
588 \ No newline at end of file 396 \ No newline at end of file
src/views/basic/ask/components/answerQustion.vue 0 → 100644
  1 +<template>
  2 + <el-table :data="resultData" border style="width: 100%">
  3 + <el-table-column prop="studentCode" label="学号" align="center"></el-table-column>
  4 + <el-table-column prop="studentName" label="姓名" align="center"></el-table-column>
  5 + <template v-if="types == 1">
  6 + <el-table-column prop="answerTimes" label="答题次数" align="center"></el-table-column>
  7 + <el-table-column prop="consumingDuration" label="答题耗时" align="center"><template slot-scope="scoped">{{
  8 + setDuration(scoped.row.consumingDuration)
  9 + }}</template></el-table-column>
  10 + <el-table-column prop="correctAnswerTimes" label="答对次数" align="center"></el-table-column>
  11 + <el-table-column prop="participationRate" label="参与度" sortable align="center"><template slot-scope="scoped">{{
  12 + scoped.row.participationRate }}%</template></el-table-column>
  13 + <el-table-column prop="correctRate" label="正确率" sortable align="center"><template slot-scope="scoped">{{
  14 + scoped.row.correctRate }}%</template></el-table-column>
  15 + <el-table-column prop="answerCorrectRate" label="已答正确率" sortable align="center"><template slot-scope="scoped">{{
  16 + scoped.row.answerCorrectRate }}%</template></el-table-column>
  17 + <el-table-column v-for="(item, index) in optionsList" :key="index" :label="'Q' + (index + 1)"
  18 + align="center"><template slot-scope="scoped">
  19 + <span :class="scoped.row['isRight' + index] ? '' : 'red'">{{
  20 + scoped.row["answer" + index]
  21 + }}</span>
  22 + </template>
  23 + </el-table-column>
  24 + </template>
  25 + <template v-if="types == 2">
  26 + <el-table-column prop="answerTimes" label="累计答题次数" align="center"></el-table-column>
  27 + <el-table-column prop="correctAnswerTimes" label="累计答对次数" align="center"></el-table-column>
  28 + <el-table-column prop="participationRate" label="总参与度" align="center"><template slot-scope="scoped">{{
  29 + scoped.row.participationRate }}%</template></el-table-column>
  30 +
  31 + <el-table-column prop="participationRateRank" label="总参与度班名" align="center"></el-table-column>
  32 + <el-table-column prop="correctRate" label="总正确率" align="center"><template slot-scope="scoped">{{
  33 + scoped.row.correctRate }}%</template></el-table-column>
  34 + <el-table-column prop="correctRateRank" label="总正确率班名" sortable align="center"></el-table-column>
  35 + <el-table-column prop="answerCorrectRate" label="已答正确率" align="center"><template slot-scope="scoped">{{
  36 + scoped.row.answerCorrectRate }}%</template></el-table-column>
  37 + <el-table-column label="查看折线图" align="center">
  38 + <template slot-scope="scoped"><el-button icon="el-icon-right" type="primary" circle></el-button></template>
  39 + </el-table-column>
  40 + </template>
  41 + <template v-if="types == 3">
  42 + <el-table-column v-for="(item, index) in phaseOption" :key="index" :label="item" align="center">
  43 + <el-table-column align="center" :label="index == 0 ? '总课时数' : '课时数'" :prop="'periodCount' + item">
  44 + </el-table-column>
  45 + <el-table-column align="center" :label="index == 0 ? '总出题数' : '出题数'" :prop="'questionNum' + item">
  46 + </el-table-column>
  47 + <el-table-column align="center" :label="index == 0 ? '总参与度' : '参与度'" :prop="'participationRate' + item"><template
  48 + slot-scope="scoped">{{ scoped.row["participationRate" + item] }}%</template>
  49 + </el-table-column>
  50 + <el-table-column align="center" :label="index == 0 ? '总正确率' : '正确率'" :prop="'correctRate' + item"><template
  51 + slot-scope="scoped">{{ scoped.row["correctRate" + item] }}%</template>
  52 + </el-table-column>
  53 + </el-table-column>
  54 + </template>
  55 + </el-table>
  56 +</template>
  57 +<script>
  58 +export default {
  59 + props: {
  60 + tableData: Array,
  61 + types: Number,
  62 + },
  63 + data() {
  64 + return {
  65 + optionsList: [],
  66 + phaseOption: [], //问答补充数据
  67 + };
  68 + },
  69 + computed: {
  70 + resultData: function () {
  71 + let resultData = []
  72 + if (this.tableData.length) {
  73 + let optionsList = [];
  74 + let subjectName = [];
  75 + let rank = {}
  76 + resultData = this.tableData.map((item) => {
  77 + let params = {};
  78 +
  79 + if (this.types == 1) {
  80 + const detail = JSON.parse(item.detail);
  81 + if (detail.length > optionsList.length) {
  82 + optionsList = [...detail];
  83 + }
  84 + detail.map((items, index) => {
  85 + params["isRight" + index] = items.isRight;
  86 + params["answer" + index] =
  87 + items.answer == 1
  88 + ? "✓"
  89 + : items.answer == 2
  90 + ? "✗"
  91 + : items.answer;
  92 + });
  93 + } else if (this.types == 3) {
  94 + item.dataList.map((items, index) => {
  95 + if (!subjectName.includes(items.subjectName)) {
  96 + subjectName.push(items.subjectName);
  97 + }
  98 + params["answerCorrectRate" + items.subjectName] =
  99 + items.answerCorrectRate;
  100 + params["correctRate" + items.subjectName] = items.correctRate;
  101 + params["participationRate" + items.subjectName] =
  102 + items.participationRate;
  103 + params["periodCount" + items.subjectName] = items.periodCount;
  104 + params["questionNum" + items.subjectName] = items.questionNum;
  105 + });
  106 + }
  107 + if (this.types != 3) {
  108 + let participationRateArr = []
  109 + let correctRateArr = []
  110 + this.tableData.map(item => {
  111 + participationRateArr.push(item.participationRate)
  112 + correctRateArr.push(item.correctRate)
  113 + })
  114 + participationRateArr = [...new Set(participationRateArr)]
  115 + participationRateArr = participationRateArr.sort((a, b) => {
  116 + return b - a
  117 + })
  118 + correctRateArr = [...new Set(correctRateArr)]
  119 + correctRateArr = correctRateArr.sort((a, b) => {
  120 + return b - a
  121 + })
  122 + let participationRateRank = participationRateArr.findIndex(value => {
  123 + return item.participationRate == value
  124 + })
  125 + let correctRateRank = correctRateArr.findIndex(value => {
  126 + return item.correctRate == value
  127 + })
  128 + rank = {
  129 + participationRateRank: participationRateRank + 1,
  130 + correctRateRank: correctRateRank + 1
  131 + }
  132 + }
  133 + return {
  134 + ...item,
  135 + ...params,
  136 + ...rank
  137 + };
  138 + });
  139 + this.phaseOption = [...subjectName];
  140 + this.optionsList = [...optionsList];
  141 + } else {
  142 + resultData = []
  143 + this.optionsList = []
  144 + }
  145 + return resultData
  146 + }
  147 + },
  148 + methods: {
  149 + setDuration(times) {
  150 + let m = parseInt(times / 1000 / 60);
  151 + let s = parseInt((times / 1000) % 60);
  152 + let ms = times;
  153 + let aTime;
  154 + if (times == 0) {
  155 + aTime = `0`;
  156 + } else {
  157 + if (m == 0 && s == 0) {
  158 + aTime = `${ms}毫秒`;
  159 + } else if (m == 0 && s != 0) {
  160 + aTime = `${s}秒`;
  161 + } else if (m != 0 && s != 0) {
  162 + aTime = `${m}分${s}秒`;
  163 + }
  164 + }
  165 + return aTime;
  166 + },
  167 + }
  168 +};
  169 +</script>
  170 +<style>
  171 +.red {
  172 + color: #f30;
  173 +}
  174 +</style>
src/views/basic/ask/components/detail.vue 0 → 100644
  1 +<template>
  2 + <ul class="info" v-if="types == 1">
  3 + <li class="info-item">科目:{{ detail.subjectName }}</li>
  4 + <li class="info-item">课时:{{ detail.title }}</li>
  5 + <li class="info-item">上课时间:{{ detail.startTime }}</li>
  6 + <li class="info-item">下课时间:{{ detail.endTime }}</li>
  7 + <li class="info-item">签到人数:{{ detail.answeredNum }}</li>
  8 + <li class="info-item">题目总数:{{ detail.questionNum }}</li>
  9 + <li class="info-item">答题总数:{{ detail.totalAnswersNum }}</li>
  10 + <li class="info-item">课时时长:{{ detail.duration }}分钟</li>
  11 + <li class="info-item">
  12 + 总参与度::{{ detail.participationRate }}%
  13 + </li>
  14 + <li class="info-item">
  15 + 班级总正确率:{{ detail.classCorrectRate }}%
  16 + </li>
  17 + <li class="info-item">
  18 + 已答总正确率:{{ detail.answerCorrectRate }}%
  19 + </li>
  20 + <li class="info-item">
  21 + 反馈时长:{{ setDuration(detail.consumingDuration) }}
  22 + </li>
  23 + </ul>
  24 + <ul class="info" v-else-if="types == 2">
  25 + <li class="info-item">科目:{{ detail.subjectName }}</li>
  26 + <li class="info-item">课时总数:{{ detail.title }}</li>
  27 + <li class="info-item">课时时长:{{ detail.duration }}分钟</li>
  28 + <li class="info-item">
  29 + 反馈时长:{{ setDuration(detail.consumingDuration) }}
  30 + </li>
  31 + <li class="info-item">题目总数:{{ detail.questionNum }}</li>
  32 + <li class="info-item">答题总数:{{ detail.totalAnswersNum }}</li>
  33 + <li class="info-item">
  34 + 班级总正确率:{{ detail.classCorrectRate }}%
  35 + </li>
  36 + <li class="info-item">
  37 + 已答总正确率:{{ detail.answerCorrectRate }}%
  38 + </li>
  39 + <li class="info-item">
  40 + 总参与度::{{ detail.participationRate }}%
  41 + </li>
  42 +
  43 + </ul>
  44 +</template>
  45 +<script>
  46 +export default {
  47 + props: {
  48 + types: Number,
  49 + detail: Object,
  50 + },
  51 + methods: {
  52 + setDuration(times) {
  53 + let m = parseInt(times / 1000 / 60);
  54 + let s = parseInt((times / 1000) % 60);
  55 + let ms = times;
  56 + let aTime;
  57 + if (times == 0) {
  58 + aTime = `0`;
  59 + } else {
  60 + if (m == 0 && s == 0) {
  61 + aTime = `${ms}毫秒`;
  62 + } else if (m == 0 && s != 0) {
  63 + aTime = `${s}秒`;
  64 + } else if (m != 0 && s != 0) {
  65 + aTime = `${m}分${s}秒`;
  66 + }
  67 + }
  68 + return aTime;
  69 + },
  70 + }
  71 +}
  72 +</script>
  73 +<style lang="scss" scoped>
  74 +.info {
  75 + display: flex;
  76 + flex-wrap: wrap;
  77 + border-left: 1px solid #e2e2e2;
  78 + border-top: 1px solid #e2e2e2;
  79 + margin-bottom: 12px;
  80 +
  81 + .info-item {
  82 + width: 25%;
  83 + height: 50px;
  84 + box-sizing: border-box;
  85 + flex-shrink: 0;
  86 + background: #f8f8f8;
  87 + border-right: 1px solid #e2e2e2;
  88 + border-bottom: 1px solid #e2e2e2;
  89 + line-height: 50px;
  90 + text-align: center;
  91 + }
  92 +}
  93 +</style>
src/views/basic/ask/components/example.vue 0 → 100644
  1 +<template>
  2 +
  3 + <el-table :data="tableData" border style="width: 100%">
  4 + <el-table-column prop="questionIndex" label="题号" align="center"><template slot-scope="scoped">Q{{
  5 + scoped.row.questionIndex }}</template></el-table-column>
  6 + <el-table-column prop="questionType" label="题型" align="center">
  7 + <template slot-scope="scoped">{{
  8 + setSubPro(scoped.row.questionType)
  9 + }}</template>
  10 + </el-table-column>
  11 + <el-table-column prop="answeredNum" label="答题人数" sortable align="center"></el-table-column>
  12 + <el-table-column prop="correctAnswerNum" label="答对人数" sortable align="center"></el-table-column>
  13 + <el-table-column prop="participationRate" label="班级参与度" sortable align="center"><template slot-scope="scoped">{{
  14 + scoped.row.participationRate }}%</template></el-table-column>
  15 + <el-table-column prop="classCorrectRate" label="班级正确率" sortable align="center"><template slot-scope="scoped">{{
  16 + scoped.row.classCorrectRate }}%</template></el-table-column>
  17 + <el-table-column prop="answerCorrectRate" label="已答正确率" sortable align="center"><template slot-scope="scoped">{{
  18 + scoped.row.answerCorrectRate }}%</template></el-table-column>
  19 + <el-table-column prop="correctAnswer" label="正确答案" align="center">
  20 + <template slot-scope="scoped">{{
  21 + scoped.row.correctAnswer == 1
  22 + ? "✓"
  23 + : scoped.row.correctAnswer == 2
  24 + ? "✗"
  25 + : scoped.row.correctAnswer
  26 + }}</template></el-table-column>
  27 + <el-table-column prop="fallible" label="干扰答案" align="center"><template slot-scope="scoped">{{
  28 + scoped.row.fallible == 1
  29 + ? "✓"
  30 + : scoped.row.fallible == 2
  31 + ? "✗"
  32 + : scoped.row.fallible
  33 + }}</template></el-table-column>
  34 + </el-table>
  35 +</template>
  36 +<script>
  37 +export default {
  38 + props: {
  39 + tableData: Array,
  40 + },
  41 + data() {
  42 + return {};
  43 + },
  44 + created() { },
  45 + methods: {
  46 + setSubPro(type) {
  47 + let tit;
  48 + switch (type) {
  49 + case 2:
  50 + tit = "单选题";
  51 + break;
  52 + case 3:
  53 + tit = "多选题";
  54 + break;
  55 + case 4:
  56 + tit = "判断题";
  57 + break;
  58 + case 5:
  59 + tit = "主观题";
  60 + break;
  61 + default:
  62 + tit = "其他";
  63 + }
  64 + return tit;
  65 + },
  66 + }
  67 +};
  68 +</script>
src/views/basic/ask/components/interact.vue 0 → 100644
  1 +<template>
  2 + <el-table :data="resultData" border style="width: 100%">
  3 + <el-table-column prop="studentCode" label="学号" align="center"></el-table-column>
  4 + <el-table-column prop="studentName" label="姓名" align="center"></el-table-column>
  5 + <template v-if="types != 3">
  6 + <el-table-column prop="rushAnswerTimes" label="抢答成功次数" sortable align="center"></el-table-column>
  7 + <el-table-column prop="rushAnswerCorrectTimes" label="答对次数" sortable align="center"></el-table-column>
  8 + <el-table-column prop="checkAnswerTimes" label="抽答次数" sortable align="center"></el-table-column>
  9 + <el-table-column prop="checkAnswerCorrectTimes" label="抽答答对次数" sortable align="center"></el-table-column>
  10 + <el-table-column prop="interactionsNum" label="参与得分" sortable align="center"></el-table-column>
  11 + <el-table-column prop="interactionsCorrectNum" label="对错得分" sortable align="center"></el-table-column>
  12 + </template>
  13 + <template v-else>
  14 + <el-table-column v-for="(item, index) in phaseInter" :key="index" :label="item" align="center">
  15 + <el-table-column align="center" v-if="index == 0" label="参与分" sortable :prop="'interactionsNum' + item">
  16 + </el-table-column>
  17 + <el-table-column v-else align="center" label="互动数" :prop="'interactionsNum' + item">
  18 + </el-table-column>
  19 + <el-table-column v-if="index == 0" align="center" label="对错分" sortable :prop="'interactionsCorrectNum' + item">
  20 + </el-table-column>
  21 + <el-table-column v-else align="center" label="参与数" :prop="'interactionsCorrectNum' + item">
  22 + </el-table-column>
  23 + </el-table-column>
  24 + </template>
  25 + </el-table>
  26 +</template>
  27 +<script>
  28 +export default {
  29 + props: {
  30 + tableData: Array,
  31 + types: Number,
  32 + },
  33 + data() {
  34 + return {
  35 + phaseInter: [], //互动补充数据
  36 + }
  37 + },
  38 + computed: {
  39 + resultData: function () {
  40 + let resultData = []
  41 + if (this.tableData.length) {
  42 + if (this.types == "3") {
  43 + let subjectName = [];
  44 + resultData = data?.list.map((item) => {
  45 + let params = {};
  46 + item.dataList.map((items, index) => {
  47 + if (!subjectName.includes(items.subjectName)) {
  48 + subjectName.push(items.subjectName);
  49 + }
  50 + params["interactionsNum" + items.subjectName] =
  51 + items.interactionsNum;
  52 + params["interactionsCorrectNum" + items.subjectName] =
  53 + items.interactionsCorrectNum;
  54 + });
  55 + return {
  56 + ...item,
  57 + ...params,
  58 + };
  59 + });
  60 + this.phaseInter = [...subjectName];
  61 + }
  62 + } else {
  63 + resultData = []
  64 + this.optionsList = []
  65 + }
  66 + return resultData
  67 + }
  68 + },
  69 +};
  70 +</script>
src/views/basic/ask/components/report.vue 0 → 100644
  1 +<template>
  2 + <el-table :data="tableData" border style="width: 100%">
  3 + <el-table-column prop="studentName" label="姓名" align="center"></el-table-column>
  4 + <el-table-column prop="checkInTime" label="签到时间" sortable align="center"></el-table-column>
  5 + <el-table-column prop="makeUpTime" label="补签时间" sortable align="center"></el-table-column>
  6 + </el-table>
  7 +</template>
  8 +<script>
  9 +export default {
  10 + props: {
  11 + tableData: Array,
  12 + }
  13 +};
  14 +</script>
src/views/basic/ask/index.vue
1 <template> 1 <template>
2 <div class="main" ref="main"> 2 <div class="main" ref="main">
3 - <back-box>  
4 - <template slot="title">  
5 - <span>问答-数据报表</span>  
6 - </template>  
7 - <template slot="btns">  
8 - <el-tooltip  
9 - v-if="!code && gdClass"  
10 - effect="dark"  
11 - content="已归档试卷"  
12 - placement="bottom"  
13 - >  
14 - <el-button  
15 - type="primary"  
16 - icon="fa fa-archive"  
17 - size="mini"  
18 - plain  
19 - circle  
20 - @click="toArchiving"  
21 - ></el-button>  
22 - </el-tooltip>  
23 - </template>  
24 - </back-box>  
25 - <div class="answer-header">  
26 - <div class="sel-box">  
27 - <el-select  
28 - class="sel"  
29 - v-model="query.classId"  
30 - placeholder="选择班级"  
31 - @change="changeclass"  
32 - >  
33 - <el-option  
34 - v-for="item in classList"  
35 - :key="item.value"  
36 - :label="item.label"  
37 - :value="item.value"  
38 - >  
39 - </el-option>  
40 - </el-select>  
41 - <el-select  
42 - v-if="role == 'ROLE_BANZHUREN' || role == 'ROLE_PERSONAL'"  
43 - class="sel"  
44 - multiple  
45 - v-model="query.subjectNames"  
46 - placeholder="选择科目"  
47 - @change="changeSub"  
48 - >  
49 - <el-option  
50 - v-for="item in subjectList"  
51 - :key="item.value"  
52 - :label="item.label"  
53 - :value="item.value"  
54 - >  
55 - </el-option>  
56 - </el-select>  
57 - <el-select  
58 - v-else  
59 - class="sel"  
60 - v-model="query.subjectNames"  
61 - placeholder="选择科目"  
62 - >  
63 - <el-option  
64 - v-for="item in subjectList"  
65 - :key="item.value"  
66 - :label="item.label"  
67 - :value="item.value"  
68 - >  
69 - </el-option>  
70 - </el-select>  
71 - <div class="d1">  
72 - <el-date-picker  
73 - v-model="query.startDay"  
74 - type="date"  
75 - @change="handleChangeTimeStart"  
76 - placeholder="选择日期时间"  
77 - value-format="yyyy-MM-dd"  
78 - >  
79 - </el-date-picker>  
80 - ~  
81 - <el-date-picker  
82 - v-model="query.endDay"  
83 - type="date"  
84 - placeholder="选择日期时间"  
85 - @change="handleChangeTimeEnd"  
86 - value-format="yyyy-MM-dd"  
87 - >  
88 - </el-date-picker> 3 + <div class="sel-dia">
  4 + <p class="tit">
  5 + <span>报表数据配置</span>
  6 + <i class="el-icon-close" @click="goHome"></i>
  7 + </p>
  8 + <div class="select-box">
  9 + <div class="sel-item">
  10 + <span class="sel-label">班级:</span>
  11 + <el-select class="sel" v-model="query.classId" placeholder="选择班级" @change="changeclass">
  12 + <el-option v-for="item in classList" :key="item.value" :label="item.label" :value="item.value">
  13 + </el-option>
  14 + </el-select>
89 </div> 15 </div>
90 - <p class="p1">  
91 - <span @click="setDate(1)" :class="[date == 1 ? 'active' : '', 's1']"  
92 - >今天</span  
93 - >  
94 - <span @click="setDate(2)" :class="[date == 2 ? 'active' : '', 's1']"  
95 - >本周</span  
96 - >  
97 - <span @click="setDate(3)" :class="[date == 3 ? 'active' : '', 's1']"  
98 - >本月</span  
99 - >  
100 - <span @click="setDate(4)" :class="[date == 4 ? 'active' : '', 's1']"  
101 - >本季度</span  
102 - >  
103 - </p>  
104 - <el-button type="primary" round @click="_QueryData()">筛选</el-button>  
105 - </div>  
106 - </div>  
107 - <div class="table-box">  
108 - <el-radio-group  
109 - v-model="tabIndex"  
110 - @change="tabChange"  
111 - style="margin-bottom: 20px"  
112 - >  
113 - <template v-for="(item, index) in tabList">  
114 - <el-radio-button  
115 - v-if="index == 0 || query.startDay != query.endDay"  
116 - :key="index"  
117 - :label="index + 1"  
118 - >{{ item }}</el-radio-button  
119 - >  
120 - </template>  
121 - </el-radio-group>  
122 - <div class="table-cont" v-loading="loading">  
123 - <div id="print-content">  
124 - <div v-show="tabIndex == 1">  
125 - <el-table  
126 - :data="tableData"  
127 - border  
128 - style="width: 100%"  
129 - @sort-change="sortChange"  
130 - >  
131 - <el-table-column  
132 - prop="title"  
133 - label="课时"  
134 - align="center"  
135 - ></el-table-column>  
136 - <el-table-column  
137 - prop="questionNum"  
138 - label="题目总数"  
139 - align="center"  
140 - width="100"  
141 - ></el-table-column>  
142 - <el-table-column  
143 - prop="startTime"  
144 - label="上课时间"  
145 - align="center"  
146 - ></el-table-column>  
147 - <el-table-column  
148 - prop="participationRate"  
149 - label="参与度"  
150 - sortable="custom"  
151 - align="center"  
152 - >  
153 - <template slot-scope="scoped"  
154 - >{{ scoped.row.participationRate }}%</template  
155 - ></el-table-column  
156 - >  
157 - <el-table-column  
158 - prop="answerCorrectRate"  
159 - label="已答总正确率"  
160 - sortable="custom"  
161 - align="center"  
162 - >  
163 - <template slot-scope="scoped"  
164 - >{{ scoped.row.answerCorrectRate }}%</template  
165 - >  
166 - </el-table-column>  
167 - <el-table-column  
168 - prop="classCorrectRate"  
169 - label="班级总正确率"  
170 - sortable="custom"  
171 - align="center"  
172 - ><template slot-scope="scoped"  
173 - >{{ scoped.row.classCorrectRate }}%</template  
174 - ></el-table-column  
175 - >  
176 - <el-table-column label="操作" align="center">  
177 - <template slot-scope="scoped">  
178 - <template v-if="scoped.row.answerNum == 0">  
179 - <el-tooltip  
180 - v-if="role == 'ROLE_JIAOSHI'"  
181 - effect="dark"  
182 - content="设置答案"  
183 - placement="top"  
184 - >  
185 - <el-button  
186 - type="primary"  
187 - circle  
188 - size="mini"  
189 - icon="fa fa-file-text"  
190 - @click="edit(scoped.row)"  
191 - ></el-button>  
192 - </el-tooltip>  
193 - <template v-else>未设置答案</template>  
194 - </template>  
195 - <el-tooltip  
196 - v-else  
197 - effect="dark"  
198 - content="详情"  
199 - placement="top"  
200 - >  
201 - <el-button  
202 - type="primary"  
203 - circle  
204 - size="mini"  
205 - icon="fa fa-arrow-right"  
206 - @click="linkTo(scoped.row)"  
207 - ></el-button>  
208 - </el-tooltip>  
209 - </template>  
210 - </el-table-column>  
211 - </el-table>  
212 - </div>  
213 - <div v-show="tabIndex == 2">  
214 - <el-table  
215 - id="print-content2"  
216 - v-if="role == 'ROLE_JIAOSHI'"  
217 - :max-height="tableMaxHeight"  
218 - :data="tableData"  
219 - border  
220 - style="width: 100%"  
221 - >  
222 - <el-table-column  
223 - prop="studentCode"  
224 - label="学号"  
225 - fixed  
226 - align="center"  
227 - ></el-table-column>  
228 - <el-table-column  
229 - prop="studentName"  
230 - label="姓名"  
231 - fixed  
232 - align="center"  
233 - width="100"  
234 - ></el-table-column>  
235 - <el-table-column  
236 - prop="answerTimes"  
237 - label="累计答题次数"  
238 - sortable  
239 - align="center"  
240 - ></el-table-column>  
241 - <el-table-column  
242 - prop="correctAnswerTimes"  
243 - label="累计答对次数"  
244 - sortable  
245 - align="center"  
246 - ></el-table-column>  
247 - <el-table-column  
248 - prop="participationRate"  
249 - label="总参与度"  
250 - sortable  
251 - align="center"  
252 - >  
253 - <template slot-scope="scoped"  
254 - >{{ scoped.row.participationRate }}%</template  
255 - ></el-table-column  
256 - >  
257 - <el-table-column  
258 - prop="correctRate"  
259 - label="总正确率"  
260 - sortable  
261 - align="center"  
262 - >  
263 - <template slot-scope="scoped"  
264 - >{{ scoped.row.correctRate }}%</template  
265 - ></el-table-column  
266 - >  
267 - <el-table-column  
268 - prop="answerCorrectRate"  
269 - label="已答总正确率"  
270 - sortable  
271 - align="center"  
272 - >  
273 - <template slot-scope="scoped"  
274 - >{{ scoped.row.answerCorrectRate }}%</template  
275 - >  
276 - </el-table-column>  
277 - <el-table-column  
278 - prop="classRank"  
279 - label="总正确率班排名"  
280 - sortable  
281 - align="center"  
282 - ></el-table-column>  
283 - </el-table>  
284 - <el-table  
285 - id="print-content2"  
286 - :max-height="tableMaxHeight"  
287 - v-else  
288 - :data="tableData"  
289 - border  
290 - style="width: 100%"  
291 - >  
292 - <el-table-column  
293 - prop="studentCode"  
294 - label="学号"  
295 - align="center"  
296 - fixed  
297 - ></el-table-column>  
298 - <el-table-column  
299 - prop="studentName"  
300 - label="姓名"  
301 - align="center"  
302 - fixed  
303 - width="100"  
304 - ></el-table-column>  
305 - <el-table-column  
306 - v-for="(item, index) in phaseOption"  
307 - :key="index"  
308 - :label="item"  
309 - align="center"  
310 - >  
311 - <el-table-column  
312 - align="center"  
313 - :label="index == 0 ? '总课时数' : '课时数'"  
314 - :prop="'periodCount' + item"  
315 - >  
316 - </el-table-column>  
317 - <el-table-column  
318 - align="center"  
319 - :label="index == 0 ? '总出题数' : '出题数'"  
320 - :prop="'questionNum' + item"  
321 - >  
322 - </el-table-column>  
323 - <el-table-column  
324 - align="center"  
325 - :label="index == 0 ? '总参与度' : '参与度'"  
326 - :prop="'participationRate' + item"  
327 - ><template slot-scope="scoped"  
328 - >{{ scoped.row["participationRate" + item] }}%</template  
329 - >  
330 - </el-table-column>  
331 - <el-table-column  
332 - align="center"  
333 - :label="index == 0 ? '总正确率' : '正确率'"  
334 - :prop="'correctRate' + item"  
335 - ><template slot-scope="scoped"  
336 - >{{ scoped.row["correctRate" + item] }}%</template  
337 - >  
338 - </el-table-column>  
339 - </el-table-column>  
340 - </el-table>  
341 - </div>  
342 - <div v-show="tabIndex == 3">  
343 - <el-table  
344 - id="print-content3"  
345 - v-if="role == 'ROLE_JIAOSHI'"  
346 - :max-height="tableMaxHeight"  
347 - :data="tableData"  
348 - border  
349 - style="width: 100%"  
350 - >  
351 - <el-table-column  
352 - prop="studentCode"  
353 - label="学号"  
354 - fixed  
355 - align="center"  
356 - ></el-table-column>  
357 - <el-table-column  
358 - prop="studentName"  
359 - label="姓名"  
360 - fixed  
361 - align="center"  
362 - width="100"  
363 - ></el-table-column>  
364 - <el-table-column  
365 - prop="rushAnswerTimes"  
366 - label="抢答成功次数"  
367 - sortable  
368 - align="center"  
369 - ></el-table-column>  
370 - <el-table-column  
371 - prop="rushAnswerCorrectTimes"  
372 - label="抢答答对次数"  
373 - sortable  
374 - align="center"  
375 - ></el-table-column>  
376 - <el-table-column  
377 - prop="checkAnswerTimes"  
378 - label="抽答次数"  
379 - sortable  
380 - align="center"  
381 - ></el-table-column>  
382 - <el-table-column  
383 - prop="checkAnswerCorrectTimes"  
384 - label="抽答答对次数"  
385 - sortable  
386 - align="center"  
387 - ></el-table-column>  
388 - <el-table-column  
389 - prop="interactionsNum"  
390 - label="参与得分"  
391 - sortable  
392 - align="center"  
393 - ></el-table-column>  
394 - <el-table-column  
395 - prop="interactionsCorrectNum"  
396 - label="对错得分"  
397 - sortable  
398 - align="center"  
399 - ></el-table-column>  
400 - </el-table>  
401 - <el-table  
402 - id="print-content3"  
403 - v-else  
404 - :max-height="tableMaxHeight"  
405 - :data="tableData"  
406 - border  
407 - style="width: 100%"  
408 - >  
409 - <el-table-column  
410 - prop="studentCode"  
411 - label="学号"  
412 - align="center"  
413 - ></el-table-column>  
414 - <el-table-column  
415 - prop="studentName"  
416 - label="姓名"  
417 - align="center"  
418 - width="100"  
419 - ></el-table-column>  
420 - <el-table-column  
421 - v-for="(item, index) in phaseInter"  
422 - :key="index"  
423 - :label="item"  
424 - align="center"  
425 - >  
426 - <el-table-column  
427 - align="center"  
428 - v-if="index == 0"  
429 - label="参与分"  
430 - sortable  
431 - :prop="'interactionsNum' + item"  
432 - >  
433 - </el-table-column>  
434 - <el-table-column  
435 - v-else  
436 - align="center"  
437 - label="互动数"  
438 - :prop="'interactionsNum' + item"  
439 - >  
440 - </el-table-column>  
441 - <el-table-column  
442 - v-if="index == 0"  
443 - align="center"  
444 - label="对错分"  
445 - sortable  
446 - :prop="'interactionsCorrectNum' + item"  
447 - >  
448 - </el-table-column>  
449 - <el-table-column  
450 - v-else  
451 - align="center"  
452 - label="参与数"  
453 - :prop="'interactionsCorrectNum' + item"  
454 - >  
455 - </el-table-column>  
456 - </el-table-column>  
457 - </el-table> 16 + <div class="sel-item sel-item2">
  17 + <span class="sel-label">科目:</span>
  18 + <div class="sel-d">
  19 + <p class="p-all">
  20 + <el-checkbox :indeterminate="isIndeterminate" v-model="allSubject"
  21 + @change="handleCheckAllChange">全选</el-checkbox>
  22 + </p>
  23 + <p class="sel-p">
  24 + <el-checkbox-group v-model="query.subjectNames" @change="handleChecked">
  25 + <el-checkbox v-for="item in subjectList" :label="item" :key="item">{{ item
  26 + }}</el-checkbox>
  27 + </el-checkbox-group>
  28 + </p>
458 </div> 29 </div>
459 </div> 30 </div>
460 - <div class="pagination-box" v-show="tabIndex == 1">  
461 - <el-pagination  
462 - small=""  
463 - layout="total,prev, pager, next"  
464 - :hide-on-single-page="true"  
465 - :total="total"  
466 - @current-change="changePage"  
467 - :current-page="page"  
468 - :page-size="size"  
469 - >  
470 - </el-pagination> 31 + <div class="sel-item">
  32 + <span class="sel-label">日期:</span>
  33 + <div class="d1">
  34 + <el-date-picker v-model="query.startDay" type="date" @change="handleChangeTimeStart" placeholder="选择日期时间"
  35 + value-format="yyyy-MM-dd">
  36 + </el-date-picker>
  37 + ~
  38 + <el-date-picker v-model="query.endDay" type="date" placeholder="选择日期时间" @change="handleChangeTimeEnd"
  39 + value-format="yyyy-MM-dd">
  40 + </el-date-picker>
  41 + </div>
  42 + <p class="p1">
  43 + <span @click="setDate(1)" :class="[date == 1 ? 'active' : '', 's1']">本周</span>
  44 + <span @click="setDate(2)" :class="[date == 2 ? 'active' : '', 's1']">本月</span>
  45 + <span @click="setDate(3)" :class="[date == 3 ? 'active' : '', 's1']">本季度</span>
  46 + </p>
471 </div> 47 </div>
472 - <p  
473 - class="down"  
474 - v-if="(tabIndex == 3 || tabIndex == 2) && tableData.length"  
475 - >  
476 - <el-button  
477 - @click="exportData"  
478 - type="primary"  
479 - plain  
480 - round  
481 - icon="fa fa-cloud-download"  
482 - >导出报表</el-button  
483 - >  
484 - <el-button  
485 - v-if="!this.$store.getters.code"  
486 - @click="print"  
487 - type="primary"  
488 - plain  
489 - round  
490 - icon="el-icon-printer"  
491 - >打印</el-button  
492 - >  
493 - </p> 48 + </div>
  49 + <div class="foot-box">
  50 + <el-button type="primary" round @click="goList">确定</el-button>
  51 + <el-button type="danger" round @click="goHome">取消</el-button>
494 </div> 52 </div>
495 </div> 53 </div>
496 </div> 54 </div>
497 </template> 55 </template>
498 56
499 <script> 57 <script>
500 -import { formatDate, downloadFile, tablePrint } from "utils";  
501 -import BusEvent from "@/utils/busEvent"; 58 +import { formatDate } from "utils";
502 export default { 59 export default {
503 data() { 60 data() {
504 return { 61 return {
505 - gdClass: 0, //已归档班级数量  
506 - tableMaxHeight: 300,  
507 code: "", 62 code: "",
508 role: "", 63 role: "",
509 - loading: false,  
510 date: "", //今天-昨天-本周 64 date: "", //今天-昨天-本周
511 query: { 65 query: {
512 //搜索条件 66 //搜索条件
513 classId: "", 67 classId: "",
514 - subjectNames: "", 68 + subjectNames: [],
515 startDay: "", 69 startDay: "",
516 endDay: "", 70 endDay: "",
517 - day: "",  
518 - },  
519 - tabList: ["单课时报表", "阶段问答报表", "阶段互动报表"],  
520 - custom: {  
521 - //单课时排序  
522 - orderField: null,  
523 - orderType: null,  
524 }, 71 },
525 classList: [], //班级 72 classList: [], //班级
526 subjectList: [], //科目 73 subjectList: [], //科目
527 - tabIndex: 1, //选项卡  
528 - tableData: [],  
529 - phaseOption: [], //问答补充数据  
530 - phaseInter: [], //互动补充数据  
531 - page: 1,  
532 - size: 20,  
533 - total: 0, 74 +
  75 + isIndeterminate: true,//全选样式
  76 + allSubject: false,//全选状态
534 }; 77 };
535 }, 78 },
536 async created() { 79 async created() {
@@ -538,8 +81,7 @@ export default { @@ -538,8 +81,7 @@ export default {
538 this.role = 81 this.role =
539 this.$store.getters.info.showRole || 82 this.$store.getters.info.showRole ||
540 this.$store.getters.info.permissions[0].role; 83 this.$store.getters.info.permissions[0].role;
541 - this.query.subjectNames = this.role == "ROLE_BANZHUREN" ? [] : "";  
542 - this._QueryClassList2(); 84 + this.query.subjectNames = [];
543 await this._QueryClassList(); 85 await this._QueryClassList();
544 if (!this.query.classId) { 86 if (!this.query.classId) {
545 return; 87 return;
@@ -552,69 +94,27 @@ export default { @@ -552,69 +94,27 @@ export default {
552 this.query.endDay = new Date(); 94 this.query.endDay = new Date();
553 } 95 }
554 }, 96 },
555 - activated() {  
556 - const that = this;  
557 - BusEvent.$on("keepAlive", async function () {  
558 - that.query.subjectNames = that.role == "ROLE_BANZHUREN" ? [] : "";  
559 - that._QueryClassList2();  
560 - await that._QueryClassList();  
561 - if (!that.query.classId) {  
562 - return;  
563 - }  
564 - await that._QuerySubjectList();  
565 - await that.setDate(1);  
566 - let startDay = that.query?.startDay;  
567 - if (!startDay) {  
568 - that.query.startDay = new Date();  
569 - that.query.endDay = new Date();  
570 - }  
571 - });  
572 - }, 97 +
573 methods: { 98 methods: {
574 - toArchiving() {  
575 - this.$router.push({  
576 - path: "/askArchiving",  
577 - });  
578 - },  
579 - print() {  
580 - tablePrint("print-content", "随堂问-" + this.tabList[this.tabIndex - 1]);  
581 - },  
582 - changeSub(val) {  
583 - let sub;  
584 - if (val && val.length) {  
585 - let leng = val.length - 1;  
586 - sub = val[leng];  
587 - }  
588 - console.log(val);  
589 - this.query.subjectNames = val.filter((item) => {  
590 - return sub != "全部" ? item != "全部" : item == "全部";  
591 - }); 99 + handleCheckAllChange(val) {
  100 + this.checkedCities = val ? this.subjectList : [];
  101 + this.allSubject = false;
592 }, 102 },
593 - linkTo(obj) {  
594 - //去详情  
595 - this.$router.push({  
596 - path: "/askAnalysis",  
597 - query: {  
598 - id: obj.id,  
599 - },  
600 - }); 103 + handleChecked(value) {
  104 + console.log(value)
  105 + let checkedCount = value.length;
  106 + this.allSubject = checkedCount === this.subjectList.length;
  107 + this.isIndeterminate = checkedCount > 0 && checkedCount < this.subjectList.length;
601 }, 108 },
602 setDate(index) { 109 setDate(index) {
603 const that = this; 110 const that = this;
604 this.date = index == this.date ? "" : index; 111 this.date = index == this.date ? "" : index;
605 let aYear = new Date().getFullYear(); 112 let aYear = new Date().getFullYear();
606 let aMonth = new Date().getMonth() + 1; 113 let aMonth = new Date().getMonth() + 1;
607 - that.query.day = "";  
608 that.query.startDay = ""; 114 that.query.startDay = "";
609 that.query.endDay = ""; 115 that.query.endDay = "";
610 switch (index) { 116 switch (index) {
611 case 1: 117 case 1:
612 - that.query.day = formatDate(new Date(), "yyyy-MM-dd");  
613 - that.query.startDay = that.query.day;  
614 - that.query.endDay = that.query.day;  
615 - that.tabIndex = 1;  
616 - break;  
617 - case 2:  
618 let day = new Date().getDay(); 118 let day = new Date().getDay();
619 if (day == 0) { 119 if (day == 0) {
620 //中国式星期天是一周的最后一天 120 //中国式星期天是一周的最后一天
@@ -625,12 +125,12 @@ export default { @@ -625,12 +125,12 @@ export default {
625 that.query.startDay = formatDate(new Date(aTime), "yyyy-MM-dd"); 125 that.query.startDay = formatDate(new Date(aTime), "yyyy-MM-dd");
626 that.query.endDay = formatDate(new Date(), "yyyy-MM-dd"); 126 that.query.endDay = formatDate(new Date(), "yyyy-MM-dd");
627 break; 127 break;
628 - case 3: 128 + case 2:
629 aMonth = aMonth < 10 ? "0" + aMonth : aMonth; 129 aMonth = aMonth < 10 ? "0" + aMonth : aMonth;
630 that.query.startDay = `${aYear}-${aMonth}-01`; 130 that.query.startDay = `${aYear}-${aMonth}-01`;
631 that.query.endDay = formatDate(new Date(), "yyyy-MM-dd"); 131 that.query.endDay = formatDate(new Date(), "yyyy-MM-dd");
632 break; 132 break;
633 - case 4: 133 + case 3:
634 if (aMonth > 0 && aMonth < 4) { 134 if (aMonth > 0 && aMonth < 4) {
635 aMonth = "1"; 135 aMonth = "1";
636 } else if (aMonth > 3 && aMonth < 7) { 136 } else if (aMonth > 3 && aMonth < 7) {
@@ -647,10 +147,8 @@ export default { @@ -647,10 +147,8 @@ export default {
647 break; 147 break;
648 } 148 }
649 this.page = 1; 149 this.page = 1;
650 - this._QueryData();  
651 }, 150 },
652 handleChangeTimeStart(val) { 151 handleChangeTimeStart(val) {
653 - this.query.day = "";  
654 this.date = ""; 152 this.date = "";
655 if (this.query.endDay) { 153 if (this.query.endDay) {
656 if (new Date(val).getTime() > new Date(this.query.endDay).getTime()) { 154 if (new Date(val).getTime() > new Date(this.query.endDay).getTime()) {
@@ -660,73 +158,28 @@ export default { @@ -660,73 +158,28 @@ export default {
660 } 158 }
661 }, 159 },
662 handleChangeTimeEnd(val) { 160 handleChangeTimeEnd(val) {
663 - this.query.day = "";  
664 this.date = ""; 161 this.date = "";
665 - if (this.query.startDay) { 162 + if (this.query.startDay && val) {
666 if (new Date(val).getTime() < new Date(this.query.startDay).getTime()) { 163 if (new Date(val).getTime() < new Date(this.query.startDay).getTime()) {
667 this.$message.error("任务结束时间不能任务开始时间前面,请重新设置"); 164 this.$message.error("任务结束时间不能任务开始时间前面,请重新设置");
668 this.query.endDay = ""; 165 this.query.endDay = "";
669 } 166 }
670 } 167 }
671 }, 168 },
672 - async edit(item) {  
673 - this.$router.push({  
674 - path: "/examinationPaperEdit",  
675 - query: {  
676 - paperId: item.id,  
677 - title: item.title,  
678 - type: 3,  
679 - },  
680 - });  
681 - },  
682 - tabChange() {  
683 - this.tableMaxHeight = this.$refs.main.offsetHeight;  
684 - this.page = 1;  
685 - this.tableData = [];  
686 - this._QueryData();  
687 - },  
688 - sortChange(obj) {  
689 - this.custom.orderField =  
690 - obj.prop == "participationRate"  
691 - ? 1  
692 - : obj.prop == "answerCorrectRate"  
693 - ? 2  
694 - : 3;  
695 - this.custom.orderType = obj.order == "ascending" ? 0 : 1;  
696 - this.page = 1;  
697 - this._QueryData();  
698 - },  
699 - changePage(page) {  
700 - this.page = page;  
701 - this._QueryData();  
702 - }, 169 +
703 async changeclass() { 170 async changeclass() {
  171 + this.allSubject = false
  172 + this.query.subjectNames = []
704 await this._QuerySubjectList(); 173 await this._QuerySubjectList();
705 - this.page = 1;  
706 - this._QueryData();  
707 - },  
708 - async changClazz() {  
709 - await this._QuerySubjectList();  
710 - // await this.setDate(1);  
711 - this._QueryData();  
712 - },  
713 - async _QueryClassList2() {  
714 - const fetchClassList =  
715 - this.role == "ROLE_BANZHUREN"  
716 - ? this.$request.cTClassList  
717 - : this.$request.tClassList;  
718 - const { data, status, info } = await fetchClassList({ status: 1 });  
719 - if (status === 0) {  
720 - this.gdClass = data?.list?.length || 0;  
721 - } else {  
722 - this.$message.error(info);  
723 - }  
724 }, 174 },
  175 +
725 async _QueryClassList() { 176 async _QueryClassList() {
726 const fetchClassList = 177 const fetchClassList =
727 this.role == "ROLE_BANZHUREN" 178 this.role == "ROLE_BANZHUREN"
728 - ? this.$request.cTClassList  
729 - : this.$request.tClassList; 179 + ? this.$request.cTClassList :
  180 + this.role == "ROLE_PERSONAL"
  181 + ? this.$request.pClassList
  182 + : this.$request.tClassList;
730 const { data, status, info } = await fetchClassList(); 183 const { data, status, info } = await fetchClassList();
731 if (status === 0) { 184 if (status === 0) {
732 this.classList = data.list.map((item) => { 185 this.classList = data.list.map((item) => {
@@ -743,292 +196,41 @@ export default { @@ -743,292 +196,41 @@ export default {
743 async _QuerySubjectList() { 196 async _QuerySubjectList() {
744 const fetchSubjectList = 197 const fetchSubjectList =
745 this.role == "ROLE_BANZHUREN" 198 this.role == "ROLE_BANZHUREN"
746 - ? this.$request.cTSubjectList  
747 - : this.$request.tSubjectList; 199 + ? this.$request.cTSubjectList :
  200 + this.role == "ROLE_PERSONAL"
  201 + ? this.$request.pSubjectList
  202 + : this.$request.tSubjectList;
748 203
749 const { data, status, info } = await fetchSubjectList({ 204 const { data, status, info } = await fetchSubjectList({
750 classId: this.query.classId, 205 classId: this.query.classId,
751 }); 206 });
752 if (status === 0) { 207 if (status === 0) {
753 - this.subjectList =  
754 - data.subjectNames?.map((item) => {  
755 - return {  
756 - value: item,  
757 - label: item,  
758 - };  
759 - }) || []; 208 + this.subjectList = data.subjectNames || [];
760 if (this.role == "ROLE_BANZHUREN") { 209 if (this.role == "ROLE_BANZHUREN") {
761 - this.subjectList.unshift({  
762 - value: "全部",  
763 - label: "全部",  
764 - });  
765 - this.query.subjectNames.push(this.subjectList[0]?.value); 210 + this.query.subjectNames = this.subjectList
766 } else { 211 } else {
767 - this.query.subjectNames = this.subjectList[0]?.value; 212 + this.subjectList.length ? this.query.subjectNames.push(this.subjectList[0]) : "";
768 } 213 }
769 } else { 214 } else {
770 this.$message.error(info); 215 this.$message.error(info);
771 } 216 }
772 }, 217 },
773 - async _QueryData() {  
774 - if (!this.query.classId) {  
775 - return;  
776 - }  
777 - if (this.tabIndex == 1) {  
778 - this.periodReportList();  
779 - } else if (this.tabIndex == 2) {  
780 - this.phaseAnswerReport();  
781 - } else if (this.tabIndex == 3) {  
782 - this.phaseInteractiveReport();  
783 - }  
784 - },  
785 - //分页查询课时报表列表  
786 - async periodReportList() {  
787 - this.loading = true;  
788 - let query = {};  
789 - for (let key in this.query) {  
790 - if (this.query[key] != "") {  
791 - query[key] = this.query[key];  
792 - }  
793 - }  
794 - if (this.custom.orderField !== null) {  
795 - query = { ...query, ...this.custom };  
796 - }  
797 - if (this.role != "ROLE_BANZHUREN") {  
798 - query.subjectNames = [query.subjectNames];  
799 - } else {  
800 - if (  
801 - query["subjectNames"] &&  
802 - query["subjectNames"].length == 1 &&  
803 - query["subjectNames"][0] == "全部"  
804 - ) {  
805 - query["subjectNames"] = this.subjectList.map((item) => {  
806 - return item.value;  
807 - });  
808 - query["subjectNames"].shift();  
809 - }  
810 - if (!query["subjectNames"]) {  
811 - this.$message.warning("请选择科目");  
812 - return;  
813 - }  
814 - }  
815 - const { data, status, info } = await this.$request.periodReportList({  
816 - ...query,  
817 - page: this.page,  
818 - size: this.size,  
819 - });  
820 - this.loading = false;  
821 - if (status === 0) {  
822 - this.tableData = (data?.list && [...data?.list]) || [];  
823 - this.total = data?.count || 0;  
824 - } else {  
825 - this.$message.error(info);  
826 - }  
827 - },  
828 - //查询阶段问答报表  
829 - async phaseAnswerReport() {  
830 - this.loading = true;  
831 - let query = {};  
832 - for (let key in this.query) {  
833 - if (this.query[key] != "") {  
834 - if (key == "subjectNames" && this.role != "ROLE_BANZHUREN") {  
835 - query["subjectName"] = this.query[key];  
836 - } else {  
837 - query[key] = this.query[key];  
838 - }  
839 - }  
840 - }  
841 - if (this.role == "ROLE_BANZHUREN") {  
842 - if (  
843 - query["subjectNames"] &&  
844 - query["subjectNames"].length == 1 &&  
845 - query["subjectNames"][0] == "全部"  
846 - ) {  
847 - query["subjectNames"] = this.subjectList.map((item) => {  
848 - return item.value;  
849 - });  
850 - query["subjectNames"].shift();  
851 - }  
852 - if (!query["subjectNames"]) {  
853 - this.$message.warning("请选择科目");  
854 - return;  
855 - }  
856 - }  
857 - const phaseAnswerReport =  
858 - this.role == "ROLE_BANZHUREN"  
859 - ? this.$request.cTPhaseAnswerReport  
860 - : this.$request.phaseAnswerReport;  
861 218
862 - const { data, status, info } = await phaseAnswerReport({  
863 - ...query,  
864 - });  
865 - this.loading = false;  
866 - if (status === 0) {  
867 - if (this.role == "ROLE_BANZHUREN") {  
868 - let subjectName = [];  
869 - let tableData = data?.list.map((item) => {  
870 - let params = {};  
871 - item.dataList.map((items, index) => {  
872 - if (!subjectName.includes(items.subjectName)) {  
873 - subjectName.push(items.subjectName);  
874 - }  
875 - params["answerCorrectRate" + items.subjectName] =  
876 - items.answerCorrectRate;  
877 - params["correctRate" + items.subjectName] = items.correctRate;  
878 - params["participationRate" + items.subjectName] =  
879 - items.participationRate;  
880 - params["periodCount" + items.subjectName] = items.periodCount;  
881 - params["questionNum" + items.subjectName] = items.questionNum;  
882 - });  
883 - return {  
884 - ...item,  
885 - ...params,  
886 - };  
887 - });  
888 - this.phaseOption = [...subjectName];  
889 - this.tableData = tableData.sort((a, b) => {  
890 - return a.studentCode - b.studentCode;  
891 - });  
892 - } else {  
893 - this.tableData =  
894 - (data?.list &&  
895 - [...data?.list].sort((a, b) => {  
896 - return a.studentCode - b.studentCode;  
897 - })) ||  
898 - [];  
899 - }  
900 - this.total = data.count;  
901 - } else {  
902 - this.$message.error(info);  
903 - }  
904 - },  
905 - //查询阶段互动报表  
906 - async phaseInteractiveReport() {  
907 - this.loading = true;  
908 - let query = {};  
909 - for (let key in this.query) {  
910 - if (this.query[key] != "") {  
911 - if (key == "subjectNames" && this.role != "ROLE_BANZHUREN") {  
912 - query["subjectName"] = this.query[key];  
913 - } else {  
914 - query[key] = this.query[key];  
915 - }  
916 - }  
917 - }  
918 - if (this.role == "ROLE_BANZHUREN") {  
919 - if (  
920 - query["subjectNames"] &&  
921 - query["subjectNames"].length == 1 &&  
922 - query["subjectNames"][0] == "全部"  
923 - ) {  
924 - query["subjectNames"] = this.subjectList.map((item) => {  
925 - return item.value;  
926 - });  
927 - query["subjectNames"].shift();  
928 - }  
929 - if (!query["subjectNames"]) {  
930 - this.$message.warning("请选择科目");  
931 - return;  
932 - }  
933 - }  
934 - const phaseInteractiveReport =  
935 - this.role == "ROLE_BANZHUREN"  
936 - ? this.$request.cTPhaseInteractiveReport  
937 - : this.$request.phaseInteractiveReport;  
938 -  
939 - const { data, status, info } = await phaseInteractiveReport({  
940 - ...query,  
941 - });  
942 - this.loading = false;  
943 - if (status === 0) {  
944 - if (this.role == "ROLE_BANZHUREN") {  
945 - let subjectName = [];  
946 - let tableData = data?.list.map((item) => {  
947 - let params = {};  
948 - item.dataList.map((items, index) => {  
949 - if (!subjectName.includes(items.subjectName)) {  
950 - subjectName.push(items.subjectName);  
951 - }  
952 - params["interactionsNum" + items.subjectName] =  
953 - items.interactionsNum;  
954 - params["interactionsCorrectNum" + items.subjectName] =  
955 - items.interactionsCorrectNum;  
956 - });  
957 - return {  
958 - ...item,  
959 - ...params,  
960 - };  
961 - });  
962 - this.phaseInter = [...subjectName];  
963 - this.tableData = tableData.sort((a, b) => {  
964 - return a.studentCode - b.studentCode;  
965 - });  
966 - } else {  
967 - this.tableData =  
968 - (data?.list &&  
969 - [...data?.list].sort((a, b) => {  
970 - return a.studentCode - b.studentCode;  
971 - })) ||  
972 - [];  
973 - }  
974 - this.total = data.count;  
975 - } else {  
976 - this.$message.error(info);  
977 - } 219 + //回主页
  220 + goHome() {
  221 + this.$router.push({
  222 + path: '/index'
  223 + })
978 }, 224 },
979 - //导出  
980 - async exportData() {  
981 - if (this.exportLoading == true) return;  
982 - let query = {};  
983 - for (let key in this.query) {  
984 - if (this.query[key] != "") {  
985 - if (key == "subjectNames" && this.role != "ROLE_BANZHUREN") {  
986 - query["subjectName"] = this.query[key];  
987 - } else {  
988 - query[key] = this.query[key];  
989 - }  
990 - }  
991 - }  
992 - if (this.role == "ROLE_BANZHUREN") {  
993 - if (  
994 - query["subjectNames"] &&  
995 - query["subjectNames"].length == 1 &&  
996 - query["subjectNames"][0] == "全部"  
997 - ) {  
998 - query["subjectNames"] = this.subjectList.map((item) => {  
999 - return item.value;  
1000 - });  
1001 - query["subjectNames"].shift();  
1002 - }  
1003 - if (!query["subjectNames"]) {  
1004 - this.$message.warning("请选择科目");  
1005 - return; 225 + //去列表
  226 + goList() {
  227 + this.$router.push({
  228 + path: '/askList',
  229 + query: {
  230 + params: JSON.stringify(this.query)
1006 } 231 }
1007 - }  
1008 - this.exportLoading = true;  
1009 - let exportData;  
1010 - if (this.role == "ROLE_BANZHUREN") {  
1011 - exportData =  
1012 - this.tabIndex == 2  
1013 - ? this.$request.cTExportPhaseAnswerReport  
1014 - : this.$request.cTExportPhaseInteractiveReport;  
1015 - } else {  
1016 - exportData =  
1017 - this.tabIndex == 2  
1018 - ? this.$request.exportPhaseAnswerReport  
1019 - : this.$request.exportPhaseInteractiveReport;  
1020 - }  
1021 - const data = await exportData({ ...query });  
1022 - this.exportLoading = false;  
1023 - if (data) {  
1024 - let blob = new Blob([data], {  
1025 - type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",  
1026 - });  
1027 - downloadFile("随堂问-阶段报表.xlsx", blob);  
1028 - } else {  
1029 - this.$message.error("下载失败");  
1030 - }  
1031 - }, 232 + })
  233 + }
1032 }, 234 },
1033 }; 235 };
1034 </script> 236 </script>
@@ -1037,6 +239,7 @@ div::-webkit-scrollbar { @@ -1037,6 +239,7 @@ div::-webkit-scrollbar {
1037 width: 3px; 239 width: 3px;
1038 height: 10px; 240 height: 10px;
1039 } 241 }
  242 +
1040 div::-webkit-scrollbar-thumb { 243 div::-webkit-scrollbar-thumb {
1041 border-radius: 10px; 244 border-radius: 10px;
1042 background-color: #ccc; 245 background-color: #ccc;
@@ -1045,75 +248,138 @@ div::-webkit-scrollbar-thumb { @@ -1045,75 +248,138 @@ div::-webkit-scrollbar-thumb {
1045 <style lang="scss" scoped> 248 <style lang="scss" scoped>
1046 .main { 249 .main {
1047 height: 100%; 250 height: 100%;
1048 -}  
1049 -.table-box {  
1050 - margin: 0 20px;  
1051 - padding: 16px;  
1052 - background: #f8f8f8;  
1053 - border-radius: 5px;  
1054 - .table-cont {  
1055 - min-height: 300px;  
1056 - }  
1057 - :deep(.fa-arrow-right) {  
1058 - padding-left: 2px;  
1059 - }  
1060 - :deep(.fa-file-text) {  
1061 - padding-left: 2px;  
1062 - } 251 + background: rgba($color: #000000, $alpha: .3);
  252 + display: flex;
  253 + justify-content: center;
1063 } 254 }
1064 255
1065 -.fa-exchange {  
1066 - color: #667ffd;  
1067 - cursor: pointer;  
1068 - font-size: 16px;  
1069 - margin-left: 10px;  
1070 -}  
1071 -.dia-btn {  
1072 - border-radius: 20px;  
1073 - margin: 0 20px;  
1074 - padding: 10px 20px;  
1075 -}  
1076 -.dia-tips {  
1077 - padding-bottom: 10px;  
1078 -}  
1079 -.dia-question-box {  
1080 - padding: 16px 16px 1px;  
1081 - background: #f8f8f8; 256 +.sel-dia {
  257 + margin-top: 100px;
  258 + width: 750px;
  259 + background: #fff;
1082 border-radius: 10px; 260 border-radius: 10px;
1083 -  
1084 - .answer-s {  
1085 - width: 36px;  
1086 - height: 28px;  
1087 - cursor: pointer;  
1088 - }  
1089 -}  
1090 -.set-questions { 261 + overflow: hidden;
  262 + height: 460px;
1091 display: flex; 263 display: flex;
1092 - margin-bottom: 12px;  
1093 - width: 100%;  
1094 - .qs-num { 264 + flex-direction: column;
  265 +
  266 + .tit {
  267 + text-align: center;
  268 + position: relative;
  269 + padding: 20px 0 12px;
  270 + font-size: 18px;
  271 + font-weight: 500;
1095 flex-shrink: 0; 272 flex-shrink: 0;
1096 - margin-right: 10px; 273 +
  274 + .el-icon-close {
  275 + position: absolute;
  276 + top: 0;
  277 + right: 0;
  278 + width: 30px;
  279 + height: 30px;
  280 + text-align: center;
  281 + line-height: 28px;
  282 + background: #e2e2e2;
  283 + border-radius: 0 0 0 24px;
  284 + box-sizing: border-box;
  285 + padding-left: 6px;
  286 + font-size: 18px;
  287 + cursor: pointer;
  288 +
  289 + &:hover {
  290 + color: #f30;
  291 + }
  292 + }
1097 } 293 }
1098 - .qs-options { 294 +
  295 + .select-box {
1099 flex: 1; 296 flex: 1;
1100 - .ipt {  
1101 - margin-bottom: 5px; 297 + overflow-y: auto;
  298 + padding: 0 30px;
  299 +
  300 + .sel-item {
  301 + display: flex;
  302 + align-items: center;
  303 + margin-bottom: 12px;
  304 +
  305 + .sel-label {
  306 + width: 60px;
  307 + margin-right: 10px;
  308 + flex-shrink: 0;
  309 + font-size: 15px;
  310 + font-weight: 500;
  311 + }
  312 +
  313 + :deep(.el-input__inner) {
  314 + height: 36px;
  315 + line-height: 36px;
  316 + border-radius: 18px;
  317 + }
  318 +
  319 + :deep(.el-input__suffix) {
  320 + .el-input__icon {
  321 + line-height: 36px;
  322 + }
  323 + }
  324 +
  325 + :deep(.el-input__inner) {
  326 + height: 36px;
  327 + line-height: 36px;
  328 + border-radius: 18px;
  329 +
  330 + .el-input__icon {
  331 + line-height: 36px;
  332 + }
  333 + }
  334 +
  335 + .el-date-editor.el-input,
  336 + .el-date-editor.el-input__inner {
  337 + width: 160px;
  338 + height: 36px;
  339 + line-height: 36px;
  340 +
  341 + :deep(.el-input__icon) {
  342 + line-height: 36px;
  343 + }
  344 + }
  345 + }
  346 +
  347 + .sel-item2 {
  348 + align-items: flex-start;
  349 + line-height: 20px;
  350 + padding-top: 10px;
  351 +
  352 + .p-all {
  353 + padding-bottom: 6px;
  354 + }
  355 + }
  356 +
  357 + .p1 {
  358 + .s1 {
  359 + margin-left: 20px;
  360 + cursor: pointer;
  361 + color: #7f7f7f;
  362 +
  363 + &:hover {
  364 + color: #409eff;
  365 + }
  366 +
  367 + &.active {
  368 + color: #667ffd;
  369 + }
  370 + }
1102 } 371 }
1103 } 372 }
1104 - .delButton {  
1105 - border-color: #ff6868;  
1106 - background: #ff6868 url("../../../assets/images/arrow.png") no-repeat center;  
1107 - background-size: 19px;  
1108 - color: transparent;  
1109 - }  
1110 - .ac {  
1111 - border-color: #ff6868;  
1112 - background: #ff6868;  
1113 - color: #fff; 373 +
  374 + .foot-box {
  375 + flex-shrink: 0;
  376 + padding: 12px 0 20px;
  377 + display: flex;
  378 + justify-content: center;
  379 +
  380 + .el-button {
  381 + margin: 0 30px;
  382 + }
1114 } 383 }
1115 } 384 }
1116 -.down {  
1117 - padding-top: 16px;  
1118 -}  
1119 </style> 385 </style>
1120 \ No newline at end of file 386 \ No newline at end of file
src/views/basic/ask/list.vue
  1 +<template>
  2 + <div class="main" ref="main">
  3 + <back-box v-show="!isDetail">
  4 + <template slot="title">
  5 + <span>随堂问-数据报表</span>
  6 + </template>
  7 + <template slot="btns">
  8 + <el-tooltip v-if="this.role != 'ROLE_PERSONAL' && !code && gdClass" effect="dark" content="已归档试卷"
  9 + placement="bottom">
  10 + <el-button type="primary" icon="fa fa-archive" size="mini" plain circle @click="toArchiving"></el-button>
  11 + </el-tooltip>
  12 + </template>
  13 + </back-box>
  14 + <div v-show="!isDetail" class="table-box">
  15 + <div class="table-cont" v-loading="loading">
  16 + <p class="btn-box">
  17 + <el-button type="primary" round @click="linkToDetail2">查看汇总报表</el-button>
  18 + </p>
  19 + <div id="print-content">
  20 + <el-table :data="tableData" border :show-header="total > 0" style="width: 100%"
  21 + @selection-change="handleSelectionChange">
  22 + <el-table-column type="selection" width="40"></el-table-column>
  23 + <el-table-column prop="subject" label="科目" align="center" width="80"></el-table-column>
  24 + <el-table-column prop="title" label="课时名称" align="center"></el-table-column>
  25 + <el-table-column prop="participationRate" label="总参与度" align="center"> <template slot-scope="scoped">{{
  26 + scoped.row.participationRate }}%</template></el-table-column>
  27 + <el-table-column prop="answerCorrectRate" label="已答总正确率" align="center"><template slot-scope="scoped">{{
  28 + scoped.row.answerCorrectRate }}%</template>
  29 + </el-table-column>
  30 + <el-table-column prop="classCorrectRate" label="班级总正确率" align="center"><template slot-scope="scoped">{{
  31 + scoped.row.classCorrectRate }}%</template></el-table-column>
  32 + <el-table-column prop="questionNum" label="题目总数" align="center"></el-table-column>
  33 + <el-table-column prop="startTime" label="上课时间" align="center"></el-table-column>
  34 + <el-table-column label="操作" align="center" width="100">
  35 + <template slot-scope="scoped">
  36 + <template v-if="scoped.row.answerNum == 0">
  37 + <el-tooltip v-if="role == 'ROLE_JIAOSHI'" effect="dark" content="设置答案" placement="top">
  38 + <el-button type="primary" circle size="mini" icon="fa fa-file-text"
  39 + @click="edit(scoped.row)"></el-button>
  40 + </el-tooltip>
  41 + <template v-else>未设置答案</template>
  42 + </template>
  43 + <el-tooltip v-else effect="dark" content="详情" placement="top">
  44 + <el-button type="primary" circle size="mini" icon="fa fa-arrow-right"
  45 + @click="linkToDetail(scoped.row, 1)"></el-button>
  46 + </el-tooltip>
  47 + <el-tooltip effect="dark" content="删除" placement="top">
  48 + <el-button type="primary" circle size="mini" icon="el-icon-delete"
  49 + @click="remove(scoped.row)"></el-button>
  50 + </el-tooltip>
  51 + </template>
  52 + </el-table-column>
  53 + </el-table>
  54 + </div>
  55 + <div class="pagination-box">
  56 + <el-pagination small="" layout="total,prev, pager, next" :hide-on-single-page="true" :total="total"
  57 + @current-change="changePage" :current-page="page" :page-size="size">
  58 + </el-pagination>
  59 + </div>
  60 + </div>
  61 + </div>
  62 + <router-view v-show="isDetail"></router-view>
  63 + </div>
  64 +</template>
  65 +
  66 +<script>
  67 +import { downloadFile } from "utils";
  68 +export default {
  69 + data() {
  70 + return {
  71 + gdClass: 0, //已归档班级数量
  72 + code: "",
  73 + role: "",
  74 + loading: false,
  75 + query: {
  76 + //搜索条件
  77 + classId: "",
  78 + subjectNames: [],
  79 + startDay: "",
  80 + endDay: "",
  81 + },
  82 + tableData: [],
  83 + multipleSelection: [],
  84 + page: 1,
  85 + size: 20,
  86 + total: 0,
  87 + };
  88 + },
  89 + computed: {
  90 + isDetail: function () {
  91 + let bol = (this.$route.name == "随堂问报表分析") ? true : false
  92 + return bol
  93 + }
  94 + },
  95 + async created() {
  96 + this.code = localStorage.getItem("csCode") || "";
  97 + const queryData = this.$route.query.params
  98 + queryData ? this.query = { ...this.query, ...JSON.parse(queryData) } : ''
  99 + this.init()
  100 + },
  101 + watch: {
  102 + "$route.query.params": function (nVal) {
  103 + let isFromAskDetail = sessionStorage.getItem("isFromAskDetail");
  104 + if (!isFromAskDetail && nVal) {
  105 + this.init()
  106 + }
  107 + }
  108 + },
  109 + methods: {
  110 + //初始化
  111 + init() {
  112 + this.role =
  113 + this.$store.getters.info.showRole ||
  114 + this.$store.getters.info.permissions[0].role;
  115 + if (this.role != "ROLE_PERSONAL") {
  116 + this._QueryGdClass()
  117 + };
  118 + this.page = 1
  119 + this.total = 0
  120 + this.tableData = []
  121 + this._QueryData()
  122 + },
  123 + //归档
  124 + toArchiving() {
  125 + this.$router.push({
  126 + path: "/askArchiving",
  127 + });
  128 + },
  129 + handleSelectionChange(val) {
  130 + this.multipleSelection = val;
  131 + },
  132 + //去详情
  133 + linkToDetail(obj, types) {
  134 + this.$router.push({
  135 + path: "/askAnalysis",
  136 + query: {
  137 + id: JSON.stringify([obj.id]),
  138 + types: types,
  139 + },
  140 + });
  141 + },
  142 + //去详情
  143 + linkToDetail2() {
  144 + let subjectArr = []
  145 + const ids = this.multipleSelection.map(item => {
  146 + subjectArr.push(item.subject)
  147 + return item.id
  148 + })
  149 + subjectArr = [...new Set(subjectArr)]
  150 + this.$router.push({
  151 + path: "/askAnalysis",
  152 + query: {
  153 + id: JSON.stringify(ids),
  154 + types: subjectArr.length == 1 ? 2 : 3,
  155 + },
  156 + });
  157 + },
  158 + //删除
  159 + remove(obj) {
  160 + const { data, status, info } = this.$request.deletePaperReport({
  161 + id: obj.id,
  162 + });
  163 + if (status === 0) {
  164 + this.$message.success(info);
  165 + this._QueryData();
  166 + } else {
  167 + this.$message.error(info);
  168 + }
  169 + },
  170 + //修改答案
  171 + async edit(item) {
  172 + this.$router.push({
  173 + path: "/examinationPaperEdit",
  174 + query: {
  175 + paperId: item.id,
  176 + title: item.title,
  177 + type: 3,
  178 + },
  179 + });
  180 + },
  181 + changePage(page) {
  182 + this.page = page;
  183 + this._QueryData();
  184 + },
  185 + async _QueryGdClass() {
  186 + const fetchClassList =
  187 + this.role == "ROLE_BANZHUREN"
  188 + ? this.$request.cTClassList
  189 + : this.$request.tClassList;
  190 + const { data, status, info } = await fetchClassList({
  191 + status: 1,
  192 + });
  193 + if (status === 0) {
  194 + this.gdClass = data?.list?.length || 0;
  195 + } else {
  196 + this.$message.error(info);
  197 + }
  198 + },
  199 + //分页查询课时报表列表
  200 + async _QueryData() {
  201 + this.loading = true;
  202 + let query = {};
  203 + for (let key in this.query) {
  204 + if (this.query[key] != "" || this.query[key].length != 0) {
  205 + query[key] = this.query[key];
  206 + }
  207 + }
  208 + const periodReportList = this.role == "ROLE_PERSONAL" ?
  209 + this.$request.pPhaseInteractiveReport :
  210 + this.$request.periodReportList;
  211 + const { data, status, info } = await periodReportList({
  212 + ...query,
  213 + page: this.page,
  214 + size: this.size,
  215 + });
  216 + this.loading = false;
  217 + if (status === 0) {
  218 + this.tableData = (data?.list && [...data?.list]) || [];
  219 + this.total = data?.count || 0;
  220 + } else {
  221 + this.$message.error(info);
  222 + }
  223 + },
  224 + //导出
  225 + async exportData() {
  226 + if (this.exportLoading == true) return;
  227 + let query = {};
  228 + for (let key in this.query) {
  229 + if (this.query[key] != "" || this.query[key].length != 0) {
  230 + query[key] = this.query[key];
  231 + }
  232 + }
  233 + this.exportLoading = true;
  234 + let exportData = this.role == "ROLE_BANZHUREN" ?
  235 + this.$request.cTExportPhaseInteractiveReport :
  236 + this.role == "ROLE_PERSONAL" ?
  237 + this.$request.pExportPhaseReport :
  238 + this.$request.exportPhaseInteractiveReport;
  239 + const data = await exportData({ ...query });
  240 + this.exportLoading = false;
  241 + if (data) {
  242 + let blob = new Blob([data], {
  243 + type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
  244 + });
  245 + downloadFile("随堂问-数据报表.xlsx", blob);
  246 + } else {
  247 + this.$message.error("下载失败");
  248 + }
  249 + },
  250 + },
  251 +};
  252 +</script>
  253 +<style>
  254 +div::-webkit-scrollbar {
  255 + width: 3px;
  256 + height: 10px;
  257 +}
  258 +
  259 +div::-webkit-scrollbar-thumb {
  260 + border-radius: 10px;
  261 + background-color: #ccc;
  262 +}
  263 +</style>
  264 +<style lang="scss" scoped>
  265 +.main {
  266 + height: 100%;
  267 +}
  268 +
  269 +.table-box {
  270 + padding: 16px;
  271 + border-radius: 5px;
  272 +
  273 + .table-cont {
  274 + min-height: 300px;
  275 + }
  276 +
  277 + :deep(.fa-arrow-right) {
  278 + padding-left: 2px;
  279 + }
  280 +
  281 + :deep(.fa-file-text) {
  282 + padding-left: 2px;
  283 + }
  284 +}
  285 +
  286 +.btn-box {
  287 + text-align: right;
  288 + padding: 0 12px 16px;
  289 +}
  290 +</style>
0 \ No newline at end of file 291 \ No newline at end of file
src/views/basic/down/index.vue
@@ -5,7 +5,19 @@ @@ -5,7 +5,19 @@
5 <span>软件下载</span> 5 <span>软件下载</span>
6 </template> 6 </template>
7 </back-box> 7 </back-box>
8 - <div class="page-content"> 8 +
  9 + <div v-if="role == 'ROLE_PERSONAL'" class="down-box" v-loading="loading">
  10 + <img class="logo" src="" alt="" />
  11 + <div class="txt">
  12 + <p class="p1">
  13 + {{ `${info.appName || ""} ${info.versionName || ""}` }}
  14 + </p>
  15 + <p class="p2">文件大小:{{ `${info.fileSize}` }}M</p>
  16 + <p class="p2">最近更新:{{ info.modifiedTime }}</p>
  17 + </div>
  18 + <el-button type="primary" @click="downCard">立即下载</el-button>
  19 + </div>
  20 + <div v-else class="page-content">
9 <div class="down-item"> 21 <div class="down-item">
10 <p class="txt"> 22 <p class="txt">
11 K12公私立学校、高等院校、教育培训机构的课堂互动教学、即时课堂测验。 23 K12公私立学校、高等院校、教育培训机构的课堂互动教学、即时课堂测验。
@@ -36,12 +48,23 @@ export default { @@ -36,12 +48,23 @@ export default {
36 role: "", 48 role: "",
37 loading: false, 49 loading: false,
38 loadingNet: false, 50 loadingNet: false,
  51 + info: {
  52 + id: "",
  53 + appName: "",
  54 + appImage: "",
  55 + versionName: "",
  56 + fileSize: "",
  57 + modifiedTime: "",
  58 + },
39 }; 59 };
40 }, 60 },
41 created() { 61 created() {
42 this.role = 62 this.role =
43 this.$store.getters.info.showRole || 63 this.$store.getters.info.showRole ||
44 this.$store.getters.info.permissions[0].role; 64 this.$store.getters.info.permissions[0].role;
  65 + if (this.role == 'ROLE_PERSONAL') {
  66 + this.latestVersion();
  67 + }
45 }, 68 },
46 methods: { 69 methods: {
47 links() { 70 links() {
@@ -49,10 +72,31 @@ export default { @@ -49,10 +72,31 @@ export default {
49 path: "/downClient", 72 path: "/downClient",
50 }); 73 });
51 }, 74 },
  75 + async latestVersion() {
  76 + const { data, status, info } = await this.$request.pLatestVersion();
  77 + if (status == 0) {
  78 + this.info = { ...data };
  79 + this.info.fileSize =
  80 + (this.info.fileSize &&
  81 + (this.info.fileSize / 1024 / 1024).toFixed(2)) ||
  82 + "--";
  83 + } else {
  84 + this.$message.error(info);
  85 + }
  86 + },
52 async downCard() { 87 async downCard() {
53 if (this.loading == true) return; 88 if (this.loading == true) return;
54 this.loading = true; 89 this.loading = true;
55 - const { data, status, info } = await this.$request.latestClickersApp(); 90 + let latestClickersApp;
  91 + let query = {}
  92 + if (this.role == 'ROLE_PERSONAL') {
  93 + latestClickersApp = this.$request.pGetAppDownloadUrl
  94 + query.versionId = this.info.id
  95 + } else {
  96 + latestClickersApp = this.$request.latestClickersApp
  97 + }
  98 +
  99 + const { data, status, info } = await latestClickersApp({ ...query });
56 this.loading = false; 100 this.loading = false;
57 if (status == 0) { 101 if (status == 0) {
58 const a = document.createElement("a"); 102 const a = document.createElement("a");
@@ -89,10 +133,12 @@ export default { @@ -89,10 +133,12 @@ export default {
89 .content-box { 133 .content-box {
90 width: 100%; 134 width: 100%;
91 } 135 }
  136 +
92 .page-content { 137 .page-content {
93 display: flex; 138 display: flex;
94 padding-top: 50px; 139 padding-top: 50px;
95 margin-left: 160px; 140 margin-left: 160px;
  141 +
96 .down-item { 142 .down-item {
97 width: 200px; 143 width: 200px;
98 padding: 50px 20px; 144 padding: 50px 20px;
@@ -104,6 +150,7 @@ export default { @@ -104,6 +150,7 @@ export default {
104 align-items: center; 150 align-items: center;
105 background: #f8f8f8; 151 background: #f8f8f8;
106 box-shadow: 2px 2px 5px #ccc; 152 box-shadow: 2px 2px 5px #ccc;
  153 +
107 .txt { 154 .txt {
108 font-size: 16px; 155 font-size: 16px;
109 color: #7f7f7f; 156 color: #7f7f7f;
src/views/basic/setUp/clazz.vue
@@ -315,6 +315,7 @@ export default { @@ -315,6 +315,7 @@ export default {
315 }); 315 });
316 this.diaUp = false; 316 this.diaUp = false;
317 this._QueryData(); 317 this._QueryData();
  318 + this._QuerySubject();
318 }, 319 },
319 setClass(obj, gradeName) { 320 setClass(obj, gradeName) {
320 this.formClass.studentCount = obj.studentCount; 321 this.formClass.studentCount = obj.studentCount;
src/views/basic/userInfo/index.vue 0 → 100644
  1 +<template>
  2 + <div>
  3 + <back-box>
  4 + <template slot="title">
  5 + <span>个人信息</span>
  6 + </template>
  7 + </back-box>
  8 + <div class="page-content">
  9 + <div class="content-box">
  10 + <i class="el-icon-edit" @click="diaSchool = true"></i>
  11 + <i class="el-icon-key" @click="diaPass = true"></i>
  12 + <ul class="school-info">
  13 + <li class="school-item">
  14 + <span class="s1">学校名称:</span>
  15 + <span class="s2">{{ Info.tenantName || "--" }}</span>
  16 + </li>
  17 + <li class="school-item">
  18 + <span class="s1">教师姓名:</span>
  19 + <span class="s2">{{ Info.contactPerson || "--" }}</span>
  20 + </li>
  21 + <li class="school-item">
  22 + <span class="s1">手机号码:</span>
  23 + <span class="s2">{{ Info.contactPhone || "--" }}</span>
  24 + </li>
  25 + </ul>
  26 + </div>
  27 + </div>
  28 + <el-dialog :close-on-click-modal="false" title="修改个人信息" :visible.sync="diaSchool" width="400">
  29 + <el-form
  30 + ref="formSchool"
  31 + class="form-box"
  32 + :model="formSchool"
  33 + :rules="rulesSchool"
  34 + label-width="160px"
  35 + >
  36 + <el-form-item label="学校名称:" prop="tenantName"
  37 + ><el-col :span="10"
  38 + ><el-input
  39 + maxlength="30"
  40 + v-model="formSchool.tenantName"
  41 + placeholder="请输入教师姓名"
  42 + ></el-input></el-col
  43 + ></el-form-item>
  44 + <el-form-item label="教师姓名:" prop="contactPerson"
  45 + ><el-col :span="10"
  46 + ><el-input
  47 + maxlength="30"
  48 + v-model="formSchool.contactPerson"
  49 + placeholder="请输入教师姓名"
  50 + ></el-input></el-col
  51 + ></el-form-item>
  52 + <el-form-item label="手机号码:" prop="contactPhone"
  53 + ><el-col :span="10"
  54 + ><el-input
  55 + v-model="formSchool.contactPhone"
  56 + type="number"
  57 + oninput="if(value.length > 11) value = value.slice(0,11)"
  58 + placeholder="请输入教师姓名手机号码"
  59 + ></el-input></el-col
  60 + ></el-form-item>
  61 + </el-form>
  62 + <div class="dialog-footer" slot="footer">
  63 + <el-button @click="editSchool">确 定</el-button>
  64 + <el-button @click="diaSchool = false">取 消</el-button>
  65 + </div>
  66 + </el-dialog>
  67 + <el-dialog :close-on-click-modal="false" title="修改密码" :visible.sync="diaPass" width="400">
  68 + <el-form
  69 + ref="formPass"
  70 + class="form-box"
  71 + :model="password"
  72 + :rules="rulesPassword"
  73 + label-width="160px"
  74 + >
  75 + <el-form-item label="旧密码:" prop="oldPassword"
  76 + ><el-col :span="10"
  77 + ><el-input
  78 + maxlength="30"
  79 + v-model="password.oldPassword"
  80 + placeholder="请输入密码"
  81 + show-password
  82 + ></el-input></el-col
  83 + ></el-form-item>
  84 + <el-form-item label="新密码:" prop="password"
  85 + ><el-col :span="10"
  86 + ><el-input
  87 + maxlength="30"
  88 + v-model="password.password"
  89 + placeholder="请输入新密码"
  90 + show-password
  91 + ></el-input></el-col
  92 + ></el-form-item>
  93 + <el-form-item label="确认密码:" prop="resetPassword"
  94 + ><el-col :span="10"
  95 + ><el-input
  96 + maxlength="30"
  97 + v-model="password.resetPassword"
  98 + placeholder="请输入新密码"
  99 + show-password
  100 + ></el-input></el-col
  101 + ></el-form-item>
  102 + </el-form>
  103 + <div class="dialog-footer" slot="footer">
  104 + <el-button @click="editPass">确 定</el-button>
  105 + <el-button @click="diaPass = false">取 消</el-button>
  106 + </div>
  107 + </el-dialog>
  108 + </div>
  109 +</template>
  110 +
  111 +<script>
  112 +import { downloadFile, encryptLoginPassword } from "@/utils";
  113 +export default {
  114 + data() {
  115 + return {
  116 + loading: false,
  117 + diaSchool: false,
  118 + diaPass: false,
  119 + Info: {
  120 + tenantName: "",
  121 + contactPerson: "",
  122 + contactPhone: "",
  123 + sections: "",
  124 + },
  125 + password: {
  126 + oldPassword: "",
  127 + password: "",
  128 + resetPassword: "",
  129 + },
  130 + rulesPassword: {
  131 + oldPassword: [
  132 + { required: true, message: "请输入旧密码", trigger: "blur" },
  133 + ],
  134 + password: [
  135 + { required: true, message: "请输入新密码", trigger: "blur" },
  136 + ],
  137 + resetPassword: [
  138 + { required: true, message: "请输入新密码", trigger: "blur" },
  139 + ],
  140 + },
  141 + tableData: [],
  142 + formSchool: {
  143 + tenantName: "",
  144 + contactPerson: "",
  145 + contactPhone: "",
  146 + },
  147 + rulesSchool: {},
  148 + };
  149 + },
  150 + created() {
  151 + this._QueryData();
  152 + },
  153 + methods: {
  154 + editSchool() {
  155 + if (this.loading) {
  156 + return;
  157 + }
  158 + this.$refs.formSchool.validate(async (valid) => {
  159 + if (valid) {
  160 + this.loading = true;
  161 + let form = { ...this.formSchool };
  162 + const { data, status, info } = await this.$request.modifyInfo({
  163 + ...form,
  164 + });
  165 + this.loading = false;
  166 + if (status === 0) {
  167 + this.$message.success("修改成功~");
  168 + this.diaSchool = false;
  169 + this._QueryData();
  170 + } else {
  171 + this.$message.error(info);
  172 + }
  173 + } else {
  174 + this.$message.error("数据有误,请检查!");
  175 + }
  176 + });
  177 + },
  178 + editPass() {
  179 + if (this.loading) {
  180 + return;
  181 + }
  182 + this.$refs.formPass.validate(async (valid) => {
  183 + if (valid) {
  184 + if (this.password.password != this.password.resetPassword) {
  185 + this.$message.warning("两次输入密码不一致请检查!");
  186 + return;
  187 + }
  188 + this.loading = true;
  189 + const { data, status, info } = await this.$request.modifyInfo({
  190 + oldPassword: encryptLoginPassword(this.password.oldPassword),
  191 + password: encryptLoginPassword(this.password.password),
  192 + });
  193 + this.loading = false;
  194 + if (status === 0) {
  195 + this.$message.success("密码修改成功~");
  196 + this.diaPass = false;
  197 + const res = await this.$request.logout();
  198 + this.$store.commit("setToken", "");
  199 + this.$store.commit("setInfo", {});
  200 + this.$store.commit("setRouters", []);
  201 + this.$store.commit("resetTabnavBox");
  202 + this.$router.push({
  203 + path: "/login",
  204 + });
  205 + } else {
  206 + this.$message.error(info);
  207 + }
  208 + } else {
  209 + this.$message.error("数据有误,请检查!");
  210 + }
  211 + });
  212 + },
  213 + async _QueryData() {
  214 + this.loading = true;
  215 + const { data, status, info } = await this.$request.getInfo();
  216 + this.loading = false;
  217 + console.log(status);
  218 + if (status === 0) {
  219 + this.Info = { ...data };
  220 + for (let key in this.formSchool) {
  221 + this.formSchool[key] = data[key] || "";
  222 + }
  223 + } else {
  224 + this.$message.error(info);
  225 + }
  226 + },
  227 + async downExcel() {
  228 + let data = await this.$request.downDevice({
  229 + id: this.id,
  230 + });
  231 + if (data && !data.code) {
  232 + let blob = new Blob([data], {
  233 + type: "application/vnd.ms-excel;charset=utf-8",
  234 + });
  235 + downloadFile(`设备信息.xlsx`, blob);
  236 + } else {
  237 + this.$message.error(data.info);
  238 + }
  239 + },
  240 + },
  241 +};
  242 +</script>
  243 +
  244 +<style lang="scss" scoped>
  245 +.page-content {
  246 + padding: 20px;
  247 + .content-box {
  248 + background: #f8f8f8;
  249 + border-radius: 16px;
  250 + position: relative;
  251 + .el-icon-edit {
  252 + position: absolute;
  253 + top: 12px;
  254 + right: 40px;
  255 + padding: 5px;
  256 + font-size: 18px;
  257 + cursor: pointer;
  258 + &:hover {
  259 + color: #36f;
  260 + }
  261 + }
  262 + .el-icon-key {
  263 + position: absolute;
  264 + top: 12px;
  265 + right: 12px;
  266 + padding: 5px;
  267 + font-size: 18px;
  268 + cursor: pointer;
  269 + &:hover {
  270 + color: #36f;
  271 + }
  272 + }
  273 + }
  274 + .school-info {
  275 + display: flex;
  276 + flex-wrap: wrap;
  277 + padding: 16px 0;
  278 + border-bottom: 0.5px solid #f2f2f2;
  279 + .school-item {
  280 + width: 50%;
  281 + line-height: 48px;
  282 + padding-left: 100px;
  283 + display: flex;
  284 + box-sizing: border-box;
  285 + .s1 {
  286 + width: 160px;
  287 + font-size: 15px;
  288 + color: #888;
  289 + }
  290 + .s2 {
  291 + flex: 1;
  292 + }
  293 + }
  294 + }
  295 +}
  296 +.form-box {
  297 + margin: 0 20px;
  298 + .subject-box {
  299 + height: 90px;
  300 + overflow: hidden;
  301 + position: relative;
  302 + &.active {
  303 + height: auto;
  304 + overflow: auto;
  305 + }
  306 + .showAll {
  307 + position: absolute;
  308 + bottom: 0;
  309 + right: 10px;
  310 + font-size: 12px;
  311 + color: #7f7f7f;
  312 + cursor: pointer;
  313 + padding: 2px;
  314 + &:hover {
  315 + color: #667ffd;
  316 + }
  317 + }
  318 + }
  319 +}
  320 +.el-icon-plus {
  321 + cursor: pointer;
  322 + &:hover {
  323 + color: #667ffd;
  324 + }
  325 +}
  326 +</style>
0 \ No newline at end of file 327 \ No newline at end of file
src/views/examinationPaper/edit.vue
@@ -377,8 +377,8 @@ export default { @@ -377,8 +377,8 @@ export default {
377 knowledgeData: function () { 377 knowledgeData: function () {
378 let jsons = [] 378 let jsons = []
379 if (this.form.sectionName && this.form.subjectName) { 379 if (this.form.sectionName && this.form.subjectName) {
380 - let sectionName = this.form.sectionName  
381 - let subjectName = this.form.subjectName 380 + let sectionName = this.form.sectionName || null
  381 + let subjectName = this.form.subjectName || null
382 if (sectionName && Object.keys(this.knowledgeList).includes(sectionName)) { 382 if (sectionName && Object.keys(this.knowledgeList).includes(sectionName)) {
383 if (Object.keys(this.knowledgeList[sectionName]).includes(subjectName)) { 383 if (Object.keys(this.knowledgeList[sectionName]).includes(subjectName)) {
384 jsons = this.knowledgeList[sectionName][subjectName] 384 jsons = this.knowledgeList[sectionName][subjectName]