|
@@ -93,11 +93,11 @@
|
|
|
<el-row :gutter="10" class="dashboard-editor-container">
|
|
|
<el-col :span="12">
|
|
|
<div class="grid-content">
|
|
|
- <h4 style="text-align:center;">泌乳牛干物质采食量</h4>
|
|
|
+ <h4 style="text-align:center;">干物质采食量</h4>
|
|
|
<div v-if="tab.chart1.isChart" class="button">
|
|
|
<div class="chartButton">
|
|
|
<my-select ref="tenantselect" :model="tab.chart1.getdataListParm.parammaps.statisticsList" :option="tab.chart1.statisticsList" :value="'name'" :label="'name'" style="width: 150px;margin-right: 5px;margin-top: 5px;float: left;" placeholder="请选择统计参数" @searchSelect="changeStatisticChart1" />
|
|
|
- <el-select v-model="tab.chart1.getdataListParm.parammaps.ccname" filterable placeholder="牲畜类别" class="filter-item" clearable style="width: 150px;margin-right: 5px;margin-top: 5px;" @change="changeLivestockType">
|
|
|
+ <el-select v-model="tab.chart1.getdataListParm.parammaps.bigcowclass" filterable placeholder="牲畜类别" class="filter-item" clearable style="width: 150px;margin-right: 5px;margin-top: 5px;" @change="changeLivestockType">
|
|
|
<el-option v-for="item in tab.chart1.livestockTypeList" :key="item.value" :label="item.label" :value="item.label" />
|
|
|
</el-select>
|
|
|
<el-radio-group v-model="tab.chart1.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;margin-right: 10px;" @change="changeChartSpecificDate('chart1')">
|
|
@@ -148,8 +148,8 @@
|
|
|
class="elTable table-fixed"
|
|
|
>
|
|
|
<el-table-column label="日期" sortable min-width="110px" align="center" prop="日期" />
|
|
|
- <el-table-column label="泌乳牛采食量(kg)" sortable min-width="110px" align="center" prop="field1" />
|
|
|
- <el-table-column label="泌乳牛产奶量(kg)" sortable min-width="110px" align="center" prop="field2" />
|
|
|
+ <el-table-column label="采食量(kg)" sortable min-width="110px" align="center" prop="field1" />
|
|
|
+ <el-table-column label="产奶量(kg)" sortable min-width="110px" align="center" prop="field2" />
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -1965,8 +1965,9 @@ export default {
|
|
|
data.parammaps.stopTime = this.tab.chart1.getdataListParm.parammaps.stopTime
|
|
|
data.parammaps.status = this.tab.chart1.getdataListParm.parammaps.status
|
|
|
}
|
|
|
+ data.parammaps.bigcowclass = this.tab.chart1.getdataListParm.parammaps.bigcowclass
|
|
|
postJson(url, data).then(response => {
|
|
|
- // if (response.data !== null && response.data.list !== null && response.data.data !== null) {
|
|
|
+ if (response.data !== null && response.data.data !== null) {
|
|
|
// console.log('泌乳牛干物质采食量图表数据', response.data.list)
|
|
|
// for (let i = 0; i < response.data.data.length; i++) {
|
|
|
// if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
|
|
@@ -1976,7 +1977,7 @@ export default {
|
|
|
// response.data.data[i].field2 = parseFloat(response.data.data[i].field2)
|
|
|
// }
|
|
|
// }
|
|
|
- // this.tab.chart1.table.list = response.data.data
|
|
|
+ this.tab.chart1.table.list = response.data.data
|
|
|
// this.tab.chart1.chartLine_data = response.data.list
|
|
|
// this.tab.chart1.chartLine_data = {
|
|
|
// chartType:'line_bar',
|
|
@@ -1994,7 +1995,10 @@ export default {
|
|
|
// [1, 10, 7, 0, 1, 7, 7, 6, 4, 4, 1, 6],
|
|
|
// ],
|
|
|
// }
|
|
|
- this.tab.chart1.chartLine_data = response.data
|
|
|
+ this.tab.chart1.chartLine_data = {}
|
|
|
+ this.tab.chart1.chartLine_data.date = response.data.date
|
|
|
+ this.tab.chart1.chartLine_data.dataArr1 = response.data.dataArr1
|
|
|
+ this.tab.chart1.chartLine_data.dataArr2 = response.data.dataArr2
|
|
|
this.tab.chart1.chartLine_data.legendArr1 = []
|
|
|
this.tab.chart1.chartLine_data.legendArr2 = []
|
|
|
response.data.ftname.forEach((item)=>{
|
|
@@ -2020,12 +2024,11 @@ export default {
|
|
|
obj.name = data3[i]
|
|
|
this.tab.chart1.statisticsList.push(obj)
|
|
|
}
|
|
|
- console.log(this.tab.chart1.getdataListParm.parammaps.statisticsList,'statisticsList')
|
|
|
// this.tab.chart1.total = response.data.total
|
|
|
- // } else {
|
|
|
- // this.tab.chart1.list = []
|
|
|
- // this.tab.chart1.chartLine_data = {}
|
|
|
- // }
|
|
|
+ } else {
|
|
|
+ this.tab.chart1.list = []
|
|
|
+ this.tab.chart1.chartLine_data = {}
|
|
|
+ }
|
|
|
this.roadChartLine1(this.tab.chart1.chartLine_data)
|
|
|
setTimeout(() => {
|
|
|
this.tab.chart1.listLoading = false
|
|
@@ -2050,8 +2053,8 @@ export default {
|
|
|
grid: { top: '15%', left: '8%', right: '8%', containLabel: true },
|
|
|
xAxis: [{ type: 'category', data: chartLine_data.date }],
|
|
|
yAxis: [
|
|
|
- { splitLine: { show: false }, type: 'value', name: '泌乳牛干物质\n采食量', axisLabel: { formatter: '{value} ' }},
|
|
|
- { splitLine: { show: false }, type: 'value', name: '泌乳牛产奶量', axisLabel: { formatter: '{value} ' }}
|
|
|
+ { splitLine: { show: false }, type: 'value', name: '干物质\n采食量', axisLabel: { formatter: '{value} ' }},
|
|
|
+ { splitLine: { show: false }, type: 'value', name: '产奶量', axisLabel: { formatter: '{value} ' }}
|
|
|
],
|
|
|
// series: [
|
|
|
// { name: '泌乳牛干物质采食量', type: 'bar', itemStyle: { normal: { color: '#61a5e8' }}, data: chartLine_data.data2 },
|