Commit 39658b86 by 前端

Merge branch 'feature/strategy-center' into 'SAAS+V5.8.2'

Feature/strategy center

See merge request !734
2 parents e411f359 bad969b4
<template> <template>
<div class="dashboard-card rank-card"> <div class="dashboard-card rank-card">
<div class="card-header"> <div class="card-header">
<span class="card-title">线上运营分布</span> <span class="card-title">线上运营分布</span>
</div> </div>
<div class="rank-list"> <div class="rank-list">
<!-- 表头 --> <!-- 表头 -->
<div class="rank-header"> <div class="rank-header">
<span class="rank-header-col" style="flex: 1;">排名</span> <div v-for="col in rankColumns"
<span class="rank-header-col" style="flex: 1;">姓名</span> :key="col.key"
<span class="rank-header-col" style="flex: 1; text-align: center;">策略总数</span> :class="col.className">
<span class="rank-header-col" style="flex: 1; text-align: center;">占比</span> {{ col.label }}
<span class="rank-header-col" style="flex: 1; text-align: center;">门店总数</span>
<span class="rank-header-col" style="flex: 1; text-align: center;">占比</span>
</div>
<!-- 列表内容 -->
<block v-if="rankData.length > 0">
<div v-for="(item, index) in rankData"
:key="index"
class="rank-item">
<!-- 排名 Icon 处理 -->
<div class="rank-index"
:class="`rank-${index + 1}`">
<img v-if="index < 3"
:src="require(`@/assets/strategy/icon-strategy-rank0${index + 1}.png`)"
style="width: 24px; height: 24px;" />
<span v-else
style="width: 20px; height: 20px; border-radius: 50%; opacity: 1; background: #2a58ad1a; display: inline-block; text-align: center; line-height: 20px;">
{{ index + 1 }}
</span>
</div>
<div class="rank-name" :title="item.staffName">
{{ item.staffName }}
</div>
<div class="rank-col">
{{ item.strategyCount }}
</div>
<div class="rank-col">
{{ item.strategyCountPercent }}%
</div>
<div class="rank-col">
{{ item.storeCount }}
</div>
<div class="rank-col">
{{ item.storeCountPercent }}%
</div>
</div>
</block>
<block v-else>
<!-- 空数据占位,实际显示在 .dashboard-card 层级 -->
</block>
</div> </div>
<div v-if="rankData.length === 0" class="empty-box"> </div>
<img alt="暂无数据" :src="noDataImg"> <!-- 列表内容 -->
<div class="empty-text"> <template v-if="rankData.length > 0">
暂无数据 <div v-for="(item, index) in rankData"
</div> :key="index"
class="rank-item">
<!-- 排名 Icon 处理 -->
<div class="rank-index"
:class="`rank-${index + 1}`">
<img v-if="index < 3"
style="width: 24px; height: 24px;"
:src="require(`@/assets/strategy/icon-strategy-rank0${index + 1}.png`)" />
<span v-else
style="width: 20px; height: 20px; border-radius: 50%; opacity: 1; background: #2a58ad1a; display: inline-block; text-align: center; line-height: 20px;">
{{ index + 1 }}
</span>
</div>
<div class="rank-name" :title="item.staffName">
{{ item.staffName || '-' }}
</div>
<div class="rank-col">
{{ item.strategyCount }}
</div>
<div class="rank-col">
{{ item.strategyCountPercent }}%
</div>
<div class="rank-col">
{{ item.storeCount }}
</div>
<div class="rank-col">
{{ item.storeCountPercent }}%
</div>
</div> </div>
<div class="bottom-cover"></div> </template>
</div>
<div v-if="rankData.length === 0" class="empty-box">
<img alt="暂无数据" :src="noDataImg">
<div class="empty-text">
暂无数据
</div>
</div> </div>
<div class="bottom-cover"></div>
</div>
</template> </template>
<script> <script>
import noDataImg from "@/assets/strategy/emepty-strategy.png"; import noDataImg from "@/assets/strategy/emepty-strategy.png";
const RANK_COLUMNS = [
{ key: "rank", label: "排名", className: "rank-index" },
{ key: "name", label: "姓名", className: "rank-name" },
{ key: "strategyCount", label: "策略总数", className: "rank-col" },
{ key: "strategyPercent", label: "占比", className: "rank-col" },
{ key: "storeCount", label: "门店总数", className: "rank-col" },
{ key: "storePercent", label: "占比", className: "rank-col" },
];
export default { export default {
name: "OnlineOperatorRanking", name: "OnlineOperatorRanking",
props: { props: {
...@@ -75,6 +80,7 @@ export default { ...@@ -75,6 +80,7 @@ export default {
data() { data() {
return { return {
noDataImg, noDataImg,
rankColumns: RANK_COLUMNS,
}; };
}, },
}; };
...@@ -123,13 +129,19 @@ $bg-white: #fff; ...@@ -123,13 +129,19 @@ $bg-white: #fff;
font-size: 13px; font-size: 13px;
overflow: scroll; overflow: scroll;
max-height: 260px; max-height: 260px;
.rank-index,
.rank-name,
.rank-col {
flex: 1;
}
.rank-col {
text-align: center;
}
.rank-header { .rank-header {
display: flex; display: flex;
color: #909399; color: #909399;
.rank-header-col {
display: inline-block;
}
} }
.rank-item { .rank-item {
...@@ -141,12 +153,7 @@ $bg-white: #fff; ...@@ -141,12 +153,7 @@ $bg-white: #fff;
border-bottom: none; border-bottom: none;
} }
.rank-index {
flex: 1;
}
.rank-name { .rank-name {
flex: 1;
color: #303133; color: #303133;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
...@@ -154,8 +161,6 @@ $bg-white: #fff; ...@@ -154,8 +161,6 @@ $bg-white: #fff;
} }
.rank-col { .rank-col {
flex: 1;
text-align: center;
color: #606266; color: #606266;
} }
} }
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<!-- 1. 顶部导航栏 --> <!-- 1. 顶部导航栏 -->
<div class="top-header-wrapper"> <div class="top-header-wrapper">
<HeaderCustom v-model="currentTab" <HeaderCustom v-model="currentTab"
:show-bottom-border="false"
:tabs="tabs"> :tabs="tabs">
</HeaderCustom> </HeaderCustom>
<!-- 日期选择器 --> <!-- 日期选择器 -->
...@@ -13,6 +14,7 @@ ...@@ -13,6 +14,7 @@
@date-range-change="handleDateRangeChange" @date-range-change="handleDateRangeChange"
@time-range-change="handleTimeRangeChange" /> @time-range-change="handleTimeRangeChange" />
</div> </div>
<div class="border-bottom-line"></div>
<div class="content-area"> <div class="content-area">
<!-- 2. KPI 核心指标 --> <!-- 2. KPI 核心指标 -->
<div class="top-content"> <div class="top-content">
...@@ -428,6 +430,10 @@ export default { ...@@ -428,6 +430,10 @@ export default {
this.fetchStrategyOnlineDist(); this.fetchStrategyOnlineDist();
// 重置运营人员筛选 // 重置运营人员筛选
this.strategyTypeOperatorFilter = null; this.strategyTypeOperatorFilter = null;
// 切换业务类型后,更新效果分析表格传参并重新请求
this.$nextTick(() => {
this.refreshEffectTable();
});
} }
}, },
// 监听策略类型分布运营人员筛选变化,防抖请求数据 // 监听策略类型分布运营人员筛选变化,防抖请求数据
...@@ -503,8 +509,11 @@ export default { ...@@ -503,8 +509,11 @@ export default {
}; };
} }
}, },
handleTabChange(tab) { /**
this.currentTab = tab; * 刷新效果分析表格(beforeSearchFn 会同步 businessType 等参数,再调用 wrapStrategyEffectList)
*/
refreshEffectTable() {
this.$refs.table && this.$refs.table.refreshTable();
}, },
/** /**
* 搜索前处理 * 搜索前处理
...@@ -565,14 +574,7 @@ export default { ...@@ -565,14 +574,7 @@ export default {
value: item.value !== undefined ? item.value : item.label, value: item.value !== undefined ? item.value : item.label,
}; };
this.$nextTick(() => { this.$nextTick(() => {
this.searchFormSearch = deepClone({ this.refreshEffectTable();
startDate: this.startDate,
endDate: this.endDate,
businessType: this.currentTab.value,
warningType: this.currentWatchType.value || null,
periodType: this.timeRangeType.value,
});
this.$refs.table && this.$refs.table.refreshTable();
}); });
}, },
/** /**
...@@ -672,7 +674,7 @@ export default { ...@@ -672,7 +674,7 @@ export default {
this.fetchStrategyTypeDist(); this.fetchStrategyTypeDist();
this.fetchStrategyOnlineDist(); this.fetchStrategyOnlineDist();
// 刷新表格数据 // 刷新表格数据
this.$refs.table && this.$refs.table.refreshTable(); this.refreshEffectTable();
}, },
/** /**
* 处理时间范围类型变化 * 处理时间范围类型变化
...@@ -713,7 +715,6 @@ export default { ...@@ -713,7 +715,6 @@ export default {
uuid: this.strategyTypeOperatorFilter, uuid: this.strategyTypeOperatorFilter,
}; };
const res = await getStrategyTypeDist(params); const res = await getStrategyTypeDist(params);
console.log("getStrategyTypeDist", res);
this.strategyTypeData = res || []; this.strategyTypeData = res || [];
} catch (error) { } catch (error) {
console.error("获取策略类型分布失败:", error); console.error("获取策略类型分布失败:", error);
...@@ -806,6 +807,11 @@ $bg-white: #fff; ...@@ -806,6 +807,11 @@ $bg-white: #fff;
background-color: #fff; background-color: #fff;
} }
.border-bottom-line {
margin-top: -1px;
border-bottom: 1px solid #e5e5e5;
}
.content-area { .content-area {
min-height: 0; min-height: 0;
width: 100%; width: 100%;
......
<template> <template>
<div class="top-header"> <div class="top-header">
<!-- Tabs --> <!-- Tabs -->
<div ref="tabsNav" class="tabs-nav"> <div ref="tabsNav"
class="tabs-nav"
:class="{ 'tabs-nav--no-border': !showBottomBorder }">
<div v-for="(tab, index) in tabs" <div v-for="(tab, index) in tabs"
:key="getTabKey(tab, index)" :key="getTabKey(tab, index)"
:ref="`tabItem${index}`" :ref="`tabItem${index}`"
...@@ -220,6 +222,11 @@ export default { ...@@ -220,6 +222,11 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
// 是否显示 tabs 区域下边框,默认显示
showBottomBorder: {
type: Boolean,
default: true,
},
}, },
data() { data() {
return { return {
...@@ -428,6 +435,10 @@ $text-orange: #ff7d00; ...@@ -428,6 +435,10 @@ $text-orange: #ff7d00;
font-size: 16px; font-size: 16px;
} }
} }
&--no-border {
border-bottom: none;
}
} }
.active-line { .active-line {
......
<template> <template>
<el-dropdown :disabled="disabled" <el-dropdown placement="bottom-start"
placement="bottom-start"
trigger="click" trigger="click"
:disabled="disabled"
@command="handleSelect"> @command="handleSelect">
<div class="icon-text-btn" <div class="icon-text-btn"
:class="{ 'has-selected': value && value.label && value.label !== defaultText, 'is-disabled': disabled }"> :class="{ 'has-selected': value && value.label && value.label !== defaultText, 'is-disabled': disabled }">
......
...@@ -399,6 +399,7 @@ export default { ...@@ -399,6 +399,7 @@ export default {
// getMonitorList(cleanParams).then((res) => { // getMonitorList(cleanParams).then((res) => {
getWarningSummaryList(cleanParams).then((res) => { getWarningSummaryList(cleanParams).then((res) => {
if (res) { if (res) {
console.log("getWarningSummaryList", res);
// 为每个数组元素添加 checked 字段,默认为 false // 为每个数组元素添加 checked 字段,默认为 false
this.cardList = Array.isArray(res) this.cardList = Array.isArray(res)
? res.map(item => ({ ...item, checked: false })) ? res.map(item => ({ ...item, checked: false }))
......
...@@ -193,12 +193,13 @@ ...@@ -193,12 +193,13 @@
<div v-loading="staffRightLoading" <div v-loading="staffRightLoading"
class="staff-overview-item right"> class="staff-overview-item right">
<div class="content"> <div class="content">
<OverViewList :business-type="paramsInfo.bizs" <OverViewList v-if="paramsInfo.bizs != 3"
:business-type="paramsInfo.bizs"
:is-harmony="isHarmony" :is-harmony="isHarmony"
:is-staff="true" :is-staff="true"
:view-data="viewData"> :view-data="viewData">
</OverViewList> </OverViewList>
<div v-show="!isHarmony" class="empty-box"> <div v-show="!isHarmony || paramsInfo.bizs == 3" class="empty-box">
<img alt="暂无数据" src="@/assets/strategy/emepty-strategy.png"> <img alt="暂无数据" src="@/assets/strategy/emepty-strategy.png">
<div class="empty-text"> <div class="empty-text">
暂无数据 暂无数据
...@@ -507,12 +508,12 @@ export default { ...@@ -507,12 +508,12 @@ export default {
warningInfoList.forEach((e, index) => { warningInfoList.forEach((e, index) => {
if ((index + 1) % 2 == 0) { if ((index + 1) % 2 == 0) {
rightWarningInfoList.push({ rightWarningInfoList.push({
type: e.warningText.startsWith("兜底预警") ? 1 : 2, type: e.warningType,
text: `${e.warningTypeName}: ${e.warningText}`, text: `${e.warningTypeName}: ${e.warningText}`,
}); });
} else { } else {
leftWarningInfoList.push({ leftWarningInfoList.push({
type: e.warningText.startsWith("兜底预警") ? 1 : 2, type: e.warningType,
text: `${e.warningTypeName}: ${e.warningText}`, text: `${e.warningTypeName}: ${e.warningText}`,
}); });
} }
......
...@@ -7,9 +7,12 @@ ...@@ -7,9 +7,12 @@
<div class="text text-hide"> <div class="text text-hide">
{{ STRATEGYTYPEOPTIONS[item.strategyType] }} {{ STRATEGYTYPEOPTIONS[item.strategyType] }}
</div> </div>
<div class="strategy-item-status" :style="{ color: formatStatusStyle(item.pushFlag).color, background: formatStatusStyle(item.pushFlag).bg }"> <template v-if="item.strategyType != 7">
{{ formatPushFlag(item.pushFlag) }} <div class="strategy-item-status" :style="{ color: formatStatusStyle(item.pushFlag).color, background: formatStatusStyle(item.pushFlag).bg }">
</div> {{ formatPushFlag(item.pushFlag) }}
</div>
</template>
</div> </div>
<div class="strategy-item-created"> <div class="strategy-item-created">
{{ item.createdDateText }}<span>{{ item.createdBy }}</span> {{ item.createdDateText }}<span>{{ item.createdBy }}</span>
...@@ -33,7 +36,7 @@ ...@@ -33,7 +36,7 @@
<template v-else> <template v-else>
<div v-html="item[i.key]"></div> <div v-html="item[i.key]"></div>
</template> </template>
<div v-html="item[i.key]"></div>
</div> </div>
</template> </template>
<span :class="[i.format ? 'one-line-ellipsis' : 'two-line-ellipsis']" <span :class="[i.format ? 'one-line-ellipsis' : 'two-line-ellipsis']"
...@@ -56,7 +59,8 @@ ...@@ -56,7 +59,8 @@
</template> </template>
<div class="btn-list flex"> <div class="btn-list flex">
<!-- 状态=未下发 --> <!-- 状态=未下发 -->
<template v-if="item.pushFlag == 0 || item.pushFlag == 2 || item.pushFlag == 3"> <!-- 留言没有删除 -->
<template v-if="(item.pushFlag == 0 || item.pushFlag == 2 || item.pushFlag == 3) && item.strategyType != 7">
<el-button class="btn-default _btn" <el-button class="btn-default _btn"
:size="size" :size="size"
@click="deleteStrategy(item)"> @click="deleteStrategy(item)">
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 'wangzhihui' '1733904062@qq.com' * @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2026-04-01 09:57:49 * @Date: 2026-04-01 09:57:49
* @LastEditors: 'wangzhihui' '1733904062@qq.com' * @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2026-06-10 10:14:26 * @LastEditTime: 2026-06-11 16:15:15
* @FilePath: \dj-car-life-system\src\views\earlyWarningManager\strategyCentre\storeSignboard\components\StrategyList\contant.js * @FilePath: \dj-car-life-system\src\views\earlyWarningManager\strategyCentre\storeSignboard\components\StrategyList\contant.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -93,6 +93,7 @@ const STRATEGY_9 = [ ...@@ -93,6 +93,7 @@ const STRATEGY_9 = [
// STAFF_FORMAT("问题人员"), // STAFF_FORMAT("问题人员"),
{ {
label: "问题人员", label: "问题人员",
tooltip: true,
format: (val) => { format: (val) => {
let { staffList } = val; let { staffList } = val;
return staffList.filter(item => item.userPosition != 8 && item.userPosition != 9).map(item => item.userName).join("/") || "-"; return staffList.filter(item => item.userPosition != 8 && item.userPosition != 9).map(item => item.userName).join("/") || "-";
......
...@@ -149,13 +149,14 @@ ...@@ -149,13 +149,14 @@
<div class="summary-overview-item right"> <div class="summary-overview-item right">
<div v-loading="summaryRightLoading" <div v-loading="summaryRightLoading"
class="content"> class="content">
<OverViewList has-e-hi <OverViewList v-if="paramsInfo.bizs != 3"
has-e-hi
:business-type="paramsInfo.bizs" :business-type="paramsInfo.bizs"
:is-harmony="isHarmony" :is-harmony="isHarmony"
:is-oem-data-source="activeDataSource === 2" :is-oem-data-source="activeDataSource === 2"
:view-data="viewData"> :view-data="viewData">
</OverViewList> </OverViewList>
<div v-show="!isHarmony" class="empty-box"> <div v-show="!isHarmony || paramsInfo.bizs == 3" class="empty-box">
<img alt="暂无数据" src="@/assets/strategy/emepty-strategy.png"> <img alt="暂无数据" src="@/assets/strategy/emepty-strategy.png">
<div class="empty-text"> <div class="empty-text">
暂无数据 暂无数据
...@@ -370,6 +371,7 @@ export default { ...@@ -370,6 +371,7 @@ export default {
} else { } else {
this.getStrategyMerchantAnalysisStoreDetailSummary(); this.getStrategyMerchantAnalysisStoreDetailSummary();
this.getStrategyMerchantAnalysisGoodsSummaryWithWarn(); this.getStrategyMerchantAnalysisGoodsSummaryWithWarn();
this.getStrategyMerchantListWarningInfo();
} }
}, },
async getStrategyBusinessAnalysisStoreSpecialBrand() { async getStrategyBusinessAnalysisStoreSpecialBrand() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!