<div class="page" style="overflow:auto">
  <!-- 头部 -->
  <HeaderMain></HeaderMain>
  <!-- 工具栏 -->
  <div class="history-tools">
    <div class="left">
      <el-dropdown trigger="click" @command="projectCommand">
        <el-button type="primary">{{ownHouseName}} <i class="el-icon-caret-bottom icon-right"></i>
        </el-button>
        <el-dropdown-menu slot="dropdown">
          <el-dropdown-item>全部</el-dropdown-item>
          <el-dropdown-item v-for="(item,index) in houseList" :key="item.houseId" :command="item">
            {{item.houseName}}</el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown>
      <el-dropdown trigger="click" @command="orderCommand">
        <el-button type="primary">{{currOrderName}} <i class="el-icon-caret-bottom icon-right"></i>
        </el-button>
        <el-dropdown-menu slot="dropdown">
          <el-dropdown-item v-for="(item,index) in orderList" :key="item.orderType" :command="item">{{item.orderName}}
          </el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown>
    </div>
    <div class="right">
      <el-button type="primary" icon="el-icon-circle-plus-outline" @click="createTest">创建测试</el-button>
    </div>
  </div>
  <!-- 列表 -->
  <div class="test-list" v-infinite-scroll="load" infinite-scroll-disabled="disabled">
    <div class="item" v-for="(item,index) in pageModel.resultSet" :key="item.created"
      :class="{ itemCopy: isCopy && index == 0 }">
      <!-- <img  mode="" :src="" alt=""> -->
      <el-image class="item-img" :src="item.coverImg">
        <div slot="error" class="outline">
          <img class="item-img-outline" src="../../assets/images/picture-error.png" alt="">
          <!-- <i class="el-icon-picture-outline"></i> -->
        </div>
      </el-image>
      <div class="tools">
        <img v-if="item.canDelete" class="item-img delete" src="" alt="" @click="deleteTest(item)">
        <img class="item-img copy" src="" alt="" @click="copyTest(item)">
        <img class="item-img share" src="" alt="" @click="shareTest()">
        <img class="item-img edit" src="" alt="" @click="editTest" style="float:right;margin-right:10px;">
      </div>
      <div class="title">{{item.title}}</div>
      <div class="desc">{{item.ownHouseName}}</div>
      <div class="bottom">
        <span>共{{item.questionCount}}题</span>
        <span>{{item.created}}</span>
      </div>
    </div>
    <div class="item add" @click="createTest">
      <i class="el-icon-circle-plus add-icon"></i>
      <span>创建测试</span>
    </div>
  </div>
  <div v-if="loading" class="loading">加载中...</div>
  <div v-if="noMore" class="loading">没有更多了</div>
  <!-- 分享设置 -->
  <ShareSetting v-show="isShareSetting" :close="closeShare"></ShareSetting>
</div>