Revert "fix(evaluation): 修复选择全部评查点类型时的筛选查询"
This reverts commit 948e652201.
This commit is contained in:
@@ -320,16 +320,15 @@ export default function RulesIndex() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 构建查询参数
|
// 构建查询参数
|
||||||
// 🔑 当选择"全部"或未选择评查点类型时,不传递 ruleType 参数(后端会返回所有类型)
|
// 🔑 当选择"全部"或未选择评查点类型时,使用下拉框中所有评查点类型的 id 组合
|
||||||
let finalRuleType: string | undefined = undefined;
|
let finalRuleType: string | undefined = undefined;
|
||||||
if (ruleTypeParam && ruleTypeParam !== 'all') {
|
if (ruleTypeParam && ruleTypeParam !== 'all') {
|
||||||
// 选择了具体的评查点类型
|
// 选择了具体的评查点类型
|
||||||
finalRuleType = ruleTypeParam;
|
finalRuleType = ruleTypeParam;
|
||||||
console.log("📋 [fetchData] 选择特定类型:", finalRuleType);
|
} else if (loadedRuleTypes && loadedRuleTypes.length > 0) {
|
||||||
} else {
|
// 选择"全部"或未选择,使用刚加载的评查点类型的 id
|
||||||
// 选择"全部"或未选择,不传递参数,让后端返回所有有权限的评查点
|
finalRuleType = loadedRuleTypes.map(type => type.id).join(',');
|
||||||
finalRuleType = undefined;
|
console.log("📋 [fetchData] 选择全部类型,使用 loadedRuleTypes 的 id 组合:", finalRuleType);
|
||||||
console.log("📋 [fetchData] 选择全部类型,不传递 ruleType 参数");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const queryParams = {
|
const queryParams = {
|
||||||
@@ -530,14 +529,13 @@ export default function RulesIndex() {
|
|||||||
type: "warning",
|
type: "warning",
|
||||||
confirmText: "删除",
|
confirmText: "删除",
|
||||||
cancelText: "取消",
|
cancelText: "取消",
|
||||||
confirmDelay: 4,
|
|
||||||
onConfirm: () => {
|
onConfirm: () => {
|
||||||
// 设置删除状态为true
|
// 设置删除状态为true
|
||||||
setIsDeleting(true);
|
setIsDeleting(true);
|
||||||
const form = new FormData();
|
const form = new FormData();
|
||||||
form.append("_action", "delete");
|
form.append("_action", "delete");
|
||||||
form.append("ruleId", rule.id);
|
form.append("ruleId", rule.id);
|
||||||
|
|
||||||
fetcher.submit(form, { method: "post" });
|
fetcher.submit(form, { method: "post" });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -607,7 +605,6 @@ export default function RulesIndex() {
|
|||||||
type: "warning",
|
type: "warning",
|
||||||
confirmText: "删除",
|
confirmText: "删除",
|
||||||
cancelText: "取消",
|
cancelText: "取消",
|
||||||
confirmDelay: 4,
|
|
||||||
onConfirm: async () => {
|
onConfirm: async () => {
|
||||||
try {
|
try {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user