Browse Source

首页 地图 方法修改为 2.0 方法

wangqin
Joe 11 months ago
parent
commit
078b8219ad
  1. 68
      ruoyi-ui/src/views/JiHeExpressway/images/mapBg/active.svg
  2. 68
      ruoyi-ui/src/views/JiHeExpressway/images/mapBg/fault.svg
  3. 68
      ruoyi-ui/src/views/JiHeExpressway/images/mapBg/normal.svg
  4. 68
      ruoyi-ui/src/views/JiHeExpressway/images/mapBg/success.svg
  5. 3
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/AMapContainer/index.vue
  6. 42
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js
  7. 38
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js

68
ruoyi-ui/src/views/JiHeExpressway/images/mapBg/active.svg

@ -0,0 +1,68 @@
<svg width="34" height="42" viewBox="0 0 34 42" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="&#230;&#150;&#189;&#229;&#183;&#165;" clip-path="url(#clip0_443_349)">
<g id="&#233;&#161;&#181;&#233;&#157;&#162;-1">
<g id="&#233;&#166;&#150;&#233;&#161;&#181;-&#231;&#153;&#189;&#232;&#137;&#178;&#229;&#185;&#179;&#233;&#157;&#162;1">
<g id="&#229;&#155;&#190;&#230;&#160;&#135;">
<g id="&#230;&#150;&#189;&#229;&#183;&#165;_2">
<g id="&#230;&#164;&#173;&#229;&#156;&#134;&#229;&#189;&#162;">
<path id="Vector" d="M17 33C25.8366 33 33 25.8366 33 17C33 8.16344 25.8366 1 17 1C8.16344 1 1 8.16344 1 17C1 25.8366 8.16344 33 17 33Z" fill="white"/>
<g id="Vector_2" filter="url(#filter0_i_443_349)">
<path d="M17 33C25.8366 33 33 25.8366 33 17C33 8.16344 25.8366 1 17 1C8.16344 1 1 8.16344 1 17C1 25.8366 8.16344 33 17 33Z" fill="black"/>
</g>
<path id="Vector_3" d="M17 33C25.8366 33 33 25.8366 33 17C33 8.16344 25.8366 1 17 1C8.16344 1 1 8.16344 1 17C1 25.8366 8.16344 33 17 33Z" stroke="#BEA019" stroke-width="0.5"/>
</g>
<g id="&#228;&#184;&#137;&#232;&#167;&#146;&#229;&#189;&#162;">
<path id="Vector_4" d="M17 41L21 35H13L17 41Z" fill="white"/>
<g id="Vector_5" filter="url(#filter1_i_443_349)">
<path d="M17 41L21 35H13L17 41Z" fill="black"/>
</g>
<path id="Vector_6" d="M17 41L21 35H13L17 41Z" stroke="#BEA019" stroke-width="0.5"/>
</g>
<g id="&#230;&#164;&#173;&#229;&#156;&#134;&#229;&#189;&#162;_2">
<path id="Vector_7" d="M17 30C24.1797 30 30 24.1797 30 17C30 9.8203 24.1797 4 17 4C9.8203 4 4 9.8203 4 17C4 24.1797 9.8203 30 17 30Z" fill="#BEA019"/>
<g id="Vector_8" filter="url(#filter2_i_443_349)">
<path d="M17 30C24.1797 30 30 24.1797 30 17C30 9.8203 24.1797 4 17 4C9.8203 4 4 9.8203 4 17C4 24.1797 9.8203 30 17 30Z" fill="black"/>
</g>
<path id="Vector_9" d="M17 30C24.1797 30 30 24.1797 30 17C30 9.8203 24.1797 4 17 4C9.8203 4 4 9.8203 4 17C4 24.1797 9.8203 30 17 30Z" stroke="#D4C47F"/>
</g>
</g>
</g>
</g>
</g>
</g>
<defs>
<filter id="filter0_i_443_349" x="1" y="1" width="32" height="32" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.745098 0 0 0 0 0.627451 0 0 0 0 0.0980392 0 0 0 1 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_443_349"/>
</filter>
<filter id="filter1_i_443_349" x="13" y="35" width="8" height="6" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.745098 0 0 0 0 0.627451 0 0 0 0 0.0980392 0 0 0 1 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_443_349"/>
</filter>
<filter id="filter2_i_443_349" x="4" y="4" width="26" height="26" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="4.5"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.831373 0 0 0 0 0.768627 0 0 0 0 0.498039 0 0 0 1 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_443_349"/>
</filter>
<clipPath id="clip0_443_349">
<rect width="34" height="42" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

68
ruoyi-ui/src/views/JiHeExpressway/images/mapBg/fault.svg

@ -0,0 +1,68 @@
<svg width="34" height="42" viewBox="0 0 34 42" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="&#230;&#149;&#133;&#233;&#154;&#156;" clip-path="url(#clip0_443_310)">
<g id="&#233;&#161;&#181;&#233;&#157;&#162;-1">
<g id="&#233;&#166;&#150;&#233;&#161;&#181;-&#231;&#153;&#189;&#232;&#137;&#178;&#229;&#185;&#179;&#233;&#157;&#162;1">
<g id="&#229;&#155;&#190;&#230;&#160;&#135;">
<g id="&#230;&#149;&#133;&#233;&#154;&#156;_2">
<g id="&#230;&#164;&#173;&#229;&#156;&#134;&#229;&#189;&#162;">
<path id="Vector" d="M17 33C25.8366 33 33 25.8366 33 17C33 8.16344 25.8366 1 17 1C8.16344 1 1 8.16344 1 17C1 25.8366 8.16344 33 17 33Z" fill="white"/>
<g id="Vector_2" filter="url(#filter0_i_443_310)">
<path d="M17 33C25.8366 33 33 25.8366 33 17C33 8.16344 25.8366 1 17 1C8.16344 1 1 8.16344 1 17C1 25.8366 8.16344 33 17 33Z" fill="black"/>
</g>
<path id="Vector_3" d="M17 33C25.8366 33 33 25.8366 33 17C33 8.16344 25.8366 1 17 1C8.16344 1 1 8.16344 1 17C1 25.8366 8.16344 33 17 33Z" stroke="#E44B00" stroke-width="0.5"/>
</g>
<g id="&#228;&#184;&#137;&#232;&#167;&#146;&#229;&#189;&#162;">
<path id="Vector_4" d="M17 41L21 35H13L17 41Z" fill="white"/>
<g id="Vector_5" filter="url(#filter1_i_443_310)">
<path d="M17 41L21 35H13L17 41Z" fill="black"/>
</g>
<path id="Vector_6" d="M17 41L21 35H13L17 41Z" stroke="#E44B00" stroke-width="0.5"/>
</g>
<g id="&#230;&#164;&#173;&#229;&#156;&#134;&#229;&#189;&#162;_2">
<path id="Vector_7" d="M17 30C24.1797 30 30 24.1797 30 17C30 9.8203 24.1797 4 17 4C9.8203 4 4 9.8203 4 17C4 24.1797 9.8203 30 17 30Z" fill="#E44B00"/>
<g id="Vector_8" filter="url(#filter2_i_443_310)">
<path d="M17 30C24.1797 30 30 24.1797 30 17C30 9.8203 24.1797 4 17 4C9.8203 4 4 9.8203 4 17C4 24.1797 9.8203 30 17 30Z" fill="black"/>
</g>
<path id="Vector_9" d="M17 30C24.1797 30 30 24.1797 30 17C30 9.8203 24.1797 4 17 4C9.8203 4 4 9.8203 4 17C4 24.1797 9.8203 30 17 30Z" stroke="#FF6700"/>
</g>
</g>
</g>
</g>
</g>
</g>
<defs>
<filter id="filter0_i_443_310" x="1" y="1" width="32" height="32" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 0.403922 0 0 0 0 0 0 0 0 1 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_443_310"/>
</filter>
<filter id="filter1_i_443_310" x="13" y="35" width="8" height="6" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.894118 0 0 0 0 0.294118 0 0 0 0 0 0 0 0 1 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_443_310"/>
</filter>
<filter id="filter2_i_443_310" x="4" y="4" width="26" height="26" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="4.5"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 0.403922 0 0 0 0 0 0 0 0 1 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_443_310"/>
</filter>
<clipPath id="clip0_443_310">
<rect width="34" height="42" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

68
ruoyi-ui/src/views/JiHeExpressway/images/mapBg/normal.svg

@ -0,0 +1,68 @@
<svg width="34" height="41" viewBox="0 0 34 41" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="&#230;&#145;&#132;&#229;&#131;&#143;&#230;&#156;&#186;&#229;&#164;&#135;&#228;&#187;&#189;" clip-path="url(#clip0_443_329)">
<g id="&#233;&#161;&#181;&#233;&#157;&#162;-1">
<g id="&#233;&#166;&#150;&#233;&#161;&#181;-&#231;&#153;&#189;&#232;&#137;&#178;&#229;&#185;&#179;&#233;&#157;&#162;1">
<g id="&#229;&#155;&#190;&#230;&#160;&#135;">
<g id="&#231;&#188;&#150;&#231;&#187;&#132;">
<g id="&#230;&#164;&#173;&#229;&#156;&#134;&#229;&#189;&#162;">
<path id="Vector" d="M17 33C25.8366 33 33 25.8366 33 17C33 8.16344 25.8366 1 17 1C8.16344 1 1 8.16344 1 17C1 25.8366 8.16344 33 17 33Z" fill="white"/>
<g id="Vector_2" filter="url(#filter0_i_443_329)">
<path d="M17 33C25.8366 33 33 25.8366 33 17C33 8.16344 25.8366 1 17 1C8.16344 1 1 8.16344 1 17C1 25.8366 8.16344 33 17 33Z" fill="black"/>
</g>
<path id="Vector_3" d="M17 33C25.8366 33 33 25.8366 33 17C33 8.16344 25.8366 1 17 1C8.16344 1 1 8.16344 1 17C1 25.8366 8.16344 33 17 33Z" stroke="#1B94F1" stroke-width="0.5"/>
</g>
<g id="&#228;&#184;&#137;&#232;&#167;&#146;&#229;&#189;&#162;">
<path id="Vector_4" d="M17 41L21 35H13L17 41Z" fill="white"/>
<g id="Vector_5" filter="url(#filter1_i_443_329)">
<path d="M17 41L21 35H13L17 41Z" fill="black"/>
</g>
<path id="Vector_6" d="M17 41L21 35H13L17 41Z" stroke="#1B94F1" stroke-width="0.5"/>
</g>
<g id="&#230;&#164;&#173;&#229;&#156;&#134;&#229;&#189;&#162;_2">
<path id="Vector_7" d="M17 30C24.1797 30 30 24.1797 30 17C30 9.8203 24.1797 4 17 4C9.8203 4 4 9.8203 4 17C4 24.1797 9.8203 30 17 30Z" fill="#008DF0"/>
<g id="Vector_8" filter="url(#filter2_i_443_329)">
<path d="M17 30C24.1797 30 30 24.1797 30 17C30 9.8203 24.1797 4 17 4C9.8203 4 4 9.8203 4 17C4 24.1797 9.8203 30 17 30Z" fill="black"/>
</g>
<path id="Vector_9" d="M17 30C24.1797 30 30 24.1797 30 17C30 9.8203 24.1797 4 17 4C9.8203 4 4 9.8203 4 17C4 24.1797 9.8203 30 17 30Z" stroke="#00C8FF"/>
</g>
</g>
</g>
</g>
</g>
</g>
<defs>
<filter id="filter0_i_443_329" x="1" y="1" width="32" height="32" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.104791 0 0 0 0 0.607661 0 0 0 0 0.954698 0 0 0 1 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_443_329"/>
</filter>
<filter id="filter1_i_443_329" x="13" y="35" width="8" height="6" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.103882 0 0 0 0 0.611499 0 0 0 0 0.954587 0 0 0 1 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_443_329"/>
</filter>
<filter id="filter2_i_443_329" x="4" y="4" width="26" height="26" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="4.5"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0.784314 0 0 0 0 1 0 0 0 1 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_443_329"/>
</filter>
<clipPath id="clip0_443_329">
<rect width="34" height="41" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

68
ruoyi-ui/src/views/JiHeExpressway/images/mapBg/success.svg

@ -0,0 +1,68 @@
<svg width="34" height="42" viewBox="0 0 34 42" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="&#230;&#148;&#182;&#232;&#180;&#185;&#231;&#171;&#153;" clip-path="url(#clip0_443_386)">
<g id="&#233;&#161;&#181;&#233;&#157;&#162;-1">
<g id="&#233;&#166;&#150;&#233;&#161;&#181;-&#231;&#153;&#189;&#232;&#137;&#178;&#229;&#185;&#179;&#233;&#157;&#162;1">
<g id="&#229;&#155;&#190;&#230;&#160;&#135;">
<g id="&#230;&#148;&#182;&#232;&#180;&#185;&#231;&#171;&#153;_2">
<g id="&#230;&#164;&#173;&#229;&#156;&#134;&#229;&#189;&#162;">
<path id="Vector" d="M17 33C25.8366 33 33 25.8366 33 17C33 8.16344 25.8366 1 17 1C8.16344 1 1 8.16344 1 17C1 25.8366 8.16344 33 17 33Z" fill="white"/>
<g id="Vector_2" filter="url(#filter0_i_443_386)">
<path d="M17 33C25.8366 33 33 25.8366 33 17C33 8.16344 25.8366 1 17 1C8.16344 1 1 8.16344 1 17C1 25.8366 8.16344 33 17 33Z" fill="black"/>
</g>
<path id="Vector_3" d="M17 33C25.8366 33 33 25.8366 33 17C33 8.16344 25.8366 1 17 1C8.16344 1 1 8.16344 1 17C1 25.8366 8.16344 33 17 33Z" stroke="#24C384" stroke-width="0.5"/>
</g>
<g id="&#228;&#184;&#137;&#232;&#167;&#146;&#229;&#189;&#162;">
<path id="Vector_4" d="M17 41L21 35H13L17 41Z" fill="white"/>
<g id="Vector_5" filter="url(#filter1_i_443_386)">
<path d="M17 41L21 35H13L17 41Z" fill="black"/>
</g>
<path id="Vector_6" d="M17 41L21 35H13L17 41Z" stroke="#24C384" stroke-width="0.5"/>
</g>
<g id="&#230;&#164;&#173;&#229;&#156;&#134;&#229;&#189;&#162;_2">
<path id="Vector_7" d="M17 30C24.1797 30 30 24.1797 30 17C30 9.8203 24.1797 4 17 4C9.8203 4 4 9.8203 4 17C4 24.1797 9.8203 30 17 30Z" fill="#24C384"/>
<g id="Vector_8" filter="url(#filter2_i_443_386)">
<path d="M17 30C24.1797 30 30 24.1797 30 17C30 9.8203 24.1797 4 17 4C9.8203 4 4 9.8203 4 17C4 24.1797 9.8203 30 17 30Z" fill="black"/>
</g>
<path id="Vector_9" d="M17 30C24.1797 30 30 24.1797 30 17C30 9.8203 24.1797 4 17 4C9.8203 4 4 9.8203 4 17C4 24.1797 9.8203 30 17 30Z" stroke="#5AD8A6"/>
</g>
</g>
</g>
</g>
</g>
</g>
<defs>
<filter id="filter0_i_443_386" x="1" y="1" width="32" height="32" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.141176 0 0 0 0 0.764706 0 0 0 0 0.517647 0 0 0 1 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_443_386"/>
</filter>
<filter id="filter1_i_443_386" x="13" y="35" width="8" height="6" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.141176 0 0 0 0 0.764706 0 0 0 0 0.517647 0 0 0 1 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_443_386"/>
</filter>
<filter id="filter2_i_443_386" x="4" y="4" width="26" height="26" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="4.5"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0.861234 0 0 0 0 0.635692 0 0 0 1 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_443_386"/>
</filter>
<clipPath id="clip0_443_386">
<rect width="34" height="42" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

3
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/AMapContainer/index.vue

@ -23,8 +23,7 @@ export default {
computed: { computed: {
getReverseStyle() { getReverseStyle() {
return { return {
transform: `scale(${1 / this.adpScale.scaleX}, ${1 / this.adpScale.scaleY transform: `scale(${1 / this.adpScale.scaleX}, ${1 / this.adpScale.scaleY})`,
})`,
}; };
}, },
}, },

42
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js

@ -54,15 +54,11 @@ export const eventMap = {
/^\.|[^/]+(?=.svg$)/g, /^\.|[^/]+(?=.svg$)/g,
(data) => (data === "." ? "" : `${data}_fault`) (data) => (data === "." ? "" : `${data}_fault`)
)}`); )}`);
// const fault = require(`@screen/images/mapBg/fault.svg`);
const markers = []; // const normal = require(`@screen/images/mapBg/active.svg`);
const markerClick = (e) => { const markerClick = (e) => {
const { const extData = e.target.getExtData();
target: {
w: { extData },
},
} = e;
this.cameraDialogConfig = { this.cameraDialogConfig = {
// 0 有(球机) 1 ⽆(枪机) // 0 有(球机) 1 ⽆(枪机)
@ -73,32 +69,28 @@ export const eventMap = {
console.log(this.cameraDialogConfig); console.log(this.cameraDialogConfig);
}; };
data.forEach((item) => { const markerCluster = await setMarkerCluster(
mapIns,
data.map((item) => {
const { lng, lat } = PilePointJSON[item.pileNum] || {}; const { lng, lat } = PilePointJSON[item.pileNum] || {};
if (!lat || !lng) return; return {
weight: 1,
const marker = new AMap.Marker({ lnglat: [lng, lat],
position: [lng, lat], name: "",
extData: item,
content: `<img style="width: 36px; height: 36px" src='${ content: `<img style="width: 36px; height: 36px" src='${
item.status !== "0" ? fault : normal item.status !== "0" ? fault : normal
}'>`, }'>`,
offset: new AMap.Pixel(-15, -15), };
extData: item, }),
clickable: true, markerClick
}); );
marker.on("click", markerClick);
markers.push(marker);
});
const markerCluster = await setMarkerCluster(mapIns, markers);
cacheRemoveFunc.DriveTestEquipment_Camera_Remove = () => cacheRemoveFunc.DriveTestEquipment_Camera_Remove = () =>
markerCluster.clearMarkers(); markerCluster.setMap(null);
mapIns.setFitView(markers, false, [360, 360, 360, 360]); mapIns.setFitView(markerCluster.U, false, [360, 360, 360, 360]);
}, },
async "路测设备/摄像机_close"() { async "路测设备/摄像机_close"() {
cacheRemoveFunc.DriveTestEquipment_Camera_Remove?.(); cacheRemoveFunc.DriveTestEquipment_Camera_Remove?.();

38
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js

@ -16,16 +16,17 @@ import { loadAMap } from "@screen/pages/Home/components/AMapContainer/loadAMap.j
* @param {*} map * @param {*} map
* @param {Point[]} points * @param {Point[]} points
* @param {Marker[]} markers * @param {Marker[]} markers
* @param {*} options * @param {Function} markerFun
* @returns * @returns
*/ */
export async function setMarkerCluster(map, markers, options) { export async function setMarkerCluster(map, points, markerFun) {
const AMap = await loadAMap(); const AMap = await loadAMap();
return new AMap.MarkerClusterer(map, markers, { let hasClick = false;
const markerCluster = new AMap.MarkerCluster(map, points, {
// gridSize: 15, // gridSize: 15,
maxZoom: 15, maxZoom: 15,
...options,
// 自定义聚合点样式 // 自定义聚合点样式
renderClusterMarker(context) { renderClusterMarker(context) {
// 聚合中点个数 // 聚合中点个数
@ -33,10 +34,10 @@ export async function setMarkerCluster(map, markers, options) {
const div = document.createElement("div"); const div = document.createElement("div");
let bgColor = "204,235,197"; let bgColor = "204,235,197";
div.style.backgroundColor = `rgba(${bgColor}, .5)`; div.style.backgroundColor = `rgba(${bgColor}, .6)`;
const size = Math.round( const size = Math.round(
25 + Math.pow(clusterCount / markers.length, 1 / 5) * 36 25 + Math.pow(clusterCount / points.length, 1 / 5) * 36
); );
div.style.borderRadius = div.style.borderRadius =
@ -49,8 +50,33 @@ export async function setMarkerCluster(map, markers, options) {
div.style.color = "#ffffff"; div.style.color = "#ffffff";
div.style.fontSize = "24px"; div.style.fontSize = "24px";
div.style.textAlign = "center"; div.style.textAlign = "center";
context.marker.setOffset(new AMap.Pixel(-size / 2, -size / 2)); context.marker.setOffset(new AMap.Pixel(-size / 2, -size / 2));
context.marker.setContent(div); context.marker.setContent(div);
}, },
renderMarker(context) {
const { content, extData } = context.data[0];
const offset = new AMap.Pixel(-9, -9);
context.marker.setContent(content);
context.marker.setOffset(offset);
context.marker.setExtData(extData);
context.marker.on("click", (e) => {
hasClick = true;
markerFun(e);
});
},
});
markerCluster.on("click", (e) => {
if (hasClick) return (hasClick = false);
map.setCenter(e.lnglat);
map.setZoom(map.getZoom() + 3);
}); });
return markerCluster;
} }

Loading…
Cancel
Save