@sunny-base-web/effects 0.8.1 → 0.8.3
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/effects.css +1 -1
- package/dist/index.d.ts +554 -7
- package/dist/index.js +9 -9
- package/dist/index.mjs +21172 -23371
- package/package.json +9 -9
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,
|
|
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,
|
|
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):
|
|
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<
|
|
2340
|
+
export declare const tableColumns: VxeGridProps<OtherPermissionsVO>['columns'];
|
|
1965
2341
|
|
|
1966
2342
|
/**
|
|
1967
2343
|
* Composition API Hook: 获取全局配置
|
|
@@ -2019,6 +2395,15 @@ export declare function useFavorite(): {
|
|
|
2019
2395
|
}>;
|
|
2020
2396
|
};
|
|
2021
2397
|
|
|
2398
|
+
export declare function useForm({ schema, objectToValueFields }?: UseFormOptions): readonly [DefineComponent< {}, () => VNode<RendererNode, RendererElement, {
|
|
2399
|
+
[key: string]: any;
|
|
2400
|
+
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, FormApi];
|
|
2401
|
+
|
|
2402
|
+
declare interface UseFormOptions {
|
|
2403
|
+
schema?: any[];
|
|
2404
|
+
objectToValueFields?: string[];
|
|
2405
|
+
}
|
|
2406
|
+
|
|
2022
2407
|
export declare function useGlobalLoading(): UseGlobalLoadingReturn;
|
|
2023
2408
|
|
|
2024
2409
|
/**
|
|
@@ -2134,6 +2519,132 @@ export declare function useList<T>(options: {
|
|
|
2134
2519
|
fetchResourceConfig: () => Promise<void>;
|
|
2135
2520
|
};
|
|
2136
2521
|
|
|
2522
|
+
/**
|
|
2523
|
+
* 权限选项加载 Hook
|
|
2524
|
+
* Permission options loading Hook
|
|
2525
|
+
* @description 批量加载多个权限选项,自动缓存和去重
|
|
2526
|
+
* @description Batch load multiple permission options with automatic caching and deduplication
|
|
2527
|
+
*
|
|
2528
|
+
* @param params - Hook 参数
|
|
2529
|
+
* @returns 选项数据和加载方法
|
|
2530
|
+
*
|
|
2531
|
+
* @example
|
|
2532
|
+
* ```ts
|
|
2533
|
+
* // 基础用法
|
|
2534
|
+
* const { optionsMap } = usePermissionOptions({
|
|
2535
|
+
* numbList: ['FACTORY', 'COMPANY']
|
|
2536
|
+
* });
|
|
2537
|
+
*
|
|
2538
|
+
* // 在模板中使用
|
|
2539
|
+
* <Select :options="optionsMap.value['FACTORY']" />
|
|
2540
|
+
*
|
|
2541
|
+
* // 自定义字段映射
|
|
2542
|
+
* const { optionsMap } = usePermissionOptions({
|
|
2543
|
+
* numbList: ['FACTORY'],
|
|
2544
|
+
* fieldMapping: {
|
|
2545
|
+
* label: ['cExresnum', 'cExresname'], // 数组格式自动拼接
|
|
2546
|
+
* value: 'cExresnum'
|
|
2547
|
+
* }
|
|
2548
|
+
* });
|
|
2549
|
+
*
|
|
2550
|
+
* // 手动加载
|
|
2551
|
+
* const { optionsMap, load } = usePermissionOptions({
|
|
2552
|
+
* numbList: ['FACTORY'],
|
|
2553
|
+
* immediate: false
|
|
2554
|
+
* });
|
|
2555
|
+
*
|
|
2556
|
+
* // 在需要时调用
|
|
2557
|
+
* await load();
|
|
2558
|
+
* ```
|
|
2559
|
+
*/
|
|
2560
|
+
export declare function usePermissionOptions(params: UsePermissionOptionsParams): UsePermissionOptionsReturn;
|
|
2561
|
+
|
|
2562
|
+
/**
|
|
2563
|
+
* Hook 参数
|
|
2564
|
+
* Hook parameters
|
|
2565
|
+
*/
|
|
2566
|
+
export declare interface UsePermissionOptionsParams {
|
|
2567
|
+
/**
|
|
2568
|
+
* 权限编码列表
|
|
2569
|
+
* Permission code list
|
|
2570
|
+
* @description 需要批量加载的权限编码
|
|
2571
|
+
* @description Permission codes to be batch loaded
|
|
2572
|
+
*/
|
|
2573
|
+
numbList: (string | number)[];
|
|
2574
|
+
/**
|
|
2575
|
+
* 字段映射配置
|
|
2576
|
+
* Field mapping configuration
|
|
2577
|
+
* @description 自定义 label 和 value 对应的后端字段名
|
|
2578
|
+
* @description Customize backend field names for label and value
|
|
2579
|
+
*/
|
|
2580
|
+
fieldMapping?: PermissionFieldMapping;
|
|
2581
|
+
/**
|
|
2582
|
+
* 是否立即加载
|
|
2583
|
+
* Whether to load immediately
|
|
2584
|
+
* @default true
|
|
2585
|
+
* @description 设置为 false 时,需要手动调用 load() 方法
|
|
2586
|
+
* @description When set to false, need to manually call load() method
|
|
2587
|
+
*/
|
|
2588
|
+
immediate?: boolean;
|
|
2589
|
+
/**
|
|
2590
|
+
* 是否强制刷新
|
|
2591
|
+
* Whether to force reload
|
|
2592
|
+
* @default false
|
|
2593
|
+
* @description 设置为 true 时,忽略缓存重新加载
|
|
2594
|
+
* @description When set to true, ignore cache and reload
|
|
2595
|
+
*/
|
|
2596
|
+
forceReload?: boolean;
|
|
2597
|
+
}
|
|
2598
|
+
|
|
2599
|
+
/**
|
|
2600
|
+
* Hook 返回值
|
|
2601
|
+
* Hook return value
|
|
2602
|
+
*/
|
|
2603
|
+
export declare interface UsePermissionOptionsReturn {
|
|
2604
|
+
/**
|
|
2605
|
+
* 选项映射表
|
|
2606
|
+
* Options map
|
|
2607
|
+
* @description 响应式的选项数据,按权限编码分组
|
|
2608
|
+
* @description Reactive option data, grouped by permission code
|
|
2609
|
+
* @example
|
|
2610
|
+
* ```ts
|
|
2611
|
+
* optionsMap.value['FACTORY'] // 获取 FACTORY 权限的选项
|
|
2612
|
+
* ```
|
|
2613
|
+
*/
|
|
2614
|
+
optionsMap: Ref<Record<string, SelectOption_2[]>>;
|
|
2615
|
+
/**
|
|
2616
|
+
* 加载状态
|
|
2617
|
+
* Loading state
|
|
2618
|
+
*/
|
|
2619
|
+
loading: Ref<boolean>;
|
|
2620
|
+
/**
|
|
2621
|
+
* 手动加载
|
|
2622
|
+
* Manual load
|
|
2623
|
+
* @description 手动触发加载选项
|
|
2624
|
+
* @description Manually trigger loading options
|
|
2625
|
+
*/
|
|
2626
|
+
load: () => Promise<void>;
|
|
2627
|
+
/**
|
|
2628
|
+
* 获取单个权限的选项
|
|
2629
|
+
* Get single permission options
|
|
2630
|
+
* @param code - 权限编码
|
|
2631
|
+
* @returns 选项数组
|
|
2632
|
+
*/
|
|
2633
|
+
getOptions: (code: string | number) => SelectOption_2[];
|
|
2634
|
+
/**
|
|
2635
|
+
* 刷新指定权限的选项
|
|
2636
|
+
* Reload specific permission options
|
|
2637
|
+
* @param code - 权限编码
|
|
2638
|
+
*/
|
|
2639
|
+
reload: (code: string | number) => Promise<void>;
|
|
2640
|
+
/**
|
|
2641
|
+
* 清除指定权限的缓存
|
|
2642
|
+
* Clear cache for specific permission
|
|
2643
|
+
* @param code - 权限编码(可选)
|
|
2644
|
+
*/
|
|
2645
|
+
clearCache: (code?: string | number) => void;
|
|
2646
|
+
}
|
|
2647
|
+
|
|
2137
2648
|
export declare const UserQuery: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
2138
2649
|
UserAddRef: CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
|
|
2139
2650
|
onSuccess?: (() => any) | undefined;
|
|
@@ -2232,6 +2743,8 @@ openInit: (record: any) => Promise<void>;
|
|
|
2232
2743
|
}, {}, {}, {}, {}> | null;
|
|
2233
2744
|
}, HTMLDivElement>;
|
|
2234
2745
|
|
|
2746
|
+
export declare const userSfqyOpts: SelectOption[];
|
|
2747
|
+
|
|
2235
2748
|
/**
|
|
2236
2749
|
* 处理声明式 Schema 的选项加载
|
|
2237
2750
|
* Process declarative Schema options loading
|
|
@@ -2266,6 +2779,40 @@ openInit: (record: any) => Promise<void>;
|
|
|
2266
2779
|
*/
|
|
2267
2780
|
export declare function useSchemaOptionsLoader(schema: FormSchema_3[] | Ref<FormSchema_3[]>, immediate?: boolean): SchemaOptionsLoaderReturn;
|
|
2268
2781
|
|
|
2782
|
+
/**
|
|
2783
|
+
* 处理声明式 Schema 的权限选项加载
|
|
2784
|
+
* Process declarative Schema permission options loading
|
|
2785
|
+
*
|
|
2786
|
+
* @param schema - 表单 Schema
|
|
2787
|
+
* @param immediate - 是否立即加载
|
|
2788
|
+
* @returns 增强后的 Schema 和加载方法
|
|
2789
|
+
*
|
|
2790
|
+
* @example
|
|
2791
|
+
* ```typescript
|
|
2792
|
+
* // 在 config.ts 中声明式配置
|
|
2793
|
+
* export const searchFormSchema: FormSchema[] = [
|
|
2794
|
+
* {
|
|
2795
|
+
* fieldName: 'factory',
|
|
2796
|
+
* component: 'Select',
|
|
2797
|
+
* permissionOptions: {
|
|
2798
|
+
* code: 'FACTORY',
|
|
2799
|
+
* fieldMapping: { label: 'cName', value: 'cXuhao' }
|
|
2800
|
+
* }
|
|
2801
|
+
* }
|
|
2802
|
+
* ]
|
|
2803
|
+
*
|
|
2804
|
+
* // 在组件中使用
|
|
2805
|
+
* const { enhancedSchema } = useSchemaPermissionLoader(searchFormSchema);
|
|
2806
|
+
*
|
|
2807
|
+
* // 传递给 useList
|
|
2808
|
+
* useList({
|
|
2809
|
+
* searchFormSchema: enhancedSchema.value,
|
|
2810
|
+
* ...
|
|
2811
|
+
* })
|
|
2812
|
+
* ```
|
|
2813
|
+
*/
|
|
2814
|
+
export declare function useSchemaPermissionLoader(schema: FormSchema_3[] | Ref<FormSchema_3[]>, immediate?: boolean): SchemaPermissionLoaderReturn;
|
|
2815
|
+
|
|
2269
2816
|
/**
|
|
2270
2817
|
* 查询方案 API 实现
|
|
2271
2818
|
* 所有模块通用的查询方案 API 配置
|
|
@@ -2373,7 +2920,7 @@ export declare interface UseSelectOptionsReturn {
|
|
|
2373
2920
|
* optionsMap.value['SFQY'] // 获取 SFQY 字典的选项
|
|
2374
2921
|
* ```
|
|
2375
2922
|
*/
|
|
2376
|
-
optionsMap: Ref<Record<string,
|
|
2923
|
+
optionsMap: Ref<Record<string, SelectOption_2[]>>;
|
|
2377
2924
|
/**
|
|
2378
2925
|
* 加载状态
|
|
2379
2926
|
* Loading state
|
|
@@ -2392,7 +2939,7 @@ export declare interface UseSelectOptionsReturn {
|
|
|
2392
2939
|
* @param dictCode - 字典编码
|
|
2393
2940
|
* @returns 选项数组
|
|
2394
2941
|
*/
|
|
2395
|
-
getOptions: (dictCode: string | number) =>
|
|
2942
|
+
getOptions: (dictCode: string | number) => SelectOption_2[];
|
|
2396
2943
|
/**
|
|
2397
2944
|
* 刷新指定字典的选项
|
|
2398
2945
|
* Reload specific dictionary options
|