Commit 5f5a3142 by Lin

feat: 更新项目组列表功能与相关组件

- 将获取项目组列表的API函数重命名为getGroupListAPI,增强代码可读性。
- 在策略分析页面中新增项目组列表的动态加载与展示功能。
- 更新相关组件以支持项目组选项的展示,提升用户交互体验。
1 parent af03e0c1
......@@ -661,7 +661,7 @@ export function getRecruitmentDemandOverview(data = {}) {
/**
* 项目组选择列表
*/
export function getGroupList(data = {}) {
export function getGroupListAPI(data = {}) {
data.method = "dj.api.strategy.warning.group.list";
return request(data, RequestMethods.POST);
}
......
......@@ -35,10 +35,10 @@
filterable
placeholder="全部"
size="small">
<el-option v-for="item in provinceOptions"
:key="item.code"
:label="item.name"
:value="item.code">
<el-option v-for="item in groupOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
......@@ -189,6 +189,10 @@ export default {
type: Array,
default: () => [],
},
groupOptions: {
type: Array,
default: () => [],
},
// 城市选项数据
cityOptions: {
type: Array,
......
......@@ -4,6 +4,7 @@
<HeaderCustom v-model="currentTab"
:brand-options="baseData.brandOptions"
:filters="filters"
:group-options="baseData.groupOptions"
:online-ops-options="baseData.onlineOpsList"
:province-options="baseData.provinceInfoList"
:region-ops-options="baseData.regionOpsList"
......@@ -96,7 +97,7 @@
<script>
import { findMerchantStaffList, merchantStaffByRoleList } from "@api/index";
import { getCarBrandList, getDistrictDetail, getMonitorList, getMonitorTypeDictList } from "@/api/earlyWarningManager";
import { getCarBrandList, getDistrictDetail, getGroupListAPI, getMonitorList, getMonitorTypeDictList } from "@/api/earlyWarningManager";
import noDataImg from "@/assets/strategy/emepty-strategy.png";
import { deepClone } from "@/common/util";
import util from "@/libs/util";
......@@ -164,6 +165,7 @@ export default {
onlineOpsList: [], // 线上运营列表
supervisorOpsList: [], // 督导列表
brandOptions: [], // 品牌级联选择器数据
groupOptions: [], // 项目组列表
},
timeRangeType: { label: "月", value: 2 }, // 当前选中的时间范围类型
timeRangeOptions: [
......@@ -290,6 +292,8 @@ export default {
this.getOnlineOpsList();
// 获取督导列表
this.getSupervisorOpsList();
// 获取项目组列表
this.getGroupList();
// 获取车品牌列表
this.getCarBrandList();
// 获取指标类型列表
......@@ -557,6 +561,16 @@ export default {
}
});
},
getGroupList() {
getGroupListAPI().then((res) => {
if (res && res.length) {
this.baseData.groupOptions = res.map(item => ({
value: item.groupId,
label: item.groupName,
}));
}
});
},
// 获取监控类型字典列表(更简洁的实现)
async getIndicatorTypeList() {
try {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!