fix:修改大屏数据栏右上角下拉接口,修改默认选中值为第一个

This commit is contained in:
SunTao 2025-01-06 11:41:27 +08:00
parent 68e54a75fb
commit fa6b90408c
4 changed files with 26 additions and 15 deletions

View File

@ -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,
});

View File

@ -106,6 +106,7 @@ export default {
this.getChartData();
}
},
immediate: true,
},
itemSelect: {
handler() {

View File

@ -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() {

View File

@ -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();
}