|
@@ -176,9 +176,19 @@
|
|
|
this.moduleTypes = res.data.data[4];
|
|
|
}
|
|
|
});
|
|
|
+ this.getDeptList();
|
|
|
+ },
|
|
|
+ getDeptList(){
|
|
|
+ const depts = localStorage.getItem("precDeptList");
|
|
|
+ const list = depts?JSON.parse(depts):[];
|
|
|
+ if(list&&list.length>0){
|
|
|
+ this.deptList = list;
|
|
|
+ return ;
|
|
|
+ }
|
|
|
api.getDeptList({moduleType:0,type:1}).then((res) =>{
|
|
|
if(res.data.code === '0') {
|
|
|
this.deptList = res.data.data&&res.data.data.deptDTOS||[];
|
|
|
+ localStorage.setItem("precDeptList",JSON.stringify(this.deptList));
|
|
|
}
|
|
|
});
|
|
|
},
|