update code

prv
haha 2024-04-06 16:47:25 +08:00
parent 2e0f16cb72
commit 10601fca8c
1 changed files with 10 additions and 3 deletions

View File

@ -165,15 +165,21 @@ export default {
temperature: 20,
condTxt: '',
condCode: '',
proType:'全部',
proTypeList:[],
proType:'',
}
},
beforeCreate(){
created(){
debugger
window.xaap=this
let obj=localStorage.getItem("project_category");
let type=localStorage.getItem("proType");
if(obj &&obj.length>0){
obj=tryToJson(obj,[]);
if(obj.length>0){
this.proTypeList=obj;
let tmps=obj.filter(d=>d.value==type);
this.proType=tmps.length>0?tmps[0].text:"全部";
return;
}
}
@ -186,6 +192,7 @@ export default {
});
tmps=[{value:"0",text:"全部"},...tmps];
this.proTypeList=tmps;
this.proType="全部";
localStorage.setItem("project_category",JSON.stringify(tmps));
});
},
@ -392,7 +399,7 @@ export default {
this.showSel1 = false
this.dept1 = item.text;
this.deptChange();
this.loadProject();
this.loadProject();
},
loadProject(init,cb) {
if (this.isTypeBuser) {