|
@@ -66,9 +66,8 @@ export default {
|
|
|
this.$emit("change", value)
|
|
|
},
|
|
|
async getData() {
|
|
|
- let _this = this
|
|
|
await getEquipmentFamily(res => {
|
|
|
- _this.options = _this.changeArr(res.Content)
|
|
|
+ this.options = this.changeArr(res.Content)
|
|
|
if (!!this.value && this.value.length) {
|
|
|
let value = {}
|
|
|
this.options.map(item => {
|
|
@@ -78,8 +77,8 @@ export default {
|
|
|
})
|
|
|
this.$emit("change", value)
|
|
|
}
|
|
|
- if (!_this.falg) {
|
|
|
- _this.changeList()
|
|
|
+ if (!this.falg) {
|
|
|
+ this.changeList()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -100,13 +99,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
changeList() {
|
|
|
- this.options.map(item => {
|
|
|
- item.disabled = true
|
|
|
- this.content.map(child => {
|
|
|
- if (item.code == child) {
|
|
|
- item.disabled = false
|
|
|
- }
|
|
|
- })
|
|
|
+ this.options = this.options.filter(item => {
|
|
|
+ if (this.content.indexOf(item.code) > -1) {
|
|
|
+ return item
|
|
|
+ }
|
|
|
+ // item.disabled = true
|
|
|
+ // this.content.map(child => {
|
|
|
+ // if (item.code == child) {
|
|
|
+ // item.disabled = false
|
|
|
+ // }
|
|
|
+ // })
|
|
|
})
|
|
|
}
|
|
|
}
|