From 2e71de1cec58e26c38cfd40e1997735607412508 Mon Sep 17 00:00:00 2001 From: Yuanjianghong Date: Mon, 6 Sep 2021 11:59:37 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=9A=82=E5=AD=98=E7=9A=84=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/project/class.js | 38 +++ src/views/project/AddClass.vue | 36 --- src/views/project/ProjectList.vue | 23 +- src/views/project/ProjectStepForm.vue | 147 ++++++++++ src/views/project/classAdd/ClassList.vue | 65 +++++ .../project/form/ProjectCourseSelect.vue | 83 +++--- src/views/project/form/ProjectForm.vue | 258 +++++++++--------- src/views/project/form/ProjectStepForm.vue | 72 ----- src/views/project/form/ProjectUnitSelect.vue | 84 +++--- 9 files changed, 464 insertions(+), 342 deletions(-) create mode 100644 src/api/project/class.js delete mode 100644 src/views/project/AddClass.vue create mode 100644 src/views/project/ProjectStepForm.vue create mode 100644 src/views/project/classAdd/ClassList.vue delete mode 100644 src/views/project/form/ProjectStepForm.vue diff --git a/src/api/project/class.js b/src/api/project/class.js new file mode 100644 index 0000000..cac2709 --- /dev/null +++ b/src/api/project/class.js @@ -0,0 +1,38 @@ +import request from '@/utils/request' + +const classApi = { + get: '/project/species/get', + add: '/project/species/add', + del: '/project/species/del', + list: '/project/species/pageList' +} + +export function classAdd(params) { + return request({ + url: classApi.add, + method: 'post', + data: params + }) +} +export function classGet(params) { + return request({ + url: classApi.getDict, + method: 'get', + params: params + }) +} +export function classDel (params) { + return request({ + url: classApi.get, + method: 'delete', + data: params + }) +} +export function classList(params) { + console.log("------------{}", params) + return request({ + url: classApi.list, + method: 'get', + params: params + }) +} diff --git a/src/views/project/AddClass.vue b/src/views/project/AddClass.vue deleted file mode 100644 index 036daba..0000000 --- a/src/views/project/AddClass.vue +++ /dev/null @@ -1,36 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/views/project/ProjectList.vue b/src/views/project/ProjectList.vue index d8bd0cc..414113b 100644 --- a/src/views/project/ProjectList.vue +++ b/src/views/project/ProjectList.vue @@ -38,9 +38,9 @@ 重置 - - 新建 - 删除 + + 新增项目 + 删除项目 + @@ -75,16 +76,12 @@ import moment from 'moment' import { STable } from '@/components' import { getProjectList } from '@/api/project/project' -import ProjectForm from '@/views/project/form/ProjectForm' -import router from '@/router/index.js' +import projectStepForm from './ProjectStepForm' export default { - name: 'ProjectList', - props: {}, components: { STable, - ProjectForm, - router, + projectStepForm, }, data() { return { @@ -153,10 +150,10 @@ export default { methods: { // 增 handledCreate() { - return this.$router.push( - // {name: 'ProjectForm'} - { path: 'project/project/add' } - ) + // return this.$router.push( + // // {name: 'ProjectForm'} + // { path: 'project/project/add' } + // ) // router.push() }, diff --git a/src/views/project/ProjectStepForm.vue b/src/views/project/ProjectStepForm.vue new file mode 100644 index 0000000..89ee36e --- /dev/null +++ b/src/views/project/ProjectStepForm.vue @@ -0,0 +1,147 @@ + + + + + diff --git a/src/views/project/classAdd/ClassList.vue b/src/views/project/classAdd/ClassList.vue new file mode 100644 index 0000000..8c7e439 --- /dev/null +++ b/src/views/project/classAdd/ClassList.vue @@ -0,0 +1,65 @@ + + + + + \ No newline at end of file diff --git a/src/views/project/form/ProjectCourseSelect.vue b/src/views/project/form/ProjectCourseSelect.vue index 8d6824f..08aee42 100644 --- a/src/views/project/form/ProjectCourseSelect.vue +++ b/src/views/project/form/ProjectCourseSelect.vue @@ -1,49 +1,42 @@ diff --git a/src/views/project/form/ProjectStepForm.vue b/src/views/project/form/ProjectStepForm.vue deleted file mode 100644 index 745058b..0000000 --- a/src/views/project/form/ProjectStepForm.vue +++ /dev/null @@ -1,72 +0,0 @@ - - - - - diff --git a/src/views/project/form/ProjectUnitSelect.vue b/src/views/project/form/ProjectUnitSelect.vue index 9101380..cecb7b8 100644 --- a/src/views/project/form/ProjectUnitSelect.vue +++ b/src/views/project/form/ProjectUnitSelect.vue @@ -1,49 +1,47 @@ From d9b743f4df7b4cf5d89785a0fbd518dbe7e0da7a Mon Sep 17 00:00:00 2001 From: "aoli.qu" <408346101@qq.com> Date: Mon, 6 Sep 2021 12:39:58 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=9D=83=E9=99=90?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/BasicLayout.vue | 6 ++++++ src/store/getters.js | 2 +- src/utils/permissions.js | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/layouts/BasicLayout.vue b/src/layouts/BasicLayout.vue index 67679aa..5ea4987 100644 --- a/src/layouts/BasicLayout.vue +++ b/src/layouts/BasicLayout.vue @@ -120,4 +120,10 @@ export default { diff --git a/src/store/getters.js b/src/store/getters.js index b83c4f4..a65fb87 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -5,7 +5,7 @@ const getters = { color: state => state.app.color, token: state => state.user.token, avatar: state => state.user.avatar, - nickname: state => state.user.name, + name: state => state.user.name, welcome: state => state.user.welcome, roles: state => state.user.roles, buttons: state => state.user.buttons, diff --git a/src/utils/permissions.js b/src/utils/permissions.js index 768f921..83b0bb1 100644 --- a/src/utils/permissions.js +++ b/src/utils/permissions.js @@ -14,8 +14,8 @@ export function actionToObject (json) { */ export function hasBtnPermission (permission) { const myBtns = store.getters.buttons - const nickname = store.getters.nickname - if (nickname == '超级管理员') { + const name = store.getters.name + if (name == 'admin') { return true } return myBtns.indexOf(permission) > -1 From 2d96581ee0dc566ba2a9c6b0b205788f311cf333 Mon Sep 17 00:00:00 2001 From: "aoli.qu" <408346101@qq.com> Date: Wed, 8 Sep 2021 15:10:14 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BA=BA=E5=91=98=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E5=8D=95=E4=BD=8D=E7=AE=A1=E7=90=86=E5=8A=9F=E8=83=BD=E5=BC=80?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/org/org.js | 45 ++++++ src/layouts/BasicLayout.less | 6 + src/layouts/BasicLayout.vue | 2 +- src/views/org/OrgForm.vue | 205 +++++++++++++++++++++++++++ src/views/org/OrgList.vue | 198 ++++++++++++++++++++++++++ src/views/role/RoleList.vue | 168 ---------------------- src/views/security/menu/MenuForm.vue | 1 - 7 files changed, 455 insertions(+), 170 deletions(-) create mode 100644 src/api/org/org.js create mode 100644 src/views/org/OrgForm.vue create mode 100644 src/views/org/OrgList.vue delete mode 100644 src/views/role/RoleList.vue diff --git a/src/api/org/org.js b/src/api/org/org.js new file mode 100644 index 0000000..0751f08 --- /dev/null +++ b/src/api/org/org.js @@ -0,0 +1,45 @@ +import request from '@/utils/request' + +const orgApi = { + add: 'sys/org/add', + edit: 'sys/org/edit', + del: 'sys/org/del', + list: 'sys/org/list', + page: 'sys/org/pageList', +} + +export function orgAdd (params) { + return request({ + url: orgApi.add, + method: 'post', + data: params + }) +} +export function orgEdit (params) { + return request({ + url: orgApi.edit, + method: 'post', + data: params + }) +} +export function orgDel (params) { + return request({ + url: orgApi.del, + method: 'post', + params: params + }) +} +export function orgList (params) { + return request({ + url: orgApi.list, + method: 'get', + params: params + }) +} +export function orgPage (params) { + return request({ + url: orgApi.page, + method: 'get', + params: params + }) +} diff --git a/src/layouts/BasicLayout.less b/src/layouts/BasicLayout.less index a0762ec..371f01a 100644 --- a/src/layouts/BasicLayout.less +++ b/src/layouts/BasicLayout.less @@ -34,3 +34,9 @@ } } +.ant-layout-sider { + flex: 0 0 230px !important; + max-width: 230px !important; + min-width: 230px !important; + width: 230px !important; +} diff --git a/src/layouts/BasicLayout.vue b/src/layouts/BasicLayout.vue index 5ea4987..5b6cce9 100644 --- a/src/layouts/BasicLayout.vue +++ b/src/layouts/BasicLayout.vue @@ -123,7 +123,7 @@ export default { /*隐藏原本的图标*/ .ant-pro-global-header-trigger{ - display: none; + display: none; } diff --git a/src/views/org/OrgForm.vue b/src/views/org/OrgForm.vue new file mode 100644 index 0000000..de7fc6a --- /dev/null +++ b/src/views/org/OrgForm.vue @@ -0,0 +1,205 @@ + + + diff --git a/src/views/org/OrgList.vue b/src/views/org/OrgList.vue new file mode 100644 index 0000000..a25c0c9 --- /dev/null +++ b/src/views/org/OrgList.vue @@ -0,0 +1,198 @@ + + + diff --git a/src/views/role/RoleList.vue b/src/views/role/RoleList.vue deleted file mode 100644 index 024aa84..0000000 --- a/src/views/role/RoleList.vue +++ /dev/null @@ -1,168 +0,0 @@ - - - - - diff --git a/src/views/security/menu/MenuForm.vue b/src/views/security/menu/MenuForm.vue index d75067d..013e5ad 100644 --- a/src/views/security/menu/MenuForm.vue +++ b/src/views/security/menu/MenuForm.vue @@ -67,7 +67,6 @@ :dropdownStyle="{ maxHeight: '300px', overflow: 'auto' }" :treeData="menuTreeData" placeholder="请选择父级菜单" - treeDefaultExpandAll :replaceFields="{ children:'children', title:'name', From fc77d32c229ff34423ac2c91678c0b7c0bea7957 Mon Sep 17 00:00:00 2001 From: "aoli.qu" <408346101@qq.com> Date: Wed, 8 Sep 2021 17:29:09 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E7=BB=84=E7=BB=87=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/org/OrgList.vue | 140 +++++++++++++------------------------- 1 file changed, 46 insertions(+), 94 deletions(-) diff --git a/src/views/org/OrgList.vue b/src/views/org/OrgList.vue index a25c0c9..d76244f 100644 --- a/src/views/org/OrgList.vue +++ b/src/views/org/OrgList.vue @@ -1,42 +1,7 @@