@jxyszb/jxy-form-designer 0.1.0

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.
@@ -0,0 +1,1026 @@
1
+ import { a as i } from "./chunks/dataSourceUrl-4b17feb8.js";
2
+ const l = {
3
+ dict: "/form-datasource/mock/form-dicts",
4
+ province: "/form-datasource/mock/provinces",
5
+ city: "/form-datasource/mock/cities",
6
+ district: "/form-datasource/mock/districts",
7
+ regionTree: "/form-datasource/mock/regions/tree",
8
+ dept: "/form-datasource/mock/departments",
9
+ person: "/form-datasource/mock/persons",
10
+ error: "/form-datasource/mock/error",
11
+ slow: "/form-datasource/mock/slow"
12
+ }, n = {
13
+ sys_user_sex: [
14
+ { label: "男", value: "0" },
15
+ { label: "女", value: "1" },
16
+ { label: "未知", value: "2" }
17
+ ],
18
+ sys_normal_disable: [
19
+ { label: "正常", value: "0" },
20
+ { label: "停用", value: "1" }
21
+ ],
22
+ sys_notice_type: [
23
+ { label: "通知", value: "1" },
24
+ { label: "公告", value: "2" }
25
+ ],
26
+ sys_priority: [
27
+ { label: "低", value: "low" },
28
+ { label: "中", value: "medium" },
29
+ { label: "高", value: "high" }
30
+ ],
31
+ sys_yes_no: [
32
+ { label: "是", value: "Y" },
33
+ { label: "否", value: "N" }
34
+ ],
35
+ sys_show_hide: [
36
+ { label: "显示", value: "0" },
37
+ { label: "隐藏", value: "1" }
38
+ ],
39
+ sys_job_status: [
40
+ { label: "正常", value: "0" },
41
+ { label: "暂停", value: "1" }
42
+ ]
43
+ }, u = [
44
+ { label: "北京市", value: "110000" },
45
+ { label: "上海市", value: "310000" },
46
+ { label: "广东省", value: "440000" },
47
+ { label: "浙江省", value: "330000" },
48
+ { label: "江苏省", value: "320000" },
49
+ { label: "四川省", value: "510000" }
50
+ ], c = {
51
+ 11e4: [
52
+ { label: "东城区", value: "110101" },
53
+ { label: "西城区", value: "110102" },
54
+ { label: "朝阳区", value: "110105" },
55
+ { label: "海淀区", value: "110108" }
56
+ ],
57
+ 31e4: [
58
+ { label: "黄浦区", value: "310101" },
59
+ { label: "徐汇区", value: "310104" },
60
+ { label: "浦东新区", value: "310115" }
61
+ ],
62
+ 44e4: [
63
+ { label: "广州市", value: "440100" },
64
+ { label: "深圳市", value: "440300" },
65
+ { label: "东莞市", value: "441900" },
66
+ { label: "佛山市", value: "440600" }
67
+ ],
68
+ 33e4: [
69
+ { label: "杭州市", value: "330100" },
70
+ { label: "宁波市", value: "330200" },
71
+ { label: "温州市", value: "330300" }
72
+ ],
73
+ 32e4: [
74
+ { label: "南京市", value: "320100" },
75
+ { label: "苏州市", value: "320500" },
76
+ { label: "无锡市", value: "320200" }
77
+ ],
78
+ 51e4: [
79
+ { label: "成都市", value: "510100" },
80
+ { label: "绵阳市", value: "510700" }
81
+ ]
82
+ }, p = {
83
+ 440100: [
84
+ { label: "天河区", value: "440106" },
85
+ { label: "越秀区", value: "440104" },
86
+ { label: "番禺区", value: "440113" }
87
+ ],
88
+ 440300: [
89
+ { label: "南山区", value: "440305" },
90
+ { label: "福田区", value: "440304" },
91
+ { label: "宝安区", value: "440306" }
92
+ ],
93
+ 330100: [
94
+ { label: "西湖区", value: "330106" },
95
+ { label: "上城区", value: "330102" },
96
+ { label: "余杭区", value: "330110" }
97
+ ]
98
+ }, b = [
99
+ {
100
+ label: "江西省",
101
+ value: "360000",
102
+ children: [
103
+ {
104
+ label: "南昌市",
105
+ value: "360100",
106
+ children: [
107
+ { label: "东湖区", value: "360102" },
108
+ { label: "西湖区", value: "360103" },
109
+ { label: "青云谱区", value: "360104" },
110
+ { label: "青山湖区", value: "360111" },
111
+ { label: "新建区", value: "360112" },
112
+ { label: "南昌县", value: "360121" }
113
+ ]
114
+ },
115
+ {
116
+ label: "九江市",
117
+ value: "360400",
118
+ children: [
119
+ { label: "濂溪区", value: "360402" },
120
+ { label: "浔阳区", value: "360403" },
121
+ { label: "柴桑区", value: "360404" },
122
+ { label: "瑞昌市", value: "360481" }
123
+ ]
124
+ },
125
+ {
126
+ label: "赣州市",
127
+ value: "360700",
128
+ children: [
129
+ { label: "章贡区", value: "360702" },
130
+ { label: "南康区", value: "360703" },
131
+ { label: "赣县区", value: "360704" },
132
+ { label: "瑞金市", value: "360781" }
133
+ ]
134
+ }
135
+ ]
136
+ }
137
+ ], f = [
138
+ { label: "技术部", value: "dept_tech" },
139
+ { label: "产品部", value: "dept_product" },
140
+ { label: "运营部", value: "dept_ops" },
141
+ { label: "人事部", value: "dept_hr" },
142
+ { label: "财务部", value: "dept_finance" },
143
+ { label: "行政部", value: "dept_admin" }
144
+ ], m = {
145
+ dept_tech: [
146
+ { label: "张三", value: "user_001" },
147
+ { label: "李四", value: "user_002" },
148
+ { label: "王五", value: "user_003" }
149
+ ],
150
+ dept_product: [
151
+ { label: "赵六", value: "user_004" },
152
+ { label: "钱七", value: "user_005" }
153
+ ],
154
+ dept_ops: [
155
+ { label: "孙八", value: "user_006" },
156
+ { label: "周九", value: "user_007" }
157
+ ],
158
+ dept_hr: [
159
+ { label: "吴十", value: "user_008" }
160
+ ],
161
+ dept_finance: [
162
+ { label: "郑十一", value: "user_009" }
163
+ ],
164
+ dept_admin: [
165
+ { label: "冯十二", value: "user_010" }
166
+ ]
167
+ };
168
+ function t(e) {
169
+ return new Promise((a) => setTimeout(a, e));
170
+ }
171
+ const v = {
172
+ [l.regionTree]: async () => (await t(200), JSON.parse(JSON.stringify(b))),
173
+ /**
174
+ * 省份列表(无依赖参数)
175
+ */
176
+ [l.province]: async () => (await t(200), [...u]),
177
+ /**
178
+ * 城市列表(依赖 provinceCode)
179
+ */
180
+ [l.city]: async (e) => {
181
+ await t(300);
182
+ const a = e == null ? void 0 : e.provinceCode;
183
+ return a ? c[a] || [] : [];
184
+ },
185
+ /**
186
+ * 区县列表(依赖 cityCode)
187
+ */
188
+ [l.district]: async (e) => {
189
+ await t(300);
190
+ const a = e == null ? void 0 : e.cityCode;
191
+ return a ? p[a] || [] : [];
192
+ },
193
+ /**
194
+ * 部门列表(无依赖参数)
195
+ */
196
+ [l.dept]: async () => (await t(200), [...f]),
197
+ /**
198
+ * 人员列表(依赖 deptId)
199
+ */
200
+ [l.person]: async (e) => {
201
+ await t(400);
202
+ const a = e == null ? void 0 : e.deptId;
203
+ return a ? m[a] || [] : [];
204
+ },
205
+ /**
206
+ * 模拟失败接口(用于测试错误状态)
207
+ */
208
+ [l.error]: async () => {
209
+ throw await t(300), new Error("Mock API 模拟失败:接口不可用");
210
+ },
211
+ /**
212
+ * 模拟延迟接口(用于测试 loading 状态)
213
+ */
214
+ [l.slow]: async () => (await t(3e3), [
215
+ { label: "延迟选项A", value: "slow_a" },
216
+ { label: "延迟选项B", value: "slow_b" }
217
+ ])
218
+ }, s = /* @__PURE__ */ new Map(), _ = {
219
+ /**
220
+ * 加载字典数据
221
+ * @param {string} dictType 字典类型,如 'sys_user_sex'
222
+ * @param {string} dictUrl 当前表单的 DICT 总接口地址
223
+ * @returns {Promise<Array<{ label: string, value: string }>>}
224
+ */
225
+ async loadDictOptions(e, a) {
226
+ const d = i(a);
227
+ if (d !== l.dict)
228
+ throw new Error(`[MockProvider] 未知 DICT 总接口地址:${d}`);
229
+ s.has(d) || s.set(d, t(150).then(() => JSON.parse(JSON.stringify(n))));
230
+ const r = (await s.get(d))[e];
231
+ return r ? [...r] : (console.warn(`[MockProvider] 未知字典类型:${e}`), []);
232
+ },
233
+ /**
234
+ * 加载 API 数据
235
+ * @param {string} apiUrl API 相对地址
236
+ * @param {object} params 请求参数,如 { provinceCode: '440000' }
237
+ * @returns {Promise<Array<{ label: string, value: string }>>}
238
+ */
239
+ async loadApiOptions(e, a = {}) {
240
+ const d = i(e), o = v[d];
241
+ if (!o)
242
+ throw new Error(`[MockProvider] 未知 API 地址:${d}`);
243
+ return o(a);
244
+ },
245
+ /**
246
+ * 列出所有可用的 API 数据源
247
+ * @returns {Array<{ url: string, name: string, description: string }>}
248
+ */
249
+ listApiSources() {
250
+ return [
251
+ { url: l.province, name: "省份列表", description: "无依赖参数" },
252
+ { url: l.city, name: "城市列表", description: "依赖 provinceCode" },
253
+ { url: l.district, name: "区县列表", description: "依赖 cityCode" },
254
+ { url: l.regionTree, name: "江西行政区树", description: "三级树形选项" },
255
+ { url: l.dept, name: "部门列表", description: "无依赖参数" },
256
+ { url: l.person, name: "人员列表", description: "依赖 deptId" },
257
+ { url: l.error, name: "失败接口", description: "模拟接口异常" },
258
+ { url: l.slow, name: "延迟接口", description: "模拟 3s 延迟" }
259
+ ];
260
+ },
261
+ clearDictCache(e) {
262
+ e ? s.delete(e) : s.clear();
263
+ }
264
+ }, h = {
265
+ schemaVersion: "jxy-form-schema@1.3.0",
266
+ meta: {
267
+ formCode: "employee_info",
268
+ formName: "员工信息登记表",
269
+ description: "用于登记员工基本信息、联系方式和工作信息,演示所有字段类型和联动规则。"
270
+ },
271
+ config: {
272
+ customClass: "",
273
+ labelPosition: "right",
274
+ labelWidth: 120,
275
+ suffixWidth: 60,
276
+ size: "default",
277
+ disabled: !1,
278
+ gutter: 16
279
+ },
280
+ dataSourceConfig: {
281
+ dictUrl: "/form-datasource/mock/form-dicts"
282
+ },
283
+ dataSources: [
284
+ {
285
+ id: "ds_static_gender",
286
+ name: "性别选项",
287
+ type: "static",
288
+ options: [
289
+ { label: "男", value: "M" },
290
+ { label: "女", value: "F" }
291
+ ]
292
+ },
293
+ {
294
+ id: "ds_dict_status",
295
+ name: "在职状态",
296
+ type: "dict",
297
+ dictType: "sys_normal_disable"
298
+ },
299
+ {
300
+ id: "ds_api_dept",
301
+ name: "部门列表",
302
+ type: "api",
303
+ url: "/form-datasource/mock/departments",
304
+ params: []
305
+ },
306
+ {
307
+ id: "ds_api_person",
308
+ name: "人员列表",
309
+ type: "api",
310
+ url: "/form-datasource/mock/persons",
311
+ params: [
312
+ { key: "deptId", valueType: "field", field: "dept", required: !0 }
313
+ ]
314
+ },
315
+ {
316
+ id: "ds_static_edu",
317
+ name: "学历",
318
+ type: "static",
319
+ options: [
320
+ { label: "高中及以下", value: "high" },
321
+ { label: "大专", value: "college" },
322
+ { label: "本科", value: "bachelor" },
323
+ { label: "硕士", value: "master" },
324
+ { label: "博士及以上", value: "doctor" }
325
+ ]
326
+ },
327
+ {
328
+ id: "ds_static_skills",
329
+ name: "技能标签",
330
+ type: "static",
331
+ options: [
332
+ { label: "JavaScript", value: "js" },
333
+ { label: "TypeScript", value: "ts" },
334
+ { label: "Vue", value: "vue" },
335
+ { label: "React", value: "react" },
336
+ { label: "Node.js", value: "node" },
337
+ { label: "Java", value: "java" },
338
+ { label: "Python", value: "python" }
339
+ ]
340
+ },
341
+ {
342
+ id: "ds_api_region_tree",
343
+ name: "江西行政区树",
344
+ type: "api",
345
+ url: "/form-datasource/mock/regions/tree",
346
+ params: []
347
+ },
348
+ {
349
+ id: "ds_static_land_nature",
350
+ name: "土地性质树",
351
+ type: "static",
352
+ options: [
353
+ {
354
+ label: "农用地",
355
+ value: "agricultural",
356
+ children: [
357
+ { label: "耕地", value: "farmland" },
358
+ { label: "林地", value: "forest" },
359
+ { label: "草地", value: "grassland" }
360
+ ]
361
+ },
362
+ {
363
+ label: "建设用地",
364
+ value: "construction",
365
+ children: [
366
+ { label: "工业用地", value: "industrial" },
367
+ { label: "商业用地", value: "commercial" }
368
+ ]
369
+ }
370
+ ]
371
+ }
372
+ ],
373
+ reactions: [
374
+ {
375
+ id: "reaction_dept_person",
376
+ sourceField: "dept",
377
+ condition: { type: "notEmpty" },
378
+ effects: [
379
+ { type: "clearValue", targetField: "directManager" },
380
+ { type: "reloadOptions", targetField: "directManager" }
381
+ ]
382
+ },
383
+ {
384
+ id: "reaction_status_reason",
385
+ sourceField: "status",
386
+ condition: { type: "eq", value: "1" },
387
+ effects: [
388
+ { type: "setHidden", targetField: "leaveReason", value: !1 },
389
+ { type: "setRequired", targetField: "leaveReason", value: !0 }
390
+ ]
391
+ },
392
+ {
393
+ id: "reaction_status_reason_hide",
394
+ sourceField: "status",
395
+ condition: { type: "neq", value: "1" },
396
+ effects: [
397
+ { type: "setHidden", targetField: "leaveReason", value: !0 },
398
+ { type: "setRequired", targetField: "leaveReason", value: !1 },
399
+ { type: "clearValue", targetField: "leaveReason" }
400
+ ]
401
+ }
402
+ ],
403
+ nodes: [
404
+ // ── 标题 ──
405
+ {
406
+ id: "title_basic",
407
+ nodeType: "title",
408
+ sort: 0,
409
+ title: "基本信息",
410
+ description: "请填写员工基本个人信息",
411
+ level: 2,
412
+ customClass: ""
413
+ },
414
+ // ── 2列栅格:姓名 + 工号 ──
415
+ {
416
+ id: "grid_name_code",
417
+ nodeType: "grid",
418
+ sort: 1,
419
+ gutter: 16,
420
+ labelWidth: "",
421
+ customClass: "",
422
+ columns: [
423
+ {
424
+ id: "col_name",
425
+ sort: 0,
426
+ span: 12,
427
+ labelWidth: "",
428
+ customClass: "",
429
+ children: [
430
+ {
431
+ id: "field_name",
432
+ nodeType: "field",
433
+ sort: 0,
434
+ prop: "name",
435
+ label: "姓名",
436
+ type: "text",
437
+ defaultValue: "",
438
+ placeholder: "请输入姓名",
439
+ required: !0,
440
+ disabled: !1,
441
+ hidden: !1,
442
+ labelWidth: "",
443
+ customClass: "",
444
+ dataSourceId: "",
445
+ componentKey: "",
446
+ componentProps: {},
447
+ props: { max: 20 },
448
+ validations: []
449
+ }
450
+ ]
451
+ },
452
+ {
453
+ id: "col_code",
454
+ sort: 1,
455
+ span: 12,
456
+ labelWidth: "",
457
+ customClass: "",
458
+ children: [
459
+ {
460
+ id: "field_empCode",
461
+ nodeType: "field",
462
+ sort: 0,
463
+ prop: "empCode",
464
+ label: "工号",
465
+ type: "text",
466
+ defaultValue: "",
467
+ placeholder: "请输入工号",
468
+ required: !0,
469
+ disabled: !1,
470
+ hidden: !1,
471
+ labelWidth: "",
472
+ customClass: "",
473
+ dataSourceId: "",
474
+ componentKey: "",
475
+ componentProps: {},
476
+ props: { max: 20 },
477
+ validations: [
478
+ { type: "pattern", value: "^[A-Z0-9]{4,12}$", message: "工号格式:4-12位大写字母或数字", trigger: "blur" }
479
+ ]
480
+ }
481
+ ]
482
+ }
483
+ ]
484
+ },
485
+ // ── 3列栅格:性别 + 出生日期 + 学历 ──
486
+ {
487
+ id: "grid_gender_birth_edu",
488
+ nodeType: "grid",
489
+ sort: 2,
490
+ gutter: 16,
491
+ labelWidth: "",
492
+ customClass: "",
493
+ columns: [
494
+ {
495
+ id: "col_gender",
496
+ sort: 0,
497
+ span: 8,
498
+ labelWidth: "",
499
+ customClass: "",
500
+ children: [
501
+ {
502
+ id: "field_gender",
503
+ nodeType: "field",
504
+ sort: 0,
505
+ prop: "gender",
506
+ label: "性别",
507
+ type: "radio",
508
+ defaultValue: "",
509
+ placeholder: "",
510
+ required: !0,
511
+ disabled: !1,
512
+ hidden: !1,
513
+ labelWidth: "",
514
+ customClass: "",
515
+ dataSourceId: "ds_static_gender",
516
+ componentKey: "",
517
+ componentProps: {},
518
+ props: {},
519
+ validations: [],
520
+ extensions: { suffix: { enabled: !0 } }
521
+ }
522
+ ]
523
+ },
524
+ {
525
+ id: "col_birth",
526
+ sort: 1,
527
+ span: 8,
528
+ labelWidth: "",
529
+ customClass: "",
530
+ children: [
531
+ {
532
+ id: "field_birthDate",
533
+ nodeType: "field",
534
+ sort: 0,
535
+ prop: "birthDate",
536
+ label: "出生日期",
537
+ type: "date",
538
+ defaultValue: "",
539
+ placeholder: "请选择出生日期",
540
+ required: !1,
541
+ disabled: !1,
542
+ hidden: !1,
543
+ labelWidth: "",
544
+ customClass: "",
545
+ dataSourceId: "",
546
+ componentKey: "",
547
+ componentProps: {},
548
+ props: { format: "YYYY-MM-DD", valueFormat: "YYYY-MM-DD" },
549
+ validations: []
550
+ }
551
+ ]
552
+ },
553
+ {
554
+ id: "col_edu",
555
+ sort: 2,
556
+ span: 8,
557
+ labelWidth: "",
558
+ customClass: "",
559
+ children: [
560
+ {
561
+ id: "field_education",
562
+ nodeType: "field",
563
+ sort: 0,
564
+ prop: "education",
565
+ label: "学历",
566
+ type: "select",
567
+ defaultValue: "",
568
+ placeholder: "请选择学历",
569
+ required: !1,
570
+ disabled: !1,
571
+ hidden: !1,
572
+ labelWidth: "",
573
+ customClass: "",
574
+ dataSourceId: "ds_static_edu",
575
+ componentKey: "",
576
+ componentProps: {},
577
+ props: { multiple: !1, clearable: !0 },
578
+ validations: []
579
+ }
580
+ ]
581
+ }
582
+ ]
583
+ },
584
+ // ── 标题 ──
585
+ {
586
+ id: "title_work",
587
+ nodeType: "title",
588
+ sort: 3,
589
+ title: "工作信息",
590
+ description: "请填写员工在职工作信息",
591
+ level: 2,
592
+ customClass: ""
593
+ },
594
+ // ── 2列栅格:部门 + 直属上级 ──
595
+ {
596
+ id: "grid_dept_manager",
597
+ nodeType: "grid",
598
+ sort: 4,
599
+ gutter: 16,
600
+ labelWidth: "",
601
+ customClass: "",
602
+ columns: [
603
+ {
604
+ id: "col_dept",
605
+ sort: 0,
606
+ span: 12,
607
+ labelWidth: "",
608
+ customClass: "",
609
+ children: [
610
+ {
611
+ id: "field_dept",
612
+ nodeType: "field",
613
+ sort: 0,
614
+ prop: "dept",
615
+ label: "所属部门",
616
+ type: "select",
617
+ defaultValue: "",
618
+ placeholder: "请选择部门",
619
+ required: !0,
620
+ disabled: !1,
621
+ hidden: !1,
622
+ labelWidth: "",
623
+ customClass: "",
624
+ dataSourceId: "ds_api_dept",
625
+ componentKey: "",
626
+ componentProps: {},
627
+ props: { multiple: !1, clearable: !0 },
628
+ validations: []
629
+ }
630
+ ]
631
+ },
632
+ {
633
+ id: "col_manager",
634
+ sort: 1,
635
+ span: 12,
636
+ labelWidth: "",
637
+ customClass: "",
638
+ children: [
639
+ {
640
+ id: "field_directManager",
641
+ nodeType: "field",
642
+ sort: 0,
643
+ prop: "directManager",
644
+ label: "直属上级",
645
+ type: "select",
646
+ defaultValue: "",
647
+ placeholder: "请先选择部门",
648
+ required: !1,
649
+ disabled: !1,
650
+ hidden: !1,
651
+ labelWidth: "",
652
+ customClass: "",
653
+ dataSourceId: "ds_api_person",
654
+ componentKey: "",
655
+ componentProps: {},
656
+ props: { multiple: !1, clearable: !0 },
657
+ validations: []
658
+ }
659
+ ]
660
+ }
661
+ ]
662
+ },
663
+ // ── 2列栅格:入职日期 + 在职状态 ──
664
+ {
665
+ id: "grid_join_status",
666
+ nodeType: "grid",
667
+ sort: 5,
668
+ gutter: 16,
669
+ labelWidth: "",
670
+ customClass: "",
671
+ columns: [
672
+ {
673
+ id: "col_join",
674
+ sort: 0,
675
+ span: 12,
676
+ labelWidth: "",
677
+ customClass: "",
678
+ children: [
679
+ {
680
+ id: "field_joinDate",
681
+ nodeType: "field",
682
+ sort: 0,
683
+ prop: "joinDate",
684
+ label: "入职日期",
685
+ type: "date",
686
+ defaultValue: "",
687
+ placeholder: "请选择入职日期",
688
+ required: !0,
689
+ disabled: !1,
690
+ hidden: !1,
691
+ labelWidth: "",
692
+ customClass: "",
693
+ dataSourceId: "",
694
+ componentKey: "",
695
+ componentProps: {},
696
+ props: { format: "YYYY-MM-DD", valueFormat: "YYYY-MM-DD" },
697
+ validations: []
698
+ }
699
+ ]
700
+ },
701
+ {
702
+ id: "col_status",
703
+ sort: 1,
704
+ span: 12,
705
+ labelWidth: "",
706
+ customClass: "",
707
+ children: [
708
+ {
709
+ id: "field_status",
710
+ nodeType: "field",
711
+ sort: 0,
712
+ prop: "status",
713
+ label: "在职状态",
714
+ type: "select",
715
+ defaultValue: "0",
716
+ placeholder: "请选择",
717
+ required: !0,
718
+ disabled: !1,
719
+ hidden: !1,
720
+ labelWidth: "",
721
+ customClass: "",
722
+ dataSourceId: "ds_dict_status",
723
+ componentKey: "",
724
+ componentProps: {},
725
+ props: { multiple: !1, clearable: !1 },
726
+ validations: []
727
+ }
728
+ ]
729
+ }
730
+ ]
731
+ },
732
+ // ── 离职原因(默认隐藏,status=1时显示) ──
733
+ {
734
+ id: "field_leaveReason",
735
+ nodeType: "field",
736
+ sort: 6,
737
+ prop: "leaveReason",
738
+ label: "离职原因",
739
+ type: "textarea",
740
+ defaultValue: "",
741
+ placeholder: "请填写离职原因",
742
+ required: !1,
743
+ disabled: !1,
744
+ hidden: !0,
745
+ labelWidth: "",
746
+ customClass: "",
747
+ dataSourceId: "",
748
+ componentKey: "",
749
+ componentProps: {},
750
+ props: { rows: 3 },
751
+ validations: [{ type: "maxLength", value: 500, message: "离职原因不超过500字", trigger: "blur" }]
752
+ },
753
+ // ── 技能标签(多选) ──
754
+ {
755
+ id: "field_skills",
756
+ nodeType: "field",
757
+ sort: 7,
758
+ prop: "skills",
759
+ label: "技能标签",
760
+ type: "checkBox",
761
+ defaultValue: [],
762
+ placeholder: "",
763
+ required: !1,
764
+ disabled: !1,
765
+ hidden: !1,
766
+ labelWidth: "",
767
+ customClass: "",
768
+ dataSourceId: "ds_static_skills",
769
+ componentKey: "",
770
+ componentProps: {},
771
+ props: {},
772
+ validations: []
773
+ },
774
+ // ── 标题 ──
775
+ {
776
+ id: "title_salary",
777
+ nodeType: "title",
778
+ sort: 8,
779
+ title: "薪酬信息",
780
+ description: "",
781
+ level: 2,
782
+ customClass: ""
783
+ },
784
+ // ── 2列栅格:基本工资 + 绩效工资 ──
785
+ {
786
+ id: "grid_salary",
787
+ nodeType: "grid",
788
+ sort: 9,
789
+ gutter: 16,
790
+ labelWidth: "",
791
+ customClass: "",
792
+ columns: [
793
+ {
794
+ id: "col_base_salary",
795
+ sort: 0,
796
+ span: 12,
797
+ labelWidth: "",
798
+ customClass: "",
799
+ children: [
800
+ {
801
+ id: "field_baseSalary",
802
+ nodeType: "field",
803
+ sort: 0,
804
+ prop: "baseSalary",
805
+ label: "基本工资",
806
+ type: "floatNum",
807
+ defaultValue: null,
808
+ placeholder: "请输入金额",
809
+ required: !1,
810
+ disabled: !1,
811
+ hidden: !1,
812
+ labelWidth: "",
813
+ customClass: "",
814
+ dataSourceId: "",
815
+ componentKey: "",
816
+ componentProps: {},
817
+ props: { decimal: 2 },
818
+ validations: [{ type: "min", value: 0, message: "工资不能为负数", trigger: "change" }]
819
+ }
820
+ ]
821
+ },
822
+ {
823
+ id: "col_perf_salary",
824
+ sort: 1,
825
+ span: 12,
826
+ labelWidth: "",
827
+ customClass: "",
828
+ children: [
829
+ {
830
+ id: "field_perfSalary",
831
+ nodeType: "field",
832
+ sort: 0,
833
+ prop: "perfSalary",
834
+ label: "绩效工资",
835
+ type: "floatNum",
836
+ defaultValue: null,
837
+ placeholder: "请输入金额",
838
+ required: !1,
839
+ disabled: !1,
840
+ hidden: !1,
841
+ labelWidth: "",
842
+ customClass: "",
843
+ dataSourceId: "",
844
+ componentKey: "",
845
+ componentProps: {},
846
+ props: { decimal: 2 },
847
+ validations: []
848
+ }
849
+ ]
850
+ }
851
+ ]
852
+ },
853
+ // ── 附件上传 ──
854
+ {
855
+ id: "field_resume",
856
+ nodeType: "field",
857
+ sort: 10,
858
+ prop: "resume",
859
+ label: "简历附件",
860
+ type: "file",
861
+ defaultValue: [],
862
+ placeholder: "",
863
+ required: !1,
864
+ disabled: !1,
865
+ hidden: !1,
866
+ labelWidth: "",
867
+ customClass: "",
868
+ dataSourceId: "",
869
+ componentKey: "",
870
+ componentProps: {},
871
+ props: { fileType: ["pdf", "docx", "doc"], fileSize: 20, limit: 3 },
872
+ validations: []
873
+ },
874
+ // ── 头像上传 ──
875
+ {
876
+ id: "field_avatar",
877
+ nodeType: "field",
878
+ sort: 11,
879
+ prop: "avatar",
880
+ label: "员工头像",
881
+ type: "imgFile",
882
+ defaultValue: [],
883
+ placeholder: "",
884
+ required: !1,
885
+ disabled: !1,
886
+ hidden: !1,
887
+ labelWidth: "",
888
+ customClass: "",
889
+ dataSourceId: "",
890
+ componentKey: "",
891
+ componentProps: {},
892
+ props: { fileType: ["jpg", "jpeg", "png"], fileSize: 5, limit: 1 },
893
+ validations: []
894
+ },
895
+ // ── 备注 ──
896
+ {
897
+ id: "field_remark",
898
+ nodeType: "field",
899
+ sort: 12,
900
+ prop: "remark",
901
+ label: "备注",
902
+ type: "textarea",
903
+ defaultValue: "",
904
+ placeholder: "其他补充信息(选填)",
905
+ required: !1,
906
+ disabled: !1,
907
+ hidden: !1,
908
+ labelWidth: "",
909
+ customClass: "",
910
+ dataSourceId: "",
911
+ componentKey: "",
912
+ componentProps: {},
913
+ props: { rows: 4 },
914
+ validations: [{ type: "maxLength", value: 1e3, message: "备注不超过1000字", trigger: "blur" }],
915
+ extensions: { suffix: { enabled: !0 } }
916
+ },
917
+ // ── 富文本(验证宿主 Editor 插件注入) ──
918
+ {
919
+ id: "field_profile",
920
+ nodeType: "field",
921
+ sort: 13,
922
+ prop: "profile",
923
+ label: "个人简介",
924
+ type: "editor",
925
+ defaultValue: "",
926
+ placeholder: "",
927
+ required: !1,
928
+ disabled: !1,
929
+ hidden: !1,
930
+ labelWidth: "",
931
+ customClass: "",
932
+ dataSourceId: "",
933
+ componentKey: "",
934
+ componentProps: {},
935
+ props: { height: 180 },
936
+ validations: []
937
+ },
938
+ // ── 扩展组件:地址选择 ──
939
+ {
940
+ id: "field_project_address",
941
+ nodeType: "field",
942
+ sort: 14,
943
+ prop: "projectAddress",
944
+ label: "项目地址",
945
+ type: "addressSelector",
946
+ defaultValue: { province: "", city: "", county: "", detailAddress: "" },
947
+ placeholder: "",
948
+ required: !0,
949
+ disabled: !1,
950
+ hidden: !1,
951
+ labelWidth: "",
952
+ customClass: "",
953
+ dataSourceId: "ds_api_region_tree",
954
+ componentKey: "",
955
+ componentProps: {},
956
+ props: {
957
+ provinceProp: "province",
958
+ cityProp: "city",
959
+ countyProp: "county",
960
+ detailAddressProp: "detailAddress",
961
+ provincePlaceholder: "请选择省份",
962
+ cityPlaceholder: "请选择城市",
963
+ countyPlaceholder: "请选择区县",
964
+ detailPlaceholder: "请输入详细地址",
965
+ detailRequired: !0
966
+ },
967
+ validations: []
968
+ },
969
+ // ── 扩展组件:整数大写 ──
970
+ {
971
+ id: "field_installed_capacity",
972
+ nodeType: "field",
973
+ sort: 15,
974
+ prop: "installedCapacity",
975
+ label: "装机规模",
976
+ type: "integerUppercase",
977
+ defaultValue: "",
978
+ placeholder: "请输入装机规模",
979
+ required: !1,
980
+ disabled: !1,
981
+ hidden: !1,
982
+ labelWidth: "",
983
+ customClass: "",
984
+ dataSourceId: "",
985
+ componentKey: "",
986
+ componentProps: {},
987
+ props: { suffixText: "千瓦", maxLength: 16 },
988
+ validations: []
989
+ },
990
+ // ── 扩展组件:关联选择列表 ──
991
+ {
992
+ id: "field_land_nature",
993
+ nodeType: "field",
994
+ sort: 16,
995
+ prop: "landNature",
996
+ label: "土地性质",
997
+ type: "linkedSelectList",
998
+ defaultValue: [],
999
+ placeholder: "",
1000
+ required: !0,
1001
+ disabled: !1,
1002
+ hidden: !1,
1003
+ labelWidth: "",
1004
+ customClass: "",
1005
+ dataSourceId: "ds_static_land_nature",
1006
+ componentKey: "",
1007
+ componentProps: {},
1008
+ props: {
1009
+ parentValueProp: "parentValue",
1010
+ childValueProp: "childValue",
1011
+ firstPlaceholder: "请选择土地类型",
1012
+ secondPlaceholder: "请选择土地性质",
1013
+ addText: "点击新增土地性质",
1014
+ minItems: 1,
1015
+ maxItems: 5,
1016
+ allowDuplicate: !1,
1017
+ addButtonAlign: "center"
1018
+ },
1019
+ validations: []
1020
+ }
1021
+ ]
1022
+ };
1023
+ export {
1024
+ h as DEMO_SCHEMA,
1025
+ _ as mockDataSourceProvider
1026
+ };