diff --git a/src/assets/geoserver.js b/src/assets/geoserver.js index 974c6f4..c078f3e 100644 --- a/src/assets/geoserver.js +++ b/src/assets/geoserver.js @@ -36,21 +36,16 @@ export const fetchPlotGeoJSON = async () => { return { ...feature, properties: { - // 保留原始属性 ...p, - // --- 关键映射区域 (根据你的数据库字段修改左边的值) --- name: p.xb_name || p.name || "未命名图斑", - // 这里的映射决定了地图颜色!确保数据库里有 "乔木林"/"灌木林" 等值 - // 如果数据库存的是代码(1,2,3),这里需要写转换逻辑 + type: p.forest_type || p.type || "其他", area: p.area_mu || 0, collector: p.manager || "未知人员", - // --- 图片/视频处理 --- - // 假设数据库里存的是 "url1,url2" 这样的字符串 images: p.image_urls ? p.image_urls.split(',') : [], videos: p.video_urls ? p.video_urls.split(',') : [], }, diff --git a/src/components/MapView.vue b/src/components/MapView.vue index e964e17..62a4ce9 100644 --- a/src/components/MapView.vue +++ b/src/components/MapView.vue @@ -5,7 +5,7 @@
- 数据日期: + 选择日期: + + +
@@ -23,7 +40,7 @@
@@ -36,13 +53,13 @@
@@ -60,7 +77,6 @@ \ No newline at end of file diff --git a/src/components/SamplePopup.vue b/src/components/SamplePopup.vue index afd863e..9410fdf 100644 --- a/src/components/SamplePopup.vue +++ b/src/components/SamplePopup.vue @@ -1,257 +1,263 @@ - - - - - \ No newline at end of file + +/* 关闭按钮 */ +.close-btn { + position: absolute; + top: 8px; + right: 8px; /* 稍微靠右一点 */ + font-size: 24px; + font-weight: 300; + color: #fff; + cursor: pointer; + z-index: 100; /* 确保在最上层 */ + line-height: 1; +} +.close-btn:hover { color: #ffe6e6; } + +.popup-header-wrapper { + background-color: #5db862; /* 绿色主题 */ + border-top-left-radius: 8px; + border-top-right-radius: 8px; +} + +.popup-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 10px 15px; + /* ✅ 关键修复:右侧预留空间,防止被关闭按钮遮挡 */ + padding-right: 35px; + color: white; + height: 32px; +} + +.title { font-weight: bold; font-size: 14px; white-space: nowrap; } + +/* 翻页器样式 */ +.pagination { + display: flex; align-items: center; gap: 4px; +} +.page-info { font-size: 12px; font-weight: bold; white-space: nowrap; } +.nav-btn { + width: 18px; height: 18px; min-height: 18px; font-size: 12px; padding: 0; + background: rgba(255,255,255,0.2); border: none; color: white; +} +.nav-btn:hover:not(:disabled) { background: rgba(255,255,255,0.4); } +.nav-btn:disabled { opacity: 0.5; cursor: not-allowed; } + +.scroll-content { + max-height: 350px; overflow-y: auto; overflow-x: hidden; + background: #fff; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; +} +.content-padding { padding: 12px; } + +.sub-header { font-size: 12px; color: #909399; margin-bottom: 8px; border-bottom: 1px solid #eee; padding-bottom: 4px; } + +.info-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; } +.info-item { display: flex; justify-content: space-between; border-bottom: 1px dashed #eee; padding-bottom: 4px; font-size: 12px; } +.info-item .label { color: #909399; flex-shrink: 0; } +.info-item .value { color: #303133; font-weight: bold; word-break: break-all; text-align: right; } + +.media-container { position: relative; background: #000; border-radius: 4px; overflow: hidden; } +.media-content { width: 100%; height: 100%; object-fit: contain; background-color: #000; display: block; } +.media-count { position: absolute; bottom: 5px; right: 5px; background: rgba(0,0,0,0.6); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 10px; } +.no-media { height: 50px; background: #f5f7fa; color: #c0c4cc; display: flex; align-items: center; justify-content: center; font-size: 12px; border-radius: 4px; } + +.popup-actions { margin-top: 15px; text-align: right; border-top: 1px dashed #eee; padding-top: 10px; } + +/* 滚动条 */ +.scroll-content::-webkit-scrollbar { width: 6px; } +.scroll-content::-webkit-scrollbar-thumb { background: #dcdfe6; border-radius: 3px; } +.scroll-content::-webkit-scrollbar-track { background: #f5f7fa; } + \ No newline at end of file diff --git a/src/components/TreePopup.vue b/src/components/TreePopup.vue new file mode 100644 index 0000000..bdc3de5 --- /dev/null +++ b/src/components/TreePopup.vue @@ -0,0 +1,276 @@ + + + + + \ No newline at end of file