|
@@ -201,7 +201,7 @@ export default {
|
|
|
})
|
|
|
getGoafBaseInfo().then((res) => {
|
|
|
this.goaf = res.data
|
|
|
- this.goafOrebelts = res.data
|
|
|
+ this.goafOrebelts = this.unique(res.data, 'goafOrebelt')
|
|
|
this.goafOrebodys = res.data
|
|
|
this.goafOreheights = res.data
|
|
|
this.goafNames = res.data
|
|
@@ -248,41 +248,37 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
changeArea(type) {
|
|
|
- const goafOrebelts = this.deeepClone(this.goafOrebelts)
|
|
|
+ const goafs = this.deeepClone(this.goafList)
|
|
|
let goafOrebodys = this.deeepClone(this.goafOrebodys)
|
|
|
let goafOreheights = this.deeepClone(this.goafOreheights)
|
|
|
let goafNames = this.deeepClone(this.goafNames)
|
|
|
if (type === 1) {
|
|
|
- goafOrebodys = goafOrebelts.filter(
|
|
|
- (item) => item.goafOrebelt === this.formData.goafOrebelt
|
|
|
- )
|
|
|
+ goafOrebodys = goafs.filter(item => item.goafOrebelt === this.conditions.goafOrebelt)
|
|
|
goafOrebodys = this.unique(goafOrebodys, 'goafOrebody')
|
|
|
this.goafOrebodys = goafOrebodys
|
|
|
this.goafOreheights = []
|
|
|
this.goafNames = []
|
|
|
- this.formData.goafOrebody = ''
|
|
|
- this.formData.goafOreheight = ''
|
|
|
- this.formData.goafId = ''
|
|
|
+ this.conditions.goafOrebody = ''
|
|
|
+ this.conditions.goafOreheight = ''
|
|
|
+ this.conditions.goafName = ''
|
|
|
+ this.conditions.goafId = ''
|
|
|
} else if (type === 2) {
|
|
|
- goafOreheights = goafOrebodys.filter(
|
|
|
- (item) => item.goafOrebody === this.formData.goafOrebody
|
|
|
- )
|
|
|
- goafOreheights = this.unique(goafOreheights, 'goafOreheight')
|
|
|
+ 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.formData.goafOreheights = ''
|
|
|
- this.formData.goafId = ''
|
|
|
+ this.conditions.goafOreheight = ''
|
|
|
+ this.conditions.goafName = ''
|
|
|
+ this.conditions.goafId = ''
|
|
|
} else if (type === 3) {
|
|
|
- goafNames = goafOreheights.filter(
|
|
|
- (item) => item.goafOreheight === this.formData.goafOreheight
|
|
|
- )
|
|
|
- // goafNames = this.unique(goafNames, 'goafName')
|
|
|
+ goafNames = goafs.filter(item => (item.goafOreheight === this.conditions.goafOreheight) && (item.goafOrebody === this.conditions.goafOrebody) && (item.goafOrebelt === this.conditions.goafOrebelt))
|
|
|
this.goafNames = goafNames
|
|
|
- this.formData.goafId = ''
|
|
|
+ this.conditions.goafName = ''
|
|
|
+ this.conditions.goafId = ''
|
|
|
} else {
|
|
|
for (let i = 0; i < goafNames.length; i++) {
|
|
|
- if (this.formData.goafId === goafNames[i].goafId) {
|
|
|
- this.formData.goafName = goafNames[i].goafName
|
|
|
+ if (this.conditions.goafId === goafNames[i].goafId) {
|
|
|
+ this.conditions.goafName = goafNames[i].goafName
|
|
|
}
|
|
|
}
|
|
|
}
|