fix: 乳山BUG修改
This commit is contained in:
parent
23002473e7
commit
f195782e0a
@ -180,9 +180,14 @@ const onSearch = async (params: ResAiEngineerPage | ResAiProjectPage) => {
|
|||||||
active.value === 0 ? item.projectSn === params.projectSn : item.engineeringSn === params.engineeringSn
|
active.value === 0 ? item.projectSn === params.projectSn : item.engineeringSn === params.engineeringSn
|
||||||
);
|
);
|
||||||
monitorList.value = monitorList.value.map(item => (item === curr ? { ...curr, showGif: true } : { ...item, showGif: false }));
|
monitorList.value = monitorList.value.map(item => (item === curr ? { ...curr, showGif: true } : { ...item, showGif: false }));
|
||||||
params.longitude !== "" && params.longitude !== null
|
if (params.longitude && params.latitude) {
|
||||||
? map.value?.setCenter([params.longitude, +params.latitude])
|
console.log(111);
|
||||||
: map.value?.setCenter([116.481181, 39.90923]);
|
map.value?.setCenter([+params.longitude, +params.latitude]);
|
||||||
|
showInfoPage(curr);
|
||||||
|
}
|
||||||
|
// params.longitude !== "" && params.longitude !== null
|
||||||
|
// ? map.value?.setCenter([params.longitude, +params.latitude])
|
||||||
|
// : map.value?.setCenter([116.481181, 39.90923]);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 页面的搜索按钮
|
// 页面的搜索按钮
|
||||||
@ -231,7 +236,62 @@ const onCurChange = async (params: number) => {
|
|||||||
|
|
||||||
// pages.value.total = +res.result.total;
|
// pages.value.total = +res.result.total;
|
||||||
};
|
};
|
||||||
|
// 展示信息窗口
|
||||||
|
const showInfoPage = async (obj: any) => {
|
||||||
|
const createMarkerImage = (state: string) => new URL(`../../../assets/images/AIwaring/${state}`, import.meta.url).href;
|
||||||
|
|
||||||
|
// 创建一个 选中的Icon
|
||||||
|
let selectIcon = getIcon(
|
||||||
|
"selected",
|
||||||
|
obj.environAlarmFlag === false ? createMarkerImage("clouding.gif") : createMarkerImage("warnclouding.gif")
|
||||||
|
);
|
||||||
|
|
||||||
|
// 将 icon 传入 marker
|
||||||
|
let startMarker = new AMapRef.value.Marker({
|
||||||
|
position: new AMapRef.value.LngLat(Number(obj.longitude) || 113, Number(obj.latitude) || 21),
|
||||||
|
icon: selectIcon,
|
||||||
|
offset: new AMapRef.value.Pixel(-13, -30)
|
||||||
|
});
|
||||||
|
map.value?.add([startMarker]);
|
||||||
|
monitorList.value = monitorList.value.map(val =>
|
||||||
|
val.latitude == obj.latitude && val.longitude == obj.longitude
|
||||||
|
? { ...obj, showGif: true }
|
||||||
|
: { ...val, showGif: false, showInfo: false }
|
||||||
|
);
|
||||||
|
const curr = monitorList.value.find(item => item.showGif);
|
||||||
|
curr.showInfo = !curr.showInfo;
|
||||||
|
// addMarker();
|
||||||
|
|
||||||
|
environAlarmFlag.value = obj.environAlarmFlag;
|
||||||
|
|
||||||
|
// e.target.setIcon(selectIcon);
|
||||||
|
|
||||||
|
if (active.value === 0) {
|
||||||
|
infoName.value = obj.projectName;
|
||||||
|
const res = await getproDetail({ projectId: obj.projectId });
|
||||||
|
// @ts-expect-error
|
||||||
|
infoWindowData.value = res.result;
|
||||||
|
} else {
|
||||||
|
infoName.value = obj.engineeringName;
|
||||||
|
const res = await getengDetail({ id: obj.id });
|
||||||
|
// @ts-expect-error
|
||||||
|
infoWindowData.value = res.result;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (curr.showInfo) {
|
||||||
|
infoShow.value = true;
|
||||||
|
const infowindow = new AMapRef.value.InfoWindow({
|
||||||
|
isCustom: true, //使用自定义窗体
|
||||||
|
content: infoWindowPage.value,
|
||||||
|
offset: new AMap.Pixel(16, -45)
|
||||||
|
});
|
||||||
|
|
||||||
|
infowindow.open(map.value, startMarker.getPosition());
|
||||||
|
} else {
|
||||||
|
infoShow.value = false;
|
||||||
|
onClose();
|
||||||
|
}
|
||||||
|
};
|
||||||
// 地图增加坐标点
|
// 地图增加坐标点
|
||||||
const addMarker = () => {
|
const addMarker = () => {
|
||||||
const createMarkerImage = (state: string) => new URL(`../../../assets/images/AIwaring/${state}`, import.meta.url).href;
|
const createMarkerImage = (state: string) => new URL(`../../../assets/images/AIwaring/${state}`, import.meta.url).href;
|
||||||
@ -302,7 +362,7 @@ const addMarker = () => {
|
|||||||
const mapData = async () => {
|
const mapData = async () => {
|
||||||
const AMap = await initAMap();
|
const AMap = await initAMap();
|
||||||
AMapRef.value = AMap;
|
AMapRef.value = AMap;
|
||||||
map.value = new AMap.Map("map-container", { zoom: 10, center: [116.481181, 39.90923], viewMode: "2D", resizeEnable: true });
|
map.value = new AMap.Map("map-container", { zoom: 7, center: [116.481181, 39.90923], viewMode: "2D", resizeEnable: true });
|
||||||
// map.value?.on("click", function (e) {
|
// map.value?.on("click", function (e) {
|
||||||
// map.value?.clearInfoWindow();
|
// map.value?.clearInfoWindow();
|
||||||
// });
|
// });
|
||||||
|
|||||||
@ -1,29 +1,19 @@
|
|||||||
.flx-center {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: flex-start;
|
|
||||||
}
|
|
||||||
.login-container {
|
.login-container {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-height: 550px;
|
min-height: 550px;
|
||||||
background: url("@/assets/images/login/bglogin_rushan.png") center center no-repeat;
|
background: url("@/assets/images/login/loginBackground.jpg") center center no-repeat;
|
||||||
background-size: 100% 65%;
|
background-color: #eeeeee;
|
||||||
.login-title {
|
background-size: 100% 100%;
|
||||||
color: #2a314b;
|
background-size: cover;
|
||||||
font-weight: 600;
|
|
||||||
font-size: 22px;
|
|
||||||
> span {
|
|
||||||
margin-left: 30px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.login-box {
|
.login-box {
|
||||||
position: relative;
|
position: relative;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-end;
|
justify-content: center;
|
||||||
width: 96%;
|
width: 96%;
|
||||||
height: 75%;
|
height: 94%;
|
||||||
|
padding: 0 50px;
|
||||||
|
|
||||||
// background-color: hsl(0deg 0% 100% / 80%);
|
// background-color: hsl(0deg 0% 100% / 80%);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
@ -56,7 +46,7 @@
|
|||||||
height: 377px;
|
height: 377px;
|
||||||
padding: 50px 40px 45px;
|
padding: 50px 40px 45px;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
margin-right: 120px;
|
|
||||||
// border-radius: 10px;
|
// border-radius: 10px;
|
||||||
box-shadow: 2px 3px 7px rgb(0 0 0 / 20%);
|
box-shadow: 2px 3px 7px rgb(0 0 0 / 20%);
|
||||||
.login-logo {
|
.login-logo {
|
||||||
@ -1,15 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="login-container flx-center">
|
<div class="login-container flx-center">
|
||||||
<div class="login-title">
|
|
||||||
<span>{{ globalStore.systemNameConfig }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="login-box">
|
<div class="login-box">
|
||||||
<!-- <SwitchDark class="dark" /> -->
|
<div class="login-left">
|
||||||
<!-- <div class="login-left">
|
<!-- <img src="@/assets/images/login_left.png" alt="login" /> -->
|
||||||
<img src="@/assets/images/login_left.png" alt="login" />
|
|
||||||
<img src="@/assets/images/login/computerIcon.png" alt="" /><br />
|
<img src="@/assets/images/login/computerIcon.png" alt="" /><br />
|
||||||
<span>数字化政务监管平台</span>
|
<!-- 数字化政务监管平台 -->
|
||||||
</div> -->
|
<span>{{ globalStore.systemNameConfig }}</span>
|
||||||
|
</div>
|
||||||
<div class="login-form">
|
<div class="login-form">
|
||||||
<div class="login-logo">
|
<div class="login-logo">
|
||||||
<!-- <img class="login-icon" src="@/assets/images/logo.svg" alt="" /> -->
|
<!-- <img class="login-icon" src="@/assets/images/logo.svg" alt="" /> -->
|
||||||
@ -22,7 +19,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts" name="login">
|
<script setup lang="ts" name="login">
|
||||||
import SwitchDark from "@/components/SwitchDark/index.vue";
|
|
||||||
import LoginForm from "./components/LoginForm.vue";
|
import LoginForm from "./components/LoginForm.vue";
|
||||||
import { GlobalStore } from "@/stores";
|
import { GlobalStore } from "@/stores";
|
||||||
const globalStore = GlobalStore();
|
const globalStore = GlobalStore();
|
||||||
@ -1,19 +1,29 @@
|
|||||||
|
.flx-center {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
.login-container {
|
.login-container {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-height: 550px;
|
min-height: 550px;
|
||||||
background: url("@/assets/images/login/loginBackground.jpg") center center no-repeat;
|
background: url("@/assets/images/login/bglogin_rushan.png") center center no-repeat;
|
||||||
background-color: #eeeeee;
|
background-size: 100% 65%;
|
||||||
background-size: 100% 100%;
|
.login-title {
|
||||||
background-size: cover;
|
color: #2a314b;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 22px;
|
||||||
|
> span {
|
||||||
|
margin-left: 30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.login-box {
|
.login-box {
|
||||||
position: relative;
|
position: relative;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: flex-end;
|
||||||
width: 96%;
|
width: 96%;
|
||||||
height: 94%;
|
height: 75%;
|
||||||
padding: 0 50px;
|
|
||||||
|
|
||||||
// background-color: hsl(0deg 0% 100% / 80%);
|
// background-color: hsl(0deg 0% 100% / 80%);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
@ -46,7 +56,7 @@
|
|||||||
height: 377px;
|
height: 377px;
|
||||||
padding: 50px 40px 45px;
|
padding: 50px 40px 45px;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
|
margin-right: 120px;
|
||||||
// border-radius: 10px;
|
// border-radius: 10px;
|
||||||
box-shadow: 2px 3px 7px rgb(0 0 0 / 20%);
|
box-shadow: 2px 3px 7px rgb(0 0 0 / 20%);
|
||||||
.login-logo {
|
.login-logo {
|
||||||
|
|||||||
@ -1,12 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="login-container flx-center">
|
<div class="login-container flx-center">
|
||||||
|
<div class="login-title">
|
||||||
|
<span>{{ globalStore.systemNameConfig }}</span>
|
||||||
|
</div>
|
||||||
<div class="login-box">
|
<div class="login-box">
|
||||||
<div class="login-left">
|
<!-- <SwitchDark class="dark" /> -->
|
||||||
<!-- <img src="@/assets/images/login_left.png" alt="login" /> -->
|
<!-- <div class="login-left">
|
||||||
|
<img src="@/assets/images/login_left.png" alt="login" />
|
||||||
<img src="@/assets/images/login/computerIcon.png" alt="" /><br />
|
<img src="@/assets/images/login/computerIcon.png" alt="" /><br />
|
||||||
<!-- 数字化政务监管平台 -->
|
<span>数字化政务监管平台</span>
|
||||||
<span>{{ globalStore.systemNameConfig }}</span>
|
</div> -->
|
||||||
</div>
|
|
||||||
<div class="login-form">
|
<div class="login-form">
|
||||||
<div class="login-logo">
|
<div class="login-logo">
|
||||||
<!-- <img class="login-icon" src="@/assets/images/logo.svg" alt="" /> -->
|
<!-- <img class="login-icon" src="@/assets/images/logo.svg" alt="" /> -->
|
||||||
@ -19,6 +22,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts" name="login">
|
<script setup lang="ts" name="login">
|
||||||
|
import SwitchDark from "@/components/SwitchDark/index.vue";
|
||||||
import LoginForm from "./components/LoginForm.vue";
|
import LoginForm from "./components/LoginForm.vue";
|
||||||
import { GlobalStore } from "@/stores";
|
import { GlobalStore } from "@/stores";
|
||||||
const globalStore = GlobalStore();
|
const globalStore = GlobalStore();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user