Commit 1c905e98 authored by 李苏's avatar 李苏 💬

刷新后保持当前已选的数据根据是否存在来确定是否改变

parent 0a2b5837
......@@ -239,11 +239,25 @@
if(res&&res.records){
const {records}=res
/* 铺数据 */
this.ppdInfo.psjhList=records.psjhList||[]
if(this.ppdInfo.ph){
let phiscf=false
this.ppdInfo.psjhList.forEach(item=>{
if(item.ph==this.ppdInfo.ph){
phiscf=true
}
})
if(!phiscf){
this.ppdInfo.ph=records.ph||null
}
}else{
this.ppdInfo.ph=records.ph||null
}
this.ppdInfo.wodjid=records.wodjid||null
if(records.upptzdList[0]){
this.ppdInfo.djid=records.upptzdList[0].djid
this.ppdInfo.pptzdid=records.upptzdList[0].id
// this.ppdInfo.djid=records.upptzdList[0].djid
// this.ppdInfo.pptzdid=records.upptzdList[0].id
}else{
this.ppdInfo.djid=null
}
......@@ -254,7 +268,7 @@
}
this.ppdInfo.upptzdList=records.upptzdList||[]
this.ppdInfo.wlxxList=records.wlxxList||[]
this.ppdInfo.psjhList=records.psjhList||[]
/* ---初始化--- */
/* upptzdList */
let ph=this.ppdInfo.ph
......@@ -604,7 +618,9 @@
/* 开始过滤 */
let mid= this.ppdInfo.pptzdid
let newArr1=this.ppdInfo.wlxxList.filter(item=>{
if(item.mid==mid){
console.log(item.mid,mid)
return item
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment