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 | 9 | next(); | 
| 10 | 10 | } else { | 
| 11 | 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 | 13 | to.query.back = true | 
| 14 | 14 | } | 
| 15 | 15 | next(); | ... | ... | 
src/views/standard/analysis/index.vue
| ... | ... | @@ -74,6 +74,7 @@ | 
| 74 | 74 | <span class="s-txt"></span> | 
| 75 | 75 | <div class="disflex-b"> | 
| 76 | 76 | <el-button | 
| 77 | + v-show="query.secGraClaSub.length < 10" | |
| 77 | 78 | class="btn" | 
| 78 | 79 | icon="el-icon-plus" | 
| 79 | 80 | size="small" | 
| ... | ... | @@ -279,11 +280,12 @@ export default { | 
| 279 | 280 | return; | 
| 280 | 281 | } | 
| 281 | 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 | 289 | if (hasSpace !== null) { | 
| 288 | 290 | this.$message.warning( | 
| 289 | 291 | `对比项${this.setBigNum(hasSpace)}对比条件不能为空请检查!` | ... | ... | 
