Commit 8243c409bed1b1b778a0b6a6063dae8cd7cc55e7
1 parent
d059a9d1
设备错误列表返回,设备分析对比项数量限制
Showing
2 changed files
with
7 additions
and
5 deletions
src/router/permission.js
@@ -9,7 +9,7 @@ router.beforeEach((to, from, next) => { | @@ -9,7 +9,7 @@ router.beforeEach((to, from, next) => { | ||
9 | next(); | 9 | next(); |
10 | } else { | 10 | } else { |
11 | if (store.getters.token) { | 11 | if (store.getters.token) { |
12 | - if (to.path == '/device' && from.path == '/deviceLog') { | 12 | + if ((to.path == '/device' && from.path == '/deviceLog') || (to.path == '/device' && from.path == '/deviceError')) { |
13 | to.query.back = true | 13 | to.query.back = true |
14 | } | 14 | } |
15 | next(); | 15 | next(); |
src/views/standard/analysis/index.vue
@@ -74,6 +74,7 @@ | @@ -74,6 +74,7 @@ | ||
74 | <span class="s-txt"></span> | 74 | <span class="s-txt"></span> |
75 | <div class="disflex-b"> | 75 | <div class="disflex-b"> |
76 | <el-button | 76 | <el-button |
77 | + v-show="query.secGraClaSub.length < 10" | ||
77 | class="btn" | 78 | class="btn" |
78 | icon="el-icon-plus" | 79 | icon="el-icon-plus" |
79 | size="small" | 80 | size="small" |
@@ -279,11 +280,12 @@ export default { | @@ -279,11 +280,12 @@ export default { | ||
279 | return; | 280 | return; |
280 | } | 281 | } |
281 | let hasSpace = null; | 282 | let hasSpace = null; |
282 | - this.query.secGraClaSub.map((item, index) => { | ||
283 | - if (!item.length) { | ||
284 | - hasSpace = index; | 283 | + for (let i = 0; i < this.query.secGraClaSub.length; i++) { |
284 | + if (!this.query.secGraClaSub[i].length) { | ||
285 | + hasSpace = i; | ||
286 | + break; | ||
285 | } | 287 | } |
286 | - }); | 288 | + } |
287 | if (hasSpace !== null) { | 289 | if (hasSpace !== null) { |
288 | this.$message.warning( | 290 | this.$message.warning( |
289 | `对比项${this.setBigNum(hasSpace)}对比条件不能为空请检查!` | 291 | `对比项${this.setBigNum(hasSpace)}对比条件不能为空请检查!` |