var tmpl=`
    <div class="searchform">
    <gsb-form ref="baseform"  :metaData="metaData" isInInline="true" style="min-width:1100px;width:100%" @statequery="statequery">
       <span slot="topbtnarea" @mouseover="mouseover"><i v-if="showsearch" style="color:rgb(93, 160, 236);font-size:22px;cursor:crosshair" class="el-icon-search">高级查询</i></span>
       <div   slot-scope="scope" style="text-align:right">
         <el-button ref="qclickel" @click="query(scope.formModel)" size="mini" icon="tool-query" type="primary">查询</el-button>
         <el-button @click="reset(scope.formModel)" icon="tool-reset" size="mini" type="default">重置</el-button>
       </div>
    </gsb-form>
    </div>
`
module.exports=
`{
   template:'${tmpl}',
   props:['metaData'],
   data:function(){
     return {
       showsearch:false,
     };
   },
   methods:{
     doquery:function(){
        this.$emit("onquery",this.$refs.baseform.formModel);
        this.$refs.baseform.hideform();
         this.showsearch=true;
     },
     query:function(model){
        console.log(JSON.stringify(model));
        this.$emit("onquery",model);
         this.$refs.baseform.hideform();
         this.showsearch=true;
     },
     statequery:function(key,model){
       this.doquery();
     },
     mouseover(){
      this.$refs.baseform.showform();
       this.showsearch=false;
     },
     reset:function(model){
       this.$refs.baseform.reset(model);
     },
     getModel:function(){
      return this.$refs.baseform.formModel;
     },
     initModel:function(m){
       console.log("mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm");
       console.log(m);
       this.$refs.baseform.setInitData(m);
     }
   },
   vname:"gsb-searchform"
}`
