xsh 3 éve
szülő
commit
e53d51b6e5

+ 16 - 1
src/views/pastureData/chart/chartTemp.vue

@@ -33,7 +33,7 @@ export default {
       if(this.tempList[0].length > 0) {
         options = {
           legend: {
-            data: ['耳根温度', '环境温度'],
+            data: ['耳根温度', '环境温度', '群体平均温度'],
             x: 'center',
             y: '5%',
           },
@@ -117,6 +117,21 @@ export default {
               },
               data: that.tempList[2],
             },
+            {
+              name: '群体平均温度',
+              type: 'line',
+              smooth: true,
+              sampling: 'average',
+              itemStyle: {
+                normal: {
+                  color: '#3CF488', // 改变折线点的颜色
+                  // label: { // 显示数值
+                  //   show: true
+                  // }
+                },
+              },
+              data: that.tempList[3],
+            },
           ],
         }
       } else {

+ 23 - 24
src/views/pastureData/dataDetail.vue

@@ -74,25 +74,25 @@
             <chart-temp :tempList="tempList"></chart-temp>
           </div>
         </div>
-        <div class="echarts">
-          <div class="echarts_header">
-            <span>群体平均温度曲线</span>
-            <el-date-picker
-                style="float: right; margin: 12px 10px 0 0;"
-                size="mini"
-                v-model="value2"
-                type="datetimerange"
-                range-separator="至"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                value-format="yyyy-MM-dd HH:mm:ss"
-                align="right">
-            </el-date-picker>
-          </div>
-          <div class="echart_init">
-            <chartPjwd :pjwdList="pjwdList"></chartPjwd>
-          </div>
-        </div>
+<!--        <div class="echarts">-->
+<!--          <div class="echarts_header">-->
+<!--            <span>群体平均温度曲线</span>-->
+<!--            <el-date-picker-->
+<!--                style="float: right; margin: 12px 10px 0 0;"-->
+<!--                size="mini"-->
+<!--                v-model="value2"-->
+<!--                type="datetimerange"-->
+<!--                range-separator="至"-->
+<!--                start-placeholder="开始日期"-->
+<!--                end-placeholder="结束日期"-->
+<!--                value-format="yyyy-MM-dd HH:mm:ss"-->
+<!--                align="right">-->
+<!--            </el-date-picker>-->
+<!--          </div>-->
+<!--          <div class="echart_init">-->
+<!--            <chartPjwd :pjwdList="pjwdList"></chartPjwd>-->
+<!--          </div>-->
+<!--        </div>-->
         <div class="echarts">
           <div class="echarts_header">
             <span>电量曲线</span>
@@ -148,14 +148,14 @@
 import chartTemp from "./chart/chartTemp";
 import chartDl from "./chart/chartDl";
 import chartYdl from "./chart/chartYdl";
-import chartPjwd from "./chart/chartPjwd";
+// import chartPjwd from "./chart/chartPjwd";
 export default {
   name: "dataDetail",
   components: {
     chartTemp,
     chartDl,
     chartYdl,
-    chartPjwd
+    // chartPjwd
   },
   data() {
     return {
@@ -247,14 +247,13 @@ export default {
               this.isShow = true;
               this.tableData = res.data.page;
               this.earTag = this.tableData.eartagdeta.eartagNo;
-              // 温度曲线
-              this.tempList = [this.tableData.time, this.tableData.temp, this.tableData.environmenttemp];
+              // 温度曲线 平均温度曲线
+              this.tempList = [this.tableData.time, this.tableData.temp, this.tableData.environmenttemp, this.tableData.averangeTemp];
               // 电量曲线
               this.dlList = [this.tableData.time, this.tableData.electric];
               // 运动量曲线
               this.ydlList = [this.tableData.time, this.tableData.sports];
               // 平均温度曲线
-              this.pjwdList = this.tableData.averangeTemp;
             } else {
               this.$message.error(res.data.msg);
             }

+ 1 - 1
src/views/pastureData/dayData.vue

@@ -86,7 +86,7 @@
             style="width: 100%;">
           <el-table-column
               prop="time"
-              label="采集时间"
+              label="最近采集时间"
               width="160">
           </el-table-column>
           <el-table-column