<template>
  <div class="bbsl-common-page">
    <div class="bbsl-table-search">
      <el-form v-model="queryParam" :inline="true">
        <el-form-item label="试卷名称：">
          <el-input
            v-model="querys[0].value"
            clearable
            maxlength="128"
            placeholder="请输入试卷名称"
          >
          </el-input>
        </el-form-item>

        <el-form-item>
          <el-button icon="el-icon-search" type="primary" @click="handleSearch"
            >搜索
          </el-button>
          <el-button icon="el-icon-refresh" @click="handleReset"
            >重置
          </el-button>
        </el-form-item>
      </el-form>
    </div>
    <div ref="contentPanel" class="bbsl-table-content">
      <div ref="btnPanel" class="bbsl-btn-content">
        <el-row>
          <el-col :span="2">
            <el-upload
              :before-upload="beforeAvatarUpload"
              :on-success="handleAvatarSuccess"
              :show-file-list="false"
              action=""
              class="avatar-uploader"
            >
              <el-button icon="el-icon-download" type="primary">导入</el-button>
            </el-upload>
          </el-col>
          <el-col :span="1">
            <el-button icon="el-icon-upload2" type="warning">导出</el-button>
          </el-col>
        </el-row>
      </div>
      <el-table
        ref="multipleSelection"
        v-loading="loading"
        :cell-style="{'text-align': 'center'}"
        :data="tableData"
        :header-cell-style="{'text-align': 'center'}"
        :max-height="tableMaxHeight"
        :style="{width: '100%'}"
        size="mini"
        @row-dblclick="handleDbClick"
        @selection-change="handleSelectionChange"
      >
        <el-table-column type="selection" width="55"></el-table-column>
        <el-table-column
          fixed
          label="序号"
          type="index"
          width="55"
        ></el-table-column>
        <el-table-column
          label="试卷名称"
          min-width="150"
          prop="name"
          show-overflow-tooltip
        >
        </el-table-column>
        <el-table-column
          label="课目"
          min-width="120"
          prop="subjectID"
          show-overflow-tooltip
        >
        </el-table-column>
        <el-table-column
          label="考试状态"
          min-width="100"
          prop="status"
          show-overflow-tooltip
        >
        </el-table-column>
        <el-table-column
          label="总分"
          min-width="70"
          prop="totalScore"
          show-overflow-tooltip
          sortable
        >
        </el-table-column>
        <el-table-column
          label="总时长(分)"
          min-width="100"
          prop="timeLength"
          show-overflow-tooltip
          sortable
        >
        </el-table-column>
        <el-table-column
          label="考生"
          min-width="100"
          prop="userName"
          show-overflow-tooltip
        >
        </el-table-column>
        <el-table-column
          label="得分"
          min-width="70"
          prop=""
          show-overflow-tooltip
          sortable
        >
        </el-table-column>
        <el-table-column
          label="用时"
          min-width="100"
          prop=""
          show-overflow-tooltip
          sortable
        >
        </el-table-column>
        <el-table-column
          label="交卷时间"
          min-width="100"
          prop=""
          show-overflow-tooltip
          sortable
        >
        </el-table-column>
        <el-table-column
          label="评卷时间"
          min-width="100"
          prop=""
          show-overflow-tooltip
          sortable
        >
        </el-table-column>
        <el-table-column fixed="right" label="操作" width="200">
          <template #default="scope">
            <!-- <el-button @click="handleClick(scope.row)" size="small">成绩调整</el-button> -->
            <el-button size="small" @click="handleClick(scope.row)"
              >查看试卷
            </el-button>
          </template>
        </el-table-column>
      </el-table>
      <el-pagination
        ref="paginationPanel"
        :current-page="queryParam.pageBean.page"
        :page-size="queryParam.pageBean.pageSize"
        :page-sizes="[20, 30, 40, 50]"
        :total="total"
        align="right"
        background
        class="bbsl-pagination"
        layout="prev, pager, next,total, sizes, jumper"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
      ></el-pagination>
    </div>
  </div>
</template>

<script>
import {TableMixin} from '@/mixins/tableMixin'

export default {
  name: 'ypMenu',
  components: {},
  mixins: [TableMixin],
  data() {
    return {
      // 模拟数据
      tableData: [
        {
          name: '高等数据-微积分章节考试',
          subjectID: '高数',
          space: '室内',
          status: '已完成评卷',
          totalScore: 66,
          timeLength: '120分钟',
          userName: '文轩'
        }
      ],
      showMore: false,
      querys: [
        {
          group: 'main',
          operation: 'LIKE',
          parentGroup: '',
          property: '',
          relation: 'AND',
          value: ''
        },
        {
          group: 'main',
          operation: 'LIKE',
          parentGroup: '',
          property: '',
          relation: 'AND',
          value: ''
        },
        {
          group: 'main',
          operation: 'LIKE',
          parentGroup: '',
          property: '',
          relation: 'AND',
          value: ''
        },
        {
          group: 'main',
          operation: 'LIKE',
          parentGroup: '',
          property: '',
          relation: 'AND',
          value: ''
        },
        {
          group: 'main',
          operation: 'LIKE',
          parentGroup: '',
          property: '',
          relation: 'AND',
          value: ''
        }
      ],
      CourseList: [
        {
          value: 1,
          name: '语文'
        },
        {
          value: 2,
          name: '高数'
        },
        {
          value: 3,
          name: '英语'
        },
        {
          value: 4,
          name: '计算机'
        }
      ],
      spaceList: [
        {
          value: 1,
          name: '厂外'
        },
        {
          value: 2,
          name: '室内'
        }
      ],
      TestStatusList: [
        {
          value: 1,
          name: '已评'
        },
        {
          value: 2,
          name: '未评'
        }
      ],
      examineeList: [
        {
          value: 1,
          name: '张三'
        },
        {
          value: 2,
          name: '文轩'
        },
        {
          value: 3,
          name: '程志'
        },
        {
          value: 4,
          name: '周雯'
        }
      ]
    }
  },
  created() {},
  mounted() {},
  methods: {
    // 重置
    clearQuerys() {
      this.querys[0].value = ''
      this.querys[1].value = ''
    },
    // 获取list
    loadData(page) {
      this.loading = false
    },
    handleClick() {},
    // 导入
    handleAvatarSuccess() {},
    beforeAvatarUpload() {}
  }
}
</script>
<style lang="scss" scoped>
.type-tag {
  margin: 0 2px;
}

::v-deep .el-col-1 {
  margin-left: -15px;
}
</style>

1
