Commit 125bbdb5 by Lin

refactor: 更新策略中心组件与相关逻辑

- 将策略下发筛选项的名称从“strategyIssued”更改为“isStrategySent”,提升代码一致性与可读性。
- 在策略中心组件中添加“全部”选项以增强用户体验,确保筛选逻辑的完整性。
- 调整相关组件以支持新的筛选项名称,确保数据过滤功能正常运行。
1 parent bd287063
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
</div> </div>
<div class="filter-group"> <div class="filter-group">
<span class="label">是否下发策略:</span> <span class="label">是否下发策略:</span>
<el-select v-model="localFilters.strategyIssued" <el-select v-model="localFilters.isStrategySent"
class="filter-select" class="filter-select"
placeholder="全部" placeholder="全部"
size="small"> size="small">
...@@ -171,7 +171,7 @@ export default { ...@@ -171,7 +171,7 @@ export default {
type: Object, type: Object,
default: () => ({ default: () => ({
storeName: "", storeName: "",
strategyIssued: "", isStrategySent: "",
groupId: "", groupId: "",
region: "", region: "",
provinceId: "", provinceId: "",
...@@ -233,7 +233,7 @@ export default { ...@@ -233,7 +233,7 @@ export default {
localFilters: { localFilters: {
...this.filters, ...this.filters,
storeName: this.filters.storeName || "", storeName: this.filters.storeName || "",
strategyIssued: this.filters.strategyIssued ?? "", isStrategySent: this.filters.isStrategySent ?? "",
provinceId: this.filters.provinceId || "", provinceId: this.filters.provinceId || "",
groupId: this.filters.groupId || "", groupId: this.filters.groupId || "",
}, },
...@@ -261,7 +261,7 @@ export default { ...@@ -261,7 +261,7 @@ export default {
this.localFilters = { this.localFilters = {
...newVal, ...newVal,
storeName: newVal.storeName || "", storeName: newVal.storeName || "",
strategyIssued: newVal.strategyIssued ?? "", isStrategySent: newVal.isStrategySent ?? "",
provinceId: newVal.provinceId || "", provinceId: newVal.provinceId || "",
groupId: newVal.groupId || "", groupId: newVal.groupId || "",
}; };
...@@ -358,7 +358,7 @@ export default { ...@@ -358,7 +358,7 @@ export default {
handleReset() { handleReset() {
const resetFilters = { const resetFilters = {
storeName: "", storeName: "",
strategyIssued: "", isStrategySent: "",
region: "", region: "",
provinceId: "", provinceId: "",
brand: [], brand: [],
......
...@@ -151,7 +151,7 @@ export default { ...@@ -151,7 +151,7 @@ export default {
], ],
filters: { filters: {
storeName: "", storeName: "",
strategyIssued: "", isStrategySent: "",
groupId: "", groupId: "",
region: "", region: "",
provinceId: "", provinceId: "",
...@@ -331,7 +331,7 @@ export default { ...@@ -331,7 +331,7 @@ export default {
const { const {
storeName, storeName,
strategyIssued, isStrategySent,
groupId, groupId,
provinceId, provinceId,
firstbrandIds, firstbrandIds,
...@@ -341,7 +341,7 @@ export default { ...@@ -341,7 +341,7 @@ export default {
} = this.filters; } = this.filters;
const params = { const params = {
storeName, storeName,
strategyIssued: strategyIssued === "" ? undefined : strategyIssued, isStrategySent: isStrategySent === "" ? undefined : isStrategySent,
groupId, groupId,
regionId: provinceId, regionId: provinceId,
firstbrandIds: firstbrandIds || [], firstbrandIds: firstbrandIds || [],
...@@ -586,6 +586,15 @@ export default { ...@@ -586,6 +586,15 @@ export default {
value: item.groupId, value: item.groupId,
label: item.groupName, label: item.groupName,
})); }));
// 在列表前面添加「全部」选项(value 为空字符串,与 filters.groupId 默认值一致)
if (this.baseData.groupOptions.length && this.baseData.groupOptions[0].label !== "全部") {
this.baseData.groupOptions.unshift({
value: "",
label: "全部",
});
}
} else {
this.baseData.groupOptions = [{ label: "全部", value: "" }];
} }
}); });
}, },
......
...@@ -24,8 +24,10 @@ ...@@ -24,8 +24,10 @@
<div class="summary-overview-item left"> <div class="summary-overview-item left">
<div v-loading="summaryLeftLoading" <div v-loading="summaryLeftLoading"
class="content"> class="content">
<!-- <img class="bg"
:src="`${IMG_URL}summary.webp`"> -->
<img class="bg" <img class="bg"
:src="`${IMG_URL}summary.webp`"> src="@/assets/strategy/summary.png">
<div class="top-view"> <div class="top-view">
<template v-for="(i, index) in topView"> <template v-for="(i, index) in topView">
<div :key="index" <div :key="index"
...@@ -90,6 +92,22 @@ ...@@ -90,6 +92,22 @@
</template> </template>
</div> </div>
</div> </div>
<div class="summary-item flex fixed-summary02">
<div class="label flex">
触客转化率<div class="num">
{{ formatMom(summaryInfo.contactConversionRate) }}
</div>
</div>
<div class="sub-value flex">
<template>
环比{{ formatMom(summaryInfo.contactConversionRateMon) }}
<template v-if="formatIsRatio(summaryInfo.contactConversionRateMon)">
<img class="arrow"
:src="getIconSrc(formatIsRatio(summaryInfo.contactConversionRateMon))" />
</template>
</template>
</div>
</div>
<template v-for="(i, index) in summaryList"> <template v-for="(i, index) in summaryList">
<div :key="index" <div :key="index"
class="summary-list flex" class="summary-list flex"
...@@ -456,7 +474,7 @@ export default { ...@@ -456,7 +474,7 @@ export default {
flex-shrink: 0; flex-shrink: 0;
.content { .content {
position: relative; position: relative;
height: 459px; height: 487px;
border-radius: 8px; border-radius: 8px;
border: 1px solid transparent; border: 1px solid transparent;
box-sizing: border-box; box-sizing: border-box;
...@@ -557,6 +575,38 @@ export default { ...@@ -557,6 +575,38 @@ export default {
margin-top: 4px; margin-top: 4px;
} }
} }
.fixed-summary02 {
position: absolute;
bottom: 1%;
left: 50%;
transform: translateX(-54%);
min-width: 95px;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
justify-content: center;
white-space: nowrap;
font-size: 13px;
.label {
color: #666666;
flex-shrink: 0;
.num {
display: inline;
color: #2a58ad;
font-size: 14px;
font-weight: 500;
margin-left: 4px;
}
}
.sub-value {
color: #999999;
margin-top: 0;
margin-left: 8px;
flex-shrink: 0;
}
}
.summary-list { .summary-list {
width: 100%; width: 100%;
justify-content: space-between; justify-content: space-between;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!