|
@@ -1,6 +1,7 @@
|
|
|
<template>
|
|
|
<div id="examArrangement">
|
|
|
<table-list
|
|
|
+ ref="tableList"
|
|
|
:tableSets="tableSet"
|
|
|
:tableData="tableData"
|
|
|
:navText="navText"
|
|
@@ -12,11 +13,14 @@
|
|
|
<el-button size="medium" type="warning" @click="setExamAdress"
|
|
|
>配置考试地点</el-button
|
|
|
>
|
|
|
+ <el-button size="medium" type="primary" @click="openPeopleNumDialog"
|
|
|
+ >批量修改人数</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
<template slot="btn" slot-scope="props">
|
|
|
- <el-button type="text" @click="beforeFunc(props.scope.row)"
|
|
|
+ <!-- <el-button type="text" @click="beforeFunc(props.scope.row)"
|
|
|
>前培设置</el-button
|
|
|
- >
|
|
|
+ > -->
|
|
|
<el-button
|
|
|
type="text"
|
|
|
@click="addClick(props.scope.row, 0)"
|
|
@@ -29,12 +33,12 @@
|
|
|
:disabled="props.scope.row.status === 1"
|
|
|
>考点设置</el-button
|
|
|
>
|
|
|
- <el-button
|
|
|
+ <!-- <el-button
|
|
|
type="text"
|
|
|
@click="setExams(props.scope.row, 2)"
|
|
|
:disabled="props.scope.row.status === 1"
|
|
|
>考培设置</el-button
|
|
|
- >
|
|
|
+ > -->
|
|
|
<el-button
|
|
|
type="text"
|
|
|
@click="editGoods(props.scope.row)"
|
|
@@ -680,6 +684,44 @@
|
|
|
<el-button @click="dialogExamSync = false">取 消</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <!-- 修改人数弹窗 -->
|
|
|
+ <el-dialog
|
|
|
+ @closed="loadingClose"
|
|
|
+ :visible.sync="isPeopleNumDialog"
|
|
|
+ width="500px"
|
|
|
+ :show-close="false"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ >
|
|
|
+ <div slot="title" class="hearders">
|
|
|
+ <div class="leftTitle">修改人数</div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-form
|
|
|
+ label-position="right"
|
|
|
+ label-width="150px"
|
|
|
+ :model="peopleNumDate"
|
|
|
+ :rules="peopleRules"
|
|
|
+ ref="peopleNum"
|
|
|
+ >
|
|
|
+ <el-form-item label="人数" prop="num">
|
|
|
+ <el-input-number
|
|
|
+ v-model="peopleNumDate.num"
|
|
|
+ :min="0"
|
|
|
+ :controls="false"
|
|
|
+ ></el-input-number>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="isPeopleNumDialog = false">取 消</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ :loading="disabledBtn"
|
|
|
+ @click="handlePeopleNum"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
<before-page ref="beforePage" />
|
|
|
<applicable-products ref="applicableProducts" />
|
|
|
<downMaterial ref="downMaterial" />
|
|
@@ -718,6 +760,9 @@ export default {
|
|
|
pageSize2: 10,
|
|
|
currentPage2: 1,
|
|
|
loading: false, //当前表单加载是否加载动画
|
|
|
+ isPeopleNumDialog: false,
|
|
|
+ peopleRules: { num: [{ required: true, message: "请输入", trigger: "blur" }]},
|
|
|
+ peopleNumDate: {},
|
|
|
navText: {
|
|
|
title: "考试安排",
|
|
|
index: 0,
|
|
@@ -902,6 +947,32 @@ export default {
|
|
|
link.click();
|
|
|
link.remove();
|
|
|
},
|
|
|
+ // 打开修改人数弹窗
|
|
|
+ openPeopleNumDialog() {
|
|
|
+ if (!this.$refs.tableList.allCheckData.length) {
|
|
|
+ this.$message.warning("请选中选项!")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.isPeopleNumDialog = true
|
|
|
+ this.peopleNumDate.num = 0
|
|
|
+ this.peopleNumDate.applyIds = this.$refs.tableList.allCheckData.map(item => item.applyId)
|
|
|
+ },
|
|
|
+ // 保存修改人数
|
|
|
+ handlePeopleNum() {
|
|
|
+ this.isPeopleNumDialog = false
|
|
|
+ this.$refs['peopleNum'].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.$api.editPeopleNum(this.peopleNumDate).then(res => {
|
|
|
+ this.$message.success("修改人数成功");
|
|
|
+ this.search();
|
|
|
+ }).finally(() => {
|
|
|
+ console.log('error submit!')
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
//下载资料
|
|
|
downMaterial(row) {
|
|
|
this.$refs.downMaterial.openBox(row);
|