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

fix(web3): 编辑任务弹窗补回表注释显示

编辑弹窗打开时 tableOptions = [](用户没点过测试连接),
el-select 渲染 label 时查不到匹配 entry,退化成只显示纯表名(GR_GRXX)。

form.tableComment 本身已经从 props.task.table_comment 回填了,
只是没注入到 tableOptions 里。修法:从 props.task 构造一条合成 entry
注入 tableOptions,点「测试连接」后 loadTables 会用真实列表覆盖,
不影响后续流程。
parent 8bf84b17
...@@ -667,6 +667,15 @@ watch(() => props.open, async (v) => { ...@@ -667,6 +667,15 @@ watch(() => props.open, async (v) => {
form.table = props.task.source_table || '' form.table = props.task.source_table || ''
// 表注释:从 task 回填(之前选表时存进去的);loadTables 完会再同步一次(防 schema 改了 list 重新拉后 comment 不一致) // 表注释:从 task 回填(之前选表时存进去的);loadTables 完会再同步一次(防 schema 改了 list 重新拉后 comment 不一致)
form.tableComment = props.task.table_comment || '' form.tableComment = props.task.table_comment || ''
// 2026-08-24:编辑场景注入一条合成 tableOptions —— 让 el-select 在「没点测试连接」
// 也能展示表注释(GR_GRXX(个人个人信息表)),而不是只显示纯表名。
// 真实列表会在用户点「测试连接」后由 loadTables 覆盖。
if (form.table) {
tableOptions.value = [{
table_name: form.table,
table_comment: form.tableComment,
}]
}
// 注:编辑场景不自动拉 schema/表 —— 等用户点「测试连接」再拉 // 注:编辑场景不自动拉 schema/表 —— 等用户点「测试连接」再拉
// 编辑场景:把详情里的 field_list(带 rules)回填到字段表,省得用户重新走一遍 // 编辑场景:把详情里的 field_list(带 rules)回填到字段表,省得用户重新走一遍
// cn/data_type 是「编辑时重新取」的——不回填,留空让用户重新测试连接后从 listColumns 补 // cn/data_type 是「编辑时重新取」的——不回填,留空让用户重新测试连接后从 listColumns 补
......
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