feat(SQL 题): 增删改题除了第 1 组,其余测试数据可以一行都不改——用来抓学生多改(WHERE 写漏、写宽)
Deploy / deploy (push) Canceled after 0s

原来每组数据都必须有被标准答案改到的行,所以「这组里没有研发部,看学生会不会把别的部门也改了」
这种测试数据建不了。现在只有第 1 组(题面上给学生看的那组)还要求改到行;其余组一行都没改时
出题页写「一行都没改」、预览写「执行后所有表都没有变化」。删掉第 1 组、别的组顶上来时自动按
新位置重查。判题本来就不管这一条,不受影响。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-10-09 19:17:42 +08:00
1 parent 2cb39fd96b
commit 033a245abb
9 files changed
+54 -9

No files matched your search

@@ -33,6 +33,11 @@ const changedTables = computed(() => {
}))
})
/** 增删改题里不是题面那组的测试数据可以一行都不改(看学生会不会多改),出题页预览会碰到 */
const noChange = computed(
() => "changed_tables" in props.display.expected && !props.display.expected.changed_tables.length,
)
const anyChanged = computed(() =>
changedTables.value.some(
({ changes }) => changes && (changes.cells.size > 0 || changes.newRows.size > 0),
@@ -83,6 +88,7 @@ const anyChanged = computed(() =>
</p>
</template>
</div>
<p v-if="noChange" class="sqlNote">执行后所有表都没有变化</p>
<p v-if="anyChanged" class="sqlNote legend">
<span class="swatch" aria-hidden="true"></span>执行后变了的格子
</p>