备份.txt

{
path: '/yaoActivity',
name: 'Yao活动管理',
meta: {
identifier: 'YAO_HUO_DONG',
},
component: () => import('/@/views/router.vue'),
children: [
{
path: 'list',
name: 'Yao活动列表',
meta: {
name: 'Yao活动活动列表',
level: 1,
keepAlive: true,
},
component: () => import('/@/views/yaoActivity/list/index.vue'),
},
{
path: 'create',
name: 'Yao活动创建 ',
meta: {
hide: true,
level: 2,
},
component: () => import('/@/views/yaoActivity/create/index.vue'),
},
{
path: 'edit',
name: 'Yao活动编辑 ',
meta: {
hide: true,
level: 2,
},
component: () => import('/@/views/yaoActivity/edit/index.vue'),
},
{
path: 'auditList',
name: 'Yao活动证明审核',
meta: {
hide: true,
level: 2,
keepAlive: true,
},
component: () => import('/@/views/yaoActivity/audit/list/index.vue'),
},
{
path: 'auditDetail',
name: 'Yao活动证明审核详情',
meta: {
hide: true,
level: 3,
},
component: () => import('/@/views/yaoActivity/audit/detail/index.vue'),
},
{
path: 'category',
name: 'Yao活动类目管理',
meta: {
name: 'Yao活动类目管理',
},
component: () => import('/@/views/yaoActivity/category/index.vue'),
},
{
path: 'rule',
name: 'Yao活动规则管理',
meta: {
name: 'Yao活动规则',
},
component: () => import('/@/views/yaoActivity/rule/index.vue'),
},
],
},


关于小程序找停车的死数据:
// {
// name: '瓶窑老街停车场',
// label: '',
// lng: 119.96520351,
// lat: 30.39367431,
// },
// {
// name: '瓶窑中学停车场',
// label: '',
// lng: 119.96458629,
// lat: 30.39356051,
// },
// {
// name: '窑山食府停车场',
// label: '',
// lng: 119.9644412,
// lat: 30.39739792,
// },
// {
// name: '华达路停车场',
// label: '',
// lng: 119.97027583,
// lat: 30.39774394,
// },
// {
// name: '雷迪森停车场',
// label: '',
// lng: 119.9658641,
// lat: 30.39594698,
// },


关于移动村民宝管理后台创建项目是否公开项目文案输入框的样式--:not(.region-config-wrapper__modal-body)
.set-size(400px, 40px);


+++++++++++++++++++++++++++++++++++++++++++++++++++++
----里窑地图添加最大边界:抖动的问题是容器的高度
import React, { useEffect, useState } from "react";
import wx from "weixin-js-sdk-ts";
import { Drawer, Button } from "antd";
import L from "leaflet";

import "leaflet/dist/leaflet.css";
import classNames from "classnames";
import {
studyLocation,
visitLocation,
markLocation,
moreLocation,
studyPath,
visitPath,
markPath,
} from "./location/index";
import "./index.less";
import markerIconOrange from "../../assets/images/marker/icon-orange.png";
import markerIconBlue from "../../assets/images/marker/icon-blue.png";
import markerIconDeepBlue from "../../assets/images/marker/icon-deep-blue.png";
import { calcCoorArr } from "./utis";
import { globalData } from "../../setting/global";
import { getSignature } from "../../serve/api/signature";

let map: L.Map | L.LayerGroup<any> | any;
let layerGroup: L.LayerGroup<any>;

function App() {
const locations = [
{
name: "研学路线",
data: studyLocation,
path: studyPath,
icon: markerIconOrange,
textBg: "orange",
},
{
name: "非遗路线",
data: visitLocation,
path: visitPath,
icon: markerIconBlue,
textBg: "blue",
},
{
name: "康养路线",
data: markLocation,
path: markPath,
icon: markerIconDeepBlue,
textBg: "deepBlue",
},
{
name: "遗存路线",
data: moreLocation,
path: "",
icon: markerIconOrange,
textBg: "orange",
},
];

const [activeTabIndex, setActiveTabIndex] = useState(0);
const [visible, setVisible] = useState(false);
const [drawerData, setDrawerData] = useState<any>({});

// 路由传参
const token = window.location.search.split("=")[1];
if (token) {
sessionStorage.setItem("TOKEN", token);
}

const initMap = () => {
map = L.map("map", {
zoom: 16,
minZoom: 5,
maxZoom: 20,
zoomControl: true,
attributionControl: false,
}).setView([30.394386, 119.958368]);
// 解决放大图层消失
L.tileLayer(`${globalData.mapUrl}/{z}/{x}/{y}.png`, { maxNativeZoom: 18, maxZoom: 20, }).addTo(map);
initMarker(map, activeTabIndex);

/**
* 设置地图的左右边界
* 参考:https://www.cnblogs.com/Jeely/p/11132312.html
* https://qa.1r1g.cn/gis/ask/12574131/
*/
map.setMaxBounds(map.getBounds());
map.fitBounds(map.getBounds());
};

const initMarker = (map: any, index: number) => {
let layers: any = [];
const { data, icon, textBg, path } = locations[index];
if (layerGroup) {
layerGroup.clearLayers();
}

// marker 点击操作
const handleMarker = (item: any) => {
if (item.name !== "入口" && item.name !== "出口") {
setDrawerData(item);
setVisible(true);
}
};

let markIcon = (iconUrl: string) =>
L.icon({
iconUrl,
iconSize: [18, 24],
});

let markerText = (name: string) =>
L.divIcon({
html: `<div>${name}</div>`, //marker标注
className: `marker-name ${textBg}`,
iconSize: [80, 20], //marker宽高
iconAnchor: [40, 40], //文字标注相对位置
});

// let lines: any = [];
let lineMarker: any = [];
data.forEach((item: any, index: any) => {
// lines.push([item.y, item.x]);
if (path) {
let str1 = `${item.x},${item.y}`;
let str2 = "";
if (index < data.length - 1) {
str2 = `${data[index + 1].x},${data[index + 1].y}`;
const path = calcCoorArr(str1, str2, 30);
// 路线
lineMarker = L.polyline(path as any, {
className: `dash-line ${textBg}`,
}).addTo(map);
}
}

// 图标
let iconMarker = L.marker([item.y, item.x], {
icon: markIcon(icon),
})
.on("click", (e) => {
handleMarker(item);
})
.addTo(map);

// 文字说明
let textMarker = L.marker([item.y, item.x], {
icon: markerText(item.name),
})
.on("click", (e) => {
handleMarker(item);
})
.addTo(map);

// 路线
// let lineMarker = L.polyline(path as any, {
// className: `dash-line ${textBg}`,
// }).addTo(map);

if (path) {
layers.push(iconMarker, textMarker, lineMarker);
} else {
layers.push(iconMarker, textMarker);
}
});

layerGroup = L.layerGroup(layers);
map.addLayer(layerGroup);
};

// 跳转小程序导航
const handlePosition = () => {
const { lng, lat } = drawerData;
wx.miniProgram.navigateTo({
url: `/pages/map/index?latitude=${lat}&longitude=${lng}`,
});
};

useEffect(() => {
initMap();
// 解决添加最大边界个别机型抖动地图适应容器大小
map.invalidateSize(true)
/** 微信公众平台h5 */
// const url = window.location.href.split("#")[0];
// // 获取微信签名
// getSignature(url).then((res: any) => {
// wx.config({
// debug: true,
// appId: res.appId,
// timestamp: res.timestamp, // 必填,生成签名的时间戳
// nonceStr: res.nonceStr, // 必填,生成签名的随机串
// signature: res.signature, // 必填,签名
// jsApiList: ["openLocation"], // 必填,需要使用的 JS 接口列表
// openTagList: [],
// });
// wx.error((res) => {
// console.log("error: ", res);
// });
// });
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

useEffect(() => {
if (map) {
initMarker(map, activeTabIndex);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [activeTabIndex]);

// 切换tab并且恢复地图适合屏幕的大小
const handleChange = (index: number) => {
setActiveTabIndex(index)
map.setZoom(16)
}

return (
<div className="container">
<div className="tab">
{locations.map((tab, index) => (
<div
key={tab.name}
className={classNames("tab-item", {
"tab-item-active": activeTabIndex === index,
})}
onClick={() => handleChange(index)}
>
{tab.name}
</div>
))}
</div>
<div id="map" />
<Drawer
title={drawerData.name}
placement="bottom"
closable={false}
visible={visible}
onClose={() => setVisible(false)}
>
<img
src={drawerData.image}
alt={drawerData.name}
className="drawer-img"
/>
<p className="drawer-desc">{drawerData.desc}</p>
<Button className="drawer-btn" onClick={handlePosition}>
去导航
</Button>
</Drawer>
</div>
);
}

export default App;


++++++++++++++++++++++++++++++


---关于地图的样式:
#map {
position: fixed;
top: 4.25rem;
bottom: 0;
width: 100vw;
height: 100vh;
overflow: hidden;
}

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
管理后台的:
1、确认气泡弹窗的情况:

评议---审核列表的气泡确认框
评议都带有二次确认弹窗....


2、下载文件的情况:

商券列表--商券核销记录--导出全部记录时

3、上传的情况:

短信群发--素材管理--添加素材(图片)


4、找不到文件的情况:

三务公开上传页面---代码未合



0 Downloads (10.7 KB)