123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256 |
- <template>
- <div>
- <LinkTitlesCustom :currentPaths="['评卷总览', '评卷进度', '课程详情']" />
- <section class="content">
- <div class="box box-info">
- <div class="box-body">
- <el-form
- :inline="true"
- :model="formSearch"
- label-position="right"
- label-width="60px"
- >
- <el-form-item label="登录名" class="pull-left">
- <el-input
- placeholder="登录名"
- v-model="formSearch.userLoginName"
- ></el-input>
- </el-form-item>
- <el-form-item label="姓名" class="pull-left">
- <el-input
- placeholder="姓名"
- v-model="formSearch.userName"
- ></el-input>
- </el-form-item>
- <el-form-item>
- <el-button
- size="small"
- type="primary"
- icon="el-icon-search"
- @click="searchSetting"
- >查询</el-button
- >
- <!--
- <el-button size="small" type="primary" icon="info" @click="exportMarker">导出</el-button>
- -->
- <el-button
- size="small"
- type="primary"
- icon="el-icon-arrow-left"
- @click="back"
- >返回</el-button
- >
- </el-form-item>
- </el-form>
- <div class="block-seperator"></div>
- <!-- 页面列表 -->
- <el-table
- stripe
- v-loading="loading"
- element-loading-text="拼命加载中"
- :data="tableData"
- border
- style="width: 100%"
- >
- <el-table-column label="姓名" width="200" prop="userName" />
- <el-table-column
- label="登录名"
- min-width="100"
- prop="userLoginName"
- />
- <el-table-column
- label="试卷类型"
- min-width="200"
- prop="markRangeName"
- />
- <el-table-column
- label="完成数量"
- min-width="100"
- prop="markedCount"
- sortable
- />
- <el-table-column
- label="最低分"
- min-width="100"
- prop="minScore"
- sortable
- />
- <el-table-column
- label="最高分"
- min-width="100"
- prop="maxScore"
- sortable
- />
- <el-table-column
- label="平均分"
- min-width="100"
- prop="avgScore"
- sortable
- />
- <el-table-column
- label="标准方差"
- min-width="100"
- prop="stdDev"
- sortable
- />
- </el-table>
- <div class="page pull-right">
- <el-pagination
- background
- @current-change="handleSettingCurrentChange"
- @size-change="handleSizeChange"
- :current-page="currentPage"
- :page-size="pageSize"
- :page-sizes="[10, 20, 50, 100]"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- ></el-pagination>
- </div>
- </div>
- </div>
- </section>
- </div>
- </template>
- <script>
- import { DATA_PROCESS_API } from "@/constants/constants";
- import { mapState } from "vuex";
- import LinkTitlesCustom from "@/components/LinkTitlesCustom.vue";
- export default {
- data() {
- return {
- formSearch: {
- userLoginName: "",
- userName: ""
- },
- tableData: [],
- oldData: [],
- currentPage: 1,
- pageSize: 10,
- total: 10,
- loading: true,
- workId: "",
- examId: "",
- courseCode: ""
- };
- },
- components: {
- LinkTitlesCustom
- },
- methods: {
- handleSettingCurrentChange(val) {
- this.currentPage = val;
- this.searchSetting();
- },
- handleSizeChange(val) {
- this.pageSize = val;
- this.searchSetting();
- },
- pagingSetting() {
- var start = (this.currentPage - 1) * this.pageSize;
- var end =
- this.currentPage * this.pageSize < this.total
- ? this.currentPage * this.pageSize
- : this.total;
- var tempData = [];
- console.log(`当前页: ${this.currentPage},开始:${start},结束:${end}`);
- for (let i = start; i < end; i++) {
- tempData.push(this.tableData[i]);
- }
- this.tableData = tempData;
- },
- initSetting() {
- this.loading = true;
- this.$http
- .get(
- DATA_PROCESS_API +
- "/markTasks/all/0/" +
- this.pageSize +
- "?workId=" +
- this.workId +
- "&examId=" +
- this.examId +
- "&courseCode=" +
- this.courseCode
- )
- .then(response => {
- console.log(response);
- this.tableData = response.data.content;
- this.total = response.data.totalElements;
- this.loading = false;
- });
- },
- searchSetting() {
- this.loading = true;
- this.$http
- .get(
- DATA_PROCESS_API +
- "/markTasks/all/" +
- (this.currentPage - 1) +
- "/" +
- this.pageSize +
- "?workId=" +
- this.workId +
- "&examId=" +
- this.examId +
- "&courseCode=" +
- this.courseCode,
- { params: this.formSearch }
- )
- .then(response => {
- console.log(response);
- this.tableData = response.data.content;
- this.total = response.data.totalElements;
- this.loading = false;
- });
- },
- exportMarker() {
- window.location.href =
- "/api/ecs_data_process/markTasks/exportMarker?workId=" +
- this.workId +
- "&examId=" +
- this.examId +
- "&courseCode=" +
- this.courseCode;
- },
- back() {
- this.$router.back();
- // this.$router.push({
- // path: "/marking/mark_work_overview"
- // });
- }
- },
- computed: {
- ...mapState({ user: state => state.user })
- },
- created() {
- this.workId = this.$route.params.workId;
- this.examId = this.$route.params.examId;
- this.courseCode = this.$route.params.courseCode;
- this.initSetting();
- }
- };
- </script>
- <style lang="css" scoped>
- li {
- list-style-type: none;
- }
- .searchFrame {
- margin-right: 10px;
- margin-bottom: 10px;
- }
- .page{
- margin-top: 10px;
- }
- .f_button{
- display:block;
- width:57px;
- height:20px;
- border:1px solid #CCC;
- background:#FFF;
- font-size: small;
- }
- </style>
|