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 | 35 +++++++++++++++++++++++++++++------
1 files changed, 29 insertions(+), 6 deletions(-)
diff --git a/src/views/securityGuard/securityGuard.vue b/src/views/securityGuard/securityGuard.vue
index 387fb09..cdc9f98 100644
--- a/src/views/securityGuard/securityGuard.vue
+++ b/src/views/securityGuard/securityGuard.vue
@@ -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 == "培训公司管理员") {
//如果是培训公司管理员
@@ -2268,10 +2288,10 @@
roleAlias == "分公司管理员"
) {
//去除保安公司查询
- const column = that.findObject(that.option.column, "deptId");
+ // 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;
+ // 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?deptId="+that.userInfo.dept_id;
@@ -2280,8 +2300,11 @@
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