1
zhang
昨天 b8ed2917f1da6f644bf76b78f61720870b0b27ad
Monitor-APP/pages/home/home.vue
@@ -30,7 +30,8 @@
                                 <view class="flex-col" style="width: calc(100% - 5vw);">
                                    <view class="flex-row" style="position: relative;">
                                       <view style="width: 2vw;padding-left: 2vw;;font-size: 2vw;">
                                          {{baseInfo.xDistance}}</view>
                                          {{baseInfo.xDistance}}
                                       </view>
                                       <view style="position: absolute;bottom: 0;left: 10vw;">KM</view>
                                    </view>
                                    <view style="height: 100%;text-align: left;text-indent: 2em;">累计走行距离(千米)
@@ -43,7 +44,8 @@
                                 <view class="flex-col" style="width: calc(100% - 5vw);">
                                    <view class="flex-row" style="position: relative;">
                                       <view style="width: 2vw;padding-left: 2vw;;font-size: 2vw;">
                                          {{baseInfo.yDistance}}</view>
                                          {{baseInfo.yDistance}}
                                       </view>
                                       <view style="position: absolute;bottom: 0;left: 10vw;">KM</view>
                                    </view>
                                    <view style="height: 100%;text-align: left;text-indent: 2em;">累计升降距离(千米)
@@ -56,7 +58,8 @@
                                 <view class="flex-col" style="width: calc(100% - 5vw);">
                                    <view class="flex-row" style="position: relative;">
                                       <view style="-width: 2vw;padding-left: 2vw;;font-size: 2vw;">
                                          {{baseInfo.xDuration}}</view>
                                          {{baseInfo.xDuration}}
                                       </view>
                                       <view style="position: absolute;bottom: 0;left: 10vw;">H</view>
                                    </view>
                                    <view style="height: 100%;text-align: left;text-indent: 2em;">累计走行时长(小时)
@@ -69,7 +72,8 @@
                                 <view class="flex-col" style="width: calc(100% - 5vw);">
                                    <view class="flex-row" style="position: relative;">
                                       <view style="width: 2vw;padding-left: 2vw;;font-size: 2vw;">
                                          {{baseInfo.yDuration}}</view>
                                          {{baseInfo.yDuration}}
                                       </view>
                                       <view style="position: absolute;bottom: 0;left: 10vw;">H</view>
                                    </view>
                                    <view style="height: 100%;text-align: left;text-indent: 2em;">累计升降时长(小时)
@@ -108,7 +112,8 @@
                                 </view>
                                 <view
                                    style="position: absolute;bottom: 0;right: 0;font-size: 2.5vw;color: #FF5722;;">
                                    {{baseInfo.used}}</view>
                                    {{baseInfo.used}}
                                 </view>
                              </view>
                           </view>
                        </view>
@@ -187,21 +192,24 @@
                                          <view style="width: 8vw;height: 4vw;line-height: 4vw;">在库</view>
                                          <view
                                             style="width: 8vw;height: 4vw;line-height: 4vw;font-size: 2vw;">
                                             {{baseInfo.stockCount}}</view>
                                             {{baseInfo.stockCount}}
                                          </view>
                                       </view>
                                       <view class="flex-row sub-info" style="margin-top: 2vh;">
                                          <image src="../../static/f1.png" mode="aspectFit"></image>
                                          <view style="width: 8vw;height: 4vw;line-height: 4vw;">空库</view>
                                          <view
                                             style="width: 8vw;height: 4vw;line-height: 4vw;font-size: 2vw;">
                                             {{baseInfo.emptyCount}}</view>
                                             {{baseInfo.emptyCount}}
                                          </view>
                                       </view>
                                       <view class="flex-row sub-info" style="margin-top: 2vh;">
                                          <image src="../../static/e1.png" mode="aspectFit"></image>
                                          <view style="width: 8vw;height: 4vw;line-height: 4vw;">锁定</view>
                                          <view
                                             style="width: 8vw;height: 4vw;line-height: 4vw;font-size: 2vw;">
                                             {{baseInfo.noneCount}}</view>
                                             {{baseInfo.noneCount}}
                                          </view>
                                       </view>
                                    </view>
                                 </view>
@@ -209,14 +217,18 @@
                           </y-box>
                        </view>
                        <view style="height: 2%;"></view>
                        <view style="height: 18%;">
                           <y-box>
                              <view class="flex-col"
                                 style="width: 100%;height: 100%;font-size: 4vh;justify-content: center;letter-spacing: 1vh;">
                                 自动仓库WCS监控平台
                              </view>
                           </y-box>
                        <view style="height: 1%;"></view>
                        <view style="height: 18%;" class="flex-row">
                           <view  style ="margin-left: -4vw;height: 4vw;margin-top: 1vw;">
                              <image style="height: 4vw;" src="../../static/zy_logo.png" mode="aspectFit">
                              </image>
                           </view>
                           <view style ="width: 10vw;margin-left: -7vw;">
                              <image style="height: 8vw;" src="../../static/barcode.png" mode="aspectFit">
                              </image>
                           </view>
                        </view>
                     </view>
                  </view>
@@ -434,9 +446,9 @@
            times: 0,
            currDate: '',
            textred: 'textred',
            apiIp: '10.10.10.203',
            apiIp: '10.10.32.200',
            apiPort: '9090',
            apiUrl: 'rqdzwcs',
            apiUrl: 'nbjswcs',
            ledInfosApi: '/console/getLedInfos'
         }
@@ -481,7 +493,7 @@
      },
      onLoad() {
         this.getLedInfo()
         setInterval(() => {
            this.getServerData()
            this.getDate2()
@@ -570,90 +582,50 @@
                  ledId: that.baseLedId
               },
               success(result) {
                  that.timeOut = false
                  that.times = 0
                  var res = result.data
                  const res1 = {
                     "data": [{
                           "ioType": 103,
                           "staNo": "STA002",
                           "workNo": "8888",
                           "matDtos": [{
                                 "matnr": "0050950010050001",
                                 "maknx": "小厨房",
                                 "proType": "电镀",
                                 "batch": null,
                                 "specs": "Φ35",
                                 "orderNo": "WHIN2503000101",
                                 "outOrderNo": "BYM2024-1007SN高霖",
                                 "unit": "pcs",
                                 "weight": 450,
                                 "objectName": "Φ35铜小厨房",
                                 "length": 20,
                                 "temp1": "二号星河空心单孔(不带孔、M8螺纹孔)",
                                 "temp2": "1007SN高霖",
                                 "count": 1000,
                                 "anfme": 1000,
                                 "factArea": "高霖工厂"
                              },
                              {
                                 "matnr": "0050950010050002",
                                 "proType": "电镀",
                                 "maknx": "大厨房",
                                 "batch": "B20240521A",
                                 "specs": "Φ45",
                                 "orderNo": "WHIN2503000102",
                                 "outOrderNo": "BYM2024-1008SN高霖",
                                 "unit": "pcs",
                                 "weight": 520,
                                 "objectName": "Φ45铜大厨房",
                                 "length": 22,
                                 "temp1": "D1075000入墙喷枪龙头(57铜、体抛砂、2个螺丝孔)SH095",
                                 "temp2": "1007SN高霖",
                                 "count": 800,
                                 "anfme": 800,
                                 "factArea": "中扬工厂"
                              },
                              {
                                 "matnr": "0050950010050003",
                                 "proType": "电镀",
                                 "maknx": "浴室配件",
                                 "batch": "B20240521B",
                                 "specs": "Φ28",
                                 "orderNo": "WHIN2503000103",
                                 "outOrderNo": "BYM2024-1009SN高霖",
                                 "unit": "套",
                                 "weight": 300,
                                 "objectName": "Φ28镀铬套件",
                                 "length": 18,
                                 "temp1": "Φ28镀铬套件",
                                 "temp2": "1007SN高霖",
                                 "count": 600,
                                 "anfme": 600,
                                 "factArea": "中扬工厂"
                              },
                              {
                                 "matnr": "0050950010050004",
                                 "proType": "电镀",
                                 "maknx": "门把手",
                                 "batch": null,
                                 "specs": "L200*W30",
                                 "orderNo": "WHIN2503000104",
                                 "outOrderNo": "BYM2024-1010SN高霖",
                                 "unit": "个",
                                 "weight": 180,
                                 "objectName": "黑色铝门把手",
                                 "length": 20,
                                 "temp1": "黑色铝门把手",
                                 "temp2": "1007SN高霖",
                                 "count": 300,
                                 "anfme": 300,
                                 "factArea": "中扬工厂"
                              }
                           ]
                        }
                  var res = result.data
                  if (res.data && res.data !== "") {
                     if (that.infoType == 2 || that.infoType == 3) {
                        return;
                     }
                     ]
                     // infoType1:只有拣料等信息
                     that.infoType = 1
                     if (res.data[0].ioType === 101) {
                        that.infoText.title = '全板出库'
                     } else if (res.data[0].ioType === 103) {
                        that.infoText.title = '检料出库'
                     } else if (res.data[0].ioType === 107) {
                        that.infoText.title = '盘点出库'
                     } else if (res.data[0].ioType === 1) {
                        that.infoText.title = '入库'
                     } else if (res.data[0].ioType === 10) {
                        that.infoText.title = '空托入库'
                     } else if (res.data[0].ioType === 110) {
                        that.infoText.title = '空托出库'
                     }
                     that.infoText.barcode = res.data[0].barcode
                     that.infoText.workNo = res.data[0].workNo
                     that.infoText.sourceLocNo = res.data[0].sourceLocNo
                     that.infoText.staNo = res.data[0].staNo
                     that.swiperList = res.data[0].matDtos
                     // that.infoText.matnr = res.data[0].matDtos[0].matnr
                     // that.infoText.specs = res.data[0].matDtos[0].specs
                     // that.infoText.maknx = res.data[0].matDtos[0].maknx
                     // that.infoText.count = res.data[0].matDtos[0].count
                  } else {
                     if (that.infoType == 2 || that.infoType == 3) {
                        return;
                     }
                     that.infoType = 0
                  }
                  that.infoModel(res1)
               },
               fail(err) {
                  that.timeOut = true
                  that.times = that.times + 1
                  that.infoType = 0
               }
            })