From 1aa7839a54759a5f151b5c87c1fb3a7f3ea3a43b Mon Sep 17 00:00:00 2001 From: JiangQiming <291854119@qq.com> Date: Sun, 29 Jan 2023 16:02:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=80=9A=E7=9F=A5=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E8=B0=83=E8=AF=95=E9=A1=B5=E9=9D=A2+=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/notice/config.ts | 5 +- src/components/ValueItem/index.vue | 2 +- src/views/notice/Config/Debug/index.vue | 201 +++++++++++++++++++++ src/views/notice/Config/Log/index.vue | 13 ++ src/views/notice/Config/SyncUser/index.vue | 13 ++ src/views/notice/Config/index.vue | 19 +- src/views/notice/Template/types.d.ts | 1 + 7 files changed, 245 insertions(+), 9 deletions(-) create mode 100644 src/views/notice/Config/Debug/index.vue create mode 100644 src/views/notice/Config/Log/index.vue create mode 100644 src/views/notice/Config/SyncUser/index.vue diff --git a/src/api/notice/config.ts b/src/api/notice/config.ts index d6e29cc5..ccdebc7c 100644 --- a/src/api/notice/config.ts +++ b/src/api/notice/config.ts @@ -1,4 +1,5 @@ import { patch, post, get, remove } from '@/utils/request' +import { TemplateFormData } from '@/views/notice/Template/types' export default { // 列表 @@ -10,8 +11,8 @@ export default { // 修改 update: (data: any) => patch(`/notifier/config`, data), del: (id: string) => remove(`/notifier/config/${id}`), - getTemplate: (data: any, id: string) => post(`/notifier/template/${id}/_query`, data), - getTemplateDetail: (id: string) => get(`/notifier/template/${id}/detail`), + getTemplate: (data: any, id: string) => post(`/notifier/template/${id}/_query`, data), + getTemplateDetail: (id: string) => get(`/notifier/template/${id}/detail`), debug: (data: any, configId: string, templateId: string) => post(`/notifier/${configId}/${templateId}/_send`, data), getHistory: (data: any, id: string) => post(`/notify/history/config/${id}/_query`, data), // 获取所有平台用户 diff --git a/src/components/ValueItem/index.vue b/src/components/ValueItem/index.vue index 7a01b89e..3e7528ae 100644 --- a/src/components/ValueItem/index.vue +++ b/src/components/ValueItem/index.vue @@ -109,7 +109,7 @@ const props = defineProps({ // 组件类型 itemType: { type: String, - default: () => 'geoPoint', + default: () => 'string', }, // 下拉选择框下拉数据 options: { diff --git a/src/views/notice/Config/Debug/index.vue b/src/views/notice/Config/Debug/index.vue new file mode 100644 index 00000000..4da9e494 --- /dev/null +++ b/src/views/notice/Config/Debug/index.vue @@ -0,0 +1,201 @@ + + + + + diff --git a/src/views/notice/Config/Log/index.vue b/src/views/notice/Config/Log/index.vue new file mode 100644 index 00000000..a3e86cd8 --- /dev/null +++ b/src/views/notice/Config/Log/index.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/src/views/notice/Config/SyncUser/index.vue b/src/views/notice/Config/SyncUser/index.vue new file mode 100644 index 00000000..a3e86cd8 --- /dev/null +++ b/src/views/notice/Config/SyncUser/index.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/src/views/notice/Config/index.vue b/src/views/notice/Config/index.vue index 0408912d..e901e2ca 100644 --- a/src/views/notice/Config/index.vue +++ b/src/views/notice/Config/index.vue @@ -150,6 +150,8 @@ + + @@ -158,13 +160,12 @@ import configApi from '@/api/notice/config'; import type { ActionsType } from '@/components/Table/index.vue'; import { getImage, LocalStore } from '@/utils/comm'; import { message } from 'ant-design-vue'; -// import Import from './Import/index.vue'; -// import Export from './Export/index.vue'; -// import Process from './Process/index.vue'; -// import Save from './Save/index.vue'; import { BASE_API_PATH, TOKEN_KEY } from '@/utils/variable'; import { NOTICE_METHOD, MSG_TYPE } from '@/views/notice/const'; +import SyncUser from './SyncUser/index.vue' +import Debug from './Debug/index.vue' +import Log from './Log/index.vue' let providerList: any = []; Object.keys(MSG_TYPE).forEach((key) => { @@ -274,6 +275,10 @@ const handleView = (id: string) => { message.warn(id + '暂未开发'); }; +const syncVis = ref(false); +const debugVis = ref(false); +const logVis = ref(false); +const currentConfig = ref>>(); const getActions = ( data: Partial>, type: 'card' | 'table', @@ -301,7 +306,8 @@ const getActions = ( }, icon: 'BugOutlined', onClick: () => { - // debugVis.value = true; + debugVis.value = true; + currentConfig.value = data; }, }, { @@ -312,7 +318,8 @@ const getActions = ( }, icon: 'BarsOutlined', onClick: () => { - // debugVis.value = true; + logVis.value = true; + currentConfig.value = data; }, }, { diff --git a/src/views/notice/Template/types.d.ts b/src/views/notice/Template/types.d.ts index 160924a2..54aad7ff 100644 --- a/src/views/notice/Template/types.d.ts +++ b/src/views/notice/Template/types.d.ts @@ -14,6 +14,7 @@ interface IVariableDefinitions { name: string; type: string; format: string; + value?: string; } interface IMarkDown {