@steedos/standard-object-database 2.6.1-beta.6 → 2.6.2-beta.10

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.
Files changed (57) hide show
  1. package/main/default/client/coordtransform.client.js +153 -0
  2. package/main/default/client/object_fields.client.js +149 -7
  3. package/main/default/objectTranslations/object_actions.en/object_actions.en.objectTranslation.yml +21 -0
  4. package/main/default/objectTranslations/object_actions.zh-CN/object_actions.zh-CN.objectTranslation.yml +21 -0
  5. package/main/default/objectTranslations/object_fields.en/object_fields.en.objectTranslation.yml +33 -2
  6. package/main/default/objectTranslations/object_fields.zh-CN/object_fields.zh-CN.objectTranslation.yml +38 -4
  7. package/main/default/objectTranslations/object_layouts.en/object_layouts.en.objectTranslation.yml +9 -0
  8. package/main/default/objectTranslations/object_layouts.zh-CN/object_layouts.zh-CN.objectTranslation.yml +9 -0
  9. package/main/default/objectTranslations/object_listviews.en/object_listviews.en.objectTranslation.yml +29 -1
  10. package/main/default/objectTranslations/object_listviews.zh-CN/object_listviews.zh-CN.objectTranslation.yml +27 -1
  11. package/main/default/objectTranslations/object_triggers.en/object_triggers.en.objectTranslation.yml +22 -1
  12. package/main/default/objectTranslations/object_triggers.zh-CN/object_triggers.zh-CN.objectTranslation.yml +22 -1
  13. package/main/default/objectTranslations/object_validation_rules.en/object_validation_rules.en.objectTranslation.yml +2 -0
  14. package/main/default/objectTranslations/object_validation_rules.zh-CN/object_validation_rules.zh-CN.objectTranslation.yml +2 -0
  15. package/main/default/objectTranslations/objects.en/objects.en.objectTranslation.yml +2 -0
  16. package/main/default/objectTranslations/objects.zh-CN/objects.zh-CN.objectTranslation.yml +2 -0
  17. package/main/default/objects/1.objects.observe.object.js +4 -1
  18. package/main/default/objects/16.permission_tabs.observe.object.js +44 -0
  19. package/main/default/objects/7.object_actions.observe.object.js +7 -1
  20. package/main/default/objects/object_actions.action.js +35 -4
  21. package/main/default/objects/object_actions.object.js +4 -2
  22. package/main/default/objects/object_actions.object.yml +73 -29
  23. package/main/default/objects/object_fields.object.js +33 -19
  24. package/main/default/objects/object_fields.object.yml +128 -54
  25. package/main/default/objects/object_layouts.action.js +4 -4
  26. package/main/default/objects/object_layouts.object.yml +28 -2
  27. package/main/default/objects/object_listviews.action.js +1 -1
  28. package/main/default/objects/object_listviews.object.js +3 -3
  29. package/main/default/objects/object_listviews.object.yml +67 -16
  30. package/main/default/objects/object_triggers.object.yml +13 -4
  31. package/main/default/objects/object_validation_rules.object.yml +10 -0
  32. package/main/default/objects/objects/buttons/custom.button.js +48 -0
  33. package/main/default/objects/objects/buttons/custom.button.yml +6 -0
  34. package/main/default/objects/objects.action.js +26 -3
  35. package/main/default/objects/objects.core.js +17 -1
  36. package/main/default/objects/objects.object.js +3 -2
  37. package/main/default/objects/objects.object.yml +28 -2
  38. package/main/default/objects/objects.tree.js +3 -2
  39. package/main/default/pages/design_field_layout.page.amis.json +416 -0
  40. package/main/default/pages/design_field_layout.page.yml +7 -0
  41. package/main/default/pages/object_detail.page.amis.json +6 -6
  42. package/main/default/pages/object_fields_form.page.amis.json +35 -0
  43. package/main/default/pages/object_fields_form.page.yml +12 -0
  44. package/main/default/pages/object_form.page.amis.json +31 -0
  45. package/main/default/pages/object_form.page.yml +12 -0
  46. package/main/default/routes/amis_button_design.router.js +19 -3
  47. package/main/default/routes/amis_listview_design.router.js +18 -4
  48. package/main/default/services/suggestions.service.js +4 -5
  49. package/main/default/triggers/object_actions.trigger.js +6 -2
  50. package/main/default/triggers/object_fields.trigger.js +67 -10
  51. package/main/default/triggers/object_listviews.trigger.js +27 -5
  52. package/main/default/triggers/objects.trigger.js +40 -29
  53. package/package.json +4 -3
  54. package/package.service.js +146 -3
  55. package/src/triggers/index.js +11 -0
  56. package/src/triggers/object_fields_trigger_create_index.js +58 -0
  57. package/main/default/objects/object_layouts/buttons/standard_edit.button.yml +0 -44
@@ -17,12 +17,16 @@ fields:
17
17
  write_requires_master_read: true
18
18
  filters: ['name', 'notcontains', ['base','core','space_users_invite','_object_reload_logs']]
19
19
  sort_no: 110
20
+ amis:
21
+ disabledOn: "true"
20
22
  label:
21
23
  type: text
22
24
  required: true
23
25
  label: Label
24
26
  is_name: true
25
27
  sort_no: 120
28
+ amis:
29
+ disabledOn: "${is_system == true}"
26
30
  _name:
27
31
  type: text
28
32
  label: Field Name
@@ -31,6 +35,8 @@ fields:
31
35
  required: true
32
36
  visible_on: "{{global.mode !='read' ? true : false}}"
33
37
  sort_no: 130
38
+ amis:
39
+ disabledOn: "${is_system == true}"
34
40
  name:
35
41
  type: text
36
42
  label: API Name
@@ -41,6 +47,8 @@ fields:
41
47
  readonly: true
42
48
  visible_on: "{{global.mode !='read' ? false : true}}"
43
49
  sort_no: 140
50
+ amis:
51
+ disabledOn: "${is_system == true}"
44
52
  type:
45
53
  type: select
46
54
  label: Type
@@ -86,6 +94,8 @@ fields:
86
94
  value: url
87
95
  - label: Email
88
96
  value: email
97
+ - label: Location
98
+ value: location
89
99
  - label: Image
90
100
  value: image
91
101
  - label: File
@@ -96,26 +106,8 @@ fields:
96
106
  value: summary
97
107
  sort_no: 150
98
108
  amis:
99
- onEvent:
100
- change:
101
- weight: 0
102
- actions:
103
- - componentId: 'u:6a556d8a8514'
104
- args:
105
- value: '${"lookup"=== type}'
106
- actionType: visibility
107
- - componentId: 'u:6a556d8a8514'
108
- args:
109
- value: clear
110
- groupType: component
111
- actionType: setValue
112
- expression: '${"lookup"=== type && required!=true}'
113
- - componentId: 'u:6a556d8a8514'
114
- args:
115
- value: retain
116
- groupType: component
117
- actionType: setValue
118
- expression: '${"lookup"=== type && required==true}'
109
+ disabledOn: "${is_system == true}"
110
+ searchable: true
119
111
  language:
120
112
  type: select
121
113
  label: 语言
@@ -202,6 +194,8 @@ fields:
202
194
  value: yaml
203
195
  sort_no: 155
204
196
  visible_on: "{{['code'].indexOf(formData.type) > -1 ? true: false}}"
197
+ amis:
198
+ disabledOn: "${is_system == true}"
205
199
  defaultValue:
206
200
  type: text
207
201
  label: Default Value
@@ -210,16 +204,25 @@ fields:
210
204
  type: text
211
205
  label: Group
212
206
  sort_no: 170
207
+ coordinatesType:
208
+ type: text
209
+ label: 坐标类型
210
+ sort_no: 175
211
+ defaultValue: bd09
212
+ visible_on: "{{['location'].indexOf(formData.type) > -1 ? true: false}}"
213
+ amis:
214
+ disabledOn: "${is_system == true}"
213
215
  reference_to:
214
216
  type: lookup
215
217
  label: Reference to
216
218
  reference_to: objects
217
219
  reference_to_field: name
218
220
  visible_on: "{{['lookup', 'master_detail'].indexOf(formData.type) > -1 ? true: false}}"
219
- required: "{{['master_detail'].indexOf(formData.type) > -1 ? true: false}}"
221
+ required: "{{['lookup','master_detail'].indexOf(formData.type) > -1 ? true: false}}"
220
222
  sort_no: 180
221
223
  amis:
222
224
  menuTpl: "<div>${label}(${value})</div>"
225
+ disabledOn: "${is_system == true}"
223
226
  depend_on:
224
227
  type: lookup
225
228
  group: Advanced
@@ -240,6 +243,16 @@ fields:
240
243
  }
241
244
  }
242
245
  sort_no: 445
246
+ amis:
247
+ disabledOn: "${is_system == true}"
248
+ create:
249
+ type: boolean
250
+ label: 是否显示新建按钮
251
+ defaultValue: true
252
+ visible_on: "{{['lookup'].indexOf(formData.type) > -1 ? true: false}}"
253
+ sort_no: 185
254
+ amis:
255
+ disabledOn: "${is_system == true}"
243
256
  reference_to_field:
244
257
  type: lookup
245
258
  group: Advanced
@@ -260,18 +273,24 @@ fields:
260
273
  }
261
274
  }
262
275
  sort_no: 440
276
+ amis:
277
+ disabledOn: "${is_system == true}"
263
278
  multiple:
264
279
  type: boolean
265
280
  label: Multiple
266
281
  inlineHelpText: Single choice and multiple choice switch to each other. Please resubmit the existing records or modify the saving format of this field in the database.
267
282
  visible_on: "{{['select', 'lookup', 'image','file'].indexOf(formData.type) > -1 ? true: false}}"
268
283
  sort_no: 190
284
+ amis:
285
+ disabledOn: "${is_system == true}"
269
286
  write_requires_master_read:
270
287
  label: Write requires master read
271
288
  type: boolean
272
289
  inlineHelpText: Sets the minimum sharing access level required on the master record to create, edit, or delete child records. This field applies only to master-detail or junction object custom field types. true—Allows users with “Read” access to the master record permission to create, edit, or delete child records. This setting makes sharing less restrictive. false—Allows users with “Read/Write” access to the master record permission to create, edit, or delete child records. This setting is more restrictive than true, and is the default value.
273
290
  visible_on: "{{formData.type === 'master_detail' ? true: false}}"
274
291
  sort_no: 200
292
+ amis:
293
+ disabledOn: "${is_system == true}"
275
294
  formula:
276
295
  label: Formula
277
296
  type: textarea
@@ -280,6 +299,8 @@ fields:
280
299
  visible_on: "{{['autonumber', 'formula'].indexOf(formData.type) > -1 ? true: false}}"
281
300
  required: "{{['autonumber', 'formula'].indexOf(formData.type) > -1 ? true: false}}"
282
301
  sort_no: 210
302
+ amis:
303
+ disabledOn: "${is_system == true}"
283
304
  data_type:
284
305
  type: lookup
285
306
  label: Data Type
@@ -294,6 +315,8 @@ fields:
294
315
  visible_on: "{{['formula','select'].indexOf(formData.type) > -1 ? true: false}}"
295
316
  required: "{{['formula'].indexOf(formData.type) > -1 ? true: false}}"
296
317
  sort_no: 220
318
+ amis:
319
+ disabledOn: "${is_system == true}"
297
320
  filtersFunction:
298
321
  label: filters Function
299
322
  type: code
@@ -303,6 +326,7 @@ fields:
303
326
  sort_no: 448
304
327
  group: Advanced
305
328
  amis:
329
+ disabledOn: "${is_system == true}"
306
330
  placeholder: |-
307
331
  function(filters, values){
308
332
 
@@ -319,6 +343,7 @@ fields:
319
343
  scale: 0
320
344
  amis:
321
345
  value: 18
346
+ disabledOn: "${is_system == true}"
322
347
  # defaultValue: 18
323
348
  visible_on: "{{
324
349
  (function(){
@@ -358,6 +383,7 @@ fields:
358
383
  # defaultValue: 2
359
384
  amis:
360
385
  value: 2
386
+ disabledOn: "${is_system == true}"
361
387
  min: 0
362
388
  inlineHelpText: If the field type is a Percent, this indicates the number of decimal places the field will display, for example, two decimal places will display as 10.20%.
363
389
  visible_on: "{{
@@ -412,6 +438,8 @@ fields:
412
438
  visible_on: "{{formData.type === 'select' ? true: false}}"
413
439
  required: "{{formData.type === 'select' ? true: false}}"
414
440
  sort_no: 280
441
+ amis:
442
+ disabledOn: "${is_system == true}"
415
443
  options.$:
416
444
  label: Options
417
445
  blackbox: true
@@ -445,6 +473,8 @@ fields:
445
473
  visible_on: "{{['formula'].indexOf(formData.type) > -1 ? true: false}}"
446
474
  required: "{{['formula'].indexOf(formData.type) > -1 ? true: false}}"
447
475
  sort_no: 290
476
+ amis:
477
+ disabledOn: "${is_system == true}"
448
478
  summary_object:
449
479
  type: lookup
450
480
  label: Object to Summarize
@@ -454,6 +484,7 @@ fields:
454
484
  depend_on:
455
485
  - object
456
486
  amis:
487
+ disabledOn: "${is_system == true}"
457
488
  "source":
458
489
  "method": "get"
459
490
  "url": "${context.rootUrl}/service/api/amis-metadata-objects/objects/${object}/detailLists/options?depend_on_object=${object}"
@@ -518,6 +549,8 @@ fields:
518
549
  visible_on: "{{formData.type === 'summary' ? true: false}}"
519
550
  required: "{{formData.type === 'summary' ? true: false}}"
520
551
  sort_no: 310
552
+ amis:
553
+ disabledOn: "${is_system == true}"
521
554
  summary_field:
522
555
  type: lookup
523
556
  label: Field to Aggregate
@@ -528,7 +561,9 @@ fields:
528
561
  - summary_object
529
562
  - summary_type
530
563
  defaultIcon: service_contract
564
+ enable_enhanced_lookup: false
531
565
  amis:
566
+ disabledOn: "${is_system == true}"
532
567
  "autoComplete":
533
568
  "method": "get"
534
569
  "url": "${context.rootUrl}/service/api/@${summary_object}/uiSchema?summary_object=${summary_object}&summary_type=${summary_type}&term=${term}"
@@ -538,7 +573,7 @@ fields:
538
573
  "Authorization": "Bearer ${context.tenantId},${context.authToken}"
539
574
  "sendOn": "!!this.summary_object && !!this.summary_type"
540
575
  "adaptor": "const summary_type = api.body.summary_type;\nconst term = api.query.term;\nlet fields = payload.fields;\nlet options = [];\nif (fields) {\n if (summary_type && summary_type !== \"count\") {\n if (summary_type === \"sum\" || summary_type === \"avg\") {\n /*sum/avg类型可以汇总数值、金额、百分比字段*/\n _.forEach(fields, (value, key) => {\n let fieldType = value.type;\n if ([\"formula\", \"summary\"].indexOf(fieldType) > -1) {\n /*要聚合的字段为公式或汇总字段时,按其字段数据类型判断是否支持聚合*/\n fieldType = value.data_type;\n }\n if ([\"number\", \"currency\", \"percent\"].indexOf(fieldType) > -1) {\n options.push({ label: value.label, value: value.name });\n }\n })\n }\n else {\n /*min、max类型可以汇总数值、金额、百分比、日期、日期时间字段*/\n _.forEach(fields, (value, key) => {\n let fieldType = value.type;\n if ([\"formula\", \"summary\"].indexOf(fieldType) > -1) {\n /*要聚合的字段为公式或汇总字段时,按其字段数据类型判断是否支持聚合*/\n fieldType = value.data_type;\n }\n if ([\"number\", \"currency\", \"percent\", \"date\", \"datetime\"].indexOf(fieldType) > -1) {\n options.push({ label: value.label, value: value.name });\n }\n })\n }\n }\n if (term) {\n options = _.filter(options, (item) => {\n return item.label.toLowerCase().indexOf(term.toLowerCase()) > -1;\n })\n }\n}\npayload = {\n data: { options: options },\n msg: \"\",\n status: 0\n}\nreturn payload;"
541
- visible_on: "{{formData.type === 'summary' && formData.summary_type !== 'count' ? true: false}}"
576
+ visible_on: "{{formData.type === 'summary' && formData.summary_object && formData.summary_type && formData.summary_type !== 'count'}}"
542
577
  required: "{{formData.type === 'summary' && formData.summary_type !== 'count' ? true: false}}"
543
578
  sort_no: 320
544
579
  summary_filters:
@@ -550,6 +585,8 @@ fields:
550
585
  - summary_object
551
586
  visible_on: "{{formData.type === 'summary' && global.mode !='read' ? true: false}}"
552
587
  sort_no: 330
588
+ amis:
589
+ disabledOn: "${is_system == true}"
553
590
  summary_filters.$:
554
591
  label: Filter Criteria
555
592
  blackbox: true
@@ -610,48 +647,45 @@ fields:
610
647
  group: External data source
611
648
  # visible_on: "{{true}}"
612
649
  sort_no: 340
650
+ amis:
651
+ disabledOn: "${is_system == true}"
613
652
  primary:
614
653
  type: boolean
615
654
  label: Primary Key
616
655
  group: External data source
617
656
  # visible_on: "{{true}}"
618
657
  sort_no: 350
658
+ amis:
659
+ disabledOn: "${is_system == true}"
619
660
  generated:
620
661
  type: boolean
621
662
  label: Generated
622
663
  group: External data source
623
664
  # visible_on: "{{formData.database_name || formData.datasource ? true: false}}"
624
665
  sort_no: 360
666
+ amis:
667
+ disabledOn: "${is_system == true}"
625
668
  sort_no:
626
669
  label: Sort Number
627
670
  type: number
628
671
  defaultValue: 100
629
672
  scale: 0
630
673
  sortable: true
631
- group: Advanced
674
+ group: ui
632
675
  sort_no: 370
633
676
  is_name:
634
677
  type: boolean
635
678
  label: Is Name
636
- group: Advanced
679
+ group: External data source
637
680
  sort_no: 380
681
+ amis:
682
+ disabledOn: "${is_system == true}"
638
683
  required:
639
684
  type: boolean
640
685
  label: Required
641
686
  # group: Advanced
642
687
  visible_on: "{{['autonumber','summary','formula'].indexOf(formData.type) > -1 ? false: true}}"
643
688
  sort_no: 272
644
- amis:
645
- onEvent:
646
- change:
647
- weight: 0
648
- actions:
649
- - componentId: 'u:6a556d8a8514'
650
- args:
651
- value: retain
652
- groupType: component
653
- actionType: setValue
654
- expression: '${"lookup"=== type && required==true}'
655
689
  deleted_lookup_record_behavior:
656
690
  type: select
657
691
  label: 如果相关表记录被删除怎么办?
@@ -664,45 +698,53 @@ fields:
664
698
  value: retain
665
699
  sort_no: 276
666
700
  is_wide: true
667
- defaultValue: clear
668
701
  amis:
669
- "id": "u:6a556d8a8514"
670
702
  "disabledOn": "${required==true}"
703
+ "value": "${IFS(true===required, \"retain\", !required && !deleted_lookup_record_behavior, \"clear\", deleted_lookup_record_behavior)}"
671
704
  is_wide:
672
705
  type: boolean
673
706
  label: Is Wide
674
707
  # group: Advanced
675
- # readonly:
676
- # type: boolean
677
- # label: Readonly
678
- # group: Advanced
679
- # hidden:
680
- # type: boolean
681
- # label: Hidden
682
- # group: Advanced
708
+ sort_no: 274
709
+ group: ui
710
+ readonly:
711
+ type: boolean
712
+ label: Readonly
713
+ group: ui
714
+ hidden:
715
+ type: boolean
716
+ label: Hidden
717
+ group: ui
683
718
  # omit:
684
719
  # type: boolean
685
720
  # label: Omit
686
721
  # group: Advanced
687
- sort_no: 274
688
722
  index:
689
723
  type: boolean
690
724
  label: Is Index Field
691
725
  group: Advanced
692
726
  sort_no: 410
727
+ inlineHelpText: The Creation Is Executed Once A Day By Default And The Existing Indexes Are Not Repeatedly Created.
728
+ unique:
729
+ type: boolean
730
+ label: Unique Index
731
+ group: Advanced
732
+ sort_no: 411
733
+ inlineHelpText: The Creation Is Executed Once A Day By Default And The Existing Indexes Are Not Repeatedly Created.
693
734
  sortable:
694
735
  type: boolean
695
736
  label: Sortable
696
- group: Advanced
697
- # searchable:
698
- # type: boolean
699
- # label: Searchable
700
- # group: Advanced
737
+ group: ui
701
738
  sort_no: 420
739
+ searchable:
740
+ type: boolean
741
+ label: Searchable
742
+ group: ui
743
+ sort_no: 428
702
744
  filterable:
703
745
  type: boolean
704
746
  label: Filterable
705
- group: Advanced
747
+ group: ui
706
748
  sort_no: 430
707
749
  show_as_qr:
708
750
  type: boolean
@@ -710,12 +752,15 @@ fields:
710
752
  # group: Advanced
711
753
  visible_on: "{{formData.type === 'url' ? true: false}}"
712
754
  sort_no: 440
755
+ amis:
756
+ disabledOn: "${is_system == true}"
713
757
  visible_on:
714
758
  type: textarea
715
759
  label: Visible On
716
760
  is_wide: true
717
- group: Advanced
761
+ group: ui
718
762
  sort_no: 450
763
+ inlineHelpText: <a href='https://docs.steedos.com/zh-CN/no-code/customize/fields/field-attributes#%E5%AD%97%E6%AE%B5%E6%98%BE%E7%A4%BA%E5%85%AC%E5%BC%8F' target='_blank'>查看帮助</a>
719
764
  inlineHelpText:
720
765
  label: Prompt text
721
766
  type: textarea
@@ -735,6 +780,15 @@ fields:
735
780
  is_wide: true
736
781
  group: Advanced
737
782
  sort_no: 455
783
+ inlineHelpText: <a href='https://docs.steedos.com/zh-CN/no-code/customize/fields/field-attributes/#amis-%E5%B1%9E%E6%80%A7' target='_blank'>查看帮助</a>
784
+ is_system:
785
+ type: boolean
786
+ label: System
787
+ visible_on: "{{false}}"
788
+ enable_enhanced_lookup:
789
+ type: boolean
790
+ label: Enable Enhanced Lookup
791
+ hidden: true # 这里不可以用 visible_on: "{{false}}",否则在界面上新建字段时会被默认设置为false
738
792
  paging:
739
793
  enabled: false
740
794
  list_views:
@@ -747,11 +801,30 @@ list_views:
747
801
  - object
748
802
  - sort_no
749
803
  - modified
804
+ - hidden
805
+ - readonly
806
+ - is_system
750
807
  sort:
751
808
  - field_name: sort_no
752
809
  order: asc
753
810
  label: All
754
811
  filter_scope: space
812
+ customize:
813
+ columns:
814
+ - label
815
+ - name
816
+ - group
817
+ - type
818
+ - object
819
+ - sort_no
820
+ - modified
821
+ - hidden
822
+ - readonly
823
+ - is_system
824
+ label: 自定义
825
+ filters:
826
+ - ["is_system","<>",true]
827
+ filter_scope: space
755
828
  actions:
756
829
  recomputeFormulaValues:
757
830
  label: Recompute Formula Values
@@ -779,7 +852,8 @@ relatedList:
779
852
  form:
780
853
  initialValues: !!js/function |
781
854
  function(){
782
- var object = Creator.odata.get('objects', Session.get("record_id"), "fields_serial_number");
855
+ //应用程序微页面内Session.get("record_id")获取不到值(比如设计字段布局微页面)
856
+ var object = Creator.odata.get('objects', Session.get("record_id") || (this.master && this.master.recordId), "fields_serial_number");
783
857
  if(object){
784
858
  let fields_serial_number = object.fields_serial_number
785
859
  if(!fields_serial_number || fields_serial_number < 100){
@@ -1,8 +1,8 @@
1
1
  /*
2
2
  * @Author: baozhoutao@steedos.com
3
3
  * @Date: 2022-03-28 09:35:34
4
- * @LastEditors: sunhaolin@hotoa.com
5
- * @LastEditTime: 2023-03-05 16:47:05
4
+ * @LastEditors: baozhoutao@steedos.com
5
+ * @LastEditTime: 2023-10-16 16:50:45
6
6
  * @Description:
7
7
  */
8
8
  module.exports = {
@@ -22,8 +22,8 @@ module.exports = {
22
22
  FlowRouter.reload();
23
23
  }
24
24
  },
25
- createDefaultRecordViewVisible: function(object_name, record_id, record_permissions){
26
- if(!Creator.isSpaceAdmin()){
25
+ createDefaultRecordViewVisible: function(object_name, record_id, record_permissions, data){
26
+ if(!Creator.isSpaceAdmin() || data.record.name == 'users'){
27
27
  return false
28
28
  }
29
29
  return true;
@@ -1,7 +1,7 @@
1
1
  name: object_layouts
2
2
  label: Object Layouts
3
3
  icon: dashboard_ea
4
- hidden: false
4
+ hidden: true
5
5
  version: 2
6
6
  enable_dataloader: false
7
7
  fields:
@@ -10,19 +10,23 @@ fields:
10
10
  required: true
11
11
  label: Api Name
12
12
  is_wide: true
13
+ group: general_information
13
14
  label:
14
15
  type: text
15
16
  required: true
16
17
  label: Label
17
18
  is_wide: true
18
19
  is_name: true
20
+ group: general_information
19
21
  object_name:
20
22
  label: Object
21
23
  type: master_detail
22
24
  required: true
23
25
  reference_to: objects
24
26
  reference_to_field: name
27
+ is_wide: true
25
28
  write_requires_master_read: true
29
+ group: general_information
26
30
  type:
27
31
  type: select
28
32
  options:
@@ -42,6 +46,10 @@ fields:
42
46
  create: false
43
47
  reference_to: permission_set
44
48
  reference_to_field: name
49
+ is_wide: true
50
+ defaultValue:
51
+ - admin
52
+ - user
45
53
  optionsFunction: !<tag:yaml.org,2002:js/function> |-
46
54
  function () {
47
55
  var profiles = Creator.odata.query('permission_set', {$filter: "(type eq 'profile')"}, true);
@@ -54,12 +62,14 @@ fields:
54
62
  });
55
63
  return result;
56
64
  }
65
+ group: general_information
57
66
  buttons:
58
67
  type: grid
59
68
  blackbox: true
60
69
  is_wide: true
61
70
  depend_on:
62
71
  - object_name
72
+ group: buttons
63
73
  buttons.$.button_name:
64
74
  type: lookup
65
75
  reference_to: object_actions
@@ -74,15 +84,18 @@ fields:
74
84
  type: grid
75
85
  blackbox: true
76
86
  is_wide: true
77
- hidden: true
87
+ hidden: false
78
88
  field_groups.$.group_name:
79
89
  type: text
90
+ field_groups.$.visible_on:
91
+ type: text
80
92
  fields:
81
93
  type: grid
82
94
  is_wide: true
83
95
  required: true
84
96
  depend_on:
85
97
  - object_name
98
+ group: fields
86
99
  fields.$:
87
100
  label: Field
88
101
  blackbox: true
@@ -116,8 +129,11 @@ fields:
116
129
  is_wide: true
117
130
  depend_on:
118
131
  - object_name
132
+ group: related_lists
119
133
  related_lists.$.related_field_fullname:
120
134
  type: lookup
135
+ amis:
136
+ tpl: ${related_field_fullname.label}
121
137
  optionsFunction: !!js/function |
122
138
  function(values) {
123
139
  if (!(values != null ? values.object_name : void 0)) {
@@ -299,6 +315,16 @@ list_views:
299
315
  - is_system
300
316
  label: All
301
317
  filter_scope: space
318
+ customize:
319
+ columns:
320
+ - label
321
+ - object_name
322
+ - profiles
323
+ - is_system
324
+ label: 自定义
325
+ filters:
326
+ - ["is_system","<>",true]
327
+ filter_scope: space
302
328
  actions:
303
329
  createDefaultRecordView:
304
330
  on: list
@@ -92,7 +92,7 @@ module.exports = {
92
92
  return true;
93
93
  },
94
94
  showDesign: function (object_name, record_id) {
95
- document.location = Steedos.absoluteUrl(`/api/amisListviewDesign?id=${record_id}&object=${this.record.object_name}&assetUrls=${Builder.settings.assetUrls}`);
95
+ document.location = Steedos.absoluteUrl(`/api/amisListviewDesign?id=${record_id}&object=${this.record.object_name}&assetUrls=${Builder.settings.assetUrls}&locale=${Builder.settings.locale}`);
96
96
  },
97
97
  showDesignVisible: function (object_name, record_id, record_permissions) {
98
98
  var perms= {};
@@ -1,8 +1,8 @@
1
1
  /*
2
2
  * @Author: baozhoutao@steedos.com
3
3
  * @Date: 2022-03-28 09:35:34
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2022-05-30 18:38:47
4
+ * @LastEditors: 孙浩林 sunhaolin@steedos.com
5
+ * @LastEditTime: 2023-07-13 13:28:02
6
6
  * @Description:
7
7
  */
8
8
  const _ = require("underscore");
@@ -91,7 +91,7 @@ Creator.Objects['object_listviews'].triggers = Object.assign(Creator.Objects['ob
91
91
  on: "server",
92
92
  when: "before.remove",
93
93
  todo: function (userId, doc) {
94
- console.log("before.remove");
94
+ // console.log("before.remove");
95
95
  if (doc.owner !== userId) {
96
96
  throw new Meteor.Error(403, "can only remove own list view");
97
97
  }