|
@@ -235,7 +235,8 @@ import { NumConvertLM ,getTime} from '@/utils'
|
|
|
getSensorByPage(this.conditions).then((resp) => {
|
|
|
this.listLoading = false
|
|
|
const {data, total } = resp
|
|
|
- this.dataList = data
|
|
|
+ let tab=this.items.filter(item=>this.activeId===item.id)[0]
|
|
|
+ this.dataList = this.activeId==='1'?data:data.filter(item=>item.goafDevTypename===tab.name)
|
|
|
this.total = total
|
|
|
})
|
|
|
},
|
|
@@ -243,11 +244,10 @@ import { NumConvertLM ,getTime} from '@/utils'
|
|
|
this.activeId=item.id
|
|
|
if(item.id==='5'){
|
|
|
this.$router.push('/particulars/particulars-video')
|
|
|
+ }else{
|
|
|
+ this.init()
|
|
|
}
|
|
|
},
|
|
|
- changeTab(item){
|
|
|
- this.activetab=item.id
|
|
|
- },
|
|
|
searchSubmit(){
|
|
|
this.getData()
|
|
|
},
|
|
@@ -287,6 +287,7 @@ import { NumConvertLM ,getTime} from '@/utils'
|
|
|
let goafNames = this.deeepClone(this.goafNames)
|
|
|
if (type === 1) {
|
|
|
goafOrebodys = goafs.filter(item => item.goafOrebelt === this.conditions.goafOrebelt)
|
|
|
+ goafOrebodys = this.unique(goafOrebodys, 'goafOrebody')
|
|
|
this.goafOrebodys = goafOrebodys
|
|
|
this.goafOreheights = []
|
|
|
this.goafNames = []
|
|
@@ -296,6 +297,7 @@ import { NumConvertLM ,getTime} from '@/utils'
|
|
|
this.conditions.goafId = ''
|
|
|
} else if (type === 2) {
|
|
|
goafOreheights = goafs.filter(item => (item.goafOrebody === this.conditions.goafOrebody) && (item.goafOrebelt === this.conditions.goafOrebelt))
|
|
|
+ goafOreheights = this.unique(goafOrebodys, 'goafOreheight')
|
|
|
this.goafOreheights = goafOreheights
|
|
|
this.goafNames = []
|
|
|
this.conditions.goafOreheight = ''
|
|
@@ -314,7 +316,11 @@ import { NumConvertLM ,getTime} from '@/utils'
|
|
|
}
|
|
|
}
|
|
|
this.$forceUpdate()
|
|
|
- },
|
|
|
+ },
|
|
|
+ unique(arr = [], name = 'name') {
|
|
|
+ const res = new Map()
|
|
|
+ return arr.filter((item) => !res.has(item[name]) && res.set(item[name], 1))
|
|
|
+ },
|
|
|
deeepClone(params) {
|
|
|
return JSON.parse(JSON.stringify(params))
|
|
|
}
|