diff --git a/vue-fastapi-backend/module_admin/service/data_asset_service.py b/vue-fastapi-backend/module_admin/service/data_asset_service.py
index 8372b68..f59e3ae 100644
--- a/vue-fastapi-backend/module_admin/service/data_asset_service.py
+++ b/vue-fastapi-backend/module_admin/service/data_asset_service.py
@@ -5,6 +5,7 @@ from exceptions.exception import ServiceException
from typing import Dict, Any, List
from utils.common_util import export_list2excel
+import json
class DataAssetService:
"""
@@ -183,7 +184,9 @@ class DataAssetService:
# 处理状态字段
cleaned_item["dataAstStat"] = "有效" if cleaned_item.get("dataAstStat") == "有效" else "废弃"
-
+ cleaned_item["dataAstClas"] = format_asset_tags(
+ cleaned_item.get("dataAstClas")
+ )
# 按mapping_dict的键顺序构建数据
mapped_item = {
mapping_dict[key]: cleaned_item.get(key, "")
@@ -192,4 +195,34 @@ class DataAssetService:
new_data.append(mapped_item)
# 直接调用export_list2excel,只传入数据参数
- return export_list2excel(new_data)
\ No newline at end of file
+ return export_list2excel(new_data)
+ import json
+
+def format_asset_tags(value):
+ """
+ 将资产标签转为:clasName:clasValue,clasName:clasValue
+ """
+ if not value:
+ return ""
+
+ # 如果是字符串,尝试反序列化
+ if isinstance(value, str):
+ try:
+ value = json.loads(value)
+ except Exception:
+ return value # 非 JSON,直接原样返回
+
+ # 如果不是 list,直接返回字符串
+ if not isinstance(value, list):
+ return str(value)
+
+ result = []
+ for item in value:
+ if not isinstance(item, dict):
+ continue
+ name = item.get("clasName", "")
+ val = item.get("clasValue", "")
+ if name or val:
+ result.append(f"{name}:{val}")
+
+ return ",".join(result)
diff --git a/vue-fastapi-frontend/src/views/dataAsset/assetDetail/index.vue b/vue-fastapi-frontend/src/views/dataAsset/assetDetail/index.vue
index 85f2bb1..9dceb68 100644
--- a/vue-fastapi-frontend/src/views/dataAsset/assetDetail/index.vue
+++ b/vue-fastapi-frontend/src/views/dataAsset/assetDetail/index.vue
@@ -33,10 +33,14 @@
-
+
+
+
-
+
+
+ {{ parseTime(scope.row.dataAstUpdTime) }}
+
+
@@ -498,7 +506,7 @@ const handleDelete = (row) => {
}
const handleExport = () => {
- proxy.download("/default-api/system/dataAsset/export", {
+ proxy.download("/system/dataAsset/export", {
...queryParams.value,
}, `dataAsset_${new Date().getTime()}.xlsx`);
}
@@ -525,7 +533,11 @@ const handleSelectionChange = (selection) => {
// });
const dataAstType_list = computed(() => {
- return ['表', '报表','其他应用'];
+ return [
+ { label: '表', value: 'TABLE' },
+ { label: '报表', value: '报表' },
+ { label: '其他应用', value: '其他应用' }
+ ];
});