NEZ-1915 fix:Asset model编辑页面不支持选择 所有 Type
This commit is contained in:
@@ -230,21 +230,21 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
modelTypeList () {
|
modelTypeList () {
|
||||||
this.$get('asset/model', { pageSize: -1, pageNo: 1 }).then(res => {
|
this.$get('asset/typeConf/tree', { pageSize: -1, pageNo: 1 }).then(res => {
|
||||||
this.typeDataList = res.data.list.map((e, i) => {
|
this.typeDataList = res.data.list.map((e, i) => {
|
||||||
return {
|
return {
|
||||||
name: e.type.name,
|
name: e.name,
|
||||||
id: e.type.id
|
id: e.id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
for (let i = 0; i < this.typeDataList.length - 1; i++) {
|
// for (let i = 0; i < this.typeDataList.length - 1; i++) {
|
||||||
for (let j = i + 1; j < this.typeDataList.length; j++) {
|
// for (let j = i + 1; j < this.typeDataList.length; j++) {
|
||||||
if (this.typeDataList[i].id == this.typeDataList[j].id) {
|
// if (this.typeDataList[i].id == this.typeDataList[j].id) {
|
||||||
this.typeDataList.splice(j, 1)
|
// this.typeDataList.splice(j, 1)
|
||||||
j--
|
// j--
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user