From b6dbf000e0824dfaca6bf86a08472d3347368449 Mon Sep 17 00:00:00 2001 From: Lxy Date: Sun, 28 Jun 2026 17:14:49 +0800 Subject: [PATCH] feat: migrate business modules to Vue3 - Migrate system management pages: user, role, menu, dept, dict, notice, post, config - Migrate booksystem pages: account, book, statistics, operations - Migrate stocksystem pages: stocks, trends, stockindex, stockbasic - Create corresponding API modules with TypeScript types - Update router configuration with all module routes - Add permission control (v-hasPermi directive) to all pages --- .../src/api/modules/booksystem/account.ts | 26 + .../src/api/modules/booksystem/book.ts | 26 + .../src/api/modules/booksystem/operations.ts | 26 + .../src/api/modules/booksystem/statistics.ts | 26 + .../src/api/modules/stocksystem/stockbasic.ts | 26 + .../src/api/modules/stocksystem/stockindex.ts | 26 + .../src/api/modules/stocksystem/stocks.ts | 31 + .../src/api/modules/stocksystem/trends.ts | 71 ++ .../src/api/modules/system/config.ts | 36 + ruoyi-ui-next/src/api/modules/system/dept.ts | 41 ++ ruoyi-ui-next/src/api/modules/system/dict.ts | 68 ++ ruoyi-ui-next/src/api/modules/system/menu.ts | 36 + .../src/api/modules/system/notice.ts | 26 + ruoyi-ui-next/src/api/modules/system/post.ts | 26 + ruoyi-ui-next/src/api/modules/system/role.ts | 81 +++ ruoyi-ui-next/src/api/modules/system/user.ts | 124 ++-- ruoyi-ui-next/src/components.d.ts | 51 ++ .../components/business/Crontab/result.vue | 22 +- .../src/components/business/Crontab/year.vue | 2 +- .../components/layout/Breadcrumb/index.vue | 2 +- .../src/components/layout/Navbar/index.vue | 4 +- .../components/layout/TagsView/ScrollPane.vue | 4 - .../src/components/layout/TagsView/index.vue | 17 +- .../src/components/ui/Editor/index.vue | 12 +- .../src/components/ui/FileUpload/index.vue | 1 - .../src/components/ui/HeaderSearch/index.vue | 10 +- .../src/components/ui/Pagination/index.vue | 2 +- .../src/components/ui/SizeSelect/index.vue | 4 +- ruoyi-ui-next/src/router/constant.ts | 133 ++++ ruoyi-ui-next/src/stores/modules/tagsView.ts | 1 - ruoyi-ui-next/src/types/global.d.ts | 28 + ruoyi-ui-next/src/utils/scroll-to.ts | 21 +- .../src/views/booksystem/account/index.vue | 95 +++ .../src/views/booksystem/book/index.vue | 121 ++++ .../src/views/booksystem/operations/index.vue | 124 ++++ .../src/views/booksystem/statistics/index.vue | 96 +++ ruoyi-ui-next/src/views/dashboard/index.vue | 130 ++-- ruoyi-ui-next/src/views/heatmap/index.vue | 130 ++-- .../views/stocksystem/stockbasic/index.vue | 87 +++ .../views/stocksystem/stockindex/index.vue | 75 ++ .../src/views/stocksystem/stocks/index.vue | 72 ++ .../src/views/stocksystem/trends/index.vue | 133 ++++ .../src/views/system/config/index.vue | 122 ++++ ruoyi-ui-next/src/views/system/dept/index.vue | 257 +++++++ ruoyi-ui-next/src/views/system/dict/data.vue | 202 ++++++ ruoyi-ui-next/src/views/system/dict/index.vue | 184 +++++ ruoyi-ui-next/src/views/system/menu/index.vue | 365 ++++++++++ .../src/views/system/notice/index.vue | 134 ++++ ruoyi-ui-next/src/views/system/post/index.vue | 107 +++ ruoyi-ui-next/src/views/system/role/index.vue | 514 +++++++++++++ ruoyi-ui-next/src/views/system/user/index.vue | 673 ++++++++++++++++++ ruoyi-ui-next/tsconfig.app.json | 2 +- ruoyi-ui-next/vite.config.ts | 2 +- 53 files changed, 4376 insertions(+), 259 deletions(-) create mode 100644 ruoyi-ui-next/src/api/modules/booksystem/account.ts create mode 100644 ruoyi-ui-next/src/api/modules/booksystem/book.ts create mode 100644 ruoyi-ui-next/src/api/modules/booksystem/operations.ts create mode 100644 ruoyi-ui-next/src/api/modules/booksystem/statistics.ts create mode 100644 ruoyi-ui-next/src/api/modules/stocksystem/stockbasic.ts create mode 100644 ruoyi-ui-next/src/api/modules/stocksystem/stockindex.ts create mode 100644 ruoyi-ui-next/src/api/modules/stocksystem/stocks.ts create mode 100644 ruoyi-ui-next/src/api/modules/stocksystem/trends.ts create mode 100644 ruoyi-ui-next/src/api/modules/system/config.ts create mode 100644 ruoyi-ui-next/src/api/modules/system/dept.ts create mode 100644 ruoyi-ui-next/src/api/modules/system/dict.ts create mode 100644 ruoyi-ui-next/src/api/modules/system/menu.ts create mode 100644 ruoyi-ui-next/src/api/modules/system/notice.ts create mode 100644 ruoyi-ui-next/src/api/modules/system/post.ts create mode 100644 ruoyi-ui-next/src/api/modules/system/role.ts create mode 100644 ruoyi-ui-next/src/types/global.d.ts create mode 100644 ruoyi-ui-next/src/views/booksystem/account/index.vue create mode 100644 ruoyi-ui-next/src/views/booksystem/book/index.vue create mode 100644 ruoyi-ui-next/src/views/booksystem/operations/index.vue create mode 100644 ruoyi-ui-next/src/views/booksystem/statistics/index.vue create mode 100644 ruoyi-ui-next/src/views/stocksystem/stockbasic/index.vue create mode 100644 ruoyi-ui-next/src/views/stocksystem/stockindex/index.vue create mode 100644 ruoyi-ui-next/src/views/stocksystem/stocks/index.vue create mode 100644 ruoyi-ui-next/src/views/stocksystem/trends/index.vue create mode 100644 ruoyi-ui-next/src/views/system/config/index.vue create mode 100644 ruoyi-ui-next/src/views/system/dept/index.vue create mode 100644 ruoyi-ui-next/src/views/system/dict/data.vue create mode 100644 ruoyi-ui-next/src/views/system/dict/index.vue create mode 100644 ruoyi-ui-next/src/views/system/menu/index.vue create mode 100644 ruoyi-ui-next/src/views/system/notice/index.vue create mode 100644 ruoyi-ui-next/src/views/system/post/index.vue create mode 100644 ruoyi-ui-next/src/views/system/role/index.vue create mode 100644 ruoyi-ui-next/src/views/system/user/index.vue diff --git a/ruoyi-ui-next/src/api/modules/booksystem/account.ts b/ruoyi-ui-next/src/api/modules/booksystem/account.ts new file mode 100644 index 0000000..2330dd7 --- /dev/null +++ b/ruoyi-ui-next/src/api/modules/booksystem/account.ts @@ -0,0 +1,26 @@ +import request from '@/api/request' + +// 查询交易账户列表 +export function getAccountList(params: any) { + return request({ url: '/booksystem/account/list', method: 'get', params }) +} + +// 查询交易账户详细 +export function getAccount(id: any) { + return request({ url: `/booksystem/account/${id}`, method: 'get' }) +} + +// 新增交易账户 +export function addAccount(data: any) { + return request({ url: '/booksystem/account', method: 'post', data }) +} + +// 修改交易账户 +export function updateAccount(data: any) { + return request({ url: '/booksystem/account', method: 'put', data }) +} + +// 删除交易账户 +export function delAccount(id: any) { + return request({ url: `/booksystem/account/${id}`, method: 'delete' }) +} diff --git a/ruoyi-ui-next/src/api/modules/booksystem/book.ts b/ruoyi-ui-next/src/api/modules/booksystem/book.ts new file mode 100644 index 0000000..ff919d2 --- /dev/null +++ b/ruoyi-ui-next/src/api/modules/booksystem/book.ts @@ -0,0 +1,26 @@ +import request from '@/api/request' + +// 查询交易记账列表 +export function getBookList(params: any) { + return request({ url: '/booksystem/book/list', method: 'get', params }) +} + +// 查询交易记账详细 +export function getBook(id: any) { + return request({ url: `/booksystem/book/${id}`, method: 'get' }) +} + +// 新增交易记账 +export function addBook(data: any) { + return request({ url: '/booksystem/book', method: 'post', data }) +} + +// 修改交易记账 +export function updateBook(data: any) { + return request({ url: '/booksystem/book', method: 'put', data }) +} + +// 删除交易记账 +export function delBook(id: any) { + return request({ url: `/booksystem/book/${id}`, method: 'delete' }) +} diff --git a/ruoyi-ui-next/src/api/modules/booksystem/operations.ts b/ruoyi-ui-next/src/api/modules/booksystem/operations.ts new file mode 100644 index 0000000..ddb47a8 --- /dev/null +++ b/ruoyi-ui-next/src/api/modules/booksystem/operations.ts @@ -0,0 +1,26 @@ +import request from '@/api/request' + +// 查询当日操作列表 +export function getOperationsList(params: any) { + return request({ url: '/booksystem/operations/list', method: 'get', params }) +} + +// 查询当日操作详细 +export function getOperations(id: any) { + return request({ url: `/booksystem/operations/${id}`, method: 'get' }) +} + +// 新增当日操作 +export function addOperations(data: any) { + return request({ url: '/booksystem/operations', method: 'post', data }) +} + +// 修改当日操作 +export function updateOperations(data: any) { + return request({ url: '/booksystem/operations', method: 'put', data }) +} + +// 删除当日操作 +export function delOperations(id: any) { + return request({ url: `/booksystem/operations/${id}`, method: 'delete' }) +} diff --git a/ruoyi-ui-next/src/api/modules/booksystem/statistics.ts b/ruoyi-ui-next/src/api/modules/booksystem/statistics.ts new file mode 100644 index 0000000..c8e72a7 --- /dev/null +++ b/ruoyi-ui-next/src/api/modules/booksystem/statistics.ts @@ -0,0 +1,26 @@ +import request from '@/api/request' + +// 查询单笔操作统计列表 +export function getStatisticsList(params: any) { + return request({ url: '/booksystem/statistics/list', method: 'get', params }) +} + +// 查询单笔操作统计详细 +export function getStatistics(id: any) { + return request({ url: `/booksystem/statistics/${id}`, method: 'get' }) +} + +// 新增单笔操作统计 +export function addStatistics(data: any) { + return request({ url: '/booksystem/statistics', method: 'post', data }) +} + +// 修改单笔操作统计 +export function updateStatistics(data: any) { + return request({ url: '/booksystem/statistics', method: 'put', data }) +} + +// 删除单笔操作统计 +export function delStatistics(id: any) { + return request({ url: `/booksystem/statistics/${id}`, method: 'delete' }) +} diff --git a/ruoyi-ui-next/src/api/modules/stocksystem/stockbasic.ts b/ruoyi-ui-next/src/api/modules/stocksystem/stockbasic.ts new file mode 100644 index 0000000..f00f158 --- /dev/null +++ b/ruoyi-ui-next/src/api/modules/stocksystem/stockbasic.ts @@ -0,0 +1,26 @@ +import request from '@/api/request' + +// 查询基础数据列表 +export function getStockbasicList(params: any) { + return request({ url: '/stocksystem/stockbasic/list', method: 'get', params }) +} + +// 查询基础数据详细 +export function getStockbasic(id: any) { + return request({ url: `/stocksystem/stockbasic/${id}`, method: 'get' }) +} + +// 新增基础数据 +export function addStockbasic(data: any) { + return request({ url: '/stocksystem/stockbasic', method: 'post', data }) +} + +// 修改基础数据 +export function updateStockbasic(data: any) { + return request({ url: '/stocksystem/stockbasic', method: 'put', data }) +} + +// 删除基础数据 +export function delStockbasic(id: any) { + return request({ url: `/stocksystem/stockbasic/${id}`, method: 'delete' }) +} diff --git a/ruoyi-ui-next/src/api/modules/stocksystem/stockindex.ts b/ruoyi-ui-next/src/api/modules/stocksystem/stockindex.ts new file mode 100644 index 0000000..e8b56a8 --- /dev/null +++ b/ruoyi-ui-next/src/api/modules/stocksystem/stockindex.ts @@ -0,0 +1,26 @@ +import request from '@/api/request' + +// 查询指数交易行情列表 +export function getStockindexList(params: any) { + return request({ url: '/stocksystem/stockindex/list', method: 'get', params }) +} + +// 查询指数交易行情详细 +export function getStockindex(id: any) { + return request({ url: `/stocksystem/stockindex/${id}`, method: 'get' }) +} + +// 新增指数交易行情 +export function addStockindex(data: any) { + return request({ url: '/stocksystem/stockindex', method: 'post', data }) +} + +// 修改指数交易行情 +export function updateStockindex(data: any) { + return request({ url: '/stocksystem/stockindex', method: 'put', data }) +} + +// 删除指数交易行情 +export function delStockindex(id: any) { + return request({ url: `/stocksystem/stockindex/${id}`, method: 'delete' }) +} diff --git a/ruoyi-ui-next/src/api/modules/stocksystem/stocks.ts b/ruoyi-ui-next/src/api/modules/stocksystem/stocks.ts new file mode 100644 index 0000000..7371098 --- /dev/null +++ b/ruoyi-ui-next/src/api/modules/stocksystem/stocks.ts @@ -0,0 +1,31 @@ +import request from '@/api/request' + +// 查询行情数据列表 +export function getStocksList(params: any) { + return request({ url: '/stocksystem/stocks/listB', method: 'get', params }) +} + +// 查询行情数据详细 +export function getStocks(id: any) { + return request({ url: `/stocksystem/stocks/${id}`, method: 'get' }) +} + +// 分析行情数据 +export function analysisStocks(data: any) { + return request({ url: '/stocksystem/stocks/analysis', method: 'post', data }) +} + +// 新增行情数据 +export function addStocks(data: any) { + return request({ url: '/stocksystem/stocks', method: 'post', data }) +} + +// 修改行情数据 +export function updateStocks(data: any) { + return request({ url: '/stocksystem/stocks', method: 'put', data }) +} + +// 删除行情数据 +export function delStocks(id: any) { + return request({ url: `/stocksystem/stocks/${id}`, method: 'delete' }) +} diff --git a/ruoyi-ui-next/src/api/modules/stocksystem/trends.ts b/ruoyi-ui-next/src/api/modules/stocksystem/trends.ts new file mode 100644 index 0000000..b47fe88 --- /dev/null +++ b/ruoyi-ui-next/src/api/modules/stocksystem/trends.ts @@ -0,0 +1,71 @@ +import request from '@/api/request' + +// 查询动量结果列表 +export function getTrendsList(params: any) { + return request({ url: '/stocksystem/trends/list', method: 'get', params }) +} + +// 查询时间段内动量结果列表 +export function getTrendsSection(params: any) { + return request({ url: '/stocksystem/trends/listSection', method: 'get', params }) +} + +// 查询时间段内成交量结果列表 +export function getTradeVolume(params: any) { + return request({ url: '/stocksystem/trends/listTradeVolume', method: 'get', params }) +} + +// 查询指数内涨停板数量 +export function getStockIndexLimitUp(params: any) { + return request({ url: '/stocksystem/trends/listStockIndexLimitUp', method: 'get', params }) +} + +// 查询板块内跌停板数量 +export function getStockIndexLimitDown(params: any) { + return request({ url: '/stocksystem/trends/listStockIndexLimitDown', method: 'get', params }) +} + +// 查询创新高板块 +export function getStockIndexHighRecord(params: any) { + return request({ url: '/stocksystem/trends/listStockIndexHighRocord', method: 'get', params }) +} + +// 查询创新低板块 +export function getStockIndexLowRecord(params: any) { + return request({ url: '/stocksystem/trends/listStockIndexLowRocord', method: 'get', params }) +} + +// 查询时间段内动量结果列表(按板块) +export function getSectionByBlemind(params: any) { + return request({ url: '/stocksystem/trends/listSectionByBlemind', method: 'get', params }) +} + +// 查询个股历史k线数据 +export function getStockHistory(params: any) { + return request({ url: '/stocksystem/stocks/stockHistory', method: 'get', params }) +} + +// 板块历史k线数据 +export function getStockIndexHistory(params: any) { + return request({ url: '/stocksystem/stocks/stockIndexHistory', method: 'get', params }) +} + +// 查询动量结果详细 +export function getTrends(id: any) { + return request({ url: `/stocksystem/trends/${id}`, method: 'get' }) +} + +// 新增动量结果 +export function addTrends(data: any) { + return request({ url: '/stocksystem/trends', method: 'post', data }) +} + +// 修改动量结果 +export function updateTrends(data: any) { + return request({ url: '/stocksystem/trends', method: 'put', data }) +} + +// 删除动量结果 +export function delTrends(id: any) { + return request({ url: `/stocksystem/trends/${id}`, method: 'delete' }) +} diff --git a/ruoyi-ui-next/src/api/modules/system/config.ts b/ruoyi-ui-next/src/api/modules/system/config.ts new file mode 100644 index 0000000..eeba6e0 --- /dev/null +++ b/ruoyi-ui-next/src/api/modules/system/config.ts @@ -0,0 +1,36 @@ +import request from '@/api/request' + +// 查询参数列表 +export function getConfigList(params: any) { + return request({ url: '/system/config/list', method: 'get', params }) +} + +// 查询参数详细 +export function getConfig(configId: any) { + return request({ url: `/system/config/${configId}`, method: 'get' }) +} + +// 根据参数键名查询参数值 +export function getConfigKey(configKey: string) { + return request({ url: `/system/config/configKey/${configKey}`, method: 'get' }) +} + +// 新增参数配置 +export function addConfig(data: any) { + return request({ url: '/system/config', method: 'post', data }) +} + +// 修改参数配置 +export function updateConfig(data: any) { + return request({ url: '/system/config', method: 'put', data }) +} + +// 删除参数配置 +export function delConfig(configId: any) { + return request({ url: `/system/config/${configId}`, method: 'delete' }) +} + +// 刷新参数缓存 +export function refreshConfigCache() { + return request({ url: '/system/config/refreshCache', method: 'delete' }) +} diff --git a/ruoyi-ui-next/src/api/modules/system/dept.ts b/ruoyi-ui-next/src/api/modules/system/dept.ts new file mode 100644 index 0000000..06d4153 --- /dev/null +++ b/ruoyi-ui-next/src/api/modules/system/dept.ts @@ -0,0 +1,41 @@ +import request from '@/api/request' + +// 查询部门列表 +export function getDeptList(params?: any) { + return request({ url: '/system/dept/list', method: 'get', params }) +} + +// 查询部门列表(排除节点) +export function getDeptListExcludeChild(deptId: any) { + return request({ url: `/system/dept/list/exclude/${deptId}`, method: 'get' }) +} + +// 查询部门详细 +export function getDept(deptId: any) { + return request({ url: `/system/dept/${deptId}`, method: 'get' }) +} + +// 查询部门下拉树结构 +export function getDeptTreeselect() { + return request({ url: '/system/dept/treeselect', method: 'get' }) +} + +// 根据角色ID查询部门树结构 +export function roleDeptTreeselect(roleId: any) { + return request({ url: `/system/dept/roleDeptTreeselect/${roleId}`, method: 'get' }) +} + +// 新增部门 +export function addDept(data: any) { + return request({ url: '/system/dept', method: 'post', data }) +} + +// 修改部门 +export function updateDept(data: any) { + return request({ url: '/system/dept', method: 'put', data }) +} + +// 删除部门 +export function delDept(deptId: any) { + return request({ url: `/system/dept/${deptId}`, method: 'delete' }) +} diff --git a/ruoyi-ui-next/src/api/modules/system/dict.ts b/ruoyi-ui-next/src/api/modules/system/dict.ts new file mode 100644 index 0000000..499c10d --- /dev/null +++ b/ruoyi-ui-next/src/api/modules/system/dict.ts @@ -0,0 +1,68 @@ +import request from '@/api/request' + +// 查询字典类型列表 +export function getDictTypeList(params: any) { + return request({ url: '/system/dict/type/list', method: 'get', params }) +} + +// 查询字典类型详细 +export function getDictType(dictId: any) { + return request({ url: `/system/dict/type/${dictId}`, method: 'get' }) +} + +// 新增字典类型 +export function addDictType(data: any) { + return request({ url: '/system/dict/type', method: 'post', data }) +} + +// 修改字典类型 +export function updateDictType(data: any) { + return request({ url: '/system/dict/type', method: 'put', data }) +} + +// 删除字典类型 +export function delDictType(dictId: any) { + return request({ url: `/system/dict/type/${dictId}`, method: 'delete' }) +} + +// 刷新字典缓存 +export function refreshDictCache() { + return request({ url: '/system/dict/type/refreshCache', method: 'delete' }) +} + +// 获取字典选择框列表 +export function getDictTypeOptionselect() { + return request({ url: '/system/dict/type/optionselect', method: 'get' }) +} + +// ===== 字典数据 ===== + +// 查询字典数据列表 +export function getDictDataList(params: any) { + return request({ url: '/system/dict/data/list', method: 'get', params }) +} + +// 查询字典数据详细 +export function getDictData(dictCode: any) { + return request({ url: `/system/dict/data/${dictCode}`, method: 'get' }) +} + +// 根据字典类型查询字典数据信息 +export function getDicts(dictType: string) { + return request({ url: `/system/dict/data/type/${dictType}`, method: 'get' }) +} + +// 新增字典数据 +export function addDictData(data: any) { + return request({ url: '/system/dict/data', method: 'post', data }) +} + +// 修改字典数据 +export function updateDictData(data: any) { + return request({ url: '/system/dict/data', method: 'put', data }) +} + +// 删除字典数据 +export function delDictData(dictCode: any) { + return request({ url: `/system/dict/data/${dictCode}`, method: 'delete' }) +} diff --git a/ruoyi-ui-next/src/api/modules/system/menu.ts b/ruoyi-ui-next/src/api/modules/system/menu.ts new file mode 100644 index 0000000..b382114 --- /dev/null +++ b/ruoyi-ui-next/src/api/modules/system/menu.ts @@ -0,0 +1,36 @@ +import request from '@/api/request' + +// 查询菜单列表 +export function getMenuList(params?: any) { + return request({ url: '/system/menu/list', method: 'get', params }) +} + +// 查询菜单详细 +export function getMenu(menuId: any) { + return request({ url: `/system/menu/${menuId}`, method: 'get' }) +} + +// 查询菜单下拉树结构 +export function getMenuTreeselect() { + return request({ url: '/system/menu/treeselect', method: 'get' }) +} + +// 根据角色ID查询菜单下拉树结构 +export function roleMenuTreeselect(roleId: any) { + return request({ url: `/system/menu/roleMenuTreeselect/${roleId}`, method: 'get' }) +} + +// 新增菜单 +export function addMenu(data: any) { + return request({ url: '/system/menu', method: 'post', data }) +} + +// 修改菜单 +export function updateMenu(data: any) { + return request({ url: '/system/menu', method: 'put', data }) +} + +// 删除菜单 +export function delMenu(menuId: any) { + return request({ url: `/system/menu/${menuId}`, method: 'delete' }) +} diff --git a/ruoyi-ui-next/src/api/modules/system/notice.ts b/ruoyi-ui-next/src/api/modules/system/notice.ts new file mode 100644 index 0000000..0b58926 --- /dev/null +++ b/ruoyi-ui-next/src/api/modules/system/notice.ts @@ -0,0 +1,26 @@ +import request from '@/api/request' + +// 查询公告列表 +export function getNoticeList(params: any) { + return request({ url: '/system/notice/list', method: 'get', params }) +} + +// 查询公告详细 +export function getNotice(noticeId: any) { + return request({ url: `/system/notice/${noticeId}`, method: 'get' }) +} + +// 新增公告 +export function addNotice(data: any) { + return request({ url: '/system/notice', method: 'post', data }) +} + +// 修改公告 +export function updateNotice(data: any) { + return request({ url: '/system/notice', method: 'put', data }) +} + +// 删除公告 +export function delNotice(noticeId: any) { + return request({ url: `/system/notice/${noticeId}`, method: 'delete' }) +} diff --git a/ruoyi-ui-next/src/api/modules/system/post.ts b/ruoyi-ui-next/src/api/modules/system/post.ts new file mode 100644 index 0000000..9ab5351 --- /dev/null +++ b/ruoyi-ui-next/src/api/modules/system/post.ts @@ -0,0 +1,26 @@ +import request from '@/api/request' + +// 查询岗位列表 +export function getPostList(params: any) { + return request({ url: '/system/post/list', method: 'get', params }) +} + +// 查询岗位详细 +export function getPost(postId: any) { + return request({ url: `/system/post/${postId}`, method: 'get' }) +} + +// 新增岗位 +export function addPost(data: any) { + return request({ url: '/system/post', method: 'post', data }) +} + +// 修改岗位 +export function updatePost(data: any) { + return request({ url: '/system/post', method: 'put', data }) +} + +// 删除岗位 +export function delPost(postId: any) { + return request({ url: `/system/post/${postId}`, method: 'delete' }) +} diff --git a/ruoyi-ui-next/src/api/modules/system/role.ts b/ruoyi-ui-next/src/api/modules/system/role.ts new file mode 100644 index 0000000..31c6cfd --- /dev/null +++ b/ruoyi-ui-next/src/api/modules/system/role.ts @@ -0,0 +1,81 @@ +import request from '@/api/request' + +// 查询角色列表 +export function getRoleList(params: any) { + return request({ url: '/system/role/list', method: 'get', params }) +} + +// 查询角色详细 +export function getRole(roleId: any) { + return request({ url: `/system/role/${roleId}`, method: 'get' }) +} + +// 新增角色 +export function addRole(data: any) { + return request({ url: '/system/role', method: 'post', data }) +} + +// 修改角色 +export function updateRole(data: any) { + return request({ url: '/system/role', method: 'put', data }) +} + +// 角色数据权限 +export function dataScope(data: any) { + return request({ url: '/system/role/dataScope', method: 'put', data }) +} + +// 角色状态修改 +export function changeRoleStatus(roleId: any, status: string) { + return request({ url: '/system/role/changeStatus', method: 'put', data: { roleId, status } }) +} + +// 删除角色 +export function delRole(roleId: any) { + return request({ url: `/system/role/${roleId}`, method: 'delete' }) +} + +// 查询角色已授权用户列表 +export function allocatedUserList(params: any) { + return request({ url: '/system/role/authUser/allocatedList', method: 'get', params }) +} + +// 查询角色未授权用户列表 +export function unallocatedUserList(params: any) { + return request({ url: '/system/role/authUser/unallocatedList', method: 'get', params }) +} + +// 取消用户授权角色 +export function authUserCancel(data: any) { + return request({ url: '/system/role/authUser/cancel', method: 'put', data }) +} + +// 批量取消用户授权角色 +export function authUserCancelAll(data: any) { + return request({ url: '/system/role/authUser/cancelAll', method: 'put', params: data }) +} + +// 授权用户选择 +export function authUserSelectAll(data: any) { + return request({ url: '/system/role/authUser/selectAll', method: 'put', params: data }) +} + +// 查询菜单下拉树结构 +export function getMenuTreeselect() { + return request({ url: '/system/menu/treeselect', method: 'get' }) +} + +// 根据角色ID查询菜单下拉树结构 +export function roleMenuTreeselect(roleId: any) { + return request({ url: `/system/menu/roleMenuTreeselect/${roleId}`, method: 'get' }) +} + +// 查询部门下拉树结构 +export function getDeptTreeselect() { + return request({ url: '/system/dept/treeselect', method: 'get' }) +} + +// 根据角色ID查询部门树结构 +export function roleDeptTreeselect(roleId: any) { + return request({ url: `/system/dept/roleDeptTreeselect/${roleId}`, method: 'get' }) +} diff --git a/ruoyi-ui-next/src/api/modules/system/user.ts b/ruoyi-ui-next/src/api/modules/system/user.ts index da005b0..665d83d 100644 --- a/ruoyi-ui-next/src/api/modules/system/user.ts +++ b/ruoyi-ui-next/src/api/modules/system/user.ts @@ -1,88 +1,76 @@ import request from '@/api/request' -/** - * 查询用户列表 - */ +// 查询用户列表 export function getUserList(params: any) { - return request({ - url: '/system/user/list', - method: 'get', - params, - }) + return request({ url: '/system/user/list', method: 'get', params }) } -/** - * 查询用户详情 - */ -export function getUser(userId: number | string) { - return request({ - url: `/system/user/${userId}`, - method: 'get', - }) +// 查询用户详细 +export function getUser(userId: any) { + return request({ url: `/system/user/${userId}`, method: 'get' }) } -/** - * 新增用户 - */ +// 新增用户 export function addUser(data: any) { - return request({ - url: '/system/user', - method: 'post', - data, - }) + return request({ url: '/system/user', method: 'post', data }) } -/** - * 修改用户 - */ +// 修改用户 export function updateUser(data: any) { - return request({ - url: '/system/user', - method: 'put', - data, - }) + return request({ url: '/system/user', method: 'put', data }) } -/** - * 删除用户 - */ -export function delUser(userId: number | string | (number | string)[]) { - return request({ - url: `/system/user/${userId}`, - method: 'delete', - }) +// 删除用户 +export function delUser(userId: any) { + return request({ url: `/system/user/${userId}`, method: 'delete' }) } -/** - * 重置用户密码 - */ -export function resetUserPwd(userId: number | string, password: string) { - return request({ - url: `/system/user/resetPwd`, - method: 'put', - data: { userId, password }, - }) +// 用户密码重置 +export function resetUserPwd(userId: any, password: string) { + return request({ url: '/system/user/resetPwd', method: 'put', data: { userId, password } }) } -/** - * 修改用户状态 - */ -export function changeUserStatus(userId: number | string, status: string) { - return request({ - url: `/system/user/changeStatus`, - method: 'put', - data: { userId, status }, - }) +// 用户状态修改 +export function changeUserStatus(userId: any, status: string) { + return request({ url: '/system/user/changeStatus', method: 'put', data: { userId, status } }) } -/** - * 导出用户 - */ -export function exportUser(params: any) { - return request({ - url: '/system/user/export', - method: 'post', - data: params, - responseType: 'blob', - }) +// 查询用户个人信息 +export function getUserProfile() { + return request({ url: '/system/user/profile', method: 'get' }) +} + +// 修改用户个人信息 +export function updateUserProfile(data: any) { + return request({ url: '/system/user/profile', method: 'put', data }) +} + +// 用户密码重置 +export function updateUserPwd(oldPassword: string, newPassword: string) { + return request({ url: '/system/user/profile/updatePwd', method: 'put', params: { oldPassword, newPassword } }) +} + +// 用户头像上传 +export function uploadAvatar(data: any) { + return request({ url: '/system/user/profile/avatar', method: 'post', data }) +} + +// 查询授权角色 +export function getAuthRole(userId: any) { + return request({ url: `/system/user/authRole/${userId}`, method: 'get' }) +} + +// 保存授权角色 +export function updateAuthRole(data: any) { + return request({ url: '/system/user/authRole', method: 'put', params: data }) +} + +// 查询部门下拉树结构 +export function getDeptTreeselect() { + return request({ url: '/system/dept/treeselect', method: 'get' }) +} + +// 查询配置键值 +export function getConfigKey(configKey: string) { + return request({ url: `/system/config/configKey/${configKey}`, method: 'get' }) } diff --git a/ruoyi-ui-next/src/components.d.ts b/ruoyi-ui-next/src/components.d.ts index 4735919..49f53b8 100644 --- a/ruoyi-ui-next/src/components.d.ts +++ b/ruoyi-ui-next/src/components.d.ts @@ -11,11 +11,22 @@ export {} /* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { + AppMain: typeof import('./components/layout/AppMain.vue')['default'] + BarChart: typeof import('./components/ui/Charts/BarChart.vue')['default'] + Breadcrumb: typeof import('./components/layout/Breadcrumb/index.vue')['default'] + Crontab: typeof import('./components/business/Crontab/index.vue')['default'] + Day: typeof import('./components/business/Crontab/day.vue')['default'] + DictTag: typeof import('./components/ui/DictTag/index.vue')['default'] + Editor: typeof import('./components/ui/Editor/index.vue')['default'] ElAvatar: typeof import('element-plus/es')['ElAvatar'] ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] ElButton: typeof import('element-plus/es')['ElButton'] ElCard: typeof import('element-plus/es')['ElCard'] + ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] + ElCol: typeof import('element-plus/es')['ElCol'] + ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] + ElDialog: typeof import('element-plus/es')['ElDialog'] ElDropdown: typeof import('element-plus/es')['ElDropdown'] ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] @@ -23,13 +34,53 @@ declare module 'vue' { ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElIcon: typeof import('element-plus/es')['ElIcon'] ElInput: typeof import('element-plus/es')['ElInput'] + ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] ElMenu: typeof import('element-plus/es')['ElMenu'] ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] + ElOption: typeof import('element-plus/es')['ElOption'] + ElPagination: typeof import('element-plus/es')['ElPagination'] + ElRadio: typeof import('element-plus/es')['ElRadio'] + ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] + ElRow: typeof import('element-plus/es')['ElRow'] + ElSelect: typeof import('element-plus/es')['ElSelect'] ElSubMenu: typeof import('element-plus/es')['ElSubMenu'] + ElSwitch: typeof import('element-plus/es')['ElSwitch'] + ElTable: typeof import('element-plus/es')['ElTable'] + ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] + ElTag: typeof import('element-plus/es')['ElTag'] + ElTooltip: typeof import('element-plus/es')['ElTooltip'] + ElTransfer: typeof import('element-plus/es')['ElTransfer'] + ElTree: typeof import('element-plus/es')['ElTree'] + ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect'] + ElUpload: typeof import('element-plus/es')['ElUpload'] + FileUpload: typeof import('./components/ui/FileUpload/index.vue')['default'] + HeaderSearch: typeof import('./components/ui/HeaderSearch/index.vue')['default'] + HeatmapChart: typeof import('./components/ui/Charts/HeatmapChart.vue')['default'] HelloWorld: typeof import('./components/HelloWorld.vue')['default'] + Hour: typeof import('./components/business/Crontab/hour.vue')['default'] + IconSelect: typeof import('./components/ui/IconSelect/index.vue')['default'] + ImageUpload: typeof import('./components/ui/ImageUpload/index.vue')['default'] + LineChart: typeof import('./components/ui/Charts/LineChart.vue')['default'] + Min: typeof import('./components/business/Crontab/min.vue')['default'] + Month: typeof import('./components/business/Crontab/month.vue')['default'] + Navbar: typeof import('./components/layout/Navbar/index.vue')['default'] + Pagination: typeof import('./components/ui/Pagination/index.vue')['default'] ParentView: typeof import('./components/ParentView.vue')['default'] + PieChart: typeof import('./components/ui/Charts/PieChart.vue')['default'] + Result: typeof import('./components/business/Crontab/result.vue')['default'] + RightToolbar: typeof import('./components/business/RightToolbar/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] + Screenfull: typeof import('./components/ui/Screenfull/index.vue')['default'] + ScrollPane: typeof import('./components/layout/TagsView/ScrollPane.vue')['default'] + Second: typeof import('./components/business/Crontab/second.vue')['default'] Sidebar: typeof import('./components/layout/Sidebar/index.vue')['default'] + SizeSelect: typeof import('./components/ui/SizeSelect/index.vue')['default'] + TagsView: typeof import('./components/layout/TagsView/index.vue')['default'] + Week: typeof import('./components/business/Crontab/week.vue')['default'] + Year: typeof import('./components/business/Crontab/year.vue')['default'] + } + export interface GlobalDirectives { + vLoading: typeof import('element-plus/es')['ElLoadingDirective'] } } diff --git a/ruoyi-ui-next/src/components/business/Crontab/result.vue b/ruoyi-ui-next/src/components/business/Crontab/result.vue index 7fbe097..f3448e3 100644 --- a/ruoyi-ui-next/src/components/business/Crontab/result.vue +++ b/ruoyi-ui-next/src/components/business/Crontab/result.vue @@ -363,27 +363,25 @@ function getCycleArr(rule: string, limit: number, status: boolean): number[] { return arr } -function formatDate(value: Date, type?: string): string | number { +function formatDate(value: Date, type?: string): number { const time = typeof value === 'number' ? new Date(value) : value - const Y = time.getFullYear() - const M = time.getMonth() + 1 - const D = time.getDate() - const h = time.getHours() - const m = time.getMinutes() - const s = time.getSeconds() const week = time.getDay() - if (!type) { - return `${Y}-${M < 10 ? '0' + M : M}-${D < 10 ? '0' + D : D} ${h < 10 ? '0' + h : h}:${m < 10 ? '0' + m : m}:${s < 10 ? '0' + s : s}` - } else if (type === 'week') { + if (type === 'week') { return week + 1 } - return '' + return 0 } function checkDate(value: string): boolean { const time = new Date(value) - const format = formatDate(time) + const Y = time.getFullYear() + const M = time.getMonth() + 1 + const D = time.getDate() + const h = time.getHours() + const m = time.getMinutes() + const s = time.getSeconds() + const format = `${Y}-${M < 10 ? '0' + M : M}-${D < 10 ? '0' + D : D} ${h < 10 ? '0' + h : h}:${m < 10 ? '0' + m : m}:${s < 10 ? '0' + s : s}` return value === format } diff --git a/ruoyi-ui-next/src/components/business/Crontab/year.vue b/ruoyi-ui-next/src/components/business/Crontab/year.vue index c1b85e5..298093a 100644 --- a/ruoyi-ui-next/src/components/business/Crontab/year.vue +++ b/ruoyi-ui-next/src/components/business/Crontab/year.vue @@ -40,7 +40,7 @@ + + diff --git a/ruoyi-ui-next/src/views/booksystem/book/index.vue b/ruoyi-ui-next/src/views/booksystem/book/index.vue new file mode 100644 index 0000000..40d0a22 --- /dev/null +++ b/ruoyi-ui-next/src/views/booksystem/book/index.vue @@ -0,0 +1,121 @@ + + + + + diff --git a/ruoyi-ui-next/src/views/booksystem/operations/index.vue b/ruoyi-ui-next/src/views/booksystem/operations/index.vue new file mode 100644 index 0000000..3fcd777 --- /dev/null +++ b/ruoyi-ui-next/src/views/booksystem/operations/index.vue @@ -0,0 +1,124 @@ + + + + + diff --git a/ruoyi-ui-next/src/views/booksystem/statistics/index.vue b/ruoyi-ui-next/src/views/booksystem/statistics/index.vue new file mode 100644 index 0000000..4584f2b --- /dev/null +++ b/ruoyi-ui-next/src/views/booksystem/statistics/index.vue @@ -0,0 +1,96 @@ + + + + + diff --git a/ruoyi-ui-next/src/views/dashboard/index.vue b/ruoyi-ui-next/src/views/dashboard/index.vue index 152a499..14d098f 100644 --- a/ruoyi-ui-next/src/views/dashboard/index.vue +++ b/ruoyi-ui-next/src/views/dashboard/index.vue @@ -624,83 +624,83 @@ function initDetailChart() { &:hover { background: var(--bg3); } } } + + + diff --git a/ruoyi-ui-next/src/views/heatmap/index.vue b/ruoyi-ui-next/src/views/heatmap/index.vue index 7276cbb..988d11c 100644 --- a/ruoyi-ui-next/src/views/heatmap/index.vue +++ b/ruoyi-ui-next/src/views/heatmap/index.vue @@ -425,83 +425,83 @@ function initDetailChart() { overflow-x: auto; } } + + + diff --git a/ruoyi-ui-next/src/views/stocksystem/stockbasic/index.vue b/ruoyi-ui-next/src/views/stocksystem/stockbasic/index.vue new file mode 100644 index 0000000..9494355 --- /dev/null +++ b/ruoyi-ui-next/src/views/stocksystem/stockbasic/index.vue @@ -0,0 +1,87 @@ + + + + + diff --git a/ruoyi-ui-next/src/views/stocksystem/stockindex/index.vue b/ruoyi-ui-next/src/views/stocksystem/stockindex/index.vue new file mode 100644 index 0000000..780c538 --- /dev/null +++ b/ruoyi-ui-next/src/views/stocksystem/stockindex/index.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/ruoyi-ui-next/src/views/stocksystem/stocks/index.vue b/ruoyi-ui-next/src/views/stocksystem/stocks/index.vue new file mode 100644 index 0000000..ad6b3c6 --- /dev/null +++ b/ruoyi-ui-next/src/views/stocksystem/stocks/index.vue @@ -0,0 +1,72 @@ + + + + + diff --git a/ruoyi-ui-next/src/views/stocksystem/trends/index.vue b/ruoyi-ui-next/src/views/stocksystem/trends/index.vue new file mode 100644 index 0000000..6f65418 --- /dev/null +++ b/ruoyi-ui-next/src/views/stocksystem/trends/index.vue @@ -0,0 +1,133 @@ + + + + + diff --git a/ruoyi-ui-next/src/views/system/config/index.vue b/ruoyi-ui-next/src/views/system/config/index.vue new file mode 100644 index 0000000..a625951 --- /dev/null +++ b/ruoyi-ui-next/src/views/system/config/index.vue @@ -0,0 +1,122 @@ + + + + + diff --git a/ruoyi-ui-next/src/views/system/dept/index.vue b/ruoyi-ui-next/src/views/system/dept/index.vue new file mode 100644 index 0000000..058519a --- /dev/null +++ b/ruoyi-ui-next/src/views/system/dept/index.vue @@ -0,0 +1,257 @@ + + + + + diff --git a/ruoyi-ui-next/src/views/system/dict/data.vue b/ruoyi-ui-next/src/views/system/dict/data.vue new file mode 100644 index 0000000..1e17b88 --- /dev/null +++ b/ruoyi-ui-next/src/views/system/dict/data.vue @@ -0,0 +1,202 @@ + + + + + diff --git a/ruoyi-ui-next/src/views/system/dict/index.vue b/ruoyi-ui-next/src/views/system/dict/index.vue new file mode 100644 index 0000000..cc4dc6b --- /dev/null +++ b/ruoyi-ui-next/src/views/system/dict/index.vue @@ -0,0 +1,184 @@ + + + + + diff --git a/ruoyi-ui-next/src/views/system/menu/index.vue b/ruoyi-ui-next/src/views/system/menu/index.vue new file mode 100644 index 0000000..7f6c2fc --- /dev/null +++ b/ruoyi-ui-next/src/views/system/menu/index.vue @@ -0,0 +1,365 @@ + + + + + diff --git a/ruoyi-ui-next/src/views/system/notice/index.vue b/ruoyi-ui-next/src/views/system/notice/index.vue new file mode 100644 index 0000000..58822d5 --- /dev/null +++ b/ruoyi-ui-next/src/views/system/notice/index.vue @@ -0,0 +1,134 @@ + + + + + diff --git a/ruoyi-ui-next/src/views/system/post/index.vue b/ruoyi-ui-next/src/views/system/post/index.vue new file mode 100644 index 0000000..f160aac --- /dev/null +++ b/ruoyi-ui-next/src/views/system/post/index.vue @@ -0,0 +1,107 @@ + + + + + diff --git a/ruoyi-ui-next/src/views/system/role/index.vue b/ruoyi-ui-next/src/views/system/role/index.vue new file mode 100644 index 0000000..c20906e --- /dev/null +++ b/ruoyi-ui-next/src/views/system/role/index.vue @@ -0,0 +1,514 @@ + + + + + diff --git a/ruoyi-ui-next/src/views/system/user/index.vue b/ruoyi-ui-next/src/views/system/user/index.vue new file mode 100644 index 0000000..81db0a7 --- /dev/null +++ b/ruoyi-ui-next/src/views/system/user/index.vue @@ -0,0 +1,673 @@ + + + + + diff --git a/ruoyi-ui-next/tsconfig.app.json b/ruoyi-ui-next/tsconfig.app.json index dafdc41..3412542 100644 --- a/ruoyi-ui-next/tsconfig.app.json +++ b/ruoyi-ui-next/tsconfig.app.json @@ -16,5 +16,5 @@ "erasableSyntaxOnly": true, "noFallthroughCasesInSwitch": true }, - "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "src/auto-imports.d.ts", "src/components.d.ts"] + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "src/auto-imports.d.ts", "src/components.d.ts", "src/types/global.d.ts"] } diff --git a/ruoyi-ui-next/vite.config.ts b/ruoyi-ui-next/vite.config.ts index 3f76a21..1ea63c6 100644 --- a/ruoyi-ui-next/vite.config.ts +++ b/ruoyi-ui-next/vite.config.ts @@ -35,7 +35,7 @@ export default defineConfig(({ mode }) => { } }, server: { - port: 80, + port: 5173, host: true, proxy: { '/dev-api': {