|
@@ -35,6 +35,7 @@ export default {
|
|
|
pageSize: 7,
|
|
|
pageTotal: null,
|
|
|
},
|
|
|
+ timer: null,
|
|
|
config: {
|
|
|
// header: ["时间", "病害信息", "数量", "标段"],
|
|
|
data: [
|
|
@@ -145,9 +146,6 @@ export default {
|
|
|
telno: hideTel,
|
|
|
};
|
|
|
});
|
|
|
- console.log(this.config.data, "445566");
|
|
|
-
|
|
|
- console.log("我先执行");
|
|
|
|
|
|
this.config = {
|
|
|
...this.config,
|
|
@@ -164,35 +162,22 @@ export default {
|
|
|
];
|
|
|
}),
|
|
|
};
|
|
|
-
|
|
|
- // this.config.data=[]
|
|
|
- // let list = [];
|
|
|
- // this.dataList.forEach((item) => {
|
|
|
- // list.push([
|
|
|
- // `<div class="right-box">
|
|
|
- // <div class="top">
|
|
|
- // <div class="top-left">${item.alarmMessage}</div>
|
|
|
- // <div class="top-right">${item.createtime}</div>
|
|
|
- // </div>
|
|
|
- // <div class="middle">${item.name} (${item.telno})</div>
|
|
|
- // <div class="under">告警地址:${item.location}</div>
|
|
|
- // </div>`,
|
|
|
- // ]);
|
|
|
- // });
|
|
|
- // console.log(list,'我是list');
|
|
|
- // this.config.data = list;
|
|
|
- // console.log(this.config.data,'112233');
|
|
|
-
|
|
|
- // 分页
|
|
|
- // let pageTotal = res.total / this.queryParams.pageSize;
|
|
|
- // if (String(pageTotal).indexOf(".") > -1) {
|
|
|
- // pageTotal = parseInt(pageTotal) + 1;
|
|
|
- // } else {
|
|
|
- // pageTotal = pageTotal;
|
|
|
- // }
|
|
|
- // this.queryParams.pageTotal = pageTotal;
|
|
|
+ this.switper();
|
|
|
});
|
|
|
},
|
|
|
+ //轮询
|
|
|
+ switper() {
|
|
|
+ if (this.timer) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let looper = (a) => {
|
|
|
+ this.initData();
|
|
|
+ };
|
|
|
+ this.timer = setInterval(
|
|
|
+ looper,
|
|
|
+ this.$store.state.settings.echartsAutoTime
|
|
|
+ );
|
|
|
+ },
|
|
|
hideMiddleDigits(phoneNumber) {
|
|
|
if (phoneNumber && phoneNumber.length === 11) {
|
|
|
const prefix = phoneNumber.substring(0, 3);
|