fix:修改首页工单背景,修改配置地图
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: SunTao 328867980@qq.com
|
||||
* @Date: 2024-10-14 10:46:23
|
||||
* @LastEditors: SunTao 328867980@qq.com
|
||||
* @LastEditTime: 2024-12-23 17:37:59
|
||||
* @LastEditTime: 2024-12-26 10:02:28
|
||||
* @FilePath: \znxjxt-ui\src\components\map\fssm-map.vue
|
||||
* @Description: 公共地图
|
||||
-->
|
||||
@@ -270,47 +270,6 @@ export default {
|
||||
* @return {*}
|
||||
*/
|
||||
initMap() {
|
||||
// 内网
|
||||
// const tianditu_vec_c = new TileLayer({
|
||||
// className: "baseLayerClass",
|
||||
// title: "矢量底图",
|
||||
// id: "vec_c",
|
||||
// source: new XYZ({
|
||||
// url: "http://10.60.5.242:25033/v3/tile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",
|
||||
// // projection: "EPSG:4326",
|
||||
// }),
|
||||
// visible: true,
|
||||
// });
|
||||
// const tianditu_cva_c = new TileLayer({
|
||||
// className: "baseLayerClass",
|
||||
// title: "矢量地图",
|
||||
// id: "cva_c",
|
||||
// source: new XYZ({
|
||||
// url: "http://10.60.5.242:25003/v3/tile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",
|
||||
// // projection: "EPSG:4326",
|
||||
// }),
|
||||
// visible: true,
|
||||
// });
|
||||
// 外网
|
||||
const tianditu_cva_c = new TileLayer({
|
||||
className: "baseLayerClass",
|
||||
title: "矢量地图",
|
||||
id: "cva_c",
|
||||
source: new XYZ({
|
||||
url: "https://webrd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",
|
||||
// projection: "EPSG:4326",
|
||||
}),
|
||||
visible: true,
|
||||
});
|
||||
const tianditu_img_c = new TileLayer({
|
||||
title: "影像地图",
|
||||
id: "img_c",
|
||||
source: new XYZ({
|
||||
url: "https://webst01.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
|
||||
// projection: "EPSG:4326",
|
||||
}),
|
||||
visible: false,
|
||||
});
|
||||
// 弹窗图层
|
||||
const overlays = new Overlay({
|
||||
element: this.$refs.mapPopup,
|
||||
@@ -339,8 +298,58 @@ export default {
|
||||
// 内网
|
||||
// layers: [tianditu_cva_c, tianditu_vec_c, tianditu_img_c],
|
||||
// 外网
|
||||
layers: [tianditu_cva_c, tianditu_img_c],
|
||||
// layers: [tianditu_cva_c, tianditu_img_c],
|
||||
layers: [],
|
||||
});
|
||||
const tianditu_img_c = new TileLayer({
|
||||
title: "影像地图",
|
||||
id: "img_c",
|
||||
source: new XYZ({
|
||||
url: "https://webst01.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
|
||||
// projection: "EPSG:4326",
|
||||
}),
|
||||
visible: false,
|
||||
});
|
||||
let tianditu_cva_c = null;
|
||||
let tianditu_vec_c = null;
|
||||
if (
|
||||
(window.location.port === "" || window.location.port === 80) &&
|
||||
process.env.VUE_APP_BASE_API === "/prod-api"
|
||||
) {
|
||||
// 内网
|
||||
tianditu_cva_c = new TileLayer({
|
||||
title: "矢量地图",
|
||||
id: "cva_c",
|
||||
source: new XYZ({
|
||||
url: "http://10.60.5.242:25003/v3/tile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",
|
||||
// projection: "EPSG:4326",
|
||||
}),
|
||||
visible: true,
|
||||
});
|
||||
tianditu_vec_c = new TileLayer({
|
||||
title: "矢量底图",
|
||||
id: "vec_c",
|
||||
source: new XYZ({
|
||||
url: "http://10.60.5.242:25033/v3/tile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",
|
||||
// projection: "EPSG:4326",
|
||||
}),
|
||||
visible: true,
|
||||
});
|
||||
map.addLayer(tianditu_cva_c, tianditu_vec_c, tianditu_img_c);
|
||||
} else {
|
||||
// 外网
|
||||
tianditu_cva_c = new TileLayer({
|
||||
className: "baseLayerClass",
|
||||
title: "矢量地图",
|
||||
id: "cva_c",
|
||||
source: new XYZ({
|
||||
url: "https://webrd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",
|
||||
// projection: "EPSG:4326",
|
||||
}),
|
||||
visible: true,
|
||||
});
|
||||
map.addLayer(tianditu_cva_c, tianditu_img_c);
|
||||
}
|
||||
// 图层点击事件
|
||||
map.on("singleclick", (e) => {
|
||||
const featureClick = map.forEachFeatureAtPixel(
|
||||
@@ -828,8 +837,8 @@ export default {
|
||||
}
|
||||
|
||||
// 地图弹窗样式
|
||||
.ol-popup{
|
||||
width:10rem;
|
||||
.ol-popup {
|
||||
width: 10rem;
|
||||
position: absolute;
|
||||
margin: 0.5rem;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user