Junjie
2 天以前 6e2f1c62d34f7c154df167fc22ea0a04b9772b58
#电视机显示设备报警信息
1个文件已修改
63 ■■■■■ 已修改文件
Monitor-APP/pages/home/home.vue 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Monitor-APP/pages/home/home.vue
@@ -1,4 +1,19 @@
<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">
@@ -320,6 +335,7 @@
            连接超时: {{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>
@@ -392,7 +408,9 @@
                swiperList: [],
                timeOut: false,
                times: 0,
                currDate: ''
                currDate: '',
                crnErrorShow: false,
                messages: []
            }
        },
        onShow() {
@@ -435,6 +453,7 @@
                // this.getError2()
                this.getUrl()
                this.controller()
                this.getCrnError()
                
            },1000)
        },
@@ -868,7 +887,6 @@
                        ledId: that.baseLedId,
                    },
                    success(result) {
                        console.log(result);
                        var res = result.data
                        if (res.code === 200) {
                            that.baseInfo.xDistance = res.data.xDistance
@@ -883,6 +901,29 @@
                    }
                })
            },
            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;
                            }
                        }
                    }
                })
            }
        }
        
    }
@@ -908,7 +949,7 @@
        background-color: #00163E;
        color: #fff;
        text-align: center;
        position: relative;
    }
    /* 主视图 */
    .home-view {
@@ -1188,4 +1229,20 @@
        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>