diff --git a/src/api/model/system.js b/src/api/model/system.js
index b6cec3b0..67d264e4 100644
--- a/src/api/model/system.js
+++ b/src/api/model/system.js
@@ -2,22 +2,6 @@ import config from "@/config"
import http from "@/utils/request"
export default {
- menu: {
- myMenus: {
- url: `${config.API_URL}/system/menu/my/1.6.1`,
- name: "获取我的菜单",
- get: async function(){
- return await http.get(this.url);
- }
- },
- list: {
- url: `${config.API_URL}/system/menu/list`,
- name: "获取菜单",
- get: async function(){
- return await http.get(this.url);
- }
- }
- },
dept: {
list: {
url: `${config.API_URL}/system/dept/`,
@@ -45,7 +29,7 @@ export default {
delete: {
name: "删除部门",
req: async function(id){
- return await http.delete(`${config.API_URL}/hrm/employee/${id}/`);
+ return await http.delete(`${config.API_URL}/system/employee/${id}/`);
}
}
},
@@ -158,28 +142,71 @@ export default {
},
role: {
list: {
- url: `${config.API_URL}/system/role/list2`,
+ url: `${config.API_URL}/system/role`,
name: "获取角色列表",
- get: async function(params){
- return await http.get(this.url, params);
+ req: async function(data){
+ return await http.get(this.url, data);
}
- }
+ },
+ create: {
+ url: `${config.API_URL}/system/role/`,
+ name: "新增角色",
+ req: async function(data){
+ return await http.post(this.url,data);
+ }
+ },
+ update: {
+ name: "更新角色",
+ req: async function(id, data){
+ return await http.put(
+ `${config.API_URL}/system/role/${id}/`,
+ data
+ );
+ }
+ },
+ delete: {
+ name: "删除菜单权限",
+ req: async function(id){
+ return await http.delete(`${config.API_URL}/system/role/${id}/`);
+ }
+ },
},
-
user: {
list: {
url: `${config.API_URL}/system/user/list`,
name: "获取用户列表",
- get: async function(params){
+ req: async function(params){
return await http.get(this.url, params);
}
- }
+ },
+ create: {
+ url: `${config.API_URL}/system/user/`,
+ name: "新增用户",
+ req: async function(data){
+ return await http.post(this.url,data);
+ }
+ },
+ update: {
+ name: "更新用户",
+ req: async function(id, data){
+ return await http.put(
+ `${config.API_URL}/system/user/${id}/`,
+ data
+ );
+ }
+ },
+ delete: {
+ name: "删除用户",
+ req: async function(id){
+ return await http.delete(`${config.API_URL}/system/user/${id}/`);
+ }
+ },
},
log: {
list: {
url: `${config.API_URL}/system/log/list`,
name: "日志列表",
- get: async function(params){
+ req: async function(params){
return await http.get(this.url, params);
}
}
diff --git a/src/components/scTable/index.vue b/src/components/scTable/index.vue
index aa98796d..5c50b401 100644
--- a/src/components/scTable/index.vue
+++ b/src/components/scTable/index.vue
@@ -314,7 +314,7 @@ export default {
} else {
dataList = response.rows || [];
}
- if(this.$route.path==='/sys/dept'||this.$route.path==='/sys/perm'){
+ if(this.$route.path==='/sys/dept'||this.$route.path==='/ops/menu'){
this.tableData = this.redata(dataList);
debugger;
console.log(this.tableData)
diff --git a/src/config/route.js b/src/config/route.js
index 3d7544e2..4d4b6681 100644
--- a/src/config/route.js
+++ b/src/config/route.js
@@ -230,6 +230,15 @@ const routes = [
},
"component": "am/area"
},
+ {
+ "name": "eqm",
+ "path": "/am/eqm",
+ "meta": {
+ "title": "门禁通道",
+ "icon": "el-icon-menu",
+ },
+ "component": "am/em1"
+ },
]
},
{
diff --git a/src/views/em/em1.vue b/src/views/am/em1.vue
similarity index 100%
rename from src/views/em/em1.vue
rename to src/views/am/em1.vue
diff --git a/src/views/em/index.vue b/src/views/em/index.vue
deleted file mode 100644
index e69de29b..00000000
diff --git a/src/views/ops/menu.vue b/src/views/ops/menu.vue
index e69de29b..6a0537b5 100644
--- a/src/views/ops/menu.vue
+++ b/src/views/ops/menu.vue
@@ -0,0 +1,340 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{types[scope.row.type]}}
+
+
+
+
+
+
+ 编辑
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+ 目录
+ 菜单
+ 按钮
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取 消
+ 保 存
+
+
+
+
+
+
+
diff --git a/src/views/sys/dept.vue b/src/views/sys/dept.vue
index cc2c35cd..66c073b4 100644
--- a/src/views/sys/dept.vue
+++ b/src/views/sys/dept.vue
@@ -52,8 +52,8 @@
-
-
+
+
@@ -96,7 +96,7 @@
addForm: {
id:"",
name: "",
- type: "10",
+ type: "dept",
sort: 1,
parent: "",
},
@@ -193,7 +193,7 @@
//删除
delDept(row){
var id = row.id;
- var res = this.$API.system.deptDel.delete(id);
+ var res = this.$API.system.dept.delete.req(id);
if(res.code == 200){
this.$refs.table.refresh();
this.$message.success("删除成功")
@@ -213,9 +213,9 @@
this.isSaveing = true;
var res;
if(this.type==='add'){
- res = this.$API.system.deptAdd.post(that.addForm);
+ res = this.$API.system.dept.create.req(that.addForm);
}else{
- res = this.$API.system.deptEdit.put(that.addForm.id,that.addForm);
+ res = this.$API.system.dept.update.req(that.addForm.id,that.addForm);
}
this.isSaveing = false;
this.limitedVisible = false;
diff --git a/src/views/sys/role.vue b/src/views/sys/role.vue
index e69de29b..07e97659 100644
--- a/src/views/sys/role.vue
+++ b/src/views/sys/role.vue
@@ -0,0 +1,254 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取 消
+ 保 存
+
+
+
+
+
diff --git a/src/views/sys/user.vue b/src/views/sys/user.vue
index e69de29b..e7eedd54 100644
--- a/src/views/sys/user.vue
+++ b/src/views/sys/user.vue
@@ -0,0 +1,507 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 密码重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查看
+
+ 编辑
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取 消
+ 保 存
+
+
+
+
+
+
+
+