增加扇形
This commit is contained in:
10
src/renderer/public/sdk/YJEarth.min.js
vendored
10
src/renderer/public/sdk/YJEarth.min.js
vendored
File diff suppressed because one or more lines are too long
@ -5,7 +5,8 @@ body {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
background-image: url('./wavy-lines.svg');
|
||||
/* background-image: url('./wavy-lines.svg'); */
|
||||
background-color: #000000;
|
||||
background-size: cover;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
@ -42,6 +42,9 @@ export const initMapData = async (type, data, cd) => {
|
||||
case 'ellipse':
|
||||
entityObject = new YJ.Obj.EllipseObject(window.earth, data)
|
||||
break
|
||||
case 'sector':
|
||||
entityObject = new YJ.Obj.SectorObject(window.earth, data)
|
||||
break
|
||||
case 'model':
|
||||
console.log('model', data)
|
||||
entityObject = new YJ.Obj.Model(window.earth, data)
|
||||
|
||||
1
src/renderer/src/icons/svg/sector.svg
Normal file
1
src/renderer/src/icons/svg/sector.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M1.83089 11.2668L10.2871 14.8693L18.8224 11.4511C18.1453 9.76741 16.9828 8.32202 15.4819 7.29769C13.981 6.27335 12.2092 5.71609 10.3904 5.69636C8.57166 5.67663 6.7877 6.19533 5.26412 7.18686C3.74054 8.17838 2.54576 9.59821 1.83089 11.2668Z" fill="#00FFFF" fill-opacity="0.5"></path><path d="M1.18601 11.5253L1.63834 11.718L10.2818 15.4002L19.4622 11.7237L19.2791 11.2685C18.9224 10.3816 18.4443 9.56549 17.8449 8.82018C17.2455 8.07485 16.5505 7.43241 15.7599 6.89286C14.9693 6.35331 14.1172 5.93987 13.2036 5.65253C12.29 5.36518 11.3542 5.21633 10.3962 5.20595C9.43822 5.19555 8.49935 5.32407 7.57956 5.5915C6.6597 5.85896 5.79853 6.25381 4.99604 6.77606C4.19355 7.29831 3.48428 7.92548 2.86824 8.65756C2.25219 9.38965 1.7559 10.1951 1.37935 11.074L1.18601 11.5253ZM2.48927 11.0138L10.2934 14.3384L18.1708 11.1837C17.878 10.559 17.5137 9.97579 17.0781 9.43424C16.5396 8.76463 15.9151 8.18743 15.2048 7.70265C14.4945 7.21786 13.7289 6.84638 12.908 6.5882C12.0871 6.33003 11.2463 6.19627 10.3855 6.18693C9.52473 6.17759 8.68108 6.29307 7.85455 6.53339C7.028 6.77372 6.25418 7.12852 5.5331 7.59779C4.81201 8.06707 4.17469 8.63062 3.62113 9.28843C3.17347 9.82043 2.79618 10.3955 2.48927 11.0138Z" fill-rule="evenodd" fill="#00FFFF" ></path><path stroke="rgba(0, 255, 255, 1)" stroke-width="0.98" d="M0.802734 10.8286L10.2874 14.8692L20 10.9796"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
@ -64,29 +64,6 @@
|
||||
<svg-icon class="subscript2" name="subscript2" :size="14" color="rgba(var(--color-base1), 1)"></svg-icon>
|
||||
</div>
|
||||
</div>
|
||||
<svg>
|
||||
<defs>
|
||||
<linearGradient id="linear_border_2485_3" x1="59.5" y1="35.5" x2="59.5" y2="0.5"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="rgb(var(--color-base1))" />
|
||||
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
|
||||
</linearGradient>
|
||||
<linearGradient id="linear_fill_2485_4" x1="0" y1="34.101806640625" x2="102.996826171875"
|
||||
y2="43.6986083984375" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0.0625" stop-color="rgb(var(--color-base1))" />
|
||||
<stop offset="1" stop-color="var(--color-border1)" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
<svg>
|
||||
<defs>
|
||||
<linearGradient id="linear_fill_2253_24_1" x1="61.658447265625" y1="35.5" x2="61.6580810546875" y2="0.5"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="rgba(var(--color-base1), 1)" stop-opacity="0.25" />
|
||||
<stop offset="1" stop-color="rgba(var(--color-base1), 1)" stop-opacity="0" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="bottom_left" @click="fold">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"
|
||||
@ -129,6 +106,28 @@
|
||||
</defs>
|
||||
</svg>
|
||||
</div>
|
||||
<svg>
|
||||
<defs>
|
||||
<linearGradient id="linear_border_2485_3" x1="59.5" y1="35.5" x2="59.5" y2="0.5" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="rgb(var(--color-base1))" />
|
||||
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
|
||||
</linearGradient>
|
||||
<linearGradient id="linear_fill_2485_4" x1="0" y1="34.101806640625" x2="102.996826171875" y2="43.6986083984375"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0.0625" stop-color="rgb(var(--color-base1))" />
|
||||
<stop offset="1" stop-color="var(--color-border1)" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
<svg>
|
||||
<defs>
|
||||
<linearGradient id="linear_fill_2253_24_1" x1="61.658447265625" y1="35.5" x2="61.6580810546875" y2="0.5"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="rgba(var(--color-base1), 1)" stop-opacity="0.25" />
|
||||
<stop offset="1" stop-color="rgba(var(--color-base1), 1)" stop-opacity="0" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -397,6 +396,36 @@ const bottomMenuList = ref([
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
sourceName: '扇形',
|
||||
key: 'DrawSector',
|
||||
sourceType: 'sector',
|
||||
className: 'public',
|
||||
ref: ref(null),
|
||||
fun: () => {
|
||||
let Draw = new YJ.Draw.DrawSector(window.earth)
|
||||
Draw.start(async (a, opt) => {
|
||||
if (!opt) {
|
||||
return
|
||||
}
|
||||
let id = new YJ.Tools().randomString()
|
||||
let name = '扇形'
|
||||
await addMapSource({
|
||||
type: 'sector',
|
||||
id: id,
|
||||
sourceName: name,
|
||||
opt: {
|
||||
id: id,
|
||||
name: name,
|
||||
center: opt.center,
|
||||
radius: opt.radius,
|
||||
startAngle: opt.startAngle,
|
||||
endAngle: opt.endAngle
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
sourceName: '集结地',
|
||||
key: 'DrawAssemble',
|
||||
@ -571,7 +600,7 @@ document.addEventListener('click', (e: any) => {
|
||||
position: fixed;
|
||||
height: 44px;
|
||||
bottom: 1em;
|
||||
left: 7vw;
|
||||
left: 13vw;
|
||||
}
|
||||
|
||||
.bottomMenu {
|
||||
@ -723,7 +752,7 @@ document.addEventListener('click', (e: any) => {
|
||||
|
||||
.bottom_left {
|
||||
position: fixed;
|
||||
right: 18vw;
|
||||
right: 13.5vw;
|
||||
bottom: 1.5em;
|
||||
height: 1.5vw;
|
||||
width: 1.5vw;
|
||||
|
||||
@ -190,6 +190,9 @@ const open = async (id: any, type: any) => {
|
||||
else if(type && type === 'ellipse') {
|
||||
title.value = '椭圆'
|
||||
}
|
||||
else if(type && type === 'sector') {
|
||||
title.value = '扇形'
|
||||
}
|
||||
that = window.earth.entityMap.get(id)
|
||||
originalOptions = structuredClone(that.options)
|
||||
entityOptions.value = that
|
||||
|
||||
@ -284,8 +284,8 @@ const goodsFilter = () => {
|
||||
}
|
||||
const goodsSelect = async (page) => {
|
||||
let formData = new FormData()
|
||||
formData.append('pageNum', 1)
|
||||
formData.append('pageSize', 999999)
|
||||
formData.append('pageNum', '1')
|
||||
formData.append('pageSize', '999999')
|
||||
formData.append('name', goodsKeywords.value)
|
||||
const res = await MaterialApi.getList(formData)
|
||||
if (res.code === 200) {
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="32"
|
||||
height="32"
|
||||
viewBox="0 0 32 32"
|
||||
height="34"
|
||||
viewBox="0 0 32 34"
|
||||
fill="none"
|
||||
>
|
||||
<path
|
||||
@ -594,7 +594,7 @@ defineExpose({
|
||||
right: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 18vw;
|
||||
width: 17vw;
|
||||
height: 33vw;
|
||||
|
||||
.box1 {
|
||||
|
||||
@ -206,6 +206,11 @@ eventBus.on('openDialog', async (sourceType: any, id: any) => {
|
||||
await nextTick()
|
||||
dynamicComponentRef.value?.open(id, 'ellipse')
|
||||
break
|
||||
case 'sector':
|
||||
currentComponent.value = circleObject
|
||||
await nextTick()
|
||||
dynamicComponentRef.value?.open(id, 'sector')
|
||||
break
|
||||
case 'rectangle':
|
||||
currentComponent.value = polygonObject
|
||||
await nextTick()
|
||||
|
||||
Reference in New Issue
Block a user