|
|
|
@ -102,6 +102,15 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div v-if="grasslandFeaturePanelVisible" class="pasture-map-feature-info" :style="grasslandFeaturePanelStyle"> |
|
|
|
<div v-if="grasslandFeaturePanelVisible" class="pasture-map-feature-info" :style="grasslandFeaturePanelStyle"> |
|
|
|
|
|
|
|
<button |
|
|
|
|
|
|
|
class="pasture-map-feature-close" |
|
|
|
|
|
|
|
type="button" |
|
|
|
|
|
|
|
aria-label="关闭图斑详情" |
|
|
|
|
|
|
|
title="关闭" |
|
|
|
|
|
|
|
@click.stop="clearGrasslandFeaturePanel" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
× |
|
|
|
|
|
|
|
</button> |
|
|
|
<feature-info-panel |
|
|
|
<feature-info-panel |
|
|
|
:feature="selectedGrasslandFeature" |
|
|
|
:feature="selectedGrasslandFeature" |
|
|
|
:empty="grasslandFeatureEmpty" |
|
|
|
:empty="grasslandFeatureEmpty" |
|
|
|
@ -1396,12 +1405,14 @@ function normalizePastureRows(rows = []) { |
|
|
|
const grasslandCount = pickGrasslandBoundaryCount(item, grasslands) |
|
|
|
const grasslandCount = pickGrasslandBoundaryCount(item, grasslands) |
|
|
|
const realId = getRealPastureId(item) |
|
|
|
const realId = getRealPastureId(item) |
|
|
|
const township = getPastureTownship(item, grasslands) || getPastureFallbackTownship(item, name, realId) |
|
|
|
const township = getPastureTownship(item, grasslands) || getPastureFallbackTownship(item, name, realId) |
|
|
|
|
|
|
|
const pastureSortOrder = pickPastureSortOrder(item) |
|
|
|
const normalized = { |
|
|
|
const normalized = { |
|
|
|
...item, |
|
|
|
...item, |
|
|
|
key: item.key || item.id || item.pasturesId || item.pastures_id || `${name}-${index}`, |
|
|
|
key: item.key || item.id || item.pasturesId || item.pastures_id || `${name}-${index}`, |
|
|
|
id: realId || item.id || item.pastureId || item.pasturesId || item.pastures_id || item.muhuId || item.key, |
|
|
|
id: realId || item.id || item.pastureId || item.pasturesId || item.pastures_id || item.muhuId || item.key, |
|
|
|
realPastureId: realId, |
|
|
|
realPastureId: realId, |
|
|
|
name, |
|
|
|
name, |
|
|
|
|
|
|
|
pastureSortOrder, |
|
|
|
township: township || "--", |
|
|
|
township: township || "--", |
|
|
|
grasslandArea, |
|
|
|
grasslandArea, |
|
|
|
acreage: grasslandArea, |
|
|
|
acreage: grasslandArea, |
|
|
|
@ -1434,13 +1445,38 @@ function sortPastureRows(rows = []) { |
|
|
|
return [...(Array.isArray(rows) ? rows : [])] |
|
|
|
return [...(Array.isArray(rows) ? rows : [])] |
|
|
|
.map((row) => ({ |
|
|
|
.map((row) => ({ |
|
|
|
...row, |
|
|
|
...row, |
|
|
|
|
|
|
|
pastureSortOrder: pickPastureSortOrder(row), |
|
|
|
grasslandArea: pickPastureArea(row), |
|
|
|
grasslandArea: pickPastureArea(row), |
|
|
|
acreage: pickPastureArea(row), |
|
|
|
acreage: pickPastureArea(row), |
|
|
|
})) |
|
|
|
})) |
|
|
|
.sort(comparePastureRows) |
|
|
|
.sort(comparePastureRows) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function pickPastureSortOrder(item = {}) { |
|
|
|
|
|
|
|
const value = pickValue(item, [ |
|
|
|
|
|
|
|
"pastureSortOrder", |
|
|
|
|
|
|
|
"pasture_sort_order", |
|
|
|
|
|
|
|
"pastureOrder", |
|
|
|
|
|
|
|
"pasture_order", |
|
|
|
|
|
|
|
"muhuSortOrder", |
|
|
|
|
|
|
|
"muhu_sort_order", |
|
|
|
|
|
|
|
"sortOrder", |
|
|
|
|
|
|
|
"sort_order", |
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
if (value === undefined || value === null || value === "") return null |
|
|
|
|
|
|
|
const number = Number(String(value).replace(/,/g, "").trim()) |
|
|
|
|
|
|
|
return Number.isFinite(number) ? number : null |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function comparePastureRows(a, b) { |
|
|
|
function comparePastureRows(a, b) { |
|
|
|
|
|
|
|
const sortA = pickPastureSortOrder(a) |
|
|
|
|
|
|
|
const sortB = pickPastureSortOrder(b) |
|
|
|
|
|
|
|
if (sortA !== null || sortB !== null) { |
|
|
|
|
|
|
|
if (sortA === null) return 1 |
|
|
|
|
|
|
|
if (sortB === null) return -1 |
|
|
|
|
|
|
|
if (sortA !== sortB) return sortA - sortB |
|
|
|
|
|
|
|
return String(a?.name || "").localeCompare(String(b?.name || ""), "zh-CN") |
|
|
|
|
|
|
|
} |
|
|
|
const boundaryA = hasPastureGrasslandBoundary(a) ? 1 : 0 |
|
|
|
const boundaryA = hasPastureGrasslandBoundary(a) ? 1 : 0 |
|
|
|
const boundaryB = hasPastureGrasslandBoundary(b) ? 1 : 0 |
|
|
|
const boundaryB = hasPastureGrasslandBoundary(b) ? 1 : 0 |
|
|
|
if (boundaryA !== boundaryB) return boundaryB - boundaryA |
|
|
|
if (boundaryA !== boundaryB) return boundaryB - boundaryA |
|
|
|
@ -2411,6 +2447,42 @@ function isLngLatInPolygon(point, polygon) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.pasture-map-feature-close { |
|
|
|
|
|
|
|
position: absolute; |
|
|
|
|
|
|
|
top: 18px; |
|
|
|
|
|
|
|
right: 18px; |
|
|
|
|
|
|
|
z-index: 3; |
|
|
|
|
|
|
|
width: 30px; |
|
|
|
|
|
|
|
height: 30px; |
|
|
|
|
|
|
|
border: 1px solid rgba(64, 224, 255, 0.56); |
|
|
|
|
|
|
|
border-radius: 2px; |
|
|
|
|
|
|
|
color: rgba(228, 250, 255, 0.96); |
|
|
|
|
|
|
|
background: |
|
|
|
|
|
|
|
linear-gradient(135deg, rgba(37, 213, 255, 0.22), rgba(10, 55, 76, 0.72)); |
|
|
|
|
|
|
|
box-shadow: |
|
|
|
|
|
|
|
inset 0 0 12px rgba(42, 210, 255, 0.18), |
|
|
|
|
|
|
|
0 0 10px rgba(30, 184, 230, 0.16); |
|
|
|
|
|
|
|
font-size: 23px; |
|
|
|
|
|
|
|
line-height: 26px; |
|
|
|
|
|
|
|
font-weight: 400; |
|
|
|
|
|
|
|
text-align: center; |
|
|
|
|
|
|
|
cursor: pointer; |
|
|
|
|
|
|
|
pointer-events: all; |
|
|
|
|
|
|
|
transition: |
|
|
|
|
|
|
|
border-color 0.16s ease, |
|
|
|
|
|
|
|
color 0.16s ease, |
|
|
|
|
|
|
|
background 0.16s ease, |
|
|
|
|
|
|
|
transform 0.16s ease; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.pasture-map-feature-close:hover { |
|
|
|
|
|
|
|
color: #ffffff; |
|
|
|
|
|
|
|
border-color: rgba(52, 246, 255, 0.9); |
|
|
|
|
|
|
|
background: |
|
|
|
|
|
|
|
linear-gradient(135deg, rgba(38, 240, 255, 0.34), rgba(13, 75, 102, 0.86)); |
|
|
|
|
|
|
|
transform: translateY(-1px); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.pasture-management .m-card-hd-title { |
|
|
|
.pasture-management .m-card-hd-title { |
|
|
|
color: #ffffff !important; |
|
|
|
color: #ffffff !important; |
|
|
|
background: none !important; |
|
|
|
background: none !important; |
|
|
|
|