From 4f674edcc6a10e8f28cc8abba0e007db8937c846 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Thu, 16 Sep 2021 18:07:42 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhba_enterprises_ys
---
src/views/system/user.vue | 30 ++++++++++++++++++++++--------
1 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/src/views/system/user.vue b/src/views/system/user.vue
index 1a726da..be69d63 100644
--- a/src/views/system/user.vue
+++ b/src/views/system/user.vue
@@ -1,6 +1,6 @@
<template>
<el-row class="user">
- <el-col :span="5">
+ <el-col :span="sizes[0]">
<div class="box">
<el-scrollbar>
<basic-container>
@@ -13,7 +13,7 @@
</el-scrollbar>
</div>
</el-col>
- <el-col :span="19">
+ <el-col :span="sizes[1]">
<basic-container>
<avue-crud
:option="option"
@@ -220,8 +220,10 @@
}
};
return {
- form: {
- },
+ sizes: [5, 19],
+ deptids: null,
+
+ form: {},
search: {},
roleBox: false,
excelBox: false,
@@ -415,7 +417,7 @@
{
label: "密码",
prop: "password",
- type:'password',
+ type: "password",
hide: true,
editDisplay: false,
viewDisplay: false,
@@ -426,7 +428,7 @@
{
label: "确认密码",
prop: "password2",
- type:'password',
+ type: "password",
hide: true,
editDisplay: false,
viewDisplay: false,
@@ -753,6 +755,16 @@
return ids.join(",");
},
},
+ created() {
+ console.log(this.userInfo.role_name);
+ if (this.userInfo.role_name == "保安公司管理员") {
+ this.deptids = this.userInfo.dept_id;
+ this.sizes = [0, 24];
+ } else {
+ this.deptids = null;
+ this.sizes = [5, 19];
+ }
+ },
mounted() {
// 非保安单位模式默认加载管理组数据
if (!website.tenantMode) {
@@ -985,11 +997,12 @@
},
onLoad(page, params = {}) {
this.loading = true;
+ var deptid = this.deptids == null ? this.treeDeptId : this.deptids;
getList(
page.currentPage,
page.pageSize,
Object.assign(params, this.query),
- this.treeDeptId
+ deptid
).then((res) => {
const data = res.data.data;
this.page.total = data.total;
@@ -1050,11 +1063,12 @@
},
platformOnLoad(page, params = {}) {
this.platformLoading = true;
+ var deptid = this.deptids == null ? this.treeDeptId : this.deptids;
getList(
page.currentPage,
page.pageSize,
Object.assign(params, this.query),
- this.treeDeptId
+ deptid
).then((res) => {
const data = res.data.data;
this.platformPage.total = data.total;
--
Gitblit v1.9.3