From 9a0faec3c647a11df26ab35c92077cf8172403f1 Mon Sep 17 00:00:00 2001 From: SunTao <328867980@qq.com> Date: Thu, 26 Dec 2024 10:41:53 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E5=B7=A5=E5=8D=95=E8=83=8C=E6=99=AF=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E9=85=8D=E7=BD=AE=E5=9C=B0=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/screen/index/loop-div.svg | 165 +++++++++++++++++++++++++++ src/components/map/fssm-map.vue | 99 ++++++++-------- src/views/big-screen/index.vue | 26 +---- src/views/xj/parameter/index.vue | 145 ++++++++++++++++------- 4 files changed, 326 insertions(+), 109 deletions(-) create mode 100644 src/assets/screen/index/loop-div.svg diff --git a/src/assets/screen/index/loop-div.svg b/src/assets/screen/index/loop-div.svg new file mode 100644 index 0000000..3a01b6e --- /dev/null +++ b/src/assets/screen/index/loop-div.svg @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/map/fssm-map.vue b/src/components/map/fssm-map.vue index fb84414..bcf40d3 100644 --- a/src/components/map/fssm-map.vue +++ b/src/components/map/fssm-map.vue @@ -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; diff --git a/src/views/big-screen/index.vue b/src/views/big-screen/index.vue index 85a1111..0e232bb 100644 --- a/src/views/big-screen/index.vue +++ b/src/views/big-screen/index.vue @@ -2,7 +2,7 @@ * @Author: SunTao 328867980@qq.com * @Date: 2024-10-17 11:34:00 * @LastEditors: SunTao 328867980@qq.com - * @LastEditTime: 2024-12-25 09:31:03 + * @LastEditTime: 2024-12-26 10:40:09 * @FilePath: \znxjxt-ui\src\views\big-screen\index.vue * @Description: 大屏首页 --> @@ -174,7 +174,6 @@
@@ -1828,9 +1827,14 @@ export default { .loop-div { width: 30%; height: 100%; + padding-top: 0.5rem; display: flex; flex-direction: column; align-items: center; + justify-content: space-between; + background: url("~@/assets/screen/index/loop-div.svg") no-repeat; + background-size: 70% 70%; + background-position: center 80%; .value { font-size: 0.7rem; @@ -1859,24 +1863,6 @@ export default { color: #ffffff; } } - - .loop-div-0 { - background: url("~@/assets/screen/index/loop-div-0.svg") no-repeat; - background-size: 50% 50%; - background-position: center 100%; - } - - .loop-div-1 { - background: url("~@/assets/screen/index/loop-div-1.svg") no-repeat; - background-size: 50% 50%; - background-position: center 100%; - } - - .loop-div-2 { - background: url("~@/assets/screen/index/loop-div-2.svg") no-repeat; - background-size: 50% 50%; - background-position: center 100%; - } } } diff --git a/src/views/xj/parameter/index.vue b/src/views/xj/parameter/index.vue index 66bc38f..c5fe7cb 100644 --- a/src/views/xj/parameter/index.vue +++ b/src/views/xj/parameter/index.vue @@ -2,7 +2,7 @@ * @Author: SunTao 328867980@qq.com * @Date: 2024-10-09 13:11:56 * @LastEditors: SunTao 328867980@qq.com - * @LastEditTime: 2024-12-12 09:42:38 + * @LastEditTime: 2024-12-26 10:07:45 * @FilePath: \znxjxt-ui\src\views\xj\parameter\index.vue * @Description: 系统工具-系统参数 --> @@ -11,18 +11,46 @@
- + - + - + - + - 保存 + 保存
@@ -147,7 +175,7 @@ export default { handleQuery() { this.$refs["parameterForm"].validate((valid) => { if (valid) { - updateMapInfo(this.parameterForm).then((res) => { }); + updateMapInfo(this.parameterForm).then((res) => {}); } }); }, @@ -165,43 +193,71 @@ export default { zoom: this.parameterForm.zoom, //图层缩放大小 projection: "EPSG:4326", }), - layers: [ - //内网 - // new TileLayer({ - // 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", - // }), - // }), - // new TileLayer({ - // 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", - // }), - // }), - // 外网 - new TileLayer({ - 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", - }), - }), - // 添加GeoJSON图层 - // new VectorLayer({ - // source: new VectorSource({ - // // url: "http://localhost:8080/defectfile/output.geojson", // GeoJSON文件路径 - // url: "", // GeoJSON文件路径 - // format: new GeoJSON(), - // }), - // style: new Style({ - // stroke: new Stroke({ - // color: "#ff0000", - // width: 2, - // }), - // }), - // }), - ], + 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); + } + // 添加GeoJSON图层 + // new VectorLayer({ + // source: new VectorSource({ + // // url: "http://localhost:8080/defectfile/output.geojson", // GeoJSON文件路径 + // url: "", // GeoJSON文件路径 + // format: new GeoJSON(), + // }), + // style: new Style({ + // stroke: new Stroke({ + // color: "#ff0000", + // width: 2, + // }), + // }), + // }), this.map = map; map.on("click", (e) => { this.mapClick(e); @@ -310,4 +366,5 @@ export default { // ::v-deep .ol-layer:nth-child(1) { // filter: invert(100%) hue-rotate(180deg); -// } +// } +