cd-form 2.0.39 → 2.0.42

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.
@@ -1,6 +1,4 @@
1
- import { default as VXETable } from 'vxe-table';
2
- import { FormDataConfig, ColumnDataConfig, TableColumn, PageConfig, ButtonConfig } from './types';
3
- import { VxeGanttConstructor } from 'vxe-pc-ui';
1
+ import { FormDataConfig, ColumnDataConfig, TableColumn, PageConfig } from './types';
4
2
  import { DefineComponent, ExtractPropTypes, Ref, ComputedRef, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
5
3
 
6
4
  interface BusinessFlowConfig {
@@ -29,46 +27,14 @@ interface BusinessFlowConfig {
29
27
  targetField: string;
30
28
  }>;
31
29
  }>;
30
+ enableLinkQuery?: boolean;
32
31
  }
33
- declare function __VLS_template(): Partial<Record<NonNullable<string | number>, (_: {
34
- [key: string]: any;
35
- $table: VXETable.VxeTableConstructor<any>;
36
- $grid: VXETable.VxeGridConstructor<any> | null | undefined;
37
- $gantt: VxeGanttConstructor<any> | null | undefined;
38
- rowid: string;
39
- row: any;
40
- rowIndex: number;
41
- $rowIndex: number;
42
- _rowIndex: number;
43
- column: VXETable.VxeTableDefines.ColumnInfo<any>;
44
- columnIndex: number;
45
- $columnIndex: number;
46
- _columnIndex: number;
47
- option: VXETable.VxeColumnPropTypes.FilterItem;
48
- type: string;
49
- fixed: VXETable.VxeColumnPropTypes.Fixed;
50
- checked: boolean;
51
- indeterminate: boolean;
52
- seq: string | number;
53
- level: number;
54
- isEdit: boolean;
55
- isHidden: boolean;
56
- field: string;
57
- item: any;
58
- data: any;
59
- tooltipContent: string;
60
- groupContent: string;
61
- groupField: string;
62
- childCount: number;
63
- groupValues: number;
64
- aggValue: number;
65
- visibleData: any[];
66
- items: any[];
67
- }) => any>> & {
32
+ declare function reloadData(extraParams?: Record<string, any>): Promise<void>;
33
+ declare function __VLS_template(): Partial<Record<number, (_: any) => any>> & {
68
34
  "toolbar-right"?(_: {}): any;
69
35
  };
70
36
  declare const __VLS_component: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
71
- formData: FormDataConfig;
37
+ formData?: FormDataConfig;
72
38
  columnData?: ColumnDataConfig;
73
39
  deviceType?: "pc" | "app" | "pad";
74
40
  data?: any[];
@@ -97,6 +63,21 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<__VLS_WithDefaul
97
63
  };
98
64
  modelId?: string;
99
65
  apiBaseUrl?: string;
66
+ appCode?: string;
67
+ title?: string;
68
+ schemes?: Array<{
69
+ id: string;
70
+ name: string;
71
+ isDefault?: boolean;
72
+ }>;
73
+ showHeader?: boolean;
74
+ inlineEdit?: boolean;
75
+ leftTreeData?: any[];
76
+ leftTreeKeys?: {
77
+ value?: string;
78
+ label?: string;
79
+ children?: string;
80
+ };
100
81
  }>, {
101
82
  deviceType: string;
102
83
  data: () => never[];
@@ -133,6 +114,15 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<__VLS_WithDefaul
133
114
  };
134
115
  modelId: string;
135
116
  apiBaseUrl: string;
117
+ title: string;
118
+ schemes: () => never[];
119
+ showHeader: boolean;
120
+ leftTreeData: () => never[];
121
+ leftTreeKeys: () => {
122
+ value: string;
123
+ label: string;
124
+ children: string;
125
+ };
136
126
  }>>, {
137
127
  tableRef: Ref<any, any>;
138
128
  formRenderRef: Ref<any, any>;
@@ -148,256 +138,12 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<__VLS_WithDefaul
148
138
  selectedGroupField: Ref<string[], string[]>;
149
139
  mergeGroupFields: Ref<boolean, boolean>;
150
140
  openFormPopup: (initData?: any, title?: string) => void;
151
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
152
- add: (data: any) => void;
153
- edit: (data: any) => void;
154
- detail: (row: any) => void;
155
- delete: (row: any) => void;
156
- share: (payload: any) => void;
157
- group: (params: {
158
- groupFields: string[];
159
- mergeFields: boolean;
160
- updatedData?: any[];
161
- }) => void;
162
- "load-users": (payload: any) => void;
163
- "dept-click": (payload: any) => void;
164
- "page-change": (pageInfo: {
165
- currentPage: number;
166
- pageSize: number;
167
- }) => void;
168
- "custom-button": (button: ButtonConfig, row?: any) => void;
169
- refresh: () => void;
170
- "filter-change": (condition: any) => void;
171
- "filter-search": (condition: any) => void;
172
- "filter-reset": () => void;
173
- "add-row": (row: any) => void;
174
- "delete-row": (row: any) => void;
175
- "upload-image": (params: {
176
- row: any;
177
- field: string;
178
- file: File;
179
- }) => void;
180
- "column-drop": (params: {
181
- columns: any[];
182
- sourceColumn: any;
183
- targetColumn: any;
184
- }) => void;
185
- "inline-save": (changes: any[]) => void;
186
- "column-filter": (params: {
187
- field: string;
188
- filterValue: any;
189
- }) => void;
190
- "select-org-data": (data: any) => void;
191
- "column-filter-reset": (field: string) => void;
192
- "save-plan": (plan: any) => void;
193
- "delete-plan": (plan: any) => void;
194
- "copy-plan": (plan: any) => void;
195
- "set-default-plan": (plan: any) => void;
196
- "update-plan": (payload: any) => void;
197
- "search-persons": (payload: any) => void;
198
- "column-change": (columns: any[]) => void;
199
- "color-filter-change": (rules: any[]) => void;
200
- "color-filter-clear": () => void;
201
- "push-down": (params: {
202
- downstream: any;
203
- selectedRows: any[];
204
- }) => void;
205
- "select-upstream": (params: {
206
- upstream: any;
207
- }) => void;
208
- "selection-change": (selectedRows: any[]) => void;
209
- "row-click": (row: any) => void;
210
- "row-dblclick": (row: any) => void;
211
- "i18n-click": (data: {
212
- field: string;
213
- value: any;
214
- i18nValue: string;
215
- }) => void;
216
- "relation-form-search": (data: {
217
- field: string;
218
- releaseId: string;
219
- keyword: string;
220
- }) => void;
221
- "relation-form-advanced": (data: {
222
- field: string;
223
- releaseId: string;
224
- }) => void;
225
- "relation-form-dialog-search": (data: {
226
- field: string;
227
- releaseId: string;
228
- filters: any;
229
- }) => void;
230
- "relation-form-page-change": (data: {
231
- field: string;
232
- releaseId: string;
233
- pagination: any;
234
- }) => void;
235
- import: (file: File, options?: {
236
- mode?: string;
237
- mappings?: any[];
238
- } | undefined) => void;
239
- export: (mode?: "all" | "page" | "selected" | undefined) => void;
240
- "download-template": () => void;
241
- "batch-delete": (ids: string[]) => void;
242
- }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
243
- formData: FormDataConfig;
244
- columnData?: ColumnDataConfig;
245
- deviceType?: "pc" | "app" | "pad";
246
- data?: any[];
247
- tableColumns?: TableColumn[];
248
- loading?: boolean;
249
- loadingText?: string;
250
- pageConfig?: PageConfig;
251
- showFilter?: boolean;
252
- fieldOptions?: any[];
253
- filterCondition?: any;
254
- planFilterOptions?: any[];
255
- enableVirtualScroll?: boolean;
256
- virtualScrollGt?: number;
257
- tableHeight?: number | string;
258
- businessFlow?: BusinessFlowConfig;
259
- selectionMode?: "single" | "multiple";
260
- showType?: "dialog" | "list";
261
- relationFormData?: Record<string, any>;
262
- shareUrl?: string;
263
- shareConfig?: {
264
- currentPermission?: "read" | "edit" | "manage";
265
- owner?: any;
266
- collaborators?: any[];
267
- tabs?: any[];
268
- organizations?: any[];
269
- };
270
- modelId?: string;
271
- apiBaseUrl?: string;
272
- }>, {
273
- deviceType: string;
274
- data: () => never[];
275
- loading: boolean;
276
- loadingText: string;
277
- pageConfig: () => {
278
- enabled: boolean;
279
- currentPage: number;
280
- pageSize: number;
281
- total: number;
282
- };
283
- showFilter: boolean;
284
- fieldOptions: () => never[];
285
- filterCondition: () => {
286
- field: string;
287
- operator: string;
288
- value: string;
289
- };
290
- inlineEdit: boolean;
291
- planFilterOptions: () => never[];
292
- enableVirtualScroll: boolean;
293
- virtualScrollGt: number;
294
- tableHeight: undefined;
295
- selectionMode: string;
296
- showType: string;
297
- relationFormData: () => {};
298
- shareUrl: string;
299
- shareConfig: () => {
300
- currentPermission: string;
301
- owner: undefined;
302
- collaborators: never[];
303
- tabs: never[];
304
- organizations: never[];
305
- };
306
- modelId: string;
307
- apiBaseUrl: string;
308
- }>>> & Readonly<{
309
- onAdd?: ((data: any) => any) | undefined;
310
- onEdit?: ((data: any) => any) | undefined;
311
- onDetail?: ((row: any) => any) | undefined;
312
- onDelete?: ((row: any) => any) | undefined;
313
- onShare?: ((payload: any) => any) | undefined;
314
- onGroup?: ((params: {
315
- groupFields: string[];
316
- mergeFields: boolean;
317
- updatedData?: any[];
318
- }) => any) | undefined;
319
- "onLoad-users"?: ((payload: any) => any) | undefined;
320
- "onDept-click"?: ((payload: any) => any) | undefined;
321
- "onPage-change"?: ((pageInfo: {
322
- currentPage: number;
323
- pageSize: number;
324
- }) => any) | undefined;
325
- "onCustom-button"?: ((button: ButtonConfig, row?: any) => any) | undefined;
326
- onRefresh?: (() => any) | undefined;
327
- "onFilter-change"?: ((condition: any) => any) | undefined;
328
- "onFilter-search"?: ((condition: any) => any) | undefined;
329
- "onFilter-reset"?: (() => any) | undefined;
330
- "onAdd-row"?: ((row: any) => any) | undefined;
331
- "onDelete-row"?: ((row: any) => any) | undefined;
332
- "onUpload-image"?: ((params: {
333
- row: any;
334
- field: string;
335
- file: File;
336
- }) => any) | undefined;
337
- "onColumn-drop"?: ((params: {
338
- columns: any[];
339
- sourceColumn: any;
340
- targetColumn: any;
341
- }) => any) | undefined;
342
- "onInline-save"?: ((changes: any[]) => any) | undefined;
343
- "onColumn-filter"?: ((params: {
344
- field: string;
345
- filterValue: any;
346
- }) => any) | undefined;
347
- "onSelect-org-data"?: ((data: any) => any) | undefined;
348
- "onColumn-filter-reset"?: ((field: string) => any) | undefined;
349
- "onSave-plan"?: ((plan: any) => any) | undefined;
350
- "onDelete-plan"?: ((plan: any) => any) | undefined;
351
- "onCopy-plan"?: ((plan: any) => any) | undefined;
352
- "onSet-default-plan"?: ((plan: any) => any) | undefined;
353
- "onUpdate-plan"?: ((payload: any) => any) | undefined;
354
- "onSearch-persons"?: ((payload: any) => any) | undefined;
355
- "onColumn-change"?: ((columns: any[]) => any) | undefined;
356
- "onColor-filter-change"?: ((rules: any[]) => any) | undefined;
357
- "onColor-filter-clear"?: (() => any) | undefined;
358
- "onPush-down"?: ((params: {
359
- downstream: any;
360
- selectedRows: any[];
361
- }) => any) | undefined;
362
- "onSelect-upstream"?: ((params: {
363
- upstream: any;
364
- }) => any) | undefined;
365
- "onSelection-change"?: ((selectedRows: any[]) => any) | undefined;
366
- "onRow-click"?: ((row: any) => any) | undefined;
367
- "onRow-dblclick"?: ((row: any) => any) | undefined;
368
- "onI18n-click"?: ((data: {
369
- field: string;
370
- value: any;
371
- i18nValue: string;
372
- }) => any) | undefined;
373
- "onRelation-form-search"?: ((data: {
374
- field: string;
375
- releaseId: string;
376
- keyword: string;
377
- }) => any) | undefined;
378
- "onRelation-form-advanced"?: ((data: {
379
- field: string;
380
- releaseId: string;
381
- }) => any) | undefined;
382
- "onRelation-form-dialog-search"?: ((data: {
383
- field: string;
384
- releaseId: string;
385
- filters: any;
386
- }) => any) | undefined;
387
- "onRelation-form-page-change"?: ((data: {
388
- field: string;
389
- releaseId: string;
390
- pagination: any;
391
- }) => any) | undefined;
392
- onImport?: ((file: File, options?: {
393
- mode?: string;
394
- mappings?: any[];
395
- } | undefined) => any) | undefined;
396
- onExport?: ((mode?: "all" | "page" | "selected" | undefined) => any) | undefined;
397
- "onDownload-template"?: (() => any) | undefined;
398
- "onBatch-delete"?: ((ids: string[]) => any) | undefined;
399
- }>, {
141
+ effectiveFormData: ComputedRef<FormDataConfig | undefined>;
142
+ reloadData: typeof reloadData;
143
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, any, string, PublicProps, any, {
144
+ title: string;
400
145
  data: any[];
146
+ inlineEdit: boolean;
401
147
  showFilter: boolean;
402
148
  relationFormData: Record<string, any>;
403
149
  deviceType: "pc" | "app" | "pad";
@@ -422,6 +168,18 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<__VLS_WithDefaul
422
168
  };
423
169
  modelId: string;
424
170
  apiBaseUrl: string;
171
+ schemes: Array<{
172
+ id: string;
173
+ name: string;
174
+ isDefault?: boolean;
175
+ }>;
176
+ showHeader: boolean;
177
+ leftTreeData: any[];
178
+ leftTreeKeys: {
179
+ value?: string;
180
+ label?: string;
181
+ children?: string;
182
+ };
425
183
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
426
184
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
427
185
  export default _default;
@@ -1,2 +1,26 @@
1
1
  import { AxiosResponse } from 'axios';
2
- export declare function getModelList(releaseId: string, data?: Record<string, any>): Promise< AxiosResponse<any, any, {}>>;
2
+ /** 加载已发布表单的 formData + columnData */
3
+ export declare function getModelConfig(modelId: string): Promise< AxiosResponse<any, any, {}>>;
4
+ /** 查询列表(POST,支持分页/筛选/排序/treeActiveId) */
5
+ export declare function getModelList(modelId: string, params?: Record<string, any>): Promise< AxiosResponse<any, any, {}>>;
6
+ export declare function getModelInfo(modelId: string, id: string): Promise< AxiosResponse<any, any, {}>>;
7
+ export declare function createModel(modelId: string, data: Record<string, any>): Promise< AxiosResponse<any, any, {}>>;
8
+ export declare function updateModel(modelId: string, id: string, data: Record<string, any>): Promise< AxiosResponse<any, any, {}>>;
9
+ export declare function deleteRecord(params: {
10
+ formid: string;
11
+ recordid: string;
12
+ }): Promise< AxiosResponse<any, any, {}>>;
13
+ export declare function batchDelete(modelId: string, ids: string[]): Promise< AxiosResponse<any, any, {}>>;
14
+ export declare function batchSave(modelId: string, rows: Record<string, any>[]): Promise< AxiosResponse<any, any, {}>>;
15
+ export declare function exportExcel(modelId: string): Promise< AxiosResponse<any, any, {}>>;
16
+ export declare function downloadTemplate(modelId: string): Promise< AxiosResponse<any, any, {}>>;
17
+ export declare function importExcel(modelId: string, data: FormData): Promise< AxiosResponse<any, any, {}>>;
18
+ export declare function importPreview(data: any): Promise< AxiosResponse<any, any, {}>>;
19
+ export declare function getFieldDataSelect(modelId: string, params: any): Promise< AxiosResponse<any, any, {}>>;
20
+ export declare function getReleaseInfo(releaseId: string): Promise< AxiosResponse<any, any, {}>>;
21
+ export declare function getGroupList(modelId: string): Promise< AxiosResponse<any, any, {}>>;
22
+ export declare function createGroup(modelId: string, data: any): Promise< AxiosResponse<any, any, {}>>;
23
+ export declare function updateGroup(modelId: string, groupId: string | number, data: any): Promise< AxiosResponse<any, any, {}>>;
24
+ export declare function deleteGroup(modelId: string, groupId: string | number): Promise< AxiosResponse<any, any, {}>>;
25
+ export declare function auditRecords(formId: string, ids: string[]): Promise< AxiosResponse<any, any, {}>>;
26
+ export declare function unauditRecords(formId: string, ids: string[]): Promise< AxiosResponse<any, any, {}>>;