From 547d2b14517bde387fa4fe46410e220155f9ae9d Mon Sep 17 00:00:00 2001 From: hzhfsa <1957214281@qq.com> Date: Thu, 16 Nov 2023 10:14:50 +0800 Subject: [PATCH 1/7] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=B1=95?= =?UTF-8?q?=E5=BC=80/=E6=94=B6=E8=B5=B7=E5=BC=82=E5=B8=B8=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deliver-front/vue/components.d.ts | 6 +----- deliver-front/vue/src/store/index.ts | 3 +++ deliver-front/vue/src/views/Message/index.vue | 8 ++++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/deliver-front/vue/components.d.ts b/deliver-front/vue/components.d.ts index 35d94e5b..0720bfc2 100644 --- a/deliver-front/vue/components.d.ts +++ b/deliver-front/vue/components.d.ts @@ -7,22 +7,17 @@ export {} declare module 'vue' { export interface GlobalComponents { - AAffix: typeof import('ant-design-vue/es')['Affix'] AAvatar: typeof import('ant-design-vue/es')['Avatar'] ABreadcrumb: typeof import('ant-design-vue/es')['Breadcrumb'] AButton: typeof import('ant-design-vue/es')['Button'] ACard: typeof import('ant-design-vue/es')['Card'] ACardMeta: typeof import('ant-design-vue/es')['CardMeta'] ACol: typeof import('ant-design-vue/es')['Col'] - ADescriptions: typeof import('ant-design-vue/es')['Descriptions'] - ADescriptionsItem: typeof import('ant-design-vue/es')['DescriptionsItem'] - ADrawer: typeof import('ant-design-vue/es')['Drawer'] AForm: typeof import('ant-design-vue/es')['Form'] AFormItem: typeof import('ant-design-vue/es')['FormItem'] AInput: typeof import('ant-design-vue/es')['Input'] ALayout: typeof import('ant-design-vue/es')['Layout'] ALayoutContent: typeof import('ant-design-vue/es')['LayoutContent'] - ALayoutFooter: typeof import('ant-design-vue/es')['LayoutFooter'] ALayoutHeader: typeof import('ant-design-vue/es')['LayoutHeader'] ALayoutSider: typeof import('ant-design-vue/es')['LayoutSider'] AMenu: typeof import('ant-design-vue/es')['Menu'] @@ -36,6 +31,7 @@ declare module 'vue' { ARow: typeof import('ant-design-vue/es')['Row'] ASelect: typeof import('ant-design-vue/es')['Select'] ASelectOption: typeof import('ant-design-vue/es')['SelectOption'] + AStatistic: typeof import('ant-design-vue/es')['Statistic'] ASubMenu: typeof import('ant-design-vue/es')['SubMenu'] ASwitch: typeof import('ant-design-vue/es')['Switch'] ATable: typeof import('ant-design-vue/es')['Table'] diff --git a/deliver-front/vue/src/store/index.ts b/deliver-front/vue/src/store/index.ts index eca97856..0ae09efc 100644 --- a/deliver-front/vue/src/store/index.ts +++ b/deliver-front/vue/src/store/index.ts @@ -8,6 +8,9 @@ export const useStore = defineStore('store', { }, getters: {}, actions: { + getCollapse() { + return this.collapse + }, changeCollapse() { this.collapse = !this.collapse } diff --git a/deliver-front/vue/src/views/Message/index.vue b/deliver-front/vue/src/views/Message/index.vue index dc41ae40..1e95b0b6 100644 --- a/deliver-front/vue/src/views/Message/index.vue +++ b/deliver-front/vue/src/views/Message/index.vue @@ -100,8 +100,8 @@ const getInnerData = (expanded, record): void => { // 判断是否点开 expandedRowKeys.length = 0 if (expanded === true) { - const b = record.key.toString() - expandedRowKeys.push(Number(b.slice(-1))) + const b = record.key + expandedRowKeys.push(b) innertemplatedata.length = 0 innertemplatedata.push(record) } else { @@ -179,7 +179,7 @@ const startDelete = (): void => { state.loading = false }) .catch(err => { - void message.error('查询失败,请检查网络~ (>︿<)') + void message.error('删除失败,请检查网络~ (>︿<)') console.error('An error occurred:', err) state.loading = false }) @@ -315,7 +315,7 @@ onMounted(() => { }) const a = computed(() => { - return store.$state.collapse ? 80 : 200 // 计算输入框应该有的高度 + return store.getCollapse() ? 80 : 200 // 计算输入框应该有的高度 }) -- Gitee From eb34f4a8ea25c4b824879b6b4e4853f9edea5588 Mon Sep 17 00:00:00 2001 From: hzhfsa <1957214281@qq.com> Date: Thu, 16 Nov 2023 11:22:08 +0800 Subject: [PATCH 2/7] =?UTF-8?q?style:=20=E8=A1=A8=E6=A0=BC=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deliver-front/vue/components.d.ts | 8 +++++--- deliver-front/vue/src/views/Message/index.vue | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/deliver-front/vue/components.d.ts b/deliver-front/vue/components.d.ts index 973ec7e7..c8f531e4 100644 --- a/deliver-front/vue/components.d.ts +++ b/deliver-front/vue/components.d.ts @@ -10,9 +10,9 @@ declare module 'vue' { AAvatar: typeof import('ant-design-vue/es')['Avatar'] ABreadcrumb: typeof import('ant-design-vue/es')['Breadcrumb'] AButton: typeof import('ant-design-vue/es')['Button'] + ACard: typeof import('ant-design-vue/es')['Card'] + ACardMeta: typeof import('ant-design-vue/es')['CardMeta'] ACol: typeof import('ant-design-vue/es')['Col'] - ADescriptions: typeof import('ant-design-vue/es')['Descriptions'] - ADescriptionsItem: typeof import('ant-design-vue/es')['DescriptionsItem'] AForm: typeof import('ant-design-vue/es')['Form'] AFormItem: typeof import('ant-design-vue/es')['FormItem'] AInput: typeof import('ant-design-vue/es')['Input'] @@ -23,14 +23,16 @@ declare module 'vue' { AMenu: typeof import('ant-design-vue/es')['Menu'] AMenuItem: typeof import('ant-design-vue/es')['MenuItem'] AModal: typeof import('ant-design-vue/es')['Modal'] + APagination: typeof import('ant-design-vue/es')['Pagination'] + APopconfirm: typeof import('ant-design-vue/es')['Popconfirm'] ARadioButton: typeof import('ant-design-vue/es')['RadioButton'] ARadioGroup: typeof import('ant-design-vue/es')['RadioGroup'] ARangePicker: typeof import('ant-design-vue/es')['RangePicker'] ARow: typeof import('ant-design-vue/es')['Row'] ASelect: typeof import('ant-design-vue/es')['Select'] ASelectOption: typeof import('ant-design-vue/es')['SelectOption'] - AStatistic: typeof import('ant-design-vue/es')['Statistic'] ASubMenu: typeof import('ant-design-vue/es')['SubMenu'] + ASwitch: typeof import('ant-design-vue/es')['Switch'] ATable: typeof import('ant-design-vue/es')['Table'] ATooltip: typeof import('ant-design-vue/es')['Tooltip'] Banner: typeof import('./src/components/Banner/index.vue')['default'] diff --git a/deliver-front/vue/src/views/Message/index.vue b/deliver-front/vue/src/views/Message/index.vue index 1e95b0b6..70a4da4f 100644 --- a/deliver-front/vue/src/views/Message/index.vue +++ b/deliver-front/vue/src/views/Message/index.vue @@ -323,7 +323,7 @@ const a = computed(() => { -
+
@@ -470,7 +470,7 @@ const a = computed(() => { #message-container { position: relative; width: 100%; - height: 100%; + // height: 100%; .showDelete { position: fixed; /* 将showDelete盒子设置为固定定位 */ inset-inline-end: 0; @@ -486,6 +486,8 @@ const a = computed(() => { transition: 0.2s; line-height: 40px; .box { + width: 15%; + height: 100%; margin-left: 2%; } .del { -- Gitee From 82cf216bcd21b610a7d17b428bcc5697da47f439 Mon Sep 17 00:00:00 2001 From: hzhfsa <1957214281@qq.com> Date: Thu, 16 Nov 2023 11:38:11 +0800 Subject: [PATCH 3/7] =?UTF-8?q?feat:=20=E5=8D=95=E9=A1=B9=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E5=8A=9F=E8=83=BD=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deliver-front/vue/src/views/Message/index.vue | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/deliver-front/vue/src/views/Message/index.vue b/deliver-front/vue/src/views/Message/index.vue index 70a4da4f..d068ba2c 100644 --- a/deliver-front/vue/src/views/Message/index.vue +++ b/deliver-front/vue/src/views/Message/index.vue @@ -198,7 +198,24 @@ const onSelectChange = (selectedRowKeys: Key[]): void => { } const onDelete = (id: number): void => { - console.log(id) + const arr: number[] = [] + arr.push(id) + const templates = { + ids: arr + } + deleteTemplate(templates) + .then(res => { + if (res.code === 200) { + void message.success('删除成功~ (*^▽^*)') + searchTemplate({ opt: 4 }) // + } + state.loading = false + }) + .catch(err => { + void message.error('删除失败,请检查网络~ (>︿<)') + console.error('An error occurred:', err) + state.loading = false + }) } /// 修改操作 @@ -268,7 +285,6 @@ const searchTemplate = ({ page, pageSize, opt }: SearchOptions = {}): void => { item.createTime = getDate(item.createTime) // eslint-disable-next-line item.templateStatus = item.templateStatus === 1 ? true : false - // item.key = index item.key = item.templateId const i = item templateTable.push(i) @@ -302,7 +318,6 @@ onMounted(() => { item.createTime = getDate(item.createTime) // eslint-disable-next-line item.templateStatus = item.templateStatus === 1 ? true : false - // item.key = index item.key = item.templateId templateTable.push(item) }) -- Gitee From df093a7c9c865e4056fe1fd5f396a3fe3e0fd154 Mon Sep 17 00:00:00 2001 From: hzhfsa <1957214281@qq.com> Date: Thu, 16 Nov 2023 12:08:40 +0800 Subject: [PATCH 4/7] =?UTF-8?q?feat:=20=E6=89=B9=E9=87=8F=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=8C=89=E9=92=AE=E6=96=B0=E5=A2=9E=E2=80=9C=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E7=A1=AE=E8=AE=A4=E5=88=A0=E9=99=A4=E2=80=9D=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deliver-front/vue/src/views/Message/index.vue | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/deliver-front/vue/src/views/Message/index.vue b/deliver-front/vue/src/views/Message/index.vue index d068ba2c..3f26e4bb 100644 --- a/deliver-front/vue/src/views/Message/index.vue +++ b/deliver-front/vue/src/views/Message/index.vue @@ -1,9 +1,9 @@ + + diff --git a/deliver-front/vue/src/views/Channel/index.vue b/deliver-front/vue/src/views/Channel/index.vue index ac574f12..8bb10ceb 100644 --- a/deliver-front/vue/src/views/Channel/index.vue +++ b/deliver-front/vue/src/views/Channel/index.vue @@ -1,6 +1,6 @@