#
whycq
2022-05-14 2d2b6d857331763f7590d768f7cad8e3c8b9c691
#
2个文件已修改
151 ■■■■ 已修改文件
Monitor-APP/pages/index/data.js 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Monitor-APP/pages/index/index.vue 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Monitor-APP/pages/index/data.js
@@ -27,4 +27,57 @@
//             {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027507728","count":1.0},
//             {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504810","count":1.0},
//             {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22037505148","count":1.0}],
//             "emptyMk":false}]}
//             "emptyMk":false}]}
    getYYY() {
                var result = {"msg":"操作成功",
                                "code":200,
                                "data":[{
                                    "title":"全板出库",
                                    "workNo":7016,
                                    "ioType":101,
                                    "staNo":188,
                                    "sourceStaNo":null,
                                    "locNo":null,
                                    "sourceLocNo":"0900107",
                                    "matDtos":[
                                        {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22037502300","count":1.0},
                                        {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22037505146","count":1.0},
                                        {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504801","count":1.0},
                                        {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027507729","count":1.0},
                                        {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027507727","count":1.0},
                                        {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027507731","count":1.0},
                                        {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504807","count":1.0},
                                        {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504805","count":1.0},
                                        {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504797","count":1.0},
                                        {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504794","count":1.0},
                                        {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504791","count":1.0},
                                        {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504793","count":1.0},
                                        {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22037505141","count":1.0},
                                        {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027507728","count":1.0},
                                        {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504810","count":1.0},
                                        {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22037505148","count":1.0}],
                                        "emptyMk":false}]}
                let that = this
                var newsData = ''
                var str = ''
                let res = result.data
                if (res[0]) {
                    if (res[0].ioType === 101) {
                        that.title = '全板出库'
                    } else if(res[0].ioType === 103) {
                        that.title = '检料出库'
                    }
                    that.staNo = '目标站' + res[0].staNo
                    for (var i = 0; i < res[0].matDtos.length; i++) {
                        str = res[0].matDtos[i].matnr + ' - ' + res[0].matDtos[i].batch + '\n'
                        newsData = newsData + str
                    }
                    that.newspaper = newsData
                    that.move = false
                } else {
                    that.newspaper = ''
                    that.move = true
                }
            },
Monitor-APP/pages/index/index.vue
@@ -21,7 +21,7 @@
                            <text class="animate">{{newspaper}}</text>
                        </view>
                        <view style="width: 10%;height: 100%;display: inline-block;float: right;padding-top: 180px;">
                            <text>目标站{{staNo}}</text>
                            <text>{{staNo}}</text>
                        </view>
                    </view>
                </view>
@@ -286,7 +286,7 @@
            setInterval(() => {
                this.getDate();
                // this.getPakin();
                this.getYYY();
                // this.getYYY();
                this.animation();
            },1000)
        },
@@ -297,6 +297,24 @@
            // });
        },
        methods: {
            getError() {
                let that = this
                ni.request({
                    url: "http://" + that.baseUrl + ":" + that.basePort + "/jkwcs/monitor/led/error/led",
                    data: {
                        ledId:that.baseLedId
                    },
                    method:'GET',
                    success(result) {
                        let res = result.data
                        if (res.data) {
                            that.newspaper = '123'
                        } else {
                            that.newspaper = ''
                        }
                    }
                });
            },
            getPakin () {
                let that = this
                uni.request({
@@ -306,89 +324,33 @@
                    },
                    method:'GET',
                    success(result) {
                        console.log(result)
                        var newsData = ''
                        var str = ''
                        let res = result.data
                        if (res.data[0]) {
                            if (res.data[0].ioType === 101) {
                        if (res[0]) {
                            if (res[0].ioType === 101) {
                                that.title = '全板出库'
                            } else if(res.data[0].ioType === 103) {
                            } else if(res[0].ioType === 103) {
                                that.title = '检料出库'
                            }
                            that.staNo = res.data[0].staNo
                            that.staNo = '目标站' + res[0].staNo
                            
                            for (var i = 0; i < res.data[0].matDtos.length; i++) {
                                str = res.data[0].matDtos[i].matnr + ' - ' + res.data[0].matDtos[i].batch + '\n'
                            for (var i = 0; i < res[0].matDtos.length; i++) {
                                str = res[0].matDtos[i].matnr + ' - ' + res[0].matDtos[i].batch + '\n'
                                newsData = newsData + str 
                            }
                            console.log(newsData)
                            that.newspaper = newsData
                            that.move = false
                        } else {
                            that.newspaper = ''
                            that.title = ''
                            that.staNo = ''
                            that.move = true
                        }
                    }
                })
            },
            getYYY() {
                let that = this
                var newsData = ''
                var str = ''
                var result = {"msg":"操作成功",
    "code":200,
    "data":[{
        "title":"全板出库",
        "workNo":7016,
        "ioType":101,
        "staNo":188,
        "sourceStaNo":null,
        "locNo":null,
        "sourceLocNo":"0900107",
        "matDtos":[
            {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22037502300","count":1.0},
            {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22037505146","count":1.0},
            {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504801","count":1.0},
            {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027507729","count":1.0},
            {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027507727","count":1.0},
            {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027507731","count":1.0},
            {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504807","count":1.0},
            {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504805","count":1.0},
            {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504797","count":1.0},
            {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504794","count":1.0},
            {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504791","count":1.0},
            {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504793","count":1.0},
            {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22037505141","count":1.0},
            {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027507728","count":1.0},
            {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504810","count":1.0},
            {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22037505148","count":1.0}],
            "emptyMk":false}]}
                let res = result.data
                console.log(res[0].ioType)
                if (res[0]) {
                    if (res[0].ioType === 101) {
                        that.title = '全板出库'
                    } else if(res[0].ioType === 103) {
                        that.title = '检料出库'
                    }
                    that.staNo = res[0].staNo
                    for (var i = 0; i < res[0].matDtos.length; i++) {
                        str = res[0].matDtos[i].matnr + ' - ' + res[0].matDtos[i].batch + '\n'
                        newsData = newsData + str
                    }
                    console.log(newsData)
                    that.newspaper = newsData
                    that.move = false
                } else {
                    that.newspaper = ''
                    that.move = true
                }
            },
            animation() {
                // console.log(this.baseUrl,this.baseLedId)
                if (this.move) {
                    this.topMove = 'topUp'
                    this.floorMove = 'floorUp'