From beb95fb5fc166804056abafd70fc01ac27de7621 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Mon, 26 Jan 2026 09:11:00 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 packages/utils/common/index.js |   32 +++++++++++++++++++++++++++++---
 1 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/packages/utils/common/index.js b/packages/utils/common/index.js
index 0c1f904..43fcec6 100644
--- a/packages/utils/common/index.js
+++ b/packages/utils/common/index.js
@@ -1,3 +1,13 @@
+/*
+ * @Author       : yuan
+ * @Date         : 2026-01-20 17:01:20
+ * @LastEditors  : yuan
+ * @LastEditTime : 2026-01-20 17:20:21
+ * @FilePath     : \packages\utils\common\index.js
+ * @Description  :
+ * Copyright 2026 OBKoro1, All Rights Reserved.
+ * 2026-01-20 17:01:20
+ */
 export function fieldRules(required,max) {
 // export function fieldRules({ required = true, isSelect = false, max = 50,type = 'string' }) {
 	const trigger = ['blur', 'change']
@@ -12,9 +22,13 @@
 	return rules
 }
 
-
-export function getDictLabel(value, dictList) {
-	return dictList.find(item => item.dictKey === value)?.dictValue || value || '-'
+export function getDictLabel(value, dictList = []) {
+	if (value === null || value === undefined || value === '') return '';
+	const values = String(value).split(',');
+	return dictList
+		.filter(item => values.includes(String(item.dictKey)))
+		.map(item => item.dictValue)
+		.join(',');
 }
 
 export function blobDownload(res) {
@@ -30,3 +44,15 @@
 	elink.click()
 	document.body.removeChild(elink)
 }
+
+export function geomAnalysis(str) {
+	if (!str) return []
+	return str
+		.replace('POLYGON((', '')
+		.replace('))', '')
+		.split(',')
+		.map(pair => {
+			const [longitude, latitude] = pair.trim().split(' ').map(Number)
+			return { longitude, latitude }
+		})
+}

--
Gitblit v1.9.3