@sunny-base-web/effects 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -32,6 +32,7 @@ import { InternalAxiosRequestConfig } from 'axios';
32
32
  import { ModalProps } from '../../../../../@ui/src/feedback/modal/types';
33
33
  import { nextTick } from 'vue';
34
34
  import { OnCleanup } from '@vue/reactivity';
35
+ import { PermissionFieldMapping } from '../../../@ui/src/index.ts';
35
36
  import { PiniaCustomStateProperties } from 'pinia';
36
37
  import { PropType } from 'vue';
37
38
  import { PublicProps } from 'vue';
@@ -39,12 +40,13 @@ import { Ref } from 'vue';
39
40
  import { RendererElement } from 'vue';
40
41
  import { RendererNode } from 'vue';
41
42
  import { SelectFieldMapping } from '../../../@ui/src/index.ts';
42
- import { SelectOption } from '../../../@ui/src/index.ts';
43
+ import { SelectOption as SelectOption_2 } from '../../../@ui/src/index.ts';
43
44
  import { SelectOptionsAdapter } from '../../../@ui/src/index.ts';
44
45
  import { ShallowUnwrapRef } from 'vue';
45
46
  import { Slot } from 'vue';
46
47
  import { Store } from 'pinia';
47
48
  import { VNode } from 'vue';
49
+ import { VNodeChild } from 'vue';
48
50
  import { VNodeProps } from 'vue';
49
51
  import { VxeGridApi } from '../../../@ui/src/data/query-grid/api';
50
52
  import { VxeGridProps } from '../../../../../@ui/src/index.ts';
@@ -52,11 +54,74 @@ import { VxeGridPropTypes } from '@sunny-base-web/ui';
52
54
  import { WatchOptions } from 'vue';
53
55
  import { WatchStopHandle } from 'vue';
54
56
 
57
+ declare const __VLS_component: DefineComponent<AccessControlProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
58
+ change: (visible: boolean) => any;
59
+ }, string, PublicProps, Readonly<AccessControlProps> & Readonly<{
60
+ onChange?: ((visible: boolean) => any) | undefined;
61
+ }>, {
62
+ type: "code" | "role";
63
+ codes: string[];
64
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
65
+
55
66
  declare type __VLS_Props = {
56
67
  type?: 'nprogress' | 'spinner' | 'loading' | 'none';
57
68
  minLoadingTime?: number;
58
69
  };
59
70
 
71
+ declare function __VLS_template(): {
72
+ attrs: Partial<{}>;
73
+ slots: Readonly<AccessControlSlots> & AccessControlSlots;
74
+ refs: {};
75
+ rootEl: any;
76
+ };
77
+
78
+ declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
79
+
80
+ declare type __VLS_WithTemplateSlots<T, S> = T & {
81
+ new (): {
82
+ $slots: S;
83
+ };
84
+ };
85
+
86
+ export declare const AccessControl: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
87
+
88
+ export declare interface AccessControlEmits {
89
+ /**
90
+ * 权限状态变化时触发
91
+ */
92
+ change: [visible: boolean];
93
+ }
94
+
95
+ export declare interface AccessControlProps {
96
+ /**
97
+ * 权限码数组(工号或角色,取决于 type)
98
+ * @default []
99
+ */
100
+ codes?: string[];
101
+ /**
102
+ * 判断类型
103
+ * - code: 按工号判断
104
+ * - role: 按角色判断
105
+ * @default 'code'
106
+ */
107
+ type?: 'code' | 'role';
108
+ /**
109
+ * 自定义权限判断函数(同步,返回 true 表示有权限)
110
+ */
111
+ authorize?: () => boolean | Promise<boolean>;
112
+ }
113
+
114
+ export declare interface AccessControlSlots {
115
+ /**
116
+ * 有权限时显示的内容
117
+ */
118
+ default?: () => VNodeChild;
119
+ /**
120
+ * 无权限时显示的内容
121
+ */
122
+ fallback?: () => VNodeChild;
123
+ }
124
+
60
125
  /**
61
126
  * 添加收藏菜单
62
127
  */
@@ -77,6 +142,56 @@ export declare interface AddFavoriteParams {
77
142
  */
78
143
  export declare const addFormSchema: FormSchema[];
79
144
 
145
+ export declare const AssSendoaAdd: DefineComponent< {}, {
146
+ addInit: () => Promise<void>;
147
+ editInit: (record: any) => Promise<void>;
148
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
149
+ success: () => any;
150
+ }, string, PublicProps, Readonly<{}> & Readonly<{
151
+ onSuccess?: (() => any) | undefined;
152
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
153
+
154
+ declare interface AssSendoaConfig {
155
+ t: (key: string) => string;
156
+ formApi?: any;
157
+ }
158
+
159
+ export declare const AssSendoaQuery: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {
160
+ AssSendoaAddRef: CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
161
+ onSuccess?: (() => any) | undefined;
162
+ }>, {
163
+ addInit: () => Promise<void>;
164
+ editInit: (record: any) => Promise<void>;
165
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
166
+ success: () => any;
167
+ }, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
168
+ P: {};
169
+ B: {};
170
+ D: {};
171
+ C: {};
172
+ M: {};
173
+ Defaults: {};
174
+ }, Readonly<{}> & Readonly<{
175
+ onSuccess?: (() => any) | undefined;
176
+ }>, {
177
+ addInit: () => Promise<void>;
178
+ editInit: (record: any) => Promise<void>;
179
+ }, {}, {}, {}, {}> | null;
180
+ }, HTMLDivElement>;
181
+
182
+ export declare interface AssSendoaVO {
183
+ id: number;
184
+ cModnumb: string;
185
+ cGongsi: string;
186
+ cLcmc: string;
187
+ cOalcid: string;
188
+ cUrl: string;
189
+ nSign: string;
190
+ cCreateuserName: string;
191
+ dCreatetime: string;
192
+ cBeizhu: string;
193
+ }
194
+
80
195
  export declare const authenticateResponseInterceptor: ({ client, doReAuthenticate, doRefreshToken, enableRefreshToken, formatToken, }: {
81
196
  client: RequestClient;
82
197
  doReAuthenticate: () => Promise<void>;
@@ -166,6 +281,12 @@ export declare const businessCodeResponseInterceptor: ({ businessCodes, onBusine
166
281
  onBusinessError: (code: number, message: string) => Promise<void> | void;
167
282
  }) => ResponseInterceptorConfig;
168
283
 
284
+ export declare interface BusinessOpts {
285
+ [key: string]: SelectOption[];
286
+ }
287
+
288
+ export declare const cbTypeOpts: SelectOption[];
289
+
169
290
  /**
170
291
  * 收集 Schema 中的字典声明(工具函数)
171
292
  * Collect dictionary declarations from Schema (utility function)
@@ -181,6 +302,21 @@ export declare const businessCodeResponseInterceptor: ({ businessCodes, onBusine
181
302
  */
182
303
  export declare function collectSchemaDictCodes(schema: FormSchema_3[]): (string | number)[];
183
304
 
305
+ /**
306
+ * 收集 Schema 中的权限编码(工具函数)
307
+ * Collect permission codes from Schema (utility function)
308
+ *
309
+ * @param schema - 表单 Schema
310
+ * @returns 权限编码列表
311
+ *
312
+ * @example
313
+ * ```typescript
314
+ * const codes = collectSchemaPermissionCodes(searchFormSchema);
315
+ * console.log(codes); // ['FACTORY', 'COMPANY']
316
+ * ```
317
+ */
318
+ export declare function collectSchemaPermissionCodes(schema: FormSchema_3[]): (string | number)[];
319
+
184
320
  /**
185
321
  * 创建 @effects 插件实例
186
322
  * 在 Vue 应用入口文件 (main.ts/bootstrap.ts) 中使用 app.use() 安装
@@ -261,6 +397,23 @@ export declare const defaultBusinessSearchAdapter: BusinessSearchAdapter;
261
397
  */
262
398
  export declare const defaultFormConfig: FormCommonConfig;
263
399
 
400
+ /**
401
+ * 权限选项适配器
402
+ * Permission options adapter
403
+ * @description 调用 /core/contact/findUserExresList 接口批量加载权限选项
404
+ * @description Calls /core/contact/findUserExresList API to batch load permission options
405
+ */
406
+ export declare const defaultPermissionOptionsAdapter: {
407
+ /**
408
+ * 批量加载权限选项
409
+ * Batch load permission options
410
+ * @param numbList - 权限编码列表
411
+ * @param fieldMapping - 字段映射配置
412
+ * @returns 选项映射表 { code: options }
413
+ */
414
+ loadOptions: (numbList: (string | number)[], fieldMapping?: PermissionFieldMapping) => Promise<Record<string, SelectOption_2[]>>;
415
+ };
416
+
264
417
  export declare const defaultResponseInterceptor: ({ codeField, dataField, successCode, }: {
265
418
  /** 响应数据中代表访问结果的字段名 */
266
419
  codeField: string;
@@ -443,11 +596,26 @@ declare interface FormItem {
443
596
  dependencies?: any;
444
597
  }
445
598
 
599
+ export declare const getAssSendoaConfig: ({ t }: AssSendoaConfig) => {
600
+ searchFormSchema: FormSchema_2[];
601
+ tableColumns: VxeGridPropTypes.Columns<AssSendoaVO>;
602
+ addEditFormSchema: FormSchema_2[];
603
+ userSfqyOpts: {
604
+ cKeyname: string;
605
+ cKeynumb: string;
606
+ }[];
607
+ };
608
+
446
609
  /**
447
610
  * 获取登录类型
448
611
  */
449
612
  export declare function getEnterStrategy(data?: any): Promise<ResponseResult<LoginStrategyResult>>;
450
613
 
614
+ export declare const getGgcxtcConfig: ({ t }: GgcxtcConfig) => {
615
+ searchFormSchema: FormSchema_2[];
616
+ tableColumns: VxeGridPropTypes.Columns<GgcxtcVO>;
617
+ };
618
+
451
619
  export declare const getJobGroupConfig: ({ t }: JobGroupConfig) => {
452
620
  searchFormSchema: FormSchema_2[];
453
621
  tableColumns: VxeGridPropTypes.Columns<JobGroupVO>;
@@ -520,6 +688,32 @@ export declare const getRoleConfig: ({ t, formApi }: RoleConfig) => {
520
688
  */
521
689
  export declare function getSlideVerificationCode(data: any): Promise<any>;
522
690
 
691
+ declare interface GgcxtcConfig {
692
+ t: (key: string) => string;
693
+ formApi?: any;
694
+ }
695
+
696
+ export declare const GgcxtcQuery: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
697
+
698
+ export declare interface GgcxtcVO {
699
+ id: number;
700
+ cNum: string;
701
+ cTitle: string;
702
+ nCbtype: string;
703
+ cCbclass: string;
704
+ cCondition: string;
705
+ cWidth: string;
706
+ cHeight: string;
707
+ nRows: number;
708
+ cSql: string;
709
+ cTablecols: string;
710
+ cCrenumb: string;
711
+ cCrename: string;
712
+ dDate: string;
713
+ cOrder: string;
714
+ nSfcommon: string;
715
+ }
716
+
523
717
  /**
524
718
  * 全局配置对象,用于在非 Vue 组件环境(如 API 请求)中访问配置
525
719
  */
@@ -1031,6 +1225,10 @@ export declare interface MetaItem {
1031
1225
  value: string;
1032
1226
  }
1033
1227
 
1228
+ export declare const nCbtypeOpts: SelectOption[];
1229
+
1230
+ export declare const nLikematchOpts: SelectOption[];
1231
+
1034
1232
  declare interface OperationLogConfig {
1035
1233
  t: (key: string) => string;
1036
1234
  }
@@ -1073,6 +1271,129 @@ declare interface Option_2 {
1073
1271
  value: string;
1074
1272
  }
1075
1273
 
1274
+ export declare const OtherPermissionsAdd: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1275
+ success: () => any;
1276
+ "update:visible": (value: boolean) => any;
1277
+ }, string, PublicProps, Readonly<Props> & Readonly<{
1278
+ onSuccess?: (() => any) | undefined;
1279
+ "onUpdate:visible"?: ((value: boolean) => any) | undefined;
1280
+ }>, {
1281
+ id: string;
1282
+ visible: boolean;
1283
+ cExresnum: string;
1284
+ parentId: string;
1285
+ parentName: string;
1286
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
1287
+
1288
+ /**
1289
+ * 其他权限表单VO
1290
+ */
1291
+ export declare interface OtherPermissionsFormVO {
1292
+ cExresnum: string;
1293
+ cExresname: string;
1294
+ cOrg: string;
1295
+ nOrder?: number;
1296
+ }
1297
+
1298
+ export declare const OtherPermissionsQuery: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
1299
+
1300
+ /**
1301
+ * 其他权限查询参数
1302
+ */
1303
+ export declare interface OtherPermissionsQueryParams {
1304
+ pageNo: number;
1305
+ pageSize: number;
1306
+ authExres: {
1307
+ cExresnum?: string;
1308
+ cExresname?: string;
1309
+ nParent: number;
1310
+ };
1311
+ }
1312
+
1313
+ export declare const OtherPermissionsUpdate: DefineComponent<Props_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1314
+ success: () => any;
1315
+ "update:visible": (value: boolean) => any;
1316
+ }, string, PublicProps, Readonly<Props_2> & Readonly<{
1317
+ onSuccess?: (() => any) | undefined;
1318
+ "onUpdate:visible"?: ((value: boolean) => any) | undefined;
1319
+ }>, {
1320
+ visible: boolean;
1321
+ row: any;
1322
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
1323
+
1324
+ /**
1325
+ * 其他权限VO
1326
+ */
1327
+ export declare interface OtherPermissionsVO {
1328
+ id: string;
1329
+ cExresnum: string;
1330
+ cExresname: string;
1331
+ cOrg: string;
1332
+ dCredate: string;
1333
+ cCreateName: string;
1334
+ nOrder: number;
1335
+ }
1336
+
1337
+ /**
1338
+ * 权限选项缓存管理器
1339
+ * Permission options cache manager
1340
+ * @description 统一管理所有权限选项的加载和缓存,支持请求去重
1341
+ * @description Unified management of all permission option loading and caching with request deduplication
1342
+ */
1343
+ declare class PermissionOptionsManager {
1344
+ /**
1345
+ * 选项缓存
1346
+ * Options cache
1347
+ * @description 缓存已加载的权限选项数据
1348
+ * @description Cache loaded permission option data
1349
+ */
1350
+ private readonly cache;
1351
+ /**
1352
+ * 加载中的 Promise(避免重复请求)
1353
+ * Loading Promises (avoid duplicate requests)
1354
+ * @description 当多个组件同时加载相同权限时,共享同一个 Promise
1355
+ * @description When multiple components load the same permission simultaneously, share the same Promise
1356
+ */
1357
+ private readonly loadingPromises;
1358
+ /**
1359
+ * 批量加载权限选项(带缓存和去重)
1360
+ * Batch load permission options (with cache and deduplication)
1361
+ * @param numbList - 权限编码列表
1362
+ * @param fieldMapping - 字段映射配置
1363
+ * @param forceReload - 是否强制刷新(忽略缓存)
1364
+ * @returns 选项映射表 { code: options }
1365
+ */
1366
+ loadOptions(numbList: (string | number)[], fieldMapping?: PermissionFieldMapping, forceReload?: boolean): Promise<Record<string, SelectOption_2[]>>;
1367
+ /**
1368
+ * 获取单个权限的选项(从缓存)
1369
+ * Get single permission options (from cache)
1370
+ * @param code - 权限编码
1371
+ * @returns 选项数组
1372
+ */
1373
+ getOptions(code: string | number): SelectOption_2[];
1374
+ /**
1375
+ * 清除指定权限的缓存
1376
+ * Clear cache for specified permission
1377
+ * @param code - 权限编码(可选,不传则清除所有)
1378
+ */
1379
+ clearCache(code?: string | number): void;
1380
+ /**
1381
+ * 检查权限是否已缓存
1382
+ * Check if permission is cached
1383
+ * @param code - 权限编码
1384
+ * @returns 是否已缓存
1385
+ */
1386
+ hasCache(code: string | number): boolean;
1387
+ /**
1388
+ * 获取缓存大小
1389
+ * Get cache size
1390
+ * @returns 缓存的权限数量
1391
+ */
1392
+ getCacheSize(): number;
1393
+ }
1394
+
1395
+ export declare const permissionOptionsManager: PermissionOptionsManager;
1396
+
1076
1397
  /**
1077
1398
  * 路由守卫预加载工具
1078
1399
  * Route guard pre-loading utility
@@ -1110,6 +1431,19 @@ export declare function preLoadSelectOptions(dictCodes: (string | number)[], fie
1110
1431
  value?: string;
1111
1432
  }): Promise<void>;
1112
1433
 
1434
+ declare interface Props {
1435
+ visible: boolean;
1436
+ parentId?: string;
1437
+ parentName?: string;
1438
+ cExresnum?: string;
1439
+ id?: string;
1440
+ }
1441
+
1442
+ declare interface Props_2 {
1443
+ visible: boolean;
1444
+ row?: any;
1445
+ }
1446
+
1113
1447
  /**
1114
1448
  * 查询数据字典
1115
1449
  */
@@ -1739,7 +2073,34 @@ export declare interface SchemaOptionsLoaderReturn {
1739
2073
  * 选项映射表
1740
2074
  * Options map
1741
2075
  */
1742
- optionsMap: Ref<Record<string, SelectOption[]>>;
2076
+ optionsMap: Ref<Record<string, SelectOption_2[]>>;
2077
+ /**
2078
+ * 加载状态
2079
+ * Loading state
2080
+ */
2081
+ loading: Ref<boolean>;
2082
+ /**
2083
+ * 手动加载
2084
+ * Manual load
2085
+ */
2086
+ load: () => Promise<void>;
2087
+ }
2088
+
2089
+ /**
2090
+ * Schema 选项加载器返回值
2091
+ * Schema options loader return value
2092
+ */
2093
+ export declare interface SchemaPermissionLoaderReturn {
2094
+ /**
2095
+ * 增强后的 Schema(自动注入 options)
2096
+ * Enhanced Schema (with auto-injected options)
2097
+ */
2098
+ enhancedSchema: ComputedRef<FormSchema_3[]>;
2099
+ /**
2100
+ * 选项映射表
2101
+ * Options map
2102
+ */
2103
+ optionsMap: Ref<Record<string, SelectOption_2[]>>;
1743
2104
  /**
1744
2105
  * 加载状态
1745
2106
  * Loading state
@@ -1769,6 +2130,17 @@ export declare const searchPlanApi: {
1769
2130
  findDefSearchPlan: (data: any) => Promise<any>;
1770
2131
  };
1771
2132
 
2133
+ export declare interface SelectOption {
2134
+ label: string;
2135
+ value: string;
2136
+ cArea?: string[];
2137
+ cMeta?: Record<string, any>;
2138
+ defaultMeta?: string;
2139
+ }
2140
+
2141
+ export declare interface SelectOptions extends Record<string, SelectOption[]> {
2142
+ }
2143
+
1772
2144
  /**
1773
2145
  * Select 选项缓存管理器
1774
2146
  * Select options cache manager
@@ -1798,14 +2170,14 @@ declare class SelectOptionsManager {
1798
2170
  * @param forceReload - 是否强制刷新(忽略缓存)
1799
2171
  * @returns 选项映射表 { dictCode: options }
1800
2172
  */
1801
- loadOptions(numbList: (string | number)[], fieldMapping?: SelectFieldMapping, forceReload?: boolean): Promise<Record<string, SelectOption[]>>;
2173
+ loadOptions(numbList: (string | number)[], fieldMapping?: SelectFieldMapping, forceReload?: boolean): Promise<Record<string, SelectOption_2[]>>;
1802
2174
  /**
1803
2175
  * 获取单个字典的选项(从缓存)
1804
2176
  * Get single dictionary options (from cache)
1805
2177
  * @param dictCode - 字典编码
1806
2178
  * @returns 选项数组
1807
2179
  */
1808
- getOptions(dictCode: string | number): SelectOption[];
2180
+ getOptions(dictCode: string | number): SelectOption_2[];
1809
2181
  /**
1810
2182
  * 清除指定字典的缓存
1811
2183
  * Clear cache for specified dictionary
@@ -1900,6 +2272,8 @@ export declare interface SetupBusinessFormOptions {
1900
2272
  defineRules?: Record<string, any>;
1901
2273
  }
1902
2274
 
2275
+ export declare const sfggOpts: SelectOption[];
2276
+
1903
2277
  /**
1904
2278
  * SSE模块
1905
2279
  */
@@ -1935,6 +2309,8 @@ export declare interface SysSettingItem {
1935
2309
  hintMsg?: string;
1936
2310
  }
1937
2311
 
2312
+ export declare const systemOpts: Record<string, SelectOption[]>;
2313
+
1938
2314
  export declare const SystemSetting: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
1939
2315
 
1940
2316
  /**
@@ -1961,7 +2337,7 @@ export declare interface SystemSettingForm {
1961
2337
  /**
1962
2338
  * 表格列配置
1963
2339
  */
1964
- export declare const tableColumns: VxeGridProps<DataDictionaryVO>['columns'];
2340
+ export declare const tableColumns: VxeGridProps<OtherPermissionsVO>['columns'];
1965
2341
 
1966
2342
  /**
1967
2343
  * Composition API Hook: 获取全局配置
@@ -2134,6 +2510,132 @@ export declare function useList<T>(options: {
2134
2510
  fetchResourceConfig: () => Promise<void>;
2135
2511
  };
2136
2512
 
2513
+ /**
2514
+ * 权限选项加载 Hook
2515
+ * Permission options loading Hook
2516
+ * @description 批量加载多个权限选项,自动缓存和去重
2517
+ * @description Batch load multiple permission options with automatic caching and deduplication
2518
+ *
2519
+ * @param params - Hook 参数
2520
+ * @returns 选项数据和加载方法
2521
+ *
2522
+ * @example
2523
+ * ```ts
2524
+ * // 基础用法
2525
+ * const { optionsMap } = usePermissionOptions({
2526
+ * numbList: ['FACTORY', 'COMPANY']
2527
+ * });
2528
+ *
2529
+ * // 在模板中使用
2530
+ * <Select :options="optionsMap.value['FACTORY']" />
2531
+ *
2532
+ * // 自定义字段映射
2533
+ * const { optionsMap } = usePermissionOptions({
2534
+ * numbList: ['FACTORY'],
2535
+ * fieldMapping: {
2536
+ * label: ['cExresnum', 'cExresname'], // 数组格式自动拼接
2537
+ * value: 'cExresnum'
2538
+ * }
2539
+ * });
2540
+ *
2541
+ * // 手动加载
2542
+ * const { optionsMap, load } = usePermissionOptions({
2543
+ * numbList: ['FACTORY'],
2544
+ * immediate: false
2545
+ * });
2546
+ *
2547
+ * // 在需要时调用
2548
+ * await load();
2549
+ * ```
2550
+ */
2551
+ export declare function usePermissionOptions(params: UsePermissionOptionsParams): UsePermissionOptionsReturn;
2552
+
2553
+ /**
2554
+ * Hook 参数
2555
+ * Hook parameters
2556
+ */
2557
+ export declare interface UsePermissionOptionsParams {
2558
+ /**
2559
+ * 权限编码列表
2560
+ * Permission code list
2561
+ * @description 需要批量加载的权限编码
2562
+ * @description Permission codes to be batch loaded
2563
+ */
2564
+ numbList: (string | number)[];
2565
+ /**
2566
+ * 字段映射配置
2567
+ * Field mapping configuration
2568
+ * @description 自定义 label 和 value 对应的后端字段名
2569
+ * @description Customize backend field names for label and value
2570
+ */
2571
+ fieldMapping?: PermissionFieldMapping;
2572
+ /**
2573
+ * 是否立即加载
2574
+ * Whether to load immediately
2575
+ * @default true
2576
+ * @description 设置为 false 时,需要手动调用 load() 方法
2577
+ * @description When set to false, need to manually call load() method
2578
+ */
2579
+ immediate?: boolean;
2580
+ /**
2581
+ * 是否强制刷新
2582
+ * Whether to force reload
2583
+ * @default false
2584
+ * @description 设置为 true 时,忽略缓存重新加载
2585
+ * @description When set to true, ignore cache and reload
2586
+ */
2587
+ forceReload?: boolean;
2588
+ }
2589
+
2590
+ /**
2591
+ * Hook 返回值
2592
+ * Hook return value
2593
+ */
2594
+ export declare interface UsePermissionOptionsReturn {
2595
+ /**
2596
+ * 选项映射表
2597
+ * Options map
2598
+ * @description 响应式的选项数据,按权限编码分组
2599
+ * @description Reactive option data, grouped by permission code
2600
+ * @example
2601
+ * ```ts
2602
+ * optionsMap.value['FACTORY'] // 获取 FACTORY 权限的选项
2603
+ * ```
2604
+ */
2605
+ optionsMap: Ref<Record<string, SelectOption_2[]>>;
2606
+ /**
2607
+ * 加载状态
2608
+ * Loading state
2609
+ */
2610
+ loading: Ref<boolean>;
2611
+ /**
2612
+ * 手动加载
2613
+ * Manual load
2614
+ * @description 手动触发加载选项
2615
+ * @description Manually trigger loading options
2616
+ */
2617
+ load: () => Promise<void>;
2618
+ /**
2619
+ * 获取单个权限的选项
2620
+ * Get single permission options
2621
+ * @param code - 权限编码
2622
+ * @returns 选项数组
2623
+ */
2624
+ getOptions: (code: string | number) => SelectOption_2[];
2625
+ /**
2626
+ * 刷新指定权限的选项
2627
+ * Reload specific permission options
2628
+ * @param code - 权限编码
2629
+ */
2630
+ reload: (code: string | number) => Promise<void>;
2631
+ /**
2632
+ * 清除指定权限的缓存
2633
+ * Clear cache for specific permission
2634
+ * @param code - 权限编码(可选)
2635
+ */
2636
+ clearCache: (code?: string | number) => void;
2637
+ }
2638
+
2137
2639
  export declare const UserQuery: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {
2138
2640
  UserAddRef: CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
2139
2641
  onSuccess?: (() => any) | undefined;
@@ -2232,6 +2734,8 @@ openInit: (record: any) => Promise<void>;
2232
2734
  }, {}, {}, {}, {}> | null;
2233
2735
  }, HTMLDivElement>;
2234
2736
 
2737
+ export declare const userSfqyOpts: SelectOption[];
2738
+
2235
2739
  /**
2236
2740
  * 处理声明式 Schema 的选项加载
2237
2741
  * Process declarative Schema options loading
@@ -2266,6 +2770,40 @@ openInit: (record: any) => Promise<void>;
2266
2770
  */
2267
2771
  export declare function useSchemaOptionsLoader(schema: FormSchema_3[] | Ref<FormSchema_3[]>, immediate?: boolean): SchemaOptionsLoaderReturn;
2268
2772
 
2773
+ /**
2774
+ * 处理声明式 Schema 的权限选项加载
2775
+ * Process declarative Schema permission options loading
2776
+ *
2777
+ * @param schema - 表单 Schema
2778
+ * @param immediate - 是否立即加载
2779
+ * @returns 增强后的 Schema 和加载方法
2780
+ *
2781
+ * @example
2782
+ * ```typescript
2783
+ * // 在 config.ts 中声明式配置
2784
+ * export const searchFormSchema: FormSchema[] = [
2785
+ * {
2786
+ * fieldName: 'factory',
2787
+ * component: 'Select',
2788
+ * permissionOptions: {
2789
+ * code: 'FACTORY',
2790
+ * fieldMapping: { label: 'cName', value: 'cXuhao' }
2791
+ * }
2792
+ * }
2793
+ * ]
2794
+ *
2795
+ * // 在组件中使用
2796
+ * const { enhancedSchema } = useSchemaPermissionLoader(searchFormSchema);
2797
+ *
2798
+ * // 传递给 useList
2799
+ * useList({
2800
+ * searchFormSchema: enhancedSchema.value,
2801
+ * ...
2802
+ * })
2803
+ * ```
2804
+ */
2805
+ export declare function useSchemaPermissionLoader(schema: FormSchema_3[] | Ref<FormSchema_3[]>, immediate?: boolean): SchemaPermissionLoaderReturn;
2806
+
2269
2807
  /**
2270
2808
  * 查询方案 API 实现
2271
2809
  * 所有模块通用的查询方案 API 配置
@@ -2373,7 +2911,7 @@ export declare interface UseSelectOptionsReturn {
2373
2911
  * optionsMap.value['SFQY'] // 获取 SFQY 字典的选项
2374
2912
  * ```
2375
2913
  */
2376
- optionsMap: Ref<Record<string, SelectOption[]>>;
2914
+ optionsMap: Ref<Record<string, SelectOption_2[]>>;
2377
2915
  /**
2378
2916
  * 加载状态
2379
2917
  * Loading state
@@ -2392,7 +2930,7 @@ export declare interface UseSelectOptionsReturn {
2392
2930
  * @param dictCode - 字典编码
2393
2931
  * @returns 选项数组
2394
2932
  */
2395
- getOptions: (dictCode: string | number) => SelectOption[];
2933
+ getOptions: (dictCode: string | number) => SelectOption_2[];
2396
2934
  /**
2397
2935
  * 刷新指定字典的选项
2398
2936
  * Reload specific dictionary options