aldehyde 0.2.234 → 0.2.236

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 (102) hide show
  1. package/lib/controls/entity-select/popover-entity-select.d.ts.map +1 -1
  2. package/lib/controls/entity-select/popover-entity-select.js +3 -3
  3. package/lib/controls/entity-select/popover-entity-select.js.map +1 -1
  4. package/lib/controls/entry-control.d.ts.map +1 -1
  5. package/lib/controls/entry-control.js +6 -0
  6. package/lib/controls/entry-control.js.map +1 -1
  7. package/lib/controls/file-view/drawer-file-view.js +1 -1
  8. package/lib/controls/file-view/drawer-file-view.js.map +1 -1
  9. package/lib/controls/file-view/index.d.ts +1 -1
  10. package/lib/controls/file-view/index.d.ts.map +1 -1
  11. package/lib/controls/file-view/index.js +3 -3
  12. package/lib/controls/file-view/index.js.map +1 -1
  13. package/lib/controls/file-view/multi-file-view.d.ts +12 -0
  14. package/lib/controls/file-view/multi-file-view.d.ts.map +1 -0
  15. package/lib/controls/file-view/multi-file-view.js +27 -0
  16. package/lib/controls/file-view/multi-file-view.js.map +1 -0
  17. package/lib/controls/tree-select/tree-entity-select.d.ts.map +1 -1
  18. package/lib/controls/tree-select/tree-entity-select.js +0 -1
  19. package/lib/controls/tree-select/tree-entity-select.js.map +1 -1
  20. package/lib/controls/upload/index.d.ts.map +1 -1
  21. package/lib/controls/upload/index.js +3 -2
  22. package/lib/controls/upload/index.js.map +1 -1
  23. package/lib/controls/upload/mult-file-upload.d.ts +33 -0
  24. package/lib/controls/upload/mult-file-upload.d.ts.map +1 -0
  25. package/lib/controls/upload/mult-file-upload.js +181 -0
  26. package/lib/controls/upload/mult-file-upload.js.map +1 -0
  27. package/lib/controls/view-control.d.ts.map +1 -1
  28. package/lib/controls/view-control.js +5 -14
  29. package/lib/controls/view-control.js.map +1 -1
  30. package/lib/detail/view/act-dtmpl-view.d.ts.map +1 -1
  31. package/lib/detail/view/act-dtmpl-view.js.map +1 -1
  32. package/lib/detail/view/dtmpl-view.d.ts.map +1 -1
  33. package/lib/detail/view/dtmpl-view.js +0 -3
  34. package/lib/detail/view/dtmpl-view.js.map +1 -1
  35. package/lib/detail/view/tab-act-dtmpl-view.d.ts +66 -0
  36. package/lib/detail/view/tab-act-dtmpl-view.d.ts.map +1 -0
  37. package/lib/detail/view/tab-act-dtmpl-view.js +182 -0
  38. package/lib/detail/view/tab-act-dtmpl-view.js.map +1 -0
  39. package/lib/form/criteria-form.d.ts.map +1 -1
  40. package/lib/form/criteria-form.js +11 -3
  41. package/lib/form/criteria-form.js.map +1 -1
  42. package/lib/module/dtmpl-edit-card.d.ts.map +1 -1
  43. package/lib/module/dtmpl-edit-card.js +0 -1
  44. package/lib/module/dtmpl-edit-card.js.map +1 -1
  45. package/lib/routable/dtmpl-route.d.ts.map +1 -1
  46. package/lib/routable/dtmpl-route.js +2 -2
  47. package/lib/routable/dtmpl-route.js.map +1 -1
  48. package/lib/routable/ltmpl-route.d.ts.map +1 -1
  49. package/lib/routable/ltmpl-route.js +0 -4
  50. package/lib/routable/ltmpl-route.js.map +1 -1
  51. package/lib/table/act-table.d.ts +6 -1
  52. package/lib/table/act-table.d.ts.map +1 -1
  53. package/lib/table/act-table.js +47 -29
  54. package/lib/table/act-table.js.map +1 -1
  55. package/lib/table/column/column-builder.d.ts.map +1 -1
  56. package/lib/table/column/column-builder.js +98 -79
  57. package/lib/table/column/column-builder.js.map +1 -1
  58. package/lib/table/query-table.d.ts +3 -3
  59. package/lib/table/query-table.d.ts.map +1 -1
  60. package/lib/table/query-table.js +28 -9
  61. package/lib/table/query-table.js.map +1 -1
  62. package/lib/table/stat/restat.d.ts +1 -1
  63. package/lib/table/stat/restat.d.ts.map +1 -1
  64. package/lib/table/stat/restat.js +1 -1
  65. package/lib/table/stat/restat.js.map +1 -1
  66. package/lib/tmpl/control-type-supportor.d.ts.map +1 -1
  67. package/lib/tmpl/control-type-supportor.js +1 -0
  68. package/lib/tmpl/control-type-supportor.js.map +1 -1
  69. package/lib/tmpl/hcservice-v3.d.ts +3 -2
  70. package/lib/tmpl/hcservice-v3.d.ts.map +1 -1
  71. package/lib/tmpl/hcservice-v3.js +40 -21
  72. package/lib/tmpl/hcservice-v3.js.map +1 -1
  73. package/lib/tmpl/interface.d.ts +18 -0
  74. package/lib/tmpl/interface.d.ts.map +1 -1
  75. package/lib/tmpl/interface.js.map +1 -1
  76. package/lib/tree/tree-utils.js +1 -1
  77. package/lib/tree/tree-utils.js.map +1 -1
  78. package/package.json +2 -2
  79. package/src/aldehyde/controls/entity-select/popover-entity-select.tsx +4 -3
  80. package/src/aldehyde/controls/entry-control.tsx +6 -0
  81. package/src/aldehyde/controls/file-view/drawer-file-view.tsx +1 -1
  82. package/src/aldehyde/controls/file-view/index.tsx +4 -4
  83. package/src/aldehyde/controls/file-view/multi-file-view.tsx +43 -0
  84. package/src/aldehyde/controls/tree-select/tree-entity-select.tsx +0 -1
  85. package/src/aldehyde/controls/upload/index.tsx +8 -3
  86. package/src/aldehyde/controls/upload/mult-file-upload.tsx +216 -0
  87. package/src/aldehyde/controls/view-control.tsx +5 -14
  88. package/src/aldehyde/detail/view/act-dtmpl-view.tsx +0 -2
  89. package/src/aldehyde/detail/view/dtmpl-view.tsx +1 -4
  90. package/src/aldehyde/detail/view/tab-act-dtmpl-view.tsx +307 -0
  91. package/src/aldehyde/form/criteria-form.tsx +23 -3
  92. package/src/aldehyde/module/dtmpl-edit-card.tsx +0 -1
  93. package/src/aldehyde/routable/dtmpl-route.tsx +2 -1
  94. package/src/aldehyde/routable/ltmpl-route.tsx +1 -4
  95. package/src/aldehyde/table/act-table.tsx +72 -142
  96. package/src/aldehyde/table/column/column-builder.tsx +249 -251
  97. package/src/aldehyde/table/query-table.tsx +41 -11
  98. package/src/aldehyde/table/stat/restat.tsx +2 -3
  99. package/src/aldehyde/tmpl/control-type-supportor.tsx +1 -0
  100. package/src/aldehyde/tmpl/hcservice-v3.tsx +38 -22
  101. package/src/aldehyde/tmpl/interface.tsx +20 -0
  102. package/src/aldehyde/tree/tree-utils.tsx +1 -1
@@ -4,7 +4,6 @@ import {
4
4
  Card,
5
5
  Form as AntdForm,
6
6
  FormInstance,
7
- Popconfirm,
8
7
  Popover,
9
8
  Space,
10
9
  Tooltip,
@@ -16,7 +15,7 @@ import FormItemGroup from "../../form/form-Item-group";
16
15
  import HcserviceV3 from "../../tmpl/hcservice-v3";
17
16
  import { LocaleContext } from "../../locale/LocaleProvider";
18
17
  interface RestatProps {
19
- onfinish: () => void;
18
+ onfinish: (value) => void;
20
19
  fields: FieldConfig[];
21
20
  value?: object;
22
21
  serverKey?: string;
@@ -46,7 +45,7 @@ class Restat extends React.PureComponent<RestatProps, RestatStat> {
46
45
  this.setState({
47
46
  loading: false,
48
47
  });
49
- onfinish();
48
+ onfinish(val);
50
49
  };
51
50
 
52
51
  render() {
@@ -79,6 +79,7 @@ SupportInputTypes.add('tree-entity-select');
79
79
  SupportInputTypes.add('ltree-entity-select-value');
80
80
  SupportInputTypes.add('ltree-entity-select');
81
81
  SupportInputTypes.add('field-history');
82
+ SupportInputTypes.add('relfile');
82
83
 
83
84
 
84
85
  function ControlTypeSupportor(){
@@ -57,21 +57,29 @@ export default class HcserviceV3 {
57
57
  filePath.contentType = this.getFileSuffixFrom(filePath.fileName);
58
58
  } else {
59
59
  let jsonValue = this.getJsonValue(value);
60
- if (jsonValue) {
61
-
62
- filePath.path = this.getFileUrl(serverKey, jsonValue.base?.path);
63
- filePath.iconPath = jsonValue.icon?.path ? this.getFileUrl(serverKey, jsonValue.icon?.path) : null;
64
- filePath.fileName = jsonValue.fileName ? jsonValue.fileName : this.getFileNameFrom(jsonValue.base?.path);
65
- filePath.contentType = this.getFileSuffixFrom(filePath.fileName);
66
- filePath.valid = jsonValue.valid;
67
- filePath.baseType=jsonValue.base?.type;
68
- filePath.basePath=jsonValue.base?.path;
69
- }
60
+ filePath=this.toFilePathObject(jsonValue,serverKey);
70
61
  }
62
+ }else if(value.base){
63
+ filePath=this.toFilePathObject(value,serverKey);
71
64
  }
72
65
  return filePath;
73
66
  }
74
67
 
68
+ static toFilePathObject(jsonValue,serverKey:string){
69
+ let filePath:any={};
70
+ if (jsonValue) {
71
+ filePath.path = this.getFileUrl(serverKey, jsonValue.base?.path);
72
+ filePath.iconPath = jsonValue.icon?.path ? this.getFileUrl(serverKey, jsonValue.icon?.path) : null;
73
+ filePath.fileName = jsonValue.fileName ? jsonValue.fileName : this.getFileNameFrom(jsonValue.base?.path);
74
+ filePath.contentType = this.getFileSuffixFrom(filePath.fileName);
75
+ filePath.valid = jsonValue.valid;
76
+ filePath.baseType=jsonValue.base?.type;
77
+ filePath.basePath=jsonValue.base?.path;
78
+ return filePath;
79
+ }
80
+ return null;
81
+ }
82
+
75
83
  static async requestEnumWithPath(serverKey: string, mstrucIds, path) {
76
84
  if (mstrucIds.length > 0) {
77
85
  let res = await Super.super({
@@ -667,23 +675,16 @@ export default class HcserviceV3 {
667
675
  }
668
676
  }
669
677
 
670
- static async requestQueryCount(serverKey: string, queryKey: string) {
678
+ static async requestQueryAggregates(serverKey: string, queryKey: string) {
671
679
  let res = await Super.super({
672
680
  url: `/v3/ltmpl/query/count`,
673
681
  serverKey,
674
682
  method: "GET",
675
683
  query: { queryKey },
676
684
  });
677
- return res.count;
685
+ return res;
678
686
  }
679
687
 
680
- // static async requestFile(path) {
681
- // let res = await Super.super({
682
- // url: Units.joinPath("/v3/files/", path),
683
- // method: "GET"
684
- // });
685
- // return res;
686
- // }
687
688
 
688
689
  static async postActions(
689
690
  serverKey: string,
@@ -863,13 +864,28 @@ export default class HcserviceV3 {
863
864
  Units.openFile(path, fileName, toolbar);
864
865
  }
865
866
 
866
- static getFileUrl(serverKey: string, path) {
867
+ static getFileUrl(serverKey: string, path:string) {
867
868
  const hydrocarbonToken = Units.hydrocarbonToken(
868
869
  Units.programCode(serverKey)
869
870
  );
870
- let url =
871
- Units.joinPath(Units.api(serverKey), Units.joinPath("/v3/files", path)) +
871
+ let root;
872
+ let url;
873
+ //判断是否为全URL
874
+ if(path?.startsWith("http") || path?.startsWith("HTTP")){
875
+ root=path;
876
+ if(path.indexOf("?")>0){
877
+ url = root +
878
+ `&@token=${hydrocarbonToken}&@programToken=${Units.programCode()}`;
879
+ }else{
880
+ url = root +
881
+ `?@token=${hydrocarbonToken}&@programToken=${Units.programCode()}`;
882
+ }
883
+ }else{
884
+ root=Units.joinPath(Units.api(serverKey), Units.joinPath("/v3/files", path));
885
+ url = root +
872
886
  `?@token=${hydrocarbonToken}&@programToken=${Units.programCode()}`;
887
+ }
888
+
873
889
  let encodeUri = encodeURI(url);
874
890
  return encodeUri;
875
891
  }
@@ -57,6 +57,19 @@ export interface QueryTableProps extends ReportTableProps{
57
57
  groupIColumns?: { id: string; title: string; sourceId: string }[]; // 组间合计key
58
58
  doSearch?: (params: object) => void;
59
59
  sortColumnData?: string[];
60
+ queryTotal?:()=> any; //暂时无用
61
+ }
62
+
63
+ export interface AggregateVO {
64
+ queryKey?: string;
65
+ aggregates?: AggregateValue[];
66
+ count?: number;
67
+ }
68
+
69
+ export interface AggregateValue {
70
+ fieldTitle?: string;
71
+ fieldId?: string;
72
+ value?: number;
60
73
  }
61
74
 
62
75
 
@@ -304,6 +317,8 @@ export interface DtmplConfig extends TmplBase {
304
317
  editAction?: ActionConfig;
305
318
  actions?: ActionConfig[];
306
319
  viewActions?: ActionConfig[];
320
+ viewRactions?:RActionConfig[];
321
+ editRactions?:RActionConfig[];
307
322
  premises?: FieldConfig[];
308
323
  groups?: FieldGroupConfig[];
309
324
  buttonPosition?: ButtonPosition;
@@ -389,6 +404,8 @@ export interface SelectConfig extends TmplBase {
389
404
  defaultPageSize: number;
390
405
  buttons: ButtonName[];
391
406
  builtInButtons: BuiltInButtonName[];
407
+ defShowCriteriaCount:number;
408
+ defShowRowActionCount:number;
392
409
  columns: ColumnConfig[];
393
410
  criterias: CriteriaConfig[];
394
411
  defaultCriteriaValue?: object;
@@ -655,6 +672,9 @@ export interface FileLoadInfo {
655
672
  }
656
673
 
657
674
  export interface FileValue {
675
+ uid?:string,
676
+ url?:string,
677
+ status?:string,
658
678
  valid: FileValueValid;
659
679
  fileKey?: string;
660
680
  fileName?: string;
@@ -88,7 +88,7 @@ export default class TreeUtils {
88
88
  newExpandeds.push(d.key);
89
89
  }
90
90
  if(expandedKeys){
91
- newExpandeds.push(expandedKeys)
91
+ newExpandeds.push(...expandedKeys)
92
92
  };
93
93
 
94
94
  return {