<template>
  <div class="flex">
    <criteria-paged :model="model" v-ref:cp>
      <criteria partial='criteria' @condition-changed='search' v-ref:cri>
        <form novalidate class="" partial >
             <div class="col-sm-12 select-overspread">
               <div class="col-sm-10 tdcenter" style="margin-left: 50px;">
                 <h2>报建查询</h2>
               </div>
               <div class="col-sm-2 pull-right" style="margin-left: 50px;">
                   <button class="btn btn-primary" type="button" @click="search()" id="serchall" v-show="false">查询</button>
               </div>
             </div>
           </form>
      </criteria>
      <data-grid  :model="model" partial='list' v-ref:grid >
        <template partial='head'>
          <tr>
             <th>报建编号</th>
             <th>申请人</th>
             <th>电话</th>
             <th>地址</th>
             <th>报建日期</th>
          </tr>
        </template>
        <template partial='body'>
          <tr>
            <td>{{row.f_code}}</td>
            <td>{{row.f_username}}</td>
            <td>{{row.f_phone}}</td>
            <td>{{row.f_address}}</td>
            <td>{{row.f_date}}</td>
          </tr>
        </template>
      </data-grid>
    </criteria-paged>
  </div>
</template>
<script>
  import { PagedList } from 'vue-client'
  export default {
    title: '报建查询',
    data () {
      return {
          model: new PagedList('rs/sql/getProject', 20),
          condition: ''
      }
    },
    ready() {
      this.search()
    },
    methods: {
      search() {
        this.$refs.cp.$refs.cri.search()
      }
    }
  }
</script>
