<commit_before>/**
    入驻小区
**/
(function(vc){
    vc.extends({
        data:{
            addStaffStepInfo:{
                $step:{},
                index:0,
                infos:[],
                branchOrgInfo:{
                        orgId:'',
                         componentName:'分公司信息',
                         buttonName:'选择分公司',
                         orgName:'',
                         orgLevel:'2',
                         parentOrgId:'',
                         description:'',
                },
                departmemtOrgInfo:{
                         orgId:'',
                         componentName:'部门信息',
                         buttonName:'选择部门',
                         orgName:'',
                         orgLevel:'3',
                         parentOrgId:'',
                         description:'',
                },
                staffInfo:{
                    orgId:'',
                    username:'',
                    sex:'',
                    email:'',
                    tel:'',
                    address:'',
                }
            }
        },
        _initMethod:function(){
            vc.component._initStep();
        },
        _initEvent:function(){
            vc.on("addStaffStep", "notify", function(_info){
                if(vc.component.addStaffStepInfo.index == 0){
                    vc.copyObject(_info,vc.component.addStaffStepInfo.branchOrgInfo);
                    vc.component.addStaffStepInfo.infos[0] = vc.component.addStaffStepInfo.branchOrgInfo;
                }else if(vc.component.addStaffStepInfo.index == 1){
                    vc.copyObject(_info,vc.component.addStaffStepInfo.departmemtOrgInfo);
                    vc.component.addStaffStepInfo.staffInfo.orgId = _info.orgId
                    vc.component.addStaffStepInfo.infos[1] = vc.component.addStaffStepInfo.departmemtOrgInfo;

                }else{
                    vc.copyObject(_info, vc.component.addStaffStepInfo.staffInfo);
                    vc.component.addStaffStepInfo.infos[2] = vc.component.addStaffStepInfo.staffInfo;
                }

            });

        },
        methods:{
            _initStep:function(){
                vc.component.addStaffStepInfo.$step = $("#step");
                vc.component.addStaffStepInfo.$step.step({
                    index: 0,
                    time: 500,
                    title: ["选择分公司","选择部门","员工信息"]
                });
                vc.component.addStaffStepInfo.index = vc.component.addStaffStepInfo.$step.getIndex();
                vc.component._notifyViewOrgInfoComponentData();
            },
            _prevStep:function(){
                vc.component.addStaffStepInfo.$step.prevStep();
                vc.component.addStaffStepInfo.index = vc.component.addStaffStepInfo.$step.getIndex();

                vc.emit('viewOrgInfo', 'onIndex', vc.component.addStaffStepInfo.index);
                vc.emit('addStaffView', 'onIndex', vc.component.addStaffStepInfo.index);

                vc.component._notifyViewOrgInfoComponentData();

            },
            _nextStep:function(){
                var _currentData = vc.component.addStaffStepInfo.infos[vc.component.addStaffStepInfo.index];
                if( _currentData == null || _currentData == undefined){
                    vc.message("请选择或填写必选信息");
                    return ;
                }
                vc.component.addStaffStepInfo.$step.nextStep();
                vc.component.addStaffStepInfo.index = vc.component.addStaffStepInfo.$step.getIndex();

                 vc.emit('viewOrgInfo', 'onIndex', vc.component.addStaffStepInfo.index);
                vc.emit('addStaffView', 'onIndex', vc.component.addStaffStepInfo.index);
                vc.component._notifyViewOrgInfoComponentData();


            },
            _finishStep:function(){

                //vc.component.addStaffStepInfo.staffInfo.departmentOrgId = vc.component.addStaffStepInfo.infos[1].orgId;
               vc.http.post(
                   'addStaffStepBinding',
                   'binding',
                   JSON.stringify(vc.component.addStaffStepInfo.staffInfo),
                   {
                       emulateJSON:true
                    },
                    function(json,res){
                       if(res.status == 200){

                           vc.message('处理成功',true);
                           //关闭model
                           vc.jumpToPage("/flow/staff?" + vc.objToGetParam(JSON.parse(json)));
                           return ;
                       }
                       vc.message(json);
                    },
                    function(errInfo,error){
                       console.log('请求失败处理');

                       vc.message(errInfo);
                    });
            },
            _notifyViewOrgInfoComponentData:function(){

                if(vc.component.addStaffStepInfo.index == 0){
                    vc.emit('viewOrgInfo', '_initInfo',vc.component.addStaffStepInfo.branchOrgInfo);
                }else if(vc.component.addStaffStepInfo.index == 1){
                    vc.component.addStaffStepInfo.departmemtOrgInfo.parentOrgId = c.component.addStaffStepInfo.branchOrgInfo.orgId;
                    vc.emit('viewOrgInfo', '_initInfo',vc.component.addStaffStepInfo.departmemtOrgInfo);
                }
            }
        }
    });
})(window.vc);<commit_msg>解决vc 瓶邪错误问题<commit_after>/**
    入驻小区
**/
(function(vc){
    vc.extends({
        data:{
            addStaffStepInfo:{
                $step:{},
                index:0,
                infos:[],
                branchOrgInfo:{
                        orgId:'',
                         componentName:'分公司信息',
                         buttonName:'选择分公司',
                         orgName:'',
                         orgLevel:'2',
                         parentOrgId:'',
                         description:'',
                },
                departmemtOrgInfo:{
                         orgId:'',
                         componentName:'部门信息',
                         buttonName:'选择部门',
                         orgName:'',
                         orgLevel:'3',
                         parentOrgId:'',
                         description:'',
                },
                staffInfo:{
                    orgId:'',
                    username:'',
                    sex:'',
                    email:'',
                    tel:'',
                    address:'',
                }
            }
        },
        _initMethod:function(){
            vc.component._initStep();
        },
        _initEvent:function(){
            vc.on("addStaffStep", "notify", function(_info){
                if(vc.component.addStaffStepInfo.index == 0){
                    vc.copyObject(_info,vc.component.addStaffStepInfo.branchOrgInfo);
                    vc.component.addStaffStepInfo.infos[0] = vc.component.addStaffStepInfo.branchOrgInfo;
                }else if(vc.component.addStaffStepInfo.index == 1){
                    vc.copyObject(_info,vc.component.addStaffStepInfo.departmemtOrgInfo);
                    vc.component.addStaffStepInfo.staffInfo.orgId = _info.orgId
                    vc.component.addStaffStepInfo.infos[1] = vc.component.addStaffStepInfo.departmemtOrgInfo;

                }else{
                    vc.copyObject(_info, vc.component.addStaffStepInfo.staffInfo);
                    vc.component.addStaffStepInfo.infos[2] = vc.component.addStaffStepInfo.staffInfo;
                }

            });

        },
        methods:{
            _initStep:function(){
                vc.component.addStaffStepInfo.$step = $("#step");
                vc.component.addStaffStepInfo.$step.step({
                    index: 0,
                    time: 500,
                    title: ["选择分公司","选择部门","员工信息"]
                });
                vc.component.addStaffStepInfo.index = vc.component.addStaffStepInfo.$step.getIndex();
                vc.component._notifyViewOrgInfoComponentData();
            },
            _prevStep:function(){
                vc.component.addStaffStepInfo.$step.prevStep();
                vc.component.addStaffStepInfo.index = vc.component.addStaffStepInfo.$step.getIndex();

                vc.emit('viewOrgInfo', 'onIndex', vc.component.addStaffStepInfo.index);
                vc.emit('addStaffView', 'onIndex', vc.component.addStaffStepInfo.index);

                vc.component._notifyViewOrgInfoComponentData();

            },
            _nextStep:function(){
                var _currentData = vc.component.addStaffStepInfo.infos[vc.component.addStaffStepInfo.index];
                if( _currentData == null || _currentData == undefined){
                    vc.message("请选择或填写必选信息");
                    return ;
                }
                vc.component.addStaffStepInfo.$step.nextStep();
                vc.component.addStaffStepInfo.index = vc.component.addStaffStepInfo.$step.getIndex();

                 vc.emit('viewOrgInfo', 'onIndex', vc.component.addStaffStepInfo.index);
                vc.emit('addStaffView', 'onIndex', vc.component.addStaffStepInfo.index);
                vc.component._notifyViewOrgInfoComponentData();


            },
            _finishStep:function(){

                //vc.component.addStaffStepInfo.staffInfo.departmentOrgId = vc.component.addStaffStepInfo.infos[1].orgId;
               vc.http.post(
                   'addStaffStepBinding',
                   'binding',
                   JSON.stringify(vc.component.addStaffStepInfo.staffInfo),
                   {
                       emulateJSON:true
                    },
                    function(json,res){
                       if(res.status == 200){

                           vc.message('处理成功',true);
                           //关闭model
                           vc.jumpToPage("/flow/staff?" + vc.objToGetParam(JSON.parse(json)));
                           return ;
                       }
                       vc.message(json);
                    },
                    function(errInfo,error){
                       console.log('请求失败处理');

                       vc.message(errInfo);
                    });
            },
            _notifyViewOrgInfoComponentData:function(){

                if(vc.component.addStaffStepInfo.index == 0){
                    vc.emit('viewOrgInfo', '_initInfo',vc.component.addStaffStepInfo.branchOrgInfo);
                }else if(vc.component.addStaffStepInfo.index == 1){
                    vc.component.addStaffStepInfo.departmemtOrgInfo.parentOrgId = vc.component.addStaffStepInfo.branchOrgInfo.orgId;
                    vc.emit('viewOrgInfo', '_initInfo',vc.component.addStaffStepInfo.departmemtOrgInfo);
                }
            }
        }
    });
})(window.vc);
{'fraction_non_alphanumeric': 0.11218747116892702, 'fraction_numerical': 0.0033213396069748133, 'mean_word_length': 1.2763544729105418, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6892830', 'n_tokens_mistral': 3085, 'n_tokens_neox': 2719, 'n_words': 270}