<template>
<div>
      <div :style="{'height':needRepair?'60%':'100%'}">
        <criteria-paged :model="model" :pager="false" v-ref:paged>
          <criteria partial='criteria'>
            <div partial>
              <ul class="nav nav-tabs">
                <li role="presentation" class="active"><a style="	color: #5ac0d9 !important;">计划用户</a></li>
              </ul>
            </div>
          </criteria>
          <data-grid :model="model" partial='list' class="table_sy">
            <template partial='head'>
              <tr>
                <th>
                  <nobr>用户编号</nobr>
                </th>
                <th>
                  <nobr>用户名</nobr>
                </th>
                <th>
                  <nobr>用户电话</nobr>
                </th>
                <th>
                  <nobr>小区</nobr>
                </th>
                <th>
                  <nobr>详细地址</nobr>
                </th>
                <th>
                  <nobr>安检日期</nobr>
                </th>
                <th>
                  <nobr>安检状态</nobr>
                </th>
                <th>
                  <nobr>安检结果</nobr>
                </th>
              </tr>
            </template>
            <template partial='body'>
              <td style="text-align: center">
                <nobr>{{row.f_userinfo_code}}</nobr>
              </td>
              <td style="text-align: center">
                <nobr>{{row.f_user_name}}</nobr>
              </td>
              <td style="text-align: center">
                <nobr>{{row.f_user_phone}}</nobr>
              </td>
              <td style="text-align: center">
              <nobr>{{row.f_residential_area}}</nobr>
            </td>
              <td style="text-align: center">
                <nobr>{{row.f_address}}</nobr>
              </td>
              <td style="text-align: center">
                <nobr>{{row.f_last_check_date}}</nobr>
              </td>
              <td style="text-align: center">
                <nobr>{{row.f_last_check_state}}</nobr>
              </td>
              <td style="text-align: center">
                <nobr>{{row.f_last_check_result}}</nobr>
              </td>
            </template>
          </data-grid>
        </criteria-paged>
      </div>
</div>



</template>

<script>
  import {PagedList} from 'vue-client'
    export default {
        title: "散户计划用户列表",
      data() {
        return {
          model : new PagedList('api/af-safecheck/sql/getRetailitem', 100, {
            f_plan_id: 'this.f_plan_id'
          }),

          needRepair: true,
        }
      },
      props: ['check'],
      watch: {
        'check'() {
          this.model.f_plan_id = this.check.id
          this.model.search(`f_plan_id = '${this.check.id}'`);
        }
      }
    }
</script>


