|
|
|
@ -4,6 +4,21 @@
@@ -4,6 +4,21 @@
|
|
|
|
|
@register="registerTable" |
|
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
|
> |
|
|
|
|
<template #expandedRowRender="{ record }"> |
|
|
|
|
<BasicTable :searchInfo="{ concernUserId: record.concernUserId }" @register="pushTypeRegisterTable"> |
|
|
|
|
<template #bodyCell="{ column, record }"> |
|
|
|
|
<template v-if="column.key === 'action'"> |
|
|
|
|
<TableAction :actions="[ |
|
|
|
|
{ |
|
|
|
|
label: '编辑', |
|
|
|
|
icon: 'fa6-regular:pen-to-square', |
|
|
|
|
onClick: handlePushTypeEdit.bind(null, record) |
|
|
|
|
}]" |
|
|
|
|
/> |
|
|
|
|
</template> |
|
|
|
|
</template> |
|
|
|
|
</BasicTable> |
|
|
|
|
</template> |
|
|
|
|
<template #toolbar> |
|
|
|
|
<a-button |
|
|
|
|
type="primary" |
|
|
|
@ -33,6 +48,7 @@
@@ -33,6 +48,7 @@
|
|
|
|
|
</template> |
|
|
|
|
</BasicTable> |
|
|
|
|
<ConcernModal @register="registerModal" @success="handleRefreshTable"/> |
|
|
|
|
<TypeModal @register="pushTypeRegisterModal" @success="handleRefreshPushTypeTable"/> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
@ -42,9 +58,12 @@
@@ -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 @@
@@ -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 @@
@@ -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 @@
@@ -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 @@
@@ -129,4 +180,8 @@
|
|
|
|
|
reload(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function handleRefreshPushTypeTable() { |
|
|
|
|
pushTypeReload(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
|