|
@@ -8,16 +8,16 @@
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="6" style="text-align:right;">
|
|
<el-col :span="6" style="text-align:right;">
|
|
<div>
|
|
<div>
|
|
- <el-date-picker
|
|
|
|
|
|
+ <!-- <el-date-picker
|
|
v-model="date"
|
|
v-model="date"
|
|
@change="pickerChange"
|
|
@change="pickerChange"
|
|
type="date"
|
|
type="date"
|
|
placeholder="选择日期"
|
|
placeholder="选择日期"
|
|
- ></el-date-picker>
|
|
|
|
|
|
+ ></el-date-picker>-->
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="2" style="text-align:right;">
|
|
<el-col :span="2" style="text-align:right;">
|
|
- <el-link type="primary" @click="toSowDetail">查看母猪信息</el-link>
|
|
|
|
|
|
+ <!-- <el-link type="primary" @click="toSowDetail">查看母猪信息</el-link> -->
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</header>
|
|
</header>
|
|
@@ -133,7 +133,8 @@
|
|
</article>
|
|
</article>
|
|
<article class="charts">
|
|
<article class="charts">
|
|
<div>
|
|
<div>
|
|
- <E-Con-T :dataArr="containerT" :timeArr="containertime"></E-Con-T>
|
|
|
|
|
|
+ <!-- <E-Con-T :dataArr="containerT" :timeArr="containertime"></E-Con-T> -->
|
|
|
|
+ <E-Con-T :dataArr="envTemp" :timeArr="time"></E-Con-T>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
<E-Sow-T :dataArr="animalTemp" :timeArr="time"></E-Sow-T>
|
|
<E-Sow-T :dataArr="animalTemp" :timeArr="time"></E-Sow-T>
|
|
@@ -260,23 +261,6 @@ const pickerOptions = {
|
|
}
|
|
}
|
|
]
|
|
]
|
|
};
|
|
};
|
|
-const format = {
|
|
|
|
- f1(percentage) {
|
|
|
|
- return `产仔数:${14}`;
|
|
|
|
- },
|
|
|
|
- f2(percentage) {
|
|
|
|
- return `活仔数:${14}`;
|
|
|
|
- },
|
|
|
|
- f3(percentage) {
|
|
|
|
- return `存活率:${percentage}%`;
|
|
|
|
- },
|
|
|
|
- f4(percentage) {
|
|
|
|
- return `预计断奶剩余天数:${30}`;
|
|
|
|
- },
|
|
|
|
- f5(percentage) {
|
|
|
|
- return `仔猪日龄:${30}`;
|
|
|
|
- }
|
|
|
|
-};
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "Detail",
|
|
name: "Detail",
|
|
@@ -291,7 +275,23 @@ export default {
|
|
active: 3,
|
|
active: 3,
|
|
bed: null,
|
|
bed: null,
|
|
date: "",
|
|
date: "",
|
|
- format,
|
|
|
|
|
|
+ format: {
|
|
|
|
+ f1: (percentage) => {
|
|
|
|
+ return `产仔数:${this.bed.litter.deliverNumber}`;
|
|
|
|
+ },
|
|
|
|
+ f2:(percentage) => {
|
|
|
|
+ return `活仔数:${this.bed.litter.deliverNumber}`;
|
|
|
|
+ },
|
|
|
|
+ f3:(percentage) => {
|
|
|
|
+ return `存活率:${percentage}%`;
|
|
|
|
+ },
|
|
|
|
+ f4:(percentage) => {
|
|
|
|
+ return `预计断奶剩余天数:${30}`;
|
|
|
|
+ },
|
|
|
|
+ f5:(percentage) => {
|
|
|
|
+ return `仔猪日龄:${30}`;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
empty: [[], []],
|
|
empty: [[], []],
|
|
isShow: false,
|
|
isShow: false,
|
|
containerT: [],
|
|
containerT: [],
|
|
@@ -314,9 +314,7 @@ export default {
|
|
let data = { code };
|
|
let data = { code };
|
|
reqBedInfo(data)
|
|
reqBedInfo(data)
|
|
.then(res => {
|
|
.then(res => {
|
|
- console.log(res);
|
|
|
|
this.bed = res;
|
|
this.bed = res;
|
|
- console.log(99999999999999);
|
|
|
|
// 获取耳标温度
|
|
// 获取耳标温度
|
|
this.getEarTagTemp();
|
|
this.getEarTagTemp();
|
|
//加载分析系统 设备数据
|
|
//加载分析系统 设备数据
|
|
@@ -335,17 +333,16 @@ export default {
|
|
end: new Date().getTime()
|
|
end: new Date().getTime()
|
|
})
|
|
})
|
|
.then(res => {
|
|
.then(res => {
|
|
- console.log(res);
|
|
|
|
- this.time = []
|
|
|
|
- this.envTemp = []
|
|
|
|
- this.animalTemp = []
|
|
|
|
- this.battery = []
|
|
|
|
|
|
+ this.time = [];
|
|
|
|
+ this.envTemp = [];
|
|
|
|
+ this.animalTemp = [];
|
|
|
|
+ this.battery = [];
|
|
res.content.forEach(item => {
|
|
res.content.forEach(item => {
|
|
- this.time.unshift(item.time)
|
|
|
|
- this.envTemp.unshift(item.envTemp)
|
|
|
|
- this.animalTemp.unshift(item.animalTemp)
|
|
|
|
- this.battery.unshift(item.battery * 100)
|
|
|
|
- })
|
|
|
|
|
|
+ this.time.unshift(item.time);
|
|
|
|
+ this.envTemp.unshift(item.envTemp);
|
|
|
|
+ this.animalTemp.unshift(item.animalTemp);
|
|
|
|
+ this.battery.unshift(item.battery * 100);
|
|
|
|
+ });
|
|
})
|
|
})
|
|
.catch(err => {
|
|
.catch(err => {
|
|
console.error(err);
|
|
console.error(err);
|
|
@@ -365,7 +362,9 @@ export default {
|
|
this.loadImage(this.piggyData[i], i);
|
|
this.loadImage(this.piggyData[i], i);
|
|
//
|
|
//
|
|
this.containerT.unshift(this.piggyData[i].temp);
|
|
this.containerT.unshift(this.piggyData[i].temp);
|
|
- this.containertime.unshift(this.piggyData[i].created);
|
|
|
|
|
|
+ this.containertime.unshift(
|
|
|
|
+ this.piggyData[i].created
|
|
|
|
+ );
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|