2025-06-16 14:42:26 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view>
|
2025-06-17 11:18:39 +08:00
|
|
|
|
<topHeader ref="topHeaderRef" @search="search"></topHeader>
|
2025-06-16 14:42:26 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 用户痛点观察 -->
|
2025-07-01 14:34:16 +08:00
|
|
|
|
<a-space
|
|
|
|
|
|
direction="vertical"
|
|
|
|
|
|
style="background-color: #fff; width: 100%; padding: 0 20px"
|
2025-08-15 14:32:40 +08:00
|
|
|
|
class="bg-#fff rounded-8px mb-24px"
|
2025-07-01 14:34:16 +08:00
|
|
|
|
>
|
|
|
|
|
|
<div class="title-row">
|
|
|
|
|
|
<span class="title mr-4px">用户痛点观察</span>
|
|
|
|
|
|
<a-tooltip>
|
|
|
|
|
|
<template #content
|
|
|
|
|
|
>基于用户内容中的情绪分析与表达模式,提取反复出现的负面倾向主题,反映典型使用痛点。</template
|
|
|
|
|
|
>
|
|
|
|
|
|
<icon-question-circle size="16" class="!color-#737478" />
|
|
|
|
|
|
</a-tooltip>
|
|
|
|
|
|
</div>
|
2025-06-22 16:01:48 +08:00
|
|
|
|
<a-table
|
|
|
|
|
|
:columns="columns"
|
|
|
|
|
|
:data="dataList"
|
|
|
|
|
|
:filter-icon-align-left="alignLeft"
|
|
|
|
|
|
:scroll="true"
|
|
|
|
|
|
:pagination="false"
|
2025-07-01 14:34:16 +08:00
|
|
|
|
@change="handleChange"
|
2025-06-22 16:01:48 +08:00
|
|
|
|
>
|
2025-07-01 16:39:47 +08:00
|
|
|
|
<template #empty>
|
|
|
|
|
|
<NoData />
|
|
|
|
|
|
</template>
|
2025-06-22 16:01:48 +08:00
|
|
|
|
<template #rank="{ record }">
|
|
|
|
|
|
<img v-if="record.rank == 1" :src="topImages[0]" style="width: 25px; height: 17px" />
|
|
|
|
|
|
<img v-else-if="record.rank == 2" :src="topImages[1]" style="width: 25px; height: 17px" />
|
|
|
|
|
|
<img v-else-if="record.rank == 3" :src="topImages[2]" style="width: 25px; height: 17px" />
|
|
|
|
|
|
<span v-else>{{ record.rank }}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template #keywords="{ record }">
|
2025-07-01 14:34:16 +08:00
|
|
|
|
<a-tag
|
|
|
|
|
|
v-for="item in record.keywords"
|
|
|
|
|
|
:key="item"
|
|
|
|
|
|
class="!rounded-2px !px-8px !py-1px !bg-#F2F3F5 !h-22px !color-#3C4043 mb-5px mr-5px"
|
|
|
|
|
|
>{{ item }}</a-tag
|
|
|
|
|
|
>
|
2025-06-22 16:01:48 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
<template #frequency="{ record }">
|
2025-07-01 14:34:16 +08:00
|
|
|
|
<a-tag
|
|
|
|
|
|
:class="`!rounded-2px !px-8px !py-1px !bg-${frequencyStatus[record.frequency].bgColor} !h-22px !color-${
|
|
|
|
|
|
frequencyStatus[record.frequency].color
|
|
|
|
|
|
}`"
|
|
|
|
|
|
>{{ frequencyStatus[record.frequency].label }}</a-tag
|
2025-06-22 16:01:48 +08:00
|
|
|
|
>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<template #optional="{ record }">
|
2025-09-03 11:15:37 +08:00
|
|
|
|
<Button type="primary" ghost @click="gotoDetail(record)">详情</Button>
|
2025-06-16 14:42:26 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</a-table>
|
|
|
|
|
|
</a-space>
|
|
|
|
|
|
|
2025-09-03 11:15:37 +08:00
|
|
|
|
<Modal
|
|
|
|
|
|
v-model:open="visible"
|
|
|
|
|
|
wrapClassName="user-pain-points-modal"
|
|
|
|
|
|
centered
|
2025-07-01 14:34:16 +08:00
|
|
|
|
unmountOnClose
|
|
|
|
|
|
width="640px"
|
|
|
|
|
|
@ok="handleOk"
|
|
|
|
|
|
@cancel="handleCancel"
|
|
|
|
|
|
>
|
2025-06-16 14:42:26 +08:00
|
|
|
|
<template #title>
|
|
|
|
|
|
<span style="text-align: left; width: 100%">用户痛点观察</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<a-space direction="vertical" style="font-size: 12px">
|
2025-07-01 14:34:16 +08:00
|
|
|
|
<div class="mb-12px flex items-center">
|
|
|
|
|
|
<p class="cts !mr-16px flex-shrink-0 w-60px">痛点</p>
|
|
|
|
|
|
<span class="cts">{{ topicInfo.name }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="mb-12px flex items-center">
|
|
|
|
|
|
<p class="cts !mr-16px flex-shrink-0 w-60px">关键词</p>
|
2025-06-16 14:42:26 +08:00
|
|
|
|
<a-tag
|
2025-07-01 14:34:16 +08:00
|
|
|
|
v-for="item in topicInfo.keywords"
|
|
|
|
|
|
:key="item"
|
|
|
|
|
|
class="mr-8px py-10px px-8px rounded-4px bg-#F2F3F5 cts !h-24px"
|
|
|
|
|
|
>{{ item }}</a-tag
|
2025-06-16 14:42:26 +08:00
|
|
|
|
>
|
2025-07-01 14:34:16 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="mb-12px flex items-center">
|
|
|
|
|
|
<p class="cts !mr-16px flex-shrink-0 w-60px">频次</p>
|
2025-06-16 14:42:26 +08:00
|
|
|
|
<a-tag
|
2025-07-01 14:34:16 +08:00
|
|
|
|
:class="`!rounded-2px !px-8px !py-1px !bg-${
|
|
|
|
|
|
frequencyStatus[topicInfo.frequency].bgColor
|
|
|
|
|
|
} !h-22px !color-${frequencyStatus[topicInfo.frequency].color}`"
|
|
|
|
|
|
>{{ frequencyStatus[topicInfo.frequency].label }}</a-tag
|
2025-06-16 14:42:26 +08:00
|
|
|
|
>
|
2025-07-01 14:34:16 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="mb-12px flex items-center">
|
|
|
|
|
|
<p class="cts !mr-16px flex-shrink-0 w-60px">代表性发言</p>
|
|
|
|
|
|
<span class="cts">{{ topicInfo.content }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="flex items-start">
|
|
|
|
|
|
<p class="cts !mr-16px flex-shrink-0 w-60px">原始来源</p>
|
|
|
|
|
|
<div class="flex flex-col">
|
|
|
|
|
|
<div v-for="item in topicInfo.user_pain_point_sources" :key="item" class="mb-18px flex items-center">
|
|
|
|
|
|
<a-link style="background-color: initial" :href="item.link" target="_blank" class="!text-12px">{{
|
|
|
|
|
|
item.title
|
|
|
|
|
|
}}</a-link>
|
|
|
|
|
|
<img src="@/assets/img/hottranslation/xhs.png" width="16" height="16" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2025-06-16 14:42:26 +08:00
|
|
|
|
</a-space>
|
|
|
|
|
|
</div>
|
2025-07-01 14:34:16 +08:00
|
|
|
|
<template #footer>
|
2025-09-03 11:15:37 +08:00
|
|
|
|
<Button size="large" @click="handleCancel">取消</Button>
|
|
|
|
|
|
<Button type="primary" size="large" @click="handleOk"> 确定 </Button>
|
2025-07-01 14:34:16 +08:00
|
|
|
|
</template>
|
2025-09-03 11:15:37 +08:00
|
|
|
|
</Modal>
|
2025-06-16 14:42:26 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
|
import topHeader from './topHeader.vue';
|
2025-09-03 11:15:37 +08:00
|
|
|
|
import { Modal, Button } from 'ant-design-vue';
|
2025-06-16 14:42:26 +08:00
|
|
|
|
import { fetchUserPainPointsDetail, fetchUserPainPointsList } from '@/api/all/index';
|
|
|
|
|
|
import { ref, onMounted, computed } from 'vue';
|
|
|
|
|
|
import top1 from '@/assets/img/captcha/top1.svg';
|
|
|
|
|
|
import top2 from '@/assets/img/captcha/top2.svg';
|
|
|
|
|
|
import top3 from '@/assets/img/captcha/top3.svg';
|
|
|
|
|
|
const topImages = [top1, top2, top3];
|
|
|
|
|
|
const visible = ref(false);
|
|
|
|
|
|
const topicInfo = ref({});
|
|
|
|
|
|
const topHeaderRef = ref();
|
|
|
|
|
|
// 从topHeader获取统一的状态
|
|
|
|
|
|
const selectedIndustry = computed(() => topHeaderRef.value?.selectedIndustry);
|
|
|
|
|
|
const selectedSubCategory = computed(() => topHeaderRef.value?.selectedSubCategory);
|
|
|
|
|
|
const selectedTimePeriod = computed(() => topHeaderRef.value?.selectedTimePeriod);
|
|
|
|
|
|
const dataList = ref([]);
|
2025-07-01 14:34:16 +08:00
|
|
|
|
const frequencyStatus = {
|
|
|
|
|
|
0: {
|
|
|
|
|
|
label: '低频',
|
|
|
|
|
|
color: '#1bae71',
|
|
|
|
|
|
bgColor: '#ebf7f2',
|
|
|
|
|
|
},
|
|
|
|
|
|
1: {
|
|
|
|
|
|
label: '中频',
|
|
|
|
|
|
color: '#cc8b00',
|
|
|
|
|
|
bgColor: '#fff5de',
|
|
|
|
|
|
},
|
|
|
|
|
|
2: {
|
|
|
|
|
|
label: '高频',
|
|
|
|
|
|
color: '#c53c27',
|
|
|
|
|
|
bgColor: '#ffe7e4',
|
|
|
|
|
|
},
|
|
|
|
|
|
};
|
2025-06-22 16:01:48 +08:00
|
|
|
|
const columns = [
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '排名',
|
|
|
|
|
|
dataIndex: 'rank',
|
|
|
|
|
|
slotName: 'rank',
|
|
|
|
|
|
width: 60,
|
|
|
|
|
|
minWidth: 60,
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '痛点名称',
|
|
|
|
|
|
dataIndex: 'name',
|
|
|
|
|
|
width: 300,
|
|
|
|
|
|
minWidth: 300,
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '关键词',
|
|
|
|
|
|
dataIndex: 'keywords',
|
|
|
|
|
|
slotName: 'keywords',
|
|
|
|
|
|
width: 250,
|
|
|
|
|
|
minWidth: 250,
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
width: 180,
|
|
|
|
|
|
minWidth: 180,
|
|
|
|
|
|
title: '频次',
|
|
|
|
|
|
dataIndex: 'frequency',
|
|
|
|
|
|
sortable: {
|
|
|
|
|
|
sortDirections: ['ascend', 'descend'],
|
|
|
|
|
|
},
|
|
|
|
|
|
slotName: 'frequency',
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '代表性发言',
|
|
|
|
|
|
dataIndex: 'content',
|
|
|
|
|
|
slotName: 'content',
|
|
|
|
|
|
width: 320,
|
|
|
|
|
|
minWidth: 320,
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '操作',
|
|
|
|
|
|
slotName: 'optional',
|
|
|
|
|
|
width: 120,
|
|
|
|
|
|
minWidth: 120,
|
|
|
|
|
|
},
|
|
|
|
|
|
];
|
2025-06-16 14:42:26 +08:00
|
|
|
|
// 详情
|
|
|
|
|
|
const gotoDetail = async (record) => {
|
|
|
|
|
|
const res = await fetchUserPainPointsDetail(record.id);
|
2025-06-22 16:01:48 +08:00
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
|
topicInfo.value = res.data;
|
|
|
|
|
|
visible.value = true;
|
|
|
|
|
|
}
|
2025-06-16 14:42:26 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const getUserPainPointsList = async () => {
|
|
|
|
|
|
const params = {
|
|
|
|
|
|
industry_id: selectedIndustry.value,
|
|
|
|
|
|
time_dimension: selectedTimePeriod.value,
|
|
|
|
|
|
};
|
2025-06-21 16:57:01 +08:00
|
|
|
|
if (selectedIndustry.value == undefined) {
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (selectedSubCategory.value == undefined) {
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2025-06-17 11:18:39 +08:00
|
|
|
|
if (selectedSubCategory.value != 0) {
|
|
|
|
|
|
params['industry_id'] = selectedSubCategory.value;
|
|
|
|
|
|
}
|
2025-06-16 14:42:26 +08:00
|
|
|
|
const res = await fetchUserPainPointsList(params);
|
2025-06-22 16:01:48 +08:00
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
|
dataList.value = res.data;
|
|
|
|
|
|
}
|
2025-06-16 14:42:26 +08:00
|
|
|
|
};
|
|
|
|
|
|
// 弹窗的取消
|
|
|
|
|
|
const handleCancel = () => {
|
|
|
|
|
|
visible.value = false;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 弹窗的确定
|
|
|
|
|
|
const handleOk = () => {
|
|
|
|
|
|
visible.value = false;
|
|
|
|
|
|
};
|
|
|
|
|
|
// 监听筛选条件变化
|
2025-06-17 11:18:39 +08:00
|
|
|
|
watch([selectedIndustry, selectedTimePeriod, selectedSubCategory], () => {
|
2025-06-16 14:42:26 +08:00
|
|
|
|
getUserPainPointsList();
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
getUserPainPointsList();
|
|
|
|
|
|
});
|
2025-06-17 11:18:39 +08:00
|
|
|
|
const search = () => {
|
|
|
|
|
|
getUserPainPointsList();
|
|
|
|
|
|
};
|
2025-06-16 14:42:26 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
2025-07-01 14:34:16 +08:00
|
|
|
|
<style scoped lang="scss">
|
2025-06-16 14:42:26 +08:00
|
|
|
|
/* 自定义样式 */
|
|
|
|
|
|
:deep(.arco-table-th) {
|
|
|
|
|
|
background-color: var(--color-fill-2);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.arco-table-tr):hover {
|
|
|
|
|
|
background-color: var(--color-fill-1);
|
|
|
|
|
|
}
|
|
|
|
|
|
:deep(.arco-statistic-content .arco-statistic-value-integer) {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.pop-btn {
|
|
|
|
|
|
background: #fff !important;
|
|
|
|
|
|
border-color: #fff !important;
|
|
|
|
|
|
color: #737478 !important;
|
|
|
|
|
|
margin-left: -5px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.arco-btn-outline) {
|
|
|
|
|
|
color: #6d4cfe !important;
|
|
|
|
|
|
border-color: #6d4cfe !important;
|
|
|
|
|
|
}
|
2025-07-01 14:34:16 +08:00
|
|
|
|
.title-row {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
height: 64px;
|
|
|
|
|
|
padding: 10px 0 2px 0;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
.title {
|
|
|
|
|
|
color: var(--Text-1, #211f24);
|
2025-07-11 16:50:48 +08:00
|
|
|
|
font-family: $font-family-medium;
|
2025-07-01 14:34:16 +08:00
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
font-style: normal;
|
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
|
line-height: 24px; /* 150% */
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
|
.user-pain-points-modal {
|
|
|
|
|
|
.arco-modal-header {
|
|
|
|
|
|
border-bottom: none;
|
|
|
|
|
|
height: 56px;
|
|
|
|
|
|
padding: 0 20px;
|
|
|
|
|
|
.arco-modal-title {
|
|
|
|
|
|
justify-content: flex-start;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.arco-modal-body {
|
|
|
|
|
|
padding: 12px 20px 0;
|
|
|
|
|
|
.cts {
|
|
|
|
|
|
color: var(--Text-2, #3c4043);
|
2025-07-11 16:50:48 +08:00
|
|
|
|
font-family: $font-family-regular;
|
2025-07-01 14:34:16 +08:00
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
font-style: normal;
|
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
|
line-height: 20px; /* 166.667% */
|
|
|
|
|
|
}
|
|
|
|
|
|
p {
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.arco-modal-footer {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
height: 64px;
|
|
|
|
|
|
padding: 0px 20px;
|
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
border-top: 1px solid var(--Border-1, #d7d7d9);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-06-16 14:42:26 +08:00
|
|
|
|
</style>
|