fix: 修正IM策略页面字典选项调用

This commit is contained in:
richjohnrambo
2026-09-07 16:47:09 +08:00
parent 37d708c5a1
commit 7839dce0e6
8 changed files with 24 additions and 22 deletions
@@ -248,7 +248,7 @@ Admin Server 应能调用 IM Server Internal API,概览、消息及登录日
|---|---|
| 严重级别 | P1 |
| 类型 | 前端兼容性 |
| 状态 | 待处理 |
| 状态 | 代码已修复,待重新发布 Admin 前端复测 |
| 关联用例 | `UPG-001`、`SW-002`、`SEC-001`、`COM-004` |
**实际结果**
@@ -264,7 +264,7 @@ Admin Server 应能调用 IM Server Internal API,概览、消息及登录日
**建议**
对照当前 `useDictStore` 实际 API 修正上述三个页面的 `model.ts`,统一使用项目现有字典加载和取值方式,重新构建部署后回归筛选、编辑和字典标签。
已对照当前 `useDictStore` 实际 API,将用户分组、敏感词、安全策略页面统一改为 `dict.getOption()`;额外排查并修复 IM 文件策略同类调用,需过滤选项时使用 `dict.getOptionUnRef()`。源码扫描已无业务页面调用 `dict.getOptions()`,ESLint 和生产构建通过。重新发布 Admin 前端后回归筛选、编辑弹窗和字典标签。
### BLOCK-001 浏览器安全检查阻塞自动化页面测试
@@ -318,11 +318,12 @@ Admin Server 应能调用 IM Server Internal API,概览、消息及登录日
| RUN-026 | PM-001、GM-001 接口复测 | 通过 | 单聊 1528 条、群聊 654 条;分页、关键词和详情查询通过 |
| RUN-027 | ULOGIN 接口复测 | 通过 | 登录历史 77 条;登录方式、事件、脱敏账号及组合筛选通过 |
| RUN-028 | LFAIL-001 接口复测 | 部分通过 | 接口成功返回空列表;仍需准备失败登录数据验证详情及处置按钮 |
| RUN-029 | BUG-006 代码复测 | 通过 | 4 个页面同类字典调用已修复,ESLint 和生产构建通过;待发布后页面复测 |
## 4. 后续复测顺序
1. 回归 BUG-005 对应后台页面,确认概览卡片和四个列表正确显示接口数据。
2. 修复 BUG-006:统一新页面与当前字典 Store API。
2. 发布 BUG-006 前端修复并回归筛选、编辑弹窗和字典标签。
3. 修复 Kafka Pending/Dead 链路,验证命令可进入终态。
4. 补齐 IM Server 安全策略、好友入口、宵禁和敏感词运行时实现。
5. 使用对应角色账号回归租户隔离、按钮权限、筛选、详情、分页和导出。
@@ -340,3 +341,4 @@ Admin Server 应能调用 IM Server Internal API,概览、消息及登录日
| 2026-09-07 | 测试环境部署版本 | BUG-005 | 失败 | 5 类 IM 数据页面和概览统一返回 `resource not found` | Codex |
| 2026-09-07 | 测试环境部署版本 | BUG-006 | 失败 | 用户分组、敏感词、安全策略存在字典 Store API 异常 | Codex |
| 2026-09-07 | IM `35da302` / run 100 | BUG-005 | 通过 | 六类签名查询均为 HTTP 200;分页、筛选和消息详情通过 | Codex |
| 2026-09-07 | Admin 待发布版本 | BUG-006 | 代码通过 | 修复 4 个页面的字典 Store API 调用,生产构建通过 | Codex |
+1 -1
View File
@@ -113,7 +113,7 @@
const dialogWidth = computed(() => adaModalWidth(720));
const purposeOptions = computed(() =>
dict
.getOptions('ImFilePurposeOptions')
.getOptionUnRef('ImFilePurposeOptions')
.filter((item) => item.value !== 'unknown' && item.value !== 'orphan')
);
const purposeLabel = computed(
+6 -6
View File
@@ -284,12 +284,12 @@
submitting = ref(false);
const dialogWidth = computed(() => adaModalWidth(900));
const tenantId = () => Number(searchFormRef.value?.formModel?.tenantId || 0);
const dateOptions = computed(() => dict.getOptions('ImCurfewDateTypeOptions')),
scopeOptions = computed(() => dict.getOptions('ImCurfewScopeOptions')),
statusOptions = computed(() => dict.getOptions('sys_normal_disable')),
actionOptions = computed(() => dict.getOptions('ImSecurityActionOptions')),
friendEntryOptions = computed(() => dict.getOptions('ImFriendEntryOptions')),
riskOptions = computed(() => dict.getOptions('ImRiskLevelOptions'));
const dateOptions = dict.getOption('ImCurfewDateTypeOptions'),
scopeOptions = dict.getOption('ImCurfewScopeOptions'),
statusOptions = dict.getOption('sys_normal_disable'),
actionOptions = dict.getOption('ImSecurityActionOptions'),
friendEntryOptions = dict.getOption('ImFriendEntryOptions'),
riskOptions = dict.getOption('ImRiskLevelOptions');
const ipTypeOptions = [
{ label: '白名单', value: 'whitelist' },
{ label: '黑名单', value: 'blacklist' },
+1 -1
View File
@@ -16,7 +16,7 @@ export const schemas = ref<FormSchema[]>([
component: 'NSelect',
label: '发布状态',
componentProps: {
options: computed(() => dict.getOptions('ImSecurityPublishStatusOptions')),
options: dict.getOption('ImSecurityPublishStatusOptions'),
clearable: true,
},
},
+5 -5
View File
@@ -175,11 +175,11 @@
groupVisible = ref(false),
submitting = ref(false);
const dialogWidth = computed(() => adaModalWidth(680));
const matchOptions = computed(() => dict.getOptions('ImSensitiveMatchTypeOptions')),
actionOptions = computed(() => dict.getOptions('ImSensitiveActionOptions')),
sceneOptions = computed(() => dict.getOptions('ImSensitiveSceneOptions')),
riskOptions = computed(() => dict.getOptions('ImRiskLevelOptions')),
statusOptions = computed(() => dict.getOptions('sys_normal_disable'));
const matchOptions = dict.getOption('ImSensitiveMatchTypeOptions'),
actionOptions = dict.getOption('ImSensitiveActionOptions'),
sceneOptions = dict.getOption('ImSensitiveSceneOptions'),
riskOptions = dict.getOption('ImRiskLevelOptions'),
statusOptions = dict.getOption('sys_normal_disable');
const tenantId = () => Number(searchFormRef.value?.formModel?.tenantId || 0);
const emptyWord = () => ({
id: 0,
+4 -4
View File
@@ -24,7 +24,7 @@ export const schemas = ref<FormSchema[]>([
component: 'NSelect',
label: '匹配类型',
componentProps: {
options: computed(() => dict.getOptions('ImSensitiveMatchTypeOptions')),
options: dict.getOption('ImSensitiveMatchTypeOptions'),
clearable: true,
},
},
@@ -33,7 +33,7 @@ export const schemas = ref<FormSchema[]>([
component: 'NSelect',
label: '命中动作',
componentProps: {
options: computed(() => dict.getOptions('ImSensitiveActionOptions')),
options: dict.getOption('ImSensitiveActionOptions'),
clearable: true,
},
},
@@ -42,7 +42,7 @@ export const schemas = ref<FormSchema[]>([
component: 'NSelect',
label: '风险等级',
componentProps: {
options: computed(() => dict.getOptions('ImRiskLevelOptions')),
options: dict.getOption('ImRiskLevelOptions'),
clearable: true,
},
},
@@ -51,7 +51,7 @@ export const schemas = ref<FormSchema[]>([
component: 'NSelect',
label: '状态',
componentProps: {
options: computed(() => dict.getOptions('sys_normal_disable')),
options: dict.getOption('sys_normal_disable'),
clearable: true,
},
},
+1 -1
View File
@@ -188,7 +188,7 @@
memberUserId = ref<number | null>(null),
activeGroupId = ref(0);
const dialogWidth = computed(() => adaModalWidth(820));
const statusOptions = computed(() => dict.getOptions('sys_normal_disable'));
const statusOptions = dict.getOption('sys_normal_disable');
const emptyForm = () => ({
id: 0,
tenantId: Number(searchFormRef.value?.formModel?.tenantId || 0),
+1 -1
View File
@@ -37,7 +37,7 @@ export const schemas = ref<FormSchema[]>([
component: 'NSelect',
label: '状态',
componentProps: {
options: computed(() => dict.getOptions('sys_normal_disable')),
options: dict.getOption('sys_normal_disable'),
clearable: true,
},
},