智能方案管理页面

This commit is contained in:
林志军
2025-06-27 09:28:06 +08:00
parent 5c8cd47fc6
commit 645816c1f5
7 changed files with 713 additions and 224 deletions

View File

@ -0,0 +1,182 @@
.placement-guide-style {
//每块div布局
.part-div {
width: 100%;
height: 100%;
background: var(--BG-white, white);
overflow: hidden;
border-radius: 8px;
outline: 1px var(--BG-300, #E6E6E8) solid;
outline-offset: -1px;
flex-direction: column;
justify-content: flex-start;
display: inline-flex;
margin: 10px;
}
//每块div 头部
.part-div-header {
align-self: stretch;
height: 64px;
padding: 10px 24px 10px 24px;
justify-content: flex-start;
align-items: center;
display: inline-flex
}
//每块div 标题
.part-div-header-title {
justify-content: center;
display: flex;
flex-direction: column;
color: var(--Text-1, #211F24);
font-size: 18px;
font-family: Alibaba PuHuiTi;
font-weight: 400;
line-height: 26px;
word-wrap: break-word;
}
//无数据样式
.non-data {
display: flex;
align-items: center; /* 垂直居中 */
justify-content: center; /* 水平居中,如果需要的话 */
height: 50%; /* 示例:父容器高度为视口高度 */
}
.non-data-str {
// 暂无品牌
color: var(--Text-3, #737478);
font-size: 14px;
font-family: Alibaba PuHuiTi;
font-weight: 400;
line-height: 22px;
word-wrap: break-word;
margin: 20px 20px;
}
.add-btn {
font-size: 16px;
padding: 0 24px;
border-radius: 4px;
}
.materials-page {
background: #fff;
border-radius: 8px;
padding: 32px 24px 24px 24px;
min-height: 600px;
}
.header-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
}
.page-title {
font-size: 20px;
font-weight: 600;
margin: 0;
}
.search-row {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 20px;
}
.search-input {
width: 240px;
}
.search-btn,
.reset-btn {
min-width: 72px;
}
.brand-table {
margin-bottom: 16px;
}
.logo-cell {
display: flex;
align-items: center;
gap: 6px;
font-weight: 500;
}
.logo-emoji {
font-size: 20px;
}
.logo-text {
font-size: 16px;
}
.pagination-row {
display: flex;
align-items: center;
gap: 16px;
margin-top: 8px;
}
.page-size-select {
width: 80px;
}
.upload-card {
width: 80px;
height: 80px;
border: 1px dashed #d9d9d9;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #999;
font-size: 24px;
background: #fafafa;
border-radius: 6px;
}
.upload-tip {
font-size: 12px;
color: #999;
margin-top: 4px;
}
.form-tip {
font-size: 12px;
color: #999;
margin-top: 4px;
}
.form-item-logo .logo-upload-row {
display: flex;
align-items: center;
gap: 16px;
}
.logo-upload-card {
display: flex;
gap: 12px;
}
.form-tip {
color: #999;
font-size: 13px;
margin-left: 8px;
line-height: 1.5;
}
.a-form .a-form-item {
margin-bottom: 24px;
}
.a-modal .a-modal-footer {
justify-content: flex-end;
}
}

View File

@ -1,106 +1,133 @@
<template>
<div class="materials-page">
<!-- 顶部标题和新增按钮 -->
<div class="header-row">
<h2 class="page-title">品牌物料</h2>
<a-button type="primary" @click="handleAdd" class="add-btn">+ 添加品牌</a-button>
</div>
<view class="placement-guide-style">
<div class="part-div">
<div class="part-div-header">
<span class="part-div-header-title">品牌物料</span>
</div>
<a-space v-if="listResult.data.length === 0" direction="vertical" class="non-data">
<a-space>
<a-image :src="noDataImage" />
</a-space>
<a-space>
<span class="non-data-str">暂无品牌</span>
</a-space>
<a-space>
<a-button class="add-btn" @click="handleAdd" type="primary">
<template #icon>
<icon-plus />
</template>
去添加
</a-button>
</a-space>
</a-space>
<!-- 搜索栏 -->
<div class="search-row">
品牌名称
<a-input v-model="listQuery.name" placeholder="请搜索..." allow-clear class="search-input" />
<a-button type="outline" @click="handleSearch">
<template #icon>
<icon-search />
</template>
<template #default>搜索</template>
</a-button>
<a-button type="outline" @click="handleReset">
<template #icon>
<icon-refresh />
</template>
<template #default>重置</template>
</a-button>
</div>
<a-space v-else>
<div class="header-row">
<h2 class="page-title">品牌物料</h2>
<a-button type="primary" @click="handleAdd" class="add-btn">+ 添加品牌</a-button>
</div>
<!-- 表格 -->
<!-- 搜索栏 -->
<div class="search-row">
品牌名称
<a-input v-model="listQuery.name" placeholder="请搜索..." allow-clear class="search-input" />
<a-button type="outline" @click="handleSearch">
<template #icon>
<icon-search />
</template>
<template #default>搜索</template>
</a-button>
<a-button type="outline" @click="handleReset">
<template #icon>
<icon-refresh />
</template>
<template #default>重置</template>
</a-button>
</div>
<a-table :data="listResult.list" :pagination="false">
<template #columns>
<a-table-column title="品牌名称" data-index="name" />
<a-table-column title="品牌logo" data-index="logo">
<template #cell="{ record }">
<img :src="record.logo" style="width: 50px; height: 50px" />
<!-- 表格 -->
<a-table :data="listResult.list" :pagination="false">
<template #columns>
<a-table-column title="品牌名称" data-index="name" />
<a-table-column title="品牌logo" data-index="logo">
<template #cell="{ record }">
<img :src="record.logo" style="width: 50px; height: 50px" />
</template>
</a-table-column>
<a-table-column title="Slogan" data-index="slogan" />
<a-table-column title="操作" data-index="optional">
<template #cell="{ record }">
<a-popconfirm
content="确定删除吗?"
type="warning"
ok-text="确认删除"
cancel-text="取消"
@ok="deleteBrand(record.id)"
>
<icon-delete></icon-delete>
</a-popconfirm>
<a-button type="outline" @click="handleEdit(record.id)">编辑</a-button>
</template>
</a-table-column>
</template>
</a-table-column>
<a-table-column title="Slogan" data-index="slogan" />
<a-table-column title="操作" data-index="optional">
<template #cell="{ record }">
<a-popconfirm
content="确定删除吗?"
type="warning"
ok-text="确认删除"
cancel-text="取消"
@ok="deleteBrand(record.id)"
>
<icon-delete></icon-delete>
</a-popconfirm>
<a-button type="outline" @click="handleEdit(record.id)">编辑</a-button>
</template>
</a-table-column>
</template>
</a-table>
</a-table>
<!-- 分页 -->
<a-space direction="vertical" size="large">
<a-pagination :total="listResult.total" :size="listQuery.page_size" show-total show-jumper show-page-size />
</a-space>
<!-- 新增/编辑品牌弹窗 -->
<a-modal
v-model:visible="modalVisible"
:title="modalTitle"
:mask-closable="false"
:esc-to-close="false"
width="480px"
@cancel="handleModalCancel"
>
<a-form
:model="form"
:label-col-props="{ span: 5, offset: 0 }"
:wrapper-col-props="{ span: 19, offset: 0 }"
label-align="left"
:rules="formRule"
ref="formRef"
layout="left"
<!-- 分页 -->
<a-space direction="vertical" size="large">
<a-pagination :total="listResult.total" :size="listQuery.page_size" show-total show-jumper show-page-size />
</a-space>
</a-space>
<!-- 新增/编辑品牌弹窗 -->
<a-modal
v-model:visible="modalVisible"
:mask-closable="false"
:esc-to-close="false"
width="480px"
@cancel="handleModalCancel"
>
<a-form-item field="name" label="品牌名称">
<a-input v-model="form.name" placeholder="请输入品牌名称" />
</a-form-item>
<a-form-item field="logo" class="form-item-logo" label="标准版Logo">
<ImageUpload v-model="form.logo" :limit="1"></ImageUpload>
<div class="form-tip">品牌常规展示标识支持PNGJPG格式</div>
</a-form-item>
<a-form-item field="otherLogos" class="form-item-logo" label="其他Logo">
<ImageUpload v-model="form.other_logos" :limit="3"></ImageUpload>
</a-form-item>
<a-form-item field="slogan" label="Slogan">
<a-textarea v-model="form.slogan" placeholder="请输入..." :max-length="50" show-word-limit />
</a-form-item>
</a-form>
<template #footer>
<a-button @click="handleModalCancel">取消</a-button>
<a-button type="primary" @click="handleModalOk">{{ btn_str }}</a-button>
</template>
</a-modal>
</div>
<template #title>
<span title="测试">{{ form.id > 0 ? '编辑品牌' : '新增品牌' }}</span>
</template>
<a-form
:model="form"
:label-col-props="{ span: 5, offset: 0 }"
:wrapper-col-props="{ span: 19, offset: 0 }"
label-align="left"
:rules="formRule"
ref="formRef"
layout="left"
>
<a-form-item field="name" label="品牌名称">
<a-input v-model="form.name" placeholder="请输入品牌名称" />
</a-form-item>
<a-form-item field="logo" class="form-item-logo" label="标准版Logo">
<ImageUpload v-model="form.logo" :limit="1"></ImageUpload>
<div class="form-tip">品牌常规展示标识支持PNGJPG格式</div>
</a-form-item>
<a-form-item field="otherLogos" class="form-item-logo" label="其他Logo">
<ImageUpload v-model="form.other_logos" :limit="3"></ImageUpload>
</a-form-item>
<a-form-item field="slogan" label="Slogan">
<a-textarea v-model="form.slogan" placeholder="请输入..." :max-length="50" show-word-limit />
</a-form-item>
</a-form>
<template #footer>
<a-button @click="handleModalCancel">取消</a-button>
<a-button type="primary" @click="handleModalOk">{{ btn_str }}</a-button>
</template>
</a-modal>
</div>
</view>
</template>
<script setup>
import { ref, computed, reactive, onMounted } from 'vue';
import { Message } from '@arco-design/web-vue';
import { IconDelete } from '@arco-design/web-vue/es/icon';
import noDataImage from '@/assets/img/guide/no_data.png';
import '@/views/property-marketing/enterpriseKnowledge/brandMaterials.less';
import {
addMaterials,
deleteMaterials,
@ -115,7 +142,7 @@ const searchName = ref('');
const current = ref(1);
const listResult = reactive({
list: ref([]),
data: ref([]),
total: ref(0),
});
@ -148,7 +175,9 @@ onMounted(() => {
const handleSearch = () => {
getMaterialsList(listQuery).then((response) => {
listResult.list = response.data;
listResult.data = response.data.data;
console.log(response.data, 'response.data');
console.log(listResult.data, 'listResult.data');
listResult.total = response.total;
});
};
@ -216,124 +245,3 @@ function handleEdit(id) {
});
}
</script>
<style scoped>
.materials-page {
background: #fff;
border-radius: 8px;
padding: 32px 24px 24px 24px;
min-height: 600px;
}
.header-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
}
.page-title {
font-size: 20px;
font-weight: 600;
margin: 0;
}
.add-btn {
font-size: 16px;
padding: 0 24px;
}
.search-row {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 20px;
}
.search-input {
width: 240px;
}
.search-btn,
.reset-btn {
min-width: 72px;
}
.brand-table {
margin-bottom: 16px;
}
.logo-cell {
display: flex;
align-items: center;
gap: 6px;
font-weight: 500;
}
.logo-emoji {
font-size: 20px;
}
.logo-text {
font-size: 16px;
}
.pagination-row {
display: flex;
align-items: center;
gap: 16px;
margin-top: 8px;
}
.page-size-select {
width: 80px;
}
.upload-card {
width: 80px;
height: 80px;
border: 1px dashed #d9d9d9;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #999;
font-size: 24px;
background: #fafafa;
border-radius: 6px;
}
.upload-tip {
font-size: 12px;
color: #999;
margin-top: 4px;
}
.form-tip {
font-size: 12px;
color: #999;
margin-top: 4px;
}
.form-item-logo .logo-upload-row {
display: flex;
align-items: center;
gap: 16px;
}
.logo-upload-card {
display: flex;
gap: 12px;
}
.form-tip {
color: #999;
font-size: 13px;
margin-left: 8px;
line-height: 1.5;
}
.a-form .a-form-item {
margin-bottom: 24px;
}
.a-modal .a-modal-footer {
justify-content: flex-end;
}
</style>

View File

@ -183,4 +183,16 @@
word-wrap: break-word
}
//表现分析标题
.player-title {
margin: 10px 0px 15px 20px;
// 表现分析
color: var(--Text-1, #211F24);
font-size: 16px;
font-family: Alibaba PuHuiTi;
font-weight: 400;
line-height: 22px;
word-wrap: break-word
}
}

View File

@ -131,14 +131,16 @@
</template>
</a-table>
<!-- 分页 -->
<a-pagination
class="account-page"
:total="listResult.total"
:size="listQuery.page_size"
show-total
show-jumper
show-page-size
/>
<div>
<a-pagination
class="account-page"
:total="listResult.total"
:size="listQuery.page_size"
show-total
show-jumper
show-page-size
/>
</div>
</div>
<div class="part-div">
<div class="part-div-header">
@ -146,8 +148,6 @@
<a-popover position="tl">
<icon-question-circle />
<template #content>
<p style="margin: 0">本月摘要</p>
</template>
</a-popover>
@ -231,6 +231,225 @@
</a-row>
</div>
</div>
<div class="part-div">
<div class="part-div-header">
<span class="part-div-header-title">投放行动指南</span>
<a-popover position="tl">
<icon-question-circle />
<template #content>
<p style="margin: 0">投放建议优化</p>
</template>
</a-popover>
</div>
<a-space>
<span class="player-title">表现分析</span>
<a-popover position="tl">
<icon-question-circle />
<template #content>
<p style="margin: 0">表现分析</p>
</template>
</a-popover>
</a-space>
<div>
<a-row class="grid-demo" :gutter="24">
<a-col :span="12">
<div class="overall-strategy">
<span class="placement-optimization-title">人群分析</span>
<a-space direction="vertical">
<a-space class="placement-optimization-str">
<span>
<img :src="topImages[0]" style="width: 25px; height: 17px" />
18-24岁女性兴趣为美妆/穿搭一线城市抖音平台 ROI 3.2</span
>
</a-space>
<a-space>
<span>
<img :src="topImages[1]" style="width: 25px; height: 17px" />
25-34岁男性兴趣为数码产品二线城市巨量引擎 ROI 2.8</span
>
</a-space>
<a-space>
<span>
<img :src="topImages[2]" style="width: 25px; height: 17px" />
18-24岁男性兴趣为运动/健身三线城市抖音 ROI 2.3</span
>
</a-space>
</a-space>
</div>
</a-col>
<a-col :span="12">
<div class="overall-strategy">
<span class="placement-optimization-title">投放素材</span>
<a-space direction="vertical">
<a-space class="placement-optimization-str">
<span>
<img :src="topImages[0]" style="width: 25px; height: 17px" />
图文风格 + 明确福利点CTR 3.2%CVR 8.5%</span
>
</a-space>
<a-space>
<span>
<img :src="topImages[1]" style="width: 25px; height: 17px" />
场景短视频 + 明确人设定位CTR 2.7%CVR 7.1%</span
>
</a-space>
<a-space>
<span>
<img :src="topImages[2]" style="width: 25px; height: 17px" />
口播讲解类 + 产品对比CTR 2.1%CVR 6.0%</span
>
</a-space>
</a-space>
</div>
</a-col>
</a-row>
<a-row class="grid-demo" :gutter="24">
<a-col :span="12">
<div class="overall-strategy">
<span class="placement-optimization-title">投放时段</span>
<a-space direction="vertical">
<a-space class="placement-optimization-str">
<span>
<img :src="topImages[0]" style="width: 25px; height: 17px" />
晚高峰时段19:0021:00ROI 3.1</span
>
</a-space>
<a-space>
<span>
<img :src="topImages[1]" style="width: 25px; height: 17px" />
中午时段11:3013:00ROI 2.5</span
>
</a-space>
<a-space>
<span>
<img :src="topImages[2]" style="width: 25px; height: 17px" />
下午茶时段15:0017:00ROI 2.3</span
>
</a-space>
</a-space>
</div>
</a-col>
<a-col :span="12">
<div class="overall-strategy">
<span class="placement-optimization-title">平台表现</span>
<a-space direction="vertical">
<a-space class="placement-optimization-str">
<span>
<img :src="topImages[0]" style="width: 25px; height: 17px" />
抖音 - ROI 3.2CVR 8.5%</span
>
</a-space>
<a-space>
<span>
<img :src="topImages[1]" style="width: 25px; height: 17px" />
聚光平台 - ROI 2.7CVR 7.3%</span
>
</a-space>
<a-space>
<span>
<img :src="topImages[2]" style="width: 25px; height: 17px" />
B站 - ROI 2.4CVR 6.8%</span
>
</a-space>
</a-space>
</div>
</a-col>
</a-row>
</div>
<a-space>
<span class="player-title">新投放建议生成</span>
<a-popover position="tl">
<icon-question-circle />
<template #content>
<p style="margin: 0">新投放建议生成</p>
</template>
</a-popover>
</a-space>
<a-row class="grid-demo" :gutter="24">
<a-col :span="24">
<div class="overall-strategy">
<span class="placement-optimization-title">人群建议</span>
<a-space direction="vertical">
<a-space class="placement-optimization-str">
<span>
<img :src="topImages[0]" style="width: 25px; height: 17px" />
集中在 1824 岁女性 + 精准兴趣标签护肤口红</span
>
</a-space>
<a-space>
<span>
<img :src="topImages[1]" style="width: 25px; height: 17px" />
2430 岁男性 + 实用类内容受众工具控搞机党</span
>
</a-space>
<a-space>
<span>
<img :src="topImages[2]" style="width: 25px; height: 17px" />
泛娱乐向受众 + 较大地域分布兴趣短剧直播带货</span
>
</a-space>
</a-space>
</div>
</a-col>
</a-row>
<a-row class="grid-demo" :gutter="24">
<a-col :span="24">
<div class="overall-strategy">
<span class="placement-optimization-title">素材建议</span>
<a-space direction="vertical">
<a-space class="placement-optimization-str">
<span>
<img :src="topImages[0]" style="width: 25px; height: 17px" />
福利明确+钩子强的图文短视频建议加限时优惠提示</span
>
</a-space>
<a-space>
<span>
<img :src="topImages[1]" style="width: 25px; height: 17px" />
场景代入型视频突出客户痛点与产品关联</span
>
</a-space>
<a-space>
<span>
<img :src="topImages[2]" style="width: 25px; height: 17px" />
达人口播/测评搭配标题党封面吸引点击</span
>
</a-space>
</a-space>
</div>
</a-col>
</a-row>
<a-row class="grid-demo" :gutter="24">
<a-col :span="24">
<div class="overall-strategy">
<span class="placement-optimization-title">投放策略建议</span>
<a-space direction="vertical">
<a-space class="placement-optimization-str">
<span>
<img :src="topImages[0]" style="width: 25px; height: 17px" />
预算前置在 ROI 最佳时段和平台优先抢头部流量</span
>
</a-space>
<a-space>
<span>
<img :src="topImages[1]" style="width: 25px; height: 17px" />
中等预算组合投放 + 高点击素材A/B测试</span
>
</a-space>
<a-space>
<span>
<img :src="topImages[2]" style="width: 25px; height: 17px" />
低预算长周期测试重点看 CVR优胜劣汰</span
>
</a-space>
</a-space>
</div>
</a-col>
</a-row>
</div>
</view>
</template>