From 8c6cf205affbbc8ada74f00a7ca25ebca867e9ed Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Mon, 27 Sep 2021 11:44:44 +0800
Subject: [PATCH] 图表颜色
---
src/views/trainApply/index.vue | 161 ++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 138 insertions(+), 23 deletions(-)
diff --git a/src/views/trainApply/index.vue b/src/views/trainApply/index.vue
index f5bc5e0..2a5e552 100644
--- a/src/views/trainApply/index.vue
+++ b/src/views/trainApply/index.vue
@@ -40,21 +40,20 @@
>导出
</el-button>
<el-button
- style="display:none"
- type="success"
- size="small"
- plain
- icon="el-icon-upload2"
- @click="handleImport"
- >导入
- </el-button>
- <el-button
type="warning"
size="small"
plain
- icon="el-icon-download"
+ icon="el-icon-receiving"
@click="handleExport"
>清册打印
+ </el-button>
+ <el-button
+ type="success"
+ size="small"
+ plain
+ icon="el-icon-download"
+ @click="handleImport"
+ >清册导入
</el-button>
</template>
@@ -63,9 +62,25 @@
:type="type"
size="small"
icon="el-icon-receiving"
- :disabled="row.cancel==2"
+ :disabled="row.candidateNo=='' || row.cancel==2"
@click="handlePrint(row)"
>准考证打印
+ </el-button>
+ <el-button
+ :type="type"
+ size="small"
+ icon="el-icon-refresh-left"
+ :disabled="row.cancel==2 || row.isExam==2 || row.isExam==3"
+ @click="revoke(row)"
+ >取消报名
+ </el-button>
+ <el-button
+ :type="type"
+ size="small"
+ icon="el-icon-circle-check"
+ :disabled="row.auditStatus==1"
+ @click="auditSucess(row)"
+ >审核通过
</el-button>
</template>
@@ -99,7 +114,7 @@
<script>
-import {getdata,adddata,remove} from "@/api/trainingRegistration/trainingRegistration";
+import {getdata,adddata, cancelTrainAudit,auditSucess,remove} from "@/api/trainingRegistration/trainingRegistration";
import { mapState } from 'vuex'
@@ -117,7 +132,7 @@
export default {
data () {
-
+ var examId = this.$route.query.id;
return {
excelBox: false,
questionBankOption: {
@@ -259,6 +274,24 @@
width: 220
},
{
+ label: "报名状态",
+ prop: "cancel",
+ type:"select",
+ search:true,
+ hide:true,
+ searchSpan:4,
+ searchValue:1,
+ dicData:[
+ {
+ label: '已报名',
+ value: 1
+ }, {
+ label: '已取消',
+ value: 2
+ }
+ ]
+ },
+ {
label: "准考证号",
prop: "candidateNo",
slot: true,
@@ -374,7 +407,7 @@
? "0" + new Date().getSeconds()
: new Date().getSeconds())),
- width: 160
+ width: 150
},
{
label: "考试时间",
@@ -395,7 +428,44 @@
editDisplay: true,
// 表单编辑时是否为查看模式
editDetail: false,
- width: 160
+ width: 150
+ },
+ {
+ label: "审核状态",
+ search: true,
+ searchLabelWidth: 110,
+ type: "select",
+ searchSpan: 4,
+ prop: "auditStatus",
+ searchValue: 4,
+ dicData: [{
+ label: '全部',
+ value: 0,
+ },
+ {
+ label: '审核通过',
+ value: 1,
+ },
+ {
+ label: '审核不通过',
+ value: 2,
+ },
+ {
+ label: '已提交审核',
+ value: 3,
+ },
+ {
+ label: '未提交审核',
+ value: 4,
+ }
+ ],
+ props: {
+ label: "label",
+ value: "value"
+ },
+ editDisplay: false,
+ addDisplay: false,
+ width: 100,
},
// {
// label: "报名状态",
@@ -447,7 +517,7 @@
res: "data",
},
tip: "请上传 .xls,.xlsx 标准格式文件",
- action: "/api/trainingRegistration/import-trainingRegistration",
+ action: "/api/trainingRegistration/import-trainingRegistration?examId="+examId,
},
{
label: "模板下载",
@@ -495,11 +565,8 @@
this.questionBankOption.column[0].dicUrl = "/api/blade-system/dept/lazy-tree-user?parentId=" + this.userInfo.dept_id
}
-
-
-
-
-
+ this.questionBankSearch['cancel'] = 1;
+ this.questionBankSearch['auditStatus'] = 0;
},
mounted() {
var flag = false,
@@ -541,7 +608,7 @@
});
},
questionBankOnLoad (page, params = {}) {
- // debugger;
+ params = this.questionBankSearch;
params['examId'] = this.$route.query.id;
this.questionBankLoading = false;
getdata(page.currentPage, page.pageSize, Object.assign(params, this.questionBankQuery)).then(res => {
@@ -574,6 +641,54 @@
},
questionBankSizeChange (pageSize) {
this.questionBankPage.pageSize = pageSize;
+ },
+ //取消报名
+ revoke(row, done, loading) {
+ this.$confirm("确定取消报名?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ }).then(() => {
+ row.cancel = 2;
+ cancelTrainAudit(row).then(
+ () => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "取消报名成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ });
+ },
+ //审核通过
+ auditSucess(row, done, loading) {
+ this.$confirm("确定审核通过?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ }).then(() => {
+ row.cancel = 1;
+ auditSucess(row).then(
+ () => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ });
},
// 新增
@@ -658,7 +773,7 @@
},
handleTemplate() {
window.open(
- `/api/apply/export-template`
+ `/api/trainingRegistration/export-template`
);
},
uploadAfter(res, done, loading, column) {
--
Gitblit v1.9.3