1. let data = this.$route.params.data;
    2. let flag = this.$route.params.flag;
    3. if(!data) {
    4. this.$router.push({ path: '/setting/user'});
    5. }
    6. if (flag == 'add') {
    7. console.log("新增:", data);
    8. this.editType = 1;
    9. this.isShowUserCount = false;
    10. }
    11. console.log('data',data);
    12. if(flag == 'edit'){
    13. console.log("传过来的数据:", data);
    14. //记录回显的密码
    15. this.recordPassword = data.password;
    16. this.isShowUserCount = true;
    17. this.editType = 0;
    18. this.form = Object.assign(this.form, data);
    19. this.form.departId = data.sysDepartQueryModel.bid;
    20. this.form.roleId = data.sysRoleQueryModel.bid;
    21. //添加逻辑 根据departId请求 得到list数据
    22. let data = {
    23. departId: data.sysDepartQueryModel.bid,
    24. }
    25. treeBidListByDepartId(data).then(res=>{
    26. this.treeBidList = res;
    27. })
    28. }