Commit cd36de4dcaa1d727fa11cda42b4ce7264e193cab
1 parent
91c75868
滚动播报
Showing
2 changed files
with
28 additions
and
42 deletions
src/components/device/index.vue
| @@ -35,44 +35,6 @@ | @@ -35,44 +35,6 @@ | ||
| 35 | </td> | 35 | </td> | 
| 36 | </tr> | 36 | </tr> | 
| 37 | </table> | 37 | </table> | 
| 38 | - <!--<table class="deviceTb">--> | ||
| 39 | - <!--<tr>--> | ||
| 40 | - <!--<td>--> | ||
| 41 | - <!--<div class="deviceBg eleVerHorCenter-box">--> | ||
| 42 | - <!--<table class="PDAcontent">--> | ||
| 43 | - <!--<tr><td><span>{{PDANum}}</span> </td></tr>--> | ||
| 44 | - <!--<tr><td><div>PDA</div></td></tr>--> | ||
| 45 | - <!--</table>--> | ||
| 46 | - <!--</div>--> | ||
| 47 | - <!--</td>--> | ||
| 48 | - <!--<td>--> | ||
| 49 | - <!--<div class="deviceBg eleVerHorCenter-box">--> | ||
| 50 | - <!--<table class="diCicontent">--> | ||
| 51 | - <!--<tr><td><span>{{diCiNum}}</span> </td></tr>--> | ||
| 52 | - <!--<tr><td><div>地磁</div></td></tr>--> | ||
| 53 | - <!--</table>--> | ||
| 54 | - <!--</div>--> | ||
| 55 | - <!--</td>--> | ||
| 56 | - <!--</tr>--> | ||
| 57 | - <!--<tr>--> | ||
| 58 | - <!--<td>--> | ||
| 59 | - <!--<div class="deviceBg eleVerHorCenter-box">--> | ||
| 60 | - <!--<table class="daoZhacontent">--> | ||
| 61 | - <!--<tr><td><span>{{daoZha}}</span> </td></tr>--> | ||
| 62 | - <!--<tr><td><div>道闸</div></td></tr>--> | ||
| 63 | - <!--</table>--> | ||
| 64 | - <!--</div>--> | ||
| 65 | - <!--</td>--> | ||
| 66 | - <!--<td>--> | ||
| 67 | - <!--<div class="deviceBg eleVerHorCenter-box">--> | ||
| 68 | - <!--<table class="youDaocontent">--> | ||
| 69 | - <!--<tr><td><span>{{youDaoNum}}</span> </td></tr>--> | ||
| 70 | - <!--<tr><td><div>诱导屏</div></td></tr>--> | ||
| 71 | - <!--</table>--> | ||
| 72 | - <!--</div>--> | ||
| 73 | - <!--</td>--> | ||
| 74 | - <!--</tr>--> | ||
| 75 | - <!--</table>--> | ||
| 76 | </div> | 38 | </div> | 
| 77 | </div> | 39 | </div> | 
| 78 | </div> | 40 | </div> | 
| @@ -102,13 +64,18 @@ import { deviceAddress } from '../../api/api' | @@ -102,13 +64,18 @@ import { deviceAddress } from '../../api/api' | ||
| 102 | onLoad() { | 64 | onLoad() { | 
| 103 | deviceAddress({orgIds: this.GLOBAL.paramsvariables}).then((response)=>{ | 65 | deviceAddress({orgIds: this.GLOBAL.paramsvariables}).then((response)=>{ | 
| 104 | let data = response.data.data | 66 | let data = response.data.data | 
| 67 | + console.log(data) | ||
| 105 | this.PDANum = data[0].num | 68 | this.PDANum = data[0].num | 
| 106 | this.PDAName = data[0].deviceName | 69 | this.PDAName = data[0].deviceName | 
| 107 | this.diCiNum = data[1].num | 70 | this.diCiNum = data[1].num | 
| 108 | this.diCiName = data[1].deviceName | 71 | this.diCiName = data[1].deviceName | 
| 109 | this.daoZhaNum = data[2].num | 72 | this.daoZhaNum = data[2].num | 
| 73 | + | ||
| 110 | this.daoZhaName = data[2].deviceName | 74 | this.daoZhaName = data[2].deviceName | 
| 111 | this.youDaoNum = data[3].num | 75 | this.youDaoNum = data[3].num | 
| 76 | + if(this.youDaoNum == 0){ | ||
| 77 | + this.youDaoNum = '-' | ||
| 78 | + } | ||
| 112 | this.youDaoName = data[3].deviceName | 79 | this.youDaoName = data[3].deviceName | 
| 113 | }).catch((response)=>{ | 80 | }).catch((response)=>{ | 
| 114 | console.log(response); | 81 | console.log(response); | 
src/components/orderMessage/index.vue
| @@ -10,8 +10,8 @@ | @@ -10,8 +10,8 @@ | ||
| 10 | <li class="orderMoney">收费金额</li> | 10 | <li class="orderMoney">收费金额</li> | 
| 11 | </ul> | 11 | </ul> | 
| 12 | <div class="nwwest-roll news-wrap" id="nwwest-roll"> | 12 | <div class="nwwest-roll news-wrap" id="nwwest-roll"> | 
| 13 | - <ul id="roll-ul"> | ||
| 14 | - <li v-for="(item,index) in list" ref="rollul" :class="{anim:animate==true}" :key="index"> | 13 | + <ul id="roll-ul" class="roll-ul" :style="{ top }"> | 
| 14 | + <li v-for="(item,index) in list" ref="rollul" :key="index"> | ||
| 15 | <div :title="item.orderId">{{item.orderId}}</div> | 15 | <div :title="item.orderId">{{item.orderId}}</div> | 
| 16 | <div :title="item.plName">{{item.plName}}</div> | 16 | <div :title="item.plName">{{item.plName}}</div> | 
| 17 | <div :title="item.orderActFee">{{item.orderActFee|formatMoney}}</div> | 17 | <div :title="item.orderActFee">{{item.orderActFee|formatMoney}}</div> | 
| @@ -32,10 +32,16 @@ | @@ -32,10 +32,16 @@ | ||
| 32 | orderList:"",//公告列表 | 32 | orderList:"",//公告列表 | 
| 33 | //marqueeHeight: '100%', | 33 | //marqueeHeight: '100%', | 
| 34 | name: '订单公告', | 34 | name: '订单公告', | 
| 35 | - animate: true, | 35 | + activeIndex: 0, | 
| 36 | + intnum: undefined, | ||
| 36 | list: [] | 37 | list: [] | 
| 37 | } | 38 | } | 
| 38 | }, | 39 | }, | 
| 40 | + computed: { | ||
| 41 | + top() { | ||
| 42 | + return - this.activeIndex * 26 + 'px'; | ||
| 43 | + } | ||
| 44 | + }, | ||
| 39 | created() { | 45 | created() { | 
| 40 | this.onLoad() | 46 | this.onLoad() | 
| 41 | }, | 47 | }, | 
| @@ -46,7 +52,15 @@ | @@ -46,7 +52,15 @@ | ||
| 46 | }).then((response)=>{ | 52 | }).then((response)=>{ | 
| 47 | let data = response.data.data | 53 | let data = response.data.data | 
| 48 | this.list = data; | 54 | this.list = data; | 
| 49 | - setInterval(this.scroll, 2000) | 55 | + var that = this | 
| 56 | + this.intnum = setInterval(_ => { | ||
| 57 | + if (this.activeIndex < this.list.length) { | ||
| 58 | + this.activeIndex += 1; | ||
| 59 | + that.list.push(that.list[0]); | ||
| 60 | + } else { | ||
| 61 | + this.activeIndex = 0; | ||
| 62 | + } | ||
| 63 | + }, 1000); | ||
| 50 | }).catch((response)=>{ | 64 | }).catch((response)=>{ | 
| 51 | console.log(response); | 65 | console.log(response); | 
| 52 | }) | 66 | }) | 
| @@ -82,6 +96,11 @@ | @@ -82,6 +96,11 @@ | ||
| 82 | height: 40px; | 96 | height: 40px; | 
| 83 | line-height: 40px; | 97 | line-height: 40px; | 
| 84 | font-size: 14px; | 98 | font-size: 14px; | 
| 99 | + .roll-ul{ | ||
| 100 | + height: 100%; | ||
| 101 | + position: relative; | ||
| 102 | + transition: top 0.5s; | ||
| 103 | + } | ||
| 85 | li{ | 104 | li{ | 
| 86 | height: 40px; | 105 | height: 40px; | 
| 87 | float: left; | 106 | float: left; | 
