From 7659065a6832776bfd2028f7ff1b5ad7466c78f1 Mon Sep 17 00:00:00 2001 From: liyongde <1419499670@qq.com> Date: Wed, 29 May 2024 15:16:08 +0800 Subject: [PATCH] =?UTF-8?q?rev:=20api=E4=BD=8D=E7=BD=AE=E6=8C=AA=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nladmin-ui/src/api/system/dept.js | 60 --------------- nladmin-ui/src/api/system/grid.js | 33 --------- nladmin-ui/src/api/system/gridField.js | 50 ------------- nladmin-ui/src/api/system/menu.js | 73 ------------------- nladmin-ui/src/router/index.js | 2 +- nladmin-ui/src/views/generator/config.vue | 4 +- .../src/{api => views}/generator/genConfig.js | 0 .../src/{api => views}/generator/generator.js | 0 nladmin-ui/src/views/generator/index.vue | 2 +- nladmin-ui/src/views/generator/preview.vue | 2 +- nladmin-ui/src/views/monitor/log/errorLog.vue | 2 +- nladmin-ui/src/views/monitor/log/index.vue | 2 +- .../{api/monitor => views/monitor/log}/log.js | 0 nladmin-ui/src/views/monitor/online/index.vue | 2 +- .../monitor/online}/online.js | 0 .../system => views/system/auto}/autorun.js | 0 nladmin-ui/src/views/system/auto/index.vue | 2 +- nladmin-ui/src/views/system/dept/index.vue | 2 +- .../logicflow/editor/components/Diagram.vue | 2 +- .../editor/components/DiagramToolbar.vue | 2 +- .../editor/components/PropertyPanel.vue | 2 +- .../views/system/logicflow/image/index.vue | 2 +- .../src/views/system/logicflow/index.vue | 2 +- .../{api => views/system}/logicflow/stage.js | 0 .../system}/logicflow/stageImage.js | 0 nladmin-ui/src/views/system/menu/dd/index.vue | 2 +- .../src/views/system/monitor/device/index.vue | 2 +- nladmin-ui/src/views/system/redis/index.vue | 2 +- .../system => views/system/redis}/redis.js | 0 nladmin-ui/src/views/system/role/index.vue | 4 +- .../system/user/center}/code.js | 0 .../views/system/user/center/updateEmail.vue | 2 +- .../user/dialog/relevanceDeptDialog.vue | 2 +- nladmin-ui/src/views/system/user/index.vue | 2 +- 34 files changed, 23 insertions(+), 239 deletions(-) delete mode 100644 nladmin-ui/src/api/system/dept.js delete mode 100644 nladmin-ui/src/api/system/grid.js delete mode 100644 nladmin-ui/src/api/system/gridField.js delete mode 100644 nladmin-ui/src/api/system/menu.js rename nladmin-ui/src/{api => views}/generator/genConfig.js (100%) rename nladmin-ui/src/{api => views}/generator/generator.js (100%) rename nladmin-ui/src/{api/monitor => views/monitor/log}/log.js (100%) rename nladmin-ui/src/{api/monitor => views/monitor/online}/online.js (100%) rename nladmin-ui/src/{api/system => views/system/auto}/autorun.js (100%) rename nladmin-ui/src/{api => views/system}/logicflow/stage.js (100%) rename nladmin-ui/src/{api => views/system}/logicflow/stageImage.js (100%) rename nladmin-ui/src/{api/system => views/system/redis}/redis.js (100%) rename nladmin-ui/src/{api/system => views/system/user/center}/code.js (100%) diff --git a/nladmin-ui/src/api/system/dept.js b/nladmin-ui/src/api/system/dept.js deleted file mode 100644 index 145887a..0000000 --- a/nladmin-ui/src/api/system/dept.js +++ /dev/null @@ -1,60 +0,0 @@ -import request from '@/utils/request' - -export function getDepts(params) { - return request({ - url: 'api/dept', - method: 'get', - params - }) -} - -export function getDeptTree(params) { - return request({ - url: '/api/dept/allTree', - method: 'get', - params - }) -} - -export function getDeptSuperior(ids) { - const data = ids.length || ids.length === 0 ? ids : Array.of(ids) - return request({ - url: 'api/dept/superior', - method: 'post', - data - }) -} - -export function getDeptvo(params) { - return request({ - url: 'api/dept/vo', - method: 'get', - params - }) -} - -export function add(data) { - return request({ - url: 'api/dept', - method: 'post', - data - }) -} - -export function del(ids) { - return request({ - url: 'api/dept', - method: 'delete', - data: ids - }) -} - -export function edit(data) { - return request({ - url: 'api/dept', - method: 'put', - data - }) -} - -export default { add, edit, del, getDepts, getDeptSuperior, getDeptvo, getDeptTree } diff --git a/nladmin-ui/src/api/system/grid.js b/nladmin-ui/src/api/system/grid.js deleted file mode 100644 index 02857d4..0000000 --- a/nladmin-ui/src/api/system/grid.js +++ /dev/null @@ -1,33 +0,0 @@ -import request from '@/utils/request' - -export function add(data) { - return request({ - url: 'api/grid', - method: 'post', - data - }) -} - -export function del(ids) { - return request({ - url: 'api/grid/', - method: 'delete', - data: ids - }) -} - -export function edit(data) { - return request({ - url: 'api/grid', - method: 'put', - data - }) -} -export function selectList() { - return request({ - url: 'api/grid/selectList', - method: 'get' - }) -} - -export default { add, edit, del, selectList } diff --git a/nladmin-ui/src/api/system/gridField.js b/nladmin-ui/src/api/system/gridField.js deleted file mode 100644 index a207188..0000000 --- a/nladmin-ui/src/api/system/gridField.js +++ /dev/null @@ -1,50 +0,0 @@ -import request from '@/utils/request' - -export function add(data) { - return request({ - url: 'api/gridField', - method: 'post', - data - }) -} -export function batchAdd(json) { // use - return request({ - url: 'api/gridField/batchAdd', - method: 'post', - data: json - }) -} - -export function del(ids) { - return request({ - url: 'api/gridField/', - method: 'delete', - data: ids - }) -} - -export function edit(data) { - return request({ - url: 'api/gridField', - method: 'put', - data - }) -} - -export function getGridFieldsById(id) { // use - return request({ - url: 'api/gridField/getGridFields', - method: 'post', - data: id - }) -} - -export function getGridFieldsByCode(grid_code) { // use - return request({ - url: 'api/gridField/getGridFieldsByCode', - method: 'post', - data: grid_code - }) -} - -export default { add, edit, del, batchAdd, getGridFieldsById, getGridFieldsByCode } diff --git a/nladmin-ui/src/api/system/menu.js b/nladmin-ui/src/api/system/menu.js deleted file mode 100644 index 7050f81..0000000 --- a/nladmin-ui/src/api/system/menu.js +++ /dev/null @@ -1,73 +0,0 @@ -import request from '@/utils/request' - -export function getMenusTree(pid) { - return request({ - url: 'api/sysMenu/lazy?pid=' + pid, - method: 'get' - }) -} - -export function getMenus(params) { - return request({ - url: 'api/sysMenu', - method: 'get', - params - }) -} - -export function getMenusByRole(params) { - return request({ - url: 'api/sysMenu/getMenusByRole', - method: 'post', - data: params - }) -} - -export function getMenuSuperior(ids) { - const data = ids.length || ids.length === 0 ? ids : Array.of(ids) - return request({ - url: 'api/sysMenu/superior', - method: 'post', - data - }) -} - -export function getChild(id) { - return request({ - url: 'api/sysMenu/child?id=' + id, - method: 'get' - }) -} - -export function buildMenus(data) { - return request({ - url: 'api/sysMenu/build?systemType=' + data, - method: 'get' - }) -} - -export function add(data) { - return request({ - url: 'api/sysMenu', - method: 'post', - data - }) -} - -export function del(ids) { - return request({ - url: 'api/sysMenu', - method: 'delete', - data: ids - }) -} - -export function edit(data) { - return request({ - url: 'api/sysMenu', - method: 'put', - data - }) -} - -export default { add, edit, del, getMenusTree, getMenuSuperior, getMenus, getChild, getMenusByRole } diff --git a/nladmin-ui/src/router/index.js b/nladmin-ui/src/router/index.js index 3b2226c..30be333 100644 --- a/nladmin-ui/src/router/index.js +++ b/nladmin-ui/src/router/index.js @@ -3,7 +3,7 @@ import store from '@/store' import NProgress from 'nprogress' // progress bar import 'nprogress/nprogress.css' // progress bar style import { getToken } from '@/utils/auth' // getToken from cookie -import { buildMenus } from '@/api/system/menu' +import { buildMenus } from '@/views/system/menu/menu' import { filterAsyncRouter } from '@/store/modules/permission' import i18n from '@/i18n' diff --git a/nladmin-ui/src/views/generator/config.vue b/nladmin-ui/src/views/generator/config.vue index 0ad0ed8..ec72ea4 100644 --- a/nladmin-ui/src/views/generator/config.vue +++ b/nladmin-ui/src/views/generator/config.vue @@ -202,8 +202,8 @@