Shan9312 1 年間 前
コミット
1b6a1892f7

+ 2 - 3
.env.development

@@ -3,11 +3,10 @@ ENV = 'development'
 
 # base api
 # 测试线
-# VUE_APP_BASE_API = 'http://192.168.1.70:8082/'
+# VUE_APP_BASE_API = 'http://192.168.1.76:8082/'
 VUE_APP_BASE_API = 'http://kpttest.kptyun.com/'
 # 白少后台本地
-# VUE_APP_BASE_API = 'http://192.168.1.233/'
-# VUE_APP_BASE_API = 'http://192.168.1.93/'
+
 # vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
 # to control whether the babel-plugin-dynamic-import-node plugin is enabled.
 # It only does one thing by converting all import() to require().

BIN
dist-tmr-20241225-正式.zip


BIN
dist-tmr-正式-20241205.zip


+ 8 - 1
src/api/common.js

@@ -497,4 +497,11 @@ export function editWeightSL(data) {
     method: 'POST',
     data
   })
-}
+}
+
+export function getPastureData() {
+  return request({
+    url: '/admin/special/restartMqtt.html',
+    method: 'POST'
+  })
+}

ファイルの差分が大きいため隠しています
+ 624 - 623
src/views/basicData/groupColumn/index.vue


+ 22 - 4
src/views/statisticalAnalysis/processAnalysis/pasture/index.vue

@@ -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)

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません