|
|
@ -10,14 +10,29 @@ |
|
|
|
<a-button type="primary" |
|
|
|
<a-button type="primary" |
|
|
|
:disabled="state.single" |
|
|
|
:disabled="state.single" |
|
|
|
@click="handleEdit()" |
|
|
|
@click="handleEdit()" |
|
|
|
>修改第三方</a-button> |
|
|
|
>修改企业</a-button> |
|
|
|
<a-button type="primary" |
|
|
|
<a-button type="primary" |
|
|
|
:disabled="state.multiple" |
|
|
|
:disabled="state.multiple" |
|
|
|
@click="handleDel()" |
|
|
|
@click="handleDel()" |
|
|
|
>删除第三方</a-button> |
|
|
|
>删除企业</a-button> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #action="{ record }"> |
|
|
|
<template #action="{ record }"> |
|
|
|
<TableAction :actions="[ |
|
|
|
<TableAction :actions="[ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: '加入黑名单', |
|
|
|
|
|
|
|
icon: 'fa6-regular:pen-to-square', |
|
|
|
|
|
|
|
onClick: handleBlacklist.bind(null, record) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: '加入白名单', |
|
|
|
|
|
|
|
icon: 'fa6-regular:pen-to-square', |
|
|
|
|
|
|
|
onClick: handleWhitelist.bind(null, record) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: '推送申请', |
|
|
|
|
|
|
|
icon: 'fa6-regular:pen-to-square', |
|
|
|
|
|
|
|
onClick: handlePushAdd.bind(null, record) |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: '编辑', |
|
|
|
label: '编辑', |
|
|
|
icon: 'fa6-regular:pen-to-square', |
|
|
|
icon: 'fa6-regular:pen-to-square', |
|
|
@ -51,7 +66,12 @@ |
|
|
|
import ThirdPartyModal from './ThirdPartyModal.vue'; |
|
|
|
import ThirdPartyModal from './ThirdPartyModal.vue'; |
|
|
|
import { columns, searchFormSchema } from './thirdParty.data'; |
|
|
|
import { columns, searchFormSchema } from './thirdParty.data'; |
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'; |
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'; |
|
|
|
|
|
|
|
import { addPushPassList } from '/@/api/platform/common/controller/pushPassList'; |
|
|
|
|
|
|
|
import { addPushUserManage } from '/@/api/platform/common/controller/pushUserManage'; |
|
|
|
|
|
|
|
import {useUserStore} from '/@/store/modules/user'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const userStore = useUserStore(); |
|
|
|
|
|
|
|
const userInfoStore = userStore.getUserInfo; |
|
|
|
/** 类型规范统一声明定义区域 */ |
|
|
|
/** 类型规范统一声明定义区域 */ |
|
|
|
interface TableState { |
|
|
|
interface TableState { |
|
|
|
single: boolean; |
|
|
|
single: boolean; |
|
|
@ -84,7 +104,7 @@ |
|
|
|
clickToRowSelect: false, |
|
|
|
clickToRowSelect: false, |
|
|
|
showIndexColumn: false, |
|
|
|
showIndexColumn: false, |
|
|
|
actionColumn: { |
|
|
|
actionColumn: { |
|
|
|
width: 220, |
|
|
|
width: 450, |
|
|
|
title: '操作', |
|
|
|
title: '操作', |
|
|
|
dataIndex: 'action', |
|
|
|
dataIndex: 'action', |
|
|
|
slots: { customRender: 'action' }, |
|
|
|
slots: { customRender: 'action' }, |
|
|
@ -114,6 +134,58 @@ |
|
|
|
openModal(true, { _tag: 'edit', record }); |
|
|
|
openModal(true, { _tag: 'edit', record }); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function handleWhitelist(record?: Recordable) { |
|
|
|
|
|
|
|
createConfirm({ |
|
|
|
|
|
|
|
iconType: 'warning', |
|
|
|
|
|
|
|
title: '警告', |
|
|
|
|
|
|
|
content: `是否添加白名单编号为${record?.userId}的数据?`, |
|
|
|
|
|
|
|
onOk: async () => { |
|
|
|
|
|
|
|
await addPushPassList({ |
|
|
|
|
|
|
|
fromPushId: record?.userId, |
|
|
|
|
|
|
|
toPushId: userInfoStore.id, |
|
|
|
|
|
|
|
type: '1' |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
createMessage.success('添加成功!'); |
|
|
|
|
|
|
|
handleRefreshTable(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function handleBlacklist(record?: Recordable) { |
|
|
|
|
|
|
|
createConfirm({ |
|
|
|
|
|
|
|
iconType: 'warning', |
|
|
|
|
|
|
|
title: '警告', |
|
|
|
|
|
|
|
content: `是否添加黑名单编号为${record?.userId}的数据?`, |
|
|
|
|
|
|
|
onOk: async () => { |
|
|
|
|
|
|
|
await addPushPassList({ |
|
|
|
|
|
|
|
fromPushId: record?.userId, |
|
|
|
|
|
|
|
toPushId: userInfoStore.id, |
|
|
|
|
|
|
|
type: '0' |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
createMessage.success('添加成功!'); |
|
|
|
|
|
|
|
handleRefreshTable(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function handlePushAdd(record?: Recordable) { |
|
|
|
|
|
|
|
createConfirm({ |
|
|
|
|
|
|
|
iconType: 'warning', |
|
|
|
|
|
|
|
title: '警告', |
|
|
|
|
|
|
|
content: `是否添加推送申请编号为${record?.userId}的数据?`, |
|
|
|
|
|
|
|
onOk: async () => { |
|
|
|
|
|
|
|
await addPushUserManage({ |
|
|
|
|
|
|
|
fromUserId: record?.userId, |
|
|
|
|
|
|
|
toUserId: userInfoStore.id, |
|
|
|
|
|
|
|
userName: record?.entName, |
|
|
|
|
|
|
|
type: '1' |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
createMessage.success('申请成功!'); |
|
|
|
|
|
|
|
handleRefreshTable(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 删除按钮操作,行内删除 */ |
|
|
|
/** 删除按钮操作,行内删除 */ |
|
|
|
async function handleDel(record?: Recordable) { |
|
|
|
async function handleDel(record?: Recordable) { |
|
|
|
const ids = record?.id || getSelectRowKeys(); |
|
|
|
const ids = record?.id || getSelectRowKeys(); |
|
|
|