guotianliang 4 anni fa
parent
commit
f548f744d2

+ 1 - 1
src/api/ReportForm/ReportForm.js

@@ -48,7 +48,7 @@ export function queryStandardList({postParams}) {
 }
 // 周报---环境温度分析
 export function queryWeekSpace({postParams}) {
-    return httputils.postJson(`/duoduo-service/review-service/week/spaceType/query/v2.0`, postParams)
+    return httputils.postJson(`/duoduo-service/review-service/week/spaceType/query`, postParams)
 }
 // 周报---用户活跃度统计
 export function queryUserActivity({postParams}) {

+ 4 - 3
src/views/ReportForm/weekReport/lineChart.vue

@@ -126,7 +126,8 @@ export default {
             let maxTemp=parseInt(Math.max.call(null,...dataYcope)) ;
             // 计算最小值
             let minTemp=parseInt(Math.min.call(null,...dataYcope));
-            let changConst = (maxTemp-minTemp>=100)?200:2;
+            let diff=maxTemp-minTemp;
+            let changConst = (diff>=50)?parseInt(diff/3):(diff>5)?8:2;
             maxTemp = maxTemp+changConst;
             let option = {
                 tooltip: {
@@ -155,7 +156,7 @@ export default {
                 },
                  grid: {
                     left: "50",
-                    right: (this.envType=='PM2d5'||this.envType=='CO2')?"65":"50",
+                    right: (this.envType=='PM2d5'||this.envType=='CO2'||this.envType==="HCHO")?"65":"50",
                     bottom: "8",
                     top:"15",
                     color:'#f7f7f7',
@@ -188,7 +189,7 @@ export default {
                   },
                     min:minTemp,
                     max:maxTemp,
-                    minInterval:parseInt((maxTemp-minTemp)/8)<2?2:parseInt((maxTemp-minTemp)/8),
+                    minInterval:parseInt((maxTemp-minTemp)/8)<2?2:parseInt((maxTemp-minTemp)/5),
                     axisTick: {
                         show: false
                     },

+ 14 - 3
src/views/ReportForm/weekReport/reportDetail.vue

@@ -1079,7 +1079,7 @@ export default {
     components:{lineChart,barChart,chartLegend,Tabs,ringChart,envSurvey},
     beforeMount(){
         // console.log(this.$route,"---------------------------------------")
-        // http://192.168.0.24:9906/weekpdf?startDate=20201207&endDate=20201213&projectName=你好&projectId=Pj1101080259
+        // http://192.168.0.24:9906/weekpdf?startDate=20210118&endDate=20210124&projectName=你好&projectId=Pj1101080259
         this.comstartDate= this.$route.query.startDate;
         this.comendDate=this.$route.query.endDate;
         this.projectName=this.$route.query.projectName;
@@ -1215,7 +1215,7 @@ export default {
                 this.getTableList("hotProprotion","hotgirdDate","hotRemark");
                 this.getTableList("coldProprotion","coldgirdDate","coldRemark");
                 this.getTableList("co2AbnormalTime","co2girdDate","co2Remark",1000);
-                this.getTableList("hchoAbnormalTime","hchogirdDate","hchoRemark",1);
+                this.getTableList("hchoAbnormalTime","hchogirdDate","hchoRemark",0.1);
                 this.getDayDate();
             }
         },
@@ -1255,7 +1255,11 @@ export default {
                             let ctypeMap={4:0,6:1,8:2,5:3,7:4};
                             let ctype= ctypeMap[item.type];
                             //4 5 6 7 8
-                            this.surveyTable[ctype].weekAvg =(typeof item.avgDate =="number")?item.avgDate.toFixed(this.surveyTable[ctype].init):'--';
+                            if(ctype==4){
+                                this.surveyTable[ctype].weekAvg =(typeof item.avgDate =="number")?(item.avgDate*this.multipleInit).toFixed(this.surveyTable[ctype].init):'--';
+                            }else{
+                                this.surveyTable[ctype].weekAvg =(typeof item.avgDate =="number")?item.avgDate.toFixed(this.surveyTable[ctype].init):'--';
+                            }
                             (typeof item.normalProprotion=="number")&&(this.surveyTable[ctype].weeknormalProprotion=(item.normalProprotion*100).toFixed(0));
                             (typeof item.coldProprotion=="number")&&(this.surveyTable[ctype].weekcoldProprotion=(item.coldProprotion*100).toFixed(0));
                             (typeof item.hotProprotion=="number")&&(this.surveyTable[ctype].weekhotProprotion=(item.hotProprotion*100).toFixed(0));
@@ -1595,6 +1599,7 @@ export default {
                 let dataList = this.generateDate(startTime,14);
                 let copeArr=dataList.map(index=>{
                     let items = arr.filter(v=> index ===v.date).length&&arr.filter(v=> index===v.date)[0];
+                    items.avgPm2d5&&(items.avgPm2d5 =items.avgPm2d5*this.multipleInit);
                     let itemsModel={
                         avgTemp: -9999,
                         coldLastTime:-9999,
@@ -1819,6 +1824,12 @@ export default {
             return this.surveyTable.findIndex(item=>{
                 return item.id==this.envType
             })
+        },
+        multipleInit(){
+            if(this.projectId==="Pj1101080259"){
+                return 1000;
+            }
+            return 1
         }
     },
 }