index.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <template >
  2. <div class="yjxx">
  3. <div class="title">预警信息</div>
  4. <div class="dataShow">
  5. <ul class="outUl">
  6. <li style="color: #26dec5">预警信息</li>
  7. <li style="color: #26dec5">预警点</li>
  8. <li style="color: #26dec5">监测时间</li>
  9. </ul>
  10. <vue-seamless-scroll
  11. :data="tableData"
  12. :class-option="classOption"
  13. class="scroll"
  14. id="yjxxScroll"
  15. >
  16. <ul
  17. class="DataList_top inUl"
  18. v-for="(item, index) in tableData"
  19. :key="index"
  20. >
  21. <li class="DataList_left">
  22. <span
  23. style="
  24. width: 5px;
  25. height: 5px;
  26. border-radius: 50%;
  27. background: rgb(38, 222, 197);
  28. display: inline-block;
  29. margin-right: 5px;
  30. "
  31. ></span
  32. >{{ item.alarmRemark }}
  33. </li>
  34. <li class="DataList_left">
  35. {{ item.deviceName }}
  36. </li>
  37. <li class="DataList_left">
  38. {{ item.alarmTime }}
  39. </li>
  40. </ul>
  41. </vue-seamless-scroll>
  42. </div>
  43. </div>
  44. </template>
  45. <script>
  46. import vueSeamlessScroll from "vue-seamless-scroll";
  47. import * as echarts from "echarts";
  48. import api from "@/api";
  49. export default {
  50. components: {
  51. vueSeamlessScroll,
  52. },
  53. data(){
  54. return{
  55. tableData:[
  56. ]
  57. }
  58. },
  59. computed: {
  60. classOption() {
  61. return {
  62. step: 0.2, // 数值越大速度滚动越快
  63. limitMoveNum: 5, // 开始无缝滚动的数据量 this.dataList.length
  64. hoverStop: true, // 是否开启鼠标悬停stop
  65. direction: 1, // 0向下 1向上 2向左 3向右
  66. openWatch: true, // 开启数据实时监控刷新dom
  67. singleHeight: 0, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
  68. singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
  69. waitTime: 0, // 单步运动停止的时间(默认值1000ms)
  70. };
  71. },
  72. },
  73. methods:{
  74. //预警信息
  75. getWarnInfo(code) {
  76. let params = {
  77. labelCode: code,
  78. orgCode: localStorage.getItem("orgCode"),
  79. pageSize: 5,
  80. };
  81. api.warnInfo(params).then((res) => {
  82. console.log(res, "预警信息");
  83. if(res.code==200){
  84. this.tableData=res.data
  85. }
  86. });
  87. },
  88. },
  89. created(){
  90. // this.getWarnInfo()
  91. }
  92. }
  93. </script>
  94. <style lang="scss" scoped>
  95. .yjxx {
  96. height: 100%;
  97. width: 21%;
  98. background: url("../../../../assets/images/bigScreen/tempBorder.png")
  99. no-repeat;
  100. background-size: 100% 100%;
  101. .title {
  102. height: 37px;
  103. line-height: 37px;
  104. margin-left: 10px;
  105. color: #fff;
  106. font-weight: 600;
  107. }
  108. .dataShow {
  109. padding-top: 10px;
  110. }
  111. }
  112. .outUl {
  113. display: flex;
  114. justify-content: space-around;
  115. // padding: 7px 0;
  116. color: #ccc;
  117. font-weight: bolder;
  118. li {
  119. display: flex;
  120. justify-content: space-around;
  121. text-align: center;
  122. width: 27%;
  123. font-size: 14px;
  124. }
  125. li:nth-child(3) {
  126. width: 46%;
  127. }
  128. // // li:nth-child(1) {
  129. // // width: 24%;
  130. // // }
  131. }
  132. .inUl {
  133. display: flex;
  134. justify-content: space-around;
  135. li {
  136. line-height: 29px;
  137. text-align: center;
  138. width: 27%;
  139. font-size: 12px;
  140. color: rgb(204, 236, 232);
  141. // color:rgb(29, 221, 196);
  142. }
  143. li:nth-child(3) {
  144. width: 46%;
  145. }
  146. }
  147. #yjxxScroll {
  148. height: 140px;
  149. overflow: hidden;
  150. }
  151. </style>