Procházet zdrojové kódy

Merge remote-tracking branch 'origin/master'

ly před 1 rokem
rodič
revize
91c37db887

+ 41 - 3
ui/src/views/production/quality/index.vue

@@ -42,7 +42,21 @@
           size="mini"
           @click="handleReport"
           v-hasPermi="['production:quality:list']"
-        >报告生成</el-button>
+        >当前页报告生成</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          icon="el-icon-time"
+          size="mini"
+          v-hasPermi="['production:quality:list']"
+        >历史报告查看</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          icon="el-icon-delete"
+          size="mini"
+          v-hasPermi="['production:quality:list']"
+        >批量删除</el-button>
       </el-col>
 	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
@@ -2353,7 +2367,7 @@
           <td class="td-transparent"></td>
         </tr>
       </table>
-      <div style="white-space: pre-wrap; margin: 0px auto; margin-top: 25px;text-align: center;">{{analysisDescription}}</div>
+      <!--<div style="white-space: pre-wrap; margin: 0px auto; margin-top: 25px;text-align: center;">{{analysisDescription}}</div>-->
       <el-input type="textarea" :rows="6" placeholder="请输入内容" v-model="comment" style="margin-top: 25px;"></el-input>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitComment">确 定</el-button>
@@ -3512,6 +3526,8 @@ export default {
       this.comment = null;
       this.analysisQueryParams.startDate = this.analysisSampleDate[0];
       this.analysisQueryParams.endDate = this.analysisSampleDate[1];
+      this.sampleDate[0] = this.analysisSampleDate[0];
+      this.sampleDate[1] = this.analysisSampleDate[1];
       let dictLabel = "";
       for(let i = 0; i < this.analysisOptions.length; i++) {
         if (this.analysisOptions[i].dictValue == this.analysisValue) {
@@ -3608,6 +3624,7 @@ export default {
             };
             this.chart = this.echarts.init(document.getElementById('chart'));
             this.chart.setOption(option);
+            this.queryComment();
           });
           break;
         case "2":
@@ -3699,6 +3716,7 @@ export default {
             };
             this.chart = this.echarts.init(document.getElementById('chart'));
             this.chart.setOption(option);
+            this.queryComment();
           });
           break;
         case "3":
@@ -3791,6 +3809,7 @@ export default {
               };
               this.chart = this.echarts.init(document.getElementById('chart'));
               this.chart.setOption(option);
+              this.queryComment();
             });
           });
           break;
@@ -3876,6 +3895,7 @@ export default {
             };
             this.chart = this.echarts.init(document.getElementById('chart'));
             this.chart.setOption(option);
+            this.queryComment();
           });
           break;
         case "5":
@@ -3992,6 +4012,7 @@ export default {
               };
               this.chart = this.echarts.init(document.getElementById('chart'));
               this.chart.setOption(option);
+              this.queryComment();
             });
           });
           break;
@@ -4063,6 +4084,7 @@ export default {
             };
             this.chart = this.echarts.init(document.getElementById('chart'));
             this.chart.setOption(option);
+            this.queryComment();
           });
           break;
         case "7":
@@ -4150,6 +4172,7 @@ export default {
             };
             this.chart = this.echarts.init(document.getElementById('chart'));
             this.chart.setOption(option);
+            this.queryComment();
           });
           break;
         case "8":
@@ -4220,6 +4243,7 @@ export default {
             };
             this.chart = this.echarts.init(document.getElementById('chart'));
             this.chart.setOption(option);
+            this.queryComment();
           });
           break;
         case "9":
@@ -4307,6 +4331,7 @@ export default {
             };
             this.chart = this.echarts.init(document.getElementById('chart'));
             this.chart.setOption(option);
+            this.queryComment();
           });
           break;
         case "10":
@@ -4377,6 +4402,7 @@ export default {
             };
             this.chart = this.echarts.init(document.getElementById('chart'));
             this.chart.setOption(option);
+            this.queryComment();
           });
           c2ReactorTable({
             "startDate": this.analysisSampleDate[0],
@@ -4455,6 +4481,7 @@ export default {
             };
             this.chart = this.echarts.init(document.getElementById('chart'));
             this.chart.setOption(option);
+            this.queryComment();
           });
           c3ReactorTable({
             "startDate": this.analysisSampleDate[0],
@@ -4567,6 +4594,7 @@ export default {
             };
             this.chart = this.echarts.init(document.getElementById('chart'));
             this.chart.setOption(option);
+            this.queryComment();
           });
           break;
         case "13":
@@ -4644,6 +4672,7 @@ export default {
             };
             this.chart = this.echarts.init(document.getElementById('chart'));
             this.chart.setOption(option);
+            this.queryComment();
           });
           break;
         case "14":
@@ -4739,6 +4768,7 @@ export default {
             };
             this.chart = this.echarts.init(document.getElementById('chart'));
             this.chart.setOption(option);
+            this.queryComment();
           });
           break;
         case "15":
@@ -4842,15 +4872,23 @@ export default {
             };
             this.chart = this.echarts.init(document.getElementById('chart'));
             this.chart.setOption(option);
+            this.queryComment();
           });
           break;
       }
+    },
+    queryComment() {
       getCommentInfo({
         "commentType": this.analysisValue,
         "startDate": this.sampleDate[0],
         "endDate": this.sampleDate[1]
       }).then(response => {
-        this.comment = response.data.qualityComment;
+        let qualityComment = response.data.qualityComment;
+        if (qualityComment == null || qualityComment == '') {
+          this.comment = this.analysisDescription;
+        } else {
+          this.comment = qualityComment;
+        }
       });
     },
     /** 搜索按钮操作 */

+ 79 - 17
ui/src/views/production/quality/report.vue

@@ -9,25 +9,25 @@
       >报告下载</el-button>
     </div>
     <div id="chart1"></div>
-    <!--<div class="description">{{analysisDescription1}}</div>-->
+    <div class="description">{{comment1}}</div>
     <div id="chart2"></div>
-    <!--<div class="description">{{analysisDescription2}}</div>-->
+    <div class="description">{{comment2}}</div>
     <div id="chart3"></div>
-    <!--<div class="description">{{analysisDescription3}}</div>-->
+    <div class="description">{{comment3}}</div>
     <div id="chart4"></div>
-    <!--<div class="description">{{analysisDescription4}}</div>-->
+    <div class="description">{{comment4}}</div>
     <div id="chart5"></div>
-    <!--<div class="description">{{analysisDescription5}}</div>-->
+    <div class="description">{{comment5}}</div>
     <div id="chart6"></div>
-    <!--<div class="description">{{analysisDescription6}}</div>-->
+    <div class="description">{{comment6}}</div>
     <div id="chart7"></div>
-    <!--<div class="description">{{analysisDescription7}}</div>-->
+    <div class="description">{{comment7}}</div>
     <div id="chart8"></div>
-    <!--<div class="description">{{analysisDescription8}}</div>-->
+    <div class="description">{{comment8}}</div>
     <div id="chart9"></div>
-    <!--<div class="description">{{analysisDescription9}}</div>-->
+    <div class="description">{{comment9}}</div>
     <div id="chart10"></div>
-    <!--<div class="description">{{analysisDescription10}}</div>-->
+    <div class="description">{{comment10}}</div>
     <table id="tableC2">
       <tr>
         <td colspan="5" class="td-transparent">BYC performance of C2 reactor</td>
@@ -125,7 +125,7 @@
       </tr>
     </table>
     <div id="chart11"></div>
-    <!--<div class="description">{{analysisDescription11}}</div>-->
+    <div class="description">{{comment11}}</div>
     <table id="tableC3">
       <tr>
         <td colspan="2" class="td-transparent">BYC performance of C3 reactor </td>
@@ -168,13 +168,13 @@
       </tr>
     </table>
     <div id="chart12"></div>
-    <!--<div class="description">{{analysisDescription12}}</div>-->
+    <div class="description">{{comment12}}</div>
     <div id="chart13"></div>
-    <!--<div class="description">{{analysisDescription13}}</div>-->
+    <div class="description">{{comment13}}</div>
     <div id="chart14"></div>
-    <!--<div class="description">{{analysisDescription14}}</div>-->
+    <div class="description">{{comment14}}</div>
     <div id="chart15"></div>
-    <!--<div class="description">{{analysisDescription15}}</div>-->
+    <div class="description">{{comment15}}</div>
   </div>
 </template>
 
@@ -209,6 +209,7 @@ import { treeselect } from "@/api/system/dept";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import { getCommentInfo } from "@/api/production/comment";
 
 export default {
   name: "report.vue",
@@ -250,6 +251,21 @@ export default {
       analysisDescription13: null,
       analysisDescription14: null,
       analysisDescription15: null,
+      comment1: null,
+      comment2: null,
+      comment3: null,
+      comment4: null,
+      comment5: null,
+      comment6: null,
+      comment7: null,
+      comment8: null,
+      comment9: null,
+      comment10: null,
+      comment11: null,
+      comment12: null,
+      comment13: null,
+      comment14: null,
+      comment15: null,
       c3ReactorTableData: {},
       c2ReactorTableData: {},
     }
@@ -1609,6 +1625,52 @@ export default {
         this.chart15 = this.echarts.init(document.getElementById('chart15'));
         this.chart15.setOption(option);
       });
+
+      getCommentInfo({ "commentType": 1, "startDate": this.sampleDate[0], "endDate": this.sampleDate[1] }).then(response => {
+        this.comment1 = response.data.qualityComment;
+      });
+      getCommentInfo({ "commentType": 2, "startDate": this.sampleDate[0], "endDate": this.sampleDate[1] }).then(response => {
+        this.comment2 = response.data.qualityComment;
+      });
+      getCommentInfo({ "commentType": 3, "startDate": this.sampleDate[0], "endDate": this.sampleDate[1] }).then(response => {
+        this.comment3 = response.data.qualityComment;
+      });
+      getCommentInfo({ "commentType": 4, "startDate": this.sampleDate[0], "endDate": this.sampleDate[1] }).then(response => {
+        this.comment4 = response.data.qualityComment;
+      });
+      getCommentInfo({ "commentType": 5, "startDate": this.sampleDate[0], "endDate": this.sampleDate[1] }).then(response => {
+        this.comment5 = response.data.qualityComment;
+      });
+      getCommentInfo({ "commentType": 6, "startDate": this.sampleDate[0], "endDate": this.sampleDate[1] }).then(response => {
+        this.comment6 = response.data.qualityComment;
+      });
+      getCommentInfo({ "commentType": 7, "startDate": this.sampleDate[0], "endDate": this.sampleDate[1] }).then(response => {
+        this.comment7 = response.data.qualityComment;
+      });
+      getCommentInfo({ "commentType": 8, "startDate": this.sampleDate[0], "endDate": this.sampleDate[1] }).then(response => {
+        this.comment8 = response.data.qualityComment;
+      });
+      getCommentInfo({ "commentType": 9, "startDate": this.sampleDate[0], "endDate": this.sampleDate[1] }).then(response => {
+        this.comment9 = response.data.qualityComment;
+      });
+      getCommentInfo({ "commentType": 10, "startDate": this.sampleDate[0], "endDate": this.sampleDate[1] }).then(response => {
+        this.comment10 = response.data.qualityComment;
+      });
+      getCommentInfo({ "commentType": 11, "startDate": this.sampleDate[0], "endDate": this.sampleDate[1] }).then(response => {
+        this.comment11 = response.data.qualityComment;
+      });
+      getCommentInfo({ "commentType": 12, "startDate": this.sampleDate[0], "endDate": this.sampleDate[1] }).then(response => {
+        this.comment12 = response.data.qualityComment;
+      });
+      getCommentInfo({ "commentType": 13, "startDate": this.sampleDate[0], "endDate": this.sampleDate[1] }).then(response => {
+        this.comment13 = response.data.qualityComment;
+      });
+      getCommentInfo({ "commentType": 14, "startDate": this.sampleDate[0], "endDate": this.sampleDate[1] }).then(response => {
+        this.comment14 = response.data.qualityComment;
+      });
+      getCommentInfo({ "commentType": 15, "startDate": this.sampleDate[0], "endDate": this.sampleDate[1] }).then(response => {
+        this.comment15 = response.data.qualityComment;
+      });
     }
   }
 }
@@ -1670,8 +1732,8 @@ export default {
   }
   .description{
     white-space: pre-wrap;
-    margin: 0px auto;
     margin-bottom: 50px;
-    text-align: center;
+    text-align: left;
+    width: 800px;
   }
 </style>