From a8e7d91326da73622945dfa7d0df0adc8ea7e975 Mon Sep 17 00:00:00 2001
From: bibi <541660090@qq.com>
Date: Wed, 26 Jan 2022 16:38:42 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9D=83=E9=99=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 1 +
src/api/basic/role/index.js | 32 ++
src/main.js | 3 +
src/request/index.js | 4 +-
src/views/Basic/Authority/depend/form.vue | 443 ++++--------------
.../Authority/depend/permissions copy.vue | 167 -------
.../Basic/Authority/depend/permissions.vue | 230 ++++++---
src/views/Basic/Authority/index.vue | 159 +++++--
.../EstateInfo/_buildingManage/index.vue | 2 +-
.../EstateInfo/_houseHoldAudit/index.vue | 2 +-
.../Basic/EstateInfo/_houseManage/index.vue | 2 +-
src/views/Login/index.vue | 44 +-
yarn.lock | 35 +-
13 files changed, 506 insertions(+), 618 deletions(-)
delete mode 100644 src/views/Basic/Authority/depend/permissions copy.vue
diff --git a/package.json b/package.json
index 886ae96..8df430c 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,7 @@
"ant-design-vue": "^1.7.8",
"axios": "^0.24.0",
"core-js": "^3.6.5",
+ "element-ui": "^2.15.6",
"less": "^4.1.2",
"less-loader": "5.0.0",
"momen": "^0.0.1-security",
diff --git a/src/api/basic/role/index.js b/src/api/basic/role/index.js
index 37e24a4..2906a53 100644
--- a/src/api/basic/role/index.js
+++ b/src/api/basic/role/index.js
@@ -9,6 +9,38 @@ export function rolelist(params) {
data: params,
})
}
+// 新增角色
+export function roleInsert(params) {
+ return httpService({
+ url: `/user/role/insert`,
+ method: 'post',
+ data: params,
+ })
+}
+// 编辑角色
+export function roleUpdate(params) {
+ return httpService({
+ url: `/user/role/update`,
+ method: 'post',
+ data: params,
+ })
+}
+// 分配角色
+export function assignRoles(params) {
+ return httpService({
+ url: `/user/role/assignRoles`,
+ method: 'post',
+ data: params,
+ })
+}
+// 删除角色
+export function roleDel(params) {
+ return httpService({
+ url: `user/role/delete`,
+ method: 'post',
+ data: params,
+ })
+}
// 角色-----员工列表
export function listByRole(params) {
return httpService({
diff --git a/src/main.js b/src/main.js
index 31b520a..eea5209 100644
--- a/src/main.js
+++ b/src/main.js
@@ -3,6 +3,8 @@ import App from './App.vue'
import './styles/index.less';
import mixins from "@/mixins"
import Antd from 'ant-design-vue';
+import ElementUI from 'element-ui';
+import 'element-ui/lib/theme-chalk/index.css';
// import moment from 'moment';
import util from '@/utils/util.js'
import 'ant-design-vue/dist/antd.css';
@@ -10,6 +12,7 @@ import 'ant-design-vue/dist/antd.css';
Vue.use(util);
Vue.use(Antd);
Vue.use(mixins);
+Vue.use(ElementUI);
import store from "@/store";
import router from "@/permission";
diff --git a/src/request/index.js b/src/request/index.js
index 8b32f84..c9f4cfd 100644
--- a/src/request/index.js
+++ b/src/request/index.js
@@ -24,9 +24,8 @@ function filterRequestData(obj) {
return o;
}
//创建axios的实例
-const communityCode = store.getters.getCommunityCode;
const httpService = axios.create({
- baseURL: process.env.VUE_APP_URL+ communityCode +'/manage',// TODO:具体的配置可以根据项目情况而来
+ baseURL: process.env.VUE_APP_URL ,// TODO:具体的配置可以根据项目情况而来
timeout: 5000
})
@@ -38,6 +37,7 @@ httpService.interceptors.request.use(config => {
config.headers['Content-Type'] = "application/json";
config.headers['manage-login-token'] = store.getters.getToken;
// config.headers['device-type'] = "web";
+ config.baseURL = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage'
if(config.method === 'post') {
config.data = rqData;
} else {
diff --git a/src/views/Basic/Authority/depend/form.vue b/src/views/Basic/Authority/depend/form.vue
index c5fb5d6..4a9a143 100644
--- a/src/views/Basic/Authority/depend/form.vue
+++ b/src/views/Basic/Authority/depend/form.vue
@@ -1,375 +1,138 @@
-
- 基本信息
-
-
-
-
-
-
-
-
-
-
- {{
- item.name
- }}
-
-
-
-
-
-
-
-
-
-
- {
- $refs.tel.onFieldBlur();
- }
- "
- />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 身份证照片
-
-
-
- 单张最多不超过4M,最多上传2张,支持JPG,PNG格式
+
+
-
- 入职信息
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
- 上传资料
-
- 点击上传
-
- 支持上传PNG,JPG,PDF文件
-
-
- 联系信息
-
-
-
-
-
+
+
+ 无上级
+ {{item.name}}
+
-
-
-
-
+
+
-
-
-
-
+
+
-
-
- 其他信息
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
+
\ No newline at end of file
diff --git a/src/views/Basic/Authority/depend/permissions copy.vue b/src/views/Basic/Authority/depend/permissions copy.vue
deleted file mode 100644
index 67a1c86..0000000
--- a/src/views/Basic/Authority/depend/permissions copy.vue
+++ /dev/null
@@ -1,167 +0,0 @@
-
-
-
-
-
- 所有角色
-
-
-
-
- {{ rolechild.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/views/Basic/Authority/depend/permissions.vue b/src/views/Basic/Authority/depend/permissions.vue
index 7922825..f109172 100644
--- a/src/views/Basic/Authority/depend/permissions.vue
+++ b/src/views/Basic/Authority/depend/permissions.vue
@@ -1,118 +1,186 @@
-
-
-
- 所有角色
- 新增角色
-
-
-
-
- {{ rolechild.name }}
-
-
-
-
-
-
-
-
-
+
+
+
+ 所有角色
+ 新增角色
+
+
+
+
+ {{ rolechild.name || "无" }}
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
@@ -155,11 +233,25 @@ export default {
display: flex;
justify-content: space-between;
}
-/deep/.ant-tree ul{
+/deep/.ant-tree ul {
width: 200px;
}
-.tree{
+.tree {
display: flex;
margin-left: 20px;
}
+.role-card {
+ line-height: 30px;
+ font-size: 16px;
+ cursor: pointer;
+ border-bottom: 1px solid #d9d9d9;
+ margin-bottom: 10px;
+ display: flex;
+ justify-content: space-between;
+}
+.role-li {
+ display: flex;
+ justify-content: space-between;
+ width: 100%;
+}
\ No newline at end of file
diff --git a/src/views/Basic/Authority/index.vue b/src/views/Basic/Authority/index.vue
index ac1d21a..3bad29e 100644
--- a/src/views/Basic/Authority/index.vue
+++ b/src/views/Basic/Authority/index.vue
@@ -16,8 +16,25 @@
v-for="(rolechild, indexs) in item.childrenList"
class="role-card"
:key="indexs"
+ @click='rolechoose(rolechild.id)'
>
- {{ rolechild.name }}
+
+ {{ rolechild.name || "无" }}
+
+
+
+
@@ -26,9 +43,12 @@
-
- 查 询
- 重 置
+
+ 查 询
+ 重 置
- 分配角色
@@ -51,19 +71,35 @@
-
+
+
+ 请选择角色:
+
+
+