添加智能问答页面

This commit is contained in:
扈兆增 2026-07-29 15:56:12 +08:00
parent dabcef7134
commit 400ca77e51
11 changed files with 1630 additions and 35 deletions

View File

@ -0,0 +1,24 @@
<!-- Generator: Adobe Illustrator 22.0.0, SVG Export Plug-In -->
<svg version="1.1"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
x="0px" y="0px" width="32px" height="40px" viewBox="0 0 32 40" style="enable-background:new 0 0 32 40;" xml:space="preserve">
<style type="text/css">
.st0{fill:#EF4848;}
.st1{fill:#FF7171;}
.st2{fill:#FFFFFF;}
</style>
<defs>
</defs>
<g>
<path class="st0" d="M29.1,40H2.9C1.3,40,0,38.7,0,37.1V2.9C0,1.3,1.3,0,2.9,0h18.5L32,10.9v26.2C32,38.7,30.7,40,29.1,40L29.1,40z
"/>
<path class="st1" d="M21.1,8c0,1.6,1.3,2.9,2.9,2.9h8L21.3,0L21.1,8z"/>
<g>
<path class="st2" d="M5.1,19.2H8c2,0,3.5,0.7,3.5,2.8c0,2-1.5,2.9-3.4,2.9H6.8V28H5.1V19.2z M7.9,23.5c1.2,0,1.8-0.5,1.8-1.5
c0-1-0.6-1.4-1.9-1.4h-1v2.9H7.9z"/>
<path class="st2" d="M13.1,19.2h2.4c2.7,0,4.4,1.4,4.4,4.4c0,3-1.7,4.5-4.3,4.5h-2.5V19.2z M15.4,26.6c1.7,0,2.7-0.9,2.7-3
c0-2.2-1-3-2.7-3h-0.5v6H15.4z"/>
<path class="st2" d="M21.6,19.2h5.5v1.5h-3.7V23h3.2v1.5h-3.2V28h-1.8V19.2z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="14px" height="14px" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(1 0 0 1 -80 -84 )">
<path d="M 13.9898550724638 1.71787439613527 C 14 1.2512077294686 13.8376811594203 0.855555555555554 13.5028985507246 0.530917874396124 C 13.1782608695652 0.206280193236722 12.7724637681159 0.0338164251207616 12.3159420289855 0 L 1.68405797101451 0 C 1.21739130434781 0.0338164251207616 0.821739130434768 0.196135265700491 0.497101449275366 0.530917874396124 C 0.162318840579701 0.855555555555554 0 1.2512077294686 0 1.71787439613527 L 0 9.712077294686 C 0 10.1787439613527 0.162318840579701 10.5743961352657 0.497101449275366 10.8990338164251 C 0.821739130434768 11.2236714975845 1.22753623188407 11.3961352657005 1.68405797101451 11.3961352657005 L 5.58985507246376 11.3961352657005 L 5.36666666666667 13.2526570048309 C 5.32608695652175 13.5874396135266 5.5695652173913 13.8917874396135 5.8942028985507 13.9323671497584 C 6.036231884058 13.9526570048309 6.17826086956524 13.9222222222222 6.28985507246375 13.8410628019324 L 10.1449275362319 11.3961352657005 L 12.3057971014493 11.3961352657005 C 12.7724637681159 11.3961352657005 13.168115942029 11.2338164251208 13.4927536231884 10.8990338164251 C 13.8173913043478 10.5743961352657 13.9898550724638 10.1685990338164 13.9898550724638 9.712077294686 L 13.9898550724638 1.71787439613527 Z M 12.7826086956522 1.71787439613527 L 12.7826086956522 9.712077294686 C 12.7826086956522 9.843961352657 12.7420289855073 9.95555555555555 12.6507246376812 10.0468599033816 C 12.5594202898551 10.1381642512077 12.4478260869565 10.1787439613527 12.3159420289855 10.1787439613527 L 9.98260869565217 10.1787439613527 C 9.8710144927536 10.1787439613527 9.75942028985509 10.2091787439614 9.65797101449277 10.2700483091787 L 6.73623188405799 12.1164251207729 L 6.88840579710143 10.848309178744 L 6.88840579710143 10.7772946859903 C 6.88840579710143 10.4425120772947 6.61449275362321 10.1685990338164 6.27971014492755 10.1685990338164 L 1.68405797101451 10.1685990338164 C 1.55217391304348 10.1685990338164 1.4405797101449 10.1280193236715 1.34927536231885 10.0367149758454 C 1.25797101449274 9.94541062801932 1.21739130434781 9.83381642512077 1.21739130434781 9.70193236714977 L 1.21739130434781 1.71787439613527 C 1.21739130434781 1.58599033816424 1.25797101449274 1.47439613526569 1.34927536231885 1.38309178743961 C 1.4405797101449 1.29178743961353 1.55217391304348 1.2512077294686 1.68405797101451 1.2512077294686 L 12.3159420289855 1.2512077294686 C 12.4478260869565 1.2512077294686 12.5594202898551 1.29178743961353 12.6507246376812 1.38309178743961 C 12.7420289855073 1.47439613526569 12.7826086956522 1.58599033816424 12.7826086956522 1.71787439613527 Z M 4.768115942029 5.07584541062803 C 4.43333333333334 5.07584541062803 4.15942028985506 5.34975845410628 4.15942028985506 5.68454106280194 C 4.15942028985506 6.01932367149757 4.43333333333334 6.29323671497585 4.768115942029 6.29323671497585 L 6.3608695652174 6.29323671497585 L 6.3608695652174 7.99758454106279 C 6.3608695652174 8.33236714975845 6.63478260869567 8.60628019323673 6.96956521739128 8.60628019323673 C 7.30434782608694 8.60628019323673 7.57826086956521 8.33236714975845 7.57826086956521 7.99758454106279 L 7.57826086956521 6.29323671497585 L 9.0695652173913 6.29323671497585 C 9.40434782608696 6.29323671497585 9.67826086956524 6.01932367149757 9.67826086956524 5.68454106280194 C 9.67826086956524 5.34975845410628 9.40434782608696 5.07584541062803 9.0695652173913 5.07584541062803 L 7.57826086956521 5.07584541062803 L 7.57826086956521 3.68599033816426 C 7.57826086956521 3.3512077294686 7.30434782608694 3.07729468599032 6.96956521739128 3.07729468599032 C 6.63478260869567 3.07729468599032 6.3608695652174 3.3512077294686 6.3608695652174 3.68599033816426 L 6.3608695652174 5.07584541062803 L 4.768115942029 5.07584541062803 Z " fill-rule="nonzero" fill="#4b7bea" stroke="none" transform="matrix(1 0 0 1 80 84 )" />
</g>
</svg>

View File

@ -0,0 +1,22 @@
<!-- Generator: Adobe Illustrator 22.0.0, SVG Export Plug-In -->
<svg version="1.1"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
x="0px" y="0px" width="32px" height="40px" viewBox="0 0 32 40" style="enable-background:new 0 0 32 40;" xml:space="preserve">
<style type="text/css">
.st0{fill:#127EE1;}
.st1{fill:#3FA4EF;}
.st2{fill:#FFFFFF;}
</style>
<defs>
</defs>
<g>
<path class="st0" d="M29.1,40H2.9C1.3,40,0,38.7,0,37.1V2.9C0,1.3,1.3,0,2.9,0h18.5L32,10.9v26.2C32,38.7,30.7,40,29.1,40L29.1,40z
"/>
<path class="st1" d="M21.1,8c0,1.6,1.3,2.9,2.9,2.9h8L21.3,0L21.1,8z"/>
<g>
<path class="st2" d="M8.5,16.9h2.9l1.2,5.5c0.2,1.1,0.3,2.2,0.5,3.3h0.1c0.2-1.1,0.4-2.2,0.7-3.3l1.3-5.5h2.6l1.4,5.5
c0.3,1.1,0.5,2.2,0.7,3.3h0.1c0.2-1.1,0.4-2.2,0.6-3.3l1.2-5.5h2.7L21.8,28h-3.4l-1.2-4.8c-0.2-1.1-0.4-2.1-0.7-3.3h-0.1
c-0.2,1.2-0.4,2.2-0.6,3.3L14.7,28h-3.3L8.5,16.9z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 990 B

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(1 0 0 1 -344 -17 )">
<path d="M 11.0250000000001 3.24107142857144 C 11.1121737113722 3.24107142857144 11.1957094894919 3.2568653826911 11.272908602491 3.28571428571433 L 14.5696428571428 3.28571428571433 C 15.3517857142856 3.24107142857144 15.9875 3.87678571428569 15.9285714285713 4.65892857142853 L 15.9285714285713 14.5839285714286 C 15.9875 15.3642857142858 15.3517857142856 16 14.5696428571428 16 L 1.45535714285711 16 C 0.673214285714266 16 0.0374999999999091 15.3642857142858 0 14.5821428571428 L 0 1.46785714285716 C 0.0374999999999091 0.685714285714312 0.673214285714266 0.0499999999999545 1.45535714285711 0.0714285714285552 L 7.45535714285711 0.0714285714285552 C 7.93035714285725 0.0499999999999545 8.37142857142862 0.285714285714334 8.63571428571436 0.682142857142821 L 10.341071429385 3.24107142857144 L 11.0250000000001 3.24107142857144 Z M 10.3410714285715 4.71428571428567 C 10.2263085855557 4.70091109724251 10.1135262703799 4.67700841115425 10.0047392496986 4.64285714285711 L 1.5 4.64287387864044 L 1.5 14.5714285714286 L 14.5714285714287 14.5714285714286 L 14.5714285714287 4.71428571428567 L 10.3410714285715 4.71428571428567 Z M 1.50000016751233 3.24107142857144 L 8.6304265715803 3.24107145721825 L 7.45535714285711 1.5 L 1.5 1.5 L 1.50000016751233 3.24107142857144 Z M 10.5732142857144 8.76607142857142 C 10.8303571428571 9.06071428571431 10.8017857142856 9.50892857142856 10.5071428571428 9.76607142857142 C 10.2107142857144 10.0232142857143 9.76428571428573 9.99285714285713 9.50714285714275 9.70000000000005 L 8.88750000000005 8.99174019202417 L 8.88750000000005 12.1017857142857 C 8.88750000000005 12.4928571428571 8.56964285714275 12.8107142857143 8.17857142857133 12.8107142857143 C 7.78749999999991 12.8107142857143 7.46964285714284 12.4928571428571 7.46964285714284 12.1017857142857 L 7.46963949904011 9.06123627097827 L 6.77500000000009 9.8553571428572 C 6.63392857142867 10.0142857142857 6.4375 10.0964285714285 6.23928571428564 10.0964285714285 C 6.07321428571436 10.0964285714285 5.90714285714284 10.0392857142857 5.7732142857144 9.92142857142858 C 5.47857142857151 9.66428571428571 5.44821428571436 9.21607142857147 5.7071428571428 8.92142857142858 L 7.67499999999995 6.67321428571427 C 7.94464285714275 6.36607142857144 8.47321428571422 6.36607142857144 8.74107142857133 6.67321428571427 L 10.5732142857144 8.76607142857142 Z " fill-rule="nonzero" fill="#363636" stroke="none" transform="matrix(1 0 0 1 344 17 )" />
</g>
</svg>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 40" style="enable-background:new 0 0 32 40;" xml:space="preserve">
<style type="text/css">
.st0{fill:#06AE56;}
.st1{fill:#4BE88A;}
.st2{fill:#FFFFFF;}
</style>
<g>
<path class="st0" d="M29.1,40H2.9C1.3,40,0,38.7,0,37.1V2.9C0,1.3,1.3,0,2.9,0h18.5L32,10.9v26.2C32,38.7,30.7,40,29.1,40L29.1,40z
"/>
<path class="st1" d="M21.1,8c0,1.6,1.3,2.9,2.9,2.9h8L21.3,0L21.1,8z"/>
<g>
<path class="st2" d="M14.4,20.5l-3.9-7.1h3.3l1.5,3.1c0.4,0.7,0.7,1.4,1.1,2.3h0.1c0.4-0.9,0.7-1.6,1-2.3l1.4-3.1h3.1L18,20.6
l4.1,7.4h-3.3l-1.6-3.3c-0.4-0.8-0.7-1.5-1.1-2.4H16c-0.4,0.9-0.7,1.7-1.1,2.4L13.4,28h-3.1L14.4,20.5z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 907 B

File diff suppressed because it is too large Load Diff

View File

@ -1467,6 +1467,19 @@
</a-radio-group>
</div>
</div>
<div class="map-studio__form-row mt-4">
<div class="map-studio__form-item">
<label class="map-studio__form-label">箭头样式</label>
<a-radio-group
:value="selectedDrawStyle.arrowShape"
@update:value="(v: string) => selectedDrawStyle.arrowShape = v "
>
<a-radio value="triangle">三角</a-radio>
<a-radio value="chevron">开放</a-radio>
<a-radio value="diamond">菱形</a-radio>
</a-radio-group>
</div>
</div>
</template>
</template>

View File

@ -35,6 +35,46 @@ function nextDrawId(): string {
return `draw_${Date.now()}_${++drawIdCounter}`;
}
/** 根据箭头样式创建箭头图片 */
function createArrowImage(
shape: string,
radius: number,
rotation: number,
color: string,
strokeWidth: number
) {
// endAngle 是地图坐标系角度atan2 dy/dx, y朝上
// 屏幕坐标系 y 朝下,转换: screenAngle = -endAngle
// RegularShape 默认顶点朝上,再 +π/2 → 正确屏幕方向
const rot = Math.PI / 2 - rotation;
if (shape === 'diamond') {
return new RegularShape({
points: 4,
radius,
rotation: rot,
fill: new Fill({ color }),
stroke: new Stroke({ color, width: 1 })
});
}
if (shape === 'chevron') {
return new RegularShape({
points: 3,
radius,
rotation: rot,
// 开放箭头:只描边不填充
stroke: new Stroke({ color, width: Math.max(strokeWidth, 2) })
});
}
// triangle默认
return new RegularShape({
points: 3,
radius,
rotation: rot,
fill: new Fill({ color }),
stroke: new Stroke({ color, width: 1 })
});
}
/** Feature 上存储单个样式对象的属性 key */
const DS_FEATURE_KEY = '_drawPerStyle';
@ -161,6 +201,7 @@ export function useDrawTools(mapInstance: Ref<OlMap | null>) {
const arrowPosition =
perStyle?.arrowPosition ?? drawStyle.value.arrowPosition;
const arrowSize = perStyle?.arrowSize ?? drawStyle.value.arrowSize;
const arrowShape = perStyle?.arrowShape ?? drawStyle.value.arrowShape;
const fontSize = perStyle?.fontSize ?? drawStyle.value.fontSize;
const fontFamily = perStyle?.fontFamily ?? drawStyle.value.fontFamily;
const textColor = perStyle?.textColor ?? drawStyle.value.textColor;
@ -233,44 +274,67 @@ export function useDrawTools(mapInstance: Ref<OlMap | null>) {
const arrowR =
arrowSize === 'small' ? 6 : arrowSize === 'large' ? 12 : 9;
// 结束箭头
const last = coords[coords.length - 1];
const prev = coords[coords.length - 2];
const endAngle = Math.atan2(last[1] - prev[1], last[0] - prev[0]);
styles.push(
new Style({
geometry: new Point(last),
image: new RegularShape({
points: 3,
radius: arrowR,
rotation: endAngle - Math.PI / 2,
fill: new Fill({ color: strokeColor }),
stroke: new Stroke({ color: strokeColor, width: 1 })
})
})
);
// 起始箭头
if (arrowPosition === 'both' && coords.length >= 2) {
const first = coords[0];
const second = coords[1];
const startAngle = Math.atan2(
first[1] - second[1],
first[0] - second[0]
// 结束箭头 —— 跳过双重点产生的零长度段
const endLast = coords[coords.length - 1];
let endPrevIdx = coords.length - 2;
while (
endPrevIdx >= 0 &&
coords[endPrevIdx][0] === endLast[0] &&
coords[endPrevIdx][1] === endLast[1]
) {
endPrevIdx--;
}
if (endPrevIdx >= 0) {
const endPrev = coords[endPrevIdx];
const endAngle = Math.atan2(
endLast[1] - endPrev[1],
endLast[0] - endPrev[0]
);
styles.push(
new Style({
geometry: new Point(first),
image: new RegularShape({
points: 3,
radius: arrowR,
rotation: startAngle - Math.PI / 2,
fill: new Fill({ color: strokeColor }),
stroke: new Stroke({ color: strokeColor, width: 1 })
})
geometry: new Point(endLast),
image: createArrowImage(
arrowShape,
arrowR,
endAngle,
strokeColor,
strokeWidth
)
})
);
}
// 起始箭头 —— 同理跳过重复点
if (arrowPosition === 'both' && coords.length >= 2) {
const startFirst = coords[0];
let startSecondIdx = 1;
while (
startSecondIdx < coords.length &&
coords[startSecondIdx][0] === startFirst[0] &&
coords[startSecondIdx][1] === startFirst[1]
) {
startSecondIdx++;
}
if (startSecondIdx < coords.length) {
const startSecond = coords[startSecondIdx];
const startAngle = Math.atan2(
startFirst[1] - startSecond[1],
startFirst[0] - startSecond[0]
);
styles.push(
new Style({
geometry: new Point(startFirst),
image: createArrowImage(
arrowShape,
arrowR,
startAngle,
strokeColor,
strokeWidth
)
})
);
}
}
}
}
}
@ -354,6 +418,7 @@ export function useDrawTools(mapInstance: Ref<OlMap | null>) {
showArrow: stored?.showArrow ?? drawStyle.value.showArrow,
arrowPosition: stored?.arrowPosition ?? drawStyle.value.arrowPosition,
arrowSize: stored?.arrowSize ?? drawStyle.value.arrowSize,
arrowShape: stored?.arrowShape ?? drawStyle.value.arrowShape,
fontSize: stored?.fontSize ?? drawStyle.value.fontSize,
fontFamily: stored?.fontFamily ?? drawStyle.value.fontFamily,
textColor: stored?.textColor ?? drawStyle.value.textColor,
@ -388,6 +453,7 @@ export function useDrawTools(mapInstance: Ref<OlMap | null>) {
showArrow: s.showArrow,
arrowPosition: s.arrowPosition,
arrowSize: s.arrowSize,
arrowShape: s.arrowShape,
fontSize: s.fontSize,
fontFamily: s.fontFamily,
textColor: s.textColor,
@ -806,6 +872,7 @@ export function useDrawTools(mapInstance: Ref<OlMap | null>) {
showArrow: drawStyle.value.showArrow,
arrowPosition: drawStyle.value.arrowPosition,
arrowSize: drawStyle.value.arrowSize,
arrowShape: drawStyle.value.arrowShape,
fontSize: drawStyle.value.fontSize,
fontFamily: drawStyle.value.fontFamily,
textColor: drawStyle.value.textColor,
@ -865,6 +932,7 @@ export function useDrawTools(mapInstance: Ref<OlMap | null>) {
showArrow: drawStyle.value.showArrow,
arrowPosition: drawStyle.value.arrowPosition,
arrowSize: drawStyle.value.arrowSize,
arrowShape: drawStyle.value.arrowShape,
fontSize: drawStyle.value.fontSize,
fontFamily: drawStyle.value.fontFamily,
textColor: drawStyle.value.textColor,

View File

@ -163,6 +163,8 @@ export interface DrawStyle {
arrowPosition: 'end' | 'both';
/** 箭头大小 */
arrowSize: 'small' | 'medium' | 'large';
/** 箭头样式 */
arrowShape: 'triangle' | 'chevron' | 'diamond';
/** 字号 */
fontSize: number;
/** 字体 */
@ -187,6 +189,7 @@ export const DEFAULT_DRAW_STYLE: DrawStyle = {
showArrow: true,
arrowPosition: 'end',
arrowSize: 'medium',
arrowShape: 'triangle',
fontSize: 14,
fontFamily: 'Microsoft YaHei',
textColor: '#ffffff',

View File

@ -118,8 +118,11 @@ svg {
.ant-select-tree-node-selected {
background-color: #bae7ff !important;
}
.ant-empty{
p{
text-indent: 0em !important;
.ant-empty {
p {
text-indent: 0em !important;
}
}
.ant-dropdown {
z-index: 9999 !important;
}

View File

@ -0,0 +1,7 @@
<template>
<IntelligentQa />
</template>
<script setup lang="ts">
import IntelligentQa from '@/modules/IntelligentQA/index.vue';
</script>