From 767066f70a7e99622d74e55854f7dd01711a2b4c Mon Sep 17 00:00:00 2001 From: aoshiguchen <1052045476@qq.com> Date: Thu, 1 Sep 2022 17:17:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Elicense=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- neutrino-proxy-admin/src/api/license.js | 46 +++ neutrino-proxy-admin/src/api/portMapping.js | 9 + neutrino-proxy-admin/src/lang/zh.js | 8 +- neutrino-proxy-admin/src/router/index.js | 374 +++++++++--------- .../src/views/login/index.vue | 3 +- .../src/views/proxy/license.vue | 72 ++-- .../src/views/proxy/portMapping.vue | 36 +- .../src/views/system/portPool.vue | 4 +- .../src/views/system/user.vue | 2 +- .../controller/res/PortMappingListRes.java | 4 + .../proxy/server/dal/LicenseMapper.java | 10 +- .../proxy/server/dal/PortPoolMapper.java | 5 +- .../neutrino/proxy/server/dal/UserMapper.java | 11 +- .../proxy/server/service/LicenseService.java | 4 +- .../proxy/server/service/PortPoolService.java | 2 +- .../proxy/server/service/UserService.java | 4 +- 16 files changed, 352 insertions(+), 242 deletions(-) create mode 100644 neutrino-proxy-admin/src/api/license.js create mode 100644 neutrino-proxy-admin/src/api/portMapping.js diff --git a/neutrino-proxy-admin/src/api/license.js b/neutrino-proxy-admin/src/api/license.js new file mode 100644 index 00000000..be7fed0f --- /dev/null +++ b/neutrino-proxy-admin/src/api/license.js @@ -0,0 +1,46 @@ +import request from '@/utils/request' + +export function fetchList(query) { + return request({ + url: '/license/page', + method: 'get', + params: query + }) +} + +export function createLicense(data) { + return request({ + url: '/license/create', + method: 'post', + data + }) +} + +export function updateLicense(data) { + return request({ + url: '/license/update', + method: 'post', + data + }) +} + +export function updateEnableStatus(id, enable) { + return request({ + url: '/license/update/enable-status', + method: 'post', + data: { + id: id, + enable: enable + } + }) +} + +export function deleteLicense(id) { + return request({ + url: '/license/delete', + method: 'post', + params: { + id: id + } + }) +} diff --git a/neutrino-proxy-admin/src/api/portMapping.js b/neutrino-proxy-admin/src/api/portMapping.js new file mode 100644 index 00000000..e47c5d5d --- /dev/null +++ b/neutrino-proxy-admin/src/api/portMapping.js @@ -0,0 +1,9 @@ +import request from '@/utils/request' + +export function fetchList(query) { + return request({ + url: '/port-mapping/page', + method: 'get', + params: query + }) +} diff --git a/neutrino-proxy-admin/src/lang/zh.js b/neutrino-proxy-admin/src/lang/zh.js index 89984b47..007f9727 100644 --- a/neutrino-proxy-admin/src/lang/zh.js +++ b/neutrino-proxy-admin/src/lang/zh.js @@ -117,7 +117,13 @@ export default { disable: '禁用', enable: '启用', loginName: '登录名', - port: '端口' + port: '端口', + licenseName: 'License名称', + licenseKey: 'License Key', + isOnline: '在线状态', + enableStatus: '启用状态', + serverPort: '服务端口', + proxyClient: '代理客户端' }, errorLog: { tips: '请点击右上角bug小图标', diff --git a/neutrino-proxy-admin/src/router/index.js b/neutrino-proxy-admin/src/router/index.js index eef690b9..0f8c45f6 100644 --- a/neutrino-proxy-admin/src/router/index.js +++ b/neutrino-proxy-admin/src/router/index.js @@ -39,17 +39,19 @@ export const constantRouterMap = [ name: 'dashboard', meta: { title: 'dashboard', icon: 'dashboard', noCache: true } }] - }, { - path: '/documentation', - component: Layout, - redirect: '/documentation/index', - children: [{ - path: 'index', - component: _import('documentation/index'), - name: 'documentation', - meta: { title: 'documentation', icon: 'documentation', noCache: true } - }] } + + // , { + // path: '/documentation', + // component: Layout, + // redirect: '/documentation/index', + // children: [{ + // path: 'index', + // component: _import('documentation/index'), + // name: 'documentation', + // meta: { title: 'documentation', icon: 'documentation', noCache: true } + // }] + // } ] export default new Router({ @@ -59,183 +61,183 @@ export default new Router({ }) export const asyncRouterMap = [ - { - path: '/permission', - component: Layout, - redirect: '/permission/index', - meta: { roles: ['admin'] }, // you can set roles in root nav - children: [{ - path: 'index', - component: _import('permission/index'), - name: 'permission', - meta: { - title: 'permission', - icon: 'lock', - roles: ['admin'] // or you can only set roles in sub nav - } - }] - }, + // { + // path: '/permission', + // component: Layout, + // redirect: '/permission/index', + // meta: { roles: ['admin'] }, // you can set roles in root nav + // children: [{ + // path: 'index', + // component: _import('permission/index'), + // name: 'permission', + // meta: { + // title: 'permission', + // icon: 'lock', + // roles: ['admin'] // or you can only set roles in sub nav + // } + // }] + // }, + // + // { + // path: '/icon', + // component: Layout, + // children: [{ + // path: 'index', + // component: _import('svg-icons/index'), + // name: 'icons', + // meta: { title: 'icons', icon: 'icon', noCache: true } + // }] + // }, + // + // { + // path: '/components', + // component: Layout, + // redirect: 'noredirect', + // name: 'component-demo', + // meta: { + // title: 'components', + // icon: 'component' + // }, + // children: [ + // { path: 'tinymce', component: _import('components-demo/tinymce'), name: 'tinymce-demo', meta: { title: 'tinymce' }}, + // { path: 'markdown', component: _import('components-demo/markdown'), name: 'markdown-demo', meta: { title: 'markdown' }}, + // { path: 'json-editor', component: _import('components-demo/jsonEditor'), name: 'jsonEditor-demo', meta: { title: 'jsonEditor' }}, + // { path: 'dnd-list', component: _import('components-demo/dndList'), name: 'dndList-demo', meta: { title: 'dndList' }}, + // { path: 'splitpane', component: _import('components-demo/splitpane'), name: 'splitpane-demo', meta: { title: 'splitPane' }}, + // { path: 'avatar-upload', component: _import('components-demo/avatarUpload'), name: 'avatarUpload-demo', meta: { title: 'avatarUpload' }}, + // { path: 'dropzone', component: _import('components-demo/dropzone'), name: 'dropzone-demo', meta: { title: 'dropzone' }}, + // { path: 'sticky', component: _import('components-demo/sticky'), name: 'sticky-demo', meta: { title: 'sticky' }}, + // { path: 'count-to', component: _import('components-demo/countTo'), name: 'countTo-demo', meta: { title: 'countTo' }}, + // { path: 'mixin', component: _import('components-demo/mixin'), name: 'componentMixin-demo', meta: { title: 'componentMixin' }}, + // { path: 'back-to-top', component: _import('components-demo/backToTop'), name: 'backToTop-demo', meta: { title: 'backToTop' }} + // ] + // }, + // + // { + // path: '/charts', + // component: Layout, + // redirect: 'noredirect', + // name: 'charts', + // meta: { + // title: 'charts', + // icon: 'chart' + // }, + // children: [ + // { path: 'keyboard', component: _import('charts/keyboard'), name: 'keyboardChart', meta: { title: 'keyboardChart', noCache: true }}, + // { path: 'line', component: _import('charts/line'), name: 'lineChart', meta: { title: 'lineChart', noCache: true }}, + // { path: 'mixchart', component: _import('charts/mixChart'), name: 'mixChart', meta: { title: 'mixChart', noCache: true }} + // ] + // }, + // + // { + // path: '/example', + // component: Layout, + // redirect: '/example/table/complex-table', + // name: 'example', + // meta: { + // title: 'example', + // icon: 'example' + // }, + // children: [ + // { + // path: '/example/table', + // component: _import('example/table/index'), + // redirect: '/example/table/complex-table', + // name: 'Table', + // meta: { + // title: 'Table', + // icon: 'table' + // }, + // children: [ + // { path: 'dynamic-table', component: _import('example/table/dynamicTable/index'), name: 'dynamicTable', meta: { title: 'dynamicTable' }}, + // { path: 'drag-table', component: _import('example/table/dragTable'), name: 'dragTable', meta: { title: 'dragTable' }}, + // { path: 'inline-edit-table', component: _import('example/table/inlineEditTable'), name: 'inlineEditTable', meta: { title: 'inlineEditTable' }}, + // { path: 'complex-table', component: _import('example/table/complexTable'), name: 'complexTable', meta: { title: 'complexTable' }} + // ] + // }, + // { path: 'tab/index', icon: 'tab', component: _import('example/tab/index'), name: 'tab', meta: { title: 'tab' }} + // ] + // }, - { - path: '/icon', - component: Layout, - children: [{ - path: 'index', - component: _import('svg-icons/index'), - name: 'icons', - meta: { title: 'icons', icon: 'icon', noCache: true } - }] - }, - - { - path: '/components', - component: Layout, - redirect: 'noredirect', - name: 'component-demo', - meta: { - title: 'components', - icon: 'component' - }, - children: [ - { path: 'tinymce', component: _import('components-demo/tinymce'), name: 'tinymce-demo', meta: { title: 'tinymce' }}, - { path: 'markdown', component: _import('components-demo/markdown'), name: 'markdown-demo', meta: { title: 'markdown' }}, - { path: 'json-editor', component: _import('components-demo/jsonEditor'), name: 'jsonEditor-demo', meta: { title: 'jsonEditor' }}, - { path: 'dnd-list', component: _import('components-demo/dndList'), name: 'dndList-demo', meta: { title: 'dndList' }}, - { path: 'splitpane', component: _import('components-demo/splitpane'), name: 'splitpane-demo', meta: { title: 'splitPane' }}, - { path: 'avatar-upload', component: _import('components-demo/avatarUpload'), name: 'avatarUpload-demo', meta: { title: 'avatarUpload' }}, - { path: 'dropzone', component: _import('components-demo/dropzone'), name: 'dropzone-demo', meta: { title: 'dropzone' }}, - { path: 'sticky', component: _import('components-demo/sticky'), name: 'sticky-demo', meta: { title: 'sticky' }}, - { path: 'count-to', component: _import('components-demo/countTo'), name: 'countTo-demo', meta: { title: 'countTo' }}, - { path: 'mixin', component: _import('components-demo/mixin'), name: 'componentMixin-demo', meta: { title: 'componentMixin' }}, - { path: 'back-to-top', component: _import('components-demo/backToTop'), name: 'backToTop-demo', meta: { title: 'backToTop' }} - ] - }, - - { - path: '/charts', - component: Layout, - redirect: 'noredirect', - name: 'charts', - meta: { - title: 'charts', - icon: 'chart' - }, - children: [ - { path: 'keyboard', component: _import('charts/keyboard'), name: 'keyboardChart', meta: { title: 'keyboardChart', noCache: true }}, - { path: 'line', component: _import('charts/line'), name: 'lineChart', meta: { title: 'lineChart', noCache: true }}, - { path: 'mixchart', component: _import('charts/mixChart'), name: 'mixChart', meta: { title: 'mixChart', noCache: true }} - ] - }, - - { - path: '/example', - component: Layout, - redirect: '/example/table/complex-table', - name: 'example', - meta: { - title: 'example', - icon: 'example' - }, - children: [ - { - path: '/example/table', - component: _import('example/table/index'), - redirect: '/example/table/complex-table', - name: 'Table', - meta: { - title: 'Table', - icon: 'table' - }, - children: [ - { path: 'dynamic-table', component: _import('example/table/dynamicTable/index'), name: 'dynamicTable', meta: { title: 'dynamicTable' }}, - { path: 'drag-table', component: _import('example/table/dragTable'), name: 'dragTable', meta: { title: 'dragTable' }}, - { path: 'inline-edit-table', component: _import('example/table/inlineEditTable'), name: 'inlineEditTable', meta: { title: 'inlineEditTable' }}, - { path: 'complex-table', component: _import('example/table/complexTable'), name: 'complexTable', meta: { title: 'complexTable' }} - ] - }, - { path: 'tab/index', icon: 'tab', component: _import('example/tab/index'), name: 'tab', meta: { title: 'tab' }} - ] - }, - - { - path: '/form', - component: Layout, - redirect: 'noredirect', - name: 'form', - meta: { - title: 'form', - icon: 'form' - }, - children: [ - { path: 'create-form', component: _import('form/create'), name: 'createForm', meta: { title: 'createForm', icon: 'table' }}, - { path: 'edit-form', component: _import('form/edit'), name: 'editForm', meta: { title: 'editForm', icon: 'table' }} - ] - }, - - { - path: '/error', - component: Layout, - redirect: 'noredirect', - name: 'errorPages', - meta: { - title: 'errorPages', - icon: '404' - }, - children: [ - { path: '401', component: _import('errorPage/401'), name: 'page401', meta: { title: 'page401', noCache: true }}, - { path: '404', component: _import('errorPage/404'), name: 'page404', meta: { title: 'page404', noCache: true }} - ] - }, - - { - path: '/error-log', - component: Layout, - redirect: 'noredirect', - children: [{ path: 'log', component: _import('errorLog/index'), name: 'errorLog', meta: { title: 'errorLog', icon: 'bug' }}] - }, - - { - path: '/excel', - component: Layout, - redirect: '/excel/export-excel', - name: 'excel', - meta: { - title: 'excel', - icon: 'excel' - }, - children: [ - { path: 'export-excel', component: _import('excel/exportExcel'), name: 'exportExcel', meta: { title: 'exportExcel' }}, - { path: 'export-selected-excel', component: _import('excel/selectExcel'), name: 'selectExcel', meta: { title: 'selectExcel' }}, - { path: 'upload-excel', component: _import('excel/uploadExcel'), name: 'uploadExcel', meta: { title: 'uploadExcel' }} - ] - }, - - { - path: '/zip', - component: Layout, - redirect: '/zip/download', - children: [{ path: 'download', component: _import('zip/index'), name: 'exportZip', meta: { title: 'exportZip', icon: 'zip' }}] - }, - - { - path: '/theme', - component: Layout, - redirect: 'noredirect', - children: [{ path: 'index', component: _import('theme/index'), name: 'theme', meta: { title: 'theme', icon: 'theme' }}] - }, - - { - path: '/clipboard', - component: Layout, - redirect: 'noredirect', - children: [{ path: 'index', component: _import('clipboard/index'), name: 'clipboardDemo', meta: { title: 'clipboardDemo', icon: 'clipboard' }}] - }, - - { - path: '/i18n', - component: Layout, - children: [{ path: 'index', component: _import('i18n-demo/index'), name: 'i18n', meta: { title: 'i18n', icon: 'international' }}] - }, + // { + // path: '/form', + // component: Layout, + // redirect: 'noredirect', + // name: 'form', + // meta: { + // title: 'form', + // icon: 'form' + // }, + // children: [ + // { path: 'create-form', component: _import('form/create'), name: 'createForm', meta: { title: 'createForm', icon: 'table' }}, + // { path: 'edit-form', component: _import('form/edit'), name: 'editForm', meta: { title: 'editForm', icon: 'table' }} + // ] + // }, + // + // { + // path: '/error', + // component: Layout, + // redirect: 'noredirect', + // name: 'errorPages', + // meta: { + // title: 'errorPages', + // icon: '404' + // }, + // children: [ + // { path: '401', component: _import('errorPage/401'), name: 'page401', meta: { title: 'page401', noCache: true }}, + // { path: '404', component: _import('errorPage/404'), name: 'page404', meta: { title: 'page404', noCache: true }} + // ] + // }, + // + // { + // path: '/error-log', + // component: Layout, + // redirect: 'noredirect', + // children: [{ path: 'log', component: _import('errorLog/index'), name: 'errorLog', meta: { title: 'errorLog', icon: 'bug' }}] + // }, + // + // { + // path: '/excel', + // component: Layout, + // redirect: '/excel/export-excel', + // name: 'excel', + // meta: { + // title: 'excel', + // icon: 'excel' + // }, + // children: [ + // { path: 'export-excel', component: _import('excel/exportExcel'), name: 'exportExcel', meta: { title: 'exportExcel' }}, + // { path: 'export-selected-excel', component: _import('excel/selectExcel'), name: 'selectExcel', meta: { title: 'selectExcel' }}, + // { path: 'upload-excel', component: _import('excel/uploadExcel'), name: 'uploadExcel', meta: { title: 'uploadExcel' }} + // ] + // }, + // + // { + // path: '/zip', + // component: Layout, + // redirect: '/zip/download', + // children: [{ path: 'download', component: _import('zip/index'), name: 'exportZip', meta: { title: 'exportZip', icon: 'zip' }}] + // }, + // + // { + // path: '/theme', + // component: Layout, + // redirect: 'noredirect', + // children: [{ path: 'index', component: _import('theme/index'), name: 'theme', meta: { title: 'theme', icon: 'theme' }}] + // }, + // + // { + // path: '/clipboard', + // component: Layout, + // redirect: 'noredirect', + // children: [{ path: 'index', component: _import('clipboard/index'), name: 'clipboardDemo', meta: { title: 'clipboardDemo', icon: 'clipboard' }}] + // }, + // + // { + // path: '/i18n', + // component: Layout, + // children: [{ path: 'index', component: _import('i18n-demo/index'), name: 'i18n', meta: { title: 'i18n', icon: 'international' }}] + // }, { path: '*', redirect: '/404', hidden: true }, { diff --git a/neutrino-proxy-admin/src/views/login/index.vue b/neutrino-proxy-admin/src/views/login/index.vue index 898c6e4c..4a53d4bb 100644 --- a/neutrino-proxy-admin/src/views/login/index.vue +++ b/neutrino-proxy-admin/src/views/login/index.vue @@ -2,7 +2,8 @@
-

{{$t('login.title')}}

+ +

中微子代理