|
|
|
@ -4,21 +4,6 @@
@@ -4,21 +4,6 @@
|
|
|
|
|
@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" |
|
|
|
@ -36,15 +21,11 @@
@@ -36,15 +21,11 @@
|
|
|
|
|
onClick: handleViewEdit.bind(null, record) |
|
|
|
|
}]" |
|
|
|
|
:dropDownActions="[ |
|
|
|
|
{ |
|
|
|
|
label: '推送通知', |
|
|
|
|
icon: 'fa6-regular:pen-to-square', |
|
|
|
|
onClick: ()=>{} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '取消关注', |
|
|
|
|
icon: 'ant-design:delete-outlined', |
|
|
|
|
color: 'error', |
|
|
|
|
disabled: record?.cfType == 1, |
|
|
|
|
onClick: handleDel.bind(null, record) |
|
|
|
|
}]" |
|
|
|
|
/> |
|
|
|
@ -52,22 +33,18 @@
@@ -52,22 +33,18 @@
|
|
|
|
|
</template> |
|
|
|
|
</BasicTable> |
|
|
|
|
<ConcernModal @register="registerModal" @success="handleRefreshTable"/> |
|
|
|
|
<TypeModal @register="pushTypeRegisterModal" @success="handleRefreshPushTypeTable"/> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script lang="ts" setup> |
|
|
|
|
import {onMounted, reactive, toRaw} from 'vue'; |
|
|
|
|
import { reactive, toRaw } from 'vue'; |
|
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
|
|
|
|
import { listPushConcernFan, delPushConcernFan } from '/@/api/platform/common/controller/pushConcernFan'; |
|
|
|
|
import { useModal } from '/@/components/Modal'; |
|
|
|
|
import ConcernModal from './ConcernModal.vue'; |
|
|
|
|
import TypeModal from '../pushType/TypeModal.vue'; |
|
|
|
|
import { columns, searchFormSchema, pushTypeColumns } from './concern.data'; |
|
|
|
|
import { columns, searchFormSchema } from './concern.data'; |
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'; |
|
|
|
|
import { useUserStore } from '/@/store/modules/user'; |
|
|
|
|
import { searchFormSchema as pushTypeSearchFormSchema} from '../pushType/type.data'; |
|
|
|
|
import { listPushConcernFanType } from '/@/api/platform/common/controller/pushConcernFanType'; |
|
|
|
|
|
|
|
|
|
const userStore = useUserStore(); |
|
|
|
|
const userInfoStore = userStore.getUserInfo; |
|
|
|
@ -85,7 +62,6 @@ import {onMounted, reactive, toRaw} from 'vue';
@@ -85,7 +62,6 @@ import {onMounted, reactive, toRaw} from 'vue';
|
|
|
|
|
}); |
|
|
|
|
const { createConfirm, createMessage } = useMessage(); |
|
|
|
|
const [registerModal, { openModal }] = useModal(); |
|
|
|
|
const [pushTypeRegisterModal, { openModal: pushTypeOpenModal }] = useModal(); |
|
|
|
|
const [registerTable, { reload, clearSelectedRowKeys, getSelectRowKeys }] = useTable({ |
|
|
|
|
title: '关注列表', |
|
|
|
|
api: listPushConcernFan, |
|
|
|
@ -118,32 +94,6 @@ import {onMounted, reactive, toRaw} from 'vue';
@@ -118,32 +94,6 @@ import {onMounted, reactive, toRaw} from 'vue';
|
|
|
|
|
}, |
|
|
|
|
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) { |
|
|
|
@ -155,12 +105,7 @@ import {onMounted, reactive, toRaw} from 'vue';
@@ -155,12 +105,7 @@ import {onMounted, reactive, toRaw} from 'vue';
|
|
|
|
|
/** 查看按钮操作,行内查看 */ |
|
|
|
|
function handleViewEdit(record?: Recordable) { |
|
|
|
|
record = record || { id: getSelectRowKeys() }; |
|
|
|
|
openModal(true, { _tag: 'view', record }); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function handlePushTypeEdit(record?: Recordable) { |
|
|
|
|
record = record || { id: getSelectRowKeys() }; |
|
|
|
|
pushTypeOpenModal(true, { _tag: 'concernEdit', record, onlineRingtoneCreateId: record.concernUserId }); |
|
|
|
|
openModal(true, { _tag: 'view', record, onType: '1' }); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 删除按钮操作,行内删除 */ |
|
|
|
@ -184,8 +129,4 @@ import {onMounted, reactive, toRaw} from 'vue';
@@ -184,8 +129,4 @@ import {onMounted, reactive, toRaw} from 'vue';
|
|
|
|
|
reload(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function handleRefreshPushTypeTable() { |
|
|
|
|
pushTypeReload(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
|