diff --git a/.gitignore b/.gitignore index a547bf3..ee12ca3 100644 --- a/.gitignore +++ b/.gitignore @@ -8,8 +8,8 @@ pnpm-debug.log* lerna-debug.log* node_modules -dist dist-ssr +dist *.local # Editor directories and files diff --git a/src/layout/Header/components/Hamburger.vue b/src/layout/Header/components/Hamburger.vue index d83ee15..4edd750 100644 --- a/src/layout/Header/components/Hamburger.vue +++ b/src/layout/Header/components/Hamburger.vue @@ -32,7 +32,6 @@ const handleLink = (item)=>{ const matched = computed(() => route.matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)); -console.log('======matched=======',matched) diff --git a/src/mock/system.ts b/src/mock/system.ts index fab5e9c..18f21cf 100644 --- a/src/mock/system.ts +++ b/src/mock/system.ts @@ -53,6 +53,132 @@ export const userData =[ ] +export const deptData =[ + { + "id": "0", + "deptName": "华东分部", + "orderNo": 1, + "createTime": "2011-02-25 18:37:39", + "remark": "世上无难事,只要肯登攀", + "status": false, + "children": [{ + "id": "0-0", + "deptName": "研发部", + "orderNo": 1, + "createTime": "1995-10-07 03:22:40", + "remark": "不曾扬帆,何以至远方", + "status": true, + "parentDept": "0" + }, { + "id": "0-1", + "deptName": "市场部", + "orderNo": 2, + "createTime": "1972-06-20 09:33:40", + "remark": "努力到无能为力,拼搏到感动自己", + "status": false, + "parentDept": "0" + }, { + "id": "0-2", + "deptName": "商务部", + "orderNo": 3, + "createTime": "1992-10-31 02:54:45", + "remark": "没有过不了的坎,就怕自己不奋斗", + "status": false, + "parentDept": "0" + }, { + "id": "0-3", + "deptName": "财务部", + "orderNo": 4, + "createTime": "1971-07-06 13:01:49", + "remark": "没有口水与汗水,就没有成功的泪水。", + "status": true, + "parentDept": "0" + }] +}, { + "id": "1", + "deptName": "华南分部", + "orderNo": 2, + "createTime": "1995-12-24 06:36:26", + "remark": "这个世界从来不缺乏机遇,而是缺少抓住机遇的手。", + "status": false, + "children": [{ + "id": "1-0", + "deptName": "研发部", + "orderNo": 1, + "createTime": "2022-05-10 12:44:05", + "remark": "奋斗令我们的生活充满生机,责任让我们的生命充满意义!", + "status": true, + "parentDept": "1" + }, { + "id": "1-1", + "deptName": "市场部", + "orderNo": 2, + "createTime": "2022-07-15 02:53:29", + "remark": "学习之心不可无,懒惰之心不可有。", + "status": true, + "parentDept": "1" + }, + { + "id": "1-2", + "deptName": "商务部", + "orderNo": 3, + "createTime": "2022-08-11 22:44:55", + "remark": "学会等待,学会坚持,成功是一个循序渐进的过程。", + "status": true, + "parentDept": "1" + }, { + "id": "1-3", + "deptName": "财务部", + "orderNo": 4, + "createTime": "2022-10-26 19:38:29", + "remark": "能克服困难的人,可使困难化为良机", + "status": false, + "parentDept": "1" + } + ] +}, { + "id": "2", + "deptName": "西北分部", + "orderNo": 3, + "createTime": "2022-08-27 16:49:21", + "remark": "行为决定性格,性格决定命运", + "status": false, + "children": [{ + "id": "2-0", + "deptName": "研发部", + "orderNo": 1, + "createTime": "2022-12-11 03:49:33", + "remark": "带着自己的梦,以一种骄傲的姿态走下去", + "status": false, + "parentDept": "2" + }, { + "id": "2-1", + "deptName": "市场部", + "orderNo": 2, + "createTime": "2022-06-18 20:15:34", + "remark": "当世界都在说放弃的时候,轻轻的告诉自己:再试一次", + "status": true, + "parentDept": "2" + }, { + "id": "2-2", + "deptName": "商务部", + "orderNo": 3, + "createTime": "2022-07-17 09:37:41", + "remark": "不怕万人阻挡在前方,只怕自己先行投降", + "status": true, + "parentDept": "2" + }, { + "id": "2-3", + "deptName": "财务部", + "orderNo": 4, + "createTime": "2022-11-23 04:34:33", + "remark": "胸怀临云志,莫负少年时", + "status": false, + "parentDept": "2" + }] +}] + + export const roleData =[ { roleName:'超级管理员', diff --git a/src/router/modules/system.ts b/src/router/modules/system.ts index 6cc2862..142390f 100644 --- a/src/router/modules/system.ts +++ b/src/router/modules/system.ts @@ -18,6 +18,12 @@ const systemRouter = [{ name: 'user', meta: { title: '用户管理' , icon: 'MenuIcon'} }, + { + path: 'dept', + component: () => import('@/views/system/dept/index.vue'), + name: 'dept', + meta: { title: '部门管理' , icon: 'MenuIcon'} + }, { path: 'role', component: () => import('@/views/system/role/index.vue'), diff --git a/src/views/login/components/LoginForm.vue b/src/views/login/components/LoginForm.vue index d26679e..7aa9ee3 100644 --- a/src/views/login/components/LoginForm.vue +++ b/src/views/login/components/LoginForm.vue @@ -66,7 +66,7 @@ const rules = reactive({ }) // 表单数据 const ruleForm = reactive({ - username: 'admin', + username: 'vue-admin-perfect', password: '123456', }) diff --git a/src/views/system/dept/components/deptDialog.vue b/src/views/system/dept/components/deptDialog.vue new file mode 100644 index 0000000..d62164c --- /dev/null +++ b/src/views/system/dept/components/deptDialog.vue @@ -0,0 +1,100 @@ + + + + diff --git a/src/views/system/dept/index.scss b/src/views/system/dept/index.scss new file mode 100644 index 0000000..726b612 --- /dev/null +++ b/src/views/system/dept/index.scss @@ -0,0 +1,37 @@ +.header{ + display: flex; + padding: 16px 16px 0px 16px; + margin-bottom: 16px; + border-radius: 4px; + background: white; + box-shadow: 0 0 12px rgb(0 0 0 / 5%); +} +.footer{ + flex: 1; + display: flex; + padding: 16px; + flex-direction: column; + border-radius: 4px; + overflow: hidden; + background: white; + box-shadow: 0 0 12px rgb(0 0 0 / 5%); + position: relative; + box-sizing: border-box; + .util{ + margin-bottom: 15px; + display: flex; + justify-content: flex-end; + flex-shrink: 0; + } + .table-inner{ + flex: 1; + position: relative; + } + .table{ + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100% + } +} diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue new file mode 100644 index 0000000..95b4e0c --- /dev/null +++ b/src/views/system/dept/index.vue @@ -0,0 +1,130 @@ + + + + + diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index 3f4619e..9542a46 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -2,8 +2,8 @@
- - + + 查询 diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index 33093f9..153f392 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -3,7 +3,7 @@
- + 查询 @@ -19,7 +19,9 @@
- + @@ -54,13 +56,13 @@ diff --git a/src/views/system/user/components/userSide.vue b/src/views/system/user/components/userSide.vue new file mode 100644 index 0000000..b0d12cd --- /dev/null +++ b/src/views/system/user/components/userSide.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/src/views/system/user/components/userTable.vue b/src/views/system/user/components/userTable.vue new file mode 100644 index 0000000..da1f20d --- /dev/null +++ b/src/views/system/user/components/userTable.vue @@ -0,0 +1,152 @@ + + + diff --git a/src/views/system/user/index.scss b/src/views/system/user/index.scss index 726b612..c37b378 100644 --- a/src/views/system/user/index.scss +++ b/src/views/system/user/index.scss @@ -1,37 +1,98 @@ -.header{ +.m-user{ display: flex; - padding: 16px 16px 0px 16px; - margin-bottom: 16px; - border-radius: 4px; - background: white; - box-shadow: 0 0 12px rgb(0 0 0 / 5%); + flex-direction: row; } -.footer{ - flex: 1; +.m-user-table{ display: flex; - padding: 16px; flex-direction: column; - border-radius: 4px; - overflow: hidden; - background: white; - box-shadow: 0 0 12px rgb(0 0 0 / 5%); + flex: 1; position: relative; - box-sizing: border-box; - .util{ - margin-bottom: 15px; + width: calc(100% - 230px); + .header{ + display: flex; + padding: 16px 16px 0px 16px; + margin-bottom: 16px; + border-radius: 4px; + background: white; + box-shadow: 0 0 12px rgb(0 0 0 / 5%); + } + .footer{ + flex: 1; + display: flex; + padding: 16px; + flex-direction: column; + border-radius: 4px; + overflow: hidden; + background: white; + box-shadow: 0 0 12px rgb(0 0 0 / 5%); + position: relative; + box-sizing: border-box; + .util{ + margin-bottom: 15px; + display: flex; + justify-content: flex-end; + flex-shrink: 0; + } + .table-inner{ + flex: 1; + position: relative; + } + .table{ + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100% + } + } + .pagination{ + width: 100%; display: flex; justify-content: flex-end; + padding-top: 20px; + box-sizing: border-box; flex-shrink: 0; } - .table-inner{ +} + + +.m-dept-side{ + box-sizing: border-box; + width: 220px; + height: 100%; + padding: 18px; + margin-right: 10px; + flex-shrink: 0; + ::v-deep(.el-card__body){ + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + overflow: hidden; + padding: 0!important; + .el-tree-node__content{ + height: 33px; + } + .el-tree{ + position: absolute; + width: 100%; + height: 100%; + overflow: auto; + } + } + .filter-search{ + flex-shrink: 0; + margin-bottom: 10px; + } + .title{ + flex-shrink: 0; + margin: 0 0 15px; + font-size: 18px; + font-weight: 700; + } + .filter-tree{ flex: 1; + overflow: hidden; position: relative; } - .table{ - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100% - } } diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index a169d08..8a14e5c 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -1,112 +1,14 @@