|
@@ -96,10 +96,8 @@
|
|
|
</el-date-picker>
|
|
|
</div>
|
|
|
<div class="important-chart">
|
|
|
- <important-line
|
|
|
- :listData="importantData"
|
|
|
- v-bind="importantTitle"
|
|
|
- ></important-line>
|
|
|
+ <important-line :listData="importantData" v-bind="importantTitle">
|
|
|
+ </important-line>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -200,6 +198,14 @@
|
|
|
:shows="safetyTableShows"
|
|
|
:listData="safetyTableData"
|
|
|
>
|
|
|
+ <template #isWarning="slotProps">
|
|
|
+ <el-tag
|
|
|
+ :type="slotProps.row.isWarning ? 'success' : 'warning'"
|
|
|
+ effect="dark"
|
|
|
+ >
|
|
|
+ {{ slotProps.row.isWarning ? "已报警" : "未报警" }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
</table-content>
|
|
|
<table-footer
|
|
|
:totals="total"
|
|
@@ -605,10 +611,14 @@ export default {
|
|
|
// 安全库存报警
|
|
|
initSafeInventory() {
|
|
|
getSafeInventory({
|
|
|
- current: this.size,
|
|
|
- size: this.pageNum,
|
|
|
+ current: this.pageNum,
|
|
|
+ size: this.size,
|
|
|
}).then((res) => {
|
|
|
// console.log(res);
|
|
|
+ if (res.code === 10000) {
|
|
|
+ this.safetyTableData = res.data.records;
|
|
|
+ this.total = res.data.total;
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
// 生产情况
|
|
@@ -644,14 +654,57 @@ export default {
|
|
|
type: this.importantValue,
|
|
|
}).then((res) => {
|
|
|
const types = [
|
|
|
- ["break_rate"],
|
|
|
- ["avg_farrow_1", "avg_farrow_2", "avg_farrow_3"],
|
|
|
- ["avg_weight", "break_grice"],
|
|
|
- ["fatpig_rate", "grice_rate", "piglet_rate"],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ type: "break_rate",
|
|
|
+ name: "七日断配率",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ type: "avg_farrow_1",
|
|
|
+ name: "平均窝产仔猪数",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "avg_farrow_2",
|
|
|
+ name: "平均窝产活仔数",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "avg_farrow_3",
|
|
|
+ name: "平均窝产正常仔数",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ type: "avg_weight",
|
|
|
+ name: "平均断奶窝重",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "break_grice",
|
|
|
+ name: "窝断奶仔猪数",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ type: "fatpig_rate",
|
|
|
+ name: "肥猪成活率",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "grice_rate",
|
|
|
+ name: "产房成活率",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "piglet_rate",
|
|
|
+ name: "保育成活率",
|
|
|
+ },
|
|
|
+ ],
|
|
|
];
|
|
|
this.importantData = [];
|
|
|
- types[this.importantValue - 1].forEach((type) => {
|
|
|
- this.importantData.push(res.data[type]);
|
|
|
+ types[this.importantValue - 1].forEach((item) => {
|
|
|
+ this.importantData.push({
|
|
|
+ ...res.data[item.type],
|
|
|
+ name: item.name, // 各项名称
|
|
|
+ });
|
|
|
});
|
|
|
this.importantTitle = {
|
|
|
isPercentage: res.data["isPercentage"],
|
|
@@ -686,11 +739,14 @@ export default {
|
|
|
this.weekSalesChange = res.data.moneyPercent;
|
|
|
this.weekSalesVolume = res.data.quantity;
|
|
|
this.weekSalesVolumeChange = res.data.quantityPercent;
|
|
|
+ // console.log("救命");
|
|
|
this.salesChartData = {
|
|
|
moneyList: res.data.moneyList,
|
|
|
+ moneyList1: res.data.moneyList1,
|
|
|
quantityList: res.data.quantityList,
|
|
|
timeList: res.data.timeList,
|
|
|
};
|
|
|
+ // console.log(this.salesChartData);
|
|
|
}
|
|
|
});
|
|
|
},
|