fix:修改配置内外网项目

This commit is contained in:
SunTao 2024-12-12 10:04:51 +08:00
parent 3aaeae0ca1
commit 60f3d0fc1a
6 changed files with 79 additions and 63 deletions

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-14 10:46:23 * @Date: 2024-10-14 10:46:23
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-12-09 15:13:56 * @LastEditTime: 2024-12-12 09:21:59
* @FilePath: \znxjxt-ui\src\components\map\fssm-map.vue * @FilePath: \znxjxt-ui\src\components\map\fssm-map.vue
* @Description: 公共地图 * @Description: 公共地图
--> -->
@ -263,22 +263,34 @@ export default {
* @return {*} * @return {*}
*/ */
initMap() { initMap() {
const tianditu_vec_c = new TileLayer({ //
className: "baseLayerClass", // const tianditu_vec_c = new TileLayer({
title: "矢量底图", // className: "baseLayerClass",
id: "vec_c", // title: "",
source: new XYZ({ // id: "vec_c",
url: "http://10.60.5.242:25033/v3/tile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}", // source: new XYZ({
// projection: "EPSG:4326", // 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, // }),
}); // 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({ const tianditu_cva_c = new TileLayer({
className: "baseLayerClass", className: "baseLayerClass",
title: "矢量地图", title: "矢量地图",
id: "cva_c", id: "cva_c",
source: new XYZ({ 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}", 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", // projection: "EPSG:4326",
}), }),
visible: true, visible: true,
@ -306,7 +318,10 @@ export default {
minZoom: 7, minZoom: 7,
maxZoom: 18, maxZoom: 18,
}), }),
layers: [tianditu_cva_c, tianditu_vec_c, tianditu_img_c], //
// layers: [tianditu_cva_c, tianditu_vec_c, tianditu_img_c],
//
layers: [tianditu_cva_c, tianditu_img_c],
}); });
// //
map.on("singleclick", (e) => { map.on("singleclick", (e) => {

View File

@ -105,7 +105,12 @@ store.watch(
() => store.getters.token, () => store.getters.token,
(newToken) => { (newToken) => {
if (newToken) { if (newToken) {
// 本地
wsService.connect(`ws://localhost:8080/websocket?token=${newToken}`); wsService.connect(`ws://localhost:8080/websocket?token=${newToken}`);
// 内网
// wsService.connect(`ws://10.60.5.83:8080/websocket?token=${newToken}`);
// 外网
// wsService.connect(`ws://61.161.250.206:18080/websocket?token=${newToken}`);
} }
}, },
{ immediate: true } { immediate: true }

View File

@ -1576,6 +1576,12 @@ export default {
} }
} }
//
::v-deep .baseLayerClass {
filter: grayscale(200%) invert(200%) sepia(50%) hue-rotate(175deg)
brightness(80%) saturate(550%);
}
} }
} }

View File

@ -232,6 +232,7 @@ export default {
width: 100%; width: 100%;
height: 45rem; height: 45rem;
//
::v-deep .baseLayerClass { ::v-deep .baseLayerClass {
filter: grayscale(200%) invert(200%) sepia(50%) hue-rotate(175deg) filter: grayscale(200%) invert(200%) sepia(50%) hue-rotate(175deg)
brightness(80%) saturate(550%); brightness(80%) saturate(550%);

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-09 13:11:56 * @Date: 2024-10-09 13:11:56
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-12-10 10:43:06 * @LastEditTime: 2024-12-12 09:42:38
* @FilePath: \znxjxt-ui\src\views\xj\parameter\index.vue * @FilePath: \znxjxt-ui\src\views\xj\parameter\index.vue
* @Description: 系统工具-系统参数 * @Description: 系统工具-系统参数
--> -->
@ -11,46 +11,18 @@
<div class="parameter-content"> <div class="parameter-content">
<div class="parameter-form"> <div class="parameter-form">
<!-- 搜索表单 --> <!-- 搜索表单 -->
<el-form <el-form :model="parameterForm" ref="parameterForm" size="small" :inline="true" :rules="rules" label-width="7rem">
:model="parameterForm"
ref="parameterForm"
size="small"
:inline="true"
:rules="rules"
label-width="7rem"
>
<el-form-item label="地图层级" prop="zoom"> <el-form-item label="地图层级" prop="zoom">
<el-input <el-input disabled v-model.number="parameterForm.zoom" placeholder="请输入地图层级" clearable />
disabled
v-model.number="parameterForm.zoom"
placeholder="请输入地图层级"
clearable
/>
</el-form-item> </el-form-item>
<el-form-item label="经度" prop="lon"> <el-form-item label="经度" prop="lon">
<el-input <el-input disabled v-model.number="parameterForm.lon" placeholder="请输入坐标经度" clearable />
disabled
v-model.number="parameterForm.lon"
placeholder="请输入坐标经度"
clearable
/>
</el-form-item> </el-form-item>
<el-form-item label="纬度" prop="lat"> <el-form-item label="纬度" prop="lat">
<el-input <el-input disabled v-model.number="parameterForm.lat" placeholder="请输入坐标纬度" clearable />
disabled
v-model.number="parameterForm.lat"
placeholder="请输入坐标纬度"
clearable
/>
</el-form-item> </el-form-item>
<el-form-item label=""> <el-form-item label="">
<el-button <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">保存</el-button>
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>保存</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -194,6 +166,20 @@ export default {
projection: "EPSG:4326", projection: "EPSG:4326",
}), }),
layers: [ 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({ new TileLayer({
source: new XYZ({ 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}", url: "https://webrd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",
@ -201,19 +187,19 @@ export default {
}), }),
}), }),
// GeoJSON // GeoJSON
new VectorLayer({ // new VectorLayer({
source: new VectorSource({ // source: new VectorSource({
// url: "http://localhost:8080/defectfile/output.geojson", // GeoJSON // // url: "http://localhost:8080/defectfile/output.geojson", // GeoJSON
url: "", // GeoJSON // url: "", // GeoJSON
format: new GeoJSON(), // format: new GeoJSON(),
}), // }),
style: new Style({ // style: new Style({
stroke: new Stroke({ // stroke: new Stroke({
color: "#ff0000", // color: "#ff0000",
width: 2, // width: 2,
}), // }),
}), // }),
}), // }),
], ],
}); });
this.map = map; this.map = map;
@ -324,5 +310,4 @@ export default {
// ::v-deep .ol-layer:nth-child(1) { // ::v-deep .ol-layer:nth-child(1) {
// filter: invert(100%) hue-rotate(180deg); // filter: invert(100%) hue-rotate(180deg);
// } // }</style>
</style>

View File

@ -35,6 +35,10 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
// 外网
// target: `http://61.161.250.206:18080`,
// 内网
// target: `http://10.60.5.83:8080`,
// target: `http://192.168.1.188:8080`, // target: `http://192.168.1.188:8080`,
target: `http://localhost:8080`, target: `http://localhost:8080`,
changeOrigin: true, changeOrigin: true,