Commit e7b7faba by Lin

refactor: 优化策略分析页面模板结构与样式

- 调整组件引用方式,确保与现有代码风格一致。
- 提升模板可读性,增强用户交互体验。
- 统一组件命名规范,确保一致性。
1 parent ea93b194
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
</HeaderCustom> </HeaderCustom>
<!-- 日期选择器 --> <!-- 日期选择器 -->
<CalendarCustom v-model="timeRangeType" <CalendarCustom v-model="timeRangeType"
:time-range-options="timeRangeOptions"
:date-range.sync="dateRange"
:date-format="dateFormat" :date-format="dateFormat"
@time-range-change="handleTimeRangeChange" :date-range.sync="dateRange"
@date-range-change="handleDateRangeChange" /> :time-range-options="timeRangeOptions"
@date-range-change="handleDateRangeChange"
@time-range-change="handleTimeRangeChange" />
</div> </div>
<div class="content-area"> <div class="content-area">
<!-- 2. KPI 核心指标 --> <!-- 2. KPI 核心指标 -->
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
<!-- 左侧:策略类型分布 --> <!-- 左侧:策略类型分布 -->
<el-col :span="12"> <el-col :span="12">
<StrategyTypeChart ref="strategyTypeChart" <StrategyTypeChart ref="strategyTypeChart"
:pie-data="strategyTypeData" :operator-filter.sync="strategyTypeOperatorFilter"
:operator-filter.sync="strategyTypeOperatorFilter" /> :pie-data="strategyTypeData" />
</el-col> </el-col>
<!-- 右侧:线上运营分布 --> <!-- 右侧:线上运营分布 -->
...@@ -64,32 +64,32 @@ ...@@ -64,32 +64,32 @@
<d2-table-header title="效果分析"> <d2-table-header title="效果分析">
<div class="tool-left"> <div class="tool-left">
<!-- 盯防类型 --> <!-- 盯防类型 -->
<SelectCustom :options="watchTypeOptions" <SelectCustom label="盯防类型"
:value="currentWatchType" :options="watchTypeOptions"
label="盯防类型"
:trigger-icon="require('@/assets/strategy/icon-strategy-type.png')" :trigger-icon="require('@/assets/strategy/icon-strategy-type.png')"
trigger-icon-type="image" trigger-icon-type="image"
:value="currentWatchType"
@change="selectWatchType" /> @change="selectWatchType" />
<span class="v-divider">|</span> <span class="v-divider">|</span>
<!-- 指标类型 --> <!-- 指标类型 -->
<SelectCustom :options="indicatorTypeOptions" <SelectCustom label="指标类型"
:value="currentIndicatorType" :options="indicatorTypeOptions"
label="指标类型"
:trigger-icon="require('@/assets/strategy/icon-strategy-type06.png')" :trigger-icon="require('@/assets/strategy/icon-strategy-type06.png')"
trigger-icon-type="image" trigger-icon-type="image"
:value="currentIndicatorType"
@change="selectIndicatorType" /> @change="selectIndicatorType" />
</div> </div>
</d2-table-header> </d2-table-header>
<d2-table ref="table" <d2-table ref="table"
:search-form="searchFormSearch"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn" :before-search-fn="beforeSearchFn"
:get-list-api="getListApi"
:has-page="false" :has-page="false"
:no-data-img="noDataImg" :no-data-img="noDataImg"
no-data-text="暂无数据"> no-data-text="暂无数据"
:search-form="searchFormSearch"
:table-params="tableParams">
<!-- 主营品牌 --> <!-- 主营品牌 -->
<template #mainBrandsStr="scope"> <template #mainBrandsStr="scope">
<div> <div>
...@@ -217,9 +217,11 @@ export default { ...@@ -217,9 +217,11 @@ export default {
currentTab: { label: "延保", value: 1 }, currentTab: { label: "延保", value: 1 },
tabs: [ tabs: [
{ label: "延保", value: 1 }, { label: "延保", value: 1 },
{ label: "权益", value: 2 },
{ label: "轻改", value: 3 },
], ],
// 时间范围类型 // 时间范围类型
timeRangeType: { label: "周", value: 1 }, timeRangeType: { label: "月", value: 2 },
timeRangeOptions: [ timeRangeOptions: [
{ label: "周", value: 1 }, { label: "周", value: 1 },
{ label: "月", value: 2 }, { label: "月", value: 2 },
...@@ -315,17 +317,33 @@ export default { ...@@ -315,17 +317,33 @@ export default {
}, },
}, },
{ {
label: "当期指标", label: "区域督导",
prop: "cycleIndicator", prop: "areaOperator",
minWidth: 140, minWidth: 80,
type: "slot", type: "slot",
addHtml: "areaOperator",
formatter: (cellValue) => { formatter: (cellValue) => {
if (cellValue.cycleIndicator == null && cellValue.cycleIndicator == undefined) { if (!cellValue.areaOperator || !Array.isArray(cellValue.areaOperator)) {
return "-"; return "-";
} }
return `${cellValue.cycleIndicator}${this.currentWatchType.value == 1 ? "%" : ""}`; return cellValue.areaOperator
.map(item => item.username)
.filter(username => username)
.join("/") || "、";
}, },
}, },
// {
// label: "当期指标",
// prop: "cycleIndicator",
// minWidth: 140,
// type: "slot",
// formatter: (cellValue) => {
// if (cellValue.cycleIndicator == null && cellValue.cycleIndicator == undefined) {
// return "-";
// }
// return `${cellValue.cycleIndicator}${this.currentWatchType.value == 1 ? "%" : ""}`;
// },
// },
{ {
label: "执行策略总数", label: "执行策略总数",
prop: "strategyTotalCount", prop: "strategyTotalCount",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!