Commit 3617eaade88054a87896809f88b51714b6525fb2

Authored by 梁保满
1 parent cffc1a98

长水账号设置

src/router/index.js
... ... @@ -14,6 +14,10 @@ const ExaminationPaperEdit = () => import("@/views/examinationPaper/edit")
14 14 const ExaminationPaperRecycle = () => import("@/views/examinationPaper/recycle")
15 15 const Portrait = () => import("@/views/portrait/index")
16 16 const PortraitDetail = () => import("@/views/portrait/detail")
  17 +const CSExaminationPaper = () => import("@/views/examinationPaper/index")
  18 +const CSExaminationPaperAdd = () => import("@/views/standard/examinationPaper/add")
  19 +const CSExaminationPaperEdit = () => import("@/views/standard/examinationPaper/edit")
  20 +const CSExaminationPaperRecycle = () => import("@/views/standard/examinationPaper/recycle")
17 21  
18 22  
19 23 const Ask = () => import("@/views/standard/ask/index")
... ... @@ -111,7 +115,7 @@ let defaultRouter = [
111 115 }
112 116 ]
113 117  
114   -let addrouters = [ //测试用,后续后端获取
  118 +let addrouters = [
115 119 {
116 120 path: "/examinationPaper",
117 121 iconCls: "fa fa-file-text", // 图标样式class
... ... @@ -397,6 +401,265 @@ let addrouters = [ //测试用,后续后端获取
397 401 ]
398 402 },
399 403 ]
  404 +let csAddrouters = [
  405 + {
  406 + path: "/examinationPaper",
  407 + iconCls: "fa fa-file-text", // 图标样式class
  408 + name: "备题组卷",
  409 + component: Layout,
  410 + alone: true,
  411 + children: [
  412 + {
  413 + path: "/examinationPaper",
  414 + iconCls: "fa fa-file-text", // 图标样式class
  415 + name: "examinationPaper",
  416 + component: CSExaminationPaper,
  417 + children: []
  418 + },
  419 + {
  420 + path: "/examinationPaperAdd",
  421 + iconCls: "", // 图标样式class
  422 + name: "examinationPaperAdd",
  423 + component: CSExaminationPaperAdd,
  424 + parent: "examinationPaper",
  425 + children: []
  426 + },
  427 + {
  428 + path: "/examinationPaperEdit",
  429 + iconCls: "", // 图标样式class
  430 + name: "修改答题卡",
  431 + component: CSExaminationPaperEdit,
  432 + parent: "examinationPaper",
  433 + children: []
  434 + },
  435 + {
  436 + path: "/examinationPaperRecycle",
  437 + iconCls: "", // 图标样式class
  438 + name: "已归档答题卡",
  439 + component: CSExaminationPaperRecycle,
  440 + parent: "examinationPaper",
  441 + children: []
  442 + },
  443 + ]
  444 + },
  445 + {
  446 + path: "/ask",
  447 + iconCls: "fa fa-bar-chart", // 图标样式class
  448 + name: "随堂问报表",
  449 + component: Layout,
  450 + alone: true,
  451 + children: [
  452 + {
  453 + path: "/ask",
  454 + iconCls: "fa fa-bar-chart", // 图标样式class
  455 + name: "ask",
  456 + name: "随堂问报表",
  457 + component: Ask,
  458 + meta: {
  459 + keepAlive: true,
  460 + },
  461 + children: []
  462 +
  463 + },
  464 + {
  465 + path: "/askAnalysis",
  466 + iconCls: "", // 图标样式class
  467 + name: "随堂问报表分析",
  468 + component: AskAnalysis,
  469 + parent: "ask",
  470 + children: []
  471 + }
  472 + ]
  473 + },
  474 + {
  475 + path: "/test",
  476 + iconCls: "fa fa-pie-chart", // 图标样式class
  477 + name: "即时测报表",
  478 + component: Layout,
  479 + alone: true,
  480 + children: [
  481 + {
  482 + path: "/test",
  483 + iconCls: "fa fa-pie-chart", // 图标样式class
  484 + name: "",
  485 + component: Test,
  486 + meta: {
  487 + keepAlive: true,
  488 + },
  489 + children: []
  490 + },
  491 + {
  492 + path: "/testAnalysis",
  493 + iconCls: "", // 图标样式class
  494 + name: "即时测报表分析",
  495 + component: TestAnalysis,
  496 + parent: "test",
  497 + children: []
  498 + }
  499 +
  500 + ]
  501 + },
  502 + {
  503 + path: "/setUpConglomerate",
  504 + iconCls: "fa fa-building", // 图标样式class
  505 + name: "学校管理",
  506 + component: Layout,
  507 + alone: true,
  508 + children: [
  509 + {
  510 + path: "/setUpConglomerate",
  511 + iconCls: "fa fa-building",
  512 + name: '集团管理',
  513 + component: SetUpConglomerate,
  514 + children: []
  515 + },
  516 + ]
  517 + },
  518 + {
  519 + path: "/setUpAccount",
  520 + iconCls: "fa fa-id-card-o", // 图标样式class
  521 + name: "账号管理",
  522 + component: Layout,
  523 + alone: true,
  524 + children: [
  525 + {
  526 + path: "/setUpAccount",
  527 + iconCls: "fa fa-id-card-o",
  528 + name: '',
  529 + component: SetUpAccount,
  530 + children: []
  531 + },
  532 + ]
  533 + },
  534 + {
  535 + path: "/",
  536 + iconCls: "fa fa-cog",
  537 + name: '学校管理',
  538 + component: Layout,
  539 + children: [
  540 + {
  541 + path: "/setUpSchool",
  542 + iconCls: "fa fa-calculator",
  543 + name: '学校设置',
  544 + component: SetUpSchool,
  545 + children: []
  546 + },
  547 + {
  548 + path: "/setUpTeacher",
  549 + iconCls: "fa fa-male",
  550 + name: '教师管理',
  551 + component: SetUpTeacher,
  552 + children: []
  553 + },
  554 + {
  555 + path: "/setUpStudent",
  556 + iconCls: "fa fa-mortar-board",
  557 + name: '学生管理',
  558 + component: SetUpStudent,
  559 + children: []
  560 + },
  561 + ]
  562 + },
  563 + {
  564 + path: "/card",
  565 + iconCls: "fa fa-id-card", // 图标样式class
  566 + name: "发卡记录",
  567 + component: Layout,
  568 + alone: true,
  569 + children: [
  570 + {
  571 + path: "/card",
  572 + iconCls: "fa fa-id-card", // 图标样式class
  573 + name: "",
  574 + component: Card,
  575 + children: []
  576 + }
  577 + ]
  578 + },
  579 + {
  580 + path: "/device",
  581 + iconCls: "fa fa-dashboard", // 图标样式class
  582 + name: "设备状态",
  583 + component: Layout,
  584 + alone: true,
  585 + children: [
  586 + {
  587 + path: "/device",
  588 + iconCls: "fa fa-dashboard", // 图标样式class
  589 + name: "",
  590 + component: Device,
  591 + meta: {
  592 + keepAlive: true,
  593 + },
  594 + children: []
  595 + },
  596 + {
  597 + path: "/deviceLog",
  598 + iconCls: "fa fa-list-alt", // 图标样式class
  599 + name: "",
  600 + component: DeviceLog,
  601 + parent: "device",
  602 + children: []
  603 + }
  604 + ]
  605 + },
  606 + {
  607 + path: "/analysis",
  608 + iconCls: "fa fa-area-chart", // 图标样式class
  609 + name: "使用分析",
  610 + component: Layout,
  611 + alone: true,
  612 + children: [
  613 + {
  614 + path: "/analysis",
  615 + iconCls: "fa fa-area-chart", // 图标样式class
  616 + name: "",
  617 + component: Analysis,
  618 + children: []
  619 + }
  620 + ]
  621 + },
  622 + {
  623 + path: "/down",
  624 + iconCls: "fa fa-download", // 图标样式class
  625 + name: "软件下载",
  626 + component: Layout,
  627 + alone: true,
  628 + children: [
  629 + {
  630 + path: "/down",
  631 + iconCls: "fa fa-download", // 图标样式class
  632 + name: "发卡软件",
  633 + component: Down,
  634 + children: []
  635 + },
  636 + {
  637 + path: "/downClient",
  638 + iconCls: "", // 图标样式class
  639 + name: "授课端软件",
  640 + component: DownClient,
  641 + parent: "down",
  642 + children: []
  643 + }
  644 + ]
  645 + },
  646 + {
  647 + path: "/dataSync",
  648 + iconCls: "fa fa-random", // 图标样式class
  649 + name: "数据同步",
  650 + component: Layout,
  651 + alone: true,
  652 + children: [
  653 + {
  654 + path: "/dataSync",
  655 + iconCls: "fa fa-random", // 图标样式class
  656 + name: "",
  657 + component: DataSync,
  658 + children: []
  659 + }
  660 + ]
  661 + },
  662 +]
400 663  
401 664 const addroutersPersonal = [
402 665 {
... ... @@ -638,4 +901,4 @@ const addRoutersAdmin = [
638 901 export default new Router({
639 902 routes: defaultRouter
640 903 })
641   -export { defaultRouter, addrouters,addroutersPersonal,addRoutersAdmin }
  904 +export { defaultRouter, addrouters,addroutersPersonal,addRoutersAdmin ,csAddrouters}
... ...
src/store/index.js
... ... @@ -8,7 +8,7 @@ import { Message } from "element-ui";
8 8  
9 9 import request from "@/api/index";
10 10 import router from "@/router/index";
11   -import { addrouters,addRoutersAdmin ,addroutersPersonal} from "@/router/index";
  11 +import { addrouters, addRoutersAdmin, addroutersPersonal, csAddrouters } from "@/router/index";
12 12 Vue.use(Vuex);
13 13  
14 14 const store = new Vuex.Store({
... ... @@ -21,7 +21,7 @@ const store = new Vuex.Store({
21 21 routers: [], //左侧菜单
22 22 addRouters:
23 23 localStorage.getItem("addRouters") &&
24   - localStorage.getItem("addRouters") != "undefined"
  24 + localStorage.getItem("addRouters") != "undefined"
25 25 ? JSON.parse(localStorage.getItem("addRouters"))
26 26 : [], //动态路由
27 27 tokenSources: new Map(), //正在请求接口(切换取消请求)
... ... @@ -40,12 +40,17 @@ const store = new Vuex.Store({
40 40 },
41 41 setRouters: (state, routers) => {
42 42 let addrouterList = []
43   - if(state.info.showRole == 'ROLE_PERSONAL'){
  43 + if (state.info.showRole == 'ROLE_PERSONAL') {
44 44 addrouterList = [...addroutersPersonal]
45   - }else if(state.info.showRole == 'ROLE_PINGTAI'){
  45 + } else if (state.info.showRole == 'ROLE_PINGTAI') {
46 46 addrouterList = [...addRoutersAdmin]
47   - }else{
48   - addrouterList = [...addrouters]
  47 + } else {
  48 + if (state.csCode) {
  49 + addrouterList = [...csAddrouters]
  50 + } else {
  51 + addrouterList = [...addrouters]
  52 + }
  53 +
49 54 }
50 55 let aRouters = addrouterList.filter((item) => {
51 56 let path = item.children[0]?.path.replace("/", "");
... ... @@ -115,11 +120,11 @@ const store = new Vuex.Store({
115 120 });
116 121 }
117 122 })
118   - .catch(() => {});
  123 + .catch(() => { });
119 124 },
120 125 CSLogin({ state, commit }, code) {
121 126 request
122   - .ssoLogin({ code:code})
  127 + .ssoLogin({ code: code })
123 128 .then((res) => {
124 129 let response = res;
125 130 if (response.status == 0) {
... ... @@ -142,8 +147,8 @@ const store = new Vuex.Store({
142 147 hidden: true,
143 148 children: [],
144 149 });
145   - router.push({ path: "/" });
146   -
  150 + router.push({ path: "/" });
  151 +
147 152 } else {
148 153 Message({
149 154 message: "该账号暂无权限,请联系管理员~",
... ... @@ -159,7 +164,7 @@ const store = new Vuex.Store({
159 164 });
160 165 }
161 166 })
162   - .catch(() => {});
  167 + .catch(() => { });
163 168 },
164 169 permissions({ state, commit }, role) {
165 170 commit("setToken", "isLogin");
... ...
src/utils/index.js
... ... @@ -778,6 +778,8 @@ export function tablePrint(id) {
778 778 .hui-s.s1{width: 87.5px;}
779 779 .hui-s.s2{ width: 97.5px;}
780 780 .hui-s.s3{width: 108px;}
  781 + .info { display: flex;flex-wrap: wrap;border-left: 1px solid #e2e2e2;border-top: 1px solid #e2e2e2;margin-bottom: 12px;}
  782 + .info-item {width: 25%;height: 50px;box-sizing: border-box;flex-shrink: 0;background: #f8f8f8;border-right: 1px solid #e2e2e2;border-bottom: 1px solid #e2e2e2;line-height: 50px;text-align: center;}
781 783 </style>`;
782 784 let aDom = divs.cloneNode(true);
783 785 let aTbody = aDom
... ...
src/views/examinationPaper/add.vue
... ... @@ -536,8 +536,8 @@
536 536 <el-form-item
537 537 label="设置答案:"
538 538 v-show="
539   - questionForm.questionType != 5 ||
540   - questionForm.questionType == 6
  539 + questionForm.questionType != 5 &&
  540 + questionForm.questionType != 6
541 541 "
542 542 >
543 543 <div class="qs-options">
... ... @@ -1094,7 +1094,7 @@ export default {
1094 1094 this.stem.type = type;
1095 1095 this.stem.index = index;
1096 1096 this.stem.indexs = indexs;
1097   - this.stem.knowledge = obj.knowledge?.split(",") || [];
  1097 + this.stem.knowledge = obj.knowledge?.split("") || [];
1098 1098 this.stem.difficultyFactor = obj.difficultyFactor || "";
1099 1099 this.dialogTag = true;
1100 1100 },
... ...
src/views/examinationPaper/edit.vue
... ... @@ -582,7 +582,7 @@ export default {
582 582 this.stem.type = type;
583 583 this.stem.index = index;
584 584 this.stem.indexs = indexs;
585   - this.stem.knowledge = obj.knowledge?.split(",") || [];
  585 + this.stem.knowledge = obj.knowledge?.split("") || [];
586 586 this.stem.difficultyFactor = obj.difficultyFactor || "";
587 587 this.dialogTag = true;
588 588 },
... ...
src/views/personal/ask/analysis.vue
... ... @@ -54,6 +54,28 @@
54 54 </li>
55 55 </ul>
56 56 <div id="print-content">
  57 + <ul class="info" v-if="type == 1">
  58 + <li class="info-item">科目:{{ detail.subjectName }}</li>
  59 + <li class="info-item">课时:{{ detail.title }}</li>
  60 + <li class="info-item">上课时间:{{ detail.startTime }}</li>
  61 + <li class="info-item">下课时间:{{ detail.endTime }}</li>
  62 + <li class="info-item">签到人数:{{ detail.answeredNum }}</li>
  63 + <li class="info-item">题目总数:{{ detail.questionNum }}</li>
  64 + <li class="info-item">答题总数:{{ detail.totalAnswersNum }}</li>
  65 + <li class="info-item">课时时长:{{ detail.duration }}分钟</li>
  66 + <li class="info-item">
  67 + 总参与度::{{ detail.participationRate }}%
  68 + </li>
  69 + <li class="info-item">
  70 + 班级总正确率:{{ detail.classCorrectRate }}%
  71 + </li>
  72 + <li class="info-item">
  73 + 已答总正确率:{{ detail.answerCorrectRate }}%
  74 + </li>
  75 + <li class="info-item">
  76 + 反馈时长:{{ setDuration(detail.consumingDuration) }}
  77 + </li>
  78 + </ul>
57 79 <el-table
58 80 v-if="type == 1"
59 81 :data="tableData"
... ... @@ -332,7 +354,7 @@
332 354 </template>
333 355  
334 356 <script>
335   -import { downloadFile,tablePrint } from "@/utils";
  357 +import { downloadFile, tablePrint } from "@/utils";
336 358 export default {
337 359 data() {
338 360 return {
... ... @@ -406,7 +428,7 @@ export default {
406 428 return tit;
407 429 },
408 430 async edit() {
409   - this.$router.push({
  431 + this.$router.push({
410 432 path: "/examinationPaperEdit",
411 433 query: {
412 434 paperId: this.id,
... ...
src/views/personal/setUp/student.vue
... ... @@ -355,6 +355,7 @@ export default {
355 355 });
356 356 //导入成功
357 357 this.diaUp = false;
  358 + this._QueryClass()
358 359 this._QueryData();
359 360 },
360 361 async _QuerySubject() {
... ...
src/views/personal/test/index.vue
... ... @@ -91,7 +91,6 @@
91 91 <el-table-column
92 92 prop="title"
93 93 label="试卷名称"
94   - fixed
95 94 align="center"
96 95 ></el-table-column>
97 96 <el-table-column
... ... @@ -515,8 +514,8 @@ export default {
515 514 path: "/portraitDetail",
516 515 query: {
517 516 id: obj.studentId,
518   - classId: obj.classId,
519   - subjectNames: subjectNames.join(","),
  517 + classId: this.query.classId,
  518 + subjectNames: subjectNames.join(""),
520 519 studentName:obj.studentName,
521 520 studentCode:obj.studentCode,
522 521 },
... ...
src/views/portrait/detail.vue
... ... @@ -22,12 +22,11 @@
22 22 </el-option>
23 23 </el-select>
24 24 <el-select
  25 + v-else
25 26 class="sel"
26   - multiple
27 27 v-model="query.subjectNames"
28 28 placeholder="选择科目"
29   - collapse-tags
30   - @change="changeSub"
  29 + multiple
31 30 >
32 31 <el-option
33 32 v-for="item in subjectList"
... ... @@ -232,7 +231,7 @@ export default {
232 231 this.type =
233 232 this.query.subjectNames.length > 1
234 233 ? 1
235   - : this.query.subjectNames[0] == "全部" && this.subjectList.length != 2
  234 + : this.query.subjectNames[0] == "全部" && this.subjectList.length > 2
236 235 ? 1
237 236 : 2;
238 237 },
... ... @@ -336,10 +335,11 @@ export default {
336 335 this.query.subjectNames.length > 1
337 336 ? 1
338 337 : this.query.subjectNames[0] == "全部" &&
339   - this.subjectList.length != 2
  338 + this.subjectList.length > 2
340 339 ? 1
341 340 : 2;
342 341 } else {
  342 + this.type = 2;
343 343 if (!this.subjectNames) {
344 344 this.query.subjectNames = this.subjectList[0]?.value;
345 345 } else {
... ...
src/views/portrait/index.vue
... ... @@ -288,7 +288,7 @@ export default {
288 288 margin-bottom: 0;
289 289 }
290 290 .tx {
291   - width: 80px;
  291 + width: 100px;
292 292 height: 80px;
293 293 background: #667ffd;
294 294 border-radius: 8px;
... ...
src/views/standard/ask/analysis.vue
... ... @@ -33,27 +33,29 @@
33 33 >
34 34 </div>
35 35 <div v-loading="loading">
36   - <ul class="info" v-if="type == 1">
37   - <li class="info-item">科目:{{ detail.subjectName }}</li>
38   - <li class="info-item">课时:{{ detail.title }}</li>
39   - <li class="info-item">上课时间:{{ detail.startTime }}</li>
40   - <li class="info-item">下课时间:{{ detail.endTime }}</li>
41   - <li class="info-item">签到人数:{{ detail.answeredNum }}</li>
42   - <li class="info-item">题目总数:{{ detail.questionNum }}</li>
43   - <li class="info-item">答题总数:{{ detail.totalAnswersNum }}</li>
44   - <li class="info-item">课时时长:{{ detail.duration }}分钟</li>
45   - <li class="info-item">总参与度::{{ detail.participationRate }}%</li>
46   - <li class="info-item">
47   - 班级总正确率:{{ detail.classCorrectRate }}%
48   - </li>
49   - <li class="info-item">
50   - 已答总正确率:{{ detail.answerCorrectRate }}%
51   - </li>
52   - <li class="info-item">
53   - 反馈时长:{{ setDuration(detail.consumingDuration) }}
54   - </li>
55   - </ul>
56 36 <div id="print-content">
  37 + <ul class="info" v-if="type == 1">
  38 + <li class="info-item">科目:{{ detail.subjectName }}</li>
  39 + <li class="info-item">课时:{{ detail.title }}</li>
  40 + <li class="info-item">上课时间:{{ detail.startTime }}</li>
  41 + <li class="info-item">下课时间:{{ detail.endTime }}</li>
  42 + <li class="info-item">签到人数:{{ detail.answeredNum }}</li>
  43 + <li class="info-item">题目总数:{{ detail.questionNum }}</li>
  44 + <li class="info-item">答题总数:{{ detail.totalAnswersNum }}</li>
  45 + <li class="info-item">课时时长:{{ detail.duration }}分钟</li>
  46 + <li class="info-item">
  47 + 总参与度::{{ detail.participationRate }}%
  48 + </li>
  49 + <li class="info-item">
  50 + 班级总正确率:{{ detail.classCorrectRate }}%
  51 + </li>
  52 + <li class="info-item">
  53 + 已答总正确率:{{ detail.answerCorrectRate }}%
  54 + </li>
  55 + <li class="info-item">
  56 + 反馈时长:{{ setDuration(detail.consumingDuration) }}
  57 + </li>
  58 + </ul>
57 59 <el-table
58 60 v-if="type == 1"
59 61 :data="tableData"
... ... @@ -315,6 +317,7 @@
315 317 >导出报表</el-button
316 318 >
317 319 <el-button
  320 + v-if="!this.$store.getters.code"
318 321 @click="print"
319 322 type="primary"
320 323 plain
... ... @@ -338,7 +341,7 @@
338 341 </template>
339 342  
340 343 <script>
341   -import { downloadFile,tablePrint } from "@/utils";
  344 +import { downloadFile, tablePrint } from "@/utils";
342 345 export default {
343 346 data() {
344 347 return {
... ...
src/views/standard/ask/index.vue
... ... @@ -464,6 +464,7 @@
464 464 >导出报表</el-button
465 465 >
466 466 <el-button
  467 + v-if="!this.$store.getters.code"
467 468 @click="print"
468 469 type="primary"
469 470 plain
... ...
src/views/standard/examinationPaper/add.vue
... ... @@ -503,7 +503,10 @@
503 503 </el-form-item>
504 504 <el-form-item
505 505 label="设置答案:"
506   - v-show="questionForm.questionType != 5"
  506 + v-show="
  507 + questionForm.questionType != 5 &&
  508 + questionForm.questionType != 6
  509 + "
507 510 >
508 511 <div class="qs-options">
509 512 <p class="ipt">
... ...
src/views/standard/examinationPaper/edit.vue
... ... @@ -6,14 +6,16 @@
6 6 </template>
7 7 </back-box>
8 8 <div class="content">
9   - <p class="tips" v-if="paperModifyLog.modifiedTime">
10   - <i class="fa fa-bell-o"></i>
11   - {{
12   - `${paperModifyLog.modifiedTime} ${paperModifyLog.realName}`
13   - }}老师修改了答案
14   - </p>
  9 + <template v-if="type == 1"
  10 + ><p class="tips" v-if="paperModifyLog.modifiedTime">
  11 + <i class="fa fa-bell-o"></i>
  12 + {{
  13 + `${paperModifyLog.modifiedTime} ${paperModifyLog.realName}`
  14 + }}老师修改了答案
  15 + </p></template
  16 + >
15 17 <div class="answer-title">
16   - <p class="name">{{ form.title }}</p>
  18 + <p class="name">{{ form.title || title }}</p>
17 19 <p class="totals">卷面总分:{{ allScore }}分</p>
18 20 </div>
19 21 <template v-if="questionList[0]?.subQuestions">
... ... @@ -295,9 +297,7 @@
295 297 @click="setMultiple(formAns, option)"
296 298 >{{ option }}</span
297 299 >
298   - <span
299   - class="answer-s active"
300   - @click="setMultiple(formAns, ',')"
  300 + <span class="answer-s active" @click="setMultiple(formAns, ',')"
301 301 >,</span
302 302 >
303 303 </template>
... ... @@ -336,6 +336,7 @@ import { deepClone, checkAnswer } from &quot;utils&quot;;
336 336 export default {
337 337 data() {
338 338 return {
  339 + role: "",
339 340 questionList: [],
340 341 form: {
341 342 //答题卡详情
... ... @@ -347,6 +348,8 @@ export default {
347 348 share: 1,
348 349 questionList: [],
349 350 },
  351 + title: "",
  352 + type: 1,
350 353 paperModifyLog: {
351 354 realName: "",
352 355 modifiedTime: "",
... ... @@ -355,7 +358,7 @@ export default {
355 358 formAns: {
356 359 listIndex: 0, //大题位置
357 360 endIndex: 0, //相同题目最后一位题目的questionIndex
358   - index:0,
  361 + index: 0,
359 362 qusType: "", //题目类型
360 363 subNum: 0, //数量
361 364 answerOptions: [], //答案选项
... ... @@ -366,15 +369,24 @@ export default {
366 369 computed: {
367 370 allScore: function () {
368 371 let score = 0;
369   - this.questionList.map((item) => {
370   - score += item.subQuestions.reduce((a, b) => {
371   - return a + (Number(b.score) || 0);
372   - }, 0);
  372 + this.questionList?.map((item) => {
  373 + if (item.subQuestions) {
  374 + score += item.subQuestions.reduce((a, b) => {
  375 + return a + (Number(b.score) || 0);
  376 + }, 0);
  377 + } else {
  378 + score += item.score;
  379 + }
373 380 }, 0);
374 381 return Number(score).toFixed(2);
375 382 },
376 383 },
377 384 created() {
  385 + this.role =
  386 + this.$store.getters.info.showRole ||
  387 + this.$store.getters.info.permissions[0].role;
  388 + this.type = this.$route.query.type || 1;
  389 + this.title = this.$route.query.title || "";
378 390 this._QueryDetail();
379 391 },
380 392 methods: {
... ... @@ -531,7 +543,7 @@ export default {
531 543 this.formAns = { ...this.questionList[index].subQuestions[indexs] };
532 544 this.formAns.listIndex = index;
533 545 let answerList = "";
534   - let startIndex = (this.formAns.index+1) - this.formAns.subNum;//批量设置大难开始位置
  546 + let startIndex = this.formAns.index + 1 - this.formAns.subNum; //批量设置大难开始位置
535 547 this.questionList[index].subQuestions.map((item, subIdx) => {
536 548 if (subIdx >= startIndex) {
537 549 answerList += this.setAnswer(item.questionType, item.correctAnswer);
... ... @@ -638,26 +650,72 @@ export default {
638 650 return item;
639 651 });
640 652 //更新答题卡
641   - const { data, status, info } = await this.$request.modifyPaper({
642   - paperId: this.form.id,
643   - questionList: questionList,
644   - });
  653 + let modifyPaper, params;
  654 + if (this.type == 1) {
  655 + modifyPaper =
  656 + this.role == "ROLE_PERSONAL"
  657 + ? this.$request.pModifyPaper
  658 + : this.$request.modifyPaper;
  659 + params = {
  660 + paperId: this.$route.query.paperId,
  661 + questionList: questionList,
  662 + };
  663 + } else if (this.type == 2) {
  664 + modifyPaper =
  665 + this.role == "ROLE_PERSONAL"
  666 + ? this.$request.pSetExamAnswer
  667 + : this.$request.setExamAnswer;
  668 + params = {
  669 + examId: this.$route.query.paperId,
  670 + questionList: questionList,
  671 + };
  672 + } else {
  673 + modifyPaper =
  674 + this.role == "ROLE_PERSONAL"
  675 + ? this.$request.pSetPeriodAnswer
  676 + : this.$request.setPeriodAnswer;
  677 + params = {
  678 + periodId: this.$route.query.paperId,
  679 + questionList: questionList,
  680 + };
  681 + }
  682 + const { data, status, info } = await modifyPaper(params);
645 683 if (status == 0) {
646   - this.$router.push({
647   - path: "/examinationPaper",
648   - });
  684 + this.$router.go(-1);
649 685 } else {
650 686 this.$message.error(info);
651 687 }
652 688 },
653 689 async _QueryDetail() {
654   - //查询年级列表
655   - const { data, status, info } = await this.$request.fetchPaperDetail({
656   - paperId: this.$route.query.paperId,
657   - });
  690 + //查询详情
  691 + let detail;
  692 + if (this.role == "ROLE_PERSONAL") {
  693 + detail =
  694 + this.type == 1
  695 + ? this.$request.pPaperDetail
  696 + : this.type == 2
  697 + ? this.$request.pExamQuestionList
  698 + : this.$request.pPeriodQuestionList;
  699 + } else {
  700 + detail =
  701 + this.type == 1
  702 + ? this.$request.fetchPaperDetail
  703 + : this.type == 2
  704 + ? this.$request.examQuestionList
  705 + : this.$request.periodQuestionList;
  706 + }
  707 + let params =
  708 + this.type == 1
  709 + ? { paperId: this.$route.query.paperId }
  710 + : this.type == 2
  711 + ? { examId: this.$route.query.paperId }
  712 + : {
  713 + periodId: this.$route.query.paperId,
  714 + };
  715 + const { data, status, info } = await detail(params);
658 716 if (status == 0) {
659 717 this.form = deepClone(data);
660   - this.questionList = deepClone(this.form.questionList);
  718 + this.questionList = deepClone(this.form.questionList || data.list);
661 719 this.paperModifyLog = {
662 720 ...this.paperModifyLog,
663 721 ...this.form.paperModifyLog,
... ... @@ -668,7 +726,10 @@ export default {
668 726 let addndex = 0;
669 727 item.subQuestions.map((sub, index) => {
670 728 if (!!sub.questionType) {
671   - if (sub.questionType == types[addndex].qusType && sub.questionType != 5) {
  729 + if (
  730 + sub.questionType == types[addndex].qusType &&
  731 + sub.questionType != 5
  732 + ) {
672 733 //同类型批量答案+1
673 734 types[addndex].subNum += 1;
674 735 if (
... ... @@ -726,7 +787,10 @@ export default {
726 787 let addndex = 0;
727 788 this.questionList?.map((sub, index) => {
728 789 if (!!sub.questionType) {
729   - if (sub.questionType == types[addndex].qusType && sub.questionType != 5) {
  790 + if (
  791 + sub.questionType == types[addndex].qusType &&
  792 + sub.questionType != 5
  793 + ) {
730 794 //同类型批量答案+1
731 795 types[addndex].subNum += 1;
732 796 if (
... ... @@ -796,8 +860,15 @@ export default {
796 860 margin-left: 20px;
797 861 }
798 862 .btn-box {
  863 + width: calc(100% - 240px);
  864 + position: fixed;
  865 + right: 40px;
  866 + bottom: 20px;
  867 + padding: 10px 0 20px;
  868 + background: #fff;
799 869 text-align: right;
800 870 margin-left: 140px;
  871 + z-index: 10;
801 872 }
802 873 .tips {
803 874 height: 48px;
... ... @@ -819,7 +890,7 @@ export default {
819 890 font-size: 20px;
820 891 color: #333;
821 892 font-weight: 700;
822   - padding-bottom: 20px;
  893 + padding: 20px 0;
823 894 .totals {
824 895 font-size: 16px;
825 896 color: #888;
... ...
src/views/standard/examinationPaper/index.vue
... ... @@ -76,7 +76,7 @@
76 76 </div>
77 77 </div>
78 78 <p class="tips" v-show="archivedTotal">
79   - <span>另有{{ archivedTotal }}份已经归档的答题卡,</span>
  79 + <span>回收站内已有{{ archivedTotal }}份答题卡,</span>
80 80 <router-link to="/examinationPaperRecycle">点击查看&gt;&gt;</router-link>
81 81 </p>
82 82 <ul class="content" v-if="tableData && tableData.length">
... ... @@ -143,7 +143,7 @@
143 143 >修改分享范围</el-dropdown-item
144 144 >
145 145 <el-dropdown-item :command="2">复制</el-dropdown-item>
146   - <el-dropdown-item :command="3">归档</el-dropdown-item>
  146 + <el-dropdown-item :command="3">放入回收站</el-dropdown-item>
147 147 </el-dropdown-menu>
148 148 </el-dropdown>
149 149 </div>
... ...
src/views/standard/portrait/index.vue deleted
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   - 功能开发中。
10   - </div>
11   - </div>
12   -</template>
13   -
14   -<script>
15   -export default {
16   -
17   -}
18   -</script>
19   -
20   -<style>
21   -
22   -</style>
23 0 \ No newline at end of file
src/views/standard/test/analysis.vue
... ... @@ -371,6 +371,7 @@
371 371 >导出报表</el-button
372 372 >
373 373 <el-button
  374 + v-if="!this.$store.getters.code"
374 375 @click="print"
375 376 type="primary"
376 377 plain
... ...
src/views/standard/test/index.vue
... ... @@ -105,14 +105,13 @@
105 105 <el-table-column
106 106 prop="title"
107 107 label="试卷名称"
108   - fixed
109 108 align="center"
110 109 ></el-table-column>
111 110 <el-table-column
112 111 prop="examPaperScore"
113 112 label="卷面分"
114 113 align="center"
115   - width="100"
  114 + width="68"
116 115 ></el-table-column>
117 116 <el-table-column prop="answeredNum" label="测验人数" align="center"
118 117 ><template slot-scope="scoped">{{
... ... @@ -348,7 +347,13 @@
348 347 label="姓名"
349 348 fixed
350 349 align="center"
351   - ></el-table-column>
  350 + >
  351 + <template slot-scope="scoped"
  352 + ><span class="click-b" @click="toPortrait(scoped.row)">
  353 + {{ scoped.row.studentName }}
  354 + </span></template
  355 + ></el-table-column
  356 + >
352 357 <el-table-column
353 358 align="center"
354 359 v-for="(item, index) in answerList"
... ... @@ -440,6 +445,7 @@
440 445 >导出报表</el-button
441 446 >
442 447 <el-button
  448 + v-if="!this.$store.getters.code"
443 449 @click="print"
444 450 type="primary"
445 451 plain
... ... @@ -565,6 +571,9 @@ export default {
565 571 });
566 572 },
567 573 toPortrait(obj) {
  574 + if (this.$store.getters.code) {
  575 + return;
  576 + }
568 577 let subjectNames = [];
569 578 subjectNames = [...this.query["subjectNames"]];
570 579 if (
... ... @@ -582,8 +591,8 @@ export default {
582 591 path: "/portraitDetail",
583 592 query: {
584 593 id: obj.studentId,
585   - classId: obj.classId,
586   - subjectNames: subjectNames.join(","),
  594 + classId: this.query.classId,
  595 + subjectNames: subjectNames.join(""),
587 596 studentName: obj.studentName,
588 597 studentCode: obj.studentCode,
589 598 },
... ...