明树Git Lab

Commit ad49af42 authored by chenron's avatar chenron

修改

parent 6371d7f5
...@@ -6,4 +6,6 @@ ...@@ -6,4 +6,6 @@
<script setup></script> <script setup></script>
<style scoped lang="less"></style> <style scoped lang="less">
@import "./assets/font/font.less";
</style>
@font-face {
font-family: 'YouSheBiaoTiHei-Regular';
src: url('../font/字体/优设标题黑.ttf');
font-weight: normal;
font-style: normal;
}
\ No newline at end of file
...@@ -85,7 +85,5 @@ onUnmounted(() => { ...@@ -85,7 +85,5 @@ onUnmounted(() => {
.double-circle-container { .double-circle-container {
.vw(width, 120); .vw(width, 120);
.vh(height,120); .vh(height,120);
// width: 120px;
// height: 120px;
} }
</style> </style>
...@@ -63,7 +63,7 @@ const props = defineProps({ ...@@ -63,7 +63,7 @@ const props = defineProps({
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
p { p {
height: 10px; .vh(height,10);
} }
.pro-title { .pro-title {
.font(12); .font(12);
......
<template> <template>
<!-- <div class="map-container">
<div id="container" ref="mapRef"></div>
</div> -->
<div class="tourism"> <div class="tourism">
<div style="background-color: #ffffff"> <div id="container"></div>
<div id="container"></div>
</div>
</div> </div>
</template> </template>
<script setup> <script setup>
...@@ -14,7 +8,6 @@ import AMapLoader from "@amap/amap-jsapi-loader"; ...@@ -14,7 +8,6 @@ import AMapLoader from "@amap/amap-jsapi-loader";
import { onMounted } from "vue"; import { onMounted } from "vue";
import gansuLine from "./gansu.json"; import gansuLine from "./gansu.json";
let map = null; let map = null;
// 注意:要想市级区域正常显示,必须添加安全密钥
window._AMapSecurityConfig = { window._AMapSecurityConfig = {
securityJsCode: "75a8291a9e8f7c838fc5e4dd0d538f30", securityJsCode: "75a8291a9e8f7c838fc5e4dd0d538f30",
}; };
...@@ -30,48 +23,59 @@ const handleInitMap = () => { ...@@ -30,48 +23,59 @@ const handleInitMap = () => {
//设置地图容器id //设置地图容器id
viewMode: "2D", viewMode: "2D",
zoom: 4, //初始化地图级别 zoom: 4, //初始化地图级别
center: [113.808299, 34.791787], //初始化地图中心点位置 center: [100.808299, 35.791787], //初始化地图中心点位置
expandZoomRange: true, // 开启显示范围设置
mapStyle: "amap://styles/2d017848d08f94f20b6e50aaae661148", mapStyle: "amap://styles/2d017848d08f94f20b6e50aaae661148",
rotateEnable: false, // 是否可以旋转
copyrightControl: false,
logoControl: false,
}); });
let districtSearch = new AMap.DistrictSearch({ const mapSize = map.getSize();
subdistrict: 0, //获取边界不需要返回下级行政区 mapSize.width < 780 ? map.setZoom(3.5) : map.setZoom(4);
extensions: "all", //返回行政区边界坐标组等具体信息 const minZoom = 4;
level: "province", //查询行政级别为 市 province-省 district-市 // map.on("zoomchange", function (e) {
}); // map.getZoom() < 2 ? map.setZoom(minZoom) : map.setZoom(15);
// handleDistrict(districtSearch); // });
handleDistrict();
addPolylines(); addPolylines();
handleAddMarket(); handleAddMarket();
}) })
.catch((e) => { .catch((e) => {
console.log(e); // console.log(e);
}); });
}; };
// 高亮和描边 // 高亮和描边
const handleDistrict = (districtSearch) => { const handleDistrict = () => {
let districtSearch = new AMap.DistrictSearch({
subdistrict: 0, //获取边界不需要返回下级行政区
extensions: "all", //返回行政区边界坐标组等具体信息
level: "province", //查询行政级别为 市 province-省 district-市
});
let polygons = []; let polygons = [];
// let arr = ["湖北省", "湖南省"]; //此处为高亮的市名 let arr = ["中华人民共和国"]; //此处为高亮的市名
// arr.forEach((item) => {
districtSearch.search("中华人民共和国", function (status, result) { districtSearch.search("中华人民共和国", function (status, result) {
// 查询成功时,result即为对应的行政区信息 // 查询成功时,result即为对应的行政区信息
// map.remove(polygons); //清除上次结果 // map.remove(polygons); //清除上次结果
let bounds = result.districtList[0].boundaries; let bounds = result.districtList[0].boundaries;
if (bounds) { // if (bounds) {
for (let i = 0, l = bounds.length; i < l; i++) { // for (let i = 0, l = bounds.length; i < l; i++) {
//生成行政区划polygon // //生成行政区划polygon
let polygon = new AMap.Polygon({ // let polygon = new AMap.Polygon({
strokeWeight: 1, // strokeWeight: 1,
path: bounds[i], // path: bounds[i],
fillOpacity: 0.4, // fillOpacity: 0.4,
fillColor: "#80d8ff", // fillColor: "#80d8ff",
strokeColor: "#0091ea", // strokeColor: "#0091ea",
}); // });
polygons.push(polygon); // polygons.push(polygon);
} // }
} // }
// 描边 // 描边
for (let i = 0; i < bounds.length; i++) { for (let i = 0; i < bounds.length; i++) {
let outerPolyline = new AMap.Polyline({ let outerPolyline = new AMap.Polyline({
path: bounds[i], path: bounds[i],
strokeColor: "#0435F9", strokeColor: "#72A8FF",
strokeWeight: 3, strokeWeight: 3,
map: map, map: map,
}); });
...@@ -80,6 +84,7 @@ const handleDistrict = (districtSearch) => { ...@@ -80,6 +84,7 @@ const handleDistrict = (districtSearch) => {
map.add(polygons); map.add(polygons);
map.setFitView(polygons); //视口自适应 map.setFitView(polygons); //视口自适应
}); });
// });
}; };
// 添加新路线 // 添加新路线
const addPolylines = () => { const addPolylines = () => {
...@@ -90,7 +95,7 @@ const addPolylines = () => { ...@@ -90,7 +95,7 @@ const addPolylines = () => {
let polylineObj = new AMap.Polyline({ let polylineObj = new AMap.Polyline({
path: lnglats, path: lnglats,
strokeWeight: 4, strokeWeight: 4,
strokeColor: "red", strokeColor: "#F0E82A",
extData: geojson.properties, // 自定义属性数据 extData: geojson.properties, // 自定义属性数据
}); });
// 生成新的路线,用于覆盖旧的 // 生成新的路线,用于覆盖旧的
...@@ -101,16 +106,31 @@ const addPolylines = () => { ...@@ -101,16 +106,31 @@ const addPolylines = () => {
isOutline: true, isOutline: true,
borderWeight: 2, borderWeight: 2,
outlineColor: "rgba(0, 221, 235, 1)", outlineColor: "rgba(0, 221, 235, 1)",
cursor: "pointer",
}); });
map.add(newPolyline); map.add(newPolyline);
newPolyline.hide(); newPolyline.hide();
// 获取路线数据 // 获取路线数据
const properties = polylineObj.getExtData(); const properties = polylineObj.getExtData();
// 填报内容 // 填报内容
let content = ` let content = `
<div class="infoWindow"> <div class="infoWindow-title">项目OOI</div>
<p class="infoWindow-title">${properties.name}</p> <div class="infoWindow-content">
</div> <p>
<span class="infoWindow-content-title">数据01:</span>
<span class="infoWindow-content-value">${properties.amount}<span class="infoWindow-unit">单位</span></span>
</p>
<p>
<span class="infoWindow-content-title">数据02:</span>
<span class="infoWindow-content-value">${properties.amount}<span class="infoWindow-unit">单位</span></span>
</p>
<p>
<span class="infoWindow-content-title">数据03:</span>
<span class="infoWindow-content-value">${properties.amount}<span class="infoWindow-unit">单位</span></span>
</p>
</div>
<div class="infoWindow-bottom"></div>
`; `;
// 创建 infoWindow 实例 // 创建 infoWindow 实例
let infoWindow = new AMap.InfoWindow({ let infoWindow = new AMap.InfoWindow({
...@@ -123,7 +143,6 @@ const addPolylines = () => { ...@@ -123,7 +143,6 @@ const addPolylines = () => {
// 鼠标经过 // 鼠标经过
polylineObj.on("mouseover", function (e) { polylineObj.on("mouseover", function (e) {
console.log(e, "243234");
newPolyline.show(); newPolyline.show();
infoWindow.open(map, [`${e.lnglat.getLng()}`, `${e.lnglat.getLat()}`]); infoWindow.open(map, [`${e.lnglat.getLng()}`, `${e.lnglat.getLat()}`]);
}); });
...@@ -226,51 +245,57 @@ onMounted(() => { ...@@ -226,51 +245,57 @@ onMounted(() => {
<style scoped lang="less"> <style scoped lang="less">
.tourism { .tourism {
width: 100%; width: 100%;
margin: 0 auto; .vh(height, 709);
box-sizing: border-box;
}
#container {
padding: 0px;
margin: 0px auto;
width: 100%;
height: 800px;
} }
.custom-content-marker { .custom-content-marker {
position: relative; position: relative;
width: 25px; width: 25px;
height: 34px; height: 34px;
} }
/deep/.infoWindow { /deep/.infoWindow-title {
color: #fff; background-image: url("../assets/images/标题.png");
background-image: url("../assets/images/infoWindow.png");
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
// line-height: 32px; width: 299px;
// padding: 1px 0 25px 25px; line-height: 56px;
padding-left: 30px; padding-left: 10px;
// padding-top: 8px;
width: 315px;
height: 220px;
}
/deep/.infoWindow-title {
display: flex;
align-items: center;
justify-items: flex-start;
height: 70px;
line-height: 70px;
.font(16);
font-weight: 700; font-weight: 700;
} }
/deep/.infoWindow-content { /deep/.infoWindow-content {
.font(24); background-image: url("../assets/images/信息文本.png");
position: relative; background-size: 100% 100%;
span { background-repeat: no-repeat;
display: inline-block; background-position: center;
position: absolute; width: 299px;
top: -50%; height: 100x;
} padding-left: 10px;
padding-top: 5px;
padding-bottom: 5px;
}
/deep/.infoWindow-bottom {
background-image: url("../assets/images/下标.png");
background-size: 100% 100%;
background-repeat: no-repeat;
background-position: center;
margin-top: 1px;
height: 22px;
}
/deep/.infoWindow-content-title {
font-size: 18px;
color: #fff;
font-weight: 400;
}
/deep/.infoWindow-content-value {
font-weight: 400;
font-size: 24px;
color: #93d2ff;
}
/deep/.infoWindow-unit {
font-size: 20px;
color: #93d2ff;
display: inline-block;
margin-left: 3px;
} }
/deep/.anchorPoint { /deep/.anchorPoint {
position: absolute; position: absolute;
...@@ -280,4 +305,12 @@ onMounted(() => { ...@@ -280,4 +305,12 @@ onMounted(() => {
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
/deep/.amap-logo {
display: none;
opacity: 0 !important;
}
/deep/.amap-copyright {
opacity: 0;
}
</style> </style>
...@@ -80,7 +80,6 @@ const completeList = reactive([ ...@@ -80,7 +80,6 @@ const completeList = reactive([
.construct-container { .construct-container {
display: flex; display: flex;
.construct-left { .construct-left {
// width: 65%;
flex: 1; flex: 1;
height: 100%; height: 100%;
.construct-left-map { .construct-left-map {
...@@ -93,7 +92,7 @@ const completeList = reactive([ ...@@ -93,7 +92,7 @@ const completeList = reactive([
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
.info-title { .info-title {
.vw(width, 200); .vw(width, 220);
.vh(height, 30); .vh(height, 30);
.vh(line-height, 30); .vh(line-height, 30);
.vw(margin-left,10); .vw(margin-left,10);
......
...@@ -5,9 +5,11 @@ ...@@ -5,9 +5,11 @@
<div class="stat-card__value">{{ item.value }}</div> <div class="stat-card__value">{{ item.value }}</div>
</div> </div>
</div> </div>
<Map />
</template> </template>
<script setup> <script setup>
import Map from "./Map.vue";
import { onMounted, reactive, watch, ref } from "vue"; import { onMounted, reactive, watch, ref } from "vue";
const props = defineProps({ const props = defineProps({
......
...@@ -78,10 +78,6 @@ const menuRoutes = computed(() => { ...@@ -78,10 +78,6 @@ const menuRoutes = computed(() => {
return mainRoute?.children || []; return mainRoute?.children || [];
}); });
const hanldeChangeLang = (type) => {
localStorage.setItem("lang", type);
};
// 处理退出登录 // 处理退出登录
const handleLogout = () => { const handleLogout = () => {
// 清除登录状态 // 清除登录状态
......
...@@ -77,11 +77,10 @@ import Construct from "@/components/Construct.vue"; ...@@ -77,11 +77,10 @@ import Construct from "@/components/Construct.vue";
import ProjectApproval from "@/components/ProjectApproval.vue"; import ProjectApproval from "@/components/ProjectApproval.vue";
import Operation from "@/components/Operation.vue"; import Operation from "@/components/Operation.vue";
import { reactive, ref } from "vue"; import { reactive, ref } from "vue";
import component from "element-plus/es/components/tree-select/src/tree-select-option.mjs";
const selectedLeftBtn = ref("equity"); const selectedLeftBtn = ref("equity");
const selectedRightBtn = ref(""); const selectedRightBtn = ref("");
const selectedContentBtn = ref(3); const selectedContentBtn = ref(1);
const selectedContentName = ref("立项"); const selectedContentName = ref("立项");
const isFullscreen = ref(false); const isFullscreen = ref(false);
const showPopup = ref(false); const showPopup = ref(false);
...@@ -213,6 +212,7 @@ window.addEventListener("fullscreenchange", () => { ...@@ -213,6 +212,7 @@ window.addEventListener("fullscreenchange", () => {
letter-spacing: 3px; letter-spacing: 3px;
.vh(margin-top, -15); .vh(margin-top, -15);
.font(24); .font(24);
font-family: HelveticaNeue;
} }
.header-left { .header-left {
display: flex; display: flex;
...@@ -220,21 +220,24 @@ window.addEventListener("fullscreenchange", () => { ...@@ -220,21 +220,24 @@ window.addEventListener("fullscreenchange", () => {
align-items: center; align-items: center;
padding-left: 75px; padding-left: 75px;
.nav-btn { .nav-btn {
width: 100%; .vh(line-height, 36);
.vh(line-height, 40); .font(14);
cursor: pointer; cursor: pointer;
color: #fff; color: #fff;
.font(14);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: 100%, 100%;
background-position: center; background-position: center;
&:not(.active) { &:not(.active) {
background-image: url("../../assets/images/left-btn.png"); background-image: url("../../assets/images/left-btn.png");
.vh(height,36);
.vw(width,208);
} }
&.active { &.active {
background-image: url("../../assets/images/left-hlightBtn.png"); background-image: url("../../assets/images/left-hlightBtn.png");
.vh(height,36);
.vw(width,208);
} }
} }
} }
...@@ -243,21 +246,24 @@ window.addEventListener("fullscreenchange", () => { ...@@ -243,21 +246,24 @@ window.addEventListener("fullscreenchange", () => {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
.nav-btn { .nav-btn {
width: 100%; .vh(line-height, 36);
.vh(line-height, 40); .font(14);
cursor: pointer; cursor: pointer;
color: #fff; color: #fff;
.font(14);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
background-position: center; background-position: center;
&:not(.active) { &:not(.active) {
background-image: url("../../assets/images/right-btn.png"); background-image: url("../../assets/images/right-btn.png");
.vh(height,36);
.vw(width,208);
} }
&.active { &.active {
background-image: url("../../assets/images/right-hight-btn.png"); background-image: url("../../assets/images/right-hight-btn.png");
.vh(height,36);
.vw(width,208);
} }
} }
} }
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment