From 241255fbe2b6db3b2ed263f1e5a9956f5f9a0ee2 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期二, 11 六月 2024 11:40:58 +0800
Subject: [PATCH] 考试管理
---
src/views/Manage/ScoreInquiry/index.vue | 269 ++++++++++++++++-------------------------------------
1 files changed, 80 insertions(+), 189 deletions(-)
diff --git a/src/views/Manage/ScoreInquiry/index.vue b/src/views/Manage/ScoreInquiry/index.vue
index ac665ed..cde6b1b 100644
--- a/src/views/Manage/ScoreInquiry/index.vue
+++ b/src/views/Manage/ScoreInquiry/index.vue
@@ -1,234 +1,125 @@
-<!-- 鎴愮哗鏌ヨ -->
+<!-- 绛斿嵎绠$悊 -->
<template>
<div class="c">
<div class="bg">
<div class="main">
- <!-- 甯﹁繑鍥炵殑鏍囬 -->
- <TitleIndex title="鎴愮哗鏌ヨ" />
+ <!-- 寰呰繑鍥炵殑鏍囬 -->
+ <TitleIndex title="绛斿嵎绠$悊" />
<div class="content">
<!-- 鎼滅储 -->
<div>
- <el-form
- :inline="true"
- :model="formLabelAlign"
- class="demo-form-inline"
- :label-position="labelPosition"
- label-width="80px"
- >
- <el-form-item label="娲诲姩鍖哄煙">
- <el-select
- v-model="formLabelAlign.region"
- placeholder="娲诲姩鍖哄煙"
- >
- <el-option
- label="鍖哄煙涓�"
- value="shanghai"
- ></el-option>
- <el-option
- label="鍖哄煙浜�"
- value="beijing"
- ></el-option>
+ <el-form :inline="true" :model="queryParam" class="demo-form-inline" label-width="80px">
+ <el-form-item>
+ <el-input v-model="queryParam.name" placeholder="璇疯緭鍏ュ悕绉�" clearable></el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-select v-model="queryParam.subjectId" placeholder="璇烽�夋嫨绉戠洰" clearable multiple @change="search">
+ <el-option v-for="item in subjects" :key="item.id" :value="item.id" :label="item.name"></el-option>
</el-select>
</el-form-item>
- <el-form-item label="娲诲姩鍖哄煙">
- <el-select
- v-model="formLabelAlign.region"
- placeholder="娲诲姩鍖哄煙"
- >
- <el-option
- label="鍖哄煙涓�"
- value="shanghai"
- ></el-option>
- <el-option
- label="鍖哄煙浜�"
- value="beijing"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="瀛﹀彿">
- <el-input v-model="formLabelAlign.type"></el-input>
- </el-form-item>
- <el-form-item label="">
- <el-button
- style="width:100px;margin-top: 42px;"
- type="primary"
- size="small"
- >鏌ヨ</el-button>
+ <el-form-item>
+ <el-button style="width:100px;" type="primary" size="small" @click="search()">鏌ヨ</el-button>
</el-form-item>
</el-form>
</div>
<!-- 琛ㄦ牸 -->
- <!-- 淇敼琛ㄦ牸鐨勯珮搴� -->
- <!-- :row-style="{height:'30px'}"
- :cell-style="{padding: '0'}" -->
- <el-table
- :data="tableData"
- border
- style="width: 100%;"
- :row-style="{height:'34px'}"
- :cell-style="{padding: '0'}"
- >
- <el-table-column
- prop="date"
- label="瀛﹀勾"
- width="100"
- >
+ <el-table v-loading="listLoading" :data="tableData" border style="width: 100%;">
+ <el-table-column align="center" prop="paperName" label="鍚嶇О" />
+ <el-table-column align="center" prop="subjectName" label="绉戠洰" />
+ <el-table-column align="center" prop="paperType" label="璇曞嵎绫诲瀷" width="150px">
+ <template slot-scope="{row}">
+ <span v-if="row.paperType === 1">鍥哄畾璇曞嵎</span>
+ <span v-if="row.paperType === 2">闅忔満璇曞嵎</span>
+ <span v-if="row.paperType === 3">椤哄簭璇曞嵎</span>
+ </template>
</el-table-column>
- <el-table-column
- prop="name"
- label="瀛︽湡"
- width="150"
- >
+ <el-table-column align="center" prop="questionCount" label="棰樼洰鏁伴噺" width="100px" />
+ <el-table-column align="center" prop="systemScore" label="鎬诲垎" width="100px" />
+ <el-table-column align="center" prop="suggestTime" label="寤鸿鏃堕暱" width="100px" />
+ <el-table-column align="center" prop="personAnswerNum" label="鍙傝�冧汉鏁�" width="100px">
+ <template slot-scope="{row}">
+ <span>{{ row.personAnswerNum + "/" + row.personTotalNum }}</span>
+ </template>
</el-table-column>
- <el-table-column
- prop="address"
- label="瀛﹀彿"
- width="150"
- >
- </el-table-column>
- <el-table-column
- prop="date"
- label="璇剧▼鍚嶇О"
- width="180"
- >
- </el-table-column>
- <el-table-column
- prop="name"
- label="鏄惁鍚堟牸"
- width="100"
- >
- </el-table-column>
- <el-table-column
- prop="address"
- label="鎴愮哗"
- >
- </el-table-column>
- <el-table-column
- label="鎿嶄綔"
- align="center"
- >
- <template slot-scope="scope">
- <el-button
- size="mini"
- @click="handleEdit(scope.$index, scope.row)"
- >鏌ョ湅璇曞嵎</el-button>
- <el-button
- size="mini"
- type="danger"
- @click="handleDelete(scope.$index, scope.row)"
- >瀵煎嚭璇曞嵎</el-button>
+ <el-table-column align="center" prop="userName" label="鍒涘缓浜�" width="100px" />
+ <el-table-column label="鎿嶄綔" align="center">
+ <template slot-scope="{row}">
+ <el-button size="mini" @click="view(row)">鏌ョ湅</el-button>
</template>
</el-table-column>
</el-table>
- <div
- class="block"
- style="display: flex; margin-top: 40px;"
- >
- <el-pagination
- style="margin:auto"
- background
- :page-size="10"
- layout="prev, pager, next, jumper"
- :total="100"
- >
- </el-pagination>
- </div>
+ <pagination v-show="total > 0" :total="total" :page.sync="queryParam.pageIndex"
+ :limit.sync="queryParam.pageSize" @pagination="search" />
</div>
-
</div>
-
</div>
-
</div>
</template>
<script>
+// 寮曞叆褰堝嚭绐楀彛绲勪欢
+import subjectApi from '@/api/subject'
+import examPaperAnwserApi from '@/api/examPaperAnswer'
+import Pagination from '@/components/Pagination'
+
export default {
+ // 娉ㄥ唽
+ components: {
+ Pagination
+ },
data() {
return {
- labelPosition: "top",
- formLabelAlign: {
- type: "",
- user: "",
- region: "",
+ listLoading: true,
+ queryParam: {
+ name: '',
+ pageIndex: 1,
+ pageSize: 10
},
- tableData: [
- {
- date: "2016-05-02",
- name: "鐜嬪皬铏�",
- address: "1234568798788",
- },
- {
- date: "2016-05-04",
- name: "鐜嬪皬铏�",
- address: "1234568798788",
- },
- {
- date: "2016-05-01",
- name: "鐜嬪皬铏�",
- address: "1234568798788",
- },
- {
- date: "2016-05-03",
- name: "鐜嬪皬铏�",
- address: "1234568798788",
- },
- {
- date: "2016-05-02",
- name: "鐜嬪皬铏�",
- address: "1234568798788",
- },
- {
- date: "2016-05-04",
- name: "鐜嬪皬铏�",
- address: "1234568798788",
- },
- {
- date: "2016-05-01",
- name: "鐜嬪皬铏�",
- address: "1234568798788",
- },
- {
- date: "2016-05-03",
- name: "鐜嬪皬铏�",
- address: "1234568798788",
- },
- {
- date: "2016-05-02",
- name: "鐜嬪皬铏�",
- address: "1234568798788",
- },
- {
- date: "2016-05-04",
- name: "鐜嬪皬铏�",
- address: "5252252552555",
- },
- ],
+ formLoading: false,
+ total: 0,
+ tableData: [],
+ visible: false,
+ subjects: []
};
},
- methods: {
- // 杩斿洖涓婁竴涓〉闈�
- goBack() {
- this.$router.back();
- },
- //鎻愪氦鎸夐挳
- onSubmit() {
- console.log("submit!");
- },
+ created() {
+ this.search()
+ this.getSubjects();
},
+ methods: {
+ // 鑾峰彇绉戠洰
+ getSubjects() {
+ subjectApi.list().then(re => {
+ this.subjects = re.data
+ })
+ },
+ // 鑾峰彇鍒楄〃
+ search() {
+ this.listLoading = true
+ examPaperAnwserApi.pageExamPaper(this.queryParam).then(re => {
+ this.tableData = re.data.list
+ this.total = re.data.total
+ this.queryParam.pageSize = re.data.pageSize
+ this.queryParam.pageIndex = re.data.pageNum
+ this.listLoading = false
+ })
+ },
+ view(row) {
+ this.$router.push({ path: '/manage/answer-list', query: { id: row.id } });
+ }
+ }
};
</script>
<style scoped lang="scss">
.flex {
display: flex;
}
+
// 鍐呭
.content {
width: 1262px;
margin-bottom: 80px;
background-color: #fff;
- padding: 40px;
+ padding: 20px 40px;
border-radius: 10px;
}
</style>
-
-
--
Gitblit v1.8.0