From cac30d3d83513eae0fbab9de25ec60fcb8c98cee Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Thu, 02 Sep 2021 11:24:27 +0800
Subject: [PATCH] 正式,模拟考试申请修改,新增通过报名人数来报名
---
src/views/applyexam/index.vue | 29 +++++++++++++-
src/api/examapi/applyexam.js | 3 +
src/views/traincompany/index.vue | 2
src/api/trainingRegistration/trainingRegistration.js | 3 +
src/views/trainingRegistration/index.vue | 48 ++++++++++++++---------
5 files changed, 61 insertions(+), 24 deletions(-)
diff --git a/src/api/examapi/applyexam.js b/src/api/examapi/applyexam.js
index 7f6700f..5200c39 100644
--- a/src/api/examapi/applyexam.js
+++ b/src/api/examapi/applyexam.js
@@ -60,7 +60,7 @@
})
}
-export const addExam = (ids, examTime, startTime, endTime) => {
+export const addExam = (ids, examTime, startTime, number, endTime) => {
return request({
url: '/api/apply/batchExam',
method: 'post',
@@ -68,6 +68,7 @@
ids,
examTime,
startTime,
+ number,
endTime
}
})
diff --git a/src/api/trainingRegistration/trainingRegistration.js b/src/api/trainingRegistration/trainingRegistration.js
index 9b93056..46ec956 100644
--- a/src/api/trainingRegistration/trainingRegistration.js
+++ b/src/api/trainingRegistration/trainingRegistration.js
@@ -57,7 +57,7 @@
}
-export const addExam = (ids, examTime, startTime, endTime) => {
+export const addExam = (ids, examTime, startTime, number, endTime) => {
return request({
url: '/api/trainingRegistration/batchExam',
method: 'post',
@@ -65,6 +65,7 @@
ids,
examTime,
startTime,
+ number,
endTime
}
})
diff --git a/src/views/applyexam/index.vue b/src/views/applyexam/index.vue
index fb6545d..e0be230 100644
--- a/src/views/applyexam/index.vue
+++ b/src/views/applyexam/index.vue
@@ -299,6 +299,31 @@
dialogClickModal: false,
column: [
{
+ label: "考试人数",
+ prop: "number",
+ type: 'number',
+ span: 6,
+ precision:0,
+ step:50,
+ mock:{
+ type:'number',
+ max:1000,
+ min:0,
+ precision:0
+ },
+ rules: [
+ {
+ required: true,
+ message: "请输入考试人数",
+ trigger: "blur",
+ },
+ ],
+ minRows: 0,
+ maxRows: 1000,
+ value:50,
+ row:true,
+ },
+ {
label: "考试时间",
prop: "startTime",
type: "datetime",
@@ -334,7 +359,7 @@
delBtn: false,
editBtn: false,
addBtn: false,
- selection: true,
+ selection: false,
menu: true,
// 导出按钮
// excelBtn: true,
@@ -872,7 +897,7 @@
// var endTime = row.examTime[1];
// var examTime = JSON.stringify(row.examTime);
// console.log(this.ids,111);
- addExam(this.ids, null, startTime, null).then(
+ addExam(this.ids, null, startTime,row.number, null).then(
() => {
this.questionBankOnLoad(this.questionBankPage);
this.$message({
diff --git a/src/views/traincompany/index.vue b/src/views/traincompany/index.vue
index 86882d7..c1846be 100644
--- a/src/views/traincompany/index.vue
+++ b/src/views/traincompany/index.vue
@@ -271,7 +271,7 @@
},
created() {
this.optionTrainApply.column[1].dicUrl =
- "/api/blade-user/security-apply-tree?deptId=" +
+ "/api/blade-user/security-apply-tree?examType=2&deptId=" +
this.userInfo.dept_id;
},
methods: {
diff --git a/src/views/trainingRegistration/index.vue b/src/views/trainingRegistration/index.vue
index 8005c94..99fba9f 100644
--- a/src/views/trainingRegistration/index.vue
+++ b/src/views/trainingRegistration/index.vue
@@ -145,27 +145,36 @@
index: true,
stripe: true,
viewBtn: true,
- selection: true,
+ selection: false,
excelBtn: false,
menuWidth: 380,
dialogClickModal: false,
column: [
- // {
- // label: "考试人数",
- // prop: "number",
- // type: 'number',
- // span: 6,
- // precision:2,
- // mock:{
- // type:'number',
- // max:500,
- // min:50,
- // precision:50
- // },
- // minRows: 0,
- // maxRows: 3,
- // row:true,
- // },
+ {
+ label: "考试人数",
+ prop: "number",
+ type: 'number',
+ span: 6,
+ precision:0,
+ step:50,
+ mock:{
+ type:'number',
+ max:1000,
+ min:0,
+ precision:0
+ },
+ rules: [
+ {
+ required: true,
+ message: "请输入考试人数",
+ trigger: "blur",
+ },
+ ],
+ minRows: 0,
+ maxRows: 1000,
+ value:50,
+ row:true,
+ },
{
label: "考试时间",
prop: "startTime",
@@ -239,7 +248,7 @@
labelWidth: "120",
menuWidth: 200,
align: "center",
- selection: true,
+ selection: false,
column: column,
delBtn: false,
editBtn: false,
@@ -436,6 +445,7 @@
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
+ params['cancel'] = 111;
this.loading = true;
getdata(
page.currentPage,
@@ -478,7 +488,7 @@
// var endTime = row.examTime[1];
// var examTime = JSON.stringify(row.examTime);
// console.log(this.ids,111);
- addExam(this.ids, null, startTime, null).then(
+ addExam(this.ids, null, startTime,row.number, null).then(
() => {
this.onLoad(this.page);
this.$message({
--
Gitblit v1.9.3