提交代码 修复 大屏地图小屏幕点击问题,优化大屏适配问题。
This commit is contained in:
parent
604bf4961d
commit
650d3fe4ec
|
@ -77,6 +77,7 @@ export default {
|
||||||
this.aMap = new AMap.Map("container", {
|
this.aMap = new AMap.Map("container", {
|
||||||
center: [this.mapCenter.lng, this.mapCenter.lat],
|
center: [this.mapCenter.lng, this.mapCenter.lat],
|
||||||
resizeEnable: true,
|
resizeEnable: true,
|
||||||
|
viewMode: '3D',
|
||||||
// zoom: this.zoom,
|
// zoom: this.zoom,
|
||||||
mapStyle: "amap://styles/" + this.theme,
|
mapStyle: "amap://styles/" + this.theme,
|
||||||
});
|
});
|
||||||
|
@ -95,6 +96,7 @@ export default {
|
||||||
// 地图标点 点击事件
|
// 地图标点 点击事件
|
||||||
markerClick(e) {
|
markerClick(e) {
|
||||||
// console.log("地图点击标注点!!");
|
// console.log("地图点击标注点!!");
|
||||||
|
debugger;
|
||||||
if (!this.infoWindow) {
|
if (!this.infoWindow) {
|
||||||
this.createInfoWindowO();
|
this.createInfoWindowO();
|
||||||
}
|
}
|
||||||
|
@ -146,7 +148,10 @@ export default {
|
||||||
createMarker() {
|
createMarker() {
|
||||||
var markerList = [];
|
var markerList = [];
|
||||||
var _this = this;
|
var _this = this;
|
||||||
var projectUrl = this.$store.getters.tenantId === 0 ? '/project/project' : '/project_tenant/project_tenant'
|
var projectUrl =
|
||||||
|
this.$store.getters.tenantId === 0
|
||||||
|
? "/project/project"
|
||||||
|
: "/project_tenant/project_tenant";
|
||||||
for (var i = 0; i < this.projectList.length; i++) {
|
for (var i = 0; i < this.projectList.length; i++) {
|
||||||
if (this.projectList[i].projectLat && this.projectList[i].projectLng) {
|
if (this.projectList[i].projectLat && this.projectList[i].projectLng) {
|
||||||
let marker = new AMap.Marker({
|
let marker = new AMap.Marker({
|
||||||
|
@ -159,11 +164,20 @@ export default {
|
||||||
this.projectList[i].tenantIndexVo["unProcessed"] > 0
|
this.projectList[i].tenantIndexVo["unProcessed"] > 0
|
||||||
? markerAlarmIcon
|
? markerAlarmIcon
|
||||||
: markerIcon,
|
: markerIcon,
|
||||||
|
// icon:
|
||||||
|
// new AMap.Icon({
|
||||||
|
// image: this.projectList[i].tenantIndexVo["unProcessed"] > 0
|
||||||
|
// ? markerAlarmIcon
|
||||||
|
// : markerIcon,
|
||||||
|
// size: new AMap.Size(80, 80),
|
||||||
|
// imageSize: new AMap.Size(52, 52),
|
||||||
|
// }),
|
||||||
|
|
||||||
offset: new AMap.Pixel(-13, -30),
|
offset: new AMap.Pixel(-13, -30),
|
||||||
});
|
});
|
||||||
var content = [];
|
var content = [];
|
||||||
window["amapObj"] = this.aMap;
|
window["amapObj"] = this.aMap;
|
||||||
window['_this'] = this;
|
window["_this"] = this;
|
||||||
content.push(
|
content.push(
|
||||||
`<div class="info-block">
|
`<div class="info-block">
|
||||||
<span class="info-title">报警提醒</span>
|
<span class="info-title">报警提醒</span>
|
||||||
|
@ -175,9 +189,7 @@ export default {
|
||||||
onclick="window['_this'].$router.push({ path:'${projectUrl}', query: { 'projectId': '${
|
onclick="window['_this'].$router.push({ path:'${projectUrl}', query: { 'projectId': '${
|
||||||
this.projectList[i].projectId
|
this.projectList[i].projectId
|
||||||
}', 'tempType': 'details' } })"
|
}', 'tempType': 'details' } })"
|
||||||
>${
|
>${this.projectList[i].projectName}</span></div>
|
||||||
this.projectList[i].projectName
|
|
||||||
}</span></div>
|
|
||||||
<div class="info-item"><span class="info-lable">地址:</span>
|
<div class="info-item"><span class="info-lable">地址:</span>
|
||||||
<marquee style="margin: 0; width:calc(100% - 80px);" behavior="alternate" scrollamount="1" width="calc(100% - 40px)">
|
<marquee style="margin: 0; width:calc(100% - 80px);" behavior="alternate" scrollamount="1" width="calc(100% - 40px)">
|
||||||
<span class="info-value">${
|
<span class="info-value">${
|
||||||
|
@ -220,7 +232,10 @@ export default {
|
||||||
var resultStr = "";
|
var resultStr = "";
|
||||||
var _this = this;
|
var _this = this;
|
||||||
window["_this"] = this;
|
window["_this"] = this;
|
||||||
var deviceUrl = this.$store.getters.tenantId === 0 ? '/device/device' : '/device_tenant/device_tenant'
|
var deviceUrl =
|
||||||
|
this.$store.getters.tenantId === 0
|
||||||
|
? "/device/device"
|
||||||
|
: "/device_tenant/device_tenant";
|
||||||
if (list && list.length > 0) {
|
if (list && list.length > 0) {
|
||||||
list.forEach((v) => {
|
list.forEach((v) => {
|
||||||
// if (v.unProcessAlarmTotal > 0) {
|
// if (v.unProcessAlarmTotal > 0) {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
ref="big-v3-wrap-id"
|
ref="big-v3-wrap-id"
|
||||||
:style="{
|
:style="{
|
||||||
transformOrigin: 'center top',
|
transformOrigin: 'center top',
|
||||||
transform: `scale(${scalseNum})`,
|
transform: `scale(${scalseNumX}, ${ scalseNumY })`,
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
transition: `all 0.5s ease 0s`,
|
transition: `all 0.5s ease 0s`,
|
||||||
}"
|
}"
|
||||||
|
@ -82,6 +82,7 @@ import trendWrap from "./profile/trend";
|
||||||
import MapWrap from "./profile/mapWrap";
|
import MapWrap from "./profile/mapWrap";
|
||||||
import MapWrapPersonal from "./profile/personalCenter";
|
import MapWrapPersonal from "./profile/personalCenter";
|
||||||
import { iotWebSocketAlarmBaseUrl } from "@/config/env";
|
import { iotWebSocketAlarmBaseUrl } from "@/config/env";
|
||||||
|
import Cookies from 'js-cookie'
|
||||||
|
|
||||||
import { getWarningAnalysis, homeCount, appProjectList } from "@/api/app";
|
import { getWarningAnalysis, homeCount, appProjectList } from "@/api/app";
|
||||||
export default {
|
export default {
|
||||||
|
@ -100,7 +101,8 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: "智慧能源综合管理系统",
|
title: "智慧能源综合管理系统",
|
||||||
scalseNum: 1,
|
scalseNumX: 1,
|
||||||
|
scalseNumY: 1,
|
||||||
resultInfo: {},
|
resultInfo: {},
|
||||||
alarmInfoResult: {},
|
alarmInfoResult: {},
|
||||||
projectList: [],
|
projectList: [],
|
||||||
|
@ -133,12 +135,10 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
$route(to, from) {
|
$route(to, from) {
|
||||||
if (from.fullPath === "/index") {
|
if (from.fullPath === "/index") {
|
||||||
debugger
|
|
||||||
document.getElementById("con_lf_top_div").style.background = "#fff";
|
document.getElementById("con_lf_top_div").style.background = "#fff";
|
||||||
document.getElementById("con_lf_top_div").style.height = "calc(100vh - 84px)";
|
document.getElementById("con_lf_top_div").style.height = "calc(100vh - 84px)";
|
||||||
document.getElementById("con_lf_top_div").style.minHeight = "calc(100vh - 84px)";
|
document.getElementById("con_lf_top_div").style.minHeight = "calc(100vh - 84px)";
|
||||||
} else if (to.fullPath === "/index") {
|
} else if (to.fullPath === "/index") {
|
||||||
debugger
|
|
||||||
document.getElementById("con_lf_top_div").style.background = "#010e45";
|
document.getElementById("con_lf_top_div").style.background = "#010e45";
|
||||||
document.getElementById("con_lf_top_div").style.height = "calc(100vh - 84px)";
|
document.getElementById("con_lf_top_div").style.height = "calc(100vh - 84px)";
|
||||||
document.getElementById("con_lf_top_div").style.minHeight = "calc(100vh - 84px)";
|
document.getElementById("con_lf_top_div").style.minHeight = "calc(100vh - 84px)";
|
||||||
|
@ -200,16 +200,25 @@ export default {
|
||||||
},
|
},
|
||||||
resize_window() {
|
resize_window() {
|
||||||
if (this.fullscreen) {
|
if (this.fullscreen) {
|
||||||
this.scalseNum = Math.min(
|
// this.scalseNumX = Math.min(
|
||||||
Number(document.documentElement.clientHeight / 1080),
|
// Number(document.documentElement.clientHeight / 1080),
|
||||||
Number(document.documentElement.clientWidth / 1920)
|
// Number(document.documentElement.clientWidth / 1920)
|
||||||
);
|
// );
|
||||||
|
this.scalseNumX = Number(document.documentElement.clientWidth / 1920)
|
||||||
|
this.scalseNumY = Number(document.documentElement.clientHeight / 1080)
|
||||||
} else {
|
} else {
|
||||||
this.scalseNum = Math.min(
|
// this.scalseNumX = Math.min(
|
||||||
Number(document.documentElement.clientHeight / 1080),
|
// Number(document.documentElement.clientHeight / 1080),
|
||||||
Number(document.documentElement.clientWidth / 1920) - Number(200 / 1920)
|
// Number(document.documentElement.clientWidth / 1920) - Number(200 / 1920)
|
||||||
);
|
// );
|
||||||
console.log('get', document.getElementById('big-v3-wrap-id').clientWidth, document.documentElement.clientWidth)
|
if (document.documentElement.clientWidth < 993) {
|
||||||
|
this.scalseNumX = Number(document.documentElement.clientWidth / 1920) - (Cookies.get("sidebarStatus") == '1'?
|
||||||
|
Number(200 / 1920) : 0)
|
||||||
|
} else {
|
||||||
|
this.scalseNumX = Number(document.documentElement.clientWidth / 1920) - (Cookies.get("sidebarStatus") == '1'?
|
||||||
|
Number(200 / 1920) : Number(54 / 1920))
|
||||||
|
}
|
||||||
|
this.scalseNumY = Number(document.documentElement.clientHeight / 1080)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 查询项目列表
|
// 查询项目列表
|
||||||
|
|
|
@ -106,8 +106,8 @@
|
||||||
prop="faultType"
|
prop="faultType"
|
||||||
:formatter="statusFormat"
|
:formatter="statusFormat"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="上报人" align="left" prop="reporterName" />
|
<el-table-column label="上报人" align="left" prop="reporterNickName" />
|
||||||
<el-table-column label="处理人" align="left" prop="handlerName" />
|
<el-table-column label="处理人" align="left" prop="handleNickName" />
|
||||||
<el-table-column label="工作内容" align="left" prop="maintenanceContext">
|
<el-table-column label="工作内容" align="left" prop="maintenanceContext">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span
|
<span
|
||||||
|
|
|
@ -152,8 +152,8 @@
|
||||||
prop="faultType"
|
prop="faultType"
|
||||||
:formatter="statusFormat"
|
:formatter="statusFormat"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="上报人" align="left" prop="reporterName" />
|
<el-table-column label="上报人" align="left" prop="reporterNickName" />
|
||||||
<el-table-column label="处理人" align="left" prop="handlerName" />
|
<el-table-column label="处理人" align="left" prop="handleNickName" />
|
||||||
<el-table-column label="工作内容" align="left" prop="maintenanceContext">
|
<el-table-column label="工作内容" align="left" prop="maintenanceContext">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span class="lay-table-textarea" :title="scope.row.maintenanceContext">
|
<span class="lay-table-textarea" :title="scope.row.maintenanceContext">
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="item-block">
|
<div class="item-block">
|
||||||
<span>上报人员:</span>
|
<span>上报人员:</span>
|
||||||
<span>{{ workDetails.reporterName }}</span>
|
<span>{{ workDetails.reporterNickName }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
@ -109,7 +109,7 @@
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="item-block">
|
<div class="item-block">
|
||||||
<span>处理人员:</span>
|
<span>处理人员:</span>
|
||||||
<span>{{ workDetails.handlerName }}</span>
|
<span>{{ workDetails.handleNickName }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
|
|
@ -124,8 +124,8 @@
|
||||||
prop="faultType"
|
prop="faultType"
|
||||||
:formatter="statusFormat"
|
:formatter="statusFormat"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="上报人" align="left" prop="reporterName" />
|
<el-table-column label="上报人" align="left" prop="reporterNickName" />
|
||||||
<el-table-column label="处理人" align="left" prop="handlerName" />
|
<el-table-column label="处理人" align="left" prop="handleNickName" />
|
||||||
<el-table-column label="工作内容" align="left" prop="maintenanceContext">
|
<el-table-column label="工作内容" align="left" prop="maintenanceContext">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span
|
<span
|
||||||
|
|
|
@ -333,10 +333,12 @@ export default {
|
||||||
case 'true':
|
case 'true':
|
||||||
params.data.params.switch = 1;
|
params.data.params.switch = 1;
|
||||||
params.deviceId = this.tSelectList.toString();
|
params.deviceId = this.tSelectList.toString();
|
||||||
|
break;
|
||||||
|
|
||||||
case 'false':
|
case 'false':
|
||||||
params.data.params.switch = 0;
|
params.data.params.switch = 0;
|
||||||
params.deviceId = this.tSelectList.toString();
|
params.deviceId = this.tSelectList.toString();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
setSwitchControl(params).then((res) => {
|
setSwitchControl(params).then((res) => {
|
||||||
|
|
Loading…
Reference in New Issue