From 2dbe7b0d58a0a57fb605bab9b1d6c61a089276ba Mon Sep 17 00:00:00 2001 From: wangxiang <1827945911@qq.com> Date: Tue, 18 Apr 2023 18:36:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/common/push/pushConcern/index.vue | 57 ++++++++++++++++++- src/views/common/push/pushFan/index.vue | 58 +------------------- src/views/common/push/pushType/TypeModal.vue | 4 +- 3 files changed, 59 insertions(+), 60 deletions(-) diff --git a/src/views/common/push/pushConcern/index.vue b/src/views/common/push/pushConcern/index.vue index ecf9ad4..c259dae 100644 --- a/src/views/common/push/pushConcern/index.vue +++ b/src/views/common/push/pushConcern/index.vue @@ -4,6 +4,21 @@ @register="registerTable" @selection-change="handleSelectionChange" > + @@ -42,9 +58,12 @@ import { listPushConcernFan, delPushConcernFan } from '/@/api/platform/common/controller/pushConcernFan'; import { useModal } from '/@/components/Modal'; import ConcernModal from './ConcernModal.vue'; - import { columns, searchFormSchema } from './concern.data'; + import { columns, pushTypeColumns, searchFormSchema } from './concern.data'; import { useMessage } from '/@/hooks/web/useMessage'; import { useUserStore } from '/@/store/modules/user'; + import { listPushConcernFanType } from '/@/api/platform/common/controller/pushConcernFanType'; + import { searchFormSchema as pushTypeSearchFormSchema } from '/@/views/common/push/pushType/type.data'; + import TypeModal from '../pushType/TypeModal.vue'; const userStore = useUserStore(); const userInfoStore = userStore.getUserInfo; @@ -62,6 +81,7 @@ }); const { createConfirm, createMessage } = useMessage(); const [registerModal, { openModal }] = useModal(); + const [pushTypeRegisterModal, { openModal: pushTypeOpenModal }] = useModal(); const [registerTable, { reload, clearSelectedRowKeys, getSelectRowKeys }] = useTable({ title: '关注列表', api: listPushConcernFan, @@ -94,6 +114,32 @@ }, handleSearchInfoFn: () => clearSelectedRowKeys() }); + const [pushTypeRegisterTable, { reload: pushTypeReload, setColumns }] = useTable({ + title: '推送类型列表', + api: listPushConcernFanType, + rowKey: 'id', + columns: pushTypeColumns(handleRefreshPushTypeTable), + formConfig: { + compact: true, + labelWidth: 80, + schemas: pushTypeSearchFormSchema, + autoSubmitOnEnter: true, + showAdvancedButton: true, + autoAdvancedLine: 3, + }, + maxHeight: 150, + useSearchForm: true, + showTableSetting: true, + bordered: true, + clickToRowSelect: false, + showIndexColumn: false, + actionColumn: { + width: 220, + title: '操作', + dataIndex: 'action', + fixed: false + } + }); /** 处理多选框选中数据 */ function handleSelectionChange(selection?: Recordable) { @@ -108,6 +154,11 @@ openModal(true, { _tag: 'view', record, onType: '1' }); } + function handlePushTypeEdit(record?: Recordable) { + record = record || { id: getSelectRowKeys() }; + pushTypeOpenModal(true, { _tag: 'concernEdit', record, onlineRingtoneCreateId: record.concernUserId }); + } + /** 删除按钮操作,行内删除 */ async function handleDel(record?: Recordable) { const ids = record?.id || getSelectRowKeys(); @@ -129,4 +180,8 @@ reload(); } + function handleRefreshPushTypeTable() { + pushTypeReload(); + } + diff --git a/src/views/common/push/pushFan/index.vue b/src/views/common/push/pushFan/index.vue index d731f35..ab1e093 100644 --- a/src/views/common/push/pushFan/index.vue +++ b/src/views/common/push/pushFan/index.vue @@ -4,22 +4,6 @@ @register="registerTable" @selection-change="handleSelectionChange" > - @@ -64,12 +47,9 @@ import { listPushConcernFan, delPushConcernFan } from '/@/api/platform/common/controller/pushConcernFan'; import { useModal } from '/@/components/Modal'; import ConcernModal from '../pushConcern/ConcernModal.vue'; - import { columns, pushTypeColumns, searchFormSchema } from '../pushConcern/concern.data'; + import { columns, searchFormSchema } from '../pushConcern/concern.data'; import { useMessage } from '/@/hooks/web/useMessage'; import { useUserStore } from '/@/store/modules/user'; - import TypeModal from '../pushType/TypeModal.vue'; - import { listPushConcernFanType } from '/@/api/platform/common/controller/pushConcernFanType'; - import { searchFormSchema as pushTypeSearchFormSchema } from '/@/views/common/push/pushType/type.data'; const userStore = useUserStore(); const userInfoStore = userStore.getUserInfo; @@ -87,7 +67,6 @@ }); const { createConfirm, createMessage } = useMessage(); const [registerModal, { openModal }] = useModal(); - const [pushTypeRegisterModal, { openModal: pushTypeOpenModal }] = useModal(); const [registerTable, { reload, clearSelectedRowKeys, getSelectRowKeys }] = useTable({ title: '粉丝列表', api: listPushConcernFan, @@ -119,32 +98,6 @@ }, handleSearchInfoFn: () => clearSelectedRowKeys() }); - const [pushTypeRegisterTable, { reload: pushTypeReload, setColumns }] = useTable({ - title: '推送类型列表', - api: listPushConcernFanType, - rowKey: 'id', - columns: pushTypeColumns(handleRefreshPushTypeTable), - formConfig: { - compact: true, - labelWidth: 80, - schemas: pushTypeSearchFormSchema, - autoSubmitOnEnter: true, - showAdvancedButton: true, - autoAdvancedLine: 3, - }, - maxHeight: 150, - useSearchForm: true, - showTableSetting: true, - bordered: true, - clickToRowSelect: false, - showIndexColumn: false, - actionColumn: { - width: 220, - title: '操作', - dataIndex: 'action', - fixed: false - } - }); /** 处理多选框选中数据 */ function handleSelectionChange(selection?: Recordable) { @@ -159,11 +112,6 @@ openModal(true, { _tag: 'view', record }); } - function handlePushTypeEdit(record?: Recordable) { - record = record || { id: getSelectRowKeys() }; - pushTypeOpenModal(true, { _tag: 'fanEdit', record, onlineRingtoneCreateId: record.fanUserId }); - } - /** 删除按钮操作,行内删除 */ async function handleDel(record?: Recordable) { const ids = record?.id || getSelectRowKeys(); @@ -185,8 +133,4 @@ reload(); } - function handleRefreshPushTypeTable() { - pushTypeReload(); - } - diff --git a/src/views/common/push/pushType/TypeModal.vue b/src/views/common/push/pushType/TypeModal.vue index 259ac6e..8458400 100644 --- a/src/views/common/push/pushType/TypeModal.vue +++ b/src/views/common/push/pushType/TypeModal.vue @@ -66,7 +66,7 @@ props.title = '编辑推送类型'; await setFieldsValue(await getPushType(refId)); break; - case 'fanEdit': + case 'concernEdit': props.title = '编辑粉丝推送类型'; await setFieldsValue(await getPushConcernFanType(refId)); break; @@ -90,7 +90,7 @@ case 'edit': await editPushType(formData); break; - case 'fanEdit': + case 'concernEdit': await editPushConcernFanType(formData); break; }