Commit 3587d3773953fdbe943412410452973e320172a0

Authored by 梁保满
1 parent c354920a

归档流程调整

src/router/index.js
... ... @@ -242,7 +242,11 @@ let addrouters = [
242 242 component: AskArchiving,
243 243 parent: "ask",
244 244 hidden: true,
  245 + meta: {
  246 + keepAlive: true,
  247 + },
245 248 children: []
  249 +
246 250 }
247 251 ]
248 252 },
... ... @@ -283,6 +287,9 @@ let addrouters = [
283 287 component: TestArchiving,
284 288 parent: "test",
285 289 hidden: true,
  290 + meta: {
  291 + keepAlive: true,
  292 + },
286 293 children: []
287 294 }
288 295  
... ... @@ -787,23 +794,175 @@ const addroutersPersonal = [
787 794 },
788 795 ]
789 796 },
  797 +
  798 + // {
  799 + // path: "/examinationPaper",
  800 + // iconCls: "fa fa-file-text",
  801 + // name: "备题组卷",
  802 + // component: Layout,
  803 + // alone: true,
  804 + // children: [
  805 + // {
  806 + // path: "/examinationPaper",
  807 + // iconCls: "fa fa-file-text",
  808 + // name: "examinationPaper",
  809 + // component: ExaminationPaper,
  810 + // children: []
  811 + // },
  812 + // {
  813 + // path: "/examinationPaperAdd",
  814 + // iconCls: "",
  815 + // name: "examinationPaperAdd",
  816 + // component: ExaminationPaperAdd,
  817 + // parent: "examinationPaper",
  818 + // children: []
  819 + // },
  820 + // {
  821 + // path: "/examinationPaperAddQs",
  822 + // iconCls: "",
  823 + // name: "examinationPaperAddQs",
  824 + // component: ExaminationPaperAddQs,
  825 + // parent: "examinationPaper",
  826 + // children: []
  827 + // },
  828 + // {
  829 + // path: "/examinationPaperEdit",
  830 + // iconCls: "",
  831 + // name: "修改答题卡",
  832 + // component: ExaminationPaperEdit,
  833 + // parent: "examinationPaper",
  834 + // children: []
  835 + // },
  836 + // {
  837 + // path: "/examinationPaperRecycle",
  838 + // iconCls: "",
  839 + // name: "回收站答题卡",
  840 + // component: ExaminationPaperRecycle,
  841 + // parent: "examinationPaper",
  842 + // children: []
  843 + // },
  844 + // {
  845 + // path: "/examinationPaperArchiving",
  846 + // iconCls: "",
  847 + // name: "已归档答题卡",
  848 + // component: ExaminationPaperArchiving,
  849 + // parent: "examinationPaper",
  850 + // hidden: true,
  851 + // children: []
  852 + // },
  853 + // ]
  854 + // },
  855 + // {
  856 + // path: "/ask",
  857 + // iconCls: "fa fa-bar-chart",
  858 + // name: "随堂问报表",
  859 + // component: Layout,
  860 + // alone: true,
  861 + // children: [
  862 + // {
  863 + // path: "/ask",
  864 + // iconCls: "fa fa-bar-chart",
  865 + // name: "ask",
  866 + // name: "随堂问报表",
  867 + // component: Ask,
  868 + // meta: {
  869 + // keepAlive: false,
  870 + // },
  871 + // children: []
  872 +
  873 + // },
  874 + // {
  875 + // path: "/askList",
  876 + // iconCls: "fa fa-bar-chart", // 图标样式class
  877 + // name: "ask",
  878 + // name: "随堂问报表",
  879 + // component: AskList,
  880 + // meta: {
  881 + // keepAlive: true,
  882 + // },
  883 + // children: [
  884 + // {
  885 + // path: "/askAnalysis",
  886 + // iconCls: "",
  887 + // name: "随堂问报表分析",
  888 + // component: AskAnalysis,
  889 + // parent: "ask",
  890 + // children: []
  891 + // },
  892 + // {
  893 + // path: "/askArchiving",
  894 + // iconCls: "",
  895 + // name: "随堂问已归档报表分析",
  896 + // component: AskArchiving,
  897 + // parent: "ask",
  898 + // hidden: true,
  899 + // meta: {
  900 + // keepAlive: true,
  901 + // },
  902 + // children: []
  903 + // }
  904 + // ]
  905 + // },
  906 + // ]
  907 + // },
  908 + // {
  909 + // path: "/test",
  910 + // iconCls: "fa fa-pie-chart",
  911 + // name: "即时测报表",
  912 + // component: Layout,
  913 + // alone: true,
  914 + // children: [
  915 + // {
  916 + // path: "/test",
  917 + // iconCls: "fa fa-pie-chart",
  918 + // name: "",
  919 + // component: Test,
  920 + // meta: {
  921 + // keepAlive: true,
  922 + // },
  923 + // children: []
  924 + // },
  925 + // {
  926 + // path: "/testAnalysis",
  927 + // iconCls: "",
  928 + // name: "即时测报表分析",
  929 + // component: TestAnalysis,
  930 + // parent: "test",
  931 + // children: []
  932 + // },
  933 + // {
  934 + // path: "/testArchiving",
  935 + // iconCls: "",
  936 + // name: "即时测已归档报表分析",
  937 + // component: TestArchiving,
  938 + // parent: "test",
  939 + // hidden: true,
  940 + // meta: {
  941 + // keepAlive: true,
  942 + // },
  943 + // children: []
  944 + // }
  945 +
  946 + // ]
  947 + // },
  948 +
790 949 {
791 950 path: "/examinationPaper",
792   - iconCls: "fa fa-file-text",
  951 + iconCls: "fa fa-file-text", // 图标样式class
793 952 name: "备题组卷",
794 953 component: Layout,
795 954 alone: true,
796 955 children: [
797 956 {
798 957 path: "/examinationPaper",
799   - iconCls: "fa fa-file-text",
  958 + iconCls: "fa fa-file-text", // 图标样式class
800 959 name: "examinationPaper",
801 960 component: ExaminationPaper,
802 961 children: []
803 962 },
804 963 {
805 964 path: "/examinationPaperAdd",
806   - iconCls: "",
  965 + iconCls: "", // 图标样式class
807 966 name: "examinationPaperAdd",
808 967 component: ExaminationPaperAdd,
809 968 parent: "examinationPaper",
... ... @@ -811,7 +970,7 @@ const addroutersPersonal = [
811 970 },
812 971 {
813 972 path: "/examinationPaperAddQs",
814   - iconCls: "",
  973 + iconCls: "", // 图标样式class
815 974 name: "examinationPaperAddQs",
816 975 component: ExaminationPaperAddQs,
817 976 parent: "examinationPaper",
... ... @@ -819,7 +978,7 @@ const addroutersPersonal = [
819 978 },
820 979 {
821 980 path: "/examinationPaperEdit",
822   - iconCls: "",
  981 + iconCls: "", // 图标样式class
823 982 name: "修改答题卡",
824 983 component: ExaminationPaperEdit,
825 984 parent: "examinationPaper",
... ... @@ -827,7 +986,7 @@ const addroutersPersonal = [
827 986 },
828 987 {
829 988 path: "/examinationPaperRecycle",
830   - iconCls: "",
  989 + iconCls: "", // 图标样式class
831 990 name: "回收站答题卡",
832 991 component: ExaminationPaperRecycle,
833 992 parent: "examinationPaper",
... ... @@ -835,7 +994,7 @@ const addroutersPersonal = [
835 994 },
836 995 {
837 996 path: "/examinationPaperArchiving",
838   - iconCls: "",
  997 + iconCls: "", // 图标样式class
839 998 name: "已归档答题卡",
840 999 component: ExaminationPaperArchiving,
841 1000 parent: "examinationPaper",
... ... @@ -846,91 +1005,97 @@ const addroutersPersonal = [
846 1005 },
847 1006 {
848 1007 path: "/ask",
849   - iconCls: "fa fa-bar-chart",
  1008 + iconCls: "fa fa-bar-chart", // 图标样式class
850 1009 name: "随堂问报表",
851 1010 component: Layout,
852 1011 alone: true,
853 1012 children: [
854 1013 {
855 1014 path: "/ask",
856   - iconCls: "fa fa-bar-chart",
857   - name: "ask",
  1015 + iconCls: "fa fa-bar-chart", // 图标样式class
858 1016 name: "随堂问报表",
859 1017 component: Ask,
860   - meta: {
861   - keepAlive: false,
862   - },
863 1018 children: []
864 1019  
865 1020 },
866 1021 {
867 1022 path: "/askList",
868 1023 iconCls: "fa fa-bar-chart", // 图标样式class
869   - name: "ask",
870 1024 name: "随堂问报表",
871 1025 component: AskList,
872   - meta: {
873   - keepAlive: true,
874   - },
875 1026 children: [
876 1027 {
877 1028 path: "/askAnalysis",
878   - iconCls: "",
  1029 + iconCls: "", // 图标样式class
879 1030 name: "随堂问报表分析",
880 1031 component: AskAnalysis,
881   - parent: "ask",
  1032 + parent: "askList",
882 1033 children: []
883 1034 },
884   - {
885   - path: "/askArchiving",
886   - iconCls: "",
887   - name: "随堂问已归档报表分析",
888   - component: AskArchiving,
889   - parent: "ask",
890   - hidden: true,
891   - children: []
892   - }
893   - ]
  1035 +
  1036 + ],
894 1037 },
  1038 + {
  1039 + path: "/askArchiving",
  1040 + iconCls: "", // 图标样式class
  1041 + name: "随堂问已归档报表分析",
  1042 + component: AskArchiving,
  1043 + parent: "ask",
  1044 + hidden: true,
  1045 + meta: {
  1046 + keepAlive: true,
  1047 + },
  1048 + children: []
  1049 +
  1050 + }
895 1051 ]
896 1052 },
897 1053 {
898 1054 path: "/test",
899   - iconCls: "fa fa-pie-chart",
  1055 + iconCls: "fa fa-pie-chart", // 图标样式class
900 1056 name: "即时测报表",
901 1057 component: Layout,
902 1058 alone: true,
903 1059 children: [
904 1060 {
905 1061 path: "/test",
906   - iconCls: "fa fa-pie-chart",
  1062 + iconCls: "fa fa-pie-chart", // 图标样式class
907 1063 name: "",
908 1064 component: Test,
909   - meta: {
910   - keepAlive: true,
911   - },
912 1065 children: []
913 1066 },
914 1067 {
915   - path: "/testAnalysis",
916   - iconCls: "",
917   - name: "即时测报表分析",
918   - component: TestAnalysis,
919   - parent: "test",
920   - children: []
  1068 + path: "/testList",
  1069 + name: "",
  1070 + component: TestList,
  1071 +
  1072 + children: [
  1073 + {
  1074 + path: "/testAnalysis",
  1075 + iconCls: "", // 图标样式class
  1076 + name: "即时测报表分析",
  1077 + component: TestAnalysis,
  1078 + parent: "test",
  1079 + children: []
  1080 + },
  1081 + ]
921 1082 },
922 1083 {
923 1084 path: "/testArchiving",
924   - iconCls: "",
  1085 + iconCls: "", // 图标样式class
925 1086 name: "即时测已归档报表分析",
926 1087 component: TestArchiving,
927 1088 parent: "test",
928 1089 hidden: true,
  1090 + meta: {
  1091 + keepAlive: true,
  1092 + },
929 1093 children: []
930 1094 }
931 1095  
932 1096 ]
933 1097 },
  1098 +
934 1099 {
935 1100 path: "/portrait",
936 1101 iconCls: "fa fa-users",
... ...
src/views/basic/ask/archiving.vue
... ... @@ -88,7 +88,7 @@
88 88 </div>
89 89 </div>
90 90 <div class="table-box">
91   - <el-radio-group
  91 + <!-- <el-radio-group
92 92 v-model="tabIndex"
93 93 @change="tabChange"
94 94 style="margin-bottom: 20px"
... ... @@ -101,7 +101,7 @@
101 101 >{{ item }}</el-radio-button
102 102 >
103 103 </template>
104   - </el-radio-group>
  104 + </el-radio-group> -->
105 105 <div class="table-cont" v-loading="loading">
106 106 <div id="print-content">
107 107 <div v-show="tabIndex == 1">
... ... @@ -551,8 +551,14 @@ export default {
551 551 this.$router.push({
552 552 path: "/askAnalysis",
553 553 query: {
554   - id: obj.id,
555   - status: 1,
  554 + id: JSON.stringify([obj.id]),
  555 + types: 1,
  556 + subjectNames: obj.subjectName,
  557 + params: JSON.stringify({
  558 + ...this.query,
  559 + subjectNames: [this.query.subjectNames],
  560 + }),
  561 + className: this.$route.query.className,
556 562 },
557 563 });
558 564 },
... ... @@ -769,6 +775,8 @@ export default {
769 775 if (this.query[key] != "") {
770 776 if (key == "subjectNames" && this.role != "ROLE_BANZHUREN") {
771 777 query["subjectName"] = this.query[key];
  778 + } else if (key == "classId") {
  779 + query.classIds = [query.classId];
772 780 } else {
773 781 query[key] = this.query[key];
774 782 }
... ... @@ -790,6 +798,7 @@ export default {
790 798 return;
791 799 }
792 800 }
  801 +
793 802 const phaseAnswerReport =
794 803 this.role == "ROLE_BANZHUREN"
795 804 ? this.$request.cTPhaseAnswerReport
... ... @@ -846,6 +855,8 @@ export default {
846 855 if (this.query[key] != "") {
847 856 if (key == "subjectNames" && this.role != "ROLE_BANZHUREN") {
848 857 query["subjectName"] = this.query[key];
  858 + } else if (key == "classId") {
  859 + query.classIds = [query.classId];
849 860 } else {
850 861 query[key] = this.query[key];
851 862 }
... ...
src/views/basic/setUp/student.vue
... ... @@ -45,7 +45,7 @@
45 45 @change="changeGrade(query.grade)"
46 46 placeholder="选择类型"
47 47 >
48   - <el-option label="全部" value=""></el-option>
  48 + <el-option label="全部" value="" disabled></el-option>
49 49 <el-option label="行政班" :value="0"></el-option>
50 50 <el-option label="教学班" :value="1"></el-option>
51 51 </el-select>
... ... @@ -164,13 +164,18 @@
164 164 <p class="name">
165 165 {{ item.studentName }}
166 166 </p>
167   - <p class="p2" v-if="!query.classId">
  167 + <div class="p2">
168 168 <template v-if="item.classList && item.classList.length">
169   - <template v-for="(clazz, index) in item.classList">
170   - <span v-if="index == 0">
  169 + <p v-for="(clazz, index) in item.classList">
  170 + <span
  171 + v-if="
  172 + query.classType == '' ||
  173 + query.classType == clazz.classType
  174 + "
  175 + >
171 176 {{ clazz.gradeName }}﹒{{ clazz.className }}</span
172 177 >
173   - </template></template
  178 + </p></template
174 179 >
175 180 <template v-else>
176 181 {{
... ... @@ -181,7 +186,7 @@
181 186 : ""
182 187 }}
183 188 </template>
184   - </p>
  189 + </div>
185 190 <p class="p1">答题器:{{ item.clickerSn || "--" }}</p>
186 191 <p class="p1">长学号:{{ item.studentCode }}</p>
187 192 <p class="p1">短学号:{{ item.shortNumber || "--" }}</p>
... ... @@ -218,7 +223,26 @@
218 223 </el-col>
219 224 </el-form-item>
220 225 <el-form-item label="当前班级:">
221   - <span>{{ formStuCla.className }}</span>
  226 + <el-select
  227 + v-if="query.classType == ''"
  228 + class="sel"
  229 + v-model="formStuCla.oldClassId"
  230 + @change="changeClazz()"
  231 + placeholder="选择当前班级"
  232 + >
  233 + <el-option
  234 + v-for="(item, index) in formStuCla.classList"
  235 + :label="item.className"
  236 + :value="item.id"
  237 + ></el-option>
  238 + </el-select>
  239 + <template v-else>
  240 + <template v-for="(item, index) in formStuCla.classList">
  241 + <span v-if="query.classType == item.classType"
  242 + >{{ index != 0 ? "," : "" }}{{ item.className }}</span
  243 + >
  244 + </template>
  245 + </template>
222 246 </el-form-item>
223 247 <el-form-item label="调到班级:" prop="classId">
224 248 <el-col :span="10">
... ... @@ -231,7 +255,9 @@
231 255 <el-option
232 256 v-for="item in classList"
233 257 :key="item.id"
234   - :label="item.className"
  258 + :label="`${item.className}${
  259 + item.subjectName ? '-' + item.subjectName : ''
  260 + }`"
235 261 :value="item.id"
236 262 >
237 263 </el-option>
... ... @@ -268,7 +294,12 @@
268 294 <span>{{ formClassTrack.studentName }}</span>
269 295 </el-form-item>
270 296 <el-form-item label="当前班级:">
271   - <span>{{ formClassTrack.className }}</span>
  297 + <template v-for="(item, index) in formClassTrack.className">
  298 + <span
  299 + v-if="query.classType == '' || query.classType == item.classType"
  300 + >{{ index != 0 ? "," : "" }}{{ item.className }}</span
  301 + >
  302 + </template>
272 303 </el-form-item>
273 304 <el-form-item label="历史班级:">
274 305 <p v-for="item in formClassTrack.classList">
... ... @@ -379,7 +410,7 @@ export default {
379 410 diaChangeClassTrack: false,
380 411 formClassTrack: {
381 412 studentName: "",
382   - className: "",
  413 + className: [],
383 414 classList: [],
384 415 },
385 416 clazzDetail: { stationSn: "", pairingCode: "", frequency: "" },
... ... @@ -413,6 +444,7 @@ export default {
413 444 oldClassId: "",
414 445 className: "",
415 446 classId: "",
  447 + classList: "",
416 448 studentCode: "",
417 449 },
418 450 rulesStuCla: {
... ... @@ -491,7 +523,7 @@ export default {
491 523 });
492 524 //导入成功
493 525 this.diaUp = false;
494   - await this._QueryClazz(this.query.grade);
  526 + await this._QueryClazz(this.query.grade, this.query.classType);
495 527 this._QueryData();
496 528 },
497 529 //添加学生
... ... @@ -523,7 +555,7 @@ export default {
523 555 if (status === 0) {
524 556 this.$message.success(info);
525 557 this.diaStu = false;
526   - await this._QueryClazz(this.query.grade);
  558 + await this._QueryClazz(this.query.grade, this.query.classType);
527 559 this._QueryData();
528 560 } else {
529 561 this.$message.error(info);
... ... @@ -542,16 +574,17 @@ export default {
542 574 //学生调班弹窗
543 575 openChangeClazz(obj) {
544 576 console.log(obj);
545   - if (this.query.grade == 80 || !this.query.grade) {
546   - this._QueryClazz(obj.grade);
547   - }
548 577 this.formStuCla.classId = "";
549 578 this.formStuCla.studentId = obj.id;
  579 + this.formStuCla.classList = obj.classList || [];
550 580 this.formStuCla.className = obj.classList && obj.classList[0]?.className;
551 581 this.formStuCla.studentName = obj.studentName;
552 582 this.formStuCla.studentCode = obj.studentCode;
553 583 this.formStuCla.oldClassId = obj.classList && obj.classList[0]?.id;
554 584 this.diaChangeClass = true;
  585 + if (this.query.grade == 80 || !this.query.grade) {
  586 + this.changeClazz();
  587 + }
555 588 },
556 589 //学生调班
557 590 changeStu: _.throttle(
... ... @@ -573,7 +606,7 @@ export default {
573 606 if (status == 0) {
574 607 this.diaChangeClass = false;
575 608 this.$message.success(info);
576   - await this._QueryClazz(this.query.grade);
  609 + await this._QueryClazz(this.query.grade, this.query.classType);
577 610 this._QueryData();
578 611 } else {
579 612 this.$message.error(info);
... ... @@ -595,8 +628,7 @@ export default {
595 628 });
596 629 this.loadingClassLogs = false;
597 630 if (status == 0) {
598   - this.formClassTrack.className =
599   - (obj.classList && obj.classList[0]?.className) || "";
  631 + this.formClassTrack.className = obj.classList || {};
600 632 this.formClassTrack.studentName = obj.studentName;
601 633 this.formClassTrack.classList = (data.list && [...data.list]) || [];
602 634 } else {
... ... @@ -605,7 +637,7 @@ export default {
605 637 },
606 638 async removeStu(obj, index, $event) {
607 639 let query = {};
608   - if (obj.classList && obj.classList.length) {
  640 + if (obj.classList && obj.classList.length == 1) {
609 641 query.classId = obj.classList[0].id;
610 642 }
611 643 const { data, status, info } = await this.$request.delStudent({
... ... @@ -615,7 +647,7 @@ export default {
615 647 });
616 648 if (status === 0) {
617 649 this.$message.success("删除成功");
618   - await this._QueryClazz(this.query.grade);
  650 + await this._QueryClazz(this.query.grade, this.query.classType);
619 651 // this._QueryData();
620 652 this.studentList.splice(index, 1);
621 653 } else {
... ... @@ -731,11 +763,25 @@ export default {
731 763 this.$message.error(info);
732 764 }
733 765 },
734   - async _QueryClazz(value) {
  766 + changeClazz() {
  767 + let grade = "";
  768 + let classType = "";
  769 + this.formStuCla.classList.map((item) => {
  770 + if (this.formStuCla.oldClassId == item.id) {
  771 + console.log(item);
  772 + classType = item.classType;
  773 + grade = item.grade;
  774 + }
  775 + });
  776 + this._QueryClazz(grade, classType);
  777 + },
  778 + async _QueryClazz(value, classType) {
735 779 this.classList = [];
  780 + let query = {};
  781 + value !== "" ? (query.grade = value) : "";
  782 + classType !== "" ? (query.type = classType) : "";
736 783 const { data, status, info } = await this.$request.schoolClassList({
737   - grade: value,
738   - type: this.query.classType,
  784 + ...query,
739 785 });
740 786 if (status === 0) {
741 787 this.classList = (data.list && [...data?.list]) || [];
... ...
src/views/basic/test/archiving.vue
... ... @@ -88,7 +88,7 @@
88 88 </div>
89 89 </div>
90 90 <div class="table-box">
91   - <el-radio-group
  91 + <!-- <el-radio-group
92 92 v-model="tabIndex"
93 93 @change="changeTab"
94 94 style="margin-bottom: 20px"
... ... @@ -101,7 +101,7 @@
101 101 >{{ item }}</el-radio-button
102 102 >
103 103 </template>
104   - </el-radio-group>
  104 + </el-radio-group> -->
105 105 <div v-show="tabIndex == 1" v-loading="loading">
106 106 <el-table :data="tableData" border style="width: 100%">
107 107 <el-table-column
... ... @@ -460,23 +460,6 @@ export default {
460 460 this.query.endDay = new Date();
461 461 }
462 462 },
463   - activated() {
464   - const that = this;
465   - BusEvent.$on("keepAlive", async function () {
466   - that.query.subjectNames = that.role == "ROLE_BANZHUREN" ? [] : "";
467   - await that._QueryClassList();
468   - if (!that.query.classId) {
469   - return;
470   - }
471   - await that._QuerySubjectList();
472   - await that.setDate(1);
473   - let startDay = that.query?.startDay;
474   - if (!startDay) {
475   - that.query.startDay = new Date();
476   - that.query.endDay = new Date();
477   - }
478   - });
479   - },
480 463 methods: {
481 464 print() {
482 465 tablePrint("print-content", "即时测-" + this.tabList[this.tabIndex - 1]);
... ... @@ -502,6 +485,14 @@ export default {
502 485 title: obj.title,
503 486 score: obj.examPaperScore,
504 487 status: 1,
  488 + type: 1, //试卷类型
  489 + subjectName: obj.subjectName,
  490 + classIds: [obj.classId],
  491 + params: JSON.stringify({
  492 + ...this.query,
  493 + subjectNames: [this.query.subjectNames],
  494 + }),
  495 + examType: obj.examPaperId == 0 ? 1 : 2,
505 496 },
506 497 });
507 498 },
... ... @@ -704,6 +695,8 @@ export default {
704 695 if (this.query[key] != "") {
705 696 if (key == "subjectNames" && this.role != "ROLE_BANZHUREN") {
706 697 query["subjectName"] = this.query[key];
  698 + } else if (key == "classId") {
  699 + query.classIds = [query.classId];
707 700 } else {
708 701 query[key] = this.query[key];
709 702 }
... ...
src/views/basic/test/components/test.vue
... ... @@ -33,7 +33,7 @@
33 33 >
34 34 </div>
35 35 <el-button
36   - v-if="!status"
  36 + v-if="!status && role != 'ROLE_BANZHUREN'"
37 37 class="setMinScore"
38 38 @click="diaMinScore = true"
39 39 round
... ...