From 98b0293b009b7177f7717e89a4bcdff06a5b4c85 Mon Sep 17 00:00:00 2001
From: siyaqi
Date: Sat, 14 Feb 2026 10:16:47 +0800
Subject: [PATCH 1/6] =?UTF-8?q?=E6=A0=87=E5=87=86=E9=97=AE=E9=A2=98?=
=?UTF-8?q?=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../datastd/main/components/AddEditForm.vue | 106 ++++++++++++++++++
1 file changed, 106 insertions(+)
diff --git a/vue-fastapi-frontend/src/views/datastd/main/components/AddEditForm.vue b/vue-fastapi-frontend/src/views/datastd/main/components/AddEditForm.vue
index 21ca94e..0d9cdce 100644
--- a/vue-fastapi-frontend/src/views/datastd/main/components/AddEditForm.vue
+++ b/vue-fastapi-frontend/src/views/datastd/main/components/AddEditForm.vue
@@ -168,6 +168,105 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -179,6 +278,13 @@
+
+
+
+ 取消
+ 确定
+
+
From c29e66da57232d05f464870a88230140564ddb47 Mon Sep 17 00:00:00 2001
From: siyaqi
Date: Mon, 16 Feb 2026 16:38:55 +0800
Subject: [PATCH 2/6] =?UTF-8?q?=E6=A0=87=E5=87=86=E6=A0=B7=E5=BC=8F?=
=?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../datastd/main/components/AddEditForm.vue | 104 ++++++++++++++++--
1 file changed, 95 insertions(+), 9 deletions(-)
diff --git a/vue-fastapi-frontend/src/views/datastd/main/components/AddEditForm.vue b/vue-fastapi-frontend/src/views/datastd/main/components/AddEditForm.vue
index 0d9cdce..391fc7c 100644
--- a/vue-fastapi-frontend/src/views/datastd/main/components/AddEditForm.vue
+++ b/vue-fastapi-frontend/src/views/datastd/main/components/AddEditForm.vue
@@ -1,5 +1,6 @@
-
-
- 取消
+
+
+ 取消
-
- 保存
+
+ 保存
-
+
- 取消
- 确定
+
@@ -458,4 +462,86 @@ const handleClose = () => {
// 初始化
initData()
-
\ No newline at end of file
+
+
+
From b28aa16c5010514d0169b543d30875790803eacf Mon Sep 17 00:00:00 2001
From: siyaqi
Date: Mon, 16 Feb 2026 18:10:13 +0800
Subject: [PATCH 3/6] =?UTF-8?q?mysql=E7=9B=B8=E5=85=B3=E9=80=82=E9=85=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../module_admin/service/metasecurity_service.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/vue-fastapi-backend/module_admin/service/metasecurity_service.py b/vue-fastapi-backend/module_admin/service/metasecurity_service.py
index a62b2a4..73c67f1 100644
--- a/vue-fastapi-backend/module_admin/service/metasecurity_service.py
+++ b/vue-fastapi-backend/module_admin/service/metasecurity_service.py
@@ -438,7 +438,8 @@ class MetaSecurityService:
try:
async with async_session() as session:
- await session.execute(text("SET statement_timeout = 30000"))
+ if (db_type or "").upper() == "POSTGRESQL":
+ await session.execute(text("SET statement_timeout = 30000"))
# ⭐ 原始数量
if sql_type == "原始结果":
count_sql = cls.build_count_sql(sql_query,db_type)
@@ -474,6 +475,7 @@ class MetaSecurityService:
if select:
select.set("order", None)
select.set("limit", None)
+ select.set("offset", None)
cleaned_sql = parsed.sql(dialect=dialect)
return f"SELECT COUNT(*) AS cnt FROM ({cleaned_sql}) t"
@@ -495,7 +497,7 @@ class MetaSecurityService:
elif db_type.lower() == "mysql":
# MySQL: 直接查询表字段(MySQL 没有 schema 的概念)
query = f"""
- SELECT COLUMN_NAME
+ SELECT COLUMN_NAME AS column_name
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = '{table}'
"""
From a2b4a2ee4e30cdd870fcd6fee1b0b683edbfd0ed Mon Sep 17 00:00:00 2001
From: siyaqi
Date: Sat, 21 Feb 2026 20:26:43 +0800
Subject: [PATCH 4/6] =?UTF-8?q?ds=E9=80=82=E9=85=8D=E6=94=B9=E9=80=A0?=
=?UTF-8?q?=E5=8F=8A=E6=95=B0=E6=8D=AE=E5=AE=89=E5=85=A8=E6=8E=A5=E5=8F=A3?=
=?UTF-8?q?=E5=8D=87=E7=BA=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../service/metasecurity_service.py | 28 ++++++++++++++-
vue-fastapi-backend/requirements.txt | 3 +-
vue-fastapi-frontend/src/api/meta/metaInfo.js | 13 ++++++-
.../src/views/meta/metatask/index.vue | 34 +++++++++++++++----
4 files changed, 68 insertions(+), 10 deletions(-)
diff --git a/vue-fastapi-backend/module_admin/service/metasecurity_service.py b/vue-fastapi-backend/module_admin/service/metasecurity_service.py
index 73c67f1..abc7ff9 100644
--- a/vue-fastapi-backend/module_admin/service/metasecurity_service.py
+++ b/vue-fastapi-backend/module_admin/service/metasecurity_service.py
@@ -23,6 +23,7 @@ from sqlglot.expressions import Table
from sqlglot import exp ,parse_one
from typing import Set
from sqlparse.tokens import Keyword, DML
+from urllib.parse import quote_plus
class MetaSecurityService:
"""
数据源安全管理模块服务层
@@ -379,7 +380,9 @@ class MetaSecurityService:
# 1️⃣ 去掉 jdbc 前缀
jdbc_prefixes = {
"jdbc:mysql://": len("jdbc:mysql://"),
- "jdbc:postgresql://": len("jdbc:postgresql://")
+ "jdbc:postgresql://": len("jdbc:postgresql://"),
+ "jdbc:oracle:thin:@//": len("jdbc:oracle:thin:@//"),
+ "jdbc:oracle:thin:@": len("jdbc:oracle:thin:@")
}
for prefix, length in jdbc_prefixes.items():
if address.startswith(prefix):
@@ -410,6 +413,21 @@ class MetaSecurityService:
pool_pre_ping=True,
connect_args={"timeout": 5} # ⭐ 关键
)
+ elif db_type.lower() == "oracle":
+ address = db_params["address"].lstrip("/")
+ user = quote_plus(db_params["user"])
+ password = quote_plus(db_params["password"])
+ connect_type = (db_params.get("connectType") or "").upper()
+ service_or_sid = quote_plus(db_params.get("database", ""))
+ if connect_type == "ORACLE_SID":
+ conn_str = f"oracle+oracledb://{user}:{password}@{address}/?sid={service_or_sid}"
+ else:
+ conn_str = f"oracle+oracledb://{user}:{password}@{address}/?service_name={service_or_sid}"
+ engine = create_async_engine(
+ conn_str,
+ pool_pre_ping=True,
+ connect_args={"transport_connect_timeout": 5}
+ )
else:
raise ValueError("不支持的数据库类型")
@@ -501,6 +519,14 @@ class MetaSecurityService:
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = '{table}'
"""
+ elif db_type.lower() == "oracle":
+ query = f"""
+ SELECT COLUMN_NAME AS "column_name"
+ FROM ALL_TAB_COLUMNS
+ WHERE OWNER = UPPER('{schema}')
+ AND TABLE_NAME = UPPER('{table}')
+ ORDER BY COLUMN_ID
+ """
else:
raise ValueError(f"暂不支持数据库类型: {db_type}")
diff --git a/vue-fastapi-backend/requirements.txt b/vue-fastapi-backend/requirements.txt
index 5d642c8..3d370ae 100644
--- a/vue-fastapi-backend/requirements.txt
+++ b/vue-fastapi-backend/requirements.txt
@@ -34,6 +34,7 @@ mdurl==0.1.2
minio==7.2.14
numpy==2.2.1
openpyxl==3.1.5
+oracledb==2.2.1
orjson==3.10.12
packaging==25.0
pandas==2.2.2
@@ -85,4 +86,4 @@ uvloop==0.21.0
watchfiles==1.0.3
wcwidth==0.2.13
websockets==14.1
-zope.interface==7.2
\ No newline at end of file
+zope.interface==7.2
diff --git a/vue-fastapi-frontend/src/api/meta/metaInfo.js b/vue-fastapi-frontend/src/api/meta/metaInfo.js
index bcdc5e1..8b82e4d 100644
--- a/vue-fastapi-frontend/src/api/meta/metaInfo.js
+++ b/vue-fastapi-frontend/src/api/meta/metaInfo.js
@@ -1,4 +1,5 @@
import request from '@/utils/request'
+import cache from '@/plugins/cache'
// 查询参数列表
export function getDataSourceList(query) {
@@ -100,7 +101,17 @@ export function getProcData(param){
params: param
})
}
-
+export function getschemaById(id) {
+ const query = {
+ userName: cache.local.get("username"),
+ password: cache.local.get("password")
+ }
+ return request({
+ url: '/ds-api/dolphinscheduler/datasources/schemas?datasource='+id,
+ method: 'get',
+ headers: {dashUserName:query.userName,dashPassword:query.password}
+ })
+}
diff --git a/vue-fastapi-frontend/src/views/meta/metatask/index.vue b/vue-fastapi-frontend/src/views/meta/metatask/index.vue
index 7d417d8..61b2f3f 100644
--- a/vue-fastapi-frontend/src/views/meta/metatask/index.vue
+++ b/vue-fastapi-frontend/src/views/meta/metatask/index.vue
@@ -500,13 +500,22 @@
-
+ >
+
+
@@ -568,6 +577,7 @@