perf: 走查问题调整

This commit is contained in:
rd
2025-08-29 12:03:04 +08:00
parent 83d11f1f53
commit 98d7adc550
23 changed files with 289 additions and 156 deletions

View File

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none">
<path d="M15.75 1.5C16.5784 1.5 17.25 2.17157 17.25 3V15C17.25 15.8284 16.5784 16.5 15.75 16.5H3.75C2.92157 16.5 2.25 15.8284 2.25 15V12.75H3.75C4.57843 12.75 5.25 12.0784 5.25 11.25C5.25 10.4216 4.57843 9.75 3.75 9.75H2.25V8.25H3.75C4.57843 8.25 5.25 7.57843 5.25 6.75C5.25 5.92157 4.57843 5.25 3.75 5.25H2.25V3C2.25 2.17157 2.92157 1.5 3.75 1.5H15.75Z" fill="#6D4CFE"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1248 4.59375C11.7298 4.59375 13.031 5.89492 13.031 7.5C13.031 8.3054 12.7033 9.03394 12.1741 9.5603C13.4265 10.175 14.3629 11.3342 14.6724 12.7302C14.7518 13.0889 14.5249 13.4439 14.1663 13.5234C13.8076 13.6028 13.4526 13.3767 13.3731 13.0181C13.0428 11.5287 11.7128 10.4151 10.1248 10.415C8.53684 10.4152 7.20745 11.5288 6.87721 13.0181C6.79767 13.3768 6.44201 13.603 6.08326 13.5234C5.72474 13.4438 5.49846 13.0888 5.57789 12.7302C5.88742 11.3342 6.82321 10.1743 8.07545 9.55957C7.54658 9.03325 7.21852 8.30508 7.21852 7.5C7.21852 5.89501 8.51981 4.59389 10.1248 4.59375ZM10.1248 5.90625C9.24468 5.90639 8.53102 6.61988 8.53102 7.5C8.53102 8.33817 9.17843 9.02345 10.0003 9.08716C10.0416 9.08607 10.0831 9.08496 10.1248 9.08496C10.1664 9.08496 10.2079 9.08607 10.2493 9.08716C11.0713 9.02369 11.7185 8.33834 11.7185 7.5C11.7185 6.6198 11.005 5.90625 10.1248 5.90625Z" fill="white"/>
<path d="M3.75 10.5C4.16421 10.5 4.5 10.8358 4.5 11.25C4.5 11.6642 4.16421 12 3.75 12H1.5C1.08579 12 0.75 11.6642 0.75 11.25C0.75 10.8358 1.08579 10.5 1.5 10.5H3.75Z" fill="#39C6E9"/>
<path d="M3.75 6C4.16421 6 4.5 6.33579 4.5 6.75C4.5 7.16421 4.16421 7.5 3.75 7.5H1.5C1.08579 7.5 0.75 7.16421 0.75 6.75C0.75 6.33579 1.08579 6 1.5 6H3.75Z" fill="#39C6E9"/>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none">
<path d="M7.19971 1.875C7.61392 1.875 7.94971 2.21079 7.94971 2.625V7.5C7.94971 7.91421 7.61392 8.25 7.19971 8.25H2.25C1.83579 8.25 1.5 7.91421 1.5 7.5V2.625C1.5 2.21079 1.83579 1.875 2.25 1.875H7.19971Z" fill="#6D4CFE"/>
<path d="M7.19971 9.75C7.61392 9.75 7.94971 10.0858 7.94971 10.5V15.375C7.94971 15.7892 7.61392 16.125 7.19971 16.125H2.25C1.83579 16.125 1.5 15.7892 1.5 15.375V10.5C1.5 10.0858 1.83579 9.75 2.25 9.75H7.19971Z" fill="#6D4CFE"/>
<path d="M15.0747 1.875C15.4889 1.875 15.8247 2.21079 15.8247 2.625V7.5C15.8247 7.91421 15.4889 8.25 15.0747 8.25H10.125C9.71079 8.25 9.375 7.91421 9.375 7.5V2.625C9.375 2.21079 9.71079 1.875 10.125 1.875H15.0747Z" fill="#6D4CFE"/>
<path d="M15.0747 9.75C15.4889 9.75 15.8247 10.0858 15.8247 10.5V15.375C15.8247 15.7892 15.4889 16.125 15.0747 16.125H10.125C9.71079 16.125 9.375 15.7892 9.375 15.375V10.5C9.375 10.0858 9.71079 9.75 10.125 9.75H15.0747Z" fill="#39C6E9"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none">
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.625 1.875C2.21079 1.875 1.875 2.21079 1.875 2.625V7.5C1.875 7.91421 2.21079 8.25 2.625 8.25H7.5C7.91421 8.25 8.25 7.91421 8.25 7.5V2.625C8.25 2.21079 7.91421 1.875 7.5 1.875H2.625ZM3.375 6.75V3.375H6.75V6.75H3.375ZM10.5 1.875C10.0858 1.875 9.75 2.21079 9.75 2.625V7.5C9.75 7.91421 10.0858 8.25 10.5 8.25H15.375C15.7892 8.25 16.125 7.91421 16.125 7.5V2.625C16.125 2.21079 15.7892 1.875 15.375 1.875H10.5ZM11.25 6.75V3.375H14.625V6.75H11.25ZM1.875 10.5C1.875 10.0858 2.21079 9.75 2.625 9.75H7.5C7.91421 9.75 8.25 10.0858 8.25 10.5V15.375C8.25 15.7892 7.91421 16.125 7.5 16.125H2.625C2.21079 16.125 1.875 15.7892 1.875 15.375V10.5ZM3.375 11.25V14.625H6.75V11.25H3.375ZM10.5 9.75C10.0858 9.75 9.75 10.0858 9.75 10.5V15.375C9.75 15.7892 10.0858 16.125 10.5 16.125H15.375C15.7892 16.125 16.125 15.7892 16.125 15.375V10.5C16.125 10.0858 15.7892 9.75 15.375 9.75H10.5ZM11.25 14.625V11.25H14.625V14.625H11.25Z" fill="currentColor"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.6666 8.66671C13.7712 8.66671 14.6666 9.56214 14.6666 10.6667V12.6667C14.6666 13.7713 13.7712 14.6667 12.6666 14.6667H3.33325C2.22868 14.6667 1.33325 13.7713 1.33325 12.6667V10.6667C1.33325 9.56214 2.22868 8.66671 3.33325 8.66671H12.6666ZM3.33325 10C2.96506 10 2.66659 10.2985 2.66659 10.6667V12.6667C2.66659 13.0349 2.96506 13.3334 3.33325 13.3334H12.6666C13.0348 13.3334 13.3333 13.0349 13.3333 12.6667V10.6667C13.3333 10.2985 13.0348 10 12.6666 10H3.33325Z" fill="currentColor"/>
<path d="M11.3333 3.66671C11.8855 3.66671 12.3333 4.11442 12.3333 4.66671C12.3333 5.21899 11.8855 5.66671 11.3333 5.66671C10.781 5.66671 10.3333 5.21899 10.3333 4.66671C10.3333 4.11442 10.781 3.66671 11.3333 3.66671Z" fill="currentColor"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.3333 1.33337C13.1742 1.33337 14.6666 2.82576 14.6666 4.66671C14.6666 6.50766 13.1742 8.00004 11.3333 8.00004C9.4923 8.00004 7.99992 6.50766 7.99992 4.66671C7.99992 2.82576 9.4923 1.33337 11.3333 1.33337ZM11.3333 2.66671C10.2287 2.66671 9.33325 3.56214 9.33325 4.66671C9.33325 5.77128 10.2287 6.66671 11.3333 6.66671C12.4378 6.66671 13.3333 5.77128 13.3333 4.66671C13.3333 3.56214 12.4378 2.66671 11.3333 2.66671Z" fill="currentColor"/>
<path d="M6.66659 1.66671C7.03478 1.66671 7.33325 1.96518 7.33325 2.33337C7.33325 2.70156 7.03478 3.00004 6.66659 3.00004H3.33325C2.96506 3.00004 2.66659 3.29852 2.66659 3.66671V5.66671C2.66659 6.03489 2.96507 6.33337 3.33325 6.33337H6.66659C7.03478 6.33337 7.33325 6.63185 7.33325 7.00004C7.33325 7.36823 7.03478 7.66671 6.66659 7.66671H3.33325C2.22868 7.66671 1.33325 6.77126 1.33325 5.66671V3.66671C1.33325 2.56214 2.22868 1.66671 3.33325 1.66671H6.66659Z" fill="currentColor"/>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
<g clip-path="url(#clip0_1822_2135)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.69214 0.742281C6.91258 0.627508 7.17861 0.644734 7.38224 0.787203L10.7156 3.12054C10.8938 3.24529 11.0001 3.44924 11.0001 3.66676V7.657L13.0541 9.12444C13.2293 9.24959 13.3334 9.45149 13.3334 9.66676V14.0001H14.6667C15.0349 14.0001 15.3334 14.2986 15.3334 14.6668C15.3334 15.0349 15.0349 15.3334 14.6667 15.3334H1.33341C0.965261 15.3334 0.666807 15.0349 0.666748 14.6668C0.666748 14.2986 0.965225 14.0001 1.33341 14.0001H3.00008V6.66676C3.00008 6.44924 3.1064 6.24529 3.28459 6.12054L6.33341 3.98577V1.33343L6.33992 1.24163C6.36934 1.02986 6.49924 0.842793 6.69214 0.742281ZM4.33341 7.01377V14.0001H6.33341V5.61338L4.33341 7.01377ZM7.66675 14.0001H12.0001V10.0092L9.94604 8.54241C9.77088 8.4173 9.66679 8.21534 9.66675 8.00009V4.01377L7.66675 2.61338V14.0001Z" fill="currentColor"/>
</g>
<defs>
<clipPath id="clip0_1822_2135">
<rect width="16" height="16" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
<path d="M6.66675 2.66663C7.03494 2.66663 7.33341 2.9651 7.33341 3.33329C7.33341 3.70148 7.03494 3.99996 6.66675 3.99996H2.00008V12.6666H14.0001V11.8333C14.0001 11.4651 14.2986 11.1666 14.6667 11.1666C15.0349 11.1666 15.3334 11.4651 15.3334 11.8333V12.6666C15.3334 13.403 14.7365 14 14.0001 14H2.00008C1.26371 14 0.666748 13.403 0.666748 12.6666V3.99996C0.666748 3.26356 1.26371 2.66663 2.00008 2.66663H6.66675Z" fill="currentColor"/>
<path d="M11.3334 9.66663C11.7016 9.66663 12.0001 9.9651 12.0001 10.3333C12.0001 10.7015 11.7016 11 11.3334 11H3.33341C2.96522 11 2.66675 10.7015 2.66675 10.3333C2.66675 9.9651 2.96522 9.66663 3.33341 9.66663H11.3334Z" fill="currentColor"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.3334 2.66663C12.8062 2.66663 14.0001 3.86053 14.0001 5.33329C14.0001 6.04266 13.722 6.68629 13.2703 7.16402C14.107 7.60518 14.8215 8.31147 15.2605 9.16923C15.428 9.49687 15.2983 9.89858 14.9708 10.0664C14.6431 10.2341 14.2414 10.1043 14.0736 9.77665C13.526 8.70664 12.3939 8.0001 11.3334 7.99996C10.7314 7.99999 10.3219 8.08478 10.0027 8.2161C9.68314 8.34763 9.41097 8.54307 9.09839 8.82678C8.82582 9.07418 8.40446 9.05368 8.15698 8.78121C7.90953 8.50858 7.92994 8.08726 8.20255 7.8398C8.52921 7.54331 8.87871 7.27263 9.30802 7.06702C8.90854 6.60077 8.66675 5.99542 8.66675 5.33329C8.66675 3.86053 9.86065 2.66663 11.3334 2.66663ZM11.3334 3.99996C10.597 3.99996 10.0001 4.59691 10.0001 5.33329C10.0001 6.06967 10.597 6.66663 11.3334 6.66663C12.0698 6.66663 12.6667 6.06967 12.6667 5.33329C12.6667 4.59691 12.0698 3.99996 11.3334 3.99996Z" fill="currentColor"/>
<path d="M6.00008 6.99996C6.36827 6.99996 6.66675 7.29844 6.66675 7.66663C6.66675 8.03482 6.36827 8.33329 6.00008 8.33329H3.33341C2.96522 8.33329 2.66675 8.03482 2.66675 7.66663C2.66675 7.29844 2.96522 6.99996 3.33341 6.99996H6.00008Z" fill="currentColor"/>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none">
<path d="M9.12668 3.48014C9.26917 3.65113 9.48026 3.75 9.70284 3.75H15.375C16.2034 3.75 16.875 4.42156 16.875 5.25V6.75H1.125V3C1.125 2.17157 1.79657 1.5 2.625 1.5H7.12528C7.34787 1.5 7.55895 1.59887 7.70145 1.76986L9.12668 3.48014Z" fill="#39C6E9"/>
<path d="M16.875 15C16.875 15.8284 16.2034 16.5 15.375 16.5H2.625C1.79658 16.5 1.125 15.8284 1.125 15V8.25H16.875V15Z" fill="#6D4CFE"/>
</svg>

After

Width:  |  Height:  |  Size: 493 B

View File

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.375 2.25C16.2034 2.25 16.875 2.92158 16.875 3.75V15.375C16.875 16.2034 16.2034 16.875 15.375 16.875H2.625C1.79658 16.875 1.125 16.2034 1.125 15.375V3.75C1.125 2.92157 1.79657 2.25 2.625 2.25H15.375ZM2.625 6.375H15.375V3.75H2.625V6.375Z" fill="#6D4CFE"/>
<path d="M12.2197 8.84467C12.5126 8.55178 12.9873 8.55178 13.2802 8.84467C13.5731 9.13756 13.5731 9.61232 13.2802 9.90522L8.78022 14.4052C8.48732 14.6981 8.01256 14.6981 7.71967 14.4052L5.46967 12.1552C5.17678 11.8623 5.17678 11.3876 5.46967 11.0947C5.76256 10.8018 6.23732 10.8018 6.53022 11.0947L8.24994 12.8144L12.2197 8.84467Z" fill="white"/>
<path d="M6 1.125C6.41421 1.125 6.75 1.46079 6.75 1.875V4.875C6.75 5.28921 6.41421 5.625 6 5.625C5.58579 5.625 5.25 5.28921 5.25 4.875V1.875C5.25 1.46079 5.58579 1.125 6 1.125Z" fill="#39C6E9"/>
<path d="M12 1.125C12.4142 1.125 12.75 1.46079 12.75 1.875V4.875C12.75 5.28921 12.4142 5.625 12 5.625C11.5858 5.625 11.25 5.28921 11.25 4.875V1.875C11.25 1.46079 11.5858 1.125 12 1.125Z" fill="#39C6E9"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1,6 +1,6 @@
.expandable-tags-container {
width: 100%;
overflow: hidden;
// overflow: hidden;
.cts {
font-family: $font-family-regular;
font-size: 12px;

View File

@ -99,6 +99,7 @@ export default defineComponent({
watch([updateCount, scrollReachEnd, listRef], () => {
if (props.autoScroll && unref(listRef) && unref(scrollReachEnd)) {
nextTick(() => {
console.log('自然滚动')
unref(listRef)!.scrollTo({ top: unref(listRef)!.scrollHeight });
});
}
@ -110,6 +111,7 @@ export default defineComponent({
if (!props.autoScroll) return;
// 首次渲染:当有内容时滚到底部一次
if (!didInitialAutoScroll.value && newLen > 0) {
console.log('首次渲染滚动到底部-----')
scrollToBottom('auto');
didInitialAutoScroll.value = true;
return;

View File

@ -1,16 +1,8 @@
<template>
<div class="right-wrap">
<!-- 任务中心 -->
<div
class="relative p-6px rounded-30px flex items-center justify-center bg-[rgba(255,255,255,0.6)]"
@click="setUnread"
>
<SvgIcon
name="svg-taskCenter"
size="20"
class="cursor-pointer color-#737478 hover:color-#6D4CFE"
@click="openDownloadCenter"
/>
<div class="relative p-6px rounded-30px flex items-center justify-center task-icon" @click="setUnread">
<SvgIcon name="svg-taskCenter" size="20" class="color-#737478" @click="openDownloadCenter" />
<div class="w-6px h-6px rounded-50% bg-#F64B31 absolute top-6px right-6px" v-if="hasUnreadInfo"></div>
</div>

View File

@ -23,4 +23,12 @@
}
}
}
.task-icon {
cursor: pointer;
background: rgba(255, 255, 255, 0.6);
transition: background 0.2s;
&:hover {
background: #fff;
}
}
}

View File

@ -26,6 +26,8 @@ export default defineComponent({
const currentRouteName = computed(() => route.name as string);
const currentRouteGroup = computed(() => route.meta?.group ?? 'GroupMain');
const isHomeRoute = computed(() => currentRouteName.value === 'Home');
const showAiSearch = computed(() => !route.meta?.hideAiSearch);
const getCollapseMenuKey = (routeName: string): string => {
let _key: string;
@ -58,15 +60,27 @@ export default defineComponent({
};
const renderMenuItem = (item: typeMenuItem, hideLabel = false) => {
const getMenuItemClass = () => {
if (item.children?.length) {
return getCollapseMenuKey(currentRouteName.value) === item.key ? 'active' : '';
const hasChildren = item.children?.length;
let target = !hasChildren ? 'sub-menu-item ' : '';
if (hasChildren) {
target += getCollapseMenuKey(currentRouteName.value) === item.key ? 'active' : '';
} else {
target += item.activeMatch?.includes(currentRouteName.value) ? 'active' : '';
}
return item.activeMatch?.includes(currentRouteName.value) ? 'active' : '';
return target;
};
return (
<Menu.Item class={`menu-item ${getMenuItemClass()}`} onClick={() => onClickItem(item.routeName)}>
<SvgIcon size="18" name={item.icon} alt="状态图标" class="color-#55585F flex-shrink-0" />
{(() => {
const isActive = getMenuItemClass() === 'active';
const iconName = Array.isArray(item.icon)
? isActive
? item.icon[1] ?? item.icon[0]
: item.icon[0]
: item.icon;
return <SvgIcon size="18" name={iconName as any} alt="状态图标" class="color-#55585F flex-shrink-0" />;
})()}
{!hideLabel && <span class="cts label">{item.label}</span>}
</Menu.Item>
);
@ -117,20 +131,31 @@ export default defineComponent({
initCollapse();
};
watch(
() => currentRouteGroup.value,
() => {
init();
},
{ immediate: false, deep: true },
);
onMounted(() => {
init();
});
return () => (
<Menu class={`siderBar-wrap p-16px w-full h-full flex flex-col ${sidebarStore.menuCollapse ? 'menu-fold' : ''}`}>
<Menu.Item
class={`menu-item !mb-0 ${currentRouteName.value === 'Home' ? 'active' : ''}`}
onClick={handleUserHome}
>
{showAiSearch.value && (
<>
<Menu.Item class={`menu-item !mb-0 ${isHomeRoute.value ? 'active' : ''}`} onClick={handleUserHome}>
<img src={icon1} width={18} height={18} />
{!sidebarStore.menuCollapse && <span class="cts label">智能搜索</span>}
{!sidebarStore.menuCollapse && (
<span class="cts label">{isHomeRoute.value ? '开始工作' : '智能搜索'}</span>
)}
</Menu.Item>
<div class="line w-full h-1px bg-#211F24 my-12px"></div>
</>
)}
<div class="flex flex-col flex-1">
<div class="menu-list flex-1">{renderMenuList()}</div>
<div class="flex justify-end items-center">
@ -175,13 +200,14 @@ export default defineComponent({
color: #6d4cfe;
}
}
&.active {
background-color: #fff !important;
.label,
.svg-icon {
color: #6d4cfe;
}
}
// &.active {
// background-color: rgba(109, 76, 254, 0.08);
// color: #6d4cfe;
// .label,
// .svg-icon {
// color: #6d4cfe;
// }
// }
}
}
}

View File

@ -1,9 +1,11 @@
import { GROUP_WRITER_NAME } from '@/router/routes/modules/materialCenter-writer';
export const GROUP_WRITER_NAME = 'GroupWriterMaterialCenter';
export const GROUP_MANAGEMENT_NAME = 'GroupManagement';
export const GROUP_MAIN_NAME = 'GroupMain';
export interface typeMenuItem {
key?: string | number; // 菜单组key
label?: string; // 菜单组标题
icon?: string; // 菜单组图标
icon?: string | [string, string]; // 菜单组图标
routeName?: string; // 路由名称
requireLogin?: boolean; // 是否需要登录
requireAuth?: boolean; // 是否需要权限验证
@ -12,11 +14,11 @@ export interface typeMenuItem {
}
export const MENU_LIST = <Record<string, typeMenuItem[]>>{
GroupMain: [
[GROUP_MAIN_NAME]: [
{
key: 'ModAccountManage',
label: '账号管理',
icon: 'svg-accountManage',
icon: ['svg-accountManage', 'svg-accountManage-active'],
children: [
{
key: 'ModMediaAccountManage',
@ -34,44 +36,44 @@ export const MENU_LIST = <Record<string, typeMenuItem[]>>{
requireLogin: true,
activeMatch: ['MediaAccountAccountDashboard', 'MediaAccountAccountDetails'],
},
{
key: 'ModPutAccountManage',
icon: 'svg-putAccountManage',
label: '账户管理',
routeName: 'PutAccountAccountManagement',
requireLogin: true,
activeMatch: ['PutAccountAccountManagement'],
},
{
key: 'ModPutAccountData',
icon: 'svg-putAccountData',
label: '账户数据',
routeName: 'PutAccountAccountData',
requireLogin: true,
activeMatch: ['PutAccountAccountData'],
},
{
key: 'ModPutAccountAccountDashboard',
icon: 'svg-putAccountAccountDashboard',
label: '投放表现分析',
routeName: 'PutAccountAccountDashboard',
requireLogin: true,
activeMatch: ['PutAccountAccountDashboard'],
},
{
key: 'ModInvestmentGuidelines',
icon: 'svg-putAccountInvestmentGuidelines',
label: '投放指南',
routeName: 'PutAccountInvestmentGuidelines',
requireLogin: true,
activeMatch: ['PutAccountInvestmentGuidelines', 'PutAccountInvestmentGuidelinesDetail'],
},
// {
// key: 'ModPutAccountManage',
// icon: 'svg-putAccountManage',
// label: '账户管理',
// routeName: 'PutAccountAccountManagement',
// requireLogin: true,
// activeMatch: ['PutAccountAccountManagement'],
// },
// {
// key: 'ModPutAccountData',
// icon: 'svg-putAccountData',
// label: '账户数据',
// routeName: 'PutAccountAccountData',
// requireLogin: true,
// activeMatch: ['PutAccountAccountData'],
// },
// {
// key: 'ModPutAccountAccountDashboard',
// icon: 'svg-putAccountAccountDashboard',
// label: '投放表现分析',
// routeName: 'PutAccountAccountDashboard',
// requireLogin: true,
// activeMatch: ['PutAccountAccountDashboard'],
// },
// {
// key: 'ModInvestmentGuidelines',
// icon: 'svg-putAccountInvestmentGuidelines',
// label: '投放指南',
// routeName: 'PutAccountInvestmentGuidelines',
// requireLogin: true,
// activeMatch: ['PutAccountInvestmentGuidelines', 'PutAccountInvestmentGuidelinesDetail'],
// },
],
},
{
key: 'ModMaterialCenter',
label: '素材中心',
icon: 'svg-materialCenter',
icon: ['svg-materialCenter', 'svg-materialCenter-active'],
children: [
{
key: 'ModMaterialCenterFinishedProductsWareHouse',
@ -101,7 +103,7 @@ export const MENU_LIST = <Record<string, typeMenuItem[]>>{
{
key: 'ModTaskManage',
label: '任务管理',
icon: 'svg-taskManage',
icon: ['svg-taskManage', 'svg-taskManage-active'],
routeName: 'TaskManagement',
},
],
@ -137,4 +139,39 @@ export const MENU_LIST = <Record<string, typeMenuItem[]>>{
],
},
],
[GROUP_MANAGEMENT_NAME]:[
{
key: 'ModManagement',
label: '管理中心',
icon: ['svg-management', 'svg-management-active'],
children: [
{
key: 'ModManagementPerson',
icon: 'svg-managementPerson',
label: '个人信息',
routeName: 'ManagementPerson',
requireLogin: true,
activeMatch: [
'ManagementPerson',
],
},
{
key: 'ModManagementEnterprise',
icon: 'svg-managementEnterprise',
label: '企业信息',
routeName: 'ManagementEnterprise',
requireLogin: true,
activeMatch: ['ManagementEnterprise'],
},
{
key: 'ModManagementAccount',
icon: 'svg-managementAccount',
label: '账号管理',
routeName: 'ManagementAccount',
requireLogin: true,
activeMatch: ['ManagementAccount'],
},
],
}
]
};

View File

@ -28,6 +28,7 @@
color: #6d4cfe;
}
}
&:not(.sub-menu-item) {
&.active {
background-color: #fff !important;
.label,
@ -35,6 +36,7 @@
color: #6d4cfe !important;
}
}
}
&:not(:last-child) {
margin-bottom: 12px;
}

View File

@ -8,6 +8,7 @@ import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import { MENU_GROUP_IDS } from './constants';
import createRouteGuard from './guard';
import { GROUP_MAIN_NAME } from '@/layouts/components/siderBar/menu-list';
NProgress.configure({ showSpinner: false }); // NProgress Configuration
@ -30,6 +31,7 @@ export const router = createRouter({
meta: {
requiresAuth: false,
requireLogin: true,
group: GROUP_MAIN_NAME,
}
},
{

View File

@ -1,6 +1,9 @@
import { IconBookmark } from '@arco-design/web-vue/es/icon';
import type { AppRouteRecordRaw } from '../types';
import { MENU_GROUP_IDS } from '@/router/constants';
import { GROUP_MANAGEMENT_NAME, GROUP_WRITER_NAME } from '@/layouts/components/siderBar/menu-list';
const COMPONENTS: AppRouteRecordRaw[] = [
{
@ -14,6 +17,9 @@ const COMPONENTS: AppRouteRecordRaw[] = [
requireLogin: true,
roles: ['*'],
id: MENU_GROUP_IDS.MANAGEMENT_ID,
group: GROUP_MANAGEMENT_NAME,
hideAiSearch: true,
},
children: [
{
@ -25,6 +31,8 @@ const COMPONENTS: AppRouteRecordRaw[] = [
requiresAuth: false,
requireLogin: true,
roles: ['*'],
group: GROUP_MANAGEMENT_NAME,
hideAiSearch: true,
},
},
{
@ -36,6 +44,8 @@ const COMPONENTS: AppRouteRecordRaw[] = [
requiresAuth: false,
requireLogin: true,
roles: ['*'],
group: GROUP_MANAGEMENT_NAME,
hideAiSearch: true,
},
},
{
@ -47,6 +57,8 @@ const COMPONENTS: AppRouteRecordRaw[] = [
requiresAuth: false,
requireLogin: true,
roles: ['*'],
group: GROUP_MANAGEMENT_NAME,
hideAiSearch: true,
},
},
],

View File

@ -2,8 +2,7 @@ import type { AppRouteRecordRaw } from '../types';
import { MENU_GROUP_IDS } from '@/router/constants';
import IconContentManuscript from '@/assets/svg/svg-contentManuscript.svg';
export const GROUP_WRITER_NAME = 'GroupWriterMaterialCenter';
import { GROUP_WRITER_NAME } from '@/layouts/components/siderBar/menu-list';
const COMPONENTS: AppRouteRecordRaw[] = [
{
@ -56,7 +55,8 @@ const COMPONENTS: AppRouteRecordRaw[] = [
hideInMenu: true,
activeMenu: 'WriterMaterialCenterFinishedProducts',
},
component: () => import('@/views/writer-material-center/components/finished-products/manuscript/upload/index.vue'),
component: () =>
import('@/views/writer-material-center/components/finished-products/manuscript/upload/index.vue'),
},
{
path: 'edit/:writerCode/:id',
@ -70,7 +70,8 @@ const COMPONENTS: AppRouteRecordRaw[] = [
hideInMenu: true,
activeMenu: 'WriterMaterialCenterFinishedProducts',
},
component: () => import('@/views/writer-material-center/components/finished-products/manuscript/edit/index.vue'),
component: () =>
import('@/views/writer-material-center/components/finished-products/manuscript/edit/index.vue'),
},
{
path: 'detail/:writerCode/:id',
@ -84,7 +85,8 @@ const COMPONENTS: AppRouteRecordRaw[] = [
hideInMenu: true,
activeMenu: 'WriterMaterialCenterFinishedProducts',
},
component: () => import('@/views/writer-material-center/components/finished-products/manuscript/detail/index.vue'),
component: () =>
import('@/views/writer-material-center/components/finished-products/manuscript/detail/index.vue'),
},
{
path: 'check-list/detail/:id/:writerCode',
@ -98,7 +100,8 @@ const COMPONENTS: AppRouteRecordRaw[] = [
roles: ['*'],
activeMenu: 'WriterMaterialCenterFinishedProducts',
},
component: () => import('@/views/writer-material-center/components/finished-products/manuscript/detail/index.vue'),
component: () =>
import('@/views/writer-material-center/components/finished-products/manuscript/detail/index.vue'),
},
{
path: 'check/:writerCode',
@ -112,7 +115,8 @@ const COMPONENTS: AppRouteRecordRaw[] = [
hideInMenu: true,
activeMenu: 'WriterMaterialCenterFinishedProducts',
},
component: () => import('@/views/writer-material-center/components/finished-products/manuscript/check/index.vue'),
component: () =>
import('@/views/writer-material-center/components/finished-products/manuscript/check/index.vue'),
},
],
},

View File

@ -88,77 +88,77 @@ const COMPONENTS: AppRouteRecordRaw[] = [
},
],
},
{
path: '/put-account',
name: 'PutAccount',
redirect: 'put-account/accountManagement',
meta: {
locale: '投放资源中心',
icon: IconPutAccount,
requiresAuth: true,
requireLogin: true,
roles: ['*'],
id: MENU_GROUP_IDS.PROPERTY_ID,
},
children: [
{
path: 'manage',
name: 'PutAccountAccountManagement',
meta: {
locale: '账户管理',
requiresAuth: true,
requireLogin: true,
roles: ['*'],
},
component: () => import('@/views/property-marketing/put-account/account-manage/index.vue'),
},
{
path: 'data',
name: 'PutAccountAccountData',
meta: {
locale: '账户数据',
requiresAuth: true,
requireLogin: true,
roles: ['*'],
},
component: () => import('@/views/property-marketing/put-account/account-data/index.vue'),
},
{
path: 'account-dashboard',
name: 'PutAccountAccountDashboard',
meta: {
locale: '投放表现分析',
requiresAuth: true,
requireLogin: true,
roles: ['*'],
},
component: () => import('@/views/property-marketing/put-account/account-dashboard/index.vue'),
},
{
path: 'investmentGuidelines',
name: 'PutAccountInvestmentGuidelines',
meta: {
locale: '投放指南',
requiresAuth: true,
requireLogin: true,
roles: ['*'],
},
component: () => import('@/views/property-marketing/put-account/investment-guidelines/index.vue'),
},
{
path: 'detail/:id',
name: 'PutAccountInvestmentGuidelinesDetail',
meta: {
locale: '投放指南详情',
requiresAuth: true,
hideInMenu: true,
roles: ['*'],
activeMenu: 'PutAccountInvestmentGuidelines',
},
component: () => import('@/views/property-marketing/put-account/investment-guidelines/detail.vue'),
},
],
},
// {
// path: '/put-account',
// name: 'PutAccount',
// redirect: 'put-account/accountManagement',
// meta: {
// locale: '投放资源中心',
// icon: IconPutAccount,
// requiresAuth: true,
// requireLogin: true,
// roles: ['*'],
// id: MENU_GROUP_IDS.PROPERTY_ID,
// },
// children: [
// {
// path: 'manage',
// name: 'PutAccountAccountManagement',
// meta: {
// locale: '账户管理',
// requiresAuth: true,
// requireLogin: true,
// roles: ['*'],
// },
// component: () => import('@/views/property-marketing/put-account/account-manage/index.vue'),
// },
// {
// path: 'data',
// name: 'PutAccountAccountData',
// meta: {
// locale: '账户数据',
// requiresAuth: true,
// requireLogin: true,
// roles: ['*'],
// },
// component: () => import('@/views/property-marketing/put-account/account-data/index.vue'),
// },
// {
// path: 'account-dashboard',
// name: 'PutAccountAccountDashboard',
// meta: {
// locale: '投放表现分析',
// requiresAuth: true,
// requireLogin: true,
// roles: ['*'],
// },
// component: () => import('@/views/property-marketing/put-account/account-dashboard/index.vue'),
// },
// {
// path: 'investmentGuidelines',
// name: 'PutAccountInvestmentGuidelines',
// meta: {
// locale: '投放指南',
// requiresAuth: true,
// requireLogin: true,
// roles: ['*'],
// },
// component: () => import('@/views/property-marketing/put-account/investment-guidelines/index.vue'),
// },
// {
// path: 'detail/:id',
// name: 'PutAccountInvestmentGuidelinesDetail',
// meta: {
// locale: '投放指南详情',
// requiresAuth: true,
// hideInMenu: true,
// roles: ['*'],
// activeMenu: 'PutAccountInvestmentGuidelines',
// },
// component: () => import('@/views/property-marketing/put-account/investment-guidelines/detail.vue'),
// },
// ],
// },
// {
// path: '/intelligent-solution',
// name: 'IntelligentSolution',

View File

@ -16,4 +16,5 @@ export interface AppRouteRecordRaw {
props?: Record<string, any>;
beforeEnter?: NavigationGuard | NavigationGuard[];
fullPath?: string;
hideAiSearch?: boolean;
}

View File

@ -1,5 +1,5 @@
<template>
<div class="bg-#fff rounded-8px border-1px border-#D7D7D9 border-solid w-100% py-0 px-20px mt-24px pb-24px">
<div class="bg-#fff rounded-8px w-100% py-0 px-20px mt-24px pb-24px">
<div class="title-row">
<span class="title">账号管理</span>
<a-button type="outline" class="add-account-button" @click="handleAddAccount">添加子账号</a-button>

View File

@ -1,5 +1,5 @@
<template>
<div class="bg-#fff rounded-8px border-1px border-#D7D7D9 border-solid w-100% py-0 px-20px mt-24px pb-24px">
<div class="bg-#fff rounded-8px w-100% py-0 px-20px mt-24px pb-24px">
<div class="title-row">
<span class="title">企业信息</span>
</div>

View File

@ -1,5 +1,5 @@
<template>
<div class="bg-#fff rounded-8px border-1px border-#D7D7D9 border-solid w-100% py-0 px-20px mt-24px pb-24px">
<div class="bg-#fff rounded-8px w-100% py-0 px-20px mt-24px pb-24px">
<div class="title-row">
<span class="title">个人信息</span>
</div>