From 0ee358176fc31fdb03f968f4baf1df9bb2e1815f Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期一, 04 九月 2023 17:06:24 +0800 Subject: [PATCH] # 显示屏 --- src/main/webapp/views/monitor/index.html | 54 +++++++++++++++++++++++++++++++++--------------------- 1 files changed, 33 insertions(+), 21 deletions(-) diff --git a/src/main/webapp/views/monitor/index.html b/src/main/webapp/views/monitor/index.html index 698134e..4a06c80 100644 --- a/src/main/webapp/views/monitor/index.html +++ b/src/main/webapp/views/monitor/index.html @@ -56,8 +56,8 @@ </body> </html> <script> - let url = 'http://192.168.4.34:8080/fnwms' - var item = [] + let url = 'http://192.168.4.188:8085/fnwms' + var item = [{locNo: '1',locSts: '1',mk: '1',packStatus$: '1'}] var year = '2020'; var month = '05'; var day = '01'; @@ -80,11 +80,23 @@ //location.reload() },10000) function initTest() { - console.log(item) var box = '' var el + var len = item.length + var autoplay = true + var css = 'table-td' + if (len == 0) { + box = "<div class='swiper-none'>鏆傛棤娴嬭瘯鏁版嵁</div>" + } else if (len < 5) { + var itemInfo = {locNo: '',locSts: '',mk: '',packStatus$: ''} + for (var j = 0; j < 5-len;j++) { + css = 'table-td2' + autoplay = false + item.push(itemInfo) + } + } for (var i = 0; i < item.length; i++) { - el = "<div class='swiper-slide table-td'><div style='flex: 1'>" + el = "<div class='swiper-slide "+ css + " '><div style='flex: 1'>" + item[i].locNo + "</div><div style='flex: 1'>" + item[i].locSts + "</div><div style='flex: 1'>" + item[i].mk + "</div><div style='flex: 1'>" @@ -96,7 +108,7 @@ var mySwiper = new Swiper ('.swiper', { direction: 'vertical', // 鍨傜洿鍒囨崲閫夐」 loop: true, // 寰幆妯″紡閫夐」 - autoplay:true, + autoplay:autoplay, slidesPerView: 5, }) } @@ -261,26 +273,27 @@ { name: '鍚堟牸', type: 'bar', - itemStyle: { - normal: { - label: { - show: true, - position: 'top' - } - } + stack: 'Ad', + label: { + show: true, + fontSize: 16, + fontWeight: 'bold', + position: 'top', + color: '#FFF', + offset: [15,5], }, + z:99, + barWidth:'50%', data: [10, 1] }, { name: '涓嶅悎鏍�', type: 'bar', - itemStyle: { - normal: { - label: { - show: true, - position: 'top' - } - } + stack: 'Ad', + label: { + show: true, + fontSize: 16,fontWeight: 'bold', + position: 'top',offset: [-15,5], }, data: [9, 3] } @@ -409,7 +422,6 @@ } }); } - function initBasicInformation() { $.ajax({ url: url+"/mobile/pack/basic/information", @@ -420,7 +432,7 @@ for (var i = 0; i < res.data.length; i++) { array.push(res.data[i]) } - item = array + item = array } } }); -- Gitblit v1.9.1