|
|
@@ -273,12 +273,13 @@
|
|
|
<div class="app-history">
|
|
|
<div class="search">
|
|
|
<el-date-picker v-model="history.getdataListParm.parammaps.date" type="date" placeholder="请选择历史记录时间" :clearable="false" style="width: 180px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="changeDate" />
|
|
|
- <!-- <el-select v-model="history.getdataListParm.parammaps.barid" clearable filterable placeholder="请选择栏舍" style="width: 180px;" class="filter-item">
|
|
|
- <el-option v-for="item in barList" :key="item.id" :label="item.bname" :value="item.id" />
|
|
|
+ <el-select v-model="history.getdataListParm.parammaps.barName" clearable filterable placeholder="请选择栏舍" style="width: 180px;" class="filter-item">
|
|
|
+ <el-option v-for="item in barList" :key="item.id" :label="item.bname" :value="item.bname" />
|
|
|
</el-select>
|
|
|
- <el-input v-model="history.getdataListParm.parammaps.tname" placeholder="请输入配方名称" style="width: 180px;" class="filter-item" />
|
|
|
- <el-button class="successBorder" @click="handleHistorySearch">查询</el-button> -->
|
|
|
- <!-- <el-button class="successBorder" @click="handleApplication">应用</el-button> -->
|
|
|
+ <!-- <el-input v-model="history.getdataListParm.parammaps.tname" placeholder="请输入配方名称" style="width: 180px;" class="filter-item" /> -->
|
|
|
+ <el-button class="successBorder" @click="handleHistorySearch">查询</el-button>
|
|
|
+ <el-button class="export" icon="el-icon-upload2" @click="handleExport(3)">导出</el-button>
|
|
|
+
|
|
|
</div>
|
|
|
<div class="table">
|
|
|
<u-table
|
|
|
@@ -1146,6 +1147,10 @@ export default {
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ handleHistorySearch(){
|
|
|
+ this.table
|
|
|
+ this.getDateList()
|
|
|
+ },
|
|
|
getButtons() {
|
|
|
const Edit = 'DhedFormula'
|
|
|
const isRoleEdit = checkButtons(JSON.parse(sessionStorage.getItem('buttons')), Edit)
|
|
|
@@ -3182,7 +3187,22 @@ export default {
|
|
|
]
|
|
|
json2excel(excelDatas, '栏舍配方导入模板', true, 'xlsx')
|
|
|
})
|
|
|
- } else {
|
|
|
+ } else if (item == 3){
|
|
|
+ GetDataByName(this.history.getdataDateParm).then(response => {
|
|
|
+ console.log('历史数据', this.history.list)
|
|
|
+ if (response.data.list !== null) {
|
|
|
+ var excelDatas = [
|
|
|
+ {
|
|
|
+ tHeader: ['栏舍名称','班次', '软件牛头数', '实际牛头数', '系数(%)', '系数头数', '配方模板', '班次比例', '班次重量', '配方重量', '配方干物质', '饲喂干物质量','采样干物质量','日投喂量'],
|
|
|
+ filterVal: ['barname', 'times','softccount', 'ccount', 'ratio', 'ccountratio', 'ptname', 'tratio', 'weight', 'pweight', 'dryweight', 'swdryw', 'cydryw','sumweight'],
|
|
|
+ tableDatas: this.history.list,
|
|
|
+ sheetName: 'Sheet1'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ json2excel(excelDatas, '历史记录栏舍配方', true, 'xlsx')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else {
|
|
|
console.log('点击了导出数据')
|
|
|
this.download.getdataListParm.parammaps = this.table.getdataListParm.parammaps
|
|
|
GetDataByName(this.download.getdataListParm).then(response => {
|
|
|
@@ -3293,6 +3313,8 @@ export default {
|
|
|
json2excel(excelDatas, '栏舍配方', true, 'xlsx')
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
|
|
|
beforeImport(file) {
|