From 5ce84c9391cda2889aa1543645aa1882725531a0 Mon Sep 17 00:00:00 2001 From: guoxing <1369478551@qq.com> Date: Fri, 16 Jun 2023 11:49:15 +0800 Subject: [PATCH 1/3] 2023-6-16 --- .../yxt-supervise-cyf-ui/.env.development | 2 +- .../src/api/system/Role/role.js | 10 +- .../src/api/system/functional/functional.js | 84 ++ .../src/api/system/menu/index.js | 123 ++ .../src/api/system/postManage/index.js | 78 ++ .../src/api/system/userManage/index.js | 150 +++ .../src/layout/components/Sidebar/index.vue | 1018 ++++++++--------- .../yxt-supervise-cyf-ui/src/router/index.js | 218 +++- .../organizationManage/organizationManage.vue | 660 ----------- .../system/RoleAdminister/RoleAdminister.vue | 853 ++++++++++++++ .../views/system/menuManage/menuManage.vue | 604 ++++++++++ .../organizationManage/organizationManage.vue | 694 +++++++++++ .../views/system/postManage/postManage.vue | 505 ++++++++ .../views/system/userManage/userManage.vue | 65 ++ .../views/system/userManage/userManageAdd.vue | 267 +++++ .../system/userManage/userManageList.vue | 483 ++++++++ 16 files changed, 4581 insertions(+), 1233 deletions(-) create mode 100644 yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/system/functional/functional.js create mode 100644 yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/system/menu/index.js create mode 100644 yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/system/postManage/index.js create mode 100644 yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/system/userManage/index.js delete mode 100644 yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/organizationManage/organizationManage.vue create mode 100644 yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/RoleAdminister/RoleAdminister.vue create mode 100644 yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/menuManage/menuManage.vue create mode 100644 yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/organizationManage/organizationManage.vue create mode 100644 yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/postManage/postManage.vue create mode 100644 yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/userManage/userManage.vue create mode 100644 yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/userManage/userManageAdd.vue create mode 100644 yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/userManage/userManageList.vue diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/.env.development b/yxt-supervise-cyf/yxt-supervise-cyf-ui/.env.development index b2378694..92737652 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/.env.development +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/.env.development @@ -9,5 +9,5 @@ VUE_APP_BASE_API = '/api' # VUE_APP_URL = "http://192.168.1.105:7101" - VUE_APP_URL = "http://192.168.1.107:7101" + VUE_APP_URL = "http://192.168.1.193:7101" ##VUE_APP_URL = "http://8.130.39.13:8112" diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/system/Role/role.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/system/Role/role.js index 7eb16f31..29fb1857 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/system/Role/role.js +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/system/Role/role.js @@ -1,6 +1,6 @@ import request from '@/utils/request' import qs from 'qs' -const tokens = window.sessionStorage.getItem('token') +const tokens = window.sessionStorage.getItem('tokenValue') // export function rolemenus(data) { return request({ @@ -14,7 +14,7 @@ export function rolemenus(data) { export function getrolemenus(data) { return request({ baseURL: '/api', - url: '/portal/v1/sysmenu/sourcemenutree', + url: '/cyf/sysmenu/sourcemenutree', method: 'POST', async: false, // data: {userSid: data.userSid, sourceSid: '000011'}, @@ -36,12 +36,12 @@ export function sourcesofrole(data) { // 根据token值获取登录后的用户信息 export function loginDetails(data) { return request({ - baseURL: '/api', - url: '/portal/v1/sysuser/loginDetails', + url: '/cyf/sysuser/loginDetails', method: 'post', data: data, headers: { - 'Content-Type': 'application/json' + 'Content-Type': 'application/json', + 'token': tokens } }) } diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/system/functional/functional.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/system/functional/functional.js new file mode 100644 index 00000000..b684a99d --- /dev/null +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/system/functional/functional.js @@ -0,0 +1,84 @@ +import request from '@/utils/request' +import qs from 'qs' +//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMDI3MDA3fQ.9bEgBzFW2g1CUT7s5VXxhNCa10cyU_WTCFeqpQje0iY' +let tokens = window.sessionStorage.getItem('token'); +//获取菜单 分页列表 +export function pageList(data) { + return request({ + url: '/cyf/sysfunction/listAllVoForSource', + method: 'POST', + data: data, + headers: {'Content-Type': 'application/json', + 'token':tokens + } + }) +} + +//新增 +export function savePost(data) { + return request({ + url: '/cyf/sysfunction/save', + method: 'POST', + data: data, + headers: {'Content-Type': 'application/json', + 'token':tokens + } + }) +} + +//模块名称 +export function sourceList(data) { + return request({ + url: '/cyf/syssource/listAll', + method: 'POST', + data: data, + headers: {'Content-Type': 'application/json', + 'token':tokens + } + }) +} +// 删除 +export function delOrgroles(data) { + return request({ + url: '/cyf/sysfunction/delBySids/'+ data.sid, + method: 'get', + data: data, + headers: {'Content-Type': 'application/json', + 'token':tokens + } + }) +} + +// 修改 +export function getSingleData(data){ + return request({ + url: '/cyf/sysfunction/fetchBySid/'+data.id, + method: 'get', + data: data, + headers: {'Content-Type': 'application/json', + 'token':tokens + } + }) +} +export function putOrgroles(data){ + return request({ + url: '/cyf/sysfunction/update/' +data.sid, + method: 'POST', + data: data, + headers: {'Content-Type': 'application/json', + 'token':tokens + } + }) +} + +// 功能是否可用状态 +export function IsEnable(data){ + return request({ + url: '/cyf/sysfunction/updateIsEnable/' +data.sid+'/'+data.isEnable, + method: 'POST', + data: data, + headers: {'Content-Type': 'application/json', + 'token':tokens + } + }) +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/system/menu/index.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/system/menu/index.js new file mode 100644 index 00000000..ce39e2d4 --- /dev/null +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/system/menu/index.js @@ -0,0 +1,123 @@ +import request from '@/utils/request' +import qs from 'qs' +//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMDI3MDA3fQ.9bEgBzFW2g1CUT7s5VXxhNCa10cyU_WTCFeqpQje0iY' + +let tokens = window.sessionStorage.getItem('token'); + +// //获取菜单 分页列表 +// export function pageList(data) { +// return request({ +// url: '/cyf/sysmenu/listAllVoForSource', +// method: 'POST', +// data: data, +// headers: { +// 'Content-Type': 'application/json', +// 'token': tokens +// } +// }) +// } + +//获取菜单 分页列表 +export function pageList(data) { + return request({ + url: '/cyf/sysmenu/listAllVoFor', + method: 'POST', + data: data, + headers: { + 'Content-Type': 'application/json', + 'token': tokens + } + }) +} + + +// 新增保存 菜单信息 +export function saveMenusInfo(data) { + return request({ + url: '/cyf/sysmenu/save', + method: 'POST', + data: data, + headers: {'Content-Type': 'application/json'} + }) +} + +// 修改保存 菜单信息 +export function putMenusInfo(data) { + return request({ + url: '/cyf/sysmenu/update/' + data.sid, + method: 'POST', + data: data, + headers: {'Content-Type': 'application/json'} + }) +} + +//根据sid 删除单个 资源信息 +export function delMenus(data) { + return request({ + url: '/cyf/sysmenu/delBySids/' + data.sid, + method: 'get', + data: qs.stringify(data), + headers: { + 'Content-Type': 'application/json', + 'token': tokens + } + }) +} + +// 修改状态 +export function IsEnable(data) { + return request({ + url: '/cyf/sysmenu/updateIsEnable/' + data.sid + '/' + data.isEnable, + method: 'POST', + /* data: qs.stringify(data),*/ + headers: { + 'Content-Type': 'application/json', + 'token': tokens + } + }) +} + + +// 获取菜单 不分页列表 +export function roleList(data) { + return request({ + url: '/system/v1/menus/list', + method: 'post', + data: data, + headers: {'Content-Type': 'application/json'} + }) +} + +//获取菜单 分页列表 +export function menusPageList(data) { + return request({ + url: '/system/v1/menus/pagelist', + method: 'POST', + data: data, + headers: {'Content-Type': 'application/json'} + }) +} + +//获取菜单 树形分页列表 +export function menusTreelist(data) { + return request({ + url: '/system/v1/menus/treelist', + method: 'POST', + data: data, + headers: {'Content-Type': 'application/json'} + }) +} + + +//根据sid 获取单个菜单 信息 +export function getRoleInfo(data) { + return request({ + url: '/system/v1/menus/' + data.sid, + method: 'GET', + data: qs.stringify(data) + }) +} + + + + diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/system/postManage/index.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/system/postManage/index.js new file mode 100644 index 00000000..a18fc25f --- /dev/null +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/system/postManage/index.js @@ -0,0 +1,78 @@ +import request from '@/utils/request' +import qs from 'qs' +//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMTE1MjUwfQ.gtn_mVsbwH6ztl835rWmIY4DxeNmRe_TOt-Q0TdldIE' +let tokens = window.sessionStorage.getItem('token'); +//获取菜单 分页列表 +export function pageList(data) { + return request({ + url: '/cyf/syspost/listPage', + method: 'POST', + data: data, + headers: {'Content-Type': 'application/json', + 'token':tokens + } + }) +} + +// 查询部门列表 +export function orgList(data){ + return request({ + url: '/cyf/sysorganization/list', + method: 'get', + data: data, + headers: {'Content-Type': 'application/json', + 'token':tokens + } + }) +} +// 新增 +export function savePost(data){ + return request({ + url: '/cyf/syspost/save', + method: 'POST', + data: data, + headers: {'Content-Type': 'application/json', + 'token':tokens + } + }) +} +// 修改 +export function putOrgroles(data){ + return request({ + url: '/cyf/syspost/update/' +data.sid, + method: 'POST', + data: data, + headers: {'Content-Type': 'application/json', + 'token':tokens + } + }) +} + +// 删除 +export function delOrgroles(data){ + return request({ + url: '/cyf/syspost/delBySids/' + data.sids, + method: 'get', + data: data, + headers: {'Content-Type': 'application/json', + 'token':tokens + } + }) +} + +export function pullDown(data){ + return request({ + url: '/cyf/dictcommon/typeValues', + method: 'get', + params: data + }) +} + +// 查询岗位列表 +export function selectList(data){ + return request({ + url: '/cyf/syspost/selectList', + method: 'get', + params: data + }) +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/system/userManage/index.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/system/userManage/index.js new file mode 100644 index 00000000..0fc0cf62 --- /dev/null +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/system/userManage/index.js @@ -0,0 +1,150 @@ +import request from '@/utils/request' +import qs from 'qs' +// 用户列表 +//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjI5OTQxNjI1fQ.aOFOz0h7c8YQs-ti2GLpqeWu4AE9mifx_043hLJQf8g' +let tokens = window.sessionStorage.getItem('token'); +export function userList(data){ + return request({ + url: '/cyf/sys/listPage', + method: 'post', + data: data, + headers: {'Content-Type': 'application/json', + 'token':tokens + } + }) +} +// 新增 +export function userAdd(data){ + return request({ + url: '/cyf/sys/save', + method: 'post', + data: data, + headers: {'Content-Type': 'application/json', + 'token':tokens + } + }) +} +// 更新 +export function userUpdata(data){ + return request({ + url: '/cyf/sys/update/' +data.sid, + method: 'post', + data: data, + headers: {'Content-Type': 'application/json', + 'token':tokens + } + }) +} + +// 删除 +export function delUser(data){ + return request({ + url: '/cyf/sys/delBySid/' +data.sid, + method: 'get', + data: data, + headers: {'Content-Type': 'application/json', + 'token':tokens + } + }) +} +// 初始化密码 +export function initPwd(data){ + return request({ + url: '/cyf/sys/initPwd/' +data.sid, + method: 'post', + data: data, + headers: {'Content-Type': 'application/json', + 'token':tokens + } + }) +} +// 根据sid查询一条信息 +export function userSingle(data){ + return request({ + url: '/cyf/sys/fetchBySid/' +data.sid, + method: 'get', + data: data, + headers: {'Content-Type': 'application/json', + 'token':tokens + } + }) +} +// 单条用户的角色列表 +export function setRole(data){ + return request({ + url: '/cyf/sysrole/listAllByUserSid/' +data.sid, + method: 'post', + data: data, + headers: {'Content-Type': 'application/json', + 'token':tokens + } + }) +} +// 角色列表 +export function saveOrgRole(data){ + return request({ + url: '/cyf/sysuserrole/update', + method: 'post', + data: data, + headers: {'Content-Type': 'application/json', + 'token':tokens + } + }) +} +// 查询角色列表 +export function roleList(data){ + return request({ + url: '/cyf/sysrole/listAll', + method: 'post', + data: data, + headers: {'Content-Type': 'application/json', + 'token':tokens + } + }) +} +// 查询部门列表 +export function orgList(data){ + return request({ + url: '/cyf/sysorganization/list', + method: 'get', + data: data, + headers: {'Content-Type': 'application/json', + 'token':tokens + } + }) +} +// 查询岗位列表 +export function postList(data){ + return request({ + url: '/cyf/syspost/fetchByOrgSid/'+data.sid, + method: 'get', + data: data, + headers: {'Content-Type': 'application/json', + 'token':tokens + } + }) +} + +// 获取验证码 +export function getCode(data){ + return request({ + url: '/cyf/sys/sendMessageCode/'+data.phone, + method: 'get', + data: data, + headers: {'Content-Type': 'application/json', + 'token':tokens + } + }) +} + +// 设置是否可用:isEnable:1可用,0不可用 +export function setRoleEnable(data) { + return request({ + url: '/cyf/sys/setIsEnable/' + data.sid + '/' + data.isEnable, + method: 'post', + data: data, + headers: { + 'Content-Type': 'application/json' + } + }) +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/layout/components/Sidebar/index.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/layout/components/Sidebar/index.vue index 61666b03..3fd3c6ea 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/layout/components/Sidebar/index.vue +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/layout/components/Sidebar/index.vue @@ -39,553 +39,511 @@ userSid: "", }, routes: [ - { - alwaysShow: true, - component: "business", - meta: { - icon: "el-icon-menu", - title: "业务流转", - }, - name: "", - path: "/business", - children: [{ - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "原油进销管理", - }, - name: "/business/oilTypeProcure", - path: "/business/oilTypeProcure", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "原料进销管理", - }, - name: "/business/rawMaterialProcure", - path: "/business/rawMaterialProcure", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "包装物进销管理", - }, - name: "/business/packagProcure", - path: "/business/packagProcure", - }, - ], - }, - { - alwaysShow: true, - component: "supervise", - meta: { - icon: "el-icon-menu", - title: "库房登记", - }, - name: "", - path: "/supervise", - children: [{ - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "油罐库存登记", - }, - name: "/supervise/recordOilTank", - path: "/supervise/recordOilTank", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "原油入库登记", - }, - name: "/supervise/oilTypeInBound", - path: "/supervise/oilTypeInBound", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "原油出库登记", - }, - name: "/supervise/oilTypeOutBound", - path: "/supervise/oilTypeOutBound", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "原料入库登记", - }, - name: "/supervise/rawMaterialInBound", - path: "/supervise/rawMaterialInBound", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "原料出库登记", - }, - name: "/supervise/rawMaterialOutBound", - path: "/supervise/rawMaterialOutBound", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "原料盘库登记", - }, - name: "/supervise/rawMaterialInventory", - path: "/supervise/rawMaterialInventory", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "包装物入库登记", - }, - name: "/supervise/packagInBound", - path: "/supervise/packagInBound", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "包装物出库登记", - }, - name: "/supervise/packagOutBound", - path: "/supervise/packagOutBound", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "包装物盘库登记", - }, - name: "/supervise/packagInventory", - path: "/supervise/packagInventory", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "成品入库登记", - }, - name: "/supervise/EnterRegister", - path: "/supervise/EnterRegister", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "成品出库登记", - }, - name: "/supervise/OutRegister", - path: "/supervise/OutRegister", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "成品库存登记", - }, - name: "/supervise/becomeOil", - path: "/supervise/becomeOil", - }, - ], - }, - { - alwaysShow: true, - component: "inventory", - meta: { - icon: "el-icon-menu", - title: "库存管理", - }, - name: "", - path: "/inventory", - children: [{ - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "油罐登记库存记录", - }, - name: "/inventory/oilTankList", - path: "/inventory/oilTankList", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "原油入库记录", - }, - name: "/inventory/oilTypeInBoundList", - path: "/inventory/oilTypeInBoundList", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "原油出库记录", - }, - name: "/inventory/oilTypeOutBoundList", - path: "/inventory/oilTypeOutBoundList", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "油罐库存信息", - }, - name: "/inventory/oilTankInfo", - path: "/inventory/oilTankInfo", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "原料入库记录", - }, - name: "/inventory/rawMaterialInBoundList", - path: "/inventory/rawMaterialInBoundList", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "原料出库记录", - }, - name: "/inventory/rawMaterialOutBoundList", - path: "/inventory/rawMaterialOutBoundList", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "原料盘库记录", - }, - name: "/inventory/rawMaterialInventoryList", - path: "/inventory/rawMaterialInventoryList", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "包装物入库记录", - }, - name: "/inventory/packagInBoundList", - path: "/inventory/packagInBoundList", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "包装物出库记录", - }, - name: "/inventory/packagOutBoundList", - path: "/inventory/packagOutBoundList", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "包装物盘库记录", - }, - name: "/inventory/packagInventoryList", - path: "/inventory/packagInventoryList", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "成品入库记录", - }, - name: "/inventory/EnterRecord", - path: "/inventory/EnterRecord", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "成品出库记录", - }, - name: "/inventory/OutRecord", - path: "/inventory/OutRecord", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "商品盘库记录", - }, - name: "/inventory/shopRecord", - path: "/inventory/shopRecord", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "成品库存记录", - }, - name: "/inventory/oilBecome", - path: "/inventory/oilBecome", - }, - ], - }, - { - alwaysShow: true, - component: "baseInfo", - meta: { - icon: "el-icon-menu", - title: "基础信息", - }, - name: "", - path: "/baseInfo", - children: [{ - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "原料类型", - }, - name: "/baseInfo/materialType", - path: "/baseInfo/materialType", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "原料信息", - }, - name: "/baseInfo/materialInfo", - path: "/baseInfo/materialInfo", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "包装物类型", - }, - name: "/baseInfo/packagType", - path: "/baseInfo/packagType", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "包装物信息", - }, - name: "/baseInfo/packagInfo", - path: "/baseInfo/packagInfo", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "原油类型", - }, - name: "/baseInfo/oilType", - path: "/baseInfo/oilType", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "油罐信息", - }, - name: "/baseInfo/oilTank", - path: "/baseInfo/oilTank", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "流量仪器", - }, - name: "/baseInfo/flowInstrument", - path: "/baseInfo/flowInstrument", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "供应商信息", - }, - name: "/baseInfo/supplier", - path: "/baseInfo/supplier", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "商品品牌", - }, - name: "/baseInfo/commodityBrand", - path: "/baseInfo/commodityBrand", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "商品类别", - }, - name: "/baseInfo/commodityFily", - path: "/baseInfo/commodityFily", - }, - { - alwaysShow: true, - component: "index", - meta: { - icon: "el-icon-help", - title: "成品油库存", - }, - name: "/baseInfo/becomeoil", - path: "/baseInfo/becomeoil", - }, - ], - }, - - - { - alwaysShow: true, - component: "organizationManage", - meta: { - icon: "el-icon-menu", - title: "组织管理", - }, - name: "/organizationManage", - path: "/organizationManage", - - }, - // { - // alwaysShow: true, - // component: 'index', - // meta: { - // icon: "el-icon-menu", - // title: "项目列表" - // }, - // name: "/project/index", - // path: "/project/index" - // }, - // { // alwaysShow: true, - // component: 'index', + // component: "business", // meta: { // icon: "el-icon-menu", - // title: "原料类型" + // title: "业务流转", // }, - // name: "/rawMaterialType/index", - // path: "/rawMaterialType/index" - // }, { - // alwaysShow: true, - // component: 'index', - // meta: { - // icon: "el-icon-menu", - // title: "原料信息" - // }, - // name: "/rawMaterialInfo/index", - // path: "/rawMaterialInfo/index" - // }, { - // alwaysShow: true, - // component: 'index', - // meta: { - // icon: "el-icon-menu", - // title: "原油类型" - // }, - // name: "/oilType/index", - // path: "/oilType/index" + // name: "", + // path: "/business", + // children: [{ + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "原油进销管理", + // }, + // name: "/business/oilTypeProcure", + // path: "/business/oilTypeProcure", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "原料进销管理", + // }, + // name: "/business/rawMaterialProcure", + // path: "/business/rawMaterialProcure", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "包装物进销管理", + // }, + // name: "/business/packagProcure", + // path: "/business/packagProcure", + // }, + // ], // }, // { // alwaysShow: true, - // component: 'index', + // component: "supervise", // meta: { // icon: "el-icon-menu", - // title: "油罐信息" + // title: "库房登记", // }, - // name: "/oilTank/index", - // path: "/oilTank/index" + // name: "", + // path: "/supervise", + // children: [{ + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "油罐库存登记", + // }, + // name: "/supervise/recordOilTank", + // path: "/supervise/recordOilTank", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "原油入库登记", + // }, + // name: "/supervise/oilTypeInBound", + // path: "/supervise/oilTypeInBound", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "原油出库登记", + // }, + // name: "/supervise/oilTypeOutBound", + // path: "/supervise/oilTypeOutBound", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "原料入库登记", + // }, + // name: "/supervise/rawMaterialInBound", + // path: "/supervise/rawMaterialInBound", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "原料出库登记", + // }, + // name: "/supervise/rawMaterialOutBound", + // path: "/supervise/rawMaterialOutBound", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "原料盘库登记", + // }, + // name: "/supervise/rawMaterialInventory", + // path: "/supervise/rawMaterialInventory", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "包装物入库登记", + // }, + // name: "/supervise/packagInBound", + // path: "/supervise/packagInBound", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "包装物出库登记", + // }, + // name: "/supervise/packagOutBound", + // path: "/supervise/packagOutBound", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "包装物盘库登记", + // }, + // name: "/supervise/packagInventory", + // path: "/supervise/packagInventory", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "成品入库登记", + // }, + // name: "/supervise/EnterRegister", + // path: "/supervise/EnterRegister", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "成品出库登记", + // }, + // name: "/supervise/OutRegister", + // path: "/supervise/OutRegister", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "成品库存登记", + // }, + // name: "/supervise/becomeOil", + // path: "/supervise/becomeOil", + // }, + // ], // }, // { // alwaysShow: true, - // component: 'index', + // component: "inventory", // meta: { // icon: "el-icon-menu", - // title: "流量仪器" + // title: "库存管理", // }, - // name: "/flowInstrument/index", - // path: "/flowInstrument/index" + // name: "", + // path: "/inventory", + // children: [{ + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "油罐登记库存记录", + // }, + // name: "/inventory/oilTankList", + // path: "/inventory/oilTankList", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "原油入库记录", + // }, + // name: "/inventory/oilTypeInBoundList", + // path: "/inventory/oilTypeInBoundList", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "原油出库记录", + // }, + // name: "/inventory/oilTypeOutBoundList", + // path: "/inventory/oilTypeOutBoundList", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "油罐库存记录", + // }, + // name: "/inventory/oilTankInfo", + // path: "/inventory/oilTankInfo", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "原料入库记录", + // }, + // name: "/inventory/rawMaterialInBoundList", + // path: "/inventory/rawMaterialInBoundList", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "原料出库记录", + // }, + // name: "/inventory/rawMaterialOutBoundList", + // path: "/inventory/rawMaterialOutBoundList", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "原料盘库记录", + // }, + // name: "/inventory/rawMaterialInventoryList", + // path: "/inventory/rawMaterialInventoryList", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "包装物入库记录", + // }, + // name: "/inventory/packagInBoundList", + // path: "/inventory/packagInBoundList", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "包装物出库记录", + // }, + // name: "/inventory/packagOutBoundList", + // path: "/inventory/packagOutBoundList", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "包装物盘库记录", + // }, + // name: "/inventory/packagInventoryList", + // path: "/inventory/packagInventoryList", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "成品入库记录", + // }, + // name: "/inventory/EnterRecord", + // path: "/inventory/EnterRecord", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "成品出库记录", + // }, + // name: "/inventory/OutRecord", + // path: "/inventory/OutRecord", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "商品盘库记录", + // }, + // name: "/inventory/shopRecord", + // path: "/inventory/shopRecord", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "成品库存记录", + // }, + // name: "/inventory/oilBecome", + // path: "/inventory/oilBecome", + // }, + // ], // }, // { // alwaysShow: true, - // component: 'index', + // component: "baseInfo", // meta: { // icon: "el-icon-menu", - // title: "原油出入库记录" + // title: "基础信息", // }, - // name: "/oilTypeInAndOutBound/index", - // path: "/oilTypeInAndOutBound/index" + // name: "", + // path: "/baseInfo", + // children: [{ + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "原料类型", + // }, + // name: "/baseInfo/materialType", + // path: "/baseInfo/materialType", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "原料信息", + // }, + // name: "/baseInfo/materialInfo", + // path: "/baseInfo/materialInfo", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "包装物类型", + // }, + // name: "/baseInfo/packagType", + // path: "/baseInfo/packagType", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "包装物信息", + // }, + // name: "/baseInfo/packagInfo", + // path: "/baseInfo/packagInfo", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "原油类型", + // }, + // name: "/baseInfo/oilType", + // path: "/baseInfo/oilType", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "油罐信息", + // }, + // name: "/baseInfo/oilTank", + // path: "/baseInfo/oilTank", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "流量仪器", + // }, + // name: "/baseInfo/flowInstrument", + // path: "/baseInfo/flowInstrument", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "供应商信息", + // }, + // name: "/baseInfo/supplier", + // path: "/baseInfo/supplier", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "商品品牌", + // }, + // name: "/baseInfo/commodityBrand", + // path: "/baseInfo/commodityBrand", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "商品类别", + // }, + // name: "/baseInfo/commodityFily", + // path: "/baseInfo/commodityFily", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "成品油库存", + // }, + // name: "/baseInfo/becomeoil", + // path: "/baseInfo/becomeoil", + // }, + // ], // }, // { // alwaysShow: true, - // component: 'index', + // component: "system", // meta: { // icon: "el-icon-menu", - // title: "原料出入库记录" + // title: "系统管理", // }, - // name: "/rawMaterialInAndOutBound/index", - // path: "/rawMaterialInAndOutBound/index" - // }, + // name: "", + // path: "/system", + // children: [{ + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "组织管理", + // }, + // name: "/system/organizationManage", + // path: "/system/organizationManage", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "用户管理", + // }, + // name: "/system/userManage", + // path: "/system/userManage", + // }, + // { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "角色管理", + // }, + // name: "/system/RoleAdminister", + // path: "/system/RoleAdminister", + // }, { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "岗位管理", + // }, + // name: "/system/postManage", + // path: "/system/postManage", + // }, { + // alwaysShow: true, + // component: "index", + // meta: { + // icon: "el-icon-help", + // title: "菜单管理", + // }, + // name: "/system/menuManage", + // path: "/system/menuManage", + // } + // ] - // { - // alwaysShow: true, - // component: 'index', - // meta: { - // icon: "el-icon-menu", - // title: "项目列表" - // }, - // name: "/project/index", - // path: "/project/index" // }, + ], }; }, @@ -624,7 +582,19 @@ methods: { // 获取用户信息 postHuoquyonghu() { - // var token = getStorage() + var sid = window.sessionStorage.getItem('sid') + this.params.userSid = sid + getrolemenus(this.params).then((res) => { + const userRoles = this.resRouter(res.data) + this.routes.push({ + path: "*", + redirect: "/404", + hidden: true, + }); + console.log("左侧菜单", this.routes); + return this.routes; + }) + // loginDetails(token).then((response) => { // console.log('resss', response) // if (response.code === '200') { @@ -632,13 +602,13 @@ // this.params.userSid = this.YongHuid.sid // getrolemenus(this.params).then((res) => { // const userRoles = this.resRouter(res.data) - this.routes.push({ - path: "*", - redirect: "/404", - hidden: true, - }); - console.log("左侧菜单", this.routes); - return this.routes; + // this.routes.push({ + // path: "*", + // redirect: "/404", + // hidden: true, + // }); + // console.log("左侧菜单", this.routes); + // return this.routes; // }) // } // }) diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js index 781d7b75..4f9c4e6f 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js @@ -62,23 +62,23 @@ export const constantRoutes = [{ } }, { - path: '/business/rawMaterialProcure', - component: () => - import('@/views/business/rawMaterialProcure/index.vue'), - name: 'index', - meta: { - title: '原料进销管理' - } - }, - { - path: '/business/packagProcure', - component: () => - import('@/views/business/packagProcure/index.vue'), - name: 'index', - meta: { - title: '包装物进销管理' - } - }, + path: '/business/rawMaterialProcure', + component: () => + import('@/views/business/rawMaterialProcure/index.vue'), + name: 'index', + meta: { + title: '原料进销管理' + } + }, + { + path: '/business/packagProcure', + component: () => + import('@/views/business/packagProcure/index.vue'), + name: 'index', + meta: { + title: '包装物进销管理' + } + }, ] }, @@ -312,14 +312,6 @@ export const constantRoutes = [{ title: '库存管理' }, children: [{ - path: '/inventory/oilTankInfo', - component: () => - import('@/views/inventory/oilTankInfo/index.vue'), - name: 'index', - meta: { - title: '油罐库存信息' - } - }, { path: '/inventory/oilTankList', component: () => import('@/views/inventory/oilTankList/index.vue'), @@ -345,14 +337,22 @@ export const constantRoutes = [{ title: '原油出库记录' } }, - + { + path: '/inventory/oilTankInfo', + component: () => + import('@/views/inventory/oilTankInfo/index.vue'), + name: 'index', + meta: { + title: '油罐库存记录' + } + }, { path: '/inventory/rawMaterialInBoundList', component: () => import('@/views/inventory/rawMaterialInBoundList/index.vue'), name: 'index', meta: { - title: '原料入库登记' + title: '原料入库记录' } }, { @@ -361,7 +361,7 @@ export const constantRoutes = [{ import('@/views/inventory/rawMaterialOutBoundList/index.vue'), name: 'index', meta: { - title: '原料出库登记' + title: '原料出库记录' } }, { @@ -370,7 +370,7 @@ export const constantRoutes = [{ import('@/views/inventory/rawMaterialInventoryList/index.vue'), name: 'index', meta: { - title: '原料盘库登记' + title: '原料盘库记录' } }, { @@ -379,7 +379,7 @@ export const constantRoutes = [{ import('@/views/inventory/packagInBoundList/index.vue'), name: 'index', meta: { - title: '包装物入库登记' + title: '包装物入库记录' } }, { @@ -388,7 +388,7 @@ export const constantRoutes = [{ import('@/views/inventory/packagOutBoundList/index.vue'), name: 'index', meta: { - title: '包装物出库登记' + title: '包装物出库记录' } }, { @@ -397,7 +397,7 @@ export const constantRoutes = [{ import('@/views/inventory/packagInventoryList/index.vue'), name: 'index', meta: { - title: '包装物盘库登记' + title: '包装物盘库记录' } }, { @@ -437,21 +437,153 @@ export const constantRoutes = [{ } }, ] - }, - { - path: '/organizationManage', + }, , { + path: '/system', component: Layout, - redirect: '/organizationManage', + redirect: null, + meta: { + title: '系统设置' + }, children: [{ - path: '/organizationManage', - component: () => - import('@/views/organizationManage/organizationManage.vue'), - name: 'organizationManage', - meta: { - title: '组织管理' + path: '/system/organizationManage', + component: () => + import('@/views/system/organizationManage/organizationManage.vue'), + name: 'organizationManage', + meta: { + title: '组织管理' + } + }, + { + path: '/system/userManage', + component: () => + import('@/views/system/userManage/userManage.vue'), + name: 'userManage', + meta: { + title: '用户管理' + } + }, + { + path: '/system/RoleAdminister', + component: () => + import('@/views/system/RoleAdminister/RoleAdminister.vue'), + name: 'RoleAdminister', + meta: { + title: '角色管理' + } + }, + { + path: '/system/postManage', + component: () => + import('@/views/system/postManage/postManage.vue'), + name: 'postManage', + meta: { + title: '岗位管理' + } + }, + { + path: '/system/menuManage', + component: () => import('@/views/system/menuManage/menuManage.vue'), + name: 'menuManage', + meta: { + title: '菜单管理' + } } - }] + + ] }, + // { + // path: '/userManage', + // component: Layout, + // redirect: '/userManage', + // children: [{ + // path: '/userManage', + // component: () => + // import('@/views/userManage/userManage.vue'), + // name: 'userManage', + // meta: { + // title: '用户管理' + // } + // }] + // }, { + // path: '/RoleAdminister', + // component: Layout, + // redirect: '/RoleAdminister', + // children: [{ + // path: '/RoleAdminister', + // component: () => + // import('@/views/RoleAdminister/RoleAdminister.vue'), + // name: 'RoleAdminister', + // meta: { + // title: '角色管理' + // } + // }] + // }, { + // path: '/postManage', + // component: Layout, + // redirect: '/postManage', + // children: [{ + // path: '/postManage', + // component: () => + // import('@/views/postManage/postManage.vue'), + // name: 'postManage', + // meta: { + // title: '岗位管理' + // } + // }] + // }, { + // path: '/functional', + // component: Layout, + // redirect: '/functional', + // children: [{ + // path: '/functional', + // component: () => + // import('@/views/functional/functional.vue'), + // name: 'functional', + // meta: { + // title: '功能管理' + // } + // }] + // }, { + // path: '/sourceManage', + // component: Layout, + // redirect: '/sourceManage', + // children: [{ + // path: '/sourceManage', + // component: () => + // import('@/views/sourceManage/sourceManage.vue'), + // name: 'sourceManage', + // meta: { + // title: '资源管理' + // } + // }] + // }, { + // path: '/menuManage', + // component: Layout, + // redirect: '/menuManage', + // children: [{ + // path: '/menuManage', + // component: () => import('@/views/menuManage/menuManage.vue'), + // name: 'menuManage', + // meta: { + // title: '菜单管理' + // } + // }] + // }, + + // { + // path: '/organizationManage', + // component: Layout, + // redirect: '/organizationManage', + // children: [{ + // path: '/organizationManage', + // component: () => + // import('@/views/organizationManage/organizationManage.vue'), + // name: 'organizationManage', + // meta: { + // title: '组织管理' + // } + // }] + // }, // { // path: 'rawMaterialType', diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/organizationManage/organizationManage.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/organizationManage/organizationManage.vue deleted file mode 100644 index df37ffda..00000000 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/organizationManage/organizationManage.vue +++ /dev/null @@ -1,660 +0,0 @@ - - - - - - - diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/RoleAdminister/RoleAdminister.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/RoleAdminister/RoleAdminister.vue new file mode 100644 index 00000000..1b700181 --- /dev/null +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/RoleAdminister/RoleAdminister.vue @@ -0,0 +1,853 @@ + + + + + diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/menuManage/menuManage.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/menuManage/menuManage.vue new file mode 100644 index 00000000..65c5649a --- /dev/null +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/menuManage/menuManage.vue @@ -0,0 +1,604 @@ + + + + + + + diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/organizationManage/organizationManage.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/organizationManage/organizationManage.vue new file mode 100644 index 00000000..4880e3f2 --- /dev/null +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/organizationManage/organizationManage.vue @@ -0,0 +1,694 @@ + + + + + + + diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/postManage/postManage.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/postManage/postManage.vue new file mode 100644 index 00000000..404d8b02 --- /dev/null +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/postManage/postManage.vue @@ -0,0 +1,505 @@ + + + + + diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/userManage/userManage.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/userManage/userManage.vue new file mode 100644 index 00000000..37d826e2 --- /dev/null +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/userManage/userManage.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/userManage/userManageAdd.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/userManage/userManageAdd.vue new file mode 100644 index 00000000..27a27f4b --- /dev/null +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/userManage/userManageAdd.vue @@ -0,0 +1,267 @@ + + + + + diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/userManage/userManageList.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/userManage/userManageList.vue new file mode 100644 index 00000000..1f54c1d6 --- /dev/null +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/system/userManage/userManageList.vue @@ -0,0 +1,483 @@ + + + + + + From 6314757890a5c39fff95b37d333aafd88c74e32c Mon Sep 17 00:00:00 2001 From: wangpengfei <1928057482@qq.com> Date: Fri, 16 Jun 2023 11:59:23 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E5=88=86=E9=85=8D=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../docs/databases/create_table.sql | 57 +++++++++ .../cyf/biz/sysmenu/CyfSysMenuRest.java | 85 ++++++++++---- .../cyf/biz/sysuser/CyfSysUserMapper.xml | 12 +- .../cyf/biz/sysuser/CyfSysUserRest.java | 48 +++++--- .../cyf/biz/sysuser/CyfSysUserService.java | 108 ++++++++++++++++++ 5 files changed, 274 insertions(+), 36 deletions(-) diff --git a/yxt-supervise-cyf/docs/databases/create_table.sql b/yxt-supervise-cyf/docs/databases/create_table.sql index b70f89e6..ba5ee867 100644 --- a/yxt-supervise-cyf/docs/databases/create_table.sql +++ b/yxt-supervise-cyf/docs/databases/create_table.sql @@ -383,6 +383,10 @@ CREATE TABLE `sys_user` ( `mobile` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机号', `userType` int(0) NULL DEFAULT NULL COMMENT '用户类型:1员工、2客户、3供应商', `headImage` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户头像', +`roleSid` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色 ', +`orgSid` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '岗位', +`postSid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '部门', +`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '员工名', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; @@ -781,3 +785,56 @@ CREATE TABLE `sys_role` ( PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色' ROW_FORMAT = Dynamic; +DROP TABLE IF EXISTS `sys_menu_role`; +CREATE TABLE `sys_menu_role` ( +`id` int(0) NOT NULL AUTO_INCREMENT, +`sid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'sid', +`lockVersion` int(0) NOT NULL DEFAULT 0 COMMENT '记录版本,锁', +`createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录创建时间', +`modifyTime` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录最后修改时间', +`isEnable` int(0) NOT NULL DEFAULT 1 COMMENT '记录是否可用,1:可用,0:不可用', +`state` int(0) NULL DEFAULT 1 COMMENT '隐藏本部门:隐藏本部门开启后,本部门将不会显示在公司通讯录中', +`isDelete` int(0) NULL DEFAULT NULL COMMENT '记录是否被删除,0:未删除,1:已经删除', +`remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注信息', +`createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建者', +`updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新者', +`menuSid` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单sid', +`roleSid` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色sid', +PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 14389 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '菜单与角色关联表' ROW_FORMAT = Dynamic; + +SET FOREIGN_KEY_CHECKS = 1; + + +DROP TABLE IF EXISTS `sys_menu`; +CREATE TABLE `sys_menu` ( +`id` int(0) NOT NULL AUTO_INCREMENT, +`sid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'sid', +`lockVersion` int(0) NOT NULL DEFAULT 0 COMMENT '记录版本,锁', +`createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录创建时间', +`modifyTime` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录最后修改时间', +`isEnable` int(0) NOT NULL DEFAULT 1 COMMENT '记录是否可用,1:可用,0:不可用', +`state` int(0) NULL DEFAULT 1 COMMENT '隐藏本部门:隐藏本部门开启后,本部门将不会显示在公司通讯录中', +`isDelete` int(0) NULL DEFAULT NULL COMMENT '记录是否被删除,0:未删除,1:已经删除', +`remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注信息', +`createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建者', +`updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新者', +`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单名称', +`menuUrl` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单路由路径(VUE)', +`pageUrl` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单对应的前端页面路径', +`iconUrl` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单图标地址', +`sourceSid` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '资源sid', +`isShow` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '1' COMMENT '是否显示,默认为1显示,0为不显示', +`sortNo` int(0) NULL DEFAULT NULL COMMENT '排序号', +`pSid` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '上级sid', +`pageUrlRedirect` int(0) NULL DEFAULT NULL COMMENT '前端页面路径重定向', +`pageName` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '前端页面名称(vue组件名)', +`pageAliasName` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '前端页面别名', +`menuType` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单类型(0左侧当行菜单,1页面中功能)', +PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 263 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '菜单表' ROW_FORMAT = Dynamic; + +SET FOREIGN_KEY_CHECKS = 1; + + + diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysmenu/CyfSysMenuRest.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysmenu/CyfSysMenuRest.java index a740369e..c622afb6 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysmenu/CyfSysMenuRest.java +++ b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysmenu/CyfSysMenuRest.java @@ -88,6 +88,31 @@ public class CyfSysMenuRest { List list = sysMenuService.listAllVoFor(query); return rb.success().setData(list); } +// @ApiOperation("根据资源sid查询所有数据列表 ") +// @PostMapping("/sourcemenutree") +// public ResultBean>> sourcemenutree(@RequestBody SysMenuQuery query) { +// ResultBean>> rb = ResultBean.fireFail(); +// SysMenuRoleQuery orgRoleMenuQuery = new SysMenuRoleQuery(); +// List> list = new ArrayList<>(); +// if (null == query) +// return rb.setData(list); +// +// //if业务角色存在,则查询业务角色的菜单列表,否则查询平台角色的菜单列表 +// List userRole = sysUserRoleService.selectByUserSid(query.getUserSid()); +// List roleSids = userRole.stream().map(s -> s.getRoleSid()).collect(Collectors.toList()); +// for (String roleSid : roleSids) { +// Integer type = sysRoleService.fetchBySid(roleSid).getType(); +// if (type == 1){ +// orgRoleMenuQuery.setIsAdmin("1"); +// }else { +// orgRoleMenuQuery.setIsAdmin("0"); +// } +// } +// orgRoleMenuQuery.setRoleSids(roleSids); +// orgRoleMenuQuery.setSourceSid(query.getSourceSid()); +// list = sysMenuRoleService.getSourceMenuTreeOfRoles(orgRoleMenuQuery, null); +// return rb.success().setData(list); +// } @ApiOperation("根据资源sid查询所有数据列表 ") @PostMapping("/sourcemenutree") public ResultBean>> sourcemenutree(@RequestBody SysMenuQuery query) { @@ -100,20 +125,42 @@ public class CyfSysMenuRest { //if业务角色存在,则查询业务角色的菜单列表,否则查询平台角色的菜单列表 List userRole = sysUserRoleService.selectByUserSid(query.getUserSid()); List roleSids = userRole.stream().map(s -> s.getRoleSid()).collect(Collectors.toList()); - for (String roleSid : roleSids) { - Integer type = sysRoleService.fetchBySid(roleSid).getType(); - if (type == 1){ - orgRoleMenuQuery.setIsAdmin("1"); - }else { - orgRoleMenuQuery.setIsAdmin("0"); - } - } +// for (String roleSid : roleSids) { +// Integer type = sysRoleService.fetchBySid(roleSid).getType(); +// if (type == 1){ +// orgRoleMenuQuery.setIsAdmin("1"); +// }else { +// orgRoleMenuQuery.setIsAdmin("0"); +// } +// } orgRoleMenuQuery.setRoleSids(roleSids); - orgRoleMenuQuery.setSourceSid(query.getSourceSid()); + //orgRoleMenuQuery.setSourceSid(query.getSourceSid()); list = sysMenuRoleService.getSourceMenuTreeOfRoles(orgRoleMenuQuery, null); return rb.success().setData(list); } +// @ApiOperation("根据角色sid条件查询所有数据列表") +// @PostMapping("/listAllByRoleSid") +// public ResultBean> listAllByRoleSid(@RequestBody SysMenuQuery query) { +// ResultBean rb = ResultBean.fireFail(); +// String roleSid = query.getRoleSid(); +// if (StringUtils.isBlank(roleSid)) { +// ResultBean> resultBean = new ResultBean>(); +// return resultBean.fail().setMessage("角色sid不能为空!"); +// } +// List sysSourceVos = sysSourceService.listVo(); +// List list = new ArrayList<>(); +// for (SysSourceVo s : sysSourceVos) { +// SysMenuVo sysMenuVo = new SysMenuVo(); +// sysMenuVo.setName(s.getSourceName()); +// sysMenuVo.setSid(s.getSid()); +// sysMenuVo.setChecked("1"); +// query.setSourceSid(s.getSid()); +// sysMenuVo.setChildren(sysMenuService.listAllByRoleSid(query)); +// list.add(sysMenuVo); +// } +// return rb.success().setData(list); +// } @ApiOperation("根据角色sid条件查询所有数据列表") @PostMapping("/listAllByRoleSid") public ResultBean> listAllByRoleSid(@RequestBody SysMenuQuery query) { @@ -123,20 +170,18 @@ public class CyfSysMenuRest { ResultBean> resultBean = new ResultBean>(); return resultBean.fail().setMessage("角色sid不能为空!"); } - List sysSourceVos = sysSourceService.listVo(); List list = new ArrayList<>(); - for (SysSourceVo s : sysSourceVos) { - SysMenuVo sysMenuVo = new SysMenuVo(); - sysMenuVo.setName(s.getSourceName()); - sysMenuVo.setSid(s.getSid()); - sysMenuVo.setChecked("1"); - query.setSourceSid(s.getSid()); - sysMenuVo.setChildren(sysMenuService.listAllByRoleSid(query)); - list.add(sysMenuVo); - } +// for (SysSourceVo s : sysSourceVos) { +// SysMenuVo sysMenuVo = new SysMenuVo(); +// sysMenuVo.setName(s.getSourceName()); +// sysMenuVo.setSid(s.getSid()); +// sysMenuVo.setChecked("1"); +// query.setSourceSid(s.getSid()); + list=sysMenuService.listAllByRoleSid(query); + //list.add(sysMenuVo); +// } return rb.success().setData(list); } - @ApiOperation("所有数据列表") @GetMapping("/list") public ResultBean> list() { diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysuser/CyfSysUserMapper.xml b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysuser/CyfSysUserMapper.xml index 5f7246b1..9bda1f34 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysuser/CyfSysUserMapper.xml +++ b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysuser/CyfSysUserMapper.xml @@ -110,14 +110,20 @@ ${ew.sqlSegment} + + + + + + + + +