<div class="page" style="overflow:auto">
  <!-- 头部 -->
  <HeaderMain></HeaderMain>
  <!-- 工具栏 -->
  <div id="historyTools" 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>
      <el-dropdown trigger="click" @command="orderStatus">
        <el-button type="primary">{{currOrderStatus}} <i class="el-icon-caret-bottom icon-right"></i>
        </el-button>
        <el-dropdown-menu slot="dropdown">
          <el-dropdown-item v-for="(item,index) in statusList" :key="item.orderStatus" :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="getTestList" infinite-scroll-disabled="disabled">
    <div class="item" v-for="(item,index) in dataList" :key="item.created"
      :class="[ (isCopy && index == 0) ? itemCopyClass :'', item.isMore ? morehoverClass : '' ]"
      @mouseenter="enterssss(item)" @mouseleave="leave" @mousemove="updateXY">
      <!-- <img  mode="" :src="" alt=""> -->
      <el-image class="item-img1" :src="item.coverImg" fit="cover">
        <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">
        <el-dropdown placement="bottom" trigger="click" class="item-img"
          @command="command=>operationCommand(command, item, index)" @visible-change="isShow=>more(isShow,item,index)">
          <div class="more"></div>
          <el-dropdown-menu slot="dropdown">
            <el-dropdown-item command="download" v-if="!item.canDelete">下载数据表格</el-dropdown-item>
            <el-dropdown-item command="share">设置分享链接</el-dropdown-item>
            <el-dropdown-item command="del" v-if="item.canDelete">删除</el-dropdown-item>
          </el-dropdown-menu>
        </el-dropdown>
        <!-- <div v-if="item.canDelete" class="item-img delete" src="" alt="" @click="deleteTest(item,index)"></div>
        <div class="item-img copy" src="" alt="" @click="copyTest(item)"></div> -->
        <!-- <div class="item-img share" src="" alt="" @click="shareTest(item)"></div> -->
        <!-- <div v-if="item.canDelete == false" class="item-img share" src="" alt="" @click="excelReport(item)"></div> -->
        <div class="item-img copy" src="" alt="" @click="copyTest(item)"></div>
        <div class="item-img edit" @click="editTest(item)" style="float:right;margin-right:10px;"></div>
      </div>
      <div class="title" style="display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      overflow: hidden;
      text-overflow: ellipsis;
      word-break: break-all;
      word-wrap: break-word;">{{item.title}}</div>
      <div class="desc">{{item.ownHouseName}}</div>
      <div class="bottom">
        <span>共{{item.questionCount}}题</span>
        <span>{{dataformat(item.created)}}</span>
      </div>
      <!-- <div class="remarkBg">
        <span class="remark" style="display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        font-size: 12px;
        font-family: MicrosoftYaHei;
        color: #75797D;
        text-overflow: ellipsis;
        word-break: break-all;
        word-wrap: break-word;">备注：{{item.remark || '无'}}</span>
        <div class="remBottom">
          <span class="editBtn" @click='clickEditBtn(item,index)'>编辑备注</span>
        </div>
      </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-if="isShareSetting" :close="closeShare" :shareModel="shareModel" @child-event="refreshItem">
  </ShareSetting>
  <el-dialog class=" popView" :visible.sync="showDialog" top='0' :show-close='false' :close-on-click-modal='false'
    :close-on-press-escape='false'>
    <div class="content">
      <div class="main">
        <div class="title">编辑&查看备注</div>
        <el-input class="textarea" type="textarea" placeholder="请输入备注" v-model="remark" maxlength="500"
          show-word-limit />
      </div>
      <div class="btns">
        <div class="okBtn Btn" @click='saveRemark'>确认</div>
        <div class="cancleBtn Btn" @click='showDialog=false'>取消</div>
      </div>
    </div>
  </el-dialog>
  <div v-show="seen" class="hover_con" :style="positionStyle">
    <div class="text" style="display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
    word-wrap: break-word;">{{currRemark}}</div>
  </div>
</div>