From a06cb42a7a0986e2fb495cefdc875caa086f92bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=BA=A2=E4=B8=BD?= <1181930680@qq.com> Date: Wed, 24 Jul 2024 14:11:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/monitor/online.ts | 31 +++++++++ src/components/pagination/index.vue | 49 ++++++++++++++ src/plugins/customComponents.ts | 2 + src/views/content/link/edit.vue | 6 +- src/views/monitor/online/index.vue | 85 ++++++++++++++++++++++++ src/views/monitor/online/querySchemas.ts | 19 ++++++ 6 files changed, 189 insertions(+), 3 deletions(-) create mode 100644 src/api/monitor/online.ts create mode 100644 src/components/pagination/index.vue create mode 100644 src/views/monitor/online/index.vue create mode 100644 src/views/monitor/online/querySchemas.ts diff --git a/src/api/monitor/online.ts b/src/api/monitor/online.ts new file mode 100644 index 0000000..712489e --- /dev/null +++ b/src/api/monitor/online.ts @@ -0,0 +1,31 @@ +import { http } from '@/utils/http/axios'; + +/** + * @description: 列表 + */ +export function getOnlineList(params?) { + return http.request({ + url: '/online/list', + method: 'GET', + params, + }); +} +/** + * @description: 强退 + */ +export function onlineOut(id) { + return http.request({ + url: '/online/logout/'+id, + method: 'DELETE', + }); +} +/** + * @description: 批量删除 + */ +export function dataSourceBatchDelete(data:any) { + return http.request({ + url: '/data/source/batchDelete', + method: 'DELETE', + data + }); + } \ No newline at end of file diff --git a/src/components/pagination/index.vue b/src/components/pagination/index.vue new file mode 100644 index 0000000..c110ab6 --- /dev/null +++ b/src/components/pagination/index.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/plugins/customComponents.ts b/src/plugins/customComponents.ts index 8e6d74a..c143a75 100644 --- a/src/plugins/customComponents.ts +++ b/src/plugins/customComponents.ts @@ -1,5 +1,6 @@ import { PageWrapper, PageFooter } from '@/components/Page'; import NumberInput from '@/components/numberInput/index.vue'; +import pagination from '@/components/pagination/index.vue'; import icon from '@/components/icon/index.vue'; import { BasicTable } from '@/components/Table'; import { BasicForm } from '@/components/Form/index'; @@ -11,6 +12,7 @@ export function setupCustomComponents(app) { app.component('PageWrapper', PageWrapper); app.component('PageFooter', PageFooter); app.component('NumberInput',NumberInput) + app.component('pagination',pagination) app.component('icon',icon) app.component('BasicTable',BasicTable) app.component('BasicForm',BasicForm) diff --git a/src/views/content/link/edit.vue b/src/views/content/link/edit.vue index b7bcc71..da4009b 100644 --- a/src/views/content/link/edit.vue +++ b/src/views/content/link/edit.vue @@ -28,7 +28,7 @@ :rules="{ required: true, message: '请选择类型', trigger: 'change' }"> @@ -92,9 +92,9 @@ const formRef = shallowRef(); const formData = reactive({ id: "", name: "", - type: 1, + type: "", url: "", - form: 1, + form: "", image: "", status:1, sort: 0 diff --git a/src/views/monitor/online/index.vue b/src/views/monitor/online/index.vue new file mode 100644 index 0000000..917c366 --- /dev/null +++ b/src/views/monitor/online/index.vue @@ -0,0 +1,85 @@ + + + + + diff --git a/src/views/monitor/online/querySchemas.ts b/src/views/monitor/online/querySchemas.ts new file mode 100644 index 0000000..9b31f3d --- /dev/null +++ b/src/views/monitor/online/querySchemas.ts @@ -0,0 +1,19 @@ +import { FormSchema } from '@/components/Form/index'; +export const schemas: FormSchema[] = [ + { + field: 'ipAddr', + component: 'Input', + label: '登录IP', + componentProps: { + placeholder: '请输入登录IP', + }, + }, + { + field: 'username', + component: 'Input', + label: '登录账号', + componentProps: { + placeholder: '请输入登录账号', + }, + }, +];