From dd346d6414a7f7713c5b58753057de516cac8111 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期六, 02 三月 2024 09:41:51 +0800 Subject: [PATCH] # --- Monitor-APP/pages/home/home.vue | 173 +++++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 137 insertions(+), 36 deletions(-) diff --git a/Monitor-APP/pages/home/home.vue b/Monitor-APP/pages/home/home.vue index 6866376..003243f 100644 --- a/Monitor-APP/pages/home/home.vue +++ b/Monitor-APP/pages/home/home.vue @@ -4,12 +4,18 @@ <uni-transition :duration="duration" :mode-class="infoMode" :show="infoViewShow"> <view class="home-view"> <view class="head"> - <text>鍏ュ簱灞�</text> + <view class="head-left" @click="ejected()"></view> + <view class="head-mid"> + <text style="z-index: 999;">绔嬩綋搴撳叆搴撶湅鏉�</text> + </view> + <view class="head-right"></view> + + </view> <!-- 鏃ュ巻 --> - <view class="time-tools">{{calendar}}</view> - <view class="button-left" @click="ejected()"></view> - <view class="button-right" @click="ejected()"></view> + <!-- <view class="time-tools">{{calendar}}</view> --> + <!-- <view class="button-left" @click="ejected()"></view> --> + <!-- <view class="button-right" @click="ejected()"></view> --> <!-- 涓讳綋 --> <view class="info-main"> <view class="info-box"> @@ -19,12 +25,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 +41,28 @@ <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 class="item-box" style="width: 10%;" >{{i+1}}</view> + <view class="item-box" style="width: 25%;">{{item.maktx}}</view> + <view class="item-box" style="width: 15%;">{{item.storeReplenishment}}</view> + <view class="item-box" style="width: 15%;"> + + <text style="color: #25E51E ;" v-if="item.inspectSts == 'inspectWhite'">{{item.storeAdd}}</text> + <text v-if="item.inspectSts == 'inspectRed'">{{item.storeAdd}}</text> + </view> + <view class="item-box" style="width: 15%;"> + <text class="beBatch1" v-if="item.beBatch == 2 && item.inspectSts == 'inspectWhite'"> + {{item.beBatch$}} + </text> + <text class="beBatch2" v-if="item.beBatch != 2 && item.inspectSts == 'inspectWhite'"> + {{item.beBatch$}} + </text> + <text class="beBatch3" v-if="item.inspectSts != 'inspectWhite'"> + {{item.beBatch$}} + </text> + </view> + <view class="item-box" style="width: 10%;">{{item.appeTime$}}</view> + <view class="item-box" style="width: 9.5%;">{{item.overTime$ ? item.overTime$ : '--'}}</view> </swiper-item> </swiper> </view> @@ -185,7 +205,10 @@ count: "", error: "" }, - swiperList: [] + swiperList: [ + + ], + inspect: 'inspectRed' } }, onShow() { @@ -215,8 +238,10 @@ // this.getUrl() // this.getInfo() // this.getError() - this.getInfo2() - this.getError2() + // this.getInfo2() + // this.getError2() + // this.getInfo3() + this.getInfo4() // this.controller() },1000) @@ -224,12 +249,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 +313,38 @@ 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 + } + }) + }, + getInfo4() { + let result = ycqdata.dataError3 + var res = result.data + for (let k of res.data) { + if (k.inspect == 1) { + k['inspectSts'] = 'inspectWhite' + } else { + k['inspectSts'] = 'inspectRed' + + } + } + this.swiperList = res.data + }, getError2 () { let that = this let result = ycqdata.dataError2 @@ -603,7 +660,7 @@ .container{ width: 100vw; min-height: 100vh; - background-color: #00163E; + background-color: #13151d; color: #fff; text-align: center; @@ -612,8 +669,9 @@ .home-view { width: 100vw; min-height: 100vh; - background-image: url(../../static/background.png); - background-size: 100vw 100vh; + /* background-image: url(../../static/head.png); + background-size: 50vw 10vh; + background-repeat: no-repeat; */ } .home-right { width: 50vw; @@ -627,13 +685,27 @@ .head { width: 100vw; height: 11vh; - font-size:4vw; + font-size:3vw; font-weight: 700; - display: flex; - align-items: center; - justify-content: center; - transform: scale(0.7); + display: grid; + grid-template-columns: 1fr 1fr 1fr; } + .head-mid { + height: 10vh; + background-image: url(../../static/head.png); + background-size: 100% 100%; + } + .head-left { + height: 6vh; + background-image: url(../../static/headleft.png); + background-size: 110% 100%; + transform: scaleX(-1); + } + .head-right { + height: 6vh; + background-image: url(../../static/headleft.png); + background-size: 110% 100%; + } .time-tools { position: absolute; right: 2%; @@ -643,7 +715,7 @@ } .button-left { position: absolute; - background-image: url(../../static/right.png); + background-image: url(../../static/headleft.png); background-size: 100% 100%; top: 1.8%; left: 21.3%; @@ -883,4 +955,33 @@ height: 20%;font-size: 8vh; justify-content: center; } + .beBatch1 { + padding: 18rpx; + color: #F3720D; + height: 60rpx; + text-align: center; + line-height: 60rpx; + border-radius: 10rpx; + } + .beBatch2 { + padding: 18rpx; + color: #25E51E ; + height: 60rpx; + text-align: center; + line-height: 60rpx; + border-radius: 10rpx; + } + .inspectRed { + color: #F10F0F; + } + .inspectWhite { + color: #FFF; + } + .item-box { + height: 98%; + display: flex; + align-items: center; + justify-content: center; + border: 1px solid #18167c; + } </style> -- Gitblit v1.9.1