#
whycq
2024-02-29 40bdcff0cd425f25c3549771e92ec465bf4d7231
#
2个文件已修改
99 ■■■■ 已修改文件
Monitor-APP/pages/home/home.css 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Monitor-APP/pages/home/home.vue 96 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Monitor-APP/pages/home/home.css
@@ -26,10 +26,11 @@
.swiper-item {
    display: flex;
    align-items: center;
    /* background-color: aliceblue; */
    /* display: grid; */
    /* align-items: center; */
    /* grid-template-columns: 2fr 3fr 2fr 2fr 1fr; */
}
.swiper-item:nth-child(2n-1) {
    background-color: rgba(255, 255, 255, .1);
    /* background-color: rgba(255, 255, 255, .1); */
}
Monitor-APP/pages/home/home.vue
@@ -19,12 +19,12 @@
                                <!-- head -->
                                <view class="swiper-head">
                                    <view style="width: 10%;">序号</view>
                                    <view style="width: 15%;">品番</view>
                                    <view style="width: 10%;">待补货数量</view>
                                    <view style="width: 15%;">补货状态</view>
                                    <view style="width: 10%;">已补货数量</view>
                                    <view style="width: 20%;">工单生成时间</view>
                                    <view style="width: 20%;">补货截止时间</view>
                                    <view style="width: 25%;">品番</view>
                                    <view style="width: 15%;">待补货数量</view>
                                      <view style="width: 15%;">已补货数量</view>
                                      <view style="width: 15%;">补货状态</view>
                                    <view style="width: 10%;">工单创建时间</view>
                                    <view style="width: 10%;">预计完成时间</view>
                                </view>
                                <!-- body -->
                                <view class="swiper-body">
@@ -35,14 +35,21 @@
                                    <swiper class="swiper-body-main" vertical="true" 
                                    display-multiple-items="8"
                                    circular="true" :autoplay="true" :interval="3000" :duration="1000">
                                        <swiper-item class="swiper-item" v-for="(item,i) in swiperList" :key="i">
                                            <view style="width: 10%;">No:{{i+1}}</view>
                                            <view style="width: 15%;">{{item.matnr}}</view>
                                            <view style="width: 10%;">{{item.itnum1}}</view>
                                            <view style="width: 15%;">{{item.itnum2}}</view>
                                            <view style="width: 10%;">{{item.itnum3}}</view>
                                            <view style="width: 20%;">{{item.itnum4}}</view>
                                            <view style="width: 20%;">{{item.itnum5}}</view>
                                        <swiper-item :class="item.inspectSts" class="swiper-item"  v-for="(item,i) in swiperList" :key="i">
                                            <view style="width: 10%;">{{i+1}}</view>
                                            <view style="width: 25%;">{{item.maktx}}</view>
                                            <view style="width: 15%;">{{item.storeReplenishment}}</view>
                                            <view style="width: 15%;color: chartreuse;">{{item.storeAdd}}</view>
                                            <view style="width: 15%;">
                                                <text class="beBatch1" v-if="item.beBatch == 2">
                                                    {{item.beBatch$}}
                                                </text>
                                                <text class="beBatch2" v-if="item.beBatch != 2">
                                                    {{item.beBatch$}}
                                                </text>
                                            </view>
                                            <view style="width: 10%;">{{item.appeTime$}}</view>
                                            <view style="width: 10%;">{{item.overTime$ ? item.overTime$ : '--'}}</view>
                                        </swiper-item>
                                    </swiper>
                                </view>
@@ -185,7 +192,8 @@
                    count: "",
                    error: ""
                },
                swiperList: []
                swiperList: [],
                inspect: 'inspectRed'
            }
        },
        onShow() {
@@ -215,8 +223,9 @@
                // this.getUrl()
                // this.getInfo()
                // this.getError()
                this.getInfo2()
                this.getError2()
                // this.getInfo2()
                // this.getError2()
                this.getInfo3()
                // this.controller()
            },1000)
            
@@ -224,12 +233,12 @@
            //     this.changeErrorShow()
            // },5000)
            
            setInterval(()=>{
                this.getServerData()
                this.initlineChart()
                this.initPieChart()
                this.getOther()
            },600000)
            // setInterval(()=>{
            //     this.getServerData()
            //     this.initlineChart()
            //     this.initPieChart()
            //     this.getOther()
            // },600000)
        },
        methods: {
            // 日历 服务器
@@ -288,6 +297,25 @@
                    that.infoType = 0
                }
            },
            getInfo3() {
                let that = this
                uni.request({
                    url: that.commonUrl + "/open/loc/query/auth/v1",
                    method:"GET",
                    data: {ledId:that.baseLedId},
                    success(result) {
                        var res = result.data
                        for (let k of res.data) {
                            if (k.inspect == 1) {
                                k['inspectSts'] = 'inspectWhite'
                            } else {
                                k['inspectSts'] = 'inspectRed'
                            }
                        }
                       that.swiperList = res.data
                    }
                })
            },
            getError2 () {
                let that = this
                let result = ycqdata.dataError2
@@ -883,4 +911,26 @@
        height: 20%;font-size: 8vh;
        justify-content: center;
    }
    .beBatch1 {
        padding: 18rpx;
        background-color: #60b86b;
        height: 60rpx;
        text-align: center;
        line-height: 60rpx;
        border-radius: 10rpx;
    }
    .beBatch2 {
        padding: 18rpx;
        background-color: #fec652;
        height: 60rpx;
        text-align: center;
        line-height: 60rpx;
        border-radius: 10rpx;
    }
    .inspectRed {
        background-color: rgba(235, 104, 84, .6);
    }
    .inspectWhite {
        background-color: rgba(255, 255, 255, .4);
    }
</style>