aldehyde 0.2.57 → 0.2.59

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 (62) hide show
  1. package/lib/controls/action/index.d.ts +2 -3
  2. package/lib/controls/action/index.d.ts.map +1 -1
  3. package/lib/controls/action/index.js +17 -12
  4. package/lib/controls/action/index.js.map +1 -1
  5. package/lib/controls/collapse-card/index.d.ts +1 -0
  6. package/lib/controls/collapse-card/index.d.ts.map +1 -1
  7. package/lib/controls/collapse-card/index.js +9 -3
  8. package/lib/controls/collapse-card/index.js.map +1 -1
  9. package/lib/controls/entity-select/entity-select.js.map +1 -1
  10. package/lib/controls/entry-control.js +1 -1
  11. package/lib/controls/entry-control.js.map +1 -1
  12. package/lib/detail/tooltipbar/index.d.ts +19 -0
  13. package/lib/detail/tooltipbar/index.d.ts.map +1 -0
  14. package/lib/detail/tooltipbar/index.js +29 -0
  15. package/lib/detail/tooltipbar/index.js.map +1 -0
  16. package/lib/detail/view/act-dtmpl-view.d.ts.map +1 -1
  17. package/lib/detail/view/act-dtmpl-view.js +2 -0
  18. package/lib/detail/view/act-dtmpl-view.js.map +1 -1
  19. package/lib/detail/view/dtmpl-view.js +1 -1
  20. package/lib/detail/view/dtmpl-view.js.map +1 -1
  21. package/lib/form/dtmpl-form.d.ts.map +1 -1
  22. package/lib/form/dtmpl-form.js +3 -1
  23. package/lib/form/dtmpl-form.js.map +1 -1
  24. package/lib/module/dtmpl-view-drawer.d.ts.map +1 -1
  25. package/lib/module/dtmpl-view-drawer.js +1 -1
  26. package/lib/module/dtmpl-view-drawer.js.map +1 -1
  27. package/lib/module/ltmpl-table.d.ts +1 -0
  28. package/lib/module/ltmpl-table.d.ts.map +1 -1
  29. package/lib/module/ltmpl-table.js +2 -2
  30. package/lib/module/ltmpl-table.js.map +1 -1
  31. package/lib/table/act-table.d.ts +1 -0
  32. package/lib/table/act-table.d.ts.map +1 -1
  33. package/lib/table/act-table.js +5 -2
  34. package/lib/table/act-table.js.map +1 -1
  35. package/lib/table/relation-table.d.ts.map +1 -1
  36. package/lib/table/relation-table.js +1 -1
  37. package/lib/table/relation-table.js.map +1 -1
  38. package/lib/tmpl/hcservice-v3.d.ts.map +1 -1
  39. package/lib/tmpl/hcservice-v3.js +12 -11
  40. package/lib/tmpl/hcservice-v3.js.map +1 -1
  41. package/lib/tmpl/interface.d.ts +6 -0
  42. package/lib/tmpl/interface.d.ts.map +1 -1
  43. package/lib/tmpl/interface.js.map +1 -1
  44. package/lib/tmpl/superagent.d.ts.map +1 -1
  45. package/lib/tmpl/superagent.js +7 -2
  46. package/lib/tmpl/superagent.js.map +1 -1
  47. package/package.json +1 -1
  48. package/src/aldehyde/controls/action/index.tsx +21 -14
  49. package/src/aldehyde/controls/collapse-card/index.tsx +10 -6
  50. package/src/aldehyde/controls/entity-select/entity-select.tsx +1 -1
  51. package/src/aldehyde/controls/entry-control.tsx +1 -1
  52. package/src/aldehyde/detail/tooltipbar/index.tsx +32 -0
  53. package/src/aldehyde/detail/view/act-dtmpl-view.tsx +2 -1
  54. package/src/aldehyde/detail/view/dtmpl-view.tsx +1 -1
  55. package/src/aldehyde/form/dtmpl-form.tsx +4 -4
  56. package/src/aldehyde/module/dtmpl-view-drawer.tsx +2 -1
  57. package/src/aldehyde/module/ltmpl-table.tsx +3 -2
  58. package/src/aldehyde/table/act-table.tsx +4 -2
  59. package/src/aldehyde/table/relation-table.tsx +1 -0
  60. package/src/aldehyde/tmpl/hcservice-v3.tsx +11 -10
  61. package/src/aldehyde/tmpl/interface.tsx +6 -1
  62. package/src/aldehyde/tmpl/superagent.js +7 -2
@@ -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 && result.status === 'error') {
46
- message.error("错误消息:" + result.message, 6);
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,IAAI,CAAC,CAAC,CAAC,OAAO,CAAA;SAChD;QACD,IAAI,EAAE,GAAG,MAAM,CAAA;QACf,IAAI,IAAI,KAAK,UAAU,EAAE;YACrB,EAAE,GAAG,IAAI,CAAA;SACZ;aAAM,IAAI,IAAI,KAAK,MAAM,EAAE;YACxB,EAAE,GAAG,kBAAk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ED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aldehyde",
3
- "version": "0.2.57",
3
+ "version": "0.2.59",
4
4
  "author": "cosmicparticle",
5
5
  "main": "lib/index.js",
6
6
  "module": "src/aldehyde/index.txs",
@@ -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 bType;
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, doAction, data, disabled, buttonType,hiddenType, buttonSize,serverKey} = this.props;
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
- <Button danger={actionConfig.beforeExeConfirm == 'danger'} type={this.getButtonType()} block={this.blockButton()} size={buttonSize}
154
- onClick={() => this.setState({popoverOpen: !popoverOpen})}
155
- disabled={disabled_} >{this.getTitle()}</Button>
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
- return <><Icon type={actionConfig.icon}></Icon>{actionConfig.title}</>
164
+ title= <><Icon type={actionConfig.icon}></Icon>{actionConfig.title}</>
164
165
  }else if(iconType=='icon'){
165
- return <Tooltip placement="top" title={actionConfig.title}><Icon type={actionConfig.icon}></Icon>{''}</Tooltip>
166
+ title= <Tooltip placement="top" title={actionConfig.title}><Icon type={actionConfig.icon}></Icon>{''}</Tooltip>
166
167
  }else{
167
- return actionConfig.title;
168
+ title= actionConfig.title;
168
169
  }
169
170
  }else{
170
- return actionConfig.title;
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
- return <Button type="text" onClick={() => {
46
+ titleBegin= <Button type="text" onClick={() => {
44
47
  this.setState({collapse: false})
45
48
  }}><RightOutlined/>{title}</Button>
46
49
  } else {
47
- return <Button type="text" onClick={() => {
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} size={'small'} extra={collapse ? "" : extra}
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 serverKey={serverKey} placement={'left'} onClose={this.doClose} open={showView}
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;
@@ -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;
@@ -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
@@ -93,7 +93,7 @@ class DtmplView extends React.PureComponent<DtmplViewProps, DtmplViewStat> {
93
93
  viewOrEdit={"view"}/>
94
94
  }
95
95
  } else {//字段组
96
- return <CollapseCard
96
+ return <CollapseCard tip={item.tip}
97
97
  title={item.title}
98
98
  key={item.id}
99
99
  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
@@ -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,
@@ -41,7 +42,7 @@ class DtmplViewDrawer extends React.PureComponent<DtmplViewDrawerProps, DtmplVie
41
42
  const {title,sourceId,code,placement,open,onClose,width,cancelText,editable,serverKey}=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}
@@ -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}
@@ -50,6 +50,7 @@ import Restat from "./stat/restat"
50
50
  import ActionUtils from '../controls/action/utils'
51
51
  import CquickButton from "../controls/cquery/cquick-button";
52
52
  import CollapseCard from "../controls/collapse-card";
53
+ import ToolTipBar from "../detail/tooltipbar";
53
54
 
54
55
  const DragHandle = SortableHandle(() => <MenuOutlined style={{cursor: 'grab', color: '#999'}}/>);
55
56
  const {Panel} = Collapse;
@@ -77,6 +78,7 @@ interface ActTableProps extends TmplBaseProps {
77
78
  level?: Level,
78
79
  funcMode?: ActTableMode,
79
80
  title?: ReactNode,
81
+ tip?:any,
80
82
  collapsible?: boolean,
81
83
  initCollapse?:boolean,
82
84
  };
@@ -781,7 +783,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
781
783
 
782
784
  render() {
783
785
  let {queryKey, loading} = this.state;
784
- let {sourceId, ltmplConfig, title, collapsible,initCollapse} = this.props;
786
+ let {sourceId, ltmplConfig, title, collapsible,initCollapse,tip} = this.props;
785
787
 
786
788
  if (!ltmplConfig || !sourceId) {
787
789
  return <>
@@ -796,7 +798,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
796
798
  collapsible ?
797
799
  <CollapseCard
798
800
  initCollapse={initCollapse}
799
- title={title ? title : ltmplConfig.title}
801
+ title={<>{title ? title : ltmplConfig.title}<ToolTipBar content={tip?tip:ltmplConfig?ltmplConfig.tip:null}/></>}
800
802
  id={queryKey + ltmplConfig.id}
801
803
  className={`hoverable`}
802
804
  headStyle={{background: "#f2f4f5"}}
@@ -540,6 +540,7 @@ class RelationTable extends React.PureComponent<RelationTableProps, RelationTabl
540
540
  <CollapseCard
541
541
  initCollapse={initCollapse || fieldGroupConfig.displayConfig.includes('folded')}
542
542
  title={fieldGroupConfig.title}
543
+ tip={fieldGroupConfig.tip}
543
544
  id={parentId + fieldGroupConfig.id}
544
545
  className={`hoverable`}
545
546
  headStyle={{background: "#f2f4f5"}}
@@ -243,25 +243,26 @@ export default class HcserviceV3 {
243
243
  let code = null;
244
244
  if (res) {
245
245
  if (res.status === "success") {
246
- let msg = ""
247
- if (res.message) {
248
- msg = res.message;
249
- }
250
246
  if (message) {
251
- message.success("保存成功! " + msg,1)
247
+ if (res.message) {
248
+ message.warning("保存成功! " + res.message, 4);
249
+ } else{
250
+ message.success("保存成功! ",1);
251
+ }
252
252
  }
253
253
  code = res.entityCode ? res.entityCode : res.code;
254
- } else {
255
- if (message) {
256
- message.error("保存失败");
257
- }
258
254
  }
255
+ // else {
256
+ // if (message) {
257
+ // message.error("保存失败");
258
+ // }
259
+ // }
259
260
  } else {
260
261
  if (message) {
261
262
  message.error("保存失败");
262
263
  }
263
264
  }
264
- return {code, status: res.status};
265
+ return {code, status: res?res.status:'error'};
265
266
  }
266
267
 
267
268
  static async postDtmplData(serverKey:string,sourceId: string, formDataObj, message) {
@@ -1,7 +1,7 @@
1
1
  import {MenuProps} from "antd/lib/menu";
2
2
  import {FormInstance} from "antd";
3
3
  import React, {RefObject} from "react";
4
-
4
+ import {ButtonShape,ButtonType} from "antd/lib/button";
5
5
  export type ViewOrEdit = 'view' | 'edit' ;
6
6
 
7
7
  export type AddOrUpdate = 'add' | 'update'| 'copy' ;
@@ -19,6 +19,7 @@ export type PageType='modal'|'drawer'|'card';
19
19
  export interface TmplBase {
20
20
  id: string;
21
21
  title: string;
22
+ tip?:string;
22
23
  }
23
24
 
24
25
  export interface OrderableTmplBase extends TmplBase {
@@ -63,6 +64,10 @@ export interface ActionConfig extends OrderableTmplBase {
63
64
  beforeExeConfirm:string,
64
65
  preposes:FieldConfig[],
65
66
  writes:FieldConfig[],
67
+ tip:string,
68
+ buttonType?: ButtonType,
69
+ buttonShape?: ButtonShape,
70
+ danger?: boolean,
66
71
  }
67
72
 
68
73
  export interface JumpConfig extends OrderableTmplBase {
@@ -47,8 +47,13 @@ export default class Superagent {
47
47
  if (res.status === 200) {
48
48
  //Units.setHydrocarbonToken("hydrocarbonToken", hydrocarbonToken)
49
49
  let result = res.body;
50
- if (result && result.status === 'error') {
51
- message.error("错误消息:" + result.message,6)
50
+ if(result){
51
+ if ( result.status === 'error') {
52
+ message.error("错误消息:" + result.message,6)
53
+ }
54
+ // else if(result.message){
55
+ // message.warn(result.message,4)
56
+ // }
52
57
  }
53
58
  resolve(result)
54
59
  } else if (res.status === 201) {