| | |
| | | <template> |
| | | <div class="title">Welcome To WMS!</div> |
| | | <div class="fixed-row"> |
| | | |
| | | <span style="margin-left: 40px;font-size: 20px;"> |
| | | <el-button circle style="background-color: #409eff;color: #000;width: 70px;height: 50px;">æè´§</el-button> |
| | | <el-button circle style="background-color: lightgreen;color: #000;width: 70px;height: 50px;">空货ä½</el-button> |
| | | <el-button circle style="background-color: yellow;color: #000;width: 70px;height: 50px;">åºå
¥åºå ç¨</el-button> |
| | | <el-button circle style="background-color: red;color: #000;width: 70px;height: 50px;">å¼å¸¸</el-button> |
| | | <el-button circle style="background-color: #C0C4CC;color: #000;width: 70px;height: 50px;">ç¦ç¨</el-button> |
| | | </span> |
| | | </div> |
| | | <div style="height: 50px;"> |
| | | |
| | | </div> |
| | | <div v-for="(index,inst) in datalist.length" :key="inst" style="padding: 10px;"> |
| | | <h1 style="border-bottom: 1px dashed silver; padding: 5px;;height: 52px;"> |
| | | <span v-if="inst==0">å¤ååº</span> |
| | | <span v-else-if="inst==1">æçå æ¾åº</span> |
| | | <!-- <span v-else-if="inst==1">䏿åº</span> |
| | | <span v-else-if="inst==2">䏿åº</span> |
| | | <span v-else-if="inst==3">å¤ååº</span> |
| | | <span v-else-if="inst==4">å çåº</span> --> |
| | | <span v-else>{{inst}}åºåº</span> |
| | | </h1> |
| | | <div class="table-container"> |
| | | <div class="scrollable-table"> |
| | | <table class="one_tal" > |
| | | <tr v-for="(item, k) in datalist[inst].item2" :key="k"> |
| | | <td v-for="items in filteredItems(datalist[inst].item1, k+1)" :key="items.stationCode" |
| | | :style="{ 'background-color': getBackgroundColor(items.enable,items.location_state) }"> |
| | | <el-tooltip class="item" effect="dark" placement="right" > |
| | | <template #content v-if="items.stationType!=='' && items.bindSN !== '' && items.stationType!==null && items.bindSN !== null"> |
| | | <div>åºä½ç¼å·ï¼{{ items.stationCode }}</div> |
| | | <div>ç©æç±»å(å¾å·)ï¼ {{ items.stationType }}</div> |
| | | <div>çå·ï¼ {{ items.heatNumber }}</div> |
| | | <div>车轮SNå·ï¼{{ items.bindSN }}</div> |
| | | <div>é¢å¯å·ï¼{{ items.billetID }}</div> |
| | | </template> |
| | | <template #content v-else-if="items.area==3 && items.tray_status=='EmptyTray'"> |
| | | <div v-if="item.tray_type==SmallTray">å°æç</div> |
| | | <div v-else>大æç</div> |
| | | <div>æ°éï¼{{ items.quantity }}</div> |
| | | </template> |
| | | <template #content v-else> |
| | | <div>ç®åææ ä¿¡æ¯</div> |
| | | </template> |
| | | <template #content v-if="items.area==11"> |
| | | <div>å°æç</div> |
| | | <div>æ°éï¼{{ items.quantity }}</div> |
| | | </template> |
| | | <template #content v-if="items.area==10"> |
| | | <div>大æç</div> |
| | | <div>æ°éï¼{{ items.quantity }}</div> |
| | | </template> |
| | | <template #content v-if="items.area==12"> |
| | | <div v-if="item.tray_type==SmallTray">å°æç</div> |
| | | <div v-else>大æç</div> |
| | | <div>æ°éï¼{{ items.quantity }}</div> |
| | | </template> |
| | | |
| | | <div>{{ items.stationCode}}</div> |
| | | </el-tooltip> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { ref, reactive } from 'vue' |
| | | |
| | | export default { |
| | | setup() { |
| | | data() { |
| | | return { |
| | | visible: false, |
| | | datalist:[], |
| | | }; |
| | | }, |
| | | mounted() { |
| | | setInterval(() => { |
| | | this.selList(); // 使ç¨ç®å¤´å½æ°ç»å®this |
| | | }, 3000); |
| | | }, |
| | | methods: { |
| | | |
| | | selList(){ |
| | | this.loading=true |
| | | this.http.post("/api/dt_stationinfo/dt_stationinfolist").then(x => { |
| | | this.datalist = x.data; |
| | | }) |
| | | .catch(error => { |
| | | console.error('请æ±åºéï¼', error); |
| | | }); |
| | | }, |
| | | getBackgroundColor(enable,locationState) { |
| | | |
| | | if (enable=='0') { |
| | | return '#C0C4CC'; |
| | | } |
| | | else{ |
| | | switch (locationState) { |
| | | case 'Stroge': |
| | | return '#409eff'; |
| | | case 'Empty': |
| | | return 'lightgreen'; |
| | | case 'InBusy': |
| | | return 'yellow'; |
| | | case 'OutBusy': |
| | | return 'yellow'; |
| | | case 'Busy': |
| | | return 'yellow'; |
| | | case 'Abnormal': |
| | | return 'red'; |
| | | case 'Abnormal': |
| | | return 'yellow'; |
| | | default: |
| | | return 'transparent'; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | }, |
| | | computed: { |
| | | filteredItems() { |
| | | return (itemList, line) => { |
| | | return itemList.filter(item => item.line === line); |
| | | }; |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | line-height: 70vh; |
| | | .table-container { |
| | | overflow-x: auto; |
| | | } |
| | | |
| | | .scrollable-table { |
| | | width: 100%; |
| | | } |
| | | |
| | | .one_tal { |
| | | margin-top: 10px; |
| | | padding: 5px; |
| | | white-space: nowrap; |
| | | border-spacing: 10px; |
| | | padding-right: 500px; |
| | | } |
| | | .one_tal tr{ |
| | | |
| | | margin-top: 10px; |
| | | margin-bottom: 10px; |
| | | } |
| | | .one_tal td { |
| | | width: 200px; |
| | | height: 40px; |
| | | background-color: rgb(36, 227, 241); |
| | | text-align: center; |
| | | font-size: 28px; |
| | | color: orange; |
| | | border-radius: 10px; |
| | | } |
| | | .table-container::-webkit-scrollbar { |
| | | width: 1px; |
| | | height: 15px; |
| | | } |
| | | |
| | | .table-container::-webkit-scrollbar-track { |
| | | background: transparent; |
| | | } |
| | | |
| | | .table-container::-webkit-scrollbar-thumb { |
| | | background-color: #ccc; |
| | | } |
| | | |
| | | .fixed-row { |
| | | position: fixed; |
| | | width: 100%; /* 让è¡çå®½åº¦å æ»¡æ´ä¸ªè§çª */ |
| | | background-color: #fff; /* 妿éè¦ï¼è®¾ç½®èæ¯è² */ |
| | | z-index: 3; /* ç¡®ä¿åºå®è¡å¨å
¶ä»å
容ä¹ä¸ */ |
| | | } |
| | | </style> |