From a486231de9c667fb395f0d80bfe7c196ed4c649c Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Mon, 16 Aug 2021 21:53:08 +0800
Subject: [PATCH] 报名考试,报名列表取消报名,批量报名修改
---
src/views/applyexam/index.vue | 66 ++++++++----
src/api/examapi/applyexam.js | 10 ++
src/views/companyApply/index.vue | 13 +-
src/views/exam/performance.vue | 110 +++++++++++++++++++--
src/views/exam/singleperformance.vue | 67 ++++++++++++
5 files changed, 219 insertions(+), 47 deletions(-)
diff --git a/src/api/examapi/applyexam.js b/src/api/examapi/applyexam.js
index 20143fb..7f6700f 100644
--- a/src/api/examapi/applyexam.js
+++ b/src/api/examapi/applyexam.js
@@ -30,6 +30,16 @@
})
}
+
+
+export const cancelApplyNotApplyId = (row) => {
+ return request({
+ url: '/api/apply/cancelApplyNotApplyId',
+ method: 'post',
+ data: row
+ })
+}
+
export const updateApply = (row) => {
return request({
url: '/api/apply/submit',
diff --git a/src/views/applyexam/index.vue b/src/views/applyexam/index.vue
index b147e65..21ffbd2 100644
--- a/src/views/applyexam/index.vue
+++ b/src/views/applyexam/index.vue
@@ -101,10 +101,14 @@
:type="type"
size="small"
icon="el-icon-receiving"
- :disabled="row.applyStatus == 4"
+ v-if="row.candidateNo!=''"
@click="handlePrint(row)"
>准考证打印
</el-button>
+ </template>
+
+ <template slot-scope="{ row }" slot="age">
+ {{ row.age==-1? '':row.age }}
</template>
</avue-crud>
@@ -420,37 +424,55 @@
],
},
{
- label: "考试名称",
- prop: "examName",
- type: "tree",
- dicUrl: "/api/exampaper/page-tree?examType=1",
- // search: true,
- slot: true,
+ label: "年龄",
+ prop: "age",
+ slot:true,
// 表单新增时是否禁止
addDisabled: false,
// 表单新增时是否可见
- addDisplay: true,
+ addDisplay: false,
// 表单新增时是否为查看模式
addDetail: false,
// 表单编辑时是否禁止
- editDisabled: true,
+ editDisabled: false,
// 表单编辑时是否可见
- editDisplay: true,
+ editDisplay: false,
// 表单编辑时是否为查看模式
editDetail: false,
- props: {
- label: "examName",
- value: "id",
- },
- rules: [
- {
- required: true,
- message: "请选择试卷名称",
- trigger: "blur",
- },
- ],
- width: 220,
+ viewDisplay: true
},
+ // {
+ // label: "考试名称",
+ // prop: "examName",
+ // type: "tree",
+ // dicUrl: "/api/exampaper/page-tree?examType=1",
+ // // search: true,
+ // slot: true,
+ // // 表单新增时是否禁止
+ // addDisabled: false,
+ // // 表单新增时是否可见
+ // addDisplay: true,
+ // // 表单新增时是否为查看模式
+ // addDetail: false,
+ // // 表单编辑时是否禁止
+ // editDisabled: true,
+ // // 表单编辑时是否可见
+ // editDisplay: true,
+ // // 表单编辑时是否为查看模式
+ // editDetail: false,
+ // props: {
+ // label: "examName",
+ // value: "id",
+ // },
+ // rules: [
+ // {
+ // required: true,
+ // message: "请选择试卷名称",
+ // trigger: "blur",
+ // },
+ // ],
+ // width: 220,
+ // },
{
label: "所属公司",
prop: "deptName",
diff --git a/src/views/companyApply/index.vue b/src/views/companyApply/index.vue
index 85c4534..3c1ff0e 100644
--- a/src/views/companyApply/index.vue
+++ b/src/views/companyApply/index.vue
@@ -45,7 +45,7 @@
:type="type"
size="small"
icon="el-icon-refresh-left"
- :disabled="row.isApply == 2 || row.isApply == -1"
+ v-if="row.isApply == 1"
@click="handleCancel(row)"
>取消报名
</el-button>
@@ -53,6 +53,7 @@
:type="type"
size="small"
icon="el-icon-folder-checked"
+ v-if="row.isApply == 2 || row.isApply == -1"
@click="questionBankRowSave(row)"
>报名
</el-button>
@@ -106,7 +107,7 @@
</template>
<script>
-import { addApply, updateApply, remove } from "@/api/examapi/applyexam";
+import { addApply, cancelApplyNotApplyId, remove } from "@/api/examapi/applyexam";
import { getListApply,addBatchApply } from "@/api/securityGuard/securityGuard";
import { mapState } from "vuex";
@@ -543,11 +544,9 @@
type: "warning",
})
.then(() => {
- var apply = {
- applyStatus: 4,
- id: row.applyId,
- };
- return updateApply(apply);
+ row.applyStatus = 4;
+ row['userId'] = row.id;
+ return cancelApplyNotApplyId(row);
})
.then(() => {
this.questionBankOnLoad(this.questionBankPage);
diff --git a/src/views/exam/performance.vue b/src/views/exam/performance.vue
index 919de01..2d1c5e9 100644
--- a/src/views/exam/performance.vue
+++ b/src/views/exam/performance.vue
@@ -53,7 +53,22 @@
@click="handleImport"
>实操成绩导入
</el-button>
+
</template>
+
+ <template slot-scope="{ row }" slot="menu">
+ <el-button
+ type="text"
+ size="mini"
+ icon="el-icon-collection"
+ class="start-kaoshi"
+ :disabled="row.qualified==1"
+ @click="securityPrint(row)"
+ >保安证打印
+ </el-button>
+ </template>
+
+
</avue-crud>
<el-dialog
@@ -115,7 +130,7 @@
// 导出按钮
excelBtn: true,
excelBtnText: "成绩导出",
- viewBtn: true,
+ viewBtn: false,
// title: '成绩',
align: "center",
height: "auto",
@@ -129,16 +144,17 @@
dialogClickModal: false,
// 操作栏宽度
menu: true,
- menuWidth: 136,
+ menuWidth: 186,
labelWidth: 120,
column: [
{
- label: "试卷名称",
+ label: "考试名称",
prop: "examName",
search: true,
searchSpan: 4,
slot: true,
+ viewDisplay:false,
// 表单新增时是否禁止
addDisabled: false,
// 表单新增时是否可见
@@ -146,9 +162,9 @@
// 表单新增时是否为查看模式
addDetail: false,
// 表单编辑时是否禁止
- editDisabled: true,
+ editDisabled: false,
// 表单编辑时是否可见
- editDisplay: true,
+ editDisplay: false,
// 表单编辑时是否为查看模式
editDetail: false,
rules: [
@@ -161,8 +177,8 @@
overHidden:true,
},
{
- label: "保安姓名",
- prop: "securityName",
+ label: "用户名",
+ prop: "account",
search: true,
searchSpan: 4,
slot: true,
@@ -218,13 +234,13 @@
],
},
{
- label: "考试时间",
+ label: "考试开始时间",
prop: "examTime",
type: "datetime",
// span: 24,
format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss",
- width: 250,
+ width: 160,
slot: true,
// 表单新增时是否禁止
addDisabled: false,
@@ -238,6 +254,65 @@
editDisplay: true,
// 表单编辑时是否为查看模式
editDetail: false,
+ },
+ {
+ label: "考试结束时间",
+ prop: "examEndTime",
+ type: "datetime",
+ // span: 24,
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ width: 160,
+ slot: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ },
+ {
+ label: "状态",
+ prop: "isExam",
+ type: "select",
+ slot: true,
+ search: true,
+ searchSpan: 4,
+ dicData: [
+ {
+ label: "发布成绩",
+ value: 2,
+ },
+ {
+ label: "考试中",
+ value: 3,
+ },
+ ],
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ rules: [
+ {
+ required: true,
+ message: "请输入考试名称",
+ trigger: "blur",
+ },
+ ],
},
{
label: "理论成绩",
@@ -280,18 +355,16 @@
label: "总成绩",
prop: "allGrade",
slot: true,
- // hide:true,
// 表单新增时是否禁止
addDisabled: false,
- viewDisplay:false,
// 表单新增时是否可见
- addDisplay: false,
+ addDisplay: true,
// 表单新增时是否为查看模式
addDetail: false,
// 表单编辑时是否禁止
- editDisabled: false,
+ editDisabled: true,
// 表单编辑时是否可见
- editDisplay: false,
+ editDisplay: true,
// 表单编辑时是否为查看模式
editDetail: false,
rules: [{
@@ -448,6 +521,15 @@
questionBankSizeChange(pageSize) {
this.questionBankPage.pageSize = pageSize;
},
+ //保安证证查看
+ securityPrint(row) {
+ var obj = row;
+ obj["name"] = "保安证";
+ this.$router.push({
+ path: `/exam/papers`,
+ query: obj,
+ });
+ },
questionBankRowUpdate(row, index, done, loading) {
debugger;
diff --git a/src/views/exam/singleperformance.vue b/src/views/exam/singleperformance.vue
index f96cb01..2ae7205 100644
--- a/src/views/exam/singleperformance.vue
+++ b/src/views/exam/singleperformance.vue
@@ -152,8 +152,8 @@
overHidden:true,
},
{
- label: "保安姓名",
- prop: "securityName",
+ label: "用户名",
+ prop: "account",
search: true,
searchSpan: 4,
slot: true,
@@ -209,13 +209,13 @@
],
},
{
- label: "考试时间",
+ label: "考试开始时间",
prop: "examTime",
type: "datetime",
// span: 24,
format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss",
- width: 250,
+ width: 160,
slot: true,
// 表单新增时是否禁止
addDisabled: false,
@@ -231,6 +231,65 @@
editDetail: false,
},
{
+ label: "考试结束时间",
+ prop: "examEndTime",
+ type: "datetime",
+ // span: 24,
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ width: 160,
+ slot: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ },
+ {
+ label: "状态",
+ prop: "isExam",
+ type: "select",
+ slot: true,
+ search: true,
+ searchSpan: 4,
+ dicData: [
+ {
+ label: "发布成绩",
+ value: 2,
+ },
+ {
+ label: "考试中",
+ value: 3,
+ },
+ ],
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ rules: [
+ {
+ required: true,
+ message: "请输入考试名称",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
label: "理论成绩",
prop: "theoryGrade",
slot: true,
--
Gitblit v1.9.3