From 5a3ace296c010b5c11501dedf252e1c144cda9e2 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Mon, 06 Dec 2021 13:55:01 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/zhba_enterprises_ys
---
src/views/securityGuard/securityGuard.vue | 407 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 373 insertions(+), 34 deletions(-)
diff --git a/src/views/securityGuard/securityGuard.vue b/src/views/securityGuard/securityGuard.vue
index e6f6f0f..580c187 100644
--- a/src/views/securityGuard/securityGuard.vue
+++ b/src/views/securityGuard/securityGuard.vue
@@ -1,5 +1,5 @@
<template>
- <el-row :class="{securityGuard : isSecurity}">
+ <el-row :class="{ securityGuard: isSecurity }">
<el-col :span="0" style="display: none">
<div class="box">
<el-scrollbar>
@@ -130,7 +130,7 @@
icon="el-icon-edit"
:size="size"
:type="type"
- v-if="permission.securityGuard_delete"
+ v-if="permission.securityGuard_delete && row.status != 2"
@click.stop="rowDel(row)"
>离职登记
</el-button>
@@ -138,10 +138,32 @@
icon="el-icon-edit"
:size="size"
:type="type"
+ v-if="row.status == 2"
+ @click.stop="rowDellook(row)"
+ >离职查询
+ </el-button>
+ <el-button
+ icon="el-icon-finished"
+ :size="size"
+ :type="type"
+ @click.stop="trackRecord(row)"
+ >现实表现
+ </el-button>
+ <el-button
+ icon="el-icon-s-cooperation"
+ :size="size"
+ :type="type"
+ @click.stop="Experience(row)"
+ >从业记录
+ </el-button>
+ <!-- <el-button
+ icon="el-icon-edit"
+ :size="size"
+ :type="type"
v-if="permission.securityGuard_check"
@click.stop="rowCheck(row)"
>异常
- </el-button>
+ </el-button> -->
</template>
<template slot-scope="{ row }" slot="sex">
@@ -169,6 +191,40 @@
<el-tag>{{ row.userTypeName }}</el-tag>
</template>
</avue-crud>
+ <el-dialog
+ title="从业记录"
+ append-to-body
+ :visible.sync="ExperienceVisible"
+ width="80%"
+ >
+ <avue-crud
+ :option="option1"
+ :data="data1"
+ :page.sync="page1"
+ :table-loading="loading1"
+ @row-save="rowSave1"
+ @row-update="rowUpdate1"
+ @row-del="rowDel1"
+ >
+ </avue-crud>
+ </el-dialog>
+ <el-dialog
+ title="现实表现"
+ append-to-body
+ :visible.sync="trackRecordVisible"
+ >
+ <avue-crud
+ :option="option2"
+ :data="data2"
+ :page.sync="page2"
+ @row-save="rowSave2"
+ @row-update="rowUpdate2"
+ @row-del="rowDel2"
+ :table-loading="loading2"
+ >
+ </avue-crud>
+ </el-dialog>
+
<el-dialog
title="用户角色配置"
append-to-body
@@ -298,9 +354,28 @@
import { mapGetters } from "vuex";
import website from "@/config/website";
import { getToken } from "@/util/auth";
-import { securityFormPageColumn } from "./data";
+import {
+ securityFormPageColumn,
+ trackRecordColumn,
+ practitionersColumn,
+} from "./data";
import { mapState } from "vuex";
+import {
+ //现实表现
+ trackRecordadd,
+ trackRecordupdate,
+ trackRecordpage,
+ trackRecordremove,
+} from "@/api/performance/performance";
+import {
+ //从业记录
+ addExperience,
+ updateExperience,
+ getExperienceDetail,
+ experienceRemove,
+ getExperienceList,
+} from "@/api/experience/experience";
export default {
data() {
const validatePass = (rule, value, callback) => {
@@ -320,6 +395,60 @@
}
};
return {
+ //从业记录
+ securityid1: "",
+ ExperienceVisible: false,
+ loading1: true,
+ page1: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ query1: {},
+ data1: [],
+ option1: {
+ card: true,
+ menu: true,
+ height: 400,
+ widtd: "auto",
+ calcHeight: 54,
+ border: true, //liu
+ stripe: true,
+ tip: false,
+ index: true,
+ dialogClickModal: false,
+ headerAlign: "center",
+ align: "center",
+ column: practitionersColumn,
+ },
+ //现实表现
+ securityid2: "",
+ loading2: true,
+ page2: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ query2: {},
+ data2: [],
+ option2: {
+ card: true,
+ menu: true,
+ height: 400,
+ widtd: "auto",
+ calcHeight: 54,
+ border: true, //liu
+ stripe: true,
+ tip: false,
+ index: true,
+ dialogClickModal: false,
+ headerAlign: "center",
+ align: "center",
+ column: trackRecordColumn,
+ },
+ trackRecordData: [],
+ trackRecordVisible: false,
+
securityid: "",
excelBox1: false,
excelBox2: false,
@@ -367,12 +496,11 @@
},
tip: "请上传 zip 压缩文件",
action: "/api/blade-resource/oss/endpoint/put-file-zip",
- }
+ },
],
},
- form: {
- },
+ form: {},
search: {},
roleBox: false,
excelBox: false,
@@ -443,11 +571,13 @@
stripe: true,
border: true,
delBtn: false,
-
+ addTitle: "入职登记",
+ addBtnText: "入职登记",
+ editBtnText: "修改",
align: "center",
index: true,
delBtnText: "注销",
- menuWidth: 271,
+ menuWidth: 368,
selection: true,
viewBtn: true,
defaultExpandAll: true,
@@ -484,7 +614,7 @@
{
label: "登录账号",
prop: "account",
- editDisabled:true,
+ editDisabled: true,
rules: [
{
required: true,
@@ -497,7 +627,7 @@
{
label: "密码",
prop: "password",
- type:'password',
+ type: "password",
hide: true,
editDisplay: false,
viewDisplay: false,
@@ -508,7 +638,7 @@
{
label: "确认密码",
prop: "password2",
- type:'password',
+ type: "password",
hide: true,
editDisplay: false,
viewDisplay: false,
@@ -516,7 +646,6 @@
{ required: true, validator: validatePass2, trigger: "blur" },
],
},
-
],
},
{
@@ -559,9 +688,27 @@
},
action: "/api/blade-resource/oss/endpoint/put-file",
tip: "只能上传jpg/png个人头像,且不超过500kb",
- span: 12,
- row: true,
+ span: 10,
+ // row: true,
prop: "avatar",
+ },
+ {
+ label: "指纹信息",
+ type: "upload",
+ listType: "picture-img",
+ propsHttp: {
+ res: "data",
+ url: "link",
+ },
+ canvasOption: {
+ text: " ",
+ ratio: 0.1,
+ },
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ tip: "只能上传jpg/png指纹信息,且不超过500kb",
+ span: 10,
+ // row: true,
+ prop: "fingerprint",
},
{
label: "是否持证",
@@ -894,10 +1041,154 @@
if (!website.tenantMode) {
this.initData(website.tenantId);
}
- console.log(this.search,111);
- this.search['status'] = 1;
+ // console.log(this.search, 111);
+ this.search["status"] = 1;
},
methods: {
+ //从业记录↓
+ Experience(row) {
+ // console.log(row);
+ this.securityid1 = row.id;
+ this.getPractitionersPageInfo(this.page1);
+ },
+ getPractitionersPageInfo(page) {
+ var param = {
+ securityid: this.securityid1,
+ };
+ this.ExperienceVisible = true;
+ //获取用户从业信息
+ getExperienceList(page.currentPage, page.pageSize, param).then((res1) => {
+ const data = res1.data.data;
+ this.page1.total = data.total;
+ this.data1 = data.records;
+ this.loading1 = false;
+ });
+ },
+ rowSave1(form, done, loading) {
+ form.securityid = this.securityid1;
+ addExperience(form).then(
+ (res) => {
+ this.getPractitionersPageInfo(this.page1);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ // }
+ },
+ rowUpdate1(row, index, done, loading) {
+ row.securityid = this.securityid1;
+ updateExperience(row).then(
+ () => {
+ this.getPractitionersPageInfo(this.page1);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ rowDel1(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return experienceRemove(row.id);
+ })
+ .then(() => {
+ this.getPractitionersPageInfo(this.page1);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ });
+ },
+ //从业记录↑
+ //现实表现↓
+ trackRecord(row) {
+ // console.log(row);
+ this.securityid2 = row.id;
+ this.getPerformancePageInfo(this.page2);
+ },
+ getPerformancePageInfo(page) {
+ var param = {
+ securityid: this.securityid2,
+ };
+ this.trackRecordVisible = true;
+ trackRecordpage(page.currentPage, page.pageSize, param).then((res2) => {
+ const data = res2.data.data;
+ this.page2.total = data.total;
+ this.data2 = data.records;
+ // console.log(this.data2, 1);
+ this.loading2 = false;
+ });
+ },
+ rowSave2(form, done, loading) {
+ form.securityid = this.securityid2;
+ trackRecordadd(form).then(
+ (res) => {
+ this.getPerformancePageInfo(this.page2);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ // }
+ },
+ rowUpdate2(row, index, done, loading) {
+ row.securityid = this.securityid2;
+ trackRecordupdate(row).then(
+ () => {
+ this.getPerformancePageInfo(this.page2);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ rowDel2(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return trackRecordremove(row.id);
+ })
+ .then(() => {
+ this.getPerformancePageInfo(this.page2);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ });
+ },
+ //现实表现↑
handleImport1() {
this.excelBox1 = true;
},
@@ -1002,7 +1293,7 @@
sex: row.sex,
};
const userMap = {
- user: user
+ user: user,
};
securitySave(userMap).then(
() => {
@@ -1026,7 +1317,8 @@
row.postId = row.postId.join(",");
//值替换,education 放在页面会卡死
row.education = row.education1;
- update(row).then(() => {
+ update(row).then(
+ () => {
this.initFlag = false;
this.onLoad(this.page);
this.$message({
@@ -1041,23 +1333,61 @@
}
);
},
+ rowDellook(row) {
+ console.log(row.reasonForLeav);
+ this.$alert(
+ row.reasonForLeav == "" ? "未填写" : row.reasonForLeav,
+ "离职原因",
+ {
+ confirmButtonText: "确定",
+ callback: (action) => {
+ // this.$message({
+ // type: "info",
+ // message: `action: ${action}`,
+ // });
+ },
+ }
+ );
+ },
rowDel(row) {
- this.$confirm("确定将选择保安登记离职?", {
- confirmButtonText: "确定",
+ // this.$confirm("确定将选择保安登记离职?", {
+ // confirmButtonText: "确定",
+ // cancelButtonText: "取消",
+ // type: "warning",
+ // })
+ // .then(() => {
+ // row.status = "2";
+ // return update(row);
+ // })
+ // .then(() => {
+ // this.onLoad(this.page);
+ // this.$message({
+ // type: "success",
+ // message: "操作成功!",
+ // });
+ // });
+ this.$prompt("离职原因", "提示", {
+ confirmButtonText: "确定离职",
cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- row.status = "2";
- return update(row);
- })
- .then(() => {
- this.onLoad(this.page);
+ inputErrorMessage: "",
+ }).then(({ value }) => {
+ console.log(value);
+ row.reasonForLeav = value;
+ row.status = "2";
+ update(row).then((res) => {
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功",
});
});
+ this.refreshChange();
+ });
+ // .catch(() => {
+ // this.$message({
+ // type: 'info',
+ // message: '取消输入'
+ // });
+ // });
},
rowCheck(row) {
this.$confirm("确定审查异常标记?", {
@@ -1083,6 +1413,7 @@
this.onLoad(this.page);
},
searchChange(params, done) {
+ console.log(params, 12);
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
@@ -1243,10 +1574,7 @@
roleIds.forEach((roleId) => {
getRoleDetail(roleId).then((res) => {
var roleAlias = res.data.data.roleAlias;
- if (
- roleAlias == "保安公司管理员" ||
- roleAlias == "保安"
- ) {
+ if (roleAlias == "保安公司管理员" || roleAlias == "保安") {
//去除保安公司查询
const column = that.findObject(that.option.column, "deptId");
column.search = false;
@@ -1331,6 +1659,17 @@
this.platformForm = res.data.data;
});
}
+ if (this.userInfo.role_name == "保安公司管理员") {
+ // console.log("保安公司管理员登入");
+ const deptColumn = this.findObject(
+ this.questionBankOption.column,
+ "deptId"
+ );
+ deptColumn.disabled = true;
+ console.log(this.userInfo.dept_id);
+ this.obj["deptId"] = this.userInfo.dept_id;
+ }
+
done();
},
platformSearchReset() {
--
Gitblit v1.9.3