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

feat(web3): 字段配置 + 任务字段表加 ⤒ 置顶 + 重试提示跟随滚动

字段配置(FieldConfigDrawer)与任务编辑(TaskModal 默认展示列):
- ↑↓ 按钮组前再加一个「⤒ 置顶」按钮,splice(idx, 1) + unshift
  把对象字段直接搬到列表最前(非交换),首行禁用
- FieldConfigDrawer 三个按钮右对齐:把 .field-comment-icon 的
  margin-left: auto 移除,让 .ord-group 独占推右责任,ⓘ icon 紧跟其后

ExplainIssueDialog LLM 弹框:
- LLM 未按 JSON 输出时的重试说明(原独立 .note-block 灰底框)
  嵌进违规原因卡片底部,跟 reason-text 一起被父容器滚动
  - 虚线分隔 + 小字号 + 灰字,跟违规原因区分但不抢眼
parent cfc4c803
...@@ -99,15 +99,17 @@ ...@@ -99,15 +99,17 @@
<span class="verdict-detail">{{ activeTab.result.consistency_detail || '(无补充说明)' }}</span> <span class="verdict-detail">{{ activeTab.result.consistency_detail || '(无补充说明)' }}</span>
</div> </div>
<!-- 自然语言违规原因 --> <!-- 自然语言违规原因 + 重试说明(同一卡片内,跟着违规原因一起滚) -->
<div class="pane-section"> <div class="pane-section">
<div class="pane-title">违规原因</div> <div class="pane-title">违规原因</div>
<div class="reason-block">{{ activeTab.result.violation_reason || '(LLM 未给出原因)' }}</div> <div class="reason-block">
</div> <div class="reason-text">{{ activeTab.result.violation_reason || '(LLM 未给出原因)' }}</div>
<!-- 2026-08-24:LLM 未按 JSON 输出时的原始回显 / 重试说明,
<!-- LLM 未按 JSON 输出时的原始回显 / 重试说明 --> 紧跟在违规原因文字下方,作为同一卡片的尾巴,跟着滚动条一起滚 -->
<div v-if="activeTab.result.note" class="note-block"> <div v-if="activeTab.result.note" class="reason-note">
ℹ {{ activeTab.result.note }} ℹ {{ activeTab.result.note }}
</div>
</div>
</div> </div>
</template> </template>
...@@ -561,7 +563,7 @@ function onRetry() { ...@@ -561,7 +563,7 @@ function onRetry() {
color: #909399; color: #909399;
} }
/* 自然语言违规原因 */ /* 自然语言违规原因 + 重试说明(同一卡片,跟滚动条一起滚) */
.reason-block { .reason-block {
padding: 10px 12px; padding: 10px 12px;
background: #ecf5ff; background: #ecf5ff;
...@@ -570,19 +572,22 @@ function onRetry() { ...@@ -570,19 +572,22 @@ function onRetry() {
font-size: 13px; font-size: 13px;
line-height: 1.7; line-height: 1.7;
color: #303133; color: #303133;
}
.reason-text {
white-space: pre-wrap; white-space: pre-wrap;
word-break: break-word; word-break: break-word;
} }
/* 2026-08-24:重试说明嵌在违规原因框底部 —— 紧贴 reason-text,
/* LLM 未按 JSON 输出的回退提示 */ 跟着 reason-block 一起被父容器 overflow 滚动,不再单独成框 */
.note-block { .reason-note {
margin-top: 4px; margin-top: 8px;
padding: 8px 10px; padding-top: 8px;
background: #f4f4f5; border-top: 1px dashed #d9ecff;
border-radius: 4px;
font-size: 12px; font-size: 12px;
color: #606266; color: #909399;
line-height: 1.5; line-height: 1.5;
white-space: pre-wrap;
word-break: break-word;
} }
/* footer 跟其他 modal 对齐 */ /* footer 跟其他 modal 对齐 */
......
...@@ -28,8 +28,14 @@ ...@@ -28,8 +28,14 @@
> >
<span class="rule-mark">⚠ {{ f.rules }}规则</span> <span class="rule-mark">⚠ {{ f.rules }}规则</span>
</el-tooltip> </el-tooltip>
<!-- 2026-08-24:排序 ↑↓ —— 在 ⓘ icon 左边;首行禁用上移,末行禁用下移 --> <!-- 2026-08-24:排序 ↑↓ + 置顶 —— 在 ⓘ icon 左边;首行禁用上移+置顶,末行禁用下移 -->
<span class="ord-group"> <span class="ord-group">
<button
class="ord-btn"
:disabled="idx === 0"
title="置顶"
@click.prevent="moveItemToTop(idx)"
>⤒</button>
<button <button
class="ord-btn" class="ord-btn"
:disabled="idx === 0" :disabled="idx === 0"
...@@ -113,6 +119,14 @@ function moveItem(idx, dir) { ...@@ -113,6 +119,14 @@ function moveItem(idx, dir) {
arr[target] = tmp arr[target] = tmp
} }
// 2026-08-24:置顶 —— splice 出来再 unshift 到最前(不是交换,是「把这个字段搬到顶」)
function moveItemToTop(idx) {
if (idx <= 0 || idx >= localItems.value.length) return
const arr = localItems.value
const [item] = arr.splice(idx, 1)
arr.unshift(item)
}
function onSave() { function onSave() {
// 按用户调整后的顺序 + 仅勾选字段,emit 给父组件 // 按用户调整后的顺序 + 仅勾选字段,emit 给父组件
const list = localItems.value const list = localItems.value
......
...@@ -208,7 +208,14 @@ ...@@ -208,7 +208,14 @@
</td> </td>
<td> <td>
<div class="show-default-cell"> <div class="show-default-cell">
<!-- 2026-08-24:「默认展示」checkbox 左边也加 ↑↓,用户明确要求两处都能调 --> <!-- 2026-08-24:「默认展示」checkbox 左边也加 ↑↓,用户明确要求两处都能调;
↑ 左边再加一个置顶(⤒),仅把对象字段搬到列表最前,不交换 -->
<button
class="ord-btn"
:disabled="idx === 0"
title="置顶"
@click="moveFieldToTop(idx)"
>⤒</button>
<button <button
class="ord-btn" class="ord-btn"
:disabled="idx === 0" :disabled="idx === 0"
...@@ -729,6 +736,13 @@ function moveField(idx, dir) { ...@@ -729,6 +736,13 @@ function moveField(idx, dir) {
arr[target] = tmp arr[target] = tmp
} }
// 2026-08-24:置顶 —— 把这个字段搬到 fieldList 最前(splice 出来再 unshift),不交换
function moveFieldToTop(idx) {
if (idx <= 0 || idx >= fieldList.value.length) return
const [item] = fieldList.value.splice(idx, 1)
fieldList.value.unshift(item)
}
// 规则保存回写:RuleModal.emit('save', {fieldKey, rules}) // 规则保存回写:RuleModal.emit('save', {fieldKey, rules})
// 把 rules 写回对应字段的 field.rules,让「规则设置 N」徽章实时刷新 // 把 rules 写回对应字段的 field.rules,让「规则设置 N」徽章实时刷新
function onRuleSave({ fieldKey, rules }) { function onRuleSave({ fieldKey, rules }) {
......
...@@ -308,9 +308,8 @@ table.dq-table tbody tr:last-child td { border-bottom: none; } ...@@ -308,9 +308,8 @@ table.dq-table tbody tr:last-child td { border-bottom: none; }
.field-check-item:hover { background: #f5f7fa; } .field-check-item:hover { background: #f5f7fa; }
.field-check-item .cn { color: #1f2937; } .field-check-item .cn { color: #1f2937; }
.field-check-item .en { color: #909399; font-size: 12px; margin-left: 4px; } .field-check-item .en { color: #909399; font-size: 12px; margin-left: 4px; }
/* 字段注释 icon:推右、淡灰、hover 变蓝,提示可 hover 出 tooltip */ /* 字段注释 icon:紧跟 ↑↓ 按钮组(按钮组已 margin-left: auto 推右),淡灰、hover 变蓝 */
.field-comment-icon { .field-comment-icon {
margin-left: auto;
color: #c0c4cc; color: #c0c4cc;
font-size: 14px; font-size: 14px;
cursor: help; cursor: help;
......
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