feat: 账户授权
This commit is contained in:
@ -28,7 +28,7 @@
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
<FilterBlock @onSearch="handleSearch" @onReset="handleReset" />
|
||||
<FilterBlock v-model:query="query" @onSearch="handleSearch" @onReset="handleReset" />
|
||||
</div>
|
||||
|
||||
<div
|
||||
@ -72,7 +72,7 @@
|
||||
</template>
|
||||
<div v-else>
|
||||
<a-space v-if="isAbnormalStatus" class="flex items-center">
|
||||
<a-button class="w-96px err-btn" size="mini">
|
||||
<a-button class="w-96px err-btn" size="mini" @click="handleOpenAbnormalAccount">
|
||||
<template #default>查看异常账号</template>
|
||||
</a-button>
|
||||
</a-space>
|
||||
@ -84,6 +84,7 @@
|
||||
:selectedItems="selectedItems"
|
||||
@selectionChange="handleSelectionChange"
|
||||
@delete="handleDelete"
|
||||
@openEdit="handleOpenEdit"
|
||||
/>
|
||||
<div class="pagination-box">
|
||||
<a-pagination
|
||||
@ -160,6 +161,7 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
const getData = async () => {
|
||||
console.log('getData');
|
||||
// const { page, pageSize } = pageInfo;
|
||||
// const { code, data, total } = await getMediaAccounts({
|
||||
// page,
|
||||
@ -176,7 +178,7 @@ const getData = async () => {
|
||||
name: '全球',
|
||||
account_id: 1,
|
||||
mobile: 1777777,
|
||||
status: 1,
|
||||
status: 3,
|
||||
platform: 0,
|
||||
operator: {
|
||||
name: '小周',
|
||||
@ -191,6 +193,15 @@ const getData = async () => {
|
||||
{
|
||||
name: '标签2',
|
||||
},
|
||||
{
|
||||
name: '标签3',
|
||||
},
|
||||
{
|
||||
name: '标签4',
|
||||
},
|
||||
{
|
||||
name: '标签5',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -198,7 +209,7 @@ const getData = async () => {
|
||||
name: '全球2',
|
||||
account_id: 1,
|
||||
mobile: 1777777,
|
||||
status: 1,
|
||||
status: 4,
|
||||
platform: 0,
|
||||
operator: {
|
||||
name: '小周',
|
||||
@ -217,13 +228,16 @@ const getData = async () => {
|
||||
},
|
||||
];
|
||||
};
|
||||
const handleSearch = (newQuery) => {
|
||||
query.value = { ...newQuery };
|
||||
const reload = () => {
|
||||
pageInfo.page = 1;
|
||||
getData();
|
||||
};
|
||||
const handleSearch = () => {
|
||||
getData();
|
||||
};
|
||||
const handleReset = () => {
|
||||
query.value = cloneDeep(INITIAL_QUERY);
|
||||
getData();
|
||||
reload();
|
||||
};
|
||||
|
||||
const onPageChange = (current) => {
|
||||
@ -232,8 +246,7 @@ const onPageChange = (current) => {
|
||||
};
|
||||
const onPageSizeChange = (pageSize) => {
|
||||
pageInfo.pageSize = pageSize;
|
||||
pageInfo.page = 1;
|
||||
getData();
|
||||
reload();
|
||||
};
|
||||
|
||||
const handleOpenGroupModal = () => {
|
||||
@ -262,12 +275,12 @@ const handleChangeAll = (val) => {
|
||||
};
|
||||
const handleBatchDelete = () => {
|
||||
const ids = selectedItems.value.map((item) => item.id);
|
||||
const names = selectedItems.value.map((item) => `“${item.name}”`).join(',');
|
||||
const names = selectedItems.value.map((item) => `"${item.name}"`).join(',');
|
||||
deleteAccountRef.value?.open({ id: ids, name: names });
|
||||
};
|
||||
const handleDelete = (item) => {
|
||||
const { id, name } = item;
|
||||
deleteAccountRef.value?.open({ id, name: `“${name}”` });
|
||||
deleteAccountRef.value?.open({ id, name: `"${name}"` });
|
||||
};
|
||||
const handleCloseTip = () => {
|
||||
selectedItems.value = [];
|
||||
@ -279,6 +292,10 @@ const handleBatchTag = () => {
|
||||
const handleBatchGroup = () => {
|
||||
batchGroupModalRef.value?.open(selectedItems.value);
|
||||
};
|
||||
const handleOpenAbnormalAccount = () => {
|
||||
query.value.status = 2;
|
||||
reload();
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user