| | |
| | | <template> |
| | | <view> |
| | | <view v-if="crnErrorShow"> |
| | | <swiper |
| | | class="message-swiper" |
| | | autoplay |
| | | circular |
| | | interval="2000" |
| | | duration="500" |
| | | > |
| | | <swiper-item v-for="(message, index) in messages" :key="index"> |
| | | <view class="message-item">{{ message }}</view> |
| | | </swiper-item> |
| | | </swiper> |
| | | </view> |
| | | |
| | | <view class="container"> |
| | | <uni-transition :duration="duration" :mode-class="homeMode" :show="homeViewShow"> |
| | | <view class="home-view"> |
| | |
| | | 连接超时: {{times}} s |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <!-- {"msg":"操作成功","code":200,"data":[{"title":"全板出库","workNo":7460,"staNo":110,"sourceStaNo":null,"locNo":null,"sourceLocNo":"0807102","matDtos":[{"matNo":"50460834","maknx":"200x60桌面","count":26.0}],"emptyMk":false,"ioType":101}]} --> |
| | | <script> |
| | |
| | | swiperList: [], |
| | | timeOut: false, |
| | | times: 0, |
| | | currDate: '' |
| | | currDate: '', |
| | | crnErrorShow: false, |
| | | messages: [] |
| | | } |
| | | }, |
| | | onShow() { |
| | |
| | | // this.getError2() |
| | | this.getUrl() |
| | | this.controller() |
| | | this.getCrnError() |
| | | |
| | | },1000) |
| | | }, |
| | |
| | | ledId: that.baseLedId, |
| | | }, |
| | | success(result) { |
| | | console.log(result); |
| | | var res = result.data |
| | | if (res.code === 200) { |
| | | that.baseInfo.xDistance = res.data.xDistance |
| | |
| | | } |
| | | }) |
| | | }, |
| | | getCrnError() { |
| | | let that = this |
| | | uni.request({ |
| | | url: that.commonUrl + "/monitor/crn/error", |
| | | data: {}, |
| | | success(result) { |
| | | var res = result.data |
| | | if (res.code === 200) { |
| | | let data = res.data; |
| | | if(data.length > 0) { |
| | | let tmpList = [] |
| | | data.forEach((item) => { |
| | | tmpList.push(item.crnNo + "号堆垛机" + item.errorName) |
| | | }) |
| | | that.messages = tmpList; |
| | | that.crnErrorShow = true; |
| | | }else{ |
| | | that.crnErrorShow = false; |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | background-color: #00163E; |
| | | color: #fff; |
| | | text-align: center; |
| | | |
| | | position: relative; |
| | | } |
| | | /* 主视图 */ |
| | | .home-view { |
| | |
| | | height: 20%;font-size: 8vh; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .message-swiper { |
| | | width: 100%; |
| | | height: 30px; |
| | | background-color: #ff0000; |
| | | display: flex; |
| | | align-items: center; |
| | | overflow: hidden; |
| | | position: relative; |
| | | } |
| | | .message-item { |
| | | white-space: nowrap; |
| | | padding: 0 10px; |
| | | color: #ffffff; |
| | | text-align: center; |
| | | } |
| | | </style> |