fix:大屏修改

This commit is contained in:
SunTao 2024-11-15 18:08:37 +08:00
parent c9156a2813
commit 0c2b288cd7
4 changed files with 37 additions and 50 deletions

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-24 15:03:28 * @Date: 2024-10-24 15:03:28
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-11-15 14:57:02 * @LastEditTime: 2024-11-15 16:13:41
* @FilePath: \znxjxt-ui\src\api\xj\screen\index.js * @FilePath: \znxjxt-ui\src\api\xj\screen\index.js
* @Description: 大屏首页接口 * @Description: 大屏首页接口
*/ */
@ -37,17 +37,18 @@ export function mapPointList(query) {
// 获取地图绘制线段数据接口 // 获取地图绘制线段数据接口
export function mapPciList(query) { export function mapPciList(query) {
return request({ return request({
url: "/bigscreen/mapPci", url: "/bigscreen/v2/mapPci",
method: "get", method: "get",
params: query, params: query,
}); });
} }
// 获取图片背景下地图坐标信息 // 获取图片背景下地图坐标信息
export function comppanyImg() { export function comppanyImg(params) {
return request({ return request({
url: "/bigscreen/getCompanyInfo", url: "/bigscreen/v2/getCompanyInfo",
method: "get", method: "get",
params,
}); });
} }

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-17 11:34:00 * @Date: 2024-10-17 11:34:00
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-11-15 10:52:41 * @LastEditTime: 2024-11-15 17:40:06
* @FilePath: \znxjxt-ui\src\views\big-screen\index.vue * @FilePath: \znxjxt-ui\src\views\big-screen\index.vue
* @Description: 大屏首页 * @Description: 大屏首页
--> -->
@ -377,12 +377,10 @@ export default {
{ {
value: "shejiyuanze", value: "shejiyuanze",
label: "设计原则", label: "设计原则",
}, },
{ {
value: "daohang", value: "daohang",
label: "导航", label: "导航",
}, },
], ],
}, },
@ -393,7 +391,6 @@ export default {
{ {
value: "basic", value: "basic",
label: "Basic", label: "Basic",
}, },
{ {
value: "form", value: "form",
@ -715,8 +712,8 @@ export default {
/* 获取图片背景下坐标数据 */ /* 获取图片背景下坐标数据 */
getMapCare(value) { getMapCare(value) {
console.log(value, "获取图片背景下坐标数据"); console.log(value,this.mapCareSelect, "获取图片背景下坐标数据");
comppanyImg({ type: this.mapCareSelect }).then(({ code, data }) => { comppanyImg({ type: value }).then(({ code, data }) => {
if (code === 200) { if (code === 200) {
this.mapCareList = data; this.mapCareList = data;
} }
@ -933,7 +930,7 @@ export default {
}), }),
// 线 // 线
stroke: new Stroke({ stroke: new Stroke({
color: "#0ABE67", color: this.getLineColor(element.pci),
width: 5, width: 5,
}), }),
// //
@ -962,6 +959,21 @@ export default {
}); });
}, },
/* 地图线段颜色区分 */
getLineColor(value) {
if (value > 92) {
return "#0ABE67";
} else if (92 >= value > 80) {
return "#03BDE7";
} else if (80 >= value > 70) {
return "#E7CA03";
} else if (70 >= value > 60) {
return "#D47F07";
} else {
return "#E64548";
}
},
/* 地图下方4图标类别切换点击事件 */ /* 地图下方4图标类别切换点击事件 */
changeIconType(value) { changeIconType(value) {
if (this.bottomTipClick !== value) { if (this.bottomTipClick !== value) {
@ -973,9 +985,8 @@ export default {
/* 获取icon多选数据 */ /* 获取icon多选数据 */
getIconType() { getIconType() {
const type = this.elementDiv === "RoadScreen" ? "" : this.bottomTipClick;
this.mapLogeList = {}; this.mapLogeList = {};
getItemTypes({ classType: type }).then(({ code, data }) => { getItemTypes({ classType: this.bottomTipClick,type:this.elementDiv }).then(({ code, data }) => {
if (code === 200) { if (code === 200) {
this.iconTypeList = data; this.iconTypeList = data;
this.iconType = data.map((item) => { this.iconType = data.map((item) => {
@ -991,23 +1002,6 @@ export default {
/* 传回来的地图图层 */ /* 传回来的地图图层 */
getZoom(zoom) { getZoom(zoom) {
this.mapZoom = zoom; this.mapZoom = zoom;
// if (zoom === "11" && this.mapZoom !== zoom) {
// this.mapZoom = zoom;
// this.$nextTick(() => {
// const map = this.$refs.roadMap.instance.get("map");
// map.removeLayer(this.markLayerLines);
// this.markLayerLines = null;
// });
// this.getLinePoint();
// } else if (zoom === "10" && this.mapZoom !== zoom) {
// this.mapZoom = zoom;
// this.$nextTick(() => {
// const map = this.$refs.roadMap.instance.get("map");
// map.removeLayer(this.markLayerLines);
// this.markLayerLines = null;
// });
// this.getLinePoint();
// }
if (this.clusters && zoom * 1 > 15) { if (this.clusters && zoom * 1 > 15) {
this.clusters.getSource().setDistance(0); this.clusters.getSource().setDistance(0);
} else if (this.clusters && zoom * 1 <= 15) { } else if (this.clusters && zoom * 1 <= 15) {
@ -1015,15 +1009,6 @@ export default {
} }
}, },
/* 地图缩放完成事件 */
// mapMoveend(zoom) {
// if (this.clusters && zoom * 1 > 15) {
// this.clusters.getSource().setDistance(0);
// } else if (this.clusters && zoom * 1 <= 15) {
// this.clusters.getSource().setDistance(100);
// }
// },
/* 地图选中feature事件 */ /* 地图选中feature事件 */
featureSelect(e) { featureSelect(e) {
const map = this.$refs.roadMap.instance.get("map"); const map = this.$refs.roadMap.instance.get("map");

View File

@ -53,11 +53,11 @@ export default {
getData() { getData() {
this.roadNum = ["0", "0", "6", "7"]; this.roadNum = ["0", "0", "6", "7"];
this.middleList = [ this.middleList = [
{ name: "信号灯", value: 5002 }, // { name: "", value: 5002 },
{ name: "路锥", value: 5002 }, { name: "路锥", value: 5002 },
{ name: "警示杆", value: 5002 }, { name: "警示杆", value: 5002 },
{ name: "防撞桶", value: 5002 }, { name: "防撞桶", value: 5002 },
{ name: "斑马线", value: 5002 }, // { name: "线", value: 5002 },
{ name: "里程碑", value: 5002 }, { name: "里程碑", value: 5002 },
{ name: "交通杆件", value: 5002 }, { name: "交通杆件", value: 5002 },
{ name: "龙门架", value: 5002 }, { name: "龙门架", value: 5002 },
@ -237,9 +237,10 @@ export default {
align-items: flex-end; align-items: flex-end;
.middle-item { .middle-item {
width: 24%; // width: 24%;
width: 28%;
height: 40%; height: 40%;
padding: 0 0.5rem 0 3rem; padding: 0 0.5rem 0 3.5rem;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-08 09:26:24 * @Date: 2024-10-08 09:26:24
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-11-15 11:16:08 * @LastEditTime: 2024-11-15 17:06:46
* @FilePath: \znxjxt-ui\src\views\index.vue * @FilePath: \znxjxt-ui\src\views\index.vue
* @Description: 系统首页 * @Description: 系统首页
--> -->
@ -74,9 +74,9 @@ export default {
if (code === 200) { if (code === 200) {
this.topList = [ this.topList = [
{ name: "路面病害总数", value: data.road, unit: "个" }, { name: "路面病害总数", value: data.road, unit: "个" },
{ name: "交安事件病害总数 ", value: data.event, unit: "个" }, { name: "交安事件总数 ", value: data.event, unit: "个" },
{ name: "桥隧病害总数", value: data.bridge, unit: "个" }, { name: "桥隧病害总数", value: data.bridge, unit: "个" },
{ name: "绿化病害总数", value: data.green, unit: "个" }, { name: "绿化待处理问题数", value: data.green, unit: "个" },
]; ];
} }
}); });