前端增加数据过滤条件

This commit is contained in:
任珮宇 2023-10-28 12:02:06 +08:00
parent d439734ebd
commit fac40cb2dc

View File

@ -281,16 +281,18 @@ export default {
this.$message.success({ content: 'Loaded!', key, duration: 2 }) this.$message.success({ content: 'Loaded!', key, duration: 2 })
} }
res.result.forEach((item) => { res.result.forEach((item) => {
arr.forEach((el) => { if (object.prototype.toString.call(item) == '[object Object]') {
if ( arr.forEach((el) => {
parseInt(item.id) == el.stationId && if (
el.stationType != 'Nuclear Facility' && parseInt(item.id) == el.stationId &&
el.stationType != 'NRL' el.stationType != 'Nuclear Facility' &&
) { el.stationType != 'NRL'
item.stationType = el.stationType ) {
item.stationId = el.stationId item.stationType = el.stationType
} item.stationId = el.stationId
}) }
})
}
}) })
this.orgStationList = res.result this.orgStationList = res.result
let arrA = [] let arrA = []