This commit is contained in:
13684185576
2025-07-22 09:52:32 +08:00
parent c368707264
commit 3cb5f79884
373 changed files with 97 additions and 37151 deletions

View File

@ -606,7 +606,7 @@ export const selectUserDeptPage = (data = {}) => {
///unifiedLogin
export const unifiedLogin = (data) => {
return request({
url: api + `/unifiedLogin`,
url: api + `/ssoLogin`,
method: "POST",
data
});

View File

@ -1,7 +1,13 @@
<template>
<div :id="mapid" class="map"></div>
<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-item>
<div class="mapImageItem">
@ -30,7 +36,14 @@
</el-carousel> -->
<!-- 地图缩放 -->
<div class="zoomTargetBox">
<el-input-number :min="7" :max="18" v-model="zoomTarget" :step="1" step-strictly @change="handleZoom">
<el-input-number
:min="7"
:max="18"
v-model="zoomTarget"
:step="1"
step-strictly
@change="handleZoom"
>
</el-input-number>
</div>
</div>
@ -82,33 +95,38 @@ onMounted(() => {
emitter.on("followUp", (res) => {
let box = document.getElementsByClassName("changeMap_box");
if (!box) return;
box[0].style.right = !res ? "4px" : "446px";
box[0].style.right = !res ? "4px" : "398px";
box[0].style.transition = "0.5s";
});
map = new EliMap({
id: props.mapid,
crs: "EPSG:3857",
crs: "EPSG:4490",
style: {
glyphs: "./fonts/{fontstack}/{range}.pbf",
center: [94.36,29.65],
zoom: 10
center: [94.36057012, 29.64276831],
zoom: 15
},
transformRequest: (url) => {
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]}`;
}
}
minZoom: 7,
maxZoom: 18
});
window.map = map;
map.mapboxGLMap.on("load", () => {
map.addGaudLayer({
url: 'http://webrd02.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}',
})
map.addWMTSLayer(
"/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();
});
mapUtil.value = new MapUtil(map);
@ -253,7 +271,6 @@ const mapSetLayer = (id, source) => {
//
const resFun = (coord, type, flag, data) => {
emitter.emit("coordString", {
coord: coord,
type: type,
@ -315,30 +332,38 @@ onUnmounted(() => {
.changeMap_box {
position: absolute;
right: 448px;
right: 398px;
bottom: 4px;
z-index: 9;
.mapImageItem {
border: 1px solid #08aae8;
background: rgb(9, 26, 70);
& > img {
width: 100%;
height: 50px;
}
& > div {
text-align: center;
position: relative;
top: -3px;
}
}
.zoomTargetBox {
margin-top: 10px;
margin-left: 23px;
}
::v-deep .el-input-number__decrease,
::v-deep .el-input-number__increase {
background: #133362;
color: #fff;
border: none;
}
::v-deep .el-input__inner {
background: #0c1641;
}

View File

@ -21,6 +21,11 @@ export const privateRoutes = [];
* 公开路由表
*/
export const publicRoutes = [
{
path: "/oatuh_login",
name: "oatuh_login",
component: () => import("@/views/login/oatuh_login")
},
{
path: "/login",
name: "login",

View File

@ -236,7 +236,7 @@ export default {
removeAllItem();
// 待补充 清理权限相关的配置
if (isOatuh) {
window.location.href = `http://80.149.27.78:8001/login`;
window.location.href = `http://155.240.22.188:9020`;
} else {
router.push("/login");
}

View 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>