Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaochengxiang
szse
Commits
ab593e04
Commit
ab593e04
authored
Jul 18, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
主数据模版字段编辑
parent
f256b872
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
170 additions
and
41 deletions
+170
-41
Mock.js
src/view/Manage/DataMaster/Component/Mock.js
+144
-0
UpdateBasicInfo.jsx
src/view/Manage/DataMaster/Component/UpdateBasicInfo.jsx
+15
-5
UpdateField.jsx
src/view/Manage/DataMaster/Component/UpdateField.jsx
+0
-0
UpdateTemplateModal.jsx
src/view/Manage/DataMaster/Component/UpdateTemplateModal.jsx
+4
-26
ImportAction.jsx
src/view/Manage/Model/Component/ImportAction.jsx
+1
-1
ImportActionTable.jsx
src/view/Manage/Model/Component/ImportActionTable.jsx
+5
-8
TemplateAction.jsx
src/view/Manage/ModelConfig/Component/TemplateAction.jsx
+1
-1
No files found.
src/view/Manage/DataMaster/Component/Mock.js
View file @
ab593e04
...
@@ -168,3 +168,146 @@ export const expandedTableData = [
...
@@ -168,3 +168,146 @@ export const expandedTableData = [
attr6
:
'attr6'
,
attr6
:
'attr6'
,
},
},
];
];
export
const
templateFileds
=
[
{
"name"
:
"company_short_name"
,
"remark"
:
"公司简称"
,
"cnName"
:
"公司简称"
,
"modelingTemplateTag"
:
null
,
"datatype"
:
{
"name"
:
"Varchar"
,
"cnName"
:
"字符串"
,
"supportedDBTypes"
:
[
"Greenplum"
,
"MySQL"
],
"parameterNames"
:
[
"length"
],
"parameterCnNames"
:
[
"长度"
],
"parameterValues"
:
[
68
],
"jdbctype"
:
12
},
"recommendedStats"
:
null
,
"iid"
:
"fc3ad8bb-1ebd-4eb2-ae0e-5cc8305bced3"
,
"isPossibleNewTerm"
:
null
,
"isPossibleNewRecommendedDefinition"
:
null
,
"notNull"
:
false
,
"foreignKey"
:
false
,
"defaultValue"
:
""
,
"needAttention"
:
false
,
"definition"
:
null
,
"valueRange"
:
null
,
"partOfPrimaryKeyLogically"
:
false
},
{
"name"
:
"counterparty_executing_trader"
,
"remark"
:
"对手方交易账户"
,
"cnName"
:
"对手方交易账户"
,
"modelingTemplateTag"
:
null
,
"datatype"
:
{
"name"
:
"Char"
,
"cnName"
:
"字符"
,
"supportedDBTypes"
:
[
"Greenplum"
,
"MySQL"
],
"parameterNames"
:
[
"length"
],
"parameterCnNames"
:
[
"长度"
],
"parameterValues"
:
[
13
],
"jdbctype"
:
1
},
"recommendedStats"
:
null
,
"iid"
:
"9f0642cc-f9b6-4644-acc5-a6f146c5f89e"
,
"isPossibleNewTerm"
:
null
,
"isPossibleNewRecommendedDefinition"
:
null
,
"notNull"
:
false
,
"foreignKey"
:
false
,
"defaultValue"
:
""
,
"needAttention"
:
false
,
"definition"
:
null
,
"valueRange"
:
null
,
"partOfPrimaryKeyLogically"
:
false
},
{
"name"
:
"counterparty_member_branch_code"
,
"remark"
:
"对手方营业部识别码"
,
"cnName"
:
"对手方营业部识别码"
,
"modelingTemplateTag"
:
null
,
"datatype"
:
{
"name"
:
"Char"
,
"cnName"
:
"字符"
,
"supportedDBTypes"
:
[
"Greenplum"
,
"MySQL"
],
"parameterNames"
:
[
"length"
],
"parameterCnNames"
:
[
"长度"
],
"parameterValues"
:
[
15
],
"jdbctype"
:
1
},
"recommendedStats"
:
null
,
"iid"
:
"95070aa0-74de-4e97-9227-1952a875054e"
,
"isPossibleNewTerm"
:
null
,
"isPossibleNewRecommendedDefinition"
:
null
,
"notNull"
:
false
,
"foreignKey"
:
false
,
"defaultValue"
:
""
,
"needAttention"
:
false
,
"definition"
:
null
,
"valueRange"
:
null
,
"partOfPrimaryKeyLogically"
:
false
},
{
"name"
:
"record_sequence"
,
"remark"
:
"记录序号"
,
"cnName"
:
"记录序号"
,
"modelingTemplateTag"
:
null
,
"datatype"
:
{
"name"
:
"Char"
,
"cnName"
:
"字符"
,
"supportedDBTypes"
:
[
"Greenplum"
,
"MySQL"
],
"parameterNames"
:
[
"length"
],
"parameterCnNames"
:
[
"长度"
],
"parameterValues"
:
[
6
],
"jdbctype"
:
1
},
"recommendedStats"
:
null
,
"iid"
:
"ed72ad1a-9455-4be0-b093-2af2621a766e"
,
"isPossibleNewTerm"
:
null
,
"isPossibleNewRecommendedDefinition"
:
null
,
"notNull"
:
false
,
"foreignKey"
:
false
,
"defaultValue"
:
""
,
"needAttention"
:
false
,
"definition"
:
null
,
"valueRange"
:
null
,
"partOfPrimaryKeyLogically"
:
false
}
];
\ No newline at end of file
src/view/Manage/DataMaster/Component/UpdateBasicInfo.jsx
View file @
ab593e04
import
{
Form
,
Input
,
Divider
}
from
"antd"
;
import
{
Form
,
Input
,
Divider
,
Row
,
Col
}
from
"antd"
;
const
{
TextArea
}
=
Input
;
const
UpdateBasicInfo
=
(
props
)
=>
{
const
UpdateBasicInfo
=
(
props
)
=>
{
const
{
form
}
=
props
;
const
{
form
}
=
props
;
...
@@ -16,20 +18,28 @@ const UpdateBasicInfo = (props) => {
...
@@ -16,20 +18,28 @@ const UpdateBasicInfo = (props) => {
return
(
return
(
<
div
>
<
div
>
<
Divider
>
基本信息
</
Divider
>
<
h3
>
基本信息
</
h3
>
<
Form
<
Form
form=
{
form
}
form=
{
form
}
{
...
formItemLayout
}
{
...
formItemLayout
}
>
>
<
Form
.
Item
label=
'模版名称'
name=
'name'
rules=
{
[{
required
:
true
,
message
:
'请填写模版名称'
}]
}
>
<
Row
gutter=
{
10
}
>
<
Col
xs=
{
24
}
sm=
{
24
}
lg=
{
12
}
>
<
Form
.
Item
label=
'中文名称'
name=
'cnName'
rules=
{
[{
required
:
true
,
message
:
'请填写模版中文名称'
}]
}
>
<
Input
/>
<
Input
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
'模版中文名称'
name=
'cnName'
rules=
{
[{
required
:
true
,
message
:
'请填写模版中文名称'
}]
}
>
</
Col
>
<
Col
xs=
{
24
}
sm=
{
24
}
lg=
{
12
}
>
<
Form
.
Item
label=
'英文名称'
name=
'name'
rules=
{
[{
required
:
true
,
message
:
'请填写模版名称'
}]
}
>
<
Input
/>
<
Input
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
Col
>
<
Col
xs=
{
24
}
sm=
{
24
}
lg=
{
12
}
>
<
Form
.
Item
label=
'模版描述'
name=
'desc'
>
<
Form
.
Item
label=
'模版描述'
name=
'desc'
>
<
Input
/>
<
TextArea
row=
{
4
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
Col
>
</
Row
>
</
Form
>
</
Form
>
</
div
>
</
div
>
);
);
...
...
src/view/Manage/DataMaster/Component/UpdateField.jsx
View file @
ab593e04
This diff is collapsed.
Click to expand it.
src/view/Manage/DataMaster/Component/UpdateTemplateModal.jsx
View file @
ab593e04
import
{
Modal
,
Form
,
Input
,
Button
}
from
"antd"
;
import
{
Modal
,
Form
}
from
"antd"
;
import
{
MinusCircleOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
UpdateBasicInfo
from
"./UpdateBasicInfo"
;
import
UpdateBasicInfo
from
"./UpdateBasicInfo"
;
import
UpdateField
from
"./UpdateField"
;
import
'./UpdateTemplateModal.less'
;
import
'./UpdateTemplateModal.less'
;
const
UpdateTemplateModal
=
(
props
)
=>
{
const
UpdateTemplateModal
=
(
props
)
=>
{
const
{
visible
,
onCancel
}
=
props
;
const
{
visible
,
onCancel
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
const
formItemLayout
=
{
labelCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
6
},
},
wrapperCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
18
},
},
};
const
formItemLayoutWithOutLabel
=
{
wrapperCol
:
{
xs
:
{
span
:
24
,
offset
:
0
,
},
sm
:
{
span
:
18
,
offset
:
6
,
},
},
};
const
onFormFinish
=
async
()
=>
{
const
onFormFinish
=
async
()
=>
{
try
{
try
{
await
form
.
validateFields
();
await
form
.
validateFields
();
...
@@ -45,12 +21,14 @@ const UpdateTemplateModal = (props) => {
...
@@ -45,12 +21,14 @@ const UpdateTemplateModal = (props) => {
return
(
return
(
<
Modal
<
Modal
className=
'update-template-modal'
className=
'update-template-modal'
width=
'80%'
title=
'新建模版'
title=
'新建模版'
visible=
{
visible
}
visible=
{
visible
}
onCancel=
{
onCancel
}
onCancel=
{
onCancel
}
onOk=
{
onFormFinish
}
onOk=
{
onFormFinish
}
>
>
<
UpdateBasicInfo
form=
{
form
}
/>
<
UpdateBasicInfo
form=
{
form
}
/>
<
UpdateField
/>
</
Modal
>
</
Modal
>
);
);
}
}
...
...
src/view/Manage/Model/Component/ImportAction.jsx
View file @
ab593e04
...
@@ -3,7 +3,7 @@ import { Spin } from 'antd';
...
@@ -3,7 +3,7 @@ import { Spin } from 'antd';
import
LocalStorage
from
'local-storage'
;
import
LocalStorage
from
'local-storage'
;
import
ImportActionHeader
from
'./ImportActionHeader'
;
import
ImportActionHeader
from
'./ImportActionHeader'
;
import
ImportActionTable
from
'./ImportActionTable'
;
import
{
ImportActionTable
}
from
'./ImportActionTable'
;
import
ImportActionIndex
from
'./ImportActionIndex'
;
import
ImportActionIndex
from
'./ImportActionIndex'
;
import
{
getQueryParam
}
from
'../../../../util'
;
import
{
getQueryParam
}
from
'../../../../util'
;
import
{
Action
}
from
'../../../../util/constant'
;
import
{
Action
}
from
'../../../../util/constant'
;
...
...
src/view/Manage/Model/Component/ImportActionTable.jsx
View file @
ab593e04
...
@@ -22,7 +22,7 @@ import './ImportActionTable.less';
...
@@ -22,7 +22,7 @@ import './ImportActionTable.less';
const
{
Option
}
=
Select
;
const
{
Option
}
=
Select
;
const
type
=
'DragableTableBodyRow'
;
const
type
=
`DragableTableBodyRow
${
generateUUID
()}
`
;
const
perSuggestCount
=
5
;
const
perSuggestCount
=
5
;
const
supportMaxAttributeCountPerPage
=
100
;
const
supportMaxAttributeCountPerPage
=
100
;
const
MENU_ID
=
'model-attribute-menu'
;
const
MENU_ID
=
'model-attribute-menu'
;
...
@@ -59,7 +59,7 @@ const ResizeableHeaderCell = props => {
...
@@ -59,7 +59,7 @@ const ResizeableHeaderCell = props => {
);
);
};
};
const
DatatypeInput
=
({
value
=
{},
datatypes
,
onChange
})
=>
{
export
const
DatatypeInput
=
({
value
=
{},
datatypes
,
onChange
})
=>
{
const
onNameChange
=
(
value
)
=>
{
const
onNameChange
=
(
value
)
=>
{
...
@@ -152,7 +152,7 @@ const DatatypeInput = ({ value = {}, datatypes, onChange }) => {
...
@@ -152,7 +152,7 @@ const DatatypeInput = ({ value = {}, datatypes, onChange }) => {
)
)
}
}
const
EditableCell
=
({
export
const
EditableCell
=
({
editing
,
editing
,
dataIndex
,
dataIndex
,
colTitle
,
colTitle
,
...
@@ -222,7 +222,7 @@ const EditableCell = ({
...
@@ -222,7 +222,7 @@ const EditableCell = ({
);
);
};
};
const
DragableBodyRow
=
({
index
,
moveRow
,
className
,
style
,
...
restProps
})
=>
{
export
const
DragableBodyRow
=
({
index
,
moveRow
,
className
,
style
,
...
restProps
})
=>
{
const
ref
=
useRef
();
const
ref
=
useRef
();
const
[{
isOver
,
dropClassName
},
drop
]
=
useDrop
(
const
[{
isOver
,
dropClassName
},
drop
]
=
useDrop
(
...
@@ -275,7 +275,7 @@ const DragableBodyRow = ({ index, moveRow, className, style, ...restProps }) =>
...
@@ -275,7 +275,7 @@ const DragableBodyRow = ({ index, moveRow, className, style, ...restProps }) =>
);
);
};
};
const
ImportActionTable
=
(
props
)
=>
{
export
const
ImportActionTable
=
(
props
)
=>
{
const
{
modelerData
,
onChange
,
editable
,
supportedDatatypes
,
constraint
,
template
,
validateReports
,
type
=
'model'
,
terms
,
action
,
originAction
}
=
props
;
const
{
modelerData
,
onChange
,
editable
,
supportedDatatypes
,
constraint
,
template
,
validateReports
,
type
=
'model'
,
terms
,
action
,
originAction
}
=
props
;
const
[
data
,
setData
]
=
useState
([]);
const
[
data
,
setData
]
=
useState
([]);
...
@@ -1411,5 +1411,3 @@ const ImportActionTable = (props) => {
...
@@ -1411,5 +1411,3 @@ const ImportActionTable = (props) => {
</div>
</div>
);
);
};
};
export default ImportActionTable;
\ No newline at end of file
src/view/Manage/ModelConfig/Component/TemplateAction.jsx
View file @
ab593e04
...
@@ -3,7 +3,7 @@ import { Spin, Tabs, Popover, Divider, Button, Space } from 'antd';
...
@@ -3,7 +3,7 @@ import { Spin, Tabs, Popover, Divider, Button, Space } from 'antd';
import
{
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
import
{
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
import
TemplateActionHeader
from
'./TemplateActionHeader'
;
import
TemplateActionHeader
from
'./TemplateActionHeader'
;
import
ImportActionTable
from
'../../Model/Component/ImportActionTable'
;
import
{
ImportActionTable
}
from
'../../Model/Component/ImportActionTable'
;
import
{
dispatchLatest
,
dispatch
}
from
'../../../../model'
;
import
{
dispatchLatest
,
dispatch
}
from
'../../../../model'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment