Merge branch 'master-500-dev' of http://192.168.1.136:82/monitor_v3/anji-plus-re…
…port into master-500-dev-lushangqing
Showing
1 changed file
with
11 additions
and
4 deletions
1 | +<!-- | ||
2 | +--> | ||
1 | <template> | 3 | <template> |
2 | - <div> | ||
3 | - <div :id="id" :style="styleObj"></div> | 4 | + <div :style="styleObj"> |
5 | + <div :id="id" style="width: 100%;height: 100%;padding: 10px"></div> | ||
4 | </div> | 6 | </div> |
5 | </template> | 7 | </template> |
6 | 8 | ||
@@ -30,8 +32,8 @@ export default { | @@ -30,8 +32,8 @@ export default { | ||
30 | return ( | 32 | return ( |
31 | params.seriesName + | 33 | params.seriesName + |
32 | '<br/>' + params.name + ' ' + params.value[2] + ' :<br/>' + | 34 | '<br/>' + params.name + ' ' + params.value[2] + ' :<br/>' + |
33 | - '最大' + params.value[2] + ': ' + params.value[3] + '% ' + '<br/>' + | ||
34 | - '最小' + params.value[2] + ': ' + params.value[4] + '% ' + '<br/>' + | 35 | + // '最大' + params.value[2] + ': ' + params.value[3] + '% ' + '<br/>' + |
36 | + // '最小' + params.value[2] + ': ' + params.value[4] + '% ' + '<br/>' + | ||
35 | '平均' + params.value[2] + ': ' + params.value[5] + '% ' + '<br/>' | 37 | '平均' + params.value[2] + ': ' + params.value[5] + '% ' + '<br/>' |
36 | ); | 38 | ); |
37 | }, | 39 | }, |
@@ -135,6 +137,11 @@ export default { | @@ -135,6 +137,11 @@ export default { | ||
135 | computed: { | 137 | computed: { |
136 | styleObj() { | 138 | styleObj() { |
137 | const allStyle = this.optionsPosition; | 139 | const allStyle = this.optionsPosition; |
140 | + let maxWidth = window.innerWidth; | ||
141 | + console.log(maxWidth,allStyle.width) | ||
142 | + if( allStyle.width > maxWidth){ | ||
143 | + allStyle.width = maxWidth; | ||
144 | + } | ||
138 | return { | 145 | return { |
139 | width: allStyle.width + "px", | 146 | width: allStyle.width + "px", |
140 | height: allStyle.height + "px" | 147 | height: allStyle.height + "px" |
-
Please register or login to post a comment