修改
This commit is contained in:
@ -599,7 +599,7 @@ export const selectUserDeptPage = (data = {}) => {
|
|||||||
///unifiedLogin
|
///unifiedLogin
|
||||||
export const unifiedLogin = (data) => {
|
export const unifiedLogin = (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: api + `/unifiedLogin`,
|
url: api + `/ssoLogin`,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data
|
data
|
||||||
});
|
});
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :id="mapid" class="map"></div>
|
<div :id="mapid" class="map"></div>
|
||||||
<div class="changeMap_box" v-if="props.isShow">
|
<div class="changeMap_box" v-if="props.isShow">
|
||||||
<el-switch v-model="conditionRoute" @change="handleSwitch" active-text="打开路况" inactive-text="关闭路况" style="--el-switch-color:#13ce66;--el-switch-off-color:#ff4949;" />
|
<el-switch v-model="conditionRoute" @change="handleSwitch" active-text="打开路况" inactive-text="关闭路况"
|
||||||
|
style="--el-switch-color: #13ce66; --el-switch-off-color: #ff4949" />
|
||||||
<!-- <el-carousel type="card" height="75px" :autoplay="false" indicator-position="none" :initial-index="3" @change="onMapImageChange">
|
<!-- <el-carousel type="card" height="75px" :autoplay="false" indicator-position="none" :initial-index="3" @change="onMapImageChange">
|
||||||
<el-carousel-item>
|
<el-carousel-item>
|
||||||
<div class="mapImageItem">
|
<div class="mapImageItem">
|
||||||
@ -88,27 +89,32 @@ onMounted(() => {
|
|||||||
|
|
||||||
map = new EliMap({
|
map = new EliMap({
|
||||||
id: props.mapid,
|
id: props.mapid,
|
||||||
crs: "EPSG:3857",
|
crs: "EPSG:4490",
|
||||||
style: {
|
style: {
|
||||||
glyphs: "./fonts/{fontstack}/{range}.pbf",
|
glyphs: "./fonts/{fontstack}/{range}.pbf",
|
||||||
center: [94.36,29.65],
|
center: [94.36057012, 29.64276831],
|
||||||
zoom: 10
|
zoom: 15
|
||||||
},
|
},
|
||||||
transformRequest: (url) => {
|
minZoom: 7,
|
||||||
if (url.indexOf("TileMatrix=") != -1) {
|
maxZoom: 18,
|
||||||
const arr = url.split("TileMatrix=");
|
|
||||||
const arr1 = arr[1].split("&");
|
|
||||||
const nurl = `${arr[0]}&TileMatrix=${Number(arr1[0])}&${arr1[1]}&${arr1[2]}`;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
window.map = map;
|
window.map = map;
|
||||||
map.mapboxGLMap.on("load", () => {
|
map.mapboxGLMap.on("load", () => {
|
||||||
map.addGaudLayer({
|
map.addWMTSLayer(
|
||||||
url: 'http://webrd02.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}',
|
"/PGIS_S_TileMapServer/Maps/XZDJ_SL/EzMap",
|
||||||
})
|
{
|
||||||
|
Service: "getImage",
|
||||||
|
Type: "RGB",
|
||||||
|
ZoomOffset: "0",
|
||||||
|
V: "0.3",
|
||||||
|
Zoom: "{z}",
|
||||||
|
Row: "{y}",
|
||||||
|
Col: "{x}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
tileSize: 300
|
||||||
|
}
|
||||||
|
);
|
||||||
zoomTarget.value = map.mapboxGLMap.getZoom();
|
zoomTarget.value = map.mapboxGLMap.getZoom();
|
||||||
});
|
});
|
||||||
mapUtil.value = new MapUtil(map);
|
mapUtil.value = new MapUtil(map);
|
||||||
@ -128,8 +134,6 @@ onMounted(() => {
|
|||||||
});
|
});
|
||||||
// 撒点
|
// 撒点
|
||||||
emitter.on("addPointArea", (obj) => {
|
emitter.on("addPointArea", (obj) => {
|
||||||
console.log(obj);
|
|
||||||
|
|
||||||
mapUtil.value.makerSki(obj);
|
mapUtil.value.makerSki(obj);
|
||||||
});
|
});
|
||||||
// 鼠标滑过提示文字的点位
|
// 鼠标滑过提示文字的点位
|
||||||
@ -168,7 +172,7 @@ onMounted(() => {
|
|||||||
});
|
});
|
||||||
// 回显线
|
// 回显线
|
||||||
emitter.on("echoLine", (res) => {
|
emitter.on("echoLine", (res) => {
|
||||||
mapUtil.value.createLine(res);
|
mapUtil.value.createLine(res, res.flag);
|
||||||
});
|
});
|
||||||
//创建边界面(geojson)
|
//创建边界面(geojson)
|
||||||
emitter.on("setBoundarys", (res) => {
|
emitter.on("setBoundarys", (res) => {
|
||||||
@ -199,11 +203,6 @@ onMounted(() => {
|
|||||||
mapUtil.value.diffusionCircle(res);
|
mapUtil.value.diffusionCircle(res);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 清除全部覆盖物
|
|
||||||
emitter.on("removeElementAll", () => {
|
|
||||||
mapUtil.value.removeElementAll();
|
|
||||||
});
|
|
||||||
|
|
||||||
// 展示盘曲
|
// 展示盘曲
|
||||||
emitter.on("showGapText", (obj) => {
|
emitter.on("showGapText", (obj) => {
|
||||||
mapUtil.value.gapText(obj);
|
mapUtil.value.gapText(obj);
|
||||||
@ -302,7 +301,6 @@ onUnmounted(() => {
|
|||||||
emitter.off("diffusionCircle");
|
emitter.off("diffusionCircle");
|
||||||
emitter.off("SsCircle");
|
emitter.off("SsCircle");
|
||||||
emitter.off("ClearssCircle");
|
emitter.off("ClearssCircle");
|
||||||
emitter.off("removeElementAll");
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -325,29 +323,35 @@ onUnmounted(() => {
|
|||||||
right: 398px;
|
right: 398px;
|
||||||
bottom: 4px;
|
bottom: 4px;
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
|
|
||||||
.mapImageItem {
|
.mapImageItem {
|
||||||
border: 1px solid #08aae8;
|
border: 1px solid #08aae8;
|
||||||
background: rgb(9, 26, 70);
|
background: rgb(9, 26, 70);
|
||||||
|
|
||||||
&>img {
|
&>img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&>div {
|
&>div {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -3px;
|
top: -3px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.zoomTargetBox {
|
.zoomTargetBox {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
margin-left: 23px;
|
margin-left: 23px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-input-number__decrease,
|
::v-deep .el-input-number__decrease,
|
||||||
::v-deep .el-input-number__increase {
|
::v-deep .el-input-number__increase {
|
||||||
background: #133362;
|
background: #133362;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-input__inner {
|
::v-deep .el-input__inner {
|
||||||
background: #0c1641;
|
background: #0c1641;
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :id="mapid" class="map"></div>
|
<div :id="mapid" class="map"></div>
|
||||||
<div class="changeMap_box" v-if="props.isShow">
|
<div class="changeMap_box" v-if="props.isShow">
|
||||||
<el-switch v-model="conditionRoute" @change="handleSwitch" active-text="打开路况" inactive-text="关闭路况"
|
<el-switch v-model="conditionRoute" @change="handleSwitch" active-text="打开路况" inactive-text="关闭路况" style="--el-switch-color:#13ce66;--el-switch-off-color:#ff4949;" />
|
||||||
style="--el-switch-color: #13ce66; --el-switch-off-color: #ff4949" />
|
|
||||||
<!-- <el-carousel type="card" height="75px" :autoplay="false" indicator-position="none" :initial-index="3" @change="onMapImageChange">
|
<!-- <el-carousel type="card" height="75px" :autoplay="false" indicator-position="none" :initial-index="3" @change="onMapImageChange">
|
||||||
<el-carousel-item>
|
<el-carousel-item>
|
||||||
<div class="mapImageItem">
|
<div class="mapImageItem">
|
||||||
@ -89,32 +88,27 @@ onMounted(() => {
|
|||||||
|
|
||||||
map = new EliMap({
|
map = new EliMap({
|
||||||
id: props.mapid,
|
id: props.mapid,
|
||||||
crs: "EPSG:4490",
|
crs: "EPSG:3857",
|
||||||
style: {
|
style: {
|
||||||
glyphs: "./fonts/{fontstack}/{range}.pbf",
|
glyphs: "./fonts/{fontstack}/{range}.pbf",
|
||||||
center: [94.36057012, 29.64276831],
|
center: [94.36,29.65],
|
||||||
zoom: 15
|
zoom: 10
|
||||||
},
|
},
|
||||||
minZoom: 7,
|
transformRequest: (url) => {
|
||||||
maxZoom: 18,
|
if (url.indexOf("TileMatrix=") != -1) {
|
||||||
|
const arr = url.split("TileMatrix=");
|
||||||
|
const arr1 = arr[1].split("&");
|
||||||
|
const nurl = `${arr[0]}&TileMatrix=${Number(arr1[0])}&${arr1[1]}&${arr1[2]}`;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
window.map = map;
|
window.map = map;
|
||||||
map.mapboxGLMap.on("load", () => {
|
map.mapboxGLMap.on("load", () => {
|
||||||
map.addWMTSLayer(
|
map.addGaudLayer({
|
||||||
"/PGIS_S_TileMapServer/Maps/XZDJ_SL/EzMap",
|
url: 'http://webrd02.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}',
|
||||||
{
|
})
|
||||||
Service: "getImage",
|
|
||||||
Type: "RGB",
|
|
||||||
ZoomOffset: "0",
|
|
||||||
V: "0.3",
|
|
||||||
Zoom: "{z}",
|
|
||||||
Row: "{y}",
|
|
||||||
Col: "{x}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
tileSize: 300
|
|
||||||
}
|
|
||||||
);
|
|
||||||
zoomTarget.value = map.mapboxGLMap.getZoom();
|
zoomTarget.value = map.mapboxGLMap.getZoom();
|
||||||
});
|
});
|
||||||
mapUtil.value = new MapUtil(map);
|
mapUtil.value = new MapUtil(map);
|
||||||
@ -134,6 +128,8 @@ onMounted(() => {
|
|||||||
});
|
});
|
||||||
// 撒点
|
// 撒点
|
||||||
emitter.on("addPointArea", (obj) => {
|
emitter.on("addPointArea", (obj) => {
|
||||||
|
console.log(obj);
|
||||||
|
|
||||||
mapUtil.value.makerSki(obj);
|
mapUtil.value.makerSki(obj);
|
||||||
});
|
});
|
||||||
// 鼠标滑过提示文字的点位
|
// 鼠标滑过提示文字的点位
|
||||||
@ -172,7 +168,7 @@ onMounted(() => {
|
|||||||
});
|
});
|
||||||
// 回显线
|
// 回显线
|
||||||
emitter.on("echoLine", (res) => {
|
emitter.on("echoLine", (res) => {
|
||||||
mapUtil.value.createLine(res, res.flag);
|
mapUtil.value.createLine(res);
|
||||||
});
|
});
|
||||||
//创建边界面(geojson)
|
//创建边界面(geojson)
|
||||||
emitter.on("setBoundarys", (res) => {
|
emitter.on("setBoundarys", (res) => {
|
||||||
@ -203,6 +199,11 @@ onMounted(() => {
|
|||||||
mapUtil.value.diffusionCircle(res);
|
mapUtil.value.diffusionCircle(res);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 清除全部覆盖物
|
||||||
|
emitter.on("removeElementAll", () => {
|
||||||
|
mapUtil.value.removeElementAll();
|
||||||
|
});
|
||||||
|
|
||||||
// 展示盘曲
|
// 展示盘曲
|
||||||
emitter.on("showGapText", (obj) => {
|
emitter.on("showGapText", (obj) => {
|
||||||
mapUtil.value.gapText(obj);
|
mapUtil.value.gapText(obj);
|
||||||
@ -301,6 +302,7 @@ onUnmounted(() => {
|
|||||||
emitter.off("diffusionCircle");
|
emitter.off("diffusionCircle");
|
||||||
emitter.off("SsCircle");
|
emitter.off("SsCircle");
|
||||||
emitter.off("ClearssCircle");
|
emitter.off("ClearssCircle");
|
||||||
|
emitter.off("removeElementAll");
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -323,35 +325,29 @@ onUnmounted(() => {
|
|||||||
right: 398px;
|
right: 398px;
|
||||||
bottom: 4px;
|
bottom: 4px;
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
|
|
||||||
.mapImageItem {
|
.mapImageItem {
|
||||||
border: 1px solid #08aae8;
|
border: 1px solid #08aae8;
|
||||||
background: rgb(9, 26, 70);
|
background: rgb(9, 26, 70);
|
||||||
|
|
||||||
& > img {
|
& > img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
& > div {
|
& > div {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -3px;
|
top: -3px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.zoomTargetBox {
|
.zoomTargetBox {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
margin-left: 23px;
|
margin-left: 23px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-input-number__decrease,
|
::v-deep .el-input-number__decrease,
|
||||||
::v-deep .el-input-number__increase {
|
::v-deep .el-input-number__increase {
|
||||||
background: #133362;
|
background: #133362;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-input__inner {
|
::v-deep .el-input__inner {
|
||||||
background: #0c1641;
|
background: #0c1641;
|
||||||
}
|
}
|
@ -21,6 +21,11 @@ export const privateRoutes = [];
|
|||||||
* 公开路由表
|
* 公开路由表
|
||||||
*/
|
*/
|
||||||
export const publicRoutes = [
|
export const publicRoutes = [
|
||||||
|
{
|
||||||
|
path: "/oatuh_login",
|
||||||
|
name: "oatuh_login",
|
||||||
|
component: () => import("@/views/login/oatuh_login")
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "/login",
|
path: "/login",
|
||||||
name: "login",
|
name: "login",
|
||||||
|
@ -240,7 +240,7 @@ export default {
|
|||||||
removeAllItem();
|
removeAllItem();
|
||||||
// 待补充 清理权限相关的配置
|
// 待补充 清理权限相关的配置
|
||||||
if (isOatuh) {
|
if (isOatuh) {
|
||||||
window.location.href = `http://80.149.27.78:8001/login`;
|
window.location.href = `http://155.240.22.188:9020`;
|
||||||
} else {
|
} else {
|
||||||
router.push("/login");
|
router.push("/login");
|
||||||
}
|
}
|
||||||
|
43
src/views/login/oatuh_login.vue
Normal file
43
src/views/login/oatuh_login.vue
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<template></template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, onMounted } from "vue";
|
||||||
|
import { useStore } from "vuex";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
import {
|
||||||
|
setItem
|
||||||
|
} from "@/utils/storage";
|
||||||
|
const loginDialog = ref(false);
|
||||||
|
const deptList = ref([]);
|
||||||
|
const store = useStore();
|
||||||
|
function redirectAuth() {
|
||||||
|
|
||||||
|
let token = location.hash.slice(20) || null;
|
||||||
|
if (token != null) {
|
||||||
|
debugger
|
||||||
|
token = token.replace(/\ +/g, "");
|
||||||
|
setItem("SSOTOKEN", token)
|
||||||
|
handleLogin({ token: token});
|
||||||
|
} else {
|
||||||
|
window.location.href = `http://155.240.22.188:9020`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleLogin = (e) => {
|
||||||
|
store.dispatch("user/oatuhLogin", e).then((res) => {
|
||||||
|
// 登录后操作
|
||||||
|
if (res.deptList.length === 1) {
|
||||||
|
window.location.hash = "/";
|
||||||
|
} else {
|
||||||
|
deptList.value = [...res.deptList];
|
||||||
|
loginDialog.value = true;
|
||||||
|
authorization.value = res.jwtToken;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
redirectAuth();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style></style>
|
@ -9,7 +9,7 @@ const serverHost = "http://192.168.1.32:8066"
|
|||||||
// const serverHost = "http://127.0.0.1:8006"
|
// const serverHost = "http://127.0.0.1:8006"
|
||||||
module.exports = {
|
module.exports = {
|
||||||
publicPath: "./",
|
publicPath: "./",
|
||||||
outputDir: "ylth",
|
outputDir: "jcz",
|
||||||
assetsDir: "static",
|
assetsDir: "static",
|
||||||
lintOnSave: false, //process.env.NODE_ENV === 'development',
|
lintOnSave: false, //process.env.NODE_ENV === 'development',
|
||||||
productionSourceMap: false,
|
productionSourceMap: false,
|
||||||
|
Reference in New Issue
Block a user