Commit 167079c6ad701380c8a43afb84daf3221db74b3c

Authored by 梁保满
1 parent c065091a

班主任隐藏查看题目

src/views/personal/test/analysis.vue
... ... @@ -407,22 +407,19 @@
407 407 v-loading="exportLoading"
408 408 >导入主观题分数</el-button
409 409 >
410   - <el-button
411   - @click="edit"
412   - type="primary"
413   - v-if="examReport.subjectiveScore != examReport.examPaperScore"
414   - round
415   - >查看题目</el-button
  410 + <template v-if="role == 'ROLE_JIAOSHI'">
  411 + <el-button
  412 + @click="edit"
  413 + type="primary"
  414 + v-if="examReport.subjectiveScore != examReport.examPaperScore"
  415 + round
  416 + >查看题目</el-button
  417 + ></template
416 418 >
417 419 </div>
418 420 </div>
419 421 <el-dialog title="导入主观题分数" :visible.sync="diaUp" width="600">
420   - <up-load
421   - :url="url"
422   - :examId="id"
423   - @upSuccess="upSuccess"
424   - fileName="教师名单"
425   - >
  422 + <up-load :url="url" :examId="id" @upSuccess="upSuccess">
426 423 <template slot="down">
427 424 <p class="down-txt">
428 425 第一步:下载模板并编辑完成学生分数
... ... @@ -444,6 +441,7 @@ import { downloadFile, tablePrint } from &quot;@/utils&quot;;
444 441 export default {
445 442 data() {
446 443 return {
  444 + role: "",
447 445 tableMaxHeight: 600,
448 446 loading: false,
449 447 exportLoading: false,
... ... @@ -484,6 +482,9 @@ export default {
484 482 };
485 483 },
486 484 created() {
  485 + this.role =
  486 + this.$store.getters.info.showRole ||
  487 + this.$store.getters.info.permissions[0].role;
487 488 this.id = this.$route.query.id;
488 489 this.title = this.$route.query.title || "";
489 490 this._QueryData();
... ... @@ -494,13 +495,7 @@ export default {
494 495 },
495 496 upSuccess(res) {
496 497 //导入成功
497   - this.$message.closeAll();
498   - this.$message({
499   - showClose: true,
500   - message: `成功(${res.data.success})`,
501   - type: "success",
502   - duration:5000
503   - });
  498 + this.$message.success("导入成功");
504 499 this.diaUp = false;
505 500 this._QueryData();
506 501 },
... ...
src/views/personal/test/index.vue
... ... @@ -622,15 +622,9 @@ export default {
622 622 this.page = 1;
623 623 this._QueryData();
624 624 },
625   - upSuccess(res) {
626   - //导入成功
627   - this.$message.closeAll();
628   - this.$message({
629   - showClose: true,
630   - message: `成功(${res.data.success})`,
631   - type: "success",
632   - duration: 5000,
633   - });
  625 + upSuccess(res) {
  626 + //导入成功
  627 + this.$message.success("导入成功")
634 628 this.diaUp = false;
635 629 this._QueryData();
636 630 },
... ...
src/views/standard/test/analysis.vue
... ... @@ -371,7 +371,7 @@
371 371 >导出报表</el-button
372 372 >
373 373 <el-button
374   - v-if="!this.$store.getters.code"
  374 + v-if="!this.$store.getters.code"
375 375 @click="print"
376 376 type="primary"
377 377 plain
... ... @@ -389,22 +389,19 @@
389 389 v-loading="exportLoading"
390 390 >导入主观题分数</el-button
391 391 >
392   - <el-button
393   - @click="edit"
394   - type="primary"
395   - v-if="examReport.subjectiveScore != examReport.examPaperScore"
396   - round
397   - >查看题目</el-button
  392 + <template v-if="role == 'ROLE_JIAOSHI'">
  393 + <el-button
  394 + @click="edit"
  395 + type="primary"
  396 + v-if="examReport.subjectiveScore != examReport.examPaperScore"
  397 + round
  398 + >查看题目</el-button
  399 + ></template
398 400 >
399 401 </div>
400 402 </div>
401 403 <el-dialog title="导入主观题分数" :visible.sync="diaUp" width="600">
402   - <up-load
403   - :url="url"
404   - :examId="id"
405   - @upSuccess="upSuccess"
406   - fileName="教师名单"
407   - >
  404 + <up-load :url="url" :examId="id" @upSuccess="upSuccess">
408 405 <template slot="down">
409 406 <p class="down-txt">
410 407 第一步:下载模板并编辑完成学生分数
... ... @@ -426,6 +423,7 @@ import { downloadFile, tablePrint } from &quot;@/utils&quot;;
426 423 export default {
427 424 data() {
428 425 return {
  426 + role: "",
429 427 tableMaxHeight: 600,
430 428 loading: false,
431 429 exportLoading: false,
... ... @@ -466,6 +464,9 @@ export default {
466 464 };
467 465 },
468 466 created() {
  467 + this.role =
  468 + this.$store.getters.info.showRole ||
  469 + this.$store.getters.info.permissions[0].role;
469 470 this.id = this.$route.query.id;
470 471 this.title = this.$route.query.title || "";
471 472 this._QueryData();
... ... @@ -476,13 +477,7 @@ export default {
476 477 },
477 478 upSuccess(res) {
478 479 //导入成功
479   - this.$message.closeAll();
480   - this.$message({
481   - showClose: true,
482   - message: `成功(${res.data.success})`,
483   - type: "success",
484   - duration:5000
485   - });
  480 + this.$message.success("导入成功");
486 481 this.diaUp = false;
487 482 this._QueryData();
488 483 },
... ...
src/views/standard/test/index.vue
... ... @@ -696,15 +696,9 @@ export default {
696 696 this.page = 1;
697 697 this._QueryData();
698 698 },
699   - upSuccess(res) {
700   - //导入成功
701   - this.$message.closeAll();
702   - this.$message({
703   - showClose: true,
704   - message: `成功(${res.data.success})`,
705   - type: "success",
706   - duration: 5000,
707   - });
  699 + upSuccess(res) {
  700 + //导入成功
  701 + this.$message.success("导入成功")
708 702 this.diaUp = false;
709 703 this._QueryData();
710 704 },
... ...