Commit af03e0c1 by Lin

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

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