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
0b9c211d
Commit
0b9c211d
authored
Jul 19, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
关联标准
parent
f621bfb8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
1 deletion
+52
-1
datamodel.js
src/model/datamodel.js
+4
-0
datamodeler.js
src/service/datamodeler.js
+4
-0
ImportActionTable.jsx
src/view/Manage/Model/Component/ImportActionTable.jsx
+44
-1
No files found.
src/model/datamodel.js
View file @
0b9c211d
...
@@ -222,6 +222,10 @@ export function* compareOtherModel(payload) {
...
@@ -222,6 +222,10 @@ export function* compareOtherModel(payload) {
return
yield
call
(
datamodelerService
.
compareOtherModel
,
payload
);
return
yield
call
(
datamodelerService
.
compareOtherModel
,
payload
);
}
}
export
function
*
getDataModelStandardMapping
(
payload
)
{
return
yield
call
(
datamodelerService
.
getDataModelStandardMapping
,
payload
)
}
export
function
*
getDataModelLocation
(
payload
)
{
export
function
*
getDataModelLocation
(
payload
)
{
return
yield
call
(
datamodelerService
.
getDataModelLocation
,
payload
);
return
yield
call
(
datamodelerService
.
getDataModelLocation
,
payload
);
}
}
...
...
src/service/datamodeler.js
View file @
0b9c211d
...
@@ -213,6 +213,10 @@ export function compareOtherModel(payload) {
...
@@ -213,6 +213,10 @@ export function compareOtherModel(payload) {
return
PostJSON
(
"/datamodeler/easyDataModelerCURD/compareOtherModel"
,
payload
);
return
PostJSON
(
"/datamodeler/easyDataModelerCURD/compareOtherModel"
,
payload
);
}
}
export
function
getDataModelStandardMapping
(
payload
)
{
return
GetJSON
(
"/datamodeler/easyDataModelerCURD/getDataModelStandardMapping"
,
payload
);
}
export
function
ddlGenerators
()
{
export
function
ddlGenerators
()
{
return
GetJSON
(
"/datamodeler/easyDataModelerExport/ddlGenerators"
);
return
GetJSON
(
"/datamodeler/easyDataModelerExport/ddlGenerators"
);
}
}
...
...
src/view/Manage/Model/Component/ImportActionTable.jsx
View file @
0b9c211d
import
React
,
{
useState
,
useCallback
,
useRef
,
useEffect
,
useContext
,
useMemo
}
from
'react'
;
import
React
,
{
useState
,
useCallback
,
useRef
,
useEffect
,
useContext
,
useMemo
}
from
'react'
;
import
{
Input
,
Form
,
Typography
,
Button
,
Select
,
Row
,
Col
,
Popover
,
Checkbox
,
Tooltip
,
Pagination
,
Space
}
from
'antd'
;
import
{
Input
,
Form
,
Typography
,
Button
,
Select
,
Row
,
Col
,
Popover
,
Checkbox
,
Tooltip
,
Pagination
,
Space
,
Tag
}
from
'antd'
;
import
{
CheckOutlined
,
PlusOutlined
,
QuestionCircleOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
;
import
{
CheckOutlined
,
PlusOutlined
,
QuestionCircleOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
;
import
{
DndProvider
,
useDrag
,
useDrop
}
from
'react-dnd'
;
import
{
DndProvider
,
useDrag
,
useDrop
}
from
'react-dnd'
;
import
{
HTML5Backend
}
from
'react-dnd-html5-backend'
;
import
{
HTML5Backend
}
from
'react-dnd-html5-backend'
;
...
@@ -245,6 +245,7 @@ export const ImportActionTable = (props) => {
...
@@ -245,6 +245,7 @@ export const ImportActionTable = (props) => {
cnName
:
undefined
,
cnName
:
undefined
,
triggerType
:
undefined
,
triggerType
:
undefined
,
})
})
const
[
standardMap
,
setStandardMap
]
=
useState
()
const
{
attrIsEditingFunction
}
=
useContext
(
EditModelContext
);
const
{
attrIsEditingFunction
}
=
useContext
(
EditModelContext
);
...
@@ -451,6 +452,30 @@ export const ImportActionTable = (props) => {
...
@@ -451,6 +452,30 @@ export const ImportActionTable = (props) => {
</React.Fragment>
</React.Fragment>
)
)
}
}
},
{
title: '标准',
dataIndex: 'standard',
editable: false,
ellipsis: true,
width: 80,
render: (text, record, __) => {
const standands = standardMap?.[record.name]
const timestamp = new Date().getTime();
return (
<React.Fragment>
{ (standands??[]).length > 0 && <Tooltip
overlayClassName='tooltip-common'
placement='topRight'
title={<div onClick={(e) => e.stopPropagation()}>
{ standands?.map(item => <div key={item.standardId}><a onClick={() => { window.open(`
/
center
-
home
/
menu
/
datastandard
?
id
=
$
{
item
?.
standardId
}
&
timestamp
=
$
{
timestamp
}
`); }}>{item.standardCnName}</a></div>) }
</div>}
>
<Tag size='small'>标</Tag>
</Tooltip> }
</React.Fragment>
)
}
}
}
];
];
...
@@ -531,6 +556,12 @@ export const ImportActionTable = (props) => {
...
@@ -531,6 +556,12 @@ export const ImportActionTable = (props) => {
//eslint-disable-next-line react-hooks/exhaustive-deps
//eslint-disable-next-line react-hooks/exhaustive-deps
}, [validateReports, editable, editingKey])
}, [validateReports, editable, editingKey])
useEffect(() => {
if (modelerData?.id&&!editable) {
getStandartMap()
}
}, [modelerData?.id, editable])
const menuData = useMemo(() => {
const menuData = useMemo(() => {
let newMenuData = []
let newMenuData = []
if (originAction === 'flow') {
if (originAction === 'flow') {
...
@@ -568,6 +599,18 @@ export const ImportActionTable = (props) => {
...
@@ -568,6 +599,18 @@ export const ImportActionTable = (props) => {
const isEditing = (record) => record?.iid === editingKey;
const isEditing = (record) => record?.iid === editingKey;
const getStandartMap = () => {
dispatch({
type: 'datamodel.getDataModelStandardMapping',
payload: {
easyDataModelerDataModelId: modelerData?.id
},
callback: (data) => {
setStandardMap(data)
},
})
}
const onAddClick = (event) => {
const onAddClick = (event) => {
event.stopPropagation();
event.stopPropagation();
...
...
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