From 6a7b5f379f8d3e8b6d004bdf347cf1e86f3efdaf Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Fri, 06 May 2022 16:13:26 +0800
Subject: [PATCH] 保安员管理菜单修改,培训报名修改
---
src/views/trainingRegistration/data.js | 24 ++++----
src/views/securityGuard/securityGuard.vue | 8 +-
src/views/traincompany/index.vue | 93 +++++++++++++++++++++++++++---
src/views/securityGuard/data.js | 44 +++++++-------
src/views/trainingRegistration/index.vue | 3 -
5 files changed, 120 insertions(+), 52 deletions(-)
diff --git a/src/views/securityGuard/data.js b/src/views/securityGuard/data.js
index 515a33d..6cef7fa 100644
--- a/src/views/securityGuard/data.js
+++ b/src/views/securityGuard/data.js
@@ -784,28 +784,28 @@
// }
// ]
// },
- // {
- // label: "在职状态",
- // prop: "status",
- // type: "select",
- // dicUrl: "/api/blade-system/dict-biz/dictionary?code=workerState",
- // props: {
- // label: "dictValue",
- // value: "dictKey"
- // },
- // dataType: "number",
- // searchValue: 1,
- // display: false,
- // hide: true,
- // searchSpan: 3,
- // width: 80,
- // search: true,
- // rules: [{
- // required: true,
- // message: "请选择在职状态",
- // trigger: "blur"
- // }]
- // },
+ {
+ label: "在职状态",
+ prop: "status",
+ type: "select",
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=workerState",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ dataType: "number",
+ searchValue: 1,
+ display: false,
+ hide: true,
+ searchSpan: 3,
+ width: 80,
+ search: true,
+ rules: [{
+ required: true,
+ message: "请选择在职状态",
+ trigger: "blur"
+ }]
+ },
// {
// label: "审查状态",
// prop: "examinationType",
diff --git a/src/views/securityGuard/securityGuard.vue b/src/views/securityGuard/securityGuard.vue
index 62452ba..153b2f7 100644
--- a/src/views/securityGuard/securityGuard.vue
+++ b/src/views/securityGuard/securityGuard.vue
@@ -182,7 +182,7 @@
@click="$refs.crud.rowEdit(row, index)"
>编辑
</el-button>
- <br v-if="permission.securityGuard_delete && row.status != 2" />
+ <br v-if="permission.securityGuard_edit && row.status != 2" />
<el-button
icon="el-icon-close"
:size="size"
@@ -2299,7 +2299,7 @@
// console.log(res.data,111111111111111111);
this.initFlag = false;
if (res.data.code == 200) {
- this.$alert("账号为身份证号码,密码为身份证后六位", "温馨提示", {
+ this.$alert("账号为姓名,密码为身份证后六位", "温馨提示", {
confirmButtonText: "确定",
callback: action => {
this.$message({
@@ -2314,7 +2314,7 @@
//保安员证编号不匹配的情况
if (res.data.code == 201) {
this.$alert(
- "用户新增成功!账号为身份证号码,密码为身份证后六位!注:当前保安证编号不匹配,请核实!也可通过提供保安证件信息提交核实申请!",
+ "用户新增成功!账号为姓名,密码为身份证后六位!注:当前保安证编号不匹配,请核实!",
"温馨提示",
{
confirmButtonText: "确定",
@@ -2367,7 +2367,7 @@
}
if (res.data.code == 201) {
this.$alert(
- "修改成功!注:当前保安证编号不匹配,请核实!也可通过提供保安证件信息提交核实申请!",
+ "修改成功!注:当前保安证编号不匹配,请核实!",
"温馨提示",
{
confirmButtonText: "确定",
diff --git a/src/views/traincompany/index.vue b/src/views/traincompany/index.vue
index e0dd316..32abcfa 100644
--- a/src/views/traincompany/index.vue
+++ b/src/views/traincompany/index.vue
@@ -29,8 +29,19 @@
@row-click="handleRowClick"
@on-load="onLoad"
>
- <template slot-scope="{ type, row }" slot="menu">
+ <template slot="menuLeft">
<el-button
+ style="display:none"
+ type="primary"
+ size="small"
+ plain
+ icon="el-icon-folder-checked"
+ @click="handleImport"
+ >批量报名
+ </el-button>
+ </template>
+ <template slot-scope="{ type, row }" slot="menu">
+ <!-- <el-button
:type="type"
size="small"
icon="el-icon-edit"
@@ -38,7 +49,7 @@
:disabled="auditStatus"
@click="handleTrainApply(row)"
>报名
- </el-button>
+ </el-button> -->
<el-button
:type="type"
size="small"
@@ -63,6 +74,24 @@
@submit="submit"
></avue-form>
</el-dialog>
+ <el-dialog
+ title="批量报名"
+ append-to-body
+ :visible.sync="excelBox"
+ width="555px"
+ >
+ <avue-form
+ :option="excelOption"
+ v-model="excelForm"
+ :upload-after="uploadAfter"
+ >
+ <template slot="excelTemplate">
+ <el-button type="primary" @click="handleTemplate">
+ 点击下载<i class="el-icon-download el-icon--right"></i>
+ </el-button>
+ </template>
+ </avue-form>
+ </el-dialog>
</basic-container>
</template>
@@ -85,9 +114,37 @@
data() {
return {
form: {},
+ excelBox: false,
auditStatus: false,
formTrainApply: {
num: 0
+ },
+ deptIds:'',
+ excelForm: {},
+ excelOption: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [
+ {
+ label: "模板上传",
+ prop: "excelFile",
+ type: "upload",
+ drag: true,
+ loadText: "模板上传中,请稍等",
+ span: 24,
+ propsHttp: {
+ res: "data"
+ },
+ tip: "请上传 .xls,.xlsx 标准格式文件",
+ action: "/api/trainingRegistration/import-trainingRegistration?deptId=" + this.deptIds
+ },
+ {
+ label: "模板下载",
+ prop: "excelTemplate",
+ formslot: true,
+ span: 24
+ }
+ ]
},
query: {},
deptId: null,
@@ -255,6 +312,10 @@
this.formTrainApply.num = this.formTrainApply.userId.length;
}
},
+ mounted(){
+ this.$store.commit("setWindowSizeHeightAdd");
+ this.deptIds = this.userInfo.dept_id;
+ },
computed: {
...mapGetters(["permission"]),
permissionList() {
@@ -281,12 +342,22 @@
"/api/blade-user/security-apply-tree?examType=2&deptId=" +
this.userInfo.dept_id;
- this.getUserDetail();
- },
- mounted() {
- this.$store.commit("setWindowSizeHeightAdd");
+ // this.getUserDetail();
},
methods: {
+ handleImport() {
+ this.excelBox = true;
+ },
+
+ handleTemplate() {
+ window.open(`/api/trainingRegistration/export-template`);
+ },
+ uploadAfter(res, done, loading, column) {
+ window.console.log(column);
+ this.excelBox = false;
+ this.refreshChange();
+ done();
+ },
//获取用户信息
getUserDetail() {
var that = this;
@@ -432,11 +503,11 @@
});
},
beforeOpen(done, type) {
- if (["edit", "view"].includes(type)) {
- getDetail(this.form.id).then(res => {
- this.form = res.data.data;
- });
- }
+ // if (["edit", "view"].includes(type)) {
+ // getDetail(this.form.id).then(res => {
+ // this.form = res.data.data;
+ // });
+ // }
done();
},
searchReset() {
diff --git a/src/views/trainingRegistration/data.js b/src/views/trainingRegistration/data.js
index 4dd2e3e..f51dcf9 100644
--- a/src/views/trainingRegistration/data.js
+++ b/src/views/trainingRegistration/data.js
@@ -85,18 +85,18 @@
// addDisplay: false,
// width: 110
// },
- {
- label: "报名时间",
- prop: "trainingTime",
- rules: [{
- required: true,
- message: "请输入报名时间",
- trigger: "blur"
- }],
- editDisplay: false,
- addDisplay: false,
- width: 130
- },
+ // {
+ // label: "报名时间",
+ // prop: "trainingTime",
+ // rules: [{
+ // required: true,
+ // message: "请输入报名时间",
+ // trigger: "blur"
+ // }],
+ // editDisplay: false,
+ // addDisplay: false,
+ // width: 130
+ // },
// {
// label: "电话",
// prop: "phone",
diff --git a/src/views/trainingRegistration/index.vue b/src/views/trainingRegistration/index.vue
index 6940595..6fc602d 100644
--- a/src/views/trainingRegistration/index.vue
+++ b/src/views/trainingRegistration/index.vue
@@ -638,9 +638,6 @@
value: list[k].id
});
}
-
- // window.localStorage.setItem("baoming", JSON.stringify(this.choiceName));
- // console.log(this.choiceName);
},
handleDelete() {
if (this.selectionList.length === 0) {
--
Gitblit v1.9.3