From adbca2df763731388b9ca7c0e6b0f17f926a7887 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期三, 20 三月 2024 15:00:40 +0800 Subject: [PATCH] # --- Monitor-APP/pages/home/home.vue | 110 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 96 insertions(+), 14 deletions(-) diff --git a/Monitor-APP/pages/home/home.vue b/Monitor-APP/pages/home/home.vue index a310e11..53011ea 100644 --- a/Monitor-APP/pages/home/home.vue +++ b/Monitor-APP/pages/home/home.vue @@ -4,11 +4,15 @@ <uni-transition :duration="duration" :mode-class="infoMode" :show="infoViewShow"> <view class="home-view"> <view class="head"> - <view class="head-left" @click="ejected()"></view> + <view class="head-left" @click="ejected()"> + <view class="logo"></view> + </view> <view class="head-mid"> <text style="z-index: 999;">琛ヨ揣鍗曞垪琛�</text> </view> - <view class="head-right"></view> + <view class="head-right"> + <view class="time-tools">{{calendar}}</view> + </view> </view> <!-- 鏃ュ巻 --> <!-- <view class="time-tools">{{calendar}}</view> --> @@ -22,8 +26,8 @@ <view class="text-content"> <!-- head --> <view class="swiper-head"> - <view class="item-box1" style="width: 5%;">搴忓彿</view> - <view class="item-box1" style="width: 20%;">鍝佺暘</view> + <view class="item-box1" style="width: 10%;">宸ュ崟缂栧彿</view> + <view class="item-box1" style="width: 15%;">鍝佺暘</view> <view class="item-box1" style="width: 15%;">寰呰ˉ璐ф暟閲�</view> <view class="item-box1" style="width: 15%;">宸茶ˉ璐ф暟閲�</view> <view class="item-box1" style="width: 15%;">琛ヨ揣鐘舵��</view> @@ -39,10 +43,10 @@ display-multiple-items 鍚屾椂鏄剧ず鐨勬粦鍧楁暟閲� --> <swiper class="swiper-body-main" vertical="true" display-multiple-items="10" - circular="true" :autoplay="true" :interval="3000" :duration="1000" disable-touch='true'> + circular="true" :autoplay="false" :interval="3000" :duration="1000" disable-touch='true'> <swiper-item :class="item.inspectSts" class="swiper-item" v-for="(item,i) in swiperList" :key="i"> - <view class="item-box" style="width: 5%;" >{{i+1}}</view> - <view class="item-box" style="width: 20%;">{{item.maktx}}</view> + <view class="item-box" style="width: 10%;" >{{item.suppCode ? item.suppCode : '--'}}</view> + <view class="item-box" style="width: 15%;">{{item.maktx}}</view> <view class="item-box" style="width: 15%;">{{item.storeReplenishment}}</view> <view class="item-box" style="width: 15%;"> @@ -61,12 +65,13 @@ </text> --> </view> <view class="item-box" style="width: 10%;">{{item.appeTime$}}</view> - <view class="item-box" style="width: 10%;">{{item.appeTime$}}</view> + <view class="item-box" style="width: 10%;">{{item.overTime$}}</view> <view class="item-box" style="width: 9.5%;"> <button class="start-btn" size="mini" v-if="item.beBatch == 1" @click="complete(item.matnr)">寮�濮�</button> <button class="end-btn" size="mini" v-if="item.beBatch == 2" @click="cancel(item.matnr)">瀹屾垚</button> </view> </swiper-item> + <view style="height: 1px;"></view> </swiper> </view> </view> @@ -157,6 +162,13 @@ <uni-popup-message :type="messageType" :message="messageText" :duration="3000"></uni-popup-message> </uni-popup> </view> + <view class="board"> + <uni-transition ref="ani" custom-class="transition" :mode-class="newModeClass" :show="errorBoardShow"> + <view class="error-board"> + <text v-for="item in carInfo">{{item}}</text> + </view> + </uni-transition> + </view> </view> </template> @@ -166,6 +178,9 @@ export default { data() { return { + newModeClass: 'slide-top', + errorBoardShow: false, + carInfo: [], type: 'center', msgType: 'success', messageType: 'success', @@ -260,13 +275,14 @@ onLoad() { setInterval(()=>{ // this.getServerData() - // this.getDate2() // this.getUrl() // this.getInfo() // this.getError() // this.getInfo2() // this.getError2() + this.getDate2() this.getInfo3() + this.getCarInfo() // this.getInfo4() // this.controller() },1000) @@ -283,6 +299,39 @@ // },600000) }, methods: { + // 寮傚父淇℃伅 + getCarInfoTest() { + let that = this + var result = ycqdata.carError + var res = result.data + that.carInfoModel(res) + }, + getCarInfo() { + let that = this + uni.request({ + url: that.commonUrl + "/mobile/error/list1", + method: "GET", + success(result) { + var res = result.data + that.carInfoModel(res) + } + }) + }, + carInfoModel(res) { + let infoList = [] + + if (res.code == 200 && res.data != '') { + let str = '' + for (let k of res.data) { + str = `${k.tsakNo1}-${k.errName}` + infoList.push(str) + } + this.carInfo = infoList + this.errorBoardShow = true + } else { + this.errorBoardShow = false + } + }, // 鏃ュ巻 鏈嶅姟鍣� getDate2() { let that = this @@ -290,12 +339,12 @@ return } uni.request({ - url: that.commonUrl + "/monitor/date", + url: that.commonUrl + "/mobile/date", method:"GET", success(result) { // console.log(result); var res = result.data.data - that.calendar = res.year + "骞�" + res.month + "鏈�" + res.day + "鏃� " + res.hour + ":" + res.minute + ":" + res.second + " " + res.week + that.calendar = res.hour + ":" + res.minute + ":" + res.second + " " + res.year + "-" + res.month + "-" + res.day that.currDate = res.year + "/" + res.month + "/" + res.day }, fail(res) { @@ -775,11 +824,23 @@ background-image: url(../../static/headleft.png); background-size: 110% 100%; } + .logo { + position: absolute; + left: 30%; + top: 90%; + width: 60%; + height: 110%; + background-image: url(../../static/DENSO_logo.png); + background-size: 60% 60%; + /* background-color: #55ff7f; */ + background-repeat: no-repeat; + transform: scaleX(-1); + } .time-tools { position: absolute; - right: 2%; - top: 2%; - font-size:1vw; + right: 4%; + top: 6%; + font-size:1.2vw; transform: scale(0.8); } .button-left { @@ -1072,4 +1133,25 @@ .popup { } + .board { + position: absolute; + top: 0; + right: 0; + /* background-color: #aa00ff; */ + /* height: 13vh; */ + width: 100%; + /* box-shadow: rgba(0,0,0,.35) 0px 5px 15px; */ + } + + .error-board { + margin: .2rem; + height: 11vh; + background-color: #F56C6C; + box-shadow: rgba(0, 0, 0, .35) 0px 5px 15px; + border-radius: .2rem; + display: flex; + align-items: center; + justify-content: space-around; + font-size: 2rem; + } </style> -- Gitblit v1.9.1