浏览代码

合并最新功能

Shan9312 1 年之前
父节点
当前提交
c3728a84c0

二进制
dist.zip


+ 3 - 3
src/views/basicData/equipmentTMR/index.vue

@@ -213,7 +213,7 @@ export default {
       cellStyle: { padding: 0 + 'px' },
       appoinsList:[],
       appoinObj:{
-        appoint:'',
+        appoint:0,
         appointName:""
       }
     }
@@ -232,7 +232,7 @@ export default {
      const arr= this.appoinsList.filter(item=>{
         return item.id === val;
       })
-      this.appoinObj.appoint = arr && arr[0].id;
+      this.appoinObj.appoint = arr && arr[0].id || 0;
       this.appoinObj.appointName =arr && arr[0].tname;
       console.log( this.appoinObj,'hss----111')
     },
@@ -309,7 +309,7 @@ export default {
           return false
         }
       }
-      this.table.list.unshift({ 'myId': (new Date()).valueOf(), 'Edit': true, 'NoEdit': false, 'isCreate': true, 'isUpdate': false, 'isUpdateSave': false, 'enable': 1, 'eqcode': '', 'tname': '', 'datacaptureno': '', 'tclassid': '', 'maxstirfeed': '', 'tcolor': '#ccc', 'autosecond': '0', 'imei': '','volume':'' })
+      this.table.list.unshift({ 'myId': (new Date()).valueOf(), 'Edit': true, 'NoEdit': false, 'isCreate': true, 'isUpdate': false, 'isUpdateSave': false, 'enable': 1, 'eqcode': '', 'tname': '', 'datacaptureno': '', 'tclassid': '', 'maxstirfeed': '', 'tcolor': '#ccc', 'autosecond': '0', 'imei': '','volume':'', 'appoint':0,'appointName':""})
     },
     // TMR设备类型
     changeType(item) {

文件差异内容过多而无法显示
+ 509 - 509
src/views/formulationPlan/dailyExecutionPlan/index.vue


+ 42 - 21
src/views/formulationPlan/recipeTemplate/index.vue

@@ -297,10 +297,9 @@
                 </el-select>
               </template>
             </el-table-column>
-            <el-table-column label="停机时间" min-width="70px" align="center">
+            <el-table-column label="加料前停机" min-width="70px" align="center">
               <template slot-scope="scope">
-                <span v-if="scope.row.NoEdit">{{ scope.row.shutdown }}</span>
-                <el-input v-if="scope.row.Edit" v-model="scope.row.shutdown" step="0.01" type="number" style="width:95%;padding:10px 0;" min-number="0"/>
+                <el-switch v-model="scope.row.shutdown" :disabled="scope.row.NoEdit==true" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0"  />
               </template>
             </el-table-column>
             <el-table-column label="顺序" min-width="70px" align="center">
@@ -350,7 +349,7 @@
             @cell-dblclick="celldblclick"
           >
             <el-table-column type="selection" width="50" />
-            <el-table-column label="序号" align="center" type="index" width="50px" />
+            <el-table-column label="序号11" align="center" type="index" width="50px" />
             <el-table-column label="饲料组" min-width="120px" align="center">
               <template slot-scope="scope">
                 <span v-if="scope.row.groupNoEdit">{{ scope.row.feedgroup }}</span>
@@ -365,7 +364,7 @@
                 </el-select>
               </template>
             </el-table-column>
-            <el-table-column label="重量(KG)" prop="fweight" width="120px" align="center">
+            <el-table-column label="重量123(KG)" prop="fweight" width="120px" align="center">
               <template slot-scope="scope">
                 <span v-if="scope.row.NoEdit">{{ scope.row.fweight }}</span>
                 <el-input v-if="scope.row.Edit" v-model="scope.row.fweight" placeholder="重量" step="0.0001" type="number" style="width:95%;padding:10px 0;" />
@@ -379,6 +378,19 @@
                 </el-select>
               </template>
             </el-table-column>
+            <!-- TODO: -->
+            <el-table-column label="允许延时偏差(min)" min-width="80px" align="center">
+              <template slot-scope="scope">
+                <span v-if="scope.row.NoEdit">{{ scope.row.deviation }}</span>
+                <el-input v-if="scope.row.Edit" v-model="scope.row.deviation" step="0.01" type="number" style="width:95%;padding:10px 0;" min-number="0" />
+              </template>
+            </el-table-column>
+            <el-table-column label="加料前停机" min-width="70px" align="center">
+              <template slot-scope="scope">
+                <el-switch v-model="scope.row.shutdown" :disabled="scope.row.NoEdit==true" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0"  />
+              </template>
+            </el-table-column>
+            <!--  -->
             <el-table-column v-if="lockCount.isLockCount" label="是否锁定牛头数比例" min-width="80px" align="center">
               <template slot-scope="scope">
                 <span v-if="scope.row.NoEdit && scope.row.islockcount == '0'">否</span>
@@ -2347,10 +2359,13 @@ export default {
       }else if (this.table2.temp.fid === '') {
         this.$message({ type: 'error', message: '饲料名称不能为空', duration: 2000 })
         return false
-      } else if (this.table2.temp.fweight === '') {
-        this.$message({ type: 'error', message: '重量不能为空', duration: 2000 })
-        return false
-      } else if (this.table2.temp.autosecond === '') {
+      }
+      // TODO: 临时去掉限制重量
+      // else if (this.table2.temp.fweight === '') {
+      //   this.$message({ type: 'error', message: '重量不能为空', duration: 2000 })
+      //   return false
+      // }
+       else if (this.table2.temp.autosecond === '') {
         this.$message({ type: 'error', message: '搅拌延时不能为空', duration: 2000 })
         return false
       } else if (this.table2.temp.deviation === '') {
@@ -2392,10 +2407,12 @@ export default {
       row.fweight = formatNum(row.fweight, 4)
       // return
       // var ruleWeight = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
-      if (this.table2.temp.fweight == 0) {
-        this.$message({ type: 'error', message: '重量请输入正数,最多保留四位小数', duration: 2000 })
-        return false
-      }
+
+      //TODO:
+      // if (this.table2.temp.fweight == 0) {
+      //   this.$message({ type: 'error', message: '重量请输入正数,最多保留四位小数', duration: 2000 })
+      //   return false
+      // }
       this.isokDisable = true
       setTimeout(() => {
         this.isokDisable = false
@@ -2578,10 +2595,13 @@ export default {
           }else if (this.table2.temp.fid === '') {
             this.$message({ type: 'error', message: '饲料名称不能为空', duration: 2000 })
             return false
-          } else if (this.table2.temp.fweight === '') {
-            this.$message({ type: 'error', message: '重量不能为空', duration: 2000 })
-            return false
-          } else if (this.table2.temp.autosecond === '') {
+          }
+          //TODO:
+          //  else if (this.table2.temp.fweight === '') {
+          //   this.$message({ type: 'error', message: '重量不能为空', duration: 2000 })
+          //   return false
+          // }
+           else if (this.table2.temp.autosecond === '') {
             this.$message({ type: 'error', message: '搅拌延时不能为空', duration: 2000 })
             return false
           } else if (this.table2.temp.deviation === '') {
@@ -2616,10 +2636,11 @@ export default {
           row.fweight = formatNum(row.fweight, 4)
           // 检验重量>0
           // var ruleWeight = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
-          if (this.table2.temp.fweight == 0) {
-            this.$message({ type: 'error', message: '重量请输入正数,最多保留四位小数', duration: 2000 })
-            return false
-          }
+          //TODO:
+          // if (this.table2.temp.fweight == 0) {
+          //   this.$message({ type: 'error', message: '重量请输入正数,最多保留四位小数', duration: 2000 })
+          //   return false
+          // }
           console.log(row.fweight,'row.fweight')
           let dateTime = parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}')
           this.requestParam.common = { 'returnmap': '0' }

+ 1 - 1
src/views/statisticalAnalysis/processAnalysis/group/index.vue

@@ -21,7 +21,7 @@
     </div>
     <el-row :gutter="20">
       <el-col :span="8">
-        <h4>TMR设备列表</h4>
+        <h4>TMR设备列表123</h4>
         <div class="table">
           <el-table
             :key="table.tableKey"

+ 1 - 1
src/views/statisticalAnalysis/processAnalysis/pasture/index.vue

@@ -45,7 +45,7 @@
         <span>-</span>
         <el-input-number :controls="false" :precision="2" v-model="maxproesstime" placeholder="过程时间" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
       </div>
-      <el-checkbox v-model="ccys"style="margin-right: 10px;" @change="changeccysChecked">只看超出预设值数据</el-checkbox>
+      <el-checkbox v-model="ccys"  style="margin-right: 10px;" @change="changeccysChecked">只看超出预设值数据</el-checkbox>
       <!-- 临时注释 -->
       <el-button class="successBorder" @click="form_search">查询</el-button>
       <el-button class="successBorder" @click="handleRefresh">重置</el-button>

+ 97 - 9
src/views/statisticalAnalysis/pushingplan/index.vue

@@ -55,23 +55,36 @@
           prop="remark"
         />
         <el-table-column
-          label="开始时间"
+          label="计划开始时间"
+          min-width="100px"
+          align="center"
+          prop="plandate"
+        />
+        <el-table-column
+          label="实际开始时间"
           min-width="100px"
           align="center"
           prop="startdate"
         />
         <el-table-column
-          label="结束时间"
+          label="偏差分钟数"
+          min-width="100px"
+          align="center"
+          prop="deviation"
+        />
+        <el-table-column
+          label="实际结束时间"
           min-width="100px"
           align="center"
           prop="enddate"
         />
         <el-table-column
-          label="运行时间"
+          label="实际时长(分钟)"
           min-width="100px"
           align="center"
-          prop="date"
+          prop="dates"
         />
+
         <el-table-column
           label="运行轨迹"
           align="center"
@@ -140,7 +153,38 @@
         </div>
       </template>
       <!-- <div style="margin-bottom: 20px;background-image: url('http://niu305.cn:8091/uploads/image/headphoto1.png');background-position: top right;"> -->
-      <div ref="map" class="map-container"></div>
+        <div class="run-box">
+          <div ref="map" class="map-container"></div>
+          <div class="run-box-rg">
+            <h3>推料计划详情</h3>
+            <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>
+
       <!-- </div> -->
       <div slot="footer" class="dialog-footer">
         <el-button
@@ -180,6 +224,7 @@ export default {
   name: 'Pushingplan',
   data() {
     return {
+      runDate:{},
       currentPage: 1,
       table: {
         offset: 1,
@@ -235,9 +280,19 @@ export default {
   created() {
     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) ;
+},
     // 分页
     handleSizeChange(val) {
       console.log(`每页 ${val} 条`)
@@ -280,9 +335,14 @@ export default {
         data.parammaps.enddate = ''
       }
       postJson(url, data).then((response) => {
-        console.log('table数据', response.data.list)
         if (response.data.list !== null) {
-          this.list = response.data.list
+          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 = []
         }
@@ -303,7 +363,9 @@ export default {
       this.getList()
     },
     handleRunning_trajectory(row) {
-      console.log('点击了运行轨迹')
+      this.runDate = row;
+      console.log('点击了运行轨迹',this.runDate );
+
       this.run.dialogStatus = 'run'
       this.run.dialogFormVisible = true
       this.run.temp = Object.assign({}, row)
@@ -428,9 +490,35 @@ export default {
 }
 </script>
 <style lang="scss" scoped>
+.run-box{
+  display: flex;
+  justify-content: space-between;
+  height: 600px;
+}
+.run-box-rg{
+  flex: 1;
+  padding-left: 20px;
+  min-width:300px;
+  font-size:16px;
+}
+.run-box-rg div>span{
+    font-size: 16px!important;
+    padding-right: 8px;
+    display: inline-block;
+    width: 120px;
+    text-align:right;
+    margin-bottom: 5px;
+  }
+  .run-box-rg>div{
+    margin: 8px 0;
+  }
+
+
 .map-container {
   height: 600px;
-  width: 1000px;
+  width: 840px;
+  border-right:1px dotted #eee;
+  padding:0 10px;
 }
 .search {
   clear: both;

部分文件因为文件数量过多而无法显示