feat: 走查-交互逻辑调整

This commit is contained in:
rd
2025-07-05 14:27:07 +08:00
parent 12f81cdfc4
commit 9b8e96a2e5
15 changed files with 141 additions and 71 deletions

View File

@ -8,9 +8,9 @@
<div class="filter-wrap bg-#fff rounded-8px border-1px border-#D7D7D9 border-solid px-24px pb-20px mb-16px"> <div class="filter-wrap bg-#fff rounded-8px border-1px border-#D7D7D9 border-solid px-24px pb-20px mb-16px">
<div class="top flex h-64px py-10px justify-between items-center"> <div class="top flex h-64px py-10px justify-between items-center">
<div class="flex items-center"> <div class="flex items-center">
<p class="text-18px font-400 lh-26px color-#211F24 title">数据总览</p> <p class="text-18px font-400 lh-26px color-#211F24 mr-4px title">数据总览</p>
<a-tooltip content="数据纵览"> <a-tooltip content="数据纵览">
<img :src="icon1" width="14" height="14" class="ml-4px" /> <icon-question-circle size="16" class="color-#737478" />
</a-tooltip> </a-tooltip>
</div> </div>
</div> </div>

View File

@ -7,7 +7,9 @@
<div class="title-row"> <div class="title-row">
<div class="flex items-center"> <div class="flex items-center">
<span class="cts !text-18px !lh-26px mr-4px title">笔记详情</span> <span class="cts !text-18px !lh-26px mr-4px title">笔记详情</span>
<icon-question-circle size="16" class="color-#737478" /> <a-tooltip content="数据纵览">
<icon-question-circle size="16" class="color-#737478" />
</a-tooltip>
</div> </div>
</div> </div>
<div class="filter-row flex my-16px"> <div class="filter-row flex my-16px">

View File

@ -6,7 +6,7 @@
<div class="account-detail-wrap"> <div class="account-detail-wrap">
<div class="flex items-center mb-16px cursor-pointer" @click="handleBack"> <div class="flex items-center mb-16px cursor-pointer" @click="handleBack">
<icon-left size="16" /> <icon-left size="16" />
<spa class="cts ml-8px">账号详情</spa> <spa class="cts title ml-8px">账号详情</spa>
</div> </div>
<AccountInfo /> <AccountInfo />
<NoteTable /> <NoteTable />

View File

@ -2,10 +2,6 @@
* @Author: RenXiaoDong * @Author: RenXiaoDong
* @Date: 2025-06-26 17:44:16 * @Date: 2025-06-26 17:44:16
--> -->
<!--
* @Author: RenXiaoDong
* @Date: 2025-06-26 17:23:52
-->
<template> <template>
<a-modal <a-modal
v-model:visible="visible" v-model:visible="visible"
@ -32,7 +28,7 @@ import { ref } from 'vue';
import { deleteMediaAccount, batchDeleteMediaAccounts } from '@/api/all/propertyMarketing'; import { deleteMediaAccount, batchDeleteMediaAccounts } from '@/api/all/propertyMarketing';
import icon1 from '@/assets/img/media-account/icon-warn-1.png'; import icon1 from '@/assets/img/media-account/icon-warn-1.png';
const emits = defineEmits(['update', 'close']); const emits = defineEmits(['update', 'close', 'batchUpdate']);
const visible = ref(false); const visible = ref(false);
const accountId = ref(null); const accountId = ref(null);
@ -51,7 +47,7 @@ const open = (record) => {
const { id = null, name = '' } = record; const { id = null, name = '' } = record;
accountId.value = id; accountId.value = id;
accountName.value = name; accountName.value = name;
console.log({ name });
visible.value = true; visible.value = true;
}; };
@ -61,7 +57,7 @@ async function onDelete() {
const { code } = await _fn(_params); const { code } = await _fn(_params);
if (code === 200) { if (code === 200) {
AMessage.success('删除成功'); AMessage.success('删除成功');
emits('update'); isBatch.value ? emits('batchUpdate') : emits('update');
onClose(); onClose();
} }
} }

View File

@ -30,9 +30,17 @@
action="/" action="/"
draggable draggable
:custom-request="handleUpload" :custom-request="handleUpload"
accept=".xlsx,.xls,.docx,.doc" accept=".xlsx,.xls"
:show-file-list="false" :show-file-list="false"
/> >
<template #upload-button>
<div class="upload-box">
<icon-plus size="14" class="mb-16px" />
<span class="text mb-4px">点击或拖拽文件到此处上传</span>
<span class="tip">支持 xls, xlsx格式</span>
</div>
</template>
</a-upload>
</template> </template>
<template v-else> <template v-else>
<div class="flex items-center"> <div class="flex items-center">
@ -43,7 +51,7 @@
}" }"
> >
<div class="flex items-center"> <div class="flex items-center">
<icon-file size="16" /> <icon-file size="16" class="flex-shrink-0" />
<span class="name ml-8px">{{ fileName }}</span> <span class="name ml-8px">{{ fileName }}</span>
</div> </div>
<span <span
@ -266,7 +274,10 @@ const open = (accountId = '') => {
const getAccountDetail = async () => { const getAccountDetail = async () => {
const { code, data } = await getMediaAccountsDetail(id.value); const { code, data } = await getMediaAccountsDetail(id.value);
if (code === 200) { if (code === 200) {
form.value = data; form.value = {
...data,
group_id: data.group_id === 0 ? undefined : data.group_id,
};
} }
}; };

View File

@ -1,4 +1,4 @@
@import "@/views/property-marketing/component.scss"; @import '@/views/property-marketing/component.scss';
.add-account-modal { .add-account-modal {
border-radius: 8px; border-radius: 8px;
.w-240px { .w-240px {
@ -46,6 +46,36 @@
margin-bottom: 16px; margin-bottom: 16px;
} }
} }
.upload-box {
display: flex;
height: 120px;
padding: 0 16px;
flex-direction: column;
justify-content: center;
align-items: center;
border-radius: 2px;
border: 1px dashed var(--Border-1, #d7d7d9);
background: var(--BG-200, #f2f3f5);
.text {
color: var(--Text-1, #211f24);
text-align: center;
font-family: 'PingFang SC';
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: 22px;
}
.tip {
color: var(--Text-3, #737478);
text-align: center;
font-family: 'PuHuiTi-Regular';
font-size: 12px;
font-style: normal;
font-weight: 400;
line-height: 20px;
}
}
} }
.upload-dragger { .upload-dragger {
border: 1px dashed #d9d9d9; border: 1px dashed #d9d9d9;

View File

@ -30,7 +30,7 @@
<a-form-item label="选择分组" required> <a-form-item label="选择分组" required>
<template v-if="editType === 'all'"> <template v-if="editType === 'all'">
<div class="flex items-center w-100%"> <div class="flex items-center w-100%">
<a-select v-model="form.group_id" :options="groupOptions" placeholder="请选择..." class="flex-1" /> <GroupSelect v-model="form.group_id" :options="groupOptions" :multiple="false" class="flex-1" />
</div> </div>
</template> </template>
</a-form-item> </a-form-item>
@ -47,7 +47,7 @@
<a-table-column title="选择分组" data-index="group_id"> <a-table-column title="选择分组" data-index="group_id">
<template #cell="{ record }"> <template #cell="{ record }">
<div class="flex items-center w-100%"> <div class="flex items-center w-100%">
<GroupSelect v-model="record.group_id" :options="groupOptions" /> <GroupSelect v-model="record.group_id" :options="groupOptions" :multiple="false" />
</div> </div>
</template> </template>
</a-table-column> </a-table-column>
@ -96,10 +96,7 @@ const open = (accountList = []) => {
const getTags = async () => { const getTags = async () => {
const { code, data } = await fetchAccountGroups(); const { code, data } = await fetchAccountGroups();
if (code === 200) { if (code === 200) {
groupOptions.value = data.map((item) => ({ groupOptions.value = data;
label: item.name,
value: item.id,
}));
} }
}; };

View File

@ -16,7 +16,7 @@
<div class="filter-row-item flex items-center"> <div class="filter-row-item flex items-center">
<span class="s1 !color-#211F24 mr-12px">分组名称</span> <span class="s1 !color-#211F24 mr-12px">分组名称</span>
<a-space size="medium" class="w-240px"> <a-space size="medium" class="w-240px">
<a-input v-model="query.name" placeholder="请搜索..." size="medium" allow-clear @change="handleSearch"> <a-input v-model="query.name" placeholder="请搜索..." size="medium" allow-clear @change="reload">
<template #prefix> <template #prefix>
<icon-search /> <icon-search />
</template> </template>
@ -92,8 +92,19 @@ import icon3 from '@/assets/img/media-account/icon-add.png';
const emit = defineEmits(['update']); const emit = defineEmits(['update']);
const INITIAL_QUERY = {
name: '',
sort_column: undefined,
sort_order: undefined,
};
const INITIAL_PAGE_INFO = {
page: 1,
pageSize: 20,
total: 0,
};
const visible = ref(false); const visible = ref(false);
const isEdit = ref(false); // const isEdit = ref(false);
const addGroupRef = ref(null); const addGroupRef = ref(null);
const deleteGroupRef = ref(null); const deleteGroupRef = ref(null);
@ -101,16 +112,8 @@ const deleteGroupRef = ref(null);
const list = ref([]); const list = ref([]);
const loading = ref(false); const loading = ref(false);
const query = ref({ const query = ref(cloneDeep(INITIAL_QUERY));
name: '', const pageInfo = ref(cloneDeep(INITIAL_PAGE_INFO));
sort_column: undefined,
sort_order: undefined,
});
const pageInfo = ref({
page: 1,
pageSize: 20,
total: 0,
});
const columns = [ const columns = [
{ title: '分组名称', dataIndex: 'name' }, { title: '分组名称', dataIndex: 'name' },
@ -137,12 +140,8 @@ function open() {
} }
const close = () => { const close = () => {
query.value.name = ''; query.value = cloneDeep(INITIAL_QUERY);
query.value.sort_column = undefined; pageInfo.value = cloneDeep(INITIAL_PAGE_INFO);
query.value.sort_order = undefined;
pageInfo.value.page = 1;
pageInfo.value.pageSize = 20;
pageInfo.value.total = 0;
list.value = []; list.value = [];
visible.value = false; visible.value = false;
}; };

View File

@ -8,18 +8,17 @@
:title="isEdit ? '编辑标签' : '添加新标签'" :title="isEdit ? '编辑标签' : '添加新标签'"
modal-class="tags-manage-modal" modal-class="tags-manage-modal"
width="400px" width="400px"
:footer="false"
@close="onClose" @close="onClose"
> >
<a-form ref="formRef" :model="form" :rules="rules" layout="horizontal" auto-label-width> <a-form ref="formRef" :model="form" :rules="rules" layout="horizontal" auto-label-width>
<a-form-item :label="isEdit ? '标签名称' : '新标签名称'" field="name" required> <a-form-item :label="isEdit ? '标签名称' : '新标签名称'" field="name" required>
<a-input v-model="form.name" placeholder="请输入…" /> <a-input v-model="form.name" placeholder="请输入…" />
</a-form-item> </a-form-item>
<div class="text-right">
<a-button class="cancel-btn" @click="onClose">取消</a-button>
<a-button type="primary" class="ml-16px" @click="onSubmit">确认</a-button>
</div>
</a-form> </a-form>
<template #footer>
<a-button class="cancel-btn" @click="onClose">取消</a-button>
<a-button type="primary" class="ml-16px" @click="onSubmit">确认</a-button>
</template>
</a-modal> </a-modal>
</template> </template>

View File

@ -3,24 +3,17 @@
* @Date: 2025-06-26 17:23:52 * @Date: 2025-06-26 17:23:52
--> -->
<template> <template>
<a-modal <a-modal v-model:visible="visible" title="删除标签" width="400px" modal-class="account-manage-modal" @close="onClose">
v-model:visible="visible" <div class="flex items-center">
title="删除标签"
width="400px"
:footer="false"
modal-class="account-manage-modal"
@close="onClose"
>
<div class="flex items-center mb-24px">
<img :src="icon1" width="20" height="20" class="mr-12px" /> <img :src="icon1" width="20" height="20" class="mr-12px" />
<span>确认删除 "{{ tagName }}" 这个标签吗</span> <span>确认删除 "{{ tagName }}" 这个标签吗</span>
</div> </div>
<div class="text-right"> <template #footer>
<a-button class="cancel-btn" size="large" @click="onClose">取消</a-button> <a-button class="cancel-btn" size="large" @click="onClose">取消</a-button>
<a-button type="primary" class="ml-16px danger-btn" status="danger" size="large" @click="onDelete" <a-button type="primary" class="ml-16px danger-btn" status="danger" size="large" @click="onDelete"
>确认删除</a-button >确认删除</a-button
> >
</div> </template>
</a-modal> </a-modal>
</template> </template>

View File

@ -4,7 +4,7 @@
border-radius: 8px; border-radius: 8px;
.arco-modal-body { .arco-modal-body {
padding: 24px 24px 44px !important; // padding: 24px 24px 44px !important;
overflow: hidden; overflow: hidden;
display: flex; display: flex;
flex-direction: column; flex-direction: column;

View File

@ -103,9 +103,10 @@
<GroupManageModal ref="groupManageModalRef" @update="filterBlockRef?.getGroups" /> <GroupManageModal ref="groupManageModalRef" @update="filterBlockRef?.getGroups" />
<TagsManageModal ref="tagsManageModalRef" @update="filterBlockRef?.getTags" /> <TagsManageModal ref="tagsManageModalRef" @update="filterBlockRef?.getTags" />
<AddAccountModal ref="addAccountModalRef" @update="getData" /> <AddAccountModal ref="addAccountModalRef" @update="getData" />
<DeleteAccountModal ref="deleteAccountRef" @update="getData" />
<BatchTagModal ref="batchTagModalRef" @update="getData" /> <DeleteAccountModal ref="deleteAccountRef" @update="getData" @batchUpdate="onBatchSuccess" />
<BatchGroupModal ref="batchGroupModalRef" @update="getData" /> <BatchTagModal ref="batchTagModalRef" @update="onBatchSuccess" />
<BatchGroupModal ref="batchGroupModalRef" @update="onBatchSuccess" />
</div> </div>
</template> </template>
@ -267,6 +268,10 @@ const handleBatchTag = () => {
const handleBatchGroup = () => { const handleBatchGroup = () => {
batchGroupModalRef.value?.open(selectedItems.value); batchGroupModalRef.value?.open(selectedItems.value);
}; };
const onBatchSuccess = () => {
selectedItems.value = [];
getData();
};
const handleOpenAbnormalAccount = () => { const handleOpenAbnormalAccount = () => {
query.value.status = 2; query.value.status = 2;
reload(); reload();

View File

@ -31,7 +31,7 @@ export const CUSTOM_FIELDS = [
dataIndex: 'home_view_number', dataIndex: 'home_view_number',
prop: 'home_view_number', prop: 'home_view_number',
title: '主页访客数', title: '主页访客数',
width: 180, width: 200,
tooltip: '账号所有内容的主页访客数', tooltip: '账号所有内容的主页访客数',
align: 'right', align: 'right',
}, },
@ -39,7 +39,7 @@ export const CUSTOM_FIELDS = [
dataIndex: 'home_view_rate', dataIndex: 'home_view_rate',
prop: 'home_view_rate', prop: 'home_view_rate',
title: '主页访客数环比', title: '主页访客数环比',
width: 180, width: 200,
tooltip: '账号所有内容的主页访客数环比', tooltip: '账号所有内容的主页访客数环比',
align: 'right', align: 'right',
suffix: '%', suffix: '%',
@ -99,7 +99,7 @@ export const CUSTOM_FIELDS = [
dataIndex: 'collect_rate', dataIndex: 'collect_rate',
prop: 'collect_rate', prop: 'collect_rate',
title: '收藏数环比', title: '收藏数环比',
width: 180, width: 200,
tooltip: '账号所有内容的收藏数环比', tooltip: '账号所有内容的收藏数环比',
align: 'right', align: 'right',
suffix: '%', suffix: '%',
@ -119,7 +119,7 @@ export const CUSTOM_FIELDS = [
dataIndex: 'barrage_rate', dataIndex: 'barrage_rate',
prop: 'barrage_rate', prop: 'barrage_rate',
title: '弹幕数环比', title: '弹幕数环比',
width: 180, width: 200,
tooltip: '账号所有内容的弹幕数环比', tooltip: '账号所有内容的弹幕数环比',
align: 'right', align: 'right',
suffix: '%', suffix: '%',
@ -139,7 +139,7 @@ export const CUSTOM_FIELDS = [
dataIndex: 'rise_fans_rate', dataIndex: 'rise_fans_rate',
prop: 'rise_fans_rate', prop: 'rise_fans_rate',
title: '笔记涨粉数环比', title: '笔记涨粉数环比',
width: 180, width: 200,
tooltip: '账号所有内容的笔记涨粉数环比', tooltip: '账号所有内容的笔记涨粉数环比',
align: 'right', align: 'right',
suffix: '%', suffix: '%',
@ -151,7 +151,7 @@ export const CUSTOM_FIELDS = [
dataIndex: 'share_number', dataIndex: 'share_number',
prop: 'share_number', prop: 'share_number',
title: '笔记分享量', title: '笔记分享量',
width: 180, width: 200,
tooltip: '账号所有内容的笔记分享量', tooltip: '账号所有内容的笔记分享量',
align: 'right', align: 'right',
}, },
@ -159,7 +159,7 @@ export const CUSTOM_FIELDS = [
dataIndex: 'share_rate', dataIndex: 'share_rate',
prop: 'share_rate', prop: 'share_rate',
title: '笔记分享量环比', title: '笔记分享量环比',
width: 180, width: 200,
tooltip: '账号所有内容的笔记分享量环比', tooltip: '账号所有内容的笔记分享量环比',
align: 'right', align: 'right',
suffix: '%', suffix: '%',
@ -172,7 +172,7 @@ export const CUSTOM_FIELDS = [
dataIndex: 'avg_view_time', dataIndex: 'avg_view_time',
prop: 'avg_view_time', prop: 'avg_view_time',
title: '笔记平均浏览数', title: '笔记平均浏览数',
width: 180, width: 200,
tooltip: '账号所有内容的笔记平均浏览数', tooltip: '账号所有内容的笔记平均浏览数',
align: 'right', align: 'right',
}, },
@ -180,7 +180,7 @@ export const CUSTOM_FIELDS = [
dataIndex: 'avg_view_time_rate', dataIndex: 'avg_view_time_rate',
prop: 'avg_view_time_rate', prop: 'avg_view_time_rate',
title: '笔记平均浏览数环比', title: '笔记平均浏览数环比',
width: 180, width: 220,
tooltip: '账号所有内容的笔记平均浏览数环比', tooltip: '账号所有内容的笔记平均浏览数环比',
align: 'right', align: 'right',
suffix: '%', suffix: '%',

View File

@ -33,7 +33,15 @@
:custom-request="handleUpload" :custom-request="handleUpload"
accept=".xlsx,.xls,.docx,.doc" accept=".xlsx,.xls,.docx,.doc"
:show-file-list="false" :show-file-list="false"
/> >
<template #upload-button>
<div class="upload-box">
<icon-plus size="14" class="mb-16px" />
<span class="text mb-4px">点击或拖拽文件到此处上传</span>
<span class="tip">支持 xls, xlsx格式</span>
</div>
</template>
</a-upload>
</template> </template>
<template v-else> <template v-else>
<div class="flex items-center"> <div class="flex items-center">
@ -44,7 +52,7 @@
}" }"
> >
<div class="flex items-center"> <div class="flex items-center">
<icon-file size="16" /> <icon-file size="16" class="flex-shrink-0" />
<span class="name ml-8px">{{ fileName }}</span> <span class="name ml-8px">{{ fileName }}</span>
</div> </div>
<span <span

View File

@ -46,6 +46,36 @@
margin-bottom: 16px; margin-bottom: 16px;
} }
} }
.upload-box {
display: flex;
height: 120px;
padding: 0 16px;
flex-direction: column;
justify-content: center;
align-items: center;
border-radius: 2px;
border: 1px dashed var(--Border-1, #d7d7d9);
background: var(--BG-200, #f2f3f5);
.text {
color: var(--Text-1, #211f24);
text-align: center;
font-family: 'PingFang SC';
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: 22px;
}
.tip {
color: var(--Text-3, #737478);
text-align: center;
font-family: 'PuHuiTi-Regular';
font-size: 12px;
font-style: normal;
font-weight: 400;
line-height: 20px;
}
}
} }
.upload-dragger { .upload-dragger {
border: 1px dashed #d9d9d9; border: 1px dashed #d9d9d9;