Ver Fonte

打包%班次优化

Shan9312 há 10 meses atrás
pai
commit
a94c927f83

BIN
dist-光明tmr-20240318.zip


Diff do ficheiro suprimidas por serem muito extensas
+ 2745 - 634
src/views/statisticalAnalysis/errorAnalysis/pasture/index.vue


+ 144 - 161
src/views/statisticalAnalysis/pushingplan/index.vue

@@ -1,4 +1,4 @@
- <template>
+<template>
   <div class="app-container">
     <div class="search">
       <el-date-picker
@@ -153,45 +153,29 @@
         </div>
       </template>
       <!-- <div style="margin-bottom: 20px;background-image: url('http://niu305.cn:8091/uploads/image/headphoto1.png');background-position: top right;"> -->
-        <div>
-          <h3>推料计划详情</h3>
-          <div class="run-box-rg">
-            <div>
-              <span>推料车:</span>{{runDate?.tname || '暂无'}}
-            </div>
-            <div>
-              <span>备注:</span>{{runDate?.remark || '暂无'}}
-            </div>
-            <div>
-              <span>计划开始时间:</span>{{runDate?.plandate || '暂无'}}
-            </div>
-            <div>
-              <span>实际开始时间:</span>{{runDate?.startdate || '暂无'}}
-            </div>
-            <div>
-              <span>偏差分钟数:</span>{{runDate?.deviation || '暂无'}}
-            </div>
-            <div>
-              <span>实际结束时间:</span>{{runDate?.enddate || '暂无'}}
-            </div>
-            <div>
-              <span>实际时长:</span>{{runDate?.dates || '暂无'}} 分钟
-            </div>
+      <div>
+        <h3>推料计划详情</h3>
+        <div class="run-box-rg">
+          <div><span>推料车:</span>{{ runDate.tname }}</div>
+          <div><span>备注:</span>{{ runDate.remark }}</div>
+          <div><span>计划开始时间:</span>{{ runDate.plandate }}</div>
+          <div><span>实际开始时间:</span>{{ runDate.startdate }}</div>
+          <div><span>偏差分钟数:</span>{{ runDate.deviation }}</div>
+          <div><span>实际结束时间:</span>{{ runDate.enddate }}</div>
+          <div><span>实际时长:</span>{{ runDate.dates }} 分钟</div>
 
-            <div>
-              <span>推料栏舍顺序:</span>{{ runDate?.bname || '暂无' }}
-            </div>
-          </div>
-          <div ref="map" class="map-container"></div>
+          <div><span>推料栏舍顺序:</span>{{ runDate.bname }}</div>
         </div>
+        <div ref="map" class="map-container"></div>
+      </div>
 
       <!-- </div> -->
       <div slot="footer" class="dialog-footer">
         <el-button
           class="cancelClose1"
           @click="
-            run.dialogFormVisible = false
-            getList()
+            run.dialogFormVisible = false;
+            getList();
           "
           >关闭</el-button
         >
@@ -206,40 +190,40 @@ import {
   postJson,
   getJson,
   formatNum,
-  checkButtons
-} from '@/api/common'
-import { parseTime } from '@/utils/index.js'
-import { MessageBox } from 'element-ui'
-import Cookies from 'js-cookie'
-import axios from 'axios'
-import { getToken } from '@/utils/auth'
-import { createApp } from 'vue'
-import AMapLoader from '@amap/amap-jsapi-loader'
+  checkButtons,
+} from "@/api/common";
+import { parseTime } from "@/utils/index.js";
+import { MessageBox } from "element-ui";
+import Cookies from "js-cookie";
+import axios from "axios";
+import { getToken } from "@/utils/auth";
+import { createApp } from "vue";
+import AMapLoader from "@amap/amap-jsapi-loader";
 // import vLoUrl from '../../../assets/images/tet.png'
-import vLoUrl from '../../../assets/images/guiji2.jpeg'
+import vLoUrl from "../../../assets/images/guiji2.jpeg";
 window._AMapSecurityConfig = {
-  securityJsCode: '0133db0118e961029dc45a2d5039cbb1' // '「申请的安全密钥」',
-}
+  securityJsCode: "0133db0118e961029dc45a2d5039cbb1", // '「申请的安全密钥」',
+};
 export default {
-  name: 'Pushingplan',
+  name: "Pushingplan",
   data() {
     return {
-      runDate:{},
+      runDate: {},
       currentPage: 1,
       table: {
         offset: 1,
-        name: 'getTmrEqipmemtList',
+        name: "getTmrEqipmemtList",
         pagecount: 50,
         parammaps: {
           // pastureid: Cookies.get('pastureid'),
-          tname: '',
-          startdate: '',
-          enddate: '',
-          inputDatetime: null
+          tname: "",
+          startdate: "",
+          enddate: "",
+          inputDatetime: null,
           // startdate: parseTime(new Date(), '{y}-{m}-{d}'),
           // enddate: parseTime(new Date(), '{y}-{m}-{d}'),
           // inputDatetime: [new Date(), new Date()],
-        }
+        },
       },
       tableKey: 0,
       list: [],
@@ -248,14 +232,14 @@ export default {
 
       run: {
         dialogFormVisible: false,
-        dialogStatus: '',
-        temp: {}
+        dialogStatus: "",
+        temp: {},
       },
       dialogFull: false,
       isRoleEdit: [],
       isokDisable: false,
-      rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
-      cellStyle: { padding: 0 + 'px' },
+      rowStyle: { maxHeight: 30 + "px", height: 30 + "px" },
+      cellStyle: { padding: 0 + "px" },
       myHeight: document.documentElement.clientHeight - 85 - 150,
       map: null,
       path: [],
@@ -269,126 +253,126 @@ export default {
       latitude: 40.87873, // 实景图所在位置的纬度
       longitude: 113.216553, // 实景图所在位置的经度
       zoom: 17, // 实景
-      apiKey: 'fb6a0e88dbad4931d96a121bcf7c4442',
-      vLoUrl
-    }
+      apiKey: "fb6a0e88dbad4931d96a121bcf7c4442",
+      vLoUrl,
+    };
   },
 
   mounted() {
     // this.initMap();
   },
   created() {
-    this.getButtons()
-    this.getList()
-    var totalTimeInMinutes = this.timeStringToMinutes('12:20:27');
-     console.log(totalTimeInMinutes);
+    this.getButtons();
+    this.getList();
+    var totalTimeInMinutes = this.timeStringToMinutes("12:20:27");
+    console.log(totalTimeInMinutes);
   },
 
   methods: {
     // 点击查看的时候获取 推车的数据并去获取推料的原计划
     timeStringToMinutes(timeString) {
-    var timeParts = timeString.split(':');
-    var hours = parseInt(timeParts[0]);
-    var minutes = parseInt(timeParts[1]);
-    var seconds = parseInt(timeParts[2]);
-    return (hours * 60 + minutes + seconds / 60).toFixed(2) ;
-},
+      var timeParts = timeString.split(":");
+      var hours = parseInt(timeParts[0]);
+      var minutes = parseInt(timeParts[1]);
+      var seconds = parseInt(timeParts[2]);
+      return (hours * 60 + minutes + seconds / 60).toFixed(2);
+    },
     // 分页
     handleSizeChange(val) {
-      console.log(`每页 ${val} 条`)
-      this.table.pagecount = val
-      this.table.offset = 1
-      this.currentPage = 1
-      this.getList()
+      console.log(`每页 ${val} 条`);
+      this.table.pagecount = val;
+      this.table.offset = 1;
+      this.currentPage = 1;
+      this.getList();
     },
     handleCurrentChange(val) {
-      console.log(`当前页: ${val}`)
-      this.currentPage = val
-      this.table.offset = val
-      this.getList()
+      console.log(`当前页: ${val}`);
+      this.currentPage = val;
+      this.table.offset = val;
+      this.getList();
     },
     getButtons() {
-      const Edit = 'Pushingplan'
+      const Edit = "Pushingplan";
       const isRoleEdit = checkButtons(
-        JSON.parse(sessionStorage.getItem('buttons')),
+        JSON.parse(sessionStorage.getItem("buttons")),
         Edit
-      )
-      this.isRoleEdit = isRoleEdit
+      );
+      this.isRoleEdit = isRoleEdit;
     },
 
     getList() {
-      this.listLoading = true
-      let url = '/authdata/GetDataByName'
-      let data = this.table
+      this.listLoading = true;
+      let url = "/authdata/GetDataByName";
+      let data = this.table;
 
       if (this.table.parammaps.inputDatetime !== null) {
         data.parammaps.startdate = parseTime(
           this.table.parammaps.inputDatetime[0],
-          '{y}-{m}-{d}'
-        )
+          "{y}-{m}-{d}"
+        );
         data.parammaps.enddate = parseTime(
           this.table.parammaps.inputDatetime[1],
-          '{y}-{m}-{d}'
-        )
+          "{y}-{m}-{d}"
+        );
       } else {
-        data.parammaps.startdate = ''
-        data.parammaps.enddate = ''
+        data.parammaps.startdate = "";
+        data.parammaps.enddate = "";
       }
       postJson(url, data).then((response) => {
         if (response.data.list !== null) {
-          let arr = JSON.parse(JSON.stringify(response.data.list))
-          arr.forEach((item)=>{
-             item.dates = this.timeStringToMinutes(item.date) || item.date;
-             item.deviation = this.timeStringToMinutes(item.deviation) || item.deviation;
-          })
-          this.list = arr
-
+          let arr = JSON.parse(JSON.stringify(response.data.list));
+          arr.forEach((item) => {
+            item.dates = this.timeStringToMinutes(item.date) || item.date;
+            item.deviation =
+              this.timeStringToMinutes(item.deviation) || item.deviation;
+          });
+          this.list = arr;
         } else {
-          this.list = []
+          this.list = [];
         }
-        this.total = response.data.total
+        this.total = response.data.total;
         setTimeout(() => {
-          this.listLoading = false
-        }, 100)
-      })
+          this.listLoading = false;
+        }, 100);
+      });
     },
 
     form_search() {
-      console.log('点击了查询')
-      this.getList()
+      console.log("点击了查询");
+      this.getList();
     },
     handleRefresh() {
-      this.table.parammaps.tname = ''
-      this.table.parammaps.inputDatetime = null
-      this.getList()
+      this.table.parammaps.tname = "";
+      this.table.parammaps.inputDatetime = null;
+      this.getList();
     },
     handleRunning_trajectory(row) {
       this.runDate = row;
-      console.log('点击了运行轨迹',this.runDate );
+      console.log("点击了运行轨迹", this.runDate);
 
-      this.run.dialogStatus = 'run'
-      this.run.dialogFormVisible = true
-      this.run.temp = Object.assign({}, row)
-      this.getRuningList()
+      this.run.dialogStatus = "run";
+      this.run.dialogFormVisible = true;
+      this.run.temp = Object.assign({}, row);
+      this.getRuningList();
     },
 
     getRuningList() {
-      let url = '/authdata/equipment/muster'
-      let data = '?id=' + this.run.temp.id
+      let url = "/authdata/equipment/muster";
+      let data = "?id=" + this.run.temp.id;
       getJson(url, data).then((response) => {
         // path
         // console.log('table数据', response.data.list)
         if (response.data !== null) {
-          let arrList = []
+          let arrList = [];
           for (let i = 0; i < response.data.length; i++) {
-            let list = []
+            let list = [];
             // let str= `${parseFloat(response.data[i].N)} ${parseFloat(response.data[i].A)} `
             list.push(
               parseFloat(response.data[i].N),
               parseFloat(response.data[i].A)
-            )
+            );
 
-            arrList.push(list)
+            arrList.push(list);
             ////////
             // let testArr =[];
             // testArr.push(parseFloat(response.data[i].A),parseFloat(response.data[i].N));
@@ -396,7 +380,7 @@ export default {
             //////
           }
 
-          this.path = arrList //真实数据
+          this.path = arrList; //真实数据
           //  console.log(JSON.stringify(arrList),'arrList')
           //  console.log(arrList.join('\n'),'9999999');
           // 测试数据
@@ -426,19 +410,19 @@ export default {
           // this.latitude = this.path[0][1] // 实景图所在位置的纬度
           // zoom: 15, // 实景
         } else {
-          this.path = []
+          this.path = [];
         }
-        this.initMap()
-      })
+        this.initMap();
+      });
     },
     async initMap() {
       await AMapLoader.load({
-        key: 'fb6a0e88dbad4931d96a121bcf7c4442', // 替换为你的高德地图API Key
-        version: '2.0',
-        plugins: []
-      }).then(() => {})
+        key: "fb6a0e88dbad4931d96a121bcf7c4442", // 替换为你的高德地图API Key
+        version: "2.0",
+        plugins: [],
+      }).then(() => {});
       // 后续牧场栏舍图
-      var backgroundImageUrl = this.vLoUrl // 示例图片链接
+      var backgroundImageUrl = this.vLoUrl; // 示例图片链接
       var imageLayer = new AMap.ImageLayer({
         url: backgroundImageUrl,
         bounds: new AMap.Bounds(
@@ -449,74 +433,73 @@ export default {
           [113.21478078, 40.87649131], //左下角;
           [113.23067741, 40.88588863] // 右上角
         ), //图片范围大小的经纬度,传入西南和东北的经纬度坐标
-        zooms: [15, 20]
-      })
+        zooms: [15, 20],
+      });
       this.map = new window.AMap.Map(this.$refs.map, {
         zoom: 18,
         // zIndex:2,
         center: [113.21549472999999, 40.879621060000005],
-        layers: [AMap.createDefaultLayer(), imageLayer]
-      })
+        layers: [AMap.createDefaultLayer(), imageLayer],
+      });
       const startMarker = new window.AMap.Marker({
         position: this.path[this.path.length - 1], // 起始点位置
         map: this.map,
-        icon: 'https://webapi.amap.com/theme/v1.3/markers/n/start.png' // 起始点图标
-      })
+        icon: "https://webapi.amap.com/theme/v1.3/markers/n/start.png", // 起始点图标
+      });
       const endMarker = new window.AMap.Marker({
         position: this.path[0],
         map: this.map,
-        icon: 'https://webapi.amap.com/theme/v1.3/markers/n/end.png' // 终点图标
-      })
+        icon: "https://webapi.amap.com/theme/v1.3/markers/n/end.png", // 终点图标
+      });
 
-      this.drawPath()
+      this.drawPath();
     },
     drawPath() {
       const polyline = new window.AMap.Polyline({
         path: this.path,
-        strokeStyle: 'red',
-        strokeColor: '#F9423A',
+        strokeStyle: "red",
+        strokeColor: "#F9423A",
         strokeOpacity: 1,
         strokeWeight: 3,
         map: this.map,
-        dirArrowStyle: true
-      })
+        dirArrowStyle: true,
+      });
 
       // 调整地图视图以适应轨迹
 
-      this.map.setFitView()
-      this.map.setZoom(18)
-    }
-  }
-}
+      this.map.setFitView();
+      this.map.setZoom(18);
+    },
+  },
+};
 </script>
 <style lang="scss" scoped>
-.run-box{
+.run-box {
   height: 600px;
 }
-.run-box-rg{
+.run-box-rg {
   display: flex;
-  justify-content:left;
+  justify-content: left;
   flex-direction: row;
   flex-wrap: wrap;
-  padding:  0px 20px;
-  font-size:16px;
-  border-bottom:1px dotted #eee;
+  padding: 0px 20px;
+  font-size: 16px;
+  border-bottom: 1px dotted #eee;
 }
-.run-box-rg div{
-  margin-bottom:10px;
-  margin-right:15px;
+.run-box-rg div {
+  margin-bottom: 10px;
+  margin-right: 15px;
+}
+.run-box-rg div > span {
+  font-size: 16px !important;
+  font-weight: 600;
 }
-.run-box-rg div>span{
-    font-size: 16px!important;
-    font-weight: 600;
-
-  }
 
 .map-container {
   height: 600px;
   // width: 840px;
   // border-right:1px dotted #eee;
-  padding:0 10px;
+  padding: 0 10px;
 }
 .search {
   clear: both;

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff