Commit af03e0c1 by Lin

feat: 新增督导筛选项与相关功能

- 在策略分析页面中新增督导选项,增强数据筛选能力。
- 更新组件以支持督导列表的动态加载与展示。
- 调整样式与结构,提升用户交互体验与可读性。
1 parent 6818979b
......@@ -73,7 +73,7 @@
filterable
placeholder="全部"
size="small">
<el-option v-for="item in onlineOpsOptions"
<el-option v-for="item in supervisorOpsOptions"
:key="item.value"
:label="item.label"
:value="item.value">
......@@ -119,6 +119,10 @@ export default {
type: Array,
default: () => [],
},
supervisorOpsOptions: {
type: Array,
default: () => [],
},
cascaderProps: {
type: Object,
default: () => ({}),
......
<template>
<div class="top-header">
<!-- 左侧 Tabs -->
<!-- Tabs -->
<div ref="tabsNav" class="tabs-nav">
<div v-for="(tab, index) in tabs"
:key="getTabKey(tab, index)"
......@@ -16,7 +16,7 @@
</div>
</div>
<!-- 右侧 筛选区 + 按钮 -->
<!-- 筛选区 + 按钮 -->
<div v-if="showRightArea" class="filter-area">
<div class="filter-group">
<span class="label">门店名称:</span>
......@@ -114,9 +114,24 @@
</el-option>
</el-select>
</div>
<div class="filter-group filter-more" @click="openFiltrateDialog">
<span class="filter-more-text">更多筛选</span>
<i class="el-icon-arrow-right filter-more-icon"></i>
<div class="filter-actions-right">
<div class="filter-group filter-more" @click="openFiltrateDialog">
<span class="filter-more-text">更多筛选</span>
<i class="el-icon-arrow-right filter-more-icon"></i>
</div>
<div class="btn-group">
<el-button class="btn-search"
size="small"
type="primary"
@click="handleSearch">
查询
</el-button>
<el-button class="btn-reset"
size="small"
@click="handleReset">
重置
</el-button>
</div>
</div>
<FiltrateDialog :brand-options="brandOptions"
......@@ -125,23 +140,9 @@
:online-ops-options="onlineOpsOptions"
:province-options="provinceOptions"
:region-ops-options="regionOpsOptions"
:supervisor-ops-options="supervisorOpsOptions"
:visible.sync="filtrateDialogVisible"
@confirm="handleFiltrateConfirm" />
<!-- 按钮组 -->
<div class="btn-group">
<el-button class="btn-search"
size="small"
type="primary"
@click="handleSearch">
查询
</el-button>
<el-button class="btn-reset"
size="small"
@click="handleReset">
重置
</el-button>
</div>
</div>
</div>
</template>
......@@ -203,6 +204,11 @@ export default {
type: Array,
default: () => [],
},
// 区域督导选项数据
supervisorOpsOptions: {
type: Array,
default: () => [],
},
// 控制筛选区域是否展示
showRightArea: {
type: Boolean,
......@@ -373,10 +379,9 @@ $text-orange: #ff7d00;
// ================= Top Header =================
.top-header {
background: #fff;
height: 54px;
display: flex;
align-items: center;
padding: 0 24px;
flex-direction: column;
align-items: stretch;
border-radius: 4px;
margin-bottom: 1px;
position: sticky;
......@@ -389,10 +394,11 @@ $text-orange: #ff7d00;
.tabs-nav {
position: relative;
display: flex;
height: 100%;
flex-shrink: 0;
border-bottom: 1px solid #e5e5e5;
padding: 17px 24px;
.tab-item {
height: 100%;
height: 34px;
width: 54px;
display: flex;
align-items: center;
......@@ -427,32 +433,52 @@ $text-orange: #ff7d00;
.filter-area {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
margin-left: auto;
justify-content: flex-start;
width: 100%;
min-width: 0;
box-sizing: border-box;
padding: 16px 24px;
gap: 8px 0;
.filter-group {
display: flex;
align-items: center;
margin-right: 24px;
max-width: 100%;
flex-shrink: 1;
min-width: 0;
.label {
font-size: 14px;
color: $text-sub;
margin-right: 8px;
white-space: nowrap;
flex-shrink: 0;
}
.filter-select {
width: 123px;
width: 300px;
max-width: 100%;
flex-shrink: 1;
min-width: 0;
}
.filter-select-brand {
min-width: 120px;
width: auto;
}
}
&.filter-more {
.filter-actions-right {
display: flex;
align-items: center;
gap: 12px;
margin-left: auto;
flex-shrink: 0;
.filter-more {
width: 88px;
height: 32px;
margin-right: 24px;
height: 34px;
margin-right: 0;
border: 1px solid #e5e5e5;
color: $text-sub-2;
font-size: 14px;
......@@ -461,6 +487,7 @@ $text-orange: #ff7d00;
flex-shrink: 0;
box-sizing: border-box;
border-radius: 4px;
.filter-more-text {
line-height: 1;
}
......
......@@ -8,12 +8,12 @@
:province-options="baseData.provinceInfoList"
:region-ops-options="baseData.regionOpsList"
:show-right-area="true"
:supervisor-ops-options="baseData.supervisorOpsList"
:tabs="tabs"
@reset="handleReset"
@search="handleSearch"
@tab-change="handleTabChange">
</HeaderCustom>
<!-- 2. 中间工具栏 -->
<div class="toolbar-container">
<div class="tool-left">
......@@ -155,12 +155,14 @@ export default {
brand: [],
regionOps: "",
onlineOps: "",
flightSupervisionId: "",
}, // 顶部筛选项表单
// 选择器数据
baseData: {
provinceInfoList: [],
regionOpsList: [], // 区域运营列表
onlineOpsList: [], // 线上运营列表
supervisorOpsList: [], // 督导列表
brandOptions: [], // 品牌级联选择器数据
},
timeRangeType: { label: "月", value: 2 }, // 当前选中的时间范围类型
......@@ -286,6 +288,8 @@ export default {
this.getRegionOpsList();
// 获取线上运营列表
this.getOnlineOpsList();
// 获取督导列表
this.getSupervisorOpsList();
// 获取车品牌列表
this.getCarBrandList();
// 获取指标类型列表
......@@ -533,6 +537,26 @@ export default {
}
});
},
// 获取督导列表
getSupervisorOpsList() {
merchantStaffByRoleList({ roleName: "线上运营" }).then((res) => {
console.log("督导列表:", res);
if (res && res.length) {
// 将返回的数据转换为选择器需要的格式
this.baseData.supervisorOpsList = res.map(item => ({
value: item.uuid,
label: item.staffName,
}));
// 在列表前面添加"全部"选项
if (this.baseData.supervisorOpsList.length && this.baseData.supervisorOpsList[0].label !== "全部") {
this.baseData.supervisorOpsList.unshift({
value: null,
label: "全部",
});
}
}
});
},
// 获取监控类型字典列表(更简洁的实现)
async getIndicatorTypeList() {
try {
......@@ -610,7 +634,7 @@ export default {
$primary: #2a58ad;
$text-main: #1d2129;
$text-sub: #333333;
$border: #e5e6eb;
$border: #e5e5e5;
$bg-gray: #eff3f6;
$bg-white: #fff;
......@@ -635,7 +659,7 @@ $bg-white: #fff;
gap: 12px;
border-radius: 0 0 4px 4px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
border-top: 1px solid $border;
border-top: 1px solid #eeeeee6b;
border-bottom: 1px solid $border;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!