{
    template:'${tmpl}',
    data:function(){
        return {
          multipleSelection: [],
          isSingleSelect:false,
          cc:"ddddfsdfsd",
        }
    },
    mounted:function(){
      /*var msg={
        cls:"testCtl",
        method:"test",
        data:"hello",
      };
      this.socketClient.socketReplyReq(msg,function(rtn){
        console.log("rtn socket**************************************888888...................................................");
        console.log(rtn);
      });*/
    },
    created:function(){

    },
    methods:{
       handleSelectionChange:function(val){
         this.multipleSelection = val;
         console.log(this.cc);
       },
       headerCellStyle:function(){
         return {"background-color":"red"};
       },
       onColFormater(row,column,cellvalue,index){
         if(column.property=="isEnabled"){
           if(row["isEnabled"]){
             return "是";
           }else{
             return "否";
           }
         }
         if(typeof(cellvalue) == 'number') {
          return cellvalue || 0;
        }
        return cellvalue || "---";
       },
       onRowClick(row, key, e) {
        var self = this;
        console.log($(e.target).text());
      },
       onDlgFormClick(k, model){
         console.log(model, "-----1111111111------------------------------model1");
         if(k=="mysave"){
           console.log(model, "----2222222222222-------------------------------model1");
           var that=this;
           that.$refs.etemplateGrid.$refs.dlgform.validate((valid)=>{
              if(valid){
                this.$root.postReq("/web/etemplateCtl/mysave", model).then(rd=>{
                  if(rd.status==0){
                      that.$message({
                        type: 'success',
                        message: '保存成功!'
                      });
                      that.$refs.etemplateGrid.showLeft();
                      that.$refs.etemplateGrid.status="common";
                      that.$refs.etemplateGrid.fetchData();
                  } else {
                    console.log(rd);
                    this.$message({
                      type: 'success',
                      message: rd.msg+',保存失败!'
                    });
                  }
                });
              }else{
                console.log("表单验证不过......");
              }
           });
         }
       }
    },
    computed:{
      headStyle:function(){
        return {"background-color":"white"};
      }
    },
    vname:"gsb-etemplate"
}
