|
|
@@ -49,6 +49,7 @@
|
|
|
<!-- 临时注释 -->
|
|
|
<el-button class="successBorder" @click="form_search">查询</el-button>
|
|
|
<el-button class="successBorder" @click="handleRefresh">重置</el-button>
|
|
|
+ <el-button class="successBorder" @click="handleGetPastureData">牧场数据获取</el-button>
|
|
|
</div>
|
|
|
<el-row :gutter="10">
|
|
|
<el-col :span="8">
|
|
|
@@ -623,9 +624,11 @@
|
|
|
import echarts from 'echarts'
|
|
|
|
|
|
require('echarts/theme/macarons')
|
|
|
-import { GetDataByName, GetReportform, formatNum,processAnalysist,editWeightHL,editWeightSL } from '@/api/common'
|
|
|
+import { GetDataByName, GetReportform, formatNum,processAnalysist,editWeightHL,editWeightSL,getPastureData } from '@/api/common'
|
|
|
import Cookies from 'js-cookie'
|
|
|
import { parseTime } from '@/utils/index.js'
|
|
|
+import { MessageBox } from 'element-ui';
|
|
|
+
|
|
|
export default {
|
|
|
name: 'PastureProcessAnalysis',
|
|
|
data() {
|
|
|
@@ -812,6 +815,21 @@ export default {
|
|
|
this.getList()
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 牧场数据获取
|
|
|
+ handleGetPastureData(){
|
|
|
+ console.log('牧场数据获取')
|
|
|
+
|
|
|
+ getPastureData().then(response => {
|
|
|
+ console.log('请求成功:', response.data);
|
|
|
+ MessageBox.alert('操作成功!牧场数据正在同步到平台数据库,此操作根据不同牧场的数据大小耗时也不同,大约需要5-30分钟', '提示', {
|
|
|
+ confirmButtonText: '关闭',
|
|
|
+ type: 'success',
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(error => {
|
|
|
+ console.error('请求失败:', error);
|
|
|
+ });
|
|
|
+ },
|
|
|
// 编辑实际重量
|
|
|
handleClick(row,type){
|
|
|
this.dialogFormVisible = true;
|
|
|
@@ -822,7 +840,7 @@ export default {
|
|
|
this.form.userId = Cookies.get('employeid')
|
|
|
this.form.type = type;
|
|
|
console.log(row,'实际重量');
|
|
|
-
|
|
|
+
|
|
|
|
|
|
},
|
|
|
// 点击确认修改
|
|
|
@@ -838,7 +856,7 @@ export default {
|
|
|
this.handleEditWgSL(this.form)
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 混料
|
|
|
async handleEditWgHL(obj){
|
|
|
const {data} =await editWeightHL(obj);
|
|
|
@@ -862,7 +880,7 @@ export default {
|
|
|
}
|
|
|
this.getList4()
|
|
|
this.dialogFormVisible = false
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
change_date(e){
|
|
|
console.log(e)
|