aldehyde 0.2.57 → 0.2.60
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 +2 -3
- package/lib/controls/action/index.d.ts.map +1 -1
- package/lib/controls/action/index.js +17 -12
- package/lib/controls/action/index.js.map +1 -1
- package/lib/controls/collapse-card/index.d.ts +1 -0
- package/lib/controls/collapse-card/index.d.ts.map +1 -1
- package/lib/controls/collapse-card/index.js +9 -3
- package/lib/controls/collapse-card/index.js.map +1 -1
- package/lib/controls/entity-select/entity-select.js.map +1 -1
- package/lib/controls/entry-control.js +1 -1
- package/lib/controls/entry-control.js.map +1 -1
- package/lib/detail/edit/dtmpl-edit.d.ts.map +1 -1
- package/lib/detail/edit/dtmpl-edit.js +5 -1
- package/lib/detail/edit/dtmpl-edit.js.map +1 -1
- package/lib/detail/tooltipbar/index.d.ts +19 -0
- package/lib/detail/tooltipbar/index.d.ts.map +1 -0
- package/lib/detail/tooltipbar/index.js +29 -0
- package/lib/detail/tooltipbar/index.js.map +1 -0
- package/lib/detail/view/act-dtmpl-view.d.ts.map +1 -1
- package/lib/detail/view/act-dtmpl-view.js +4 -2
- package/lib/detail/view/act-dtmpl-view.js.map +1 -1
- package/lib/detail/view/dtmpl-view.d.ts.map +1 -1
- package/lib/detail/view/dtmpl-view.js +6 -2
- package/lib/detail/view/dtmpl-view.js.map +1 -1
- package/lib/form/dtmpl-form.d.ts.map +1 -1
- package/lib/form/dtmpl-form.js +3 -1
- package/lib/form/dtmpl-form.js.map +1 -1
- package/lib/module/dtmpl-edit-card.d.ts.map +1 -1
- package/lib/module/dtmpl-edit-card.js +5 -1
- package/lib/module/dtmpl-edit-card.js.map +1 -1
- package/lib/module/dtmpl-edit-page.d.ts.map +1 -1
- package/lib/module/dtmpl-edit-page.js +5 -1
- package/lib/module/dtmpl-edit-page.js.map +1 -1
- package/lib/module/dtmpl-editor.d.ts.map +1 -1
- package/lib/module/dtmpl-editor.js +5 -1
- package/lib/module/dtmpl-editor.js.map +1 -1
- package/lib/module/dtmpl-view-card.d.ts +2 -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.d.ts.map +1 -1
- package/lib/module/dtmpl-view-drawer.js +3 -3
- 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 +2 -2
- package/lib/module/ltmpl-table.js.map +1 -1
- package/lib/routable/dtmpl-route.d.ts +2 -2
- package/lib/routable/dtmpl-route.d.ts.map +1 -1
- package/lib/routable/dtmpl-route.js +3 -25
- package/lib/routable/dtmpl-route.js.map +1 -1
- package/lib/table/act-table.d.ts +1 -0
- package/lib/table/act-table.d.ts.map +1 -1
- package/lib/table/act-table.js +5 -2
- package/lib/table/act-table.js.map +1 -1
- package/lib/table/relation-table.d.ts.map +1 -1
- package/lib/table/relation-table.js +3 -3
- package/lib/table/relation-table.js.map +1 -1
- package/lib/tmpl/hcservice-v3.d.ts +2 -1
- package/lib/tmpl/hcservice-v3.d.ts.map +1 -1
- package/lib/tmpl/hcservice-v3.js +33 -12
- package/lib/tmpl/hcservice-v3.js.map +1 -1
- package/lib/tmpl/interface.d.ts +8 -0
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/lib/tmpl/interface.js.map +1 -1
- package/lib/tmpl/model-struc-v3.d.ts +10 -0
- package/lib/tmpl/model-struc-v3.d.ts.map +1 -0
- package/lib/tmpl/model-struc-v3.js +109 -0
- package/lib/tmpl/model-struc-v3.js.map +1 -0
- package/lib/tmpl/superagent.d.ts.map +1 -1
- package/lib/tmpl/superagent.js +7 -2
- package/lib/tmpl/superagent.js.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/controls/action/index.tsx +21 -14
- package/src/aldehyde/controls/collapse-card/index.tsx +10 -6
- package/src/aldehyde/controls/entity-select/entity-select.tsx +1 -1
- package/src/aldehyde/controls/entry-control.tsx +1 -1
- package/src/aldehyde/detail/edit/dtmpl-edit.tsx +5 -1
- package/src/aldehyde/detail/tooltipbar/index.tsx +32 -0
- package/src/aldehyde/detail/view/act-dtmpl-view.tsx +4 -3
- package/src/aldehyde/detail/view/dtmpl-view.tsx +6 -2
- package/src/aldehyde/form/dtmpl-form.tsx +4 -4
- package/src/aldehyde/module/dtmpl-edit-card.tsx +5 -1
- package/src/aldehyde/module/dtmpl-edit-page.tsx +5 -1
- package/src/aldehyde/module/dtmpl-editor.tsx +5 -1
- package/src/aldehyde/module/dtmpl-view-card.tsx +5 -3
- package/src/aldehyde/module/dtmpl-view-drawer.tsx +4 -3
- package/src/aldehyde/module/dtmpl-view-modal.tsx +2 -2
- package/src/aldehyde/module/ltmpl-table.tsx +3 -2
- package/src/aldehyde/routable/dtmpl-route.tsx +6 -26
- package/src/aldehyde/table/act-table.tsx +4 -2
- package/src/aldehyde/table/relation-table.tsx +3 -2
- package/src/aldehyde/tmpl/hcservice-v3.tsx +31 -12
- package/src/aldehyde/tmpl/interface.tsx +9 -1
- package/src/aldehyde/tmpl/model-struc-v3.tsx +98 -0
- package/src/aldehyde/tmpl/superagent.js +7 -2
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { message } from 'antd';
|
|
11
|
+
import Superagent from "./superagent";
|
|
12
|
+
class ModelStrucV3 {
|
|
13
|
+
static post(sourceId, jsonEntity, serverKey) {
|
|
14
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
const formData = new FormData();
|
|
16
|
+
formData.append('sourceId', sourceId);
|
|
17
|
+
formData.append('jsonEntity', JSON.stringify(jsonEntity));
|
|
18
|
+
let res = yield Superagent.super({
|
|
19
|
+
url: this.url,
|
|
20
|
+
serverKey,
|
|
21
|
+
data: formData,
|
|
22
|
+
method: 'POST'
|
|
23
|
+
}, 'formdata', null);
|
|
24
|
+
let code = null;
|
|
25
|
+
if (res) {
|
|
26
|
+
if (res.status === "success") {
|
|
27
|
+
if (message) {
|
|
28
|
+
if (res.message) {
|
|
29
|
+
message.warning("保存成功! " + res.message, 4);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
message.success("保存成功! ", 1);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
code = res.entityCode ? res.entityCode : res.code;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
if (message) {
|
|
40
|
+
message.error("保存失败");
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return { code, status: res ? res.status : 'error' };
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
static get(sourceId, params, serverKey) {
|
|
47
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
let res = yield Superagent.super({
|
|
49
|
+
url: this.url,
|
|
50
|
+
serverKey,
|
|
51
|
+
query: Object.assign({ pageSize: 1000, sourceId }, params),
|
|
52
|
+
method: 'GET'
|
|
53
|
+
}, null, null);
|
|
54
|
+
let code = null;
|
|
55
|
+
if (res) {
|
|
56
|
+
if (res.status === "success") {
|
|
57
|
+
if (message) {
|
|
58
|
+
if (res.message) {
|
|
59
|
+
message.warning("查询成功! " + res.message, 4);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
code = res.entityCode ? res.entityCode : res.code;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
message.error("查询失败! " + res.message, 6);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
if (message) {
|
|
70
|
+
message.error("查询失败");
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return res ? res : { status: "error" };
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
static delete(sourceId, codes, serverKey) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
let res = yield Superagent.super({
|
|
79
|
+
url: this.url,
|
|
80
|
+
serverKey,
|
|
81
|
+
query: { sourceId, codes },
|
|
82
|
+
method: 'DELETE'
|
|
83
|
+
}, null, null);
|
|
84
|
+
let code = null;
|
|
85
|
+
if (res) {
|
|
86
|
+
if (res.status === "success") {
|
|
87
|
+
if (message) {
|
|
88
|
+
if (res.message) {
|
|
89
|
+
message.warning("删除成功! " + res.message, 4);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
code = res.entityCode ? res.entityCode : res.code;
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
message.error("删除失败! " + res.message, 6);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
if (message) {
|
|
100
|
+
message.error("删除失败");
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return res;
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
ModelStrucV3.url = '/v3/mstruc/data';
|
|
108
|
+
export default ModelStrucV3;
|
|
109
|
+
//# sourceMappingURL=model-struc-v3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-struc-v3.js","sourceRoot":"","sources":["../../../../src/aldehyde/tmpl/model-struc-v3.tsx"],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AG;gBACZ,SAAS;gBACT,KAAK,EAAE,EAAC,QAAQ,EAAC,KAAK,EAAC;gBACvB,MAAM,EAAE,QAAQ;aACnB,EAAE,IAAI,EAAC,IAAI,CAAC,CAAA;YACb,IAAI,IAAI,GAAG,IAAI,CAAC;YAChB,IAAI,GAAG,EAAE;gBACL,IAAI,GAAG,CAAC,MAAM,KAAK,SAAS,EAAE;oBAC1B,IAAI,OAAO,EAAE;wBACT,IAAI,GAAG,CAAC,OAAO,EAAE;4BACb,OAAO,CAAC,OAAO,CAAC,QAAQ,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;yBAC9C;qBACJ;oBACD,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;iBACrD;qBAAI;oBACD,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;iBAC5C;aACJ;iBAAM;gBACH,IAAI,OAAO,EAAE;oBACT,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;iBACzB;aACJ;YACD,OAAO,GAAG,CAAC;QACf,CAAC;KAAA;;AAvFM,gBAAG,GAAC,iBAAiB,CAAC;eAFZ,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"superagent.d.ts","sourceRoot":"","sources":["../../../../src/aldehyde/tmpl/superagent.js"],"names":[],"mappings":"AAIA;IACI,+
|
|
1
|
+
{"version":3,"file":"superagent.d.ts","sourceRoot":"","sources":["../../../../src/aldehyde/tmpl/superagent.js"],"names":[],"mappings":"AAIA;IACI,+DA4EC;IAiCD,uCAkBC;IAED;;;MAKC;CAGJ"}
|
package/lib/tmpl/superagent.js
CHANGED
|
@@ -42,8 +42,13 @@ export default class Superagent {
|
|
|
42
42
|
if (res.status === 200) {
|
|
43
43
|
//Units.setHydrocarbonToken("hydrocarbonToken", hydrocarbonToken)
|
|
44
44
|
let result = res.body;
|
|
45
|
-
if (result
|
|
46
|
-
|
|
45
|
+
if (result) {
|
|
46
|
+
if (result.status === 'error') {
|
|
47
|
+
message.error("错误消息:" + result.message, 6);
|
|
48
|
+
}
|
|
49
|
+
// else if(result.message){
|
|
50
|
+
// message.warn(result.message,4)
|
|
51
|
+
// }
|
|
47
52
|
}
|
|
48
53
|
resolve(result);
|
|
49
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"superagent.js","sourceRoot":"","sources":["../../../../src/aldehyde/tmpl/superagent.js"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAC,OAAO,EAAC,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,MAAM,UAAU,CAAC;AAE7B,MAAM,CAAC,OAAO,OAAO,UAAU;IAC3B,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI;QAC5B,MAAM,gBAAgB,GAAG,KAAK,CAAC,gBAAgB,EAAE,CAAA,CAAC,CAAC,KAAK,CAAC,gBAAgB,EAAE;YACvE,CAAC,CAAC,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;gBACjD,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,KAAK,CAAC,sBAAsB,EAAE,CAAC;QAEzE,IAAI,SAAS,GAAC,OAAO,CAAC,SAAS,CAAC;QAEhC,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QACjD,IAAI,OAAO,CAAC;QACZ,IAAI,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,aAAa,KAAK,KAAK,EAAE;YACtD,OAAO,GAAG,QAAQ,CAAC,cAAc,CAAC,aAAa,CAAC,CAAA;YAChD,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,IAA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BAAgB,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,sBAAsB,EAAE;YACxG,2BAA2B,EAAE,KAAK,CAAC,WAAW,EAAE;SACnD,CAAA;IACL,CAAC;CAGJ"}
|
package/package.json
CHANGED
|
@@ -36,7 +36,6 @@ interface ActionState {
|
|
|
36
36
|
export default class Action extends React.PureComponent<ActionProps, ActionState> {
|
|
37
37
|
|
|
38
38
|
static defaultProps = {
|
|
39
|
-
buttonType: 'dashed',
|
|
40
39
|
hiddenType: 'hidden',
|
|
41
40
|
buttonSize: undefined,
|
|
42
41
|
iconType:'icon-title',
|
|
@@ -123,9 +122,9 @@ export default class Action extends React.PureComponent<ActionProps, ActionState
|
|
|
123
122
|
|
|
124
123
|
|
|
125
124
|
getButtonType = () => {
|
|
126
|
-
const {buttonType} = this.props;
|
|
125
|
+
const {buttonType,actionConfig} = this.props;
|
|
127
126
|
let bType: ButtonType = !buttonType ? "dashed" : buttonType.split("-")[0] == "dashed" ? "dashed" : "primary";
|
|
128
|
-
return
|
|
127
|
+
return buttonType?bType:actionConfig.buttonType?actionConfig.buttonType:"dashed";
|
|
129
128
|
}
|
|
130
129
|
|
|
131
130
|
blockButton = (): boolean => {
|
|
@@ -137,7 +136,7 @@ export default class Action extends React.PureComponent<ActionProps, ActionState
|
|
|
137
136
|
|
|
138
137
|
formButton = () => {
|
|
139
138
|
const {popoverOpen} = this.state;
|
|
140
|
-
const {actionConfig,
|
|
139
|
+
const {actionConfig, disabled,hiddenType, buttonSize,serverKey} = this.props;
|
|
141
140
|
let disabled_ = disabled;
|
|
142
141
|
if (!this.isShow()) {
|
|
143
142
|
if (!hiddenType || hiddenType == 'hidden') {
|
|
@@ -150,25 +149,33 @@ export default class Action extends React.PureComponent<ActionProps, ActionState
|
|
|
150
149
|
<FieldsEditCard serverKey={serverKey} okDanger={actionConfig.beforeExeConfirm == 'danger'} needConfirm={true} title={actionConfig.title} onCancel={() => this.onCancel()} fields={actionConfig.writes}
|
|
151
150
|
value={this.getValue()} onOk={this.onOk}
|
|
152
151
|
onValuesChange={this.onValuesChange}/>}>
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
152
|
+
<Button danger={actionConfig.danger } type={this.getButtonType()} shape={actionConfig.buttonShape} block={this.blockButton()} size={buttonSize}
|
|
153
|
+
onClick={() => this.setState({popoverOpen: !popoverOpen})}
|
|
154
|
+
disabled={disabled_} >{this.getTitle()}</Button>
|
|
155
|
+
|
|
156
156
|
</Popover>
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
getTitle=()=>{
|
|
160
160
|
const {actionConfig,iconType} = this.props;
|
|
161
|
+
let title=null;
|
|
161
162
|
if(actionConfig.icon){
|
|
162
163
|
if(iconType=='icon-title'){
|
|
163
|
-
|
|
164
|
+
title= <><Icon type={actionConfig.icon}></Icon>{actionConfig.title}</>
|
|
164
165
|
}else if(iconType=='icon'){
|
|
165
|
-
|
|
166
|
+
title= <Tooltip placement="top" title={actionConfig.title}><Icon type={actionConfig.icon}></Icon>{''}</Tooltip>
|
|
166
167
|
}else{
|
|
167
|
-
|
|
168
|
+
title= actionConfig.title;
|
|
168
169
|
}
|
|
169
170
|
}else{
|
|
170
|
-
|
|
171
|
+
title= actionConfig.title;
|
|
171
172
|
}
|
|
173
|
+
|
|
174
|
+
if(actionConfig.tip && iconType!='icon'){
|
|
175
|
+
title=<><Tooltip title={actionConfig.tip}>{title}</Tooltip></>
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
return title;
|
|
172
179
|
}
|
|
173
180
|
|
|
174
181
|
|
|
@@ -211,7 +218,7 @@ export default class Action extends React.PureComponent<ActionProps, ActionState
|
|
|
211
218
|
okText="确定"
|
|
212
219
|
cancelText="取消"
|
|
213
220
|
>
|
|
214
|
-
<Button size={buttonSize} type={bType} block={block} disabled={disabled_}
|
|
221
|
+
<Button size={buttonSize} danger={actionConfig.danger } type={bType} shape={actionConfig.buttonShape} block={block} disabled={disabled_}
|
|
215
222
|
>{this.getTitle()}</Button>
|
|
216
223
|
</Popconfirm> :
|
|
217
224
|
actionConfig.beforeExeConfirm == 'danger' ?
|
|
@@ -226,10 +233,10 @@ export default class Action extends React.PureComponent<ActionProps, ActionState
|
|
|
226
233
|
cancelText="取消"
|
|
227
234
|
okType={'danger'}
|
|
228
235
|
>
|
|
229
|
-
<Button type={bType} block={block} danger={true} size={buttonSize} disabled={disabled_}
|
|
236
|
+
<Button type={bType} block={block} danger={true} shape={actionConfig.buttonShape} size={buttonSize} disabled={disabled_}
|
|
230
237
|
>{this.getTitle()}</Button>
|
|
231
238
|
</Popconfirm> :
|
|
232
|
-
<Button type={bType} block={block} size={buttonSize}
|
|
239
|
+
<Button type={bType} block={block} size={buttonSize} shape={actionConfig.buttonShape} danger={actionConfig.danger}
|
|
233
240
|
onClick={() => doAction(actionConfig.id, codes, {})}
|
|
234
241
|
disabled={disabled_}
|
|
235
242
|
>{this.getTitle()}</Button>
|
|
@@ -3,13 +3,15 @@ import {Button, Card} from 'antd'
|
|
|
3
3
|
import './index.css'
|
|
4
4
|
import {DownOutlined, RightOutlined} from '@ant-design/icons';
|
|
5
5
|
import {CardProps} from "antd/lib/card";
|
|
6
|
+
import ToolTipBar from "../../detail/tooltipbar";
|
|
6
7
|
|
|
7
8
|
interface CollapseCardProps extends CardProps {
|
|
8
9
|
initCollapse?: boolean,
|
|
10
|
+
tip?:any,
|
|
9
11
|
};
|
|
10
12
|
|
|
11
13
|
interface CollapseCardState {
|
|
12
|
-
collapse?: boolean
|
|
14
|
+
collapse?: boolean,
|
|
13
15
|
};
|
|
14
16
|
export default class CollapseCard extends React.PureComponent<CollapseCardProps, CollapseCardState> {
|
|
15
17
|
|
|
@@ -34,26 +36,28 @@ export default class CollapseCard extends React.PureComponent<CollapseCardProps,
|
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
cardTitle = () => {
|
|
37
|
-
const {title} = this.props;
|
|
39
|
+
const {title,tip} = this.props;
|
|
38
40
|
const {collapse} = this.state;
|
|
39
41
|
if(!title || 'null'==title){//没title不显示card 头 ,同时不支持伸缩。
|
|
40
42
|
return null;
|
|
41
|
-
}
|
|
43
|
+
};
|
|
44
|
+
let titleBegin=null;
|
|
42
45
|
if (collapse) {
|
|
43
|
-
|
|
46
|
+
titleBegin= <Button type="text" onClick={() => {
|
|
44
47
|
this.setState({collapse: false})
|
|
45
48
|
}}><RightOutlined/>{title}</Button>
|
|
46
49
|
} else {
|
|
47
|
-
|
|
50
|
+
titleBegin= <Button type="text" onClick={() => {
|
|
48
51
|
this.setState({collapse: true})
|
|
49
52
|
}}><DownOutlined/>{title}</Button>
|
|
50
53
|
}
|
|
54
|
+
return <>{titleBegin}<ToolTipBar content={tip}></ToolTipBar></>;
|
|
51
55
|
}
|
|
52
56
|
|
|
53
57
|
render() {
|
|
54
58
|
const {collapse} = this.state;
|
|
55
59
|
const { extra, title, className,initCollapse, ...other } = this.props;
|
|
56
|
-
return <Card {...other}
|
|
60
|
+
return <Card {...other} size={'small'} extra={collapse ? "" : extra}
|
|
57
61
|
className={`${className} ${collapse ? 'collapse' : ""}`} title={this.cardTitle()}>
|
|
58
62
|
{collapse ? null : this.props.children}
|
|
59
63
|
</Card>;
|
|
@@ -525,7 +525,7 @@ export default class EntitySelect extends React.PureComponent<InnerEntitySelectP
|
|
|
525
525
|
}}>
|
|
526
526
|
</Select>
|
|
527
527
|
{showView && drawCode ?
|
|
528
|
-
<DtmplViewDrawer
|
|
528
|
+
<DtmplViewDrawer serverKey={serverKey} placement={'left'} onClose={this.doClose} open={showView}
|
|
529
529
|
sourceId={fieldConfig.id} code={drawCode}></DtmplViewDrawer> : null}
|
|
530
530
|
{showEdit && ltmplConfig ?ltmplConfig.customEditPagePath?<DtmplCustomEditModalPage open={showEdit} onOk={() => {
|
|
531
531
|
this.drawSubmited();
|
|
@@ -209,7 +209,7 @@ function renderControl(id:any,mainCode:string|Promise<string>,fieldConfig: Fiel
|
|
|
209
209
|
break;
|
|
210
210
|
case 'password':
|
|
211
211
|
entryControl = <Input.Password
|
|
212
|
-
{...antdControlProps}
|
|
212
|
+
{...antdControlProps} autoComplete="new-password"
|
|
213
213
|
prefix={<LockOutlined className="site-form-item-icon"/>}
|
|
214
214
|
/>
|
|
215
215
|
break;
|
|
@@ -102,7 +102,11 @@ export default class DtmplEdit extends React.PureComponent<DtmplEditProps, Dtmpl
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
loadData = async (dtmplConfig:DtmplConfig ) => {
|
|
105
|
-
const { sourceId, code,addOrUpdate,serverKey} = this.props;
|
|
105
|
+
const { sourceId, code:propsCode,addOrUpdate,serverKey,codeSource} = this.props;
|
|
106
|
+
let code=propsCode;
|
|
107
|
+
if(!code && codeSource){
|
|
108
|
+
code=await HcserviceV3.queryCode(sourceId,codeSource,serverKey);
|
|
109
|
+
}
|
|
106
110
|
if (code) {
|
|
107
111
|
this.setState({
|
|
108
112
|
loading: true,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import {QuestionCircleOutlined} from '@ant-design/icons';
|
|
3
|
+
import { Button,Popover } from "antd";
|
|
4
|
+
import {ButtonProps} from "antd/lib/button";
|
|
5
|
+
import {TooltipPlacement} from "antd/lib/tooltip";
|
|
6
|
+
interface ToolTipBarProps extends ButtonProps{
|
|
7
|
+
content:any,
|
|
8
|
+
placement:TooltipPlacement,
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
interface ToolTipBarState {
|
|
13
|
+
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default class ToolTipBar extends React.PureComponent<ToolTipBarProps, ToolTipBarState> {
|
|
17
|
+
|
|
18
|
+
static defaultProps = {
|
|
19
|
+
placement:'right',
|
|
20
|
+
size:'small',
|
|
21
|
+
type:'text',
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
render() {
|
|
26
|
+
const {placement,icon,content,...other} = this.props
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
return (content? <Popover placement={placement} content={<div dangerouslySetInnerHTML={{__html:content}} ></div>}>
|
|
29
|
+
<Button {...other} icon={icon?icon:<QuestionCircleOutlined />} /></Popover>:null
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -7,6 +7,7 @@ import '../dtmpl.css';
|
|
|
7
7
|
import SnapshotTimeline from "./snapshot-timeline";
|
|
8
8
|
import DtmplView from "./dtmpl-view";
|
|
9
9
|
import Units from '../../units'
|
|
10
|
+
import ToolTipBar from "../tooltipbar";
|
|
10
11
|
|
|
11
12
|
export interface ActDtmplViewProps extends DtmplBaseProps {
|
|
12
13
|
versionId?: number;
|
|
@@ -80,7 +81,7 @@ class ActDtmplView extends React.PureComponent<ActDtmplViewProps, ActDtmplViewSt
|
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
render() {
|
|
83
|
-
const {showRightNav, rightBarPositionRight, code, sourceId,goDtmpl,serverKey} = this.props;
|
|
84
|
+
const {showRightNav, rightBarPositionRight, code, sourceId,goDtmpl,serverKey,codeSource} = this.props;
|
|
84
85
|
const {dtmplConfig, premisesTitle, loading, layout, snapshotOpen,refreshCode} = this.state;
|
|
85
86
|
const buttons = dtmplConfig ? dtmplConfig.buttons : undefined;
|
|
86
87
|
const premises = dtmplConfig ? dtmplConfig.premises : undefined;
|
|
@@ -95,7 +96,7 @@ class ActDtmplView extends React.PureComponent<ActDtmplViewProps, ActDtmplViewSt
|
|
|
95
96
|
className="hoverable pageHeader"
|
|
96
97
|
>
|
|
97
98
|
<h3>
|
|
98
|
-
{'详情'}
|
|
99
|
+
{'详情'}{dtmplConfig?<ToolTipBar content={dtmplConfig.tip} />:null}
|
|
99
100
|
<div className="fr">
|
|
100
101
|
{buttons && buttons.includes("dtmplEdit") && goDtmpl && !dtmplConfig.editAction ?
|
|
101
102
|
<Button
|
|
@@ -121,7 +122,7 @@ class ActDtmplView extends React.PureComponent<ActDtmplViewProps, ActDtmplViewSt
|
|
|
121
122
|
</div>
|
|
122
123
|
</h3>
|
|
123
124
|
</Card>
|
|
124
|
-
<DtmplView serverKey={serverKey} refreshCode={refreshCode} showRightNav={showRightNav_} rightBarPositionRight={rightBarPositionRight}
|
|
125
|
+
<DtmplView codeSource={codeSource} serverKey={serverKey} refreshCode={refreshCode} showRightNav={showRightNav_} rightBarPositionRight={rightBarPositionRight}
|
|
125
126
|
dtmplConfig={dtmplConfig} sourceId={sourceId}
|
|
126
127
|
code={code}></DtmplView>
|
|
127
128
|
</div>
|
|
@@ -55,7 +55,11 @@ class DtmplView extends React.PureComponent<DtmplViewProps, DtmplViewStat> {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
loadData = async () => {
|
|
58
|
-
const { sourceId, code, versionId,serverKey} = this.props;
|
|
58
|
+
const { sourceId, code:propsCode, versionId,serverKey,codeSource} = this.props;
|
|
59
|
+
let code=propsCode;
|
|
60
|
+
if(!code && codeSource){
|
|
61
|
+
code=await HcserviceV3.queryCode(sourceId,codeSource,serverKey);
|
|
62
|
+
}
|
|
59
63
|
if (code) {
|
|
60
64
|
this.setState({
|
|
61
65
|
loading: true,
|
|
@@ -93,7 +97,7 @@ class DtmplView extends React.PureComponent<DtmplViewProps, DtmplViewStat> {
|
|
|
93
97
|
viewOrEdit={"view"}/>
|
|
94
98
|
}
|
|
95
99
|
} else {//字段组
|
|
96
|
-
return <CollapseCard
|
|
100
|
+
return <CollapseCard tip={item.tip}
|
|
97
101
|
title={item.title}
|
|
98
102
|
key={item.id}
|
|
99
103
|
id={id+item.id}
|
|
@@ -9,6 +9,7 @@ import RelationTable from "../table/relation-table";
|
|
|
9
9
|
import './dtmpl-form.css';
|
|
10
10
|
import CollapseCard from "../controls/collapse-card";
|
|
11
11
|
import {ProgramConfig} from "../index";
|
|
12
|
+
import ToolTipBar from "../detail/tooltipbar";
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
|
|
@@ -165,6 +166,7 @@ export default class DtmplForm extends React.PureComponent<DtmplFormProps, Dtmpl
|
|
|
165
166
|
}
|
|
166
167
|
} else {//字段组
|
|
167
168
|
return <CollapseCard
|
|
169
|
+
tip={item.tip}
|
|
168
170
|
title={item.title}
|
|
169
171
|
key={item.id}
|
|
170
172
|
id={parentId+item.id}
|
|
@@ -173,11 +175,8 @@ export default class DtmplForm extends React.PureComponent<DtmplFormProps, Dtmpl
|
|
|
173
175
|
loading={loading}
|
|
174
176
|
bodyStyle={{padding:'6px'}}
|
|
175
177
|
>
|
|
176
|
-
|
|
177
178
|
<FormItemGroup serverKey={serverKey} formRef={formRef} mainCode={mainCode} maxColsOnRow={maxColsOnRow} fields={item?item.fields:undefined} valueMap={dtmplData ? dtmplData.fieldMap : undefined}
|
|
178
179
|
></FormItemGroup>
|
|
179
|
-
|
|
180
|
-
|
|
181
180
|
</CollapseCard>
|
|
182
181
|
}
|
|
183
182
|
}
|
|
@@ -211,7 +210,8 @@ export default class DtmplForm extends React.PureComponent<DtmplFormProps, Dtmpl
|
|
|
211
210
|
// loading={loading}
|
|
212
211
|
>
|
|
213
212
|
<h3>
|
|
214
|
-
{code || (currentDtmplData && currentDtmplData.code)?
|
|
213
|
+
{code || (currentDtmplData && currentDtmplData.code)?"[编辑]":"[新增]"}
|
|
214
|
+
{dtmplConfig?<ToolTipBar content={dtmplConfig.tip} />:null}
|
|
215
215
|
<div className="fr">
|
|
216
216
|
{buttons && buttons.includes('fusionMode') ?
|
|
217
217
|
<Switch
|
|
@@ -96,7 +96,11 @@ export default class DtmplEditCard extends React.PureComponent<DtmplEditCardProp
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
loadData = async (dtmplConfig:DtmplConfig ) => {
|
|
99
|
-
const { sourceId, code,defaultDtmplData,serverKey} = this.props;
|
|
99
|
+
const { sourceId, code:propsCode,defaultDtmplData,serverKey,codeSource} = this.props;
|
|
100
|
+
let code=propsCode;
|
|
101
|
+
if(!code && codeSource){
|
|
102
|
+
code=await HcserviceV3.queryCode(sourceId,codeSource,serverKey);
|
|
103
|
+
}
|
|
100
104
|
if (code) {
|
|
101
105
|
this.setState({
|
|
102
106
|
loading: true,
|
|
@@ -114,10 +114,14 @@ export default class DtmplEditPage extends React.PureComponent<ModalEditorProps,
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
loadData = async (dtmplConfig:DtmplConfig ) => {
|
|
117
|
-
const { sourceId, code,defaultDtmplData,open,serverKey} = this.props;
|
|
117
|
+
const { sourceId, code:propsCode,defaultDtmplData,open,serverKey,codeSource} = this.props;
|
|
118
118
|
if(!open){
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
|
+
let code=propsCode;
|
|
122
|
+
if(!code && codeSource){
|
|
123
|
+
code=await HcserviceV3.queryCode(sourceId,codeSource,serverKey);
|
|
124
|
+
}
|
|
121
125
|
if (code) {
|
|
122
126
|
this.setState({
|
|
123
127
|
loading: true,
|
|
@@ -95,10 +95,14 @@ export default class DtmplEditPage extends React.PureComponent<ModalEditorProps,
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
loadData = async (dtmplConfig:DtmplConfig ) => {
|
|
98
|
-
const { sourceId, code,defaultDtmplData,open,serverKey} = this.props;
|
|
98
|
+
const { sourceId, code:propsCode,defaultDtmplData,open,serverKey,codeSource} = this.props;
|
|
99
99
|
if(!open){
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
|
+
let code=propsCode;
|
|
103
|
+
if(!code && codeSource){
|
|
104
|
+
code=await HcserviceV3.queryCode(sourceId,codeSource,serverKey);
|
|
105
|
+
}
|
|
102
106
|
if (code) {
|
|
103
107
|
this.setState({
|
|
104
108
|
loading: true,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import ActDtmplView from "./../detail/view/act-dtmpl-view";
|
|
3
3
|
import DtmplEditModal from './dtmpl-edit-modal';
|
|
4
|
+
import {CodeSource} from "../tmpl/interface";
|
|
4
5
|
|
|
5
6
|
//以列表为入口的,页面内列表,基本原则是所有交互在页面内完成,不会触发路由。
|
|
6
7
|
|
|
@@ -10,6 +11,7 @@ export interface DtmplViewCardProps {
|
|
|
10
11
|
code?:string;
|
|
11
12
|
mainCode?:string;
|
|
12
13
|
editable?:boolean;
|
|
14
|
+
codeSource?:CodeSource,
|
|
13
15
|
};
|
|
14
16
|
|
|
15
17
|
export interface DtmplViewCardState {
|
|
@@ -49,10 +51,10 @@ class DtmplViewCard extends React.PureComponent<DtmplViewCardProps, DtmplViewCar
|
|
|
49
51
|
|
|
50
52
|
render() {
|
|
51
53
|
const {showDtmplEdit} = this.state;
|
|
52
|
-
const { sourceId,code,mainCode,editable,serverKey} = this.props;
|
|
54
|
+
const { sourceId,code,mainCode,editable,serverKey,codeSource} = this.props;
|
|
53
55
|
return <>
|
|
54
|
-
<ActDtmplView serverKey={serverKey} goDtmpl={editable?this.goDtmpl:null} sourceId={sourceId} code={code} mainCode={mainCode}></ActDtmplView>
|
|
55
|
-
{showDtmplEdit? <DtmplEditModal serverKey={serverKey} open={showDtmplEdit} onCancel={()=>{
|
|
56
|
+
<ActDtmplView codeSource={codeSource} serverKey={serverKey} goDtmpl={editable?this.goDtmpl:null} sourceId={sourceId} code={code} mainCode={mainCode}></ActDtmplView>
|
|
57
|
+
{showDtmplEdit? <DtmplEditModal codeSource={codeSource} serverKey={serverKey} open={showDtmplEdit} onCancel={()=>{
|
|
56
58
|
this.setState({
|
|
57
59
|
showDtmplEdit:false,
|
|
58
60
|
})}}
|
|
@@ -2,6 +2,7 @@ import React, {ReactNode} from 'react'
|
|
|
2
2
|
import {Drawer, Space, Button} from 'antd'
|
|
3
3
|
import DtmplViewCard from "./dtmpl-view-card";
|
|
4
4
|
import {DtmplBaseProps} from "../tmpl/interface";
|
|
5
|
+
import ToolTipBar from "../detail/tooltipbar";
|
|
5
6
|
|
|
6
7
|
interface DtmplViewDrawerProps extends DtmplBaseProps{
|
|
7
8
|
title?:ReactNode,
|
|
@@ -38,10 +39,10 @@ class DtmplViewDrawer extends React.PureComponent<DtmplViewDrawerProps, DtmplVie
|
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
render() {
|
|
41
|
-
const {title,sourceId,code,placement,open,onClose,width,cancelText,editable,serverKey}=this.props;
|
|
42
|
+
const {title,sourceId,code,placement,open,onClose,width,cancelText,editable,serverKey,codeSource}=this.props;
|
|
42
43
|
return (<Drawer
|
|
43
44
|
placement={placement}
|
|
44
|
-
title={title}
|
|
45
|
+
title={<>{title}</>}
|
|
45
46
|
closable={true}
|
|
46
47
|
mask={false}
|
|
47
48
|
onClose={onClose}
|
|
@@ -56,7 +57,7 @@ class DtmplViewDrawer extends React.PureComponent<DtmplViewDrawerProps, DtmplVie
|
|
|
56
57
|
</Space>
|
|
57
58
|
}
|
|
58
59
|
>
|
|
59
|
-
<DtmplViewCard serverKey={serverKey} editable={editable} sourceId={sourceId} code={code}></DtmplViewCard>
|
|
60
|
+
<DtmplViewCard codeSource={codeSource} serverKey={serverKey} editable={editable} sourceId={sourceId} code={code}></DtmplViewCard>
|
|
60
61
|
</Drawer>)
|
|
61
62
|
}
|
|
62
63
|
}
|
|
@@ -34,7 +34,7 @@ class DtmplViewModal extends React.PureComponent<DtmplViewModalProps, DtmplViewM
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
render() {
|
|
37
|
-
const {title,sourceId,code,open,onClose,width,height,serverKey}=this.props;
|
|
37
|
+
const {title,sourceId,code,open,onClose,width,height,serverKey,codeSource}=this.props;
|
|
38
38
|
return <Modal
|
|
39
39
|
open={open}
|
|
40
40
|
width={width}
|
|
@@ -43,7 +43,7 @@ class DtmplViewModal extends React.PureComponent<DtmplViewModalProps, DtmplViewM
|
|
|
43
43
|
destroyOnClose={true}
|
|
44
44
|
centered
|
|
45
45
|
onCancel={onClose}
|
|
46
|
-
><DtmplViewCard serverKey={serverKey} sourceId={sourceId} code={code}></DtmplViewCard>
|
|
46
|
+
><DtmplViewCard codeSource={codeSource} serverKey={serverKey} sourceId={sourceId} code={code}></DtmplViewCard>
|
|
47
47
|
</Modal>
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -22,6 +22,7 @@ export interface LtmplTableProps {
|
|
|
22
22
|
doRAction?: (ractionId: string, mainCode: string) => void,
|
|
23
23
|
funcMode?: ActTableMode,
|
|
24
24
|
title?: ReactNode,
|
|
25
|
+
tip?:any,
|
|
25
26
|
collapsible?: boolean,
|
|
26
27
|
initCollapse?: boolean,
|
|
27
28
|
};
|
|
@@ -201,14 +202,14 @@ class LtmplTable extends React.PureComponent<LtmplTableProps, LtmplTableState> {
|
|
|
201
202
|
|
|
202
203
|
render() {
|
|
203
204
|
const {ltmplConfigRes, criteriaData,pageSize,pageNo, showDtmplView, selectedCode, showDtmplEdit, showDtmplCustomEdit, ractionId, showDraw, collapse} = this.state;
|
|
204
|
-
const {sourceId, mainCode, showView, doSearch, doRAction, funcMode, title, collapsible, initCollapse,doCustomEdit,doCustomCreate,serverKey} = this.props;
|
|
205
|
+
const {sourceId, mainCode, showView, doSearch, doRAction, funcMode, tip,title, collapsible, initCollapse,doCustomEdit,doCustomCreate,serverKey} = this.props;
|
|
205
206
|
|
|
206
207
|
if (!ltmplConfigRes) {
|
|
207
208
|
return <></>;
|
|
208
209
|
} else {
|
|
209
210
|
const {buttons,customEditPagePath} = ltmplConfigRes.ltmplConfig
|
|
210
211
|
return <>
|
|
211
|
-
<ActTable serverKey={serverKey} pageSize={pageSize} pageNo={pageNo} onChangePage={this.onChangePage} collapsible={collapsible} initCollapse={initCollapse && collapse} title={title}
|
|
212
|
+
<ActTable tip={tip} serverKey={serverKey} pageSize={pageSize} pageNo={pageNo} onChangePage={this.onChangePage} collapsible={collapsible} initCollapse={initCollapse && collapse} title={title}
|
|
212
213
|
funcMode={funcMode} mainCode={mainCode} showView={showView ? showView : this.showView}
|
|
213
214
|
doRAction={doRAction ? doRAction : this.doRAction}
|
|
214
215
|
doSearch={doSearch ? doSearch : this.doSearch} doEdit={this.doEdit} doCreate={this.doCreate}
|