Commit e1a00dc0 authored by Data Governance Dev's avatar Data Governance Dev

feat(web2): DbConnectionPopover 多连接列表 + IdCardTool 适配

- DbConnectionPopover.vue
  - 触发器显示:「display · host:port」
  - 弹框按 db_type 分组(MySQL / 达梦 / Oracle),每组下显示该 type 的所有连接
  - 每行:连接名 + host:port + 测试/切换按钮
  - 切换按钮独立判断 isCurrent(db_type, id),不再按 db_type 切换
  - 弹框宽度 280 → 320(容纳 host:port 信息)
- IdCardTool.vue
  - state.currentType 引用全部替换为 currentConnection?.host
  - db_type 从 conn.db_type 取(store 已注入),不再用 state.currentType
parent 934865dd
This diff is collapsed.
......@@ -70,14 +70,14 @@
type="primary"
:icon="Search"
:loading="querying"
:disabled="!state.currentType"
:disabled="!currentConnection?.host"
@click="onQuery"
>
查询
</el-button>
<el-button text @click="onReset">重置</el-button>
</el-form-item>
<el-form-item v-if="!state.currentType">
<el-form-item v-if="!currentConnection?.host">
<span class="idcard-page__hint">
<el-icon><Warning /></el-icon>
请先在右上角选择数据库连接
......@@ -368,7 +368,7 @@ async function onQuery() {
return
}
const conn = currentConnection.value
if (!conn || !state.currentType) {
if (!conn || !conn.host) {
ElMessage.warning('请先在右上角选择数据库连接')
return
}
......@@ -392,7 +392,8 @@ async function onQuery() {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
db_type: state.currentType,
// conn 里已含 db_type(store 从预设 / 后端注入),直接用
db_type: conn.db_type,
host: conn.host,
port: conn.port,
user: conn.user,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment