|
@@ -1,167 +1,173 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
- <section class="content" style="margin-top: -10px;">
|
|
|
- <div class="box box-info">
|
|
|
- <!-- 正文信息 -->
|
|
|
- <div class="box-body">
|
|
|
- <el-form
|
|
|
- :inline="true"
|
|
|
- :model="formSearch"
|
|
|
- label-position="right"
|
|
|
- label-width="70px"
|
|
|
- >
|
|
|
- <el-form-item label="考试名称" class="pull-left">
|
|
|
- <el-input
|
|
|
- v-model="formSearch.name"
|
|
|
- auto-complete="off"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="类型" class="pull-left">
|
|
|
- <el-select
|
|
|
- v-model="formSearch.examType"
|
|
|
- placeholder="请选择"
|
|
|
- clearable
|
|
|
+ <section class="content">
|
|
|
+ <div class="box box-info">
|
|
|
+ <!-- 正文信息 -->
|
|
|
+ <div class="box-body">
|
|
|
+ <el-form
|
|
|
+ :inline="true"
|
|
|
+ :model="formSearch"
|
|
|
+ label-position="right"
|
|
|
+ label-width="70px"
|
|
|
+ >
|
|
|
+ <el-form-item label="考试名称" class="pull-left">
|
|
|
+ <el-input
|
|
|
+ v-model="formSearch.name"
|
|
|
+ auto-complete="off"
|
|
|
+ class="input"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="类型" class="pull-left">
|
|
|
+ <el-select
|
|
|
+ v-model="formSearch.examType"
|
|
|
+ placeholder="请选择"
|
|
|
+ clearable
|
|
|
+ class="input"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in examTypeList"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ :key="item.value"
|
|
|
>
|
|
|
- <el-option
|
|
|
- v-for="item in examTypeList"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- :key="item.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item class="pull-right buttonframe">
|
|
|
- <el-button
|
|
|
- v-if="rolePrivileges.search_exam"
|
|
|
- size="small"
|
|
|
- type="primary"
|
|
|
- icon="search"
|
|
|
- @click="searchForm"
|
|
|
- >查询
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- v-if="rolePrivileges.add_exam"
|
|
|
- size="small"
|
|
|
- type="primary"
|
|
|
- icon="plus"
|
|
|
- @click="addExamInfoDialog"
|
|
|
- >新增
|
|
|
- </el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item class="d-block">
|
|
|
+ <el-button
|
|
|
+ v-if="rolePrivileges.search_exam"
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-search"
|
|
|
+ @click="searchForm"
|
|
|
+ >查询
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="rolePrivileges.add_exam"
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ @click="addExamInfoDialog"
|
|
|
+ >新增
|
|
|
+ </el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
|
|
|
- <!-- 弹出窗口 -->
|
|
|
- <el-dialog
|
|
|
- title="请选择考试类型:"
|
|
|
- size="small"
|
|
|
- :visible.sync="examInfoDialog"
|
|
|
- >
|
|
|
- <el-button type="primary" @click="toTradition">传统考试</el-button>
|
|
|
- <el-button type="primary" @click="toOnline">网络考试</el-button>
|
|
|
- <el-button type="primary" @click="toPractice">练习考试</el-button>
|
|
|
- <el-button type="primary" @click="toOffline">离线考试</el-button>
|
|
|
- <el-button type="primary" @click="toPrint">
|
|
|
- 分布式印刷考试</el-button
|
|
|
- >
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="examInfoDialog = false">取 消</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
+ <!-- 弹出窗口 -->
|
|
|
+ <el-dialog
|
|
|
+ title="请选择考试类型:"
|
|
|
+ size="small"
|
|
|
+ :visible.sync="examInfoDialog"
|
|
|
+ >
|
|
|
+ <el-button type="primary" @click="toTradition">传统考试</el-button>
|
|
|
+ <el-button type="primary" @click="toOnline">网络考试</el-button>
|
|
|
+ <el-button type="primary" @click="toPractice">练习考试</el-button>
|
|
|
+ <el-button type="primary" @click="toOffline">离线考试</el-button>
|
|
|
+ <el-button type="primary" @click="toPrint"> 分布式印刷考试</el-button>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="examInfoDialog = false">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
|
|
|
- <!-- 页面列表 -->
|
|
|
- <el-table
|
|
|
- v-loading="loading"
|
|
|
- element-loading-text="拼命加载中"
|
|
|
- :data="tableData"
|
|
|
- border
|
|
|
- style="width: 100%;text-align:center;"
|
|
|
- @selection-change="selectChange"
|
|
|
- >
|
|
|
- <el-table-column type="selection" width="50"></el-table-column>
|
|
|
- <el-table-column prop="id" width="80" label="ID"> </el-table-column>
|
|
|
- <el-table-column prop="name" width="180" label="考试名称">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column width="100" label="考试类型">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div>
|
|
|
- <span>{{ getExamType(scope.row.examType) }}</span>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="beginTime" width="170" label="开始时间">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="endTime" width="170" label="结束时间">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="updateTime" width="170" label="更新时间">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column width="80" label="状态">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div>
|
|
|
- <span>
|
|
|
- <el-tag :type="getTag(scope.row.enable)">
|
|
|
- {{ getEnable(scope.row.enable) }}
|
|
|
- </el-tag>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div>
|
|
|
- <el-button
|
|
|
- v-if="rolePrivileges.update_exam"
|
|
|
- size="mini"
|
|
|
- type="info"
|
|
|
- @click="editExamInfoDialog(scope.row)"
|
|
|
- >
|
|
|
- 修改
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- v-if="rolePrivileges.update_exam"
|
|
|
- size="mini"
|
|
|
- type="info"
|
|
|
- @click="editOrgSettings(scope.row)"
|
|
|
- >
|
|
|
- 学习中心特殊设置
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- v-if="
|
|
|
- !scope.row.enable &&
|
|
|
- rolePrivileges.change_exam_availability
|
|
|
- "
|
|
|
- size="mini"
|
|
|
- type="success"
|
|
|
- @click="enableById(scope.row)"
|
|
|
- >
|
|
|
- <i class="fa fa-check" aria-hidden="true"></i>启用
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- v-else-if="rolePrivileges.change_exam_availability"
|
|
|
- size="mini"
|
|
|
- type="warning"
|
|
|
- @click="disableById(scope.row)"
|
|
|
- >
|
|
|
- <i class="fa fa-close" aria-hidden="true"></i>禁用
|
|
|
+ <!-- 页面列表 -->
|
|
|
+ <el-table
|
|
|
+ v-loading="loading"
|
|
|
+ element-loading-text="拼命加载中"
|
|
|
+ :data="tableData"
|
|
|
+ border
|
|
|
+ style="width: 100%;text-align:center;"
|
|
|
+ @selection-change="selectChange"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="40"></el-table-column>
|
|
|
+ <el-table-column prop="id" width="60" label="ID"> </el-table-column>
|
|
|
+ <el-table-column prop="name" label="考试名称"> </el-table-column>
|
|
|
+ <el-table-column width="80" label="考试类型">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ <span>{{ getExamType(scope.row.examType) }}</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="beginTime" width="155" label="开始时间">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="endTime" width="155" label="结束时间">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="updateTime" width="155" label="更新时间">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="55" label="状态">
|
|
|
+ <span slot-scope="scope"> {{ getStatus(scope.row.enable) }} </span>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" width="160">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ <el-button
|
|
|
+ v-if="rolePrivileges.update_exam"
|
|
|
+ size="mini"
|
|
|
+ type="info"
|
|
|
+ @click="editExamInfoDialog(scope.row)"
|
|
|
+ >
|
|
|
+ 修改
|
|
|
+ </el-button>
|
|
|
+
|
|
|
+ <el-dropdown style="margin-left: 10px;">
|
|
|
+ <el-button type="primary" plain size="mini">
|
|
|
+ 更多<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</el-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <div class="page pull-right">
|
|
|
- <el-pagination
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="currentPage"
|
|
|
- :page-size="pageSize"
|
|
|
- layout="total, prev, pager, next, jumper"
|
|
|
- :total="total"
|
|
|
- >
|
|
|
- </el-pagination>
|
|
|
- </div>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item>
|
|
|
+ <el-button
|
|
|
+ v-if="
|
|
|
+ !scope.row.enable &&
|
|
|
+ rolePrivileges.change_exam_availability
|
|
|
+ "
|
|
|
+ size="mini"
|
|
|
+ type="success"
|
|
|
+ @click="enableById(scope.row)"
|
|
|
+ >
|
|
|
+ <i class="fa fa-check" aria-hidden="true"></i>启用
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ v-else-if="rolePrivileges.change_exam_availability"
|
|
|
+ size="mini"
|
|
|
+ type="warning"
|
|
|
+ @click="disableById(scope.row)"
|
|
|
+ >
|
|
|
+ <i class="fa fa-close" aria-hidden="true"></i>禁用
|
|
|
+ </el-button></el-dropdown-item
|
|
|
+ >
|
|
|
+ <el-dropdown-item>
|
|
|
+ <el-button
|
|
|
+ :disabled="
|
|
|
+ !(
|
|
|
+ rolePrivileges.update_exam &&
|
|
|
+ scope.row.examType == 'OFFLINE'
|
|
|
+ )
|
|
|
+ "
|
|
|
+ size="mini"
|
|
|
+ type="info"
|
|
|
+ @click="editOrgSettings(scope.row)"
|
|
|
+ >
|
|
|
+ 学习中心特殊设置
|
|
|
+ </el-button></el-dropdown-item
|
|
|
+ >
|
|
|
+ </el-dropdown-menu></el-dropdown
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div class="page pull-right">
|
|
|
+ <el-pagination
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="currentPage"
|
|
|
+ :page-size="pageSize"
|
|
|
+ layout="total, prev, pager, next, jumper"
|
|
|
+ :total="total"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </section>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
</template>
|
|
|
<script>
|
|
|
import { CORE_API, EXAM_WORK_API, EXAM_TYPE } from "@/constants/constants.js";
|
|
@@ -220,15 +226,7 @@ export default {
|
|
|
});
|
|
|
console.log(this.selectedExamIds);
|
|
|
},
|
|
|
- getTag(status) {
|
|
|
- if (status == true) {
|
|
|
- return "success";
|
|
|
- } else if (status == false) {
|
|
|
- return "danger";
|
|
|
- }
|
|
|
- return status;
|
|
|
- },
|
|
|
- getEnable(enable) {
|
|
|
+ getStatus(enable) {
|
|
|
if (enable == true) {
|
|
|
return "启用";
|
|
|
} else if (enable == false) {
|
|
@@ -384,3 +382,8 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
+<style scoped>
|
|
|
+.input {
|
|
|
+ width: 200px;
|
|
|
+}
|
|
|
+</style>
|