Browse Source

急救时长分析图每10秒重新查询

master
aBin 5 years ago
parent
commit
a0827061b3
  1. 2
      public/index.html
  2. 7
      src/components/Duration/Duration.vue

2
public/index.html

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link rel="icon" href="./favicon.ico">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>

7
src/components/Duration/Duration.vue

@ -14,10 +14,14 @@ export default {
// msg: 'Welcome to Your Vue.js App',
width: '',
height: '',
timer: null,
};
},
mounted() {
this.drawLine();
this.timer = setInterval(() => {
this.drawLine();
}, 10000);
let wh = window.innerWidth;
let hg = window.innerHeight;
this.width = wh + 'px';
@ -32,6 +36,9 @@ export default {
})();
};
},
destroyed() {
clearInterval(this.timer);
},
methods: {
async drawLine() {
// domecharts

Loading…
Cancel
Save