From 83ea9dc1674145a338e0d35f8dffce024e2ae49f Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期二, 23 九月 2025 12:49:36 +0800
Subject: [PATCH] led大屏展示修改
---
Monitor-APP/pages/home/home.vue | 235 +++++++++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 182 insertions(+), 53 deletions(-)
diff --git a/Monitor-APP/pages/home/home.vue b/Monitor-APP/pages/home/home.vue
index fec2c26..30aefe4 100644
--- a/Monitor-APP/pages/home/home.vue
+++ b/Monitor-APP/pages/home/home.vue
@@ -3,7 +3,7 @@
<uni-transition :duration="duration" :mode-class="homeMode" :show="homeViewShow">
<view class="home-view">
<view class="head">
- <text>鑷姩浠撳簱WCS鐩戞帶骞冲彴</text>
+ <text>寰峰埄浼楄嚜鍔ㄤ粨搴揥CS鐩戞帶骞冲彴</text>
</view>
<!-- 鏃ュ巻 -->
<view class="time-tools">{{calendar}}</view>
@@ -17,10 +17,22 @@
<view class="box-item">
<text class="item-title">鑷姩鍖栫珛浣撲粨搴�</text>
<text class="item-subTitle">Automatic Storageand Retrieval System</text>
+ <!-- <text class="item-text" -->
+ <!-- style="text-align: left;">鍒╃敤绔嬩綋浠撳簱璁惧鍙疄鐜颁粨搴撻珮灞傚悎鐞嗗寲銆佸瓨鍙栬嚜鍔ㄥ寲銆佹搷浣滅畝渚垮寲锛涜嚜鍔ㄥ寲绔嬩綋浠撳簱鏄綋鍓嶆妧鏈按骞宠緝楂樼殑褰㈠紡銆傝嚜鍔ㄥ寲绔嬩綋浠撳簱鐨勪富浣撶敱璐ф灦銆佸贩閬撳紡鍫嗗灈璧烽噸鏈恒�佸叆锛堝嚭锛夊簱宸ヤ綔鍙板拰鑷姩杩愯繘锛堝嚭锛夊強鎿嶄綔鎺у埗绯荤粺缁勬垚銆傝揣鏋舵槸閽㈢粨鏋勬垨閽㈢瓔娣峰嚌鍦熺粨鏋勭殑寤虹瓚鐗╂垨缁撴瀯浣擄紝璐ф灦鍐呮槸鏍囧噯灏哄鐨勮揣浣嶇┖闂达紝宸烽亾鍫嗗灈璧烽噸鏈虹┛琛屼簬璐ф灦涔嬮棿鐨勫贩閬撲腑锛屽畬鎴愬瓨銆佸彇璐х殑宸ヤ綔銆傜鐞嗕笂閲囩敤璁$畻鏈哄強鏉″舰鐮佹妧鏈��</text> -->
<text class="item-text"
- style="text-align: left;">鍒╃敤绔嬩綋浠撳簱璁惧鍙疄鐜颁粨搴撻珮灞傚悎鐞嗗寲銆佸瓨鍙栬嚜鍔ㄥ寲銆佹搷浣滅畝渚垮寲锛涜嚜鍔ㄥ寲绔嬩綋浠撳簱鏄綋鍓嶆妧鏈按骞宠緝楂樼殑褰㈠紡銆傝嚜鍔ㄥ寲绔嬩綋浠撳簱鐨勪富浣撶敱璐ф灦銆佸贩閬撳紡鍫嗗灈璧烽噸鏈恒�佸叆锛堝嚭锛夊簱宸ヤ綔鍙板拰鑷姩杩愯繘锛堝嚭锛夊強鎿嶄綔鎺у埗绯荤粺缁勬垚銆傝揣鏋舵槸閽㈢粨鏋勬垨閽㈢瓔娣峰嚌鍦熺粨鏋勭殑寤虹瓚鐗╂垨缁撴瀯浣擄紝璐ф灦鍐呮槸鏍囧噯灏哄鐨勮揣浣嶇┖闂达紝宸烽亾鍫嗗灈璧烽噸鏈虹┛琛屼簬璐ф灦涔嬮棿鐨勫贩閬撲腑锛屽畬鎴愬瓨銆佸彇璐х殑宸ヤ綔銆傜鐞嗕笂閲囩敤璁$畻鏈哄強鏉″舰鐮佹妧鏈��</text>
+ style="text-align: left;">鍦ㄨ嚜鍔ㄥ寲绔嬩綋浠撳簱鐨勮繍琛岃繃绋嬩腑锛屼俊鎭寲绯荤粺鐨勬敮鎾戣嚦鍏抽噸瑕侊紝鍏朵腑 WMS锛堜粨搴撶鐞嗙郴缁燂級 鍜� WCS锛堜粨搴撴帶鍒剁郴缁燂級 鏋勬垚浜嗘牳蹇冪殑淇℃伅涓庢帶鍒跺钩鍙般��</text>
+
+ <text class="item-text"
+ style="text-align: left;">WMS 绯荤粺涓昏璐熻矗浠撳簱鐨勪笟鍔$鐞嗕笌鍐崇瓥鏀寔銆傚畠閫氳繃瀵瑰叆搴撱�佸嚭搴撱�佺Щ搴撱�佺洏鐐圭瓑浣滀笟娴佺▼鐨勪紭鍖栵紝瀹炵幇搴撲綅鐨勫悎鐞嗗垎閰嶅拰搴撳瓨鐨勭簿纭鎺с�俉MS 鑳藉涓� ERP銆丮ES 绛変笂灞備笟鍔$郴缁熷鎺ワ紝淇濊瘉鐗╂枡鏁版嵁銆佽鍗曚俊鎭笌瀹為檯璐х墿鐘舵�佺殑缁熶竴锛屼粠鑰屾彁楂樻暣涓緵搴旈摼鐨勯�忔槑搴﹀拰鍗忓悓鎬с��</text>
+
+ <text class="item-text"
+ style="text-align: left;">WCS 绯荤粺鍒欐壙鎷呭簳灞傝澶囩殑瀹炴椂璋冨害涓庢帶鍒朵换鍔°�傚畠鎺ユ敹 WMS 涓嬪彂鐨勪綔涓氭寚浠わ紝鍒嗚В涓哄叿浣撶殑璁惧鍔ㄤ綔锛屽崗璋冨爢鍨涙満銆佽緭閫佺嚎銆佺┛姊溅銆丄GV 绛夊绉嶈澶囧崗鍚岃繍琛岋紝纭繚浣滀笟杩囩▼瀹夊叏楂樻晥銆俉CS 鏇村己璋冩墽琛屽眰鐨勫疄鏃舵�т笌绋冲畾鎬э紝閫氳繃璺緞浼樺寲銆佷换鍔″垎閰嶅拰鍐茬獊澶勭悊锛屼繚闅滅郴缁熺殑鏁翠綋鍚炲悙鑳藉姏銆�</text>
+
+ <text class="item-text"
+ style="text-align: left;">WMS 涓� WCS 鐨勭揣瀵嗙粨鍚堬紝浣胯嚜鍔ㄥ寲绔嬩綋浠撳簱涓嶄粎鍏峰 楂樺眰鍚堢悊鍖栥�佸瓨鍙栬嚜鍔ㄥ寲銆佹搷浣滅畝渚垮寲 鐨勭壒鐐癸紝杩樿兘瀹炵幇 搴撳瓨绠$悊鐨勭簿缁嗗寲銆佺墿娴佹墽琛岀殑鏅鸿兘鍖栥�傝繖涓轰紒涓氶檷浣庤繍钀ユ垚鏈�佹彁鍗囩┖闂村埄鐢ㄧ巼鍜屽嚭鍏ュ簱鏁堢巼鎻愪緵浜嗗潥瀹炰繚闅溿��</text>
</view>
- <view class="box-item">
+ <view class="box-item"></view>
+ <!-- <view class="box-item">
<text class="item-title">浠撳簱鏁版嵁</text>
<text class="item-subTitle">warehouse data</text>
<view class="img-box">
@@ -82,7 +94,7 @@
</view>
</view>
- </view>
+ </view> -->
<view class="box-item">
<view class="flex-row" style="width: 100%;">
<!-- 宸︿晶 -->
@@ -92,22 +104,22 @@
<text class="item-subTitle">EQUIPMENT USAGE THIS MONTH</text>
</view>
<!-- 鍙充晶 -->
- <view style="margin-left: auto;">
+ <!-- <view style="margin-left: auto;"> -->
<!-- 鐧惧垎姣� -->
- <view class="flex-col"
- style="align-items: flex-end;justify-content: flex-end;">
+ <!-- <view class="flex-col" -->
+ <!-- style="align-items: flex-end;justify-content: flex-end;"> -->
<!-- style="justify-content: flex-end;position: absolute;top: 0;right: 1vw;text-align: right;" -->
- <text class="item-title">{{baseInfo.usedPr}}%</text>
+ <!-- <text class="item-title">{{baseInfo.usedPr}}%</text>
<text class="item-subTitle">鍚屾瘮涓婃湀 + 5%</text>
</view>
- </view>
+ </view> -->
</view>
<view class="flex-col"
style="width: 100%;align-items: flex-start;position: relative;font-size: 1vw">
<!-- 杩涘害鏉� -->
<view class="flex-row" style="width: 100%;position: relative;margin-top: 5%;">
- <view class="progressBar" style="width: 80%;height: 2vw;">
+ <view class="progressBar" style="width: 85%;height: 2vw;">
<view class="progress" :style="'width:'+ baseInfo.usedPr + '%'"></view>
</view>
<view
@@ -140,8 +152,8 @@
<view class="flex-col"
style="align-items: flex-end;justify-content: flex-end;">
<!-- style="justify-content: flex-end;position: absolute;top: 0;right: 1vw;text-align: right;" -->
- <text class="item-title">31</text>
- <text class="item-subTitle">浠婃棩璁㈠崟鏁�</text>
+ <!-- <text class="item-title">31</text> -->
+ <!-- <text class="item-subTitle">浠婃棩璁㈠崟鏁�</text> -->
</view>
</view>
</view>
@@ -158,7 +170,7 @@
<view style="height: 2%;"></view>
- <view style="height: 43%;">
+ <view style="height: 63%;">
<y-box>
<view class="box-item">
<view class="flex-row" style="width: 100%;">
@@ -217,15 +229,13 @@
</y-box>
</view>
- <view style="height: 2%;"></view>
- <view style="height: 18%;">
- <y-box>
- <view class="flex-col"
- style="width: 100%;height: 100%;font-size: 4vh;justify-content: center;letter-spacing: 1vh;">
- 鑷姩浠撳簱WCS鐩戞帶骞冲彴
- </view>
- </y-box>
- </view>
+ <!-- <view style="height: 2%;"></view>
+ <view style="height: 18%" class="flex-row">
+ <image style="height: 100%;"
+ src="" mode="aspectFit"></image>
+ <image style="height: 100%;"
+ src="../../static/zy_logo.png" mode="aspectFit"></image>
+ </view> -->
</view>
</view>
</view>
@@ -246,24 +256,54 @@
<!-- 涓讳綋 -->
<view class="info-main">
<view class="info-box">
+ <view class="swiper-head" style="height: 10%;width: 96%;margin-left: 2%;font-size: 2.5vw;">
+ <view style="width: 15%;">璁㈠崟鍙�</view>
+ <view style="width: 10%;">鍗曡ID</view>
+ <view style="width: 10%;">鎵樼洏鐮�</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>
<y-box>
<!-- 鏂囨湰瀹瑰櫒 -->
- <view class="text-content" v-for="item in swiperList">
- <view>鐩爣绔欙細{{infoText.staNo}}</view>
+ <!-- <view class="text-content" v-for="item in swiperList" style="font-size: 3vw;"> -->
+<!-- <view>鐩爣绔欙細{{infoText.staNo}}</view>
<view>鍟嗗搧缂栫爜锛歿{item.matnr}}</view>
<view>鍟嗗搧鍚嶇О锛歿{item.maknx}}</view>
<view>瑙勬牸锛歿{item.specs}}</view>
- <view>鏁伴噺锛歿{item.count}} / {{item.total ? item.total : '--'}}</view>
-
+ <view>鍥惧彿锛歿{item.model ? item.model :''}}</view>
+ <view>鏁伴噺锛歿{item.count}} / {{item.total ? item.total : '--'}}</view> -->
+ <!-- <view style="display: flex;text-align: left;">
+ <view style="width: 50%;">璁㈠崟鍙凤細{{item.orderNo}}</view>
+ <view style="width: 50%;">鍗曡ID锛歿{item.memo}}</view>
+ </view>
+ <view style="display: flex;text-align: left;">
+ <view style="width: 50%;">鍟嗗搧缂栧彿锛歿{item.matnr}}</view>
+ <view style="width: 50%;">鍟嗗搧鍚嶇О锛歿{item.maknx}}</view>
+ </view>
+ <view style="display: flex;text-align: left;">
+ <view style="width: 50%;">鎵樼洏鐮侊細{{infoText.barcode}}</view>
+ <view style="width: 50%;">鐗规畩璇存槑锛歿{item.batch}}</view>
+ </view>
+ <view style="display: flex;text-align: left;">
+ <view style="width: 50%;">浣滀笟鏁伴噺锛歿{item.count}}</view>
+ <view style="width: 50%;">鍓╀綑鏁伴噺锛歿{item.total}}</view>
+ </view> -->
+
<!-- head -->
- <!-- <view class="swiper-head">
- <view style="width: 20%;">鐩爣绔欙細{{infoText.staNo}}</view>
- <view style="width: 30%;">鍟嗗搧缂栧彿</view>
- <view style="width: 20%;">鍟嗗搧鍚嶇О</view>
- <view style="width: 20%;">瑙勬牸</view>
- <view style="width: 10%;">鏁伴噺</view>
+<!-- <view class="swiper-head" style="height: 15%;">
+ <view style="width: 15%;">璁㈠崟鍙�</view>
+ <view style="width: 10%;">鍗曡ID</view>
+ <view style="width: 15%;">鍟嗗搧缂栧彿</view>
+ <view style="width: 15%;">鍟嗗搧鍚嶇О</view>
+ <view style="width: 10%;">鎵樼洏鐮�</view>
+ <view style="width: 15%;">鐗规畩璇存槑</view>
+ <view style="width: 10%;">浣滀笟鏁伴噺</view>
+ <view style="width: 10%;">鍓╀綑鏁伴噺</view>
</view> -->
<!-- body -->
<!-- <view class="swiper-body"> -->
@@ -271,19 +311,23 @@
circular 鏄惁閲囩敤琛旀帴婊戝姩锛屽嵆鎾斁鍒版湯灏惧悗閲嶆柊鍥炲埌寮�澶�
vertical 婊戝姩鏂瑰悜鏄惁涓虹旱鍚�
display-multiple-items 鍚屾椂鏄剧ず鐨勬粦鍧楁暟閲� -->
- <!-- <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: 20%;">No:{{i+1}}</view>
- <view style="width: 30%;">{{item.matNo}}</view>
- <view style="width: 20%;">{{item.maknx}}</view>
- <view style="width: 20%;">{{item.specs}}</view>
+ <swiper class="swiper-body-main" vertical="true"
+ display-multiple-items="3"
+ circular="true" :autoplay="true" :interval="3000" :duration="1000" style="font-size: 2.5vw;">
+ <swiper-item class="swiper-item" v-for="(item,i) in swiperList" :key="i">
+ <!-- <view>No:{{i+1}}</view> -->
+ <view style="width: 15%;">{{item.orderNo}}</view>
+ <view style="width: 10%;"> {{item.memo}}</view>
+ <view style="width: 10%;">{{infoText.barcode}}</view>
+ <view style="width: 15%;">{{item.matnr}}</view>
+ <view style="width: 15%;">{{item.maknx}}</view>
+ <view style="width: 15%;">{{item.batch}}</view>
<view style="width: 10%;">{{item.count}}</view>
+ <view style="width: 10%;">{{item.total}}</view>
</swiper-item>
</swiper>
- </view> -->
- </view>
+ <!-- </view> -->
+ <!-- </view> -->
</y-box>
</view>
</view>
@@ -373,7 +417,9 @@
homeViewShow: true,
infoViewShow: false,
errorInfoViewShow: false,
+ errorBoardShow: false,
homeMode: [],
+ carInfo: [],
infoMode: [],
errorInfoMode: [],
baseInfo: {
@@ -412,6 +458,13 @@
baseLedId: '',
baseCrnId: '',
baseUrl: '',
+ apiIp: '10.10.0.189',
+ apiPort: '8080',
+ apiUrl: 'dlzwcs',
+ // apiIp: '192.168.4.49',
+ // apiPort: '9090',
+ // apiUrl: 'jsjwcs',
+ ledInfosApi: '/console/getLedInfos',
info: null,
error: null,
infoType: 0,
@@ -463,10 +516,10 @@
this.getDate2()
setTimeout(() => {
- // this.getServerData()
- // this.initlineChart()
- // this.initPieChart()
- // this.getOther()
+ this.getServerData()
+ this.initlineChart()
+ this.initPieChart()
+ this.getOther()
setTimeout(() => {
this.getServerData()
this.initlineChart()
@@ -477,11 +530,13 @@
this.initlineChart()
this.initPieChart()
this.getOther()
- }, 3000)
- }, 1000)
- }, 1000)
+ }, 500)
+ }, 500)
+ }, 500)
},
onLoad() {
+ this.getLedInfo()
+
setInterval(() => {
this.getDate2()
this.getUrl()
@@ -497,9 +552,27 @@
this.initlineChart()
this.initPieChart()
this.getOther()
- }, 1800000)
+ }, 180000)
},
methods: {
+ carInfoModel(res) {
+ let infoList = []
+
+ if (res.code == 200 && res.data != '') {
+ let str = ''
+ for (let k of res.data) {
+ str = `${k.deviceNo}鍙�${k.device}-${k.errorMsg}`
+ infoList.push(str)
+ }
+ this.carInfo = infoList
+ this.errorBoardShow = true
+ } else {
+ this.errorBoardShow = false
+ }
+ },
+ changeErrorShow() {
+ this.errorBoardShow = !this.errorBoardShow
+ },
timeOuts() {
console.log(this.times);
},
@@ -509,6 +582,25 @@
getServerData() {
this.chartsDataLine1 = JSON.parse(JSON.stringify(this.chartsData.Line))
this.chartsDataPie2 = JSON.parse(JSON.stringify(this.chartsData.Pie))
+ },
+ getLedInfo() {
+ let that = this
+ uni.request({
+ url: this.baseHttp + that.apiIp + ":" + that.apiPort + "/" + that.apiUrl + "/" + that.ledInfosApi,
+ method: "GET",
+ data: {},
+ success(result) {
+ var res = result.data
+ let data = res.data;
+
+ uni.setStorageSync('BaseIp', that.apiIp);
+ uni.setStorageSync('BaseLedId', data.staArr);
+ uni.setStorageSync('BasePort', that.apiPort);
+ uni.setStorageSync('BaseCrnId', data.crnId);
+ uni.setStorageSync('UPROJ', that.apiUrl);
+ this.getUrl()
+ }
+ })
},
// 鑾峰彇閿欒淇℃伅
getInfo2() {
@@ -599,11 +691,25 @@
if (res.data[0].ioType === 101) {
that.infoText.title = '鍏ㄦ澘鍑哄簱'
} else if (res.data[0].ioType === 103) {
- that.infoText.title = '妫�鏂欏嚭搴�'
+ that.infoText.title = '鎷f枡鍑哄簱'
} else if (res.data[0].ioType === 107) {
that.infoText.title = '鐩樼偣鍑哄簱'
+ } else if (res.data[0].ioType === 1) {
+ that.infoText.title = '鍏ㄦ澘鍏ュ簱'
+ } else if (res.data[0].ioType === 10) {
+ that.infoText.title = '绌烘澘鍏ュ簱'
+ } else if (res.data[0].ioType === 54) {
+ that.infoText.title = '骞舵澘鍏ュ簱'
+ } else if (res.data[0].ioType === 110) {
+ that.infoText.title = '绌烘澘鍑哄簱'
+ } else if (res.data[0].ioType === 53) {
+ that.infoText.title = '鎷f枡鍐嶅叆搴�'
+ } else if (res.data[0].ioType === 57) {
+ that.infoText.title = '鐩樼偣鍐嶅叆搴�'
}
+
that.infoText.staNo = res.data[0].staNo
+ that.infoText.barcode = res.data[0].barcode
that.swiperList = res.data[0].matDtos
// that.infoText.matnr = res.data[0].matDtos[0].matnr
// that.infoText.specs = res.data[0].matDtos[0].specs
@@ -749,6 +855,7 @@
var res = result.data.data
that.calendar = res.year + "骞�" + res.month + "鏈�" + res.day + "鏃� " + res.hour + ":" + res
.minute + ":" + res.second + " " + res.week
+
that.currDate = res.year + "/" + res.month + "/" + res.day
},
fail(res) {
@@ -926,7 +1033,7 @@
.head {
width: 100vw;
height: 11vh;
- font-size: 4vw;
+ font-size: 3vw;
font-weight: 700;
display: flex;
align-items: center;
@@ -1100,7 +1207,7 @@
.info-box {
width: 98%;
- height: 98%;
+ height: 90%;
}
/* 寮傚父淇℃伅 */
@@ -1234,4 +1341,26 @@
.textred {
color: red;
}
+
+ .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>
\ No newline at end of file
--
Gitblit v1.9.1