fix:修改大屏数据栏右上角下拉接口,修改默认选中值为第一个
This commit is contained in:
parent
68e54a75fb
commit
fa6b90408c
@ -75,7 +75,7 @@ export function roadCurrent(query) {
|
||||
// 数据栏内右上角下拉框
|
||||
export function getDropList(query) {
|
||||
return request({
|
||||
url: "/bigscreen/getDropdownList",
|
||||
url: "/bigscreen/v2/getDropdownList",
|
||||
method: "get",
|
||||
params: query,
|
||||
});
|
||||
|
||||
@ -106,6 +106,7 @@ export default {
|
||||
this.getChartData();
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
itemSelect: {
|
||||
handler() {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
* @Author: SunTao 328867980@qq.com
|
||||
* @Date: 2024-10-21 10:03:08
|
||||
* @LastEditors: SunTao 328867980@qq.com
|
||||
* @LastEditTime: 2024-12-20 10:53:53
|
||||
* @LastEditTime: 2025-01-06 11:31:25
|
||||
* @FilePath: \znxjxt-ui\src\views\big-screen\traffic-components\traffic-trend.vue
|
||||
* @Description: 病害巡检大屏-病害趋势
|
||||
-->
|
||||
@ -66,6 +66,7 @@ export default {
|
||||
this.getChartData();
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
itemSelect: {
|
||||
handler() {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
* @Author: SunTao 328867980@qq.com
|
||||
* @Date: 2024-10-17 11:34:00
|
||||
* @LastEditors: SunTao 328867980@qq.com
|
||||
* @LastEditTime: 2025-01-02 10:37:46
|
||||
* @LastEditTime: 2025-01-06 11:17:42
|
||||
* @FilePath: \znxjxt-ui\src\views\big-screen\index.vue
|
||||
* @Description: 大屏首页
|
||||
-->
|
||||
@ -663,7 +663,6 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.setTime();
|
||||
// this.handleMessage();
|
||||
},
|
||||
mounted() {
|
||||
this.getSelect();
|
||||
@ -758,6 +757,21 @@ export default {
|
||||
selectTypeList().then(({ code, data }) => {
|
||||
if (code === 200) {
|
||||
this.selectTypeArr = data;
|
||||
// 初始化 leftModuleList 和 rightModuleList 中的 select 值
|
||||
if (this.selectTypeArr.length > 0) {
|
||||
this.leftModuleList = this.leftModuleList.map((item) => ({
|
||||
...item,
|
||||
select: item.selectIsShow
|
||||
? this.selectTypeArr[0].value
|
||||
: item.select,
|
||||
}));
|
||||
this.rightModuleList = this.rightModuleList.map((item) => ({
|
||||
...item,
|
||||
select: item.selectIsShow
|
||||
? this.selectTypeArr[0].value
|
||||
: item.select,
|
||||
}));
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -1411,7 +1425,7 @@ export default {
|
||||
title: "病害统计",
|
||||
component: DiseaseCurrent,
|
||||
selectIsShow: true,
|
||||
select: "",
|
||||
select: this.selectTypeArr[0].value,
|
||||
class: "twe",
|
||||
},
|
||||
];
|
||||
@ -1477,7 +1491,7 @@ export default {
|
||||
title: "附属设施异常统计",
|
||||
component: AnomalyFacilities,
|
||||
selectIsShow: true,
|
||||
select: "",
|
||||
select: this.selectTypeArr[0].value,
|
||||
class: "one",
|
||||
},
|
||||
{
|
||||
@ -1486,7 +1500,7 @@ export default {
|
||||
title: "路产统计",
|
||||
component: RoadStatistic,
|
||||
selectIsShow: true,
|
||||
select: "",
|
||||
select: this.selectTypeArr[0].value,
|
||||
class: "twe",
|
||||
},
|
||||
];
|
||||
@ -1500,11 +1514,6 @@ export default {
|
||||
const data = { type: "carLocation", status: true };
|
||||
this.$ws.send(data);
|
||||
this.$ws.on("message", this.handleMessage, this.indexListenerId);
|
||||
// 将地图层级初始化
|
||||
this.$nextTick(() => {
|
||||
const map = this.$refs.roadMap.instance.get("map");
|
||||
map.getView().setZoom(10);
|
||||
});
|
||||
// 地图右上角多选按钮显示
|
||||
this.getIconType();
|
||||
this.showIconList = true;
|
||||
@ -1533,6 +1542,7 @@ export default {
|
||||
title: "主要病害趋势",
|
||||
component: TrafficTrend,
|
||||
selectIsShow: true,
|
||||
select: this.selectTypeArr[0].value,
|
||||
class: "twe",
|
||||
},
|
||||
{
|
||||
@ -1541,7 +1551,7 @@ export default {
|
||||
title: "病害统计",
|
||||
component: TrafficStatistic,
|
||||
selectIsShow: true,
|
||||
select: "",
|
||||
select: this.selectTypeArr[0].value,
|
||||
class: "twe",
|
||||
},
|
||||
];
|
||||
@ -1552,7 +1562,7 @@ export default {
|
||||
title: "病害日志",
|
||||
component: TrafficLog,
|
||||
selectIsShow: false,
|
||||
select: "",
|
||||
select: this.selectTypeArr[0].value,
|
||||
class: "one",
|
||||
},
|
||||
];
|
||||
@ -1575,7 +1585,6 @@ export default {
|
||||
const map = this.$refs.roadMap.instance.get("map");
|
||||
map.removeLayer(this.clusters);
|
||||
this.clusters = null;
|
||||
map.getView().setZoom(10);
|
||||
});
|
||||
this.getLinePoint();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user