aldehyde 0.2.52 → 0.2.53
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/lib/controls/action/index.d.ts +1 -0
- package/lib/controls/action/index.d.ts.map +1 -1
- package/lib/controls/action/index.js +2 -2
- package/lib/controls/action/index.js.map +1 -1
- package/lib/controls/cascader/index.d.ts.map +1 -1
- package/lib/controls/cascader/index.js +2 -2
- package/lib/controls/cascader/index.js.map +1 -1
- package/lib/controls/chemstruc/graph.js +2 -2
- package/lib/controls/chemstruc/graph.js.map +1 -1
- package/lib/controls/cquery/cquick-button.d.ts +1 -0
- package/lib/controls/cquery/cquick-button.d.ts.map +1 -1
- package/lib/controls/cquery/cquick-button.js +3 -3
- package/lib/controls/cquery/cquick-button.js.map +1 -1
- package/lib/controls/entity-select/entity-select.js +10 -10
- package/lib/controls/entity-select/entity-select.js.map +1 -1
- package/lib/controls/entity-select/lab-tree-select.js +3 -3
- package/lib/controls/entity-select/lab-tree-select.js.map +1 -1
- package/lib/controls/entity-select/popover-entity-select.js +2 -2
- package/lib/controls/entity-select/popover-entity-select.js.map +1 -1
- package/lib/controls/entry-control.d.ts +1 -0
- package/lib/controls/entry-control.d.ts.map +1 -1
- package/lib/controls/entry-control.js.map +1 -1
- package/lib/controls/file-view/drawer-file-view.d.ts +1 -0
- package/lib/controls/file-view/drawer-file-view.d.ts.map +1 -1
- package/lib/controls/file-view/drawer-file-view.js +4 -4
- package/lib/controls/file-view/drawer-file-view.js.map +1 -1
- package/lib/controls/file-view/index.d.ts +2 -1
- package/lib/controls/file-view/index.d.ts.map +1 -1
- package/lib/controls/file-view/index.js +12 -12
- package/lib/controls/file-view/index.js.map +1 -1
- package/lib/controls/relation-existion/index.js +2 -2
- package/lib/controls/relation-existion/index.js.map +1 -1
- package/lib/controls/rfield/index.js +2 -2
- package/lib/controls/rfield/index.js.map +1 -1
- package/lib/controls/signature/index.js +2 -2
- package/lib/controls/signature/index.js.map +1 -1
- package/lib/controls/upload/index.js +2 -2
- package/lib/controls/upload/index.js.map +1 -1
- package/lib/controls/view-control.d.ts +1 -0
- package/lib/controls/view-control.d.ts.map +1 -1
- package/lib/controls/view-control.js +15 -6
- package/lib/controls/view-control.js.map +1 -1
- package/lib/custom-page/dtmpl-custom-edit-modal-page.d.ts +1 -0
- package/lib/custom-page/dtmpl-custom-edit-modal-page.d.ts.map +1 -1
- package/lib/custom-page/dtmpl-custom-edit-modal-page.js.map +1 -1
- package/lib/detail/button/cquery-button-bar.d.ts +1 -0
- package/lib/detail/button/cquery-button-bar.d.ts.map +1 -1
- package/lib/detail/button/cquery-button-bar.js +3 -3
- package/lib/detail/button/cquery-button-bar.js.map +1 -1
- package/lib/detail/button/submit-button-bar.d.ts +1 -0
- package/lib/detail/button/submit-button-bar.d.ts.map +1 -1
- package/lib/detail/button/submit-button-bar.js +3 -3
- package/lib/detail/button/submit-button-bar.js.map +1 -1
- package/lib/detail/edit/dtmpl-edit.js +9 -9
- package/lib/detail/edit/dtmpl-edit.js.map +1 -1
- package/lib/detail/edit/fields-edit-card.d.ts +1 -0
- package/lib/detail/edit/fields-edit-card.d.ts.map +1 -1
- package/lib/detail/edit/fields-edit-card.js +2 -2
- package/lib/detail/edit/fields-edit-card.js.map +1 -1
- package/lib/detail/edit/modal-row-edit.d.ts +1 -0
- package/lib/detail/edit/modal-row-edit.d.ts.map +1 -1
- package/lib/detail/edit/modal-row-edit.js +2 -2
- package/lib/detail/edit/modal-row-edit.js.map +1 -1
- package/lib/detail/edit/row-edit-card.d.ts +1 -0
- package/lib/detail/edit/row-edit-card.d.ts.map +1 -1
- package/lib/detail/edit/row-edit-card.js +2 -2
- package/lib/detail/edit/row-edit-card.js.map +1 -1
- package/lib/detail/edit/row-editor.d.ts +1 -0
- package/lib/detail/edit/row-editor.d.ts.map +1 -1
- package/lib/detail/edit/row-editor.js +2 -2
- package/lib/detail/edit/row-editor.js.map +1 -1
- package/lib/detail/view/act-dtmpl-view.js +5 -5
- package/lib/detail/view/act-dtmpl-view.js.map +1 -1
- package/lib/detail/view/dtmpl-view.js +8 -8
- package/lib/detail/view/dtmpl-view.js.map +1 -1
- package/lib/detail/view/field-view-group.d.ts +1 -0
- package/lib/detail/view/field-view-group.d.ts.map +1 -1
- package/lib/detail/view/field-view-group.js +2 -2
- package/lib/detail/view/field-view-group.js.map +1 -1
- package/lib/detail/view/modal-dtmpl-view.js +2 -2
- package/lib/detail/view/modal-dtmpl-view.js.map +1 -1
- package/lib/detail/view/snapshot-timeline.d.ts +1 -0
- package/lib/detail/view/snapshot-timeline.d.ts.map +1 -1
- package/lib/detail/view/snapshot-timeline.js +4 -4
- package/lib/detail/view/snapshot-timeline.js.map +1 -1
- package/lib/exportor/export-frame.d.ts +1 -0
- package/lib/exportor/export-frame.d.ts.map +1 -1
- package/lib/exportor/export-frame.js +6 -3
- package/lib/exportor/export-frame.js.map +1 -1
- package/lib/form/criteria-form.d.ts +1 -0
- package/lib/form/criteria-form.d.ts.map +1 -1
- package/lib/form/criteria-form.js +6 -5
- package/lib/form/criteria-form.js.map +1 -1
- package/lib/form/dtmpl-form.js +9 -9
- package/lib/form/dtmpl-form.js.map +1 -1
- package/lib/form/field-group-form.d.ts +1 -0
- package/lib/form/field-group-form.d.ts.map +1 -1
- package/lib/form/field-group-form.js +2 -2
- package/lib/form/field-group-form.js.map +1 -1
- package/lib/form/fields-form.d.ts +1 -0
- package/lib/form/fields-form.d.ts.map +1 -1
- package/lib/form/fields-form.js +2 -2
- package/lib/form/fields-form.js.map +1 -1
- package/lib/form/form-Item-group.d.ts +1 -0
- package/lib/form/form-Item-group.d.ts.map +1 -1
- package/lib/form/form-Item-group.js +4 -4
- package/lib/form/form-Item-group.js.map +1 -1
- package/lib/import/excel-import.d.ts +1 -0
- package/lib/import/excel-import.d.ts.map +1 -1
- package/lib/import/excel-import.js +6 -3
- package/lib/import/excel-import.js.map +1 -1
- package/lib/layout/menu/l2menu-message-bar.js +2 -2
- package/lib/layout/menu/l2menu-message-bar.js.map +1 -1
- package/lib/layout/menu/l2menu-quick-bar.js +1 -1
- package/lib/layout/menu/l2menu-quick-bar.js.map +1 -1
- package/lib/layout/menu/userinfo-bar.js +1 -1
- package/lib/layout/menu/userinfo-bar.js.map +1 -1
- package/lib/login/context-setter.d.ts +1 -0
- package/lib/login/context-setter.d.ts.map +1 -1
- package/lib/login/context-setter.js +2 -1
- package/lib/login/context-setter.js.map +1 -1
- package/lib/module/dtmpl-edit-card.d.ts.map +1 -1
- package/lib/module/dtmpl-edit-card.js +9 -8
- package/lib/module/dtmpl-edit-card.js.map +1 -1
- package/lib/module/dtmpl-edit-drawer.js.map +1 -1
- package/lib/module/dtmpl-edit-page.js +11 -11
- package/lib/module/dtmpl-edit-page.js.map +1 -1
- package/lib/module/dtmpl-editor.js +7 -7
- package/lib/module/dtmpl-editor.js.map +1 -1
- package/lib/module/dtmpl-view-card.d.ts +1 -0
- package/lib/module/dtmpl-view-card.d.ts.map +1 -1
- package/lib/module/dtmpl-view-card.js +3 -3
- package/lib/module/dtmpl-view-card.js.map +1 -1
- package/lib/module/dtmpl-view-drawer.js +2 -2
- package/lib/module/dtmpl-view-drawer.js.map +1 -1
- package/lib/module/dtmpl-view-modal.js +2 -2
- package/lib/module/dtmpl-view-modal.js.map +1 -1
- package/lib/module/ltmpl-table.d.ts +1 -0
- package/lib/module/ltmpl-table.d.ts.map +1 -1
- package/lib/module/ltmpl-table.js +8 -8
- package/lib/module/ltmpl-table.js.map +1 -1
- package/lib/routable/dtmpl-route.js +4 -4
- package/lib/routable/dtmpl-route.js.map +1 -1
- package/lib/routable/import-route.d.ts +1 -0
- package/lib/routable/import-route.d.ts.map +1 -1
- package/lib/routable/import-route.js +2 -2
- package/lib/routable/import-route.js.map +1 -1
- package/lib/routable/ltmpl-route.js +2 -2
- package/lib/routable/ltmpl-route.js.map +1 -1
- package/lib/table/act-table.d.ts.map +1 -1
- package/lib/table/act-table.js +21 -21
- package/lib/table/act-table.js.map +1 -1
- package/lib/table/l2-act-table.js +4 -4
- package/lib/table/l2-act-table.js.map +1 -1
- package/lib/table/modal-select-table.d.ts +1 -0
- package/lib/table/modal-select-table.d.ts.map +1 -1
- package/lib/table/modal-select-table.js +8 -8
- package/lib/table/modal-select-table.js.map +1 -1
- package/lib/table/query-table.d.ts +1 -0
- package/lib/table/query-table.d.ts.map +1 -1
- package/lib/table/query-table.js +6 -5
- package/lib/table/query-table.js.map +1 -1
- package/lib/table/relation-table.d.ts +1 -0
- package/lib/table/relation-table.d.ts.map +1 -1
- package/lib/table/relation-table.js +17 -16
- package/lib/table/relation-table.js.map +1 -1
- package/lib/table/select-table.d.ts +1 -0
- package/lib/table/select-table.d.ts.map +1 -1
- package/lib/table/select-table.js +8 -9
- package/lib/table/select-table.js.map +1 -1
- package/lib/table/stat/restat.d.ts +1 -0
- package/lib/table/stat/restat.d.ts.map +1 -1
- package/lib/table/stat/restat.js +4 -4
- package/lib/table/stat/restat.js.map +1 -1
- package/lib/tmpl/hc-data-source.d.ts +9 -9
- package/lib/tmpl/hc-data-source.js +32 -32
- package/lib/tmpl/hc-data-source.js.map +1 -1
- package/lib/tmpl/hcservice-v3.d.ts +39 -49
- package/lib/tmpl/hcservice-v3.d.ts.map +1 -1
- package/lib/tmpl/hcservice-v3.js +207 -174
- package/lib/tmpl/hcservice-v3.js.map +1 -1
- package/lib/tmpl/interface.d.ts +3 -0
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/lib/tmpl/interface.js.map +1 -1
- package/lib/tmpl/superagent.d.ts +1 -2
- package/lib/tmpl/superagent.d.ts.map +1 -1
- package/lib/tmpl/superagent.js +33 -37
- package/lib/tmpl/superagent.js.map +1 -1
- package/lib/units/index.d.ts +4 -4
- package/lib/units/index.d.ts.map +1 -1
- package/lib/units/index.js +29 -10
- package/lib/units/index.js.map +1 -1
- package/lib/welcome/HCWelcome.js.map +1 -1
- package/lib/welcome/quick-entrance.js +2 -2
- package/lib/welcome/quick-entrance.js.map +1 -1
- package/lib/welcome/workbench.js +2 -2
- package/lib/welcome/workbench.js.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/controls/action/index.tsx +3 -2
- package/src/aldehyde/controls/cascader/index.tsx +3 -4
- package/src/aldehyde/controls/chemstruc/graph.tsx +2 -2
- package/src/aldehyde/controls/cquery/cquick-button.tsx +4 -3
- package/src/aldehyde/controls/entity-select/entity-select.tsx +10 -10
- package/src/aldehyde/controls/entity-select/lab-tree-select.tsx +3 -3
- package/src/aldehyde/controls/entity-select/popover-entity-select.tsx +2 -2
- package/src/aldehyde/controls/entry-control.tsx +1 -0
- package/src/aldehyde/controls/file-view/drawer-file-view.tsx +5 -4
- package/src/aldehyde/controls/file-view/index.tsx +13 -12
- package/src/aldehyde/controls/relation-existion/index.tsx +2 -2
- package/src/aldehyde/controls/rfield/index.tsx +2 -2
- package/src/aldehyde/controls/signature/index.tsx +2 -2
- package/src/aldehyde/controls/upload/index.tsx +3 -3
- package/src/aldehyde/controls/view-control.tsx +5 -4
- package/src/aldehyde/custom-page/dtmpl-custom-edit-modal-page.tsx +1 -0
- package/src/aldehyde/detail/button/cquery-button-bar.tsx +4 -3
- package/src/aldehyde/detail/button/submit-button-bar.tsx +4 -3
- package/src/aldehyde/detail/edit/dtmpl-edit.tsx +10 -10
- package/src/aldehyde/detail/edit/fields-edit-card.tsx +3 -2
- package/src/aldehyde/detail/edit/modal-row-edit.tsx +3 -2
- package/src/aldehyde/detail/edit/row-edit-card.tsx +3 -2
- package/src/aldehyde/detail/edit/row-editor.tsx +3 -2
- package/src/aldehyde/detail/view/act-dtmpl-view.tsx +5 -5
- package/src/aldehyde/detail/view/dtmpl-view.tsx +8 -8
- package/src/aldehyde/detail/view/field-view-group.tsx +3 -2
- package/src/aldehyde/detail/view/modal-dtmpl-view.tsx +2 -2
- package/src/aldehyde/detail/view/snapshot-timeline.tsx +5 -4
- package/src/aldehyde/exportor/export-frame.tsx +7 -3
- package/src/aldehyde/form/criteria-form.tsx +7 -5
- package/src/aldehyde/form/dtmpl-form.tsx +9 -9
- package/src/aldehyde/form/field-group-form.tsx +3 -2
- package/src/aldehyde/form/fields-form.tsx +3 -2
- package/src/aldehyde/form/form-Item-group.tsx +5 -4
- package/src/aldehyde/import/excel-import.tsx +7 -3
- package/src/aldehyde/layout/menu/l2menu-message-bar.tsx +2 -2
- package/src/aldehyde/layout/menu/l2menu-quick-bar.tsx +1 -1
- package/src/aldehyde/layout/menu/userinfo-bar.tsx +1 -1
- package/src/aldehyde/login/context-setter.tsx +3 -1
- package/src/aldehyde/module/dtmpl-edit-card.tsx +10 -9
- package/src/aldehyde/module/dtmpl-edit-drawer.tsx +1 -1
- package/src/aldehyde/module/dtmpl-edit-page.tsx +11 -11
- package/src/aldehyde/module/dtmpl-editor.tsx +7 -7
- package/src/aldehyde/module/dtmpl-view-card.tsx +4 -3
- package/src/aldehyde/module/dtmpl-view-drawer.tsx +2 -2
- package/src/aldehyde/module/dtmpl-view-modal.tsx +2 -2
- package/src/aldehyde/module/ltmpl-table.tsx +9 -8
- package/src/aldehyde/routable/dtmpl-route.tsx +4 -4
- package/src/aldehyde/routable/import-route.tsx +3 -3
- package/src/aldehyde/routable/ltmpl-route.tsx +2 -2
- package/src/aldehyde/table/act-table.tsx +21 -20
- package/src/aldehyde/table/l2-act-table.tsx +4 -4
- package/src/aldehyde/table/modal-select-table.tsx +9 -9
- package/src/aldehyde/table/query-table.tsx +8 -5
- package/src/aldehyde/table/relation-table.tsx +18 -16
- package/src/aldehyde/table/select-table.tsx +9 -9
- package/src/aldehyde/table/stat/restat.tsx +5 -4
- package/src/aldehyde/tmpl/hc-data-source.tsx +32 -32
- package/src/aldehyde/tmpl/hcservice-v3.tsx +205 -162
- package/src/aldehyde/tmpl/interface.tsx +3 -0
- package/src/aldehyde/tmpl/superagent.js +37 -32
- package/src/aldehyde/units/index.tsx +27 -11
- package/src/aldehyde/welcome/HCWelcome.js +6 -0
- package/src/aldehyde/welcome/quick-entrance.tsx +2 -2
- package/src/aldehyde/welcome/workbench.tsx +2 -2
- package/lib/exportor/index.d.ts +0 -16
- package/lib/exportor/index.d.ts.map +0 -1
- package/lib/exportor/index.js +0 -44
- package/lib/exportor/index.js.map +0 -1
- package/lib/import/template-builder.d.ts +0 -29
- package/lib/import/template-builder.d.ts.map +0 -1
- package/lib/import/template-builder.js +0 -426
- package/lib/import/template-builder.js.map +0 -1
- package/src/aldehyde/exportor/index.tsx +0 -56
- package/src/aldehyde/import/template-builder.js +0 -474
package/lib/tmpl/hcservice-v3.js
CHANGED
|
@@ -15,21 +15,22 @@ import format from 'dayjs';
|
|
|
15
15
|
import HCDataSource from "./hc-data-source";
|
|
16
16
|
import { ProgramConfig } from "../index";
|
|
17
17
|
export default class HcserviceV3 {
|
|
18
|
-
static requestEnum(mstrucIds, path) {
|
|
18
|
+
static requestEnum(serverKey, mstrucIds, path) {
|
|
19
19
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20
20
|
if (!path) {
|
|
21
|
-
return yield this.requestEnumWithPath(mstrucIds, "/enum");
|
|
21
|
+
return yield this.requestEnumWithPath(serverKey, mstrucIds, "/enum");
|
|
22
22
|
}
|
|
23
23
|
else {
|
|
24
|
-
return yield this.requestEnumWithPath(mstrucIds, path);
|
|
24
|
+
return yield this.requestEnumWithPath(serverKey, mstrucIds, path);
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
static requestEnumWithPath(mstrucIds, path) {
|
|
28
|
+
static requestEnumWithPath(serverKey, mstrucIds, path) {
|
|
29
29
|
return __awaiter(this, void 0, void 0, function* () {
|
|
30
30
|
if (mstrucIds.length > 0) {
|
|
31
31
|
let res = yield Super.super({
|
|
32
32
|
url: Units.joinPath("/v3", path),
|
|
33
|
+
serverKey,
|
|
33
34
|
query: {
|
|
34
35
|
mstrucIds
|
|
35
36
|
},
|
|
@@ -41,106 +42,113 @@ export default class HcserviceV3 {
|
|
|
41
42
|
}
|
|
42
43
|
});
|
|
43
44
|
}
|
|
44
|
-
static requestOptions(mstrucId) {
|
|
45
|
+
static requestOptions(serverKey, mstrucId) {
|
|
45
46
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
return yield this.requestEnum([mstrucId]);
|
|
47
|
+
return yield this.requestEnum(serverKey, [mstrucId], null);
|
|
47
48
|
});
|
|
48
49
|
}
|
|
49
|
-
static requestDtmplConfig(sourceId) {
|
|
50
|
+
static requestDtmplConfig(serverKey, sourceId) {
|
|
50
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
51
52
|
let url = `/v3/dtmpl/config`;
|
|
52
53
|
let res = yield Super.super({
|
|
53
54
|
url,
|
|
55
|
+
serverKey,
|
|
54
56
|
method: "GET",
|
|
55
57
|
query: { sourceId }
|
|
56
58
|
});
|
|
57
59
|
return res.dtmplConfig;
|
|
58
60
|
});
|
|
59
61
|
}
|
|
60
|
-
static requestViewDtmplConfig(sourceId) {
|
|
62
|
+
static requestViewDtmplConfig(serverKey, sourceId) {
|
|
61
63
|
return __awaiter(this, void 0, void 0, function* () {
|
|
62
64
|
let url = `/v3/view-dtmpl/config`;
|
|
63
65
|
let res = yield Super.super({
|
|
64
66
|
url,
|
|
67
|
+
serverKey,
|
|
65
68
|
method: "GET",
|
|
66
69
|
query: { sourceId }
|
|
67
70
|
});
|
|
68
71
|
return res.dtmplConfig;
|
|
69
72
|
});
|
|
70
73
|
}
|
|
71
|
-
static requestAddDtmplConfig(sourceId) {
|
|
74
|
+
static requestAddDtmplConfig(serverKey, sourceId) {
|
|
72
75
|
return __awaiter(this, void 0, void 0, function* () {
|
|
73
76
|
let url = `/v3/add-dtmpl/config`;
|
|
74
77
|
let res = yield Super.super({
|
|
75
78
|
url,
|
|
79
|
+
serverKey,
|
|
76
80
|
method: "GET",
|
|
77
81
|
query: { sourceId }
|
|
78
82
|
});
|
|
79
83
|
return res.dtmplConfig;
|
|
80
84
|
});
|
|
81
85
|
}
|
|
82
|
-
static requestSelectConfig(sourceId) {
|
|
86
|
+
static requestSelectConfig(serverKey, sourceId) {
|
|
83
87
|
return __awaiter(this, void 0, void 0, function* () {
|
|
84
88
|
let url = `/v3/select/config`;
|
|
85
89
|
let res = yield Super.super({
|
|
86
90
|
url,
|
|
91
|
+
serverKey,
|
|
87
92
|
method: "GET",
|
|
88
93
|
query: { sourceId }
|
|
89
94
|
});
|
|
90
95
|
return res.selectConfig;
|
|
91
96
|
});
|
|
92
97
|
}
|
|
93
|
-
static requestLtmplConfig(sourceId) {
|
|
98
|
+
static requestLtmplConfig(serverKey, sourceId) {
|
|
94
99
|
return __awaiter(this, void 0, void 0, function* () {
|
|
95
100
|
let url = `/v3/ltmpl/config`;
|
|
96
101
|
let res = yield Super.super({
|
|
97
102
|
url,
|
|
103
|
+
serverKey,
|
|
98
104
|
method: "GET",
|
|
99
105
|
query: { sourceId }
|
|
100
106
|
});
|
|
101
107
|
return res;
|
|
102
108
|
});
|
|
103
109
|
}
|
|
104
|
-
static requestL2LtmplConfig(sourceId) {
|
|
110
|
+
static requestL2LtmplConfig(serverKey, sourceId) {
|
|
105
111
|
return __awaiter(this, void 0, void 0, function* () {
|
|
106
112
|
let url = `/v3/l2/ltmpl/config`;
|
|
107
113
|
let res = yield Super.super({
|
|
108
114
|
url,
|
|
115
|
+
serverKey,
|
|
109
116
|
method: "GET",
|
|
110
117
|
query: { sourceId }
|
|
111
118
|
});
|
|
112
119
|
return res;
|
|
113
120
|
});
|
|
114
121
|
}
|
|
115
|
-
static requestLtmplQueryKey(sourceId, condition) {
|
|
122
|
+
static requestLtmplQueryKey(serverKey, sourceId, condition) {
|
|
116
123
|
return __awaiter(this, void 0, void 0, function* () {
|
|
117
124
|
//console.log('condition:',condition);
|
|
118
125
|
let url = `/v3/ltmpl/query/key`;
|
|
119
126
|
let res = yield Super.super({
|
|
120
127
|
url: url,
|
|
128
|
+
serverKey,
|
|
121
129
|
method: 'GET',
|
|
122
130
|
query: Object.assign(Object.assign({}, condition), { sourceId })
|
|
123
131
|
});
|
|
124
132
|
return res;
|
|
125
133
|
});
|
|
126
134
|
}
|
|
127
|
-
static requestLtmplQueryTop(sourceId, condition) {
|
|
135
|
+
static requestLtmplQueryTop(serverKey, sourceId, condition) {
|
|
128
136
|
return __awaiter(this, void 0, void 0, function* () {
|
|
129
137
|
// console.log('condition:',condition);
|
|
130
138
|
let url = `/v3/ltmpl/top-data`;
|
|
131
|
-
return yield this.requestCommonLtmplQueryTop(sourceId, condition, url);
|
|
139
|
+
return yield this.requestCommonLtmplQueryTop(serverKey, sourceId, condition, url);
|
|
132
140
|
});
|
|
133
141
|
}
|
|
134
|
-
static requestMstrucLtmplQueryTop(sourceId, condition) {
|
|
142
|
+
static requestMstrucLtmplQueryTop(serverKey, sourceId, condition) {
|
|
135
143
|
return __awaiter(this, void 0, void 0, function* () {
|
|
136
144
|
//console.log('condition:',condition);
|
|
137
145
|
let url = `/v3/mstruc/ltmpl/top-data`;
|
|
138
|
-
return yield this.requestCommonLtmplQueryTop(sourceId, condition, url);
|
|
146
|
+
return yield this.requestCommonLtmplQueryTop(serverKey, sourceId, condition, url);
|
|
139
147
|
});
|
|
140
148
|
}
|
|
141
|
-
static queryTop1(sourceId) {
|
|
149
|
+
static queryTop1(serverKey, sourceId) {
|
|
142
150
|
return __awaiter(this, void 0, void 0, function* () {
|
|
143
|
-
let data = yield HcserviceV3.requestMstrucLtmplQueryTop(sourceId, { top: 1 });
|
|
151
|
+
let data = yield HcserviceV3.requestMstrucLtmplQueryTop(serverKey, sourceId, { top: 1 });
|
|
144
152
|
let queriedCode = null;
|
|
145
153
|
if (data && data.entities && data.entities[0]) {
|
|
146
154
|
queriedCode = data.entities[0].code;
|
|
@@ -148,17 +156,18 @@ export default class HcserviceV3 {
|
|
|
148
156
|
return queriedCode;
|
|
149
157
|
});
|
|
150
158
|
}
|
|
151
|
-
static requestCommonLtmplQueryTop(sourceId, condition, url) {
|
|
159
|
+
static requestCommonLtmplQueryTop(serverKey, sourceId, condition, url) {
|
|
152
160
|
return __awaiter(this, void 0, void 0, function* () {
|
|
153
161
|
let res = yield Super.super({
|
|
154
162
|
url: url,
|
|
163
|
+
serverKey,
|
|
155
164
|
method: 'GET',
|
|
156
165
|
query: Object.assign(Object.assign({}, condition), { sourceId })
|
|
157
166
|
});
|
|
158
167
|
return res;
|
|
159
168
|
});
|
|
160
169
|
}
|
|
161
|
-
static requestSelectedData(sourceId, codes) {
|
|
170
|
+
static requestSelectedData(serverKey, sourceId, codes) {
|
|
162
171
|
return __awaiter(this, void 0, void 0, function* () {
|
|
163
172
|
if (!codes) {
|
|
164
173
|
message.warning("没有选择实体");
|
|
@@ -167,6 +176,7 @@ export default class HcserviceV3 {
|
|
|
167
176
|
let url = `/v3/field-group/data/selected`;
|
|
168
177
|
let res = yield Super.super({
|
|
169
178
|
url: url,
|
|
179
|
+
serverKey,
|
|
170
180
|
query: { codes, sourceId },
|
|
171
181
|
method: 'GET'
|
|
172
182
|
});
|
|
@@ -179,10 +189,11 @@ export default class HcserviceV3 {
|
|
|
179
189
|
}
|
|
180
190
|
});
|
|
181
191
|
}
|
|
182
|
-
static requestVersionList(sourceId, code) {
|
|
192
|
+
static requestVersionList(serverKey, sourceId, code) {
|
|
183
193
|
return __awaiter(this, void 0, void 0, function* () {
|
|
184
194
|
let res = yield Super.super({
|
|
185
195
|
url: `/v3/dtmpl/data/versions`,
|
|
196
|
+
serverKey,
|
|
186
197
|
query: {
|
|
187
198
|
pageNo: 1,
|
|
188
199
|
sourceId,
|
|
@@ -193,13 +204,14 @@ export default class HcserviceV3 {
|
|
|
193
204
|
return res.versions;
|
|
194
205
|
});
|
|
195
206
|
}
|
|
196
|
-
static requestCommonDtmplData(sourceId, code, versionId, url) {
|
|
207
|
+
static requestCommonDtmplData(serverKey, sourceId, code, versionId, url) {
|
|
197
208
|
return __awaiter(this, void 0, void 0, function* () {
|
|
198
209
|
// if(sourceId=="user"){
|
|
199
210
|
// return this.requestUserDtmplData();
|
|
200
211
|
// }
|
|
201
212
|
let res = yield Super.super({
|
|
202
|
-
url
|
|
213
|
+
url,
|
|
214
|
+
serverKey,
|
|
203
215
|
query: {
|
|
204
216
|
code, versionId, sourceId
|
|
205
217
|
},
|
|
@@ -214,31 +226,31 @@ export default class HcserviceV3 {
|
|
|
214
226
|
}
|
|
215
227
|
});
|
|
216
228
|
}
|
|
217
|
-
static requestDtmplData(sourceId, code, versionId) {
|
|
229
|
+
static requestDtmplData(serverKey, sourceId, code, versionId) {
|
|
218
230
|
return __awaiter(this, void 0, void 0, function* () {
|
|
219
231
|
let url = `/v3/dtmpl/data`;
|
|
220
|
-
return yield this.requestCommonDtmplData(sourceId, code, versionId, url);
|
|
232
|
+
return yield this.requestCommonDtmplData(serverKey, sourceId, code, versionId, url);
|
|
221
233
|
});
|
|
222
234
|
}
|
|
223
|
-
static requestMstrucDtmplData(sourceId, code, versionId) {
|
|
235
|
+
static requestMstrucDtmplData(serverKey, sourceId, code, versionId) {
|
|
224
236
|
return __awaiter(this, void 0, void 0, function* () {
|
|
225
237
|
let url = `/v3/mstruc/dtmpl/data`;
|
|
226
|
-
return yield this.requestCommonDtmplData(sourceId, code, versionId, url);
|
|
238
|
+
return yield this.requestCommonDtmplData(serverKey, sourceId, code, versionId, url);
|
|
227
239
|
});
|
|
228
240
|
}
|
|
229
|
-
static requestViewDtmplData(sourceId, code, versionId) {
|
|
241
|
+
static requestViewDtmplData(serverKey, sourceId, code, versionId) {
|
|
230
242
|
return __awaiter(this, void 0, void 0, function* () {
|
|
231
243
|
let url = `/v3/view-dtmpl/data`;
|
|
232
|
-
return yield this.requestCommonDtmplData(sourceId, code, versionId, url);
|
|
244
|
+
return yield this.requestCommonDtmplData(serverKey, sourceId, code, versionId, url);
|
|
233
245
|
});
|
|
234
246
|
}
|
|
235
|
-
static requestMstrucViewDtmplData(sourceId, code, versionId) {
|
|
247
|
+
static requestMstrucViewDtmplData(serverKey, sourceId, code, versionId) {
|
|
236
248
|
return __awaiter(this, void 0, void 0, function* () {
|
|
237
249
|
let url = `/v3/mstruc/view-dtmpl/data`;
|
|
238
|
-
return yield this.requestCommonDtmplData(sourceId, code, versionId, url);
|
|
250
|
+
return yield this.requestCommonDtmplData(serverKey, sourceId, code, versionId, url);
|
|
239
251
|
});
|
|
240
252
|
}
|
|
241
|
-
static postCommonDtmplData(sourceId, formDataObj, message, url) {
|
|
253
|
+
static postCommonDtmplData(serverKey, sourceId, formDataObj, message, url) {
|
|
242
254
|
return __awaiter(this, void 0, void 0, function* () {
|
|
243
255
|
const formData = new FormData();
|
|
244
256
|
for (let k in formDataObj) {
|
|
@@ -248,7 +260,8 @@ export default class HcserviceV3 {
|
|
|
248
260
|
}
|
|
249
261
|
formData.append('sourceId', sourceId.toString());
|
|
250
262
|
let res = yield Super.super({
|
|
251
|
-
url
|
|
263
|
+
url,
|
|
264
|
+
serverKey,
|
|
252
265
|
data: formData,
|
|
253
266
|
method: 'POST'
|
|
254
267
|
}, 'formdata');
|
|
@@ -278,61 +291,60 @@ export default class HcserviceV3 {
|
|
|
278
291
|
return { code, status: res.status };
|
|
279
292
|
});
|
|
280
293
|
}
|
|
281
|
-
static postDtmplData(sourceId, formDataObj, message) {
|
|
294
|
+
static postDtmplData(serverKey, sourceId, formDataObj, message) {
|
|
282
295
|
return __awaiter(this, void 0, void 0, function* () {
|
|
283
296
|
let url = `/v3/dtmpl/data`;
|
|
284
|
-
return yield this.postCommonDtmplData(sourceId, formDataObj, message, url);
|
|
297
|
+
return yield this.postCommonDtmplData(serverKey, sourceId, formDataObj, message, url);
|
|
285
298
|
});
|
|
286
299
|
}
|
|
287
|
-
static postMstrucDtmplData(sourceId, formDataObj, message) {
|
|
300
|
+
static postMstrucDtmplData(serverKey, sourceId, formDataObj, message) {
|
|
288
301
|
return __awaiter(this, void 0, void 0, function* () {
|
|
289
302
|
let url = `/v3/mstruc/dtmpl/data`;
|
|
290
|
-
return yield this.postCommonDtmplData(sourceId, formDataObj, message, url);
|
|
291
|
-
});
|
|
292
|
-
}
|
|
293
|
-
static postFileAction(file) {
|
|
294
|
-
return Units.joinPath(Units.api(), '/v3/upload');
|
|
295
|
-
}
|
|
296
|
-
static postFile(formData, message) {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
});
|
|
319
|
-
}
|
|
320
|
-
static requestL2LtmplQueryKey(sourceId, condition) {
|
|
303
|
+
return yield this.postCommonDtmplData(serverKey, sourceId, formDataObj, message, url);
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
static postFileAction(serverKey, file) {
|
|
307
|
+
return Units.joinPath(Units.api(serverKey), '/v3/upload');
|
|
308
|
+
}
|
|
309
|
+
// static async postFile(formData, message) {
|
|
310
|
+
// let res = await Super.super({
|
|
311
|
+
// url: `/v3/upload`,
|
|
312
|
+
// data: formData,
|
|
313
|
+
// method: 'POST'
|
|
314
|
+
// }, 'formdata')
|
|
315
|
+
// let fileKey = null;
|
|
316
|
+
// if (res) {
|
|
317
|
+
// if (res.status === "success") {
|
|
318
|
+
// if (message) {
|
|
319
|
+
// message.success("上传成功! ")
|
|
320
|
+
// }
|
|
321
|
+
// fileKey = res.fileKey;
|
|
322
|
+
// }
|
|
323
|
+
// } else {
|
|
324
|
+
// if (message) {
|
|
325
|
+
// message.error("上传失败!");
|
|
326
|
+
// }
|
|
327
|
+
// }
|
|
328
|
+
// return fileKey;
|
|
329
|
+
// }
|
|
330
|
+
static requestL2LtmplQueryKey(serverKey, sourceId, condition) {
|
|
321
331
|
return __awaiter(this, void 0, void 0, function* () {
|
|
322
332
|
let url = `v3/l2/ltmpl/query/key`;
|
|
323
333
|
let res = yield Super.super({
|
|
324
|
-
url
|
|
334
|
+
url,
|
|
335
|
+
serverKey,
|
|
325
336
|
method: 'GET',
|
|
326
337
|
query: Object.assign(Object.assign({}, condition), { sourceId })
|
|
327
338
|
});
|
|
328
339
|
return res;
|
|
329
340
|
});
|
|
330
341
|
}
|
|
331
|
-
static requestLtmplCount(sourceId) {
|
|
342
|
+
static requestLtmplCount(serverKey, sourceId) {
|
|
332
343
|
return __awaiter(this, void 0, void 0, function* () {
|
|
333
344
|
let url = `/v3/ltmpl/data/count`;
|
|
334
345
|
let res = yield Super.super({
|
|
335
|
-
url
|
|
346
|
+
url,
|
|
347
|
+
serverKey,
|
|
336
348
|
query: { sourceId },
|
|
337
349
|
method: 'GET',
|
|
338
350
|
});
|
|
@@ -360,10 +372,11 @@ export default class HcserviceV3 {
|
|
|
360
372
|
// });
|
|
361
373
|
// return criterias;
|
|
362
374
|
// }
|
|
363
|
-
static requestQueryData(queryKey, pageInfo) {
|
|
375
|
+
static requestQueryData(serverKey, queryKey, pageInfo) {
|
|
364
376
|
return __awaiter(this, void 0, void 0, function* () {
|
|
365
377
|
let res = yield Super.super({
|
|
366
378
|
url: `/v3/ltmpl/query/data`,
|
|
379
|
+
serverKey,
|
|
367
380
|
method: 'GET',
|
|
368
381
|
query: Object.assign({ queryKey }, pageInfo)
|
|
369
382
|
});
|
|
@@ -388,16 +401,17 @@ export default class HcserviceV3 {
|
|
|
388
401
|
}
|
|
389
402
|
return codes;
|
|
390
403
|
}
|
|
391
|
-
static deleteData(sourceId, selectedRows) {
|
|
404
|
+
static deleteData(serverKey, sourceId, selectedRows) {
|
|
392
405
|
return __awaiter(this, void 0, void 0, function* () {
|
|
393
406
|
const codes = this.getCodesOfSelectedRows(selectedRows);
|
|
394
|
-
return yield this.deleteByCode(sourceId, codes);
|
|
407
|
+
return yield this.deleteByCode(serverKey, sourceId, codes);
|
|
395
408
|
});
|
|
396
409
|
}
|
|
397
|
-
static deleteByCode(sourceId, codes) {
|
|
410
|
+
static deleteByCode(serverKey, sourceId, codes) {
|
|
398
411
|
return __awaiter(this, void 0, void 0, function* () {
|
|
399
412
|
let res = yield Super.super({
|
|
400
413
|
url: `/v3/ltmpl/data`,
|
|
414
|
+
serverKey,
|
|
401
415
|
data: {
|
|
402
416
|
codes, sourceId
|
|
403
417
|
},
|
|
@@ -414,26 +428,25 @@ export default class HcserviceV3 {
|
|
|
414
428
|
}
|
|
415
429
|
});
|
|
416
430
|
}
|
|
417
|
-
static requestQueryCount(queryKey) {
|
|
431
|
+
static requestQueryCount(serverKey, queryKey) {
|
|
418
432
|
return __awaiter(this, void 0, void 0, function* () {
|
|
419
433
|
let res = yield Super.super({
|
|
420
434
|
url: `/v3/ltmpl/query/count`,
|
|
435
|
+
serverKey,
|
|
421
436
|
method: "GET",
|
|
422
437
|
query: { queryKey }
|
|
423
438
|
});
|
|
424
439
|
return res.count;
|
|
425
440
|
});
|
|
426
441
|
}
|
|
427
|
-
static requestFile(path) {
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
}
|
|
436
|
-
static postActions(actionId, selectedRows, actionDataObj) {
|
|
442
|
+
// static async requestFile(path) {
|
|
443
|
+
// let res = await Super.super({
|
|
444
|
+
// url: Units.joinPath("/v3/files/", path),
|
|
445
|
+
// method: "GET"
|
|
446
|
+
// });
|
|
447
|
+
// return res;
|
|
448
|
+
// }
|
|
449
|
+
static postActions(serverKey, actionId, selectedRows, actionDataObj) {
|
|
437
450
|
return __awaiter(this, void 0, void 0, function* () {
|
|
438
451
|
const codes = this.getCodesOfSelectedRows(selectedRows);
|
|
439
452
|
const formData = new FormData();
|
|
@@ -444,29 +457,29 @@ export default class HcserviceV3 {
|
|
|
444
457
|
formData.append('codes', codes.join(","));
|
|
445
458
|
let res = yield Super.super({
|
|
446
459
|
url: `/v3/action`,
|
|
460
|
+
serverKey,
|
|
447
461
|
data: formData,
|
|
448
462
|
method: 'POST'
|
|
449
|
-
}, 'formdata');
|
|
463
|
+
}, 'formdata', null);
|
|
450
464
|
return res;
|
|
451
465
|
});
|
|
452
466
|
}
|
|
453
|
-
static postJumps(jumpId, code) {
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
}
|
|
466
|
-
static increCalc(sourceId, params = {}) {
|
|
467
|
+
// static async postJumps(jumpId, code: string,sourceId:string) {
|
|
468
|
+
// let res = await Super.super({
|
|
469
|
+
// url: `/v3/jump`,
|
|
470
|
+
// query: {
|
|
471
|
+
// code,
|
|
472
|
+
// sourceId: jumpId,
|
|
473
|
+
// },
|
|
474
|
+
// method: "GET",
|
|
475
|
+
// },null,null,sourceId);
|
|
476
|
+
// return res;
|
|
477
|
+
// }
|
|
478
|
+
static increCalc(serverKey, sourceId, params = {}) {
|
|
467
479
|
return __awaiter(this, void 0, void 0, function* () {
|
|
468
480
|
let res = yield Super.super({
|
|
469
481
|
url: `/v3/stat/increcalc`,
|
|
482
|
+
serverKey,
|
|
470
483
|
method: "POST",
|
|
471
484
|
data: Object.assign(Object.assign({}, params), { sourceId })
|
|
472
485
|
});
|
|
@@ -479,35 +492,53 @@ export default class HcserviceV3 {
|
|
|
479
492
|
return res;
|
|
480
493
|
});
|
|
481
494
|
}
|
|
482
|
-
static
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
495
|
+
static doCopy(serverKey, sourceId, code, copyRelation, copyOpp2One) {
|
|
496
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
497
|
+
let res = yield Super.super({
|
|
498
|
+
url: `/v3/mstruc/copy-data`,
|
|
499
|
+
serverKey,
|
|
500
|
+
method: "POST",
|
|
501
|
+
query: {
|
|
502
|
+
sourceId,
|
|
503
|
+
code, copyRelation, copyOpp2One
|
|
504
|
+
}
|
|
505
|
+
}, null, null);
|
|
506
|
+
if (res.status != 'success') {
|
|
507
|
+
message.error("错误消息:" + res.message, 4);
|
|
508
|
+
}
|
|
509
|
+
return res;
|
|
510
|
+
});
|
|
486
511
|
}
|
|
487
|
-
static
|
|
512
|
+
// static downloadDetailExcel(sourceId, entityCode) {
|
|
513
|
+
// const hydrocarbonToken = Units.hydrocarbonToken();
|
|
514
|
+
// let url = Units.joinPath(Units.api(), `/v3/dtmpl/excel`)+`?sourceId=${sourceId}&code=${entityCode}&@token=${hydrocarbonToken}&@programToken=${Units.programCode()}`;
|
|
515
|
+
// Units.downloadFile(url, "详情");
|
|
516
|
+
// }
|
|
517
|
+
static download(serverKey, path) {
|
|
488
518
|
let vars = path.split("/");
|
|
489
519
|
let fileName = vars[vars.length - 1];
|
|
490
|
-
Units.downloadFile(this.getFileUrl(path) + `&disposition=attachment`, fileName);
|
|
520
|
+
Units.downloadFile(this.getFileUrl(serverKey, path) + `&disposition=attachment`, fileName);
|
|
491
521
|
}
|
|
492
|
-
static openfile(path, toolbar) {
|
|
522
|
+
static openfile(serverKey, path, toolbar) {
|
|
493
523
|
let vars = path.split("/");
|
|
494
524
|
let fileName = vars[vars.length - 1];
|
|
495
|
-
Units.openFile(this.getFileUrl(path), fileName, toolbar);
|
|
525
|
+
Units.openFile(this.getFileUrl(serverKey, path), fileName, toolbar);
|
|
496
526
|
}
|
|
497
|
-
static getFileUrl(path) {
|
|
527
|
+
static getFileUrl(serverKey, path) {
|
|
498
528
|
const hydrocarbonToken = Units.hydrocarbonToken();
|
|
499
|
-
let url = Units.joinPath(Units.api(), Units.joinPath("/v3/files", path)) + `?@token=${hydrocarbonToken}&@programToken=${Units.programCode()}`;
|
|
529
|
+
let url = Units.joinPath(Units.api(serverKey), Units.joinPath("/v3/files", path)) + `?@token=${hydrocarbonToken}&@programToken=${Units.programCode()}`;
|
|
500
530
|
return url;
|
|
501
531
|
}
|
|
502
|
-
static getFileTxtUrl(path) {
|
|
532
|
+
static getFileTxtUrl(serverKey, path) {
|
|
503
533
|
const hydrocarbonToken = Units.hydrocarbonToken();
|
|
504
|
-
let url = Units.joinPath(Units.api(), Units.joinPath("/v3/files/text", path)) + `?@token=${hydrocarbonToken}&@programToken=${Units.programCode()}`;
|
|
534
|
+
let url = Units.joinPath(Units.api(serverKey), Units.joinPath("/v3/files/text", path)) + `?@token=${hydrocarbonToken}&@programToken=${Units.programCode()}`;
|
|
505
535
|
return url;
|
|
506
536
|
}
|
|
507
|
-
static loadFileTxt(path) {
|
|
537
|
+
static loadFileTxt(serverKey, path) {
|
|
508
538
|
return __awaiter(this, void 0, void 0, function* () {
|
|
509
539
|
let res = yield Super.super({
|
|
510
540
|
url: Units.joinPath("/v3/files/text", path),
|
|
541
|
+
serverKey,
|
|
511
542
|
method: "GET",
|
|
512
543
|
});
|
|
513
544
|
return res.text;
|
|
@@ -684,50 +715,49 @@ export default class HcserviceV3 {
|
|
|
684
715
|
return res.l2Menus;
|
|
685
716
|
});
|
|
686
717
|
}
|
|
687
|
-
static requestKsList(path, params, depth = 1, pageinfo = {
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
}
|
|
718
|
+
// static async requestKsList(path, params, depth = 1, pageinfo = {pageNo: 1, pageSize: 100}) {
|
|
719
|
+
// let url = Units.joinPath("/v3/ks/list", path)
|
|
720
|
+
// let res = await Super.super({
|
|
721
|
+
// url: url,
|
|
722
|
+
// method: "GET",
|
|
723
|
+
// query: {
|
|
724
|
+
// depth,
|
|
725
|
+
// ...params,
|
|
726
|
+
// pageNo: pageinfo.pageNo,
|
|
727
|
+
// pageSize: pageinfo.pageSize
|
|
728
|
+
// }
|
|
729
|
+
// });
|
|
730
|
+
// //console.log("ks list:", res);
|
|
731
|
+
// if (res.status == 'error') {
|
|
732
|
+
// return null;
|
|
733
|
+
// } else {
|
|
734
|
+
// return res.result;
|
|
735
|
+
// }
|
|
736
|
+
//
|
|
737
|
+
// }
|
|
738
|
+
// static async requestKsListTopPage(queryKey, pageNo, pageSize) {
|
|
739
|
+
// let url = `/v3/ks/query/data`
|
|
740
|
+
// let res = await Super.super({
|
|
741
|
+
// url: url,
|
|
742
|
+
// method: "GET",
|
|
743
|
+
// query: {
|
|
744
|
+
// pageNo,
|
|
745
|
+
// pageSize, queryKey
|
|
746
|
+
// }
|
|
747
|
+
// });
|
|
748
|
+
// //console.log("requestKsListToPage:", res);
|
|
749
|
+
// return res.result;
|
|
750
|
+
// }
|
|
751
|
+
// static async requestKsUnique(path: string, depth = 1) {
|
|
752
|
+
// let url = Units.joinPath("/v3/ks/unique", path)
|
|
753
|
+
// let res = await Super.super({
|
|
754
|
+
// url: url,
|
|
755
|
+
// depth,
|
|
756
|
+
// method: "GET",
|
|
757
|
+
// });
|
|
758
|
+
// //console.log("ks unique:", res);
|
|
759
|
+
// return res.result;
|
|
760
|
+
// }
|
|
731
761
|
static reload() {
|
|
732
762
|
return __awaiter(this, void 0, void 0, function* () {
|
|
733
763
|
let url = `/v3/tmpl/reload`;
|
|
@@ -738,22 +768,6 @@ export default class HcserviceV3 {
|
|
|
738
768
|
return res;
|
|
739
769
|
});
|
|
740
770
|
}
|
|
741
|
-
static doCopy(sourceId, code, copyRelation, copyOpp2One) {
|
|
742
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
743
|
-
let res = yield Super.super({
|
|
744
|
-
url: `/v3/mstruc/copy-data`,
|
|
745
|
-
method: "POST",
|
|
746
|
-
query: {
|
|
747
|
-
sourceId,
|
|
748
|
-
code, copyRelation, copyOpp2One
|
|
749
|
-
}
|
|
750
|
-
}, null, null);
|
|
751
|
-
if (res.status != 'success') {
|
|
752
|
-
message.error("错误消息:" + res.message, 4);
|
|
753
|
-
}
|
|
754
|
-
return res;
|
|
755
|
-
});
|
|
756
|
-
}
|
|
757
771
|
static initProgramConfig(ProgramConfigJson) {
|
|
758
772
|
return __awaiter(this, void 0, void 0, function* () {
|
|
759
773
|
//设置项目配置信息
|
|
@@ -763,6 +777,25 @@ export default class HcserviceV3 {
|
|
|
763
777
|
if (ProgramConfigJson['hydrocarbonServer']) {
|
|
764
778
|
ProgramConfig.setHydrocarbonServer(ProgramConfigJson['hydrocarbonServer']);
|
|
765
779
|
}
|
|
780
|
+
//注册扩展服务器
|
|
781
|
+
if (ProgramConfigJson['extendServer']) {
|
|
782
|
+
let extend = ProgramConfigJson['extendServer'];
|
|
783
|
+
if (typeof extend == "object") {
|
|
784
|
+
let extendServers = [];
|
|
785
|
+
if (Array.isArray(extend)) {
|
|
786
|
+
extendServers = extend;
|
|
787
|
+
}
|
|
788
|
+
else {
|
|
789
|
+
extendServers.push(extend);
|
|
790
|
+
}
|
|
791
|
+
for (let es of extendServers) {
|
|
792
|
+
if (es.key && es['hydrocarbonServer']) {
|
|
793
|
+
ProgramConfig.setProgramCode(es['programCode'], es.key);
|
|
794
|
+
ProgramConfig.setHydrocarbonServer(es['hydrocarbonServer'], es['programCode']);
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
}
|
|
766
799
|
ProgramConfig.setProgramName(ProgramConfigJson['programName']);
|
|
767
800
|
ProgramConfig.setProgramName_sub(ProgramConfigJson['programName_sub']);
|
|
768
801
|
ProgramConfig.setProgramName_NavLeft(ProgramConfigJson['programName_NavLeft']);
|