Commit 0074e60a388a8d6ec5b4eead665ad77806a5f3e6

Authored by 梁保满
1 parent e5f407d6

导出报表参数设置

src/views/standard/test/contrast.vue
@@ -372,8 +372,8 @@ export default { @@ -372,8 +372,8 @@ export default {
372 nums.push(Number(item[2])); 372 nums.push(Number(item[2]));
373 }); 373 });
374 for (let i = 0; i < nums.length; i++) { 374 for (let i = 0; i < nums.length; i++) {
375 - console.log(nums[i + 1] && (nums[i + 1] >= nums[i]))  
376 - if (nums[i + 1] && (nums[i + 1] >= nums[i])) { 375 + console.log(nums[i + 1] && nums[i + 1] >= nums[i]);
  376 + if (nums[i + 1] && nums[i + 1] >= nums[i]) {
377 ERR_OK = true; 377 ERR_OK = true;
378 this.$message.warning("高等级比例不能低于低等级比例!请检查"); 378 this.$message.warning("高等级比例不能低于低等级比例!请检查");
379 break; 379 break;
@@ -447,10 +447,19 @@ export default { @@ -447,10 +447,19 @@ export default {
447 async exportData() { 447 async exportData() {
448 if (this.exportLoading == true) return; 448 if (this.exportLoading == true) return;
449 this.exportLoading = true; 449 this.exportLoading = true;
  450 + let params = { ...this.fromData };
  451 + if (params.levelType == 0) {
  452 + params.levels = params.levels.map((item) => {
  453 + console.log(item);
  454 + item[1] = ((item[1] / 100) * this.examPaperScore).toFixed(1);
  455 + item[2] = ((item[2] / 100) * this.examPaperScore).toFixed(1);
  456 + return item;
  457 + });
  458 + }
450 const data = await this.$request.exportExamMultiReport({ 459 const data = await this.$request.exportExamMultiReport({
451 examIds: this.ids, 460 examIds: this.ids,
452 - levels: this.fromData.levels,  
453 - levelType: this.fromData.levelType, 461 + levels: params.levels,
  462 + levelType: params.levelType,
454 }); 463 });
455 this.exportLoading = false; 464 this.exportLoading = false;
456 if (data) { 465 if (data) {
@@ -485,7 +494,7 @@ export default { @@ -485,7 +494,7 @@ export default {
485 .setMinScore { 494 .setMinScore {
486 position: absolute; 495 position: absolute;
487 bottom: 0; 496 bottom: 0;
488 - right: 50px; 497 + right: 0;
489 } 498 }
490 } 499 }
491 .page-content { 500 .page-content {
@@ -493,7 +502,7 @@ export default { @@ -493,7 +502,7 @@ export default {
493 } 502 }
494 } 503 }
495 .tab-box { 504 .tab-box {
496 - width: 800px; 505 + width: 400px;
497 margin: 0 auto 12px; 506 margin: 0 auto 12px;
498 background: #f8f8f8; 507 background: #f8f8f8;
499 border-radius: 20px; 508 border-radius: 20px;