From 98ea8631ff25dc52dde07a376ffadb3466a533cb Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Sat, 27 Nov 2021 13:59:13 +0800
Subject: [PATCH] 保安员,用户权限修改
---
src/views/securityGuard/securityGuard.vue | 73 +++++++++++++++++++++++++++---------
1 files changed, 55 insertions(+), 18 deletions(-)
diff --git a/src/views/securityGuard/securityGuard.vue b/src/views/securityGuard/securityGuard.vue
index 3342769..cdc9f98 100644
--- a/src/views/securityGuard/securityGuard.vue
+++ b/src/views/securityGuard/securityGuard.vue
@@ -826,7 +826,7 @@
text: " ",
ratio: 0.1,
},
- action: "/api/blade-resource/oss/endpoint/put-file-user-avatar",
+ action: "/api/blade-resource/oss/endpoint/put-files",
tip: "上传身份证一寸近期彩色正面免冠图象, (358像素(宽) × 441像素(高)、分辨率350dpi)且不超过500kb",
span: 12,
// row: true,
@@ -1261,6 +1261,22 @@
this.search["userType"] = 7;
this.search["hold"] = "1";
}
+ this.userInfo.rname.forEach(roleName=>{
+ if (
+ roleName == "保安公司管理员" ||
+ roleName == "保安" ||
+ roleName == "分公司管理员"
+ ) {
+ //查询保安单位信息(包含子级)
+ const column = this.findObject(this.option.column, "deptId");
+ // column.search = false;
+ //默认全部展开
+ column.defaultExpandAll = true;
+ column.dicUrl =
+ "/api/blade-system/dept/security_lazy-tree?deptId="+this.userInfo.dept_id;
+ }
+ })
+
if (
this.userInfo.account == "南昌市保安服务总公司" ||
@@ -1724,7 +1740,11 @@
//导出
if (this.userInfo.role_name == "保安公司管理员") {
//如果是保安公司管理员
- data["deptId"] = this.userInfo.dept_id;
+ if(this.search.deptId){
+ data["deptId"] = this.search.deptId;
+ }else{
+ data["deptId"] = this.userInfo.dept_id;
+ }
}
if (this.userInfo.role_name == "培训公司管理员") {
//如果是培训公司管理员
@@ -1836,10 +1856,11 @@
row.fingerprint = zhiwen.imgBMP;
row.myPicture = zhiwen.featuredata;
}
- // console.log(row);
- // return;
+
//是否是身份证自动识别进入
- row["cell"] = this.nowCell;
+ if (row.cell != "2") {
+ row["cell"] = this.nowCell;
+ }
update(row).then(
() => {
this.initFlag = false;
@@ -2037,8 +2058,8 @@
);
},
openClosegroup(val) {
- let ql = /realName|nation|cardid|registered|sex/;
- // let ql = /realName|nation|cardid|registered/;
+ // let ql = /realName|nation|cardid|registered|sex/;
+ let ql = /realName|nation|cardid|registered/;
for (let k in this.option.group) {
for (let i in this.option.group[k].column) {
if (ql.test(this.option.group[k].column[i].prop)) {
@@ -2101,10 +2122,10 @@
this.intTime = setInterval(function () {
if (!that.haveCardid) {
//定时读卡
- console.log(that.haveCardid);
+ // console.log(that.haveCardid);
let result = CertCtl.readCert();
// console.log(result);
- console.log("通过读取");
+ // console.log("通过读取");
if (result == "") {
console.log("未启动读卡插件!");
that.closeSFZ();
@@ -2124,8 +2145,7 @@
that.form.cardid = data.certNumber;
that.form.nation = data.nation;
that.form.registered = data.certAddress;
- that.form.sex =
- data.certType == 0 ? 2 : data.certType == 1 ? 1 : 3;
+ that.form.sex = data.gender == 0 ? 2 : data.gender == 1 ? 1 : 3;
//禁止编辑
that.openClosegroup(true);
that.nowCell = "2";
@@ -2134,7 +2154,7 @@
console.log("读卡器未连接");
that.closeSFZ();
} else {
- console.log("无卡片提醒-1", resultObj.errorMsg);
+ // console.log("无卡片提醒-1", resultObj.errorMsg);
//无卡片提醒
// that.closeSFZ();
}
@@ -2250,24 +2270,41 @@
roleIds.forEach((roleId) => {
getRoleDetail(roleId).then((res) => {
var roleAlias = res.data.data.roleAlias;
+ if (roleAlias == "保安公司管理员") {
+ that.option.group[1].column[4].dicData = [
+ {
+ label: "是",
+ value: "1",
+ },
+ {
+ label: "否",
+ value: "2",
+ },
+ ];
+ }
if (
roleAlias == "保安公司管理员" ||
roleAlias == "保安" ||
roleAlias == "分公司管理员"
) {
//去除保安公司查询
- const column = that.findObject(that.option.column, "deptId");
- column.search = false;
+ // const column = that.findObject(that.option.column, "deptId");
+ // column.search = false;
+ // column.dicUrl =
+ // "/api/blade-system/dept/security_lazy-tree?deptId="+that.userInfo.dept_id;
const deptColumn = that.findObject(that.option.group, "deptId");
deptColumn.dicUrl =
- "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697";
+ "/api/blade-system/dept/security_lazy-tree?deptId="+that.userInfo.dept_id;
//禁止编辑
- deptColumn.disabled = true;
+ // deptColumn.disabled = true;
deptColumn.value = that.userInfo.dept_id;
that.isSecurity = false;
//如果是保安公司管理员
- params["deptId"] = that.userInfo.dept_id;
-
+ if(this.search.deptId){
+ params["deptId"] = this.search.deptId;
+ }else{
+ params["deptId"] = that.userInfo.dept_id;
+ }
//导入action 修改
const importColumn = that.findObject(
that.excelOption1.column,
--
Gitblit v1.9.3