| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- <template >
- <div class="yjxx">
- <div class="title">预警信息</div>
- <div class="dataShow">
- <ul class="outUl">
- <li style="color: #26dec5">预警信息</li>
- <li style="color: #26dec5">预警点</li>
- <li style="color: #26dec5">监测时间</li>
- </ul>
- <vue-seamless-scroll
- :data="tableData"
- :class-option="classOption"
- class="scroll"
- id="yjxxScroll"
- >
- <ul
- class="DataList_top inUl"
- v-for="(item, index) in tableData"
- :key="index"
- >
- <li class="DataList_left">
- <span
- style="
- width: 5px;
- height: 5px;
- border-radius: 50%;
- background: rgb(38, 222, 197);
- display: inline-block;
- margin-right: 5px;
- "
- ></span
- >{{ item.alarmRemark }}
- </li>
- <li class="DataList_left">
- {{ item.deviceName }}
- </li>
- <li class="DataList_left">
- {{ item.alarmTime }}
- </li>
- </ul>
- </vue-seamless-scroll>
-
- </div>
- </div>
- </template>
- <script>
- import vueSeamlessScroll from "vue-seamless-scroll";
- import * as echarts from "echarts";
- import api from "@/api";
- export default {
- components: {
- vueSeamlessScroll,
-
- },
- data(){
- return{
- tableData:[
-
- ]
- }
- },
- computed: {
- classOption() {
- return {
- step: 0.2, // 数值越大速度滚动越快
- limitMoveNum: 5, // 开始无缝滚动的数据量 this.dataList.length
- hoverStop: true, // 是否开启鼠标悬停stop
- direction: 1, // 0向下 1向上 2向左 3向右
- openWatch: true, // 开启数据实时监控刷新dom
- singleHeight: 0, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
- singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
- waitTime: 0, // 单步运动停止的时间(默认值1000ms)
- };
- },
- },
- methods:{
- //预警信息
- getWarnInfo(code) {
- let params = {
- labelCode: code,
- orgCode: localStorage.getItem("orgCode"),
- pageSize: 5,
- };
- api.warnInfo(params).then((res) => {
- console.log(res, "预警信息");
- if(res.code==200){
- this.tableData=res.data
- }
-
- });
- },
-
- },
- created(){
-
- // this.getWarnInfo()
-
-
-
- }
- }
- </script>
- <style lang="scss" scoped>
- .yjxx {
- height: 100%;
- width: 21%;
- background: url("../../../../assets/images/bigScreen/tempBorder.png")
- no-repeat;
- background-size: 100% 100%;
- .title {
- height: 37px;
- line-height: 37px;
- margin-left: 10px;
- color: #fff;
- font-weight: 600;
- }
- .dataShow {
- padding-top: 10px;
- }
- }
- .outUl {
- display: flex;
- justify-content: space-around;
- // padding: 7px 0;
- color: #ccc;
- font-weight: bolder;
- li {
- display: flex;
- justify-content: space-around;
- text-align: center;
- width: 27%;
- font-size: 14px;
- }
- li:nth-child(3) {
- width: 46%;
- }
- // // li:nth-child(1) {
- // // width: 24%;
- // // }
- }
- .inUl {
- display: flex;
- justify-content: space-around;
- li {
- line-height: 29px;
- text-align: center;
- width: 27%;
- font-size: 12px;
- color: rgb(204, 236, 232);
- // color:rgb(29, 221, 196);
- }
- li:nth-child(3) {
- width: 46%;
- }
- }
- #yjxxScroll {
- height: 140px;
- overflow: hidden;
- }
-
-
-
-
- </style>
|