#
whycq
2022-05-16 d36ff3f80b4891f56342d5fb6bcc4390497ae348
Monitor-APP/pages/index/index.vue
@@ -18,8 +18,8 @@
                     <text>{{title}}</text>
                  </view>
                  <view style="width: 80%;height: 100%;display: inline-block;float: left;font-size: 160rpx;">
                     <text class="animate" v-show="!errorShow && !pakinShow">{{newspaper}}</text>
                     <text v-show="errorShow">{{newspaper}}</text>
                     <text class="animate" v-show="!errorShow && pakinShow && pakinGun">{{newspaper}}</text>
                     <text v-show="errorShow">{{errorPaper}}</text>
                     <text v-show="pakinShow">{{newspaper}}</text>
                  </view>
                  <view style="width: 10%;height: 100%;display: inline-block;float: right;padding-top: 180px;">
@@ -207,6 +207,7 @@
</template>
<script>
   import ycqdata from '@/pages/index/data.json';
   import demodata from '@/mockdata/demodata.json';
   export default {
      data() {
@@ -256,10 +257,12 @@
            version:'',
            // newspaper:'拣料出库(4426)\n源库位:1200101\n目标站:186\n1101842-10000-22047518517\n\n',   
            newspaper:'',
            errorPaper:'',
            title:'',
            staNo:'',
            errorShow:'',
            pakinShow:''
            pakinShow:'',
            pakinGun:'',
         }
      },
      mounted() {
@@ -292,9 +295,9 @@
            this.getPakin();
            this.getError();
            // this.getYYY();
            // this.getEEE();
            // this.getEEE();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
            this.animation();
         },1500)
         },3000)
      },
      onLoad() {
         // var that=this
@@ -303,6 +306,7 @@
         // });
      },
      methods: {
         getError() {
            let that = this
            uni.request({
@@ -314,15 +318,25 @@
               success(result) {
                  console.log(result)
                  let res = result.data 
                  if (res.data) {
                  if (res.data && res.data !== "") {
                     console.log('有异常')
                     that.title = ''
                     that.staNo = ''
                     that.pakinShow = false
                     that.errorShow = true
                     that.newspaper = res.data
                     that.move = false
                     that.errorPaper = res.data
                     that.move = false // 显示
                  } else {
                     that.newspaper = ''
                     that.errorPaper = ''
                     that.errorShow = false
                     console.log('无异常')
                     console.log(that.pakinShow)
                     if (that.pakinShow) {
                        console.log('无异常,有拣货')
                        return;
                     } else {
                        that.move = true // 隐藏
                     }
                  }
               }
            });
@@ -341,10 +355,14 @@
                  var str = ''
                  let res = result.data
                  if(res.data) {
                     if (res.data[0].matDtos) {
                        if (res.data[0].matDtos.length <= 8) {
                           that.pakinShow = true
                        }
                     console.log("拣货,有拣料")
                     if (res.data[0].matDtos.length > 0) {
                        console.log("有拣料,长度>8")
                        that.pakinShow = true
                        that.pakinGun = true
                        // console.log(that.errorShow,that.pakinShow,that.pakinGun)
                        if (res.data[0].ioType === 101) {
                           that.title = '全板出库'
                        } else if(res.data[0].ioType === 103) {
@@ -356,11 +374,20 @@
                           newsData = newsData + str 
                        }
                        if (that.errorShow) {
                           // that.pakinShow = false
                           return;
                        } else {
                           that.newspaper = newsData
                           that.move = false
                        }
                        if (res.data[0].matDtos.length <= 8) {
                           console.log("有拣料,长度<=8")
                           that.errorShow = true
                           that.pakinShow = true
                           that.pakinGun  = false
                        }
                        console.log(that.errorShow,that.pakinShow,that.pakinGun)
                     } else {
                        that.move = true
                     }