{
    template:'${tmpl}',
    data:function(){
        return {
            ldms:[],
        }
    },
    mounted:function(){
        this.ldms=[
            {
                "title":"用户名",
                "validProp":"userName",
                "rule": [
                     { "required": true, "message": '请输入用户名', "trigger": 'blur' },
                 ],
                 "ctls":[
                   {"type":"input","label":"用户名","prop":"userName","placeHolder":"请输入用户名","style":""},
                 ]
              },
              {
                "title":"用户密码",
                "validProp":"password",
                "rule": [
                     { "required": true, "message": '请输入用户密码', "trigger": 'blur' },
                 ],
                 ctls:[
                    {"type":"input","label":"用户密码","prop":"password","placeHolder":"请输入用户密码","style":""},
                 ]
              },
        ];

    },
    created:function(){

    },
    methods:{
        validmethod:function (rule,value,callback) { 
            console.log("code validdate");
            var self=this;
            var fm=this.currentFrm.getFormModel();
            return callback();
        },
        sbhandler:function () {  
            var self=this;
            var fm=this.$refs.loginFrm.getFormModel();
            this.$refs.loginFrm.validate(function(v){
                if(v){
                    self.$root.postReq("/web/userCtl/login",{u:fm}).then(function(d){
                        if(d.status==0){
                            console.log(d.data);
                            location.reload();
                        }
                      });
                }
            });
         },
     
    },
    vname:"gsb-login"
}
