Commit 167079c6ad701380c8a43afb84daf3221db74b3c
1 parent
c065091a
班主任隐藏查看题目
Showing
4 changed files
with
35 additions
and
57 deletions
src/views/personal/test/analysis.vue
| @@ -407,22 +407,19 @@ | @@ -407,22 +407,19 @@ | ||
| 407 | v-loading="exportLoading" | 407 | v-loading="exportLoading" |
| 408 | >导入主观题分数</el-button | 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 | </div> | 419 | </div> |
| 418 | </div> | 420 | </div> |
| 419 | <el-dialog title="导入主观题分数" :visible.sync="diaUp" width="600"> | 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 | <template slot="down"> | 423 | <template slot="down"> |
| 427 | <p class="down-txt"> | 424 | <p class="down-txt"> |
| 428 | 第一步:下载模板并编辑完成学生分数 | 425 | 第一步:下载模板并编辑完成学生分数 |
| @@ -444,6 +441,7 @@ import { downloadFile, tablePrint } from "@/utils"; | @@ -444,6 +441,7 @@ import { downloadFile, tablePrint } from "@/utils"; | ||
| 444 | export default { | 441 | export default { |
| 445 | data() { | 442 | data() { |
| 446 | return { | 443 | return { |
| 444 | + role: "", | ||
| 447 | tableMaxHeight: 600, | 445 | tableMaxHeight: 600, |
| 448 | loading: false, | 446 | loading: false, |
| 449 | exportLoading: false, | 447 | exportLoading: false, |
| @@ -484,6 +482,9 @@ export default { | @@ -484,6 +482,9 @@ export default { | ||
| 484 | }; | 482 | }; |
| 485 | }, | 483 | }, |
| 486 | created() { | 484 | created() { |
| 485 | + this.role = | ||
| 486 | + this.$store.getters.info.showRole || | ||
| 487 | + this.$store.getters.info.permissions[0].role; | ||
| 487 | this.id = this.$route.query.id; | 488 | this.id = this.$route.query.id; |
| 488 | this.title = this.$route.query.title || ""; | 489 | this.title = this.$route.query.title || ""; |
| 489 | this._QueryData(); | 490 | this._QueryData(); |
| @@ -494,13 +495,7 @@ export default { | @@ -494,13 +495,7 @@ export default { | ||
| 494 | }, | 495 | }, |
| 495 | upSuccess(res) { | 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 | this.diaUp = false; | 499 | this.diaUp = false; |
| 505 | this._QueryData(); | 500 | this._QueryData(); |
| 506 | }, | 501 | }, |
src/views/personal/test/index.vue
| @@ -622,15 +622,9 @@ export default { | @@ -622,15 +622,9 @@ export default { | ||
| 622 | this.page = 1; | 622 | this.page = 1; |
| 623 | this._QueryData(); | 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 | this.diaUp = false; | 628 | this.diaUp = false; |
| 635 | this._QueryData(); | 629 | this._QueryData(); |
| 636 | }, | 630 | }, |
src/views/standard/test/analysis.vue
| @@ -371,7 +371,7 @@ | @@ -371,7 +371,7 @@ | ||
| 371 | >导出报表</el-button | 371 | >导出报表</el-button |
| 372 | > | 372 | > |
| 373 | <el-button | 373 | <el-button |
| 374 | - v-if="!this.$store.getters.code" | 374 | + v-if="!this.$store.getters.code" |
| 375 | @click="print" | 375 | @click="print" |
| 376 | type="primary" | 376 | type="primary" |
| 377 | plain | 377 | plain |
| @@ -389,22 +389,19 @@ | @@ -389,22 +389,19 @@ | ||
| 389 | v-loading="exportLoading" | 389 | v-loading="exportLoading" |
| 390 | >导入主观题分数</el-button | 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 | </div> | 401 | </div> |
| 400 | </div> | 402 | </div> |
| 401 | <el-dialog title="导入主观题分数" :visible.sync="diaUp" width="600"> | 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 | <template slot="down"> | 405 | <template slot="down"> |
| 409 | <p class="down-txt"> | 406 | <p class="down-txt"> |
| 410 | 第一步:下载模板并编辑完成学生分数 | 407 | 第一步:下载模板并编辑完成学生分数 |
| @@ -426,6 +423,7 @@ import { downloadFile, tablePrint } from "@/utils"; | @@ -426,6 +423,7 @@ import { downloadFile, tablePrint } from "@/utils"; | ||
| 426 | export default { | 423 | export default { |
| 427 | data() { | 424 | data() { |
| 428 | return { | 425 | return { |
| 426 | + role: "", | ||
| 429 | tableMaxHeight: 600, | 427 | tableMaxHeight: 600, |
| 430 | loading: false, | 428 | loading: false, |
| 431 | exportLoading: false, | 429 | exportLoading: false, |
| @@ -466,6 +464,9 @@ export default { | @@ -466,6 +464,9 @@ export default { | ||
| 466 | }; | 464 | }; |
| 467 | }, | 465 | }, |
| 468 | created() { | 466 | created() { |
| 467 | + this.role = | ||
| 468 | + this.$store.getters.info.showRole || | ||
| 469 | + this.$store.getters.info.permissions[0].role; | ||
| 469 | this.id = this.$route.query.id; | 470 | this.id = this.$route.query.id; |
| 470 | this.title = this.$route.query.title || ""; | 471 | this.title = this.$route.query.title || ""; |
| 471 | this._QueryData(); | 472 | this._QueryData(); |
| @@ -476,13 +477,7 @@ export default { | @@ -476,13 +477,7 @@ export default { | ||
| 476 | }, | 477 | }, |
| 477 | upSuccess(res) { | 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 | this.diaUp = false; | 481 | this.diaUp = false; |
| 487 | this._QueryData(); | 482 | this._QueryData(); |
| 488 | }, | 483 | }, |
src/views/standard/test/index.vue
| @@ -696,15 +696,9 @@ export default { | @@ -696,15 +696,9 @@ export default { | ||
| 696 | this.page = 1; | 696 | this.page = 1; |
| 697 | this._QueryData(); | 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 | this.diaUp = false; | 702 | this.diaUp = false; |
| 709 | this._QueryData(); | 703 | this._QueryData(); |
| 710 | }, | 704 | }, |