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
bd7d823c
Commit
bd7d823c
authored
Dec 01, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推荐
parent
82c5dcfe
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
13 deletions
+38
-13
ImportActionTable.jsx
src/view/Manage/Model/Component/ImportActionTable.jsx
+2
-1
suggest.jsx
src/view/Manage/Model/Component/suggest.jsx
+36
-12
No files found.
src/view/Manage/Model/Component/ImportActionTable.jsx
View file @
bd7d823c
...
@@ -1059,7 +1059,8 @@ export const ImportActionTable = (props) => {
...
@@ -1059,7 +1059,8 @@ export const ImportActionTable = (props) => {
支持拖拽方式调整模型字段顺序<br />
支持拖拽方式调整模型字段顺序<br />
点击表格外部任意位置退出字段编辑状态<br />
点击表格外部任意位置退出字段编辑状态<br />
删除: 点击操作列垃圾桶图标删除该字段<br />
删除: 点击操作列垃圾桶图标删除该字段<br />
保存: 页面右下角保存按钮
保存: 页面右下角保存按钮<br />
中/英文输入框回车键触发推荐浮窗
</span>}>
</span>}>
<QuestionCircleOutlined className='pointer' />
<QuestionCircleOutlined className='pointer' />
</Popover>
</Popover>
...
...
src/view/Manage/Model/Component/suggest.jsx
View file @
bd7d823c
...
@@ -14,14 +14,21 @@ const FC = (props) => {
...
@@ -14,14 +14,21 @@ const FC = (props) => {
const
[
selectedRows
,
setSelectedRows
]
=
React
.
useState
()
const
[
selectedRows
,
setSelectedRows
]
=
React
.
useState
()
const
[
havaMore
,
setMore
]
=
React
.
useState
(
false
)
const
[
havaMore
,
setMore
]
=
React
.
useState
(
false
)
const
[
offset
,
setOffset
]
=
React
.
useState
(
1
)
const
[
offset
,
setOffset
]
=
React
.
useState
(
1
)
const
[
animating
,
setAnimating
]
=
React
.
useState
(
false
)
React
.
useEffect
(()
=>
{
React
.
useEffect
(()
=>
{
if
(
visible
)
{
setAnimating
(
true
)
setTimeout
(()
=>
{
setAnimating
(
false
)
getSuggests
()
getSuggests
()
},
300
)
}
},
[
visible
])
},
[
visible
])
const
onSourceClick
=
(
id
,
name
)
=>
{
const
onSourceClick
=
(
id
,
name
)
=>
{
const
timestamp
=
new
Date
().
getTime
();
const
timestamp
=
new
Date
().
getTime
();
const
tempArray
=
id
.
split
(
'='
);
const
tempArray
=
(
id
??
''
)
.
split
(
'='
);
if
(
tempArray
.
length
>=
3
)
{
if
(
tempArray
.
length
>=
3
)
{
dispatch
({
dispatch
({
...
@@ -30,7 +37,7 @@ const FC = (props) => {
...
@@ -30,7 +37,7 @@ const FC = (props) => {
id
id
},
},
callback
:
data
=>
{
callback
:
data
=>
{
window
.
open
(
`/center-home/metadetail?mid=
${
encodeURIComponent
(
data
.
_id
)}
&action=metadetail&type=detail&manager=false&activekey=1&name=
${
encodeURIComponent
(
name
||
''
)}
`
);
window
.
open
(
`/center-home/metadetail?mid=
${
encodeURIComponent
(
data
?
.
_id
)}
&
action
=
metadetail
&
type
=
detail
&
manager
=
false
&
activekey
=
1
&
name
=
$
{
encodeURIComponent
(
name
||
''
)}
`);
}
}
})
})
} else {
} else {
...
@@ -45,8 +52,7 @@ const FC = (props) => {
...
@@ -45,8 +52,7 @@ const FC = (props) => {
{
{
title: '中文名称',
title: '中文名称',
dataIndex: 'cnName',
dataIndex: 'cnName',
width
:
isSzseEnv
?
360
:
160
,
width: 200,
ellipsis
:
true
,
render: (text, _, __) => {
render: (text, _, __) => {
return (
return (
<Tooltip title={text||''}>
<Tooltip title={text||''}>
...
@@ -58,8 +64,6 @@ const FC = (props) => {
...
@@ -58,8 +64,6 @@ const FC = (props) => {
{
{
title: '英文名称',
title: '英文名称',
dataIndex: 'name',
dataIndex: 'name',
width
:
isSzseEnv
?
360
:
160
,
ellipsis
:
true
,
render: (text, _, __) => {
render: (text, _, __) => {
return (
return (
<Tooltip title={text||''}>
<Tooltip title={text||''}>
...
@@ -69,10 +73,29 @@ const FC = (props) => {
...
@@ -69,10 +73,29 @@ const FC = (props) => {
}
}
},
},
{
{
title: '类型',
dataIndex: 'datatype',
width: 160,
render: (_, record, __) => {
if (record?.datatype) {
if ((record?.datatype?.name==='Char'||record?.datatype?.name==='Varchar') && record?.datatype?.parameterValues?.length>0) {
return `
$
{
record
?.
datatype
?.
name
||
''
}(
$
{(
record
?.
datatype
?.
parameterValues
[
0
]?
record
.
datatype
.
parameterValues
[
0
]:
0
)})
`;
} else if ((record?.datatype?.name==='Decimal'||record?.datatype?.name==='Numeric') && record?.datatype?.parameterValues?.length>1) {
return `
$
{
record
?.
datatype
?.
name
||
''
}(
$
{(
record
?.
datatype
?.
parameterValues
[
0
]?
record
.
datatype
.
parameterValues
[
0
]:
0
)},
$
{(
record
?.
datatype
?.
parameterValues
[
1
]?
record
.
datatype
.
parameterValues
[
1
]:
0
)})
`;
}
return record.datatype.name||'';
}
return '';
}
},
{
title: '业务含义',
title: '业务含义',
dataIndex: 'remark',
dataIndex: 'remark',
width
:
isSzseEnv
?
360
:
160
,
ellipsis
:
true
,
render: (text, _, __) => {
render: (text, _, __) => {
return (
return (
<Tooltip title={text||''}>
<Tooltip title={text||''}>
...
@@ -98,7 +121,6 @@ const FC = (props) => {
...
@@ -98,7 +121,6 @@ const FC = (props) => {
title: '使用次数',
title: '使用次数',
dataIndex: 'referencesCount',
dataIndex: 'referencesCount',
width: 80,
width: 80,
ellipsis
:
true
,
render: (_, record) => {
render: (_, record) => {
return (
return (
<span>{record.recommendedStats?.referencesCount}</span>
<span>{record.recommendedStats?.referencesCount}</span>
...
@@ -108,7 +130,6 @@ const FC = (props) => {
...
@@ -108,7 +130,6 @@ const FC = (props) => {
{
{
title: '来源',
title: '来源',
dataIndex: 'source',
dataIndex: 'source',
ellipsis
:
true
,
render: (_, record) => {
render: (_, record) => {
return (
return (
<SourceComponent data={record.recommendedStats?.sourceInfos||[]} name={record.name||''} onClick={onSourceClick} />
<SourceComponent data={record.recommendedStats?.sourceInfos||[]} name={record.name||''} onClick={onSourceClick} />
...
@@ -159,6 +180,7 @@ const FC = (props) => {
...
@@ -159,6 +180,7 @@ const FC = (props) => {
const close = () => {
const close = () => {
setLoading(false)
setLoading(false)
setAnimating(false)
setSuggests()
setSuggests()
setOffset(1)
setOffset(1)
setMore(false)
setMore(false)
...
@@ -196,9 +218,10 @@ const FC = (props) => {
...
@@ -196,9 +218,10 @@ const FC = (props) => {
centered destroyOnClose
centered destroyOnClose
onCancel={() => { close() }}
onCancel={() => { close() }}
>
>
<
Spin
spinning=
{
loading
}
>
{
!animating && <Spin spinning={loading}>
<Table
<Table
extraColWidth=
'32px'
extraColWidth={32}
size='small'
size='small'
rowKey='iid'
rowKey='iid'
dataSource={suggests||[]}
dataSource={suggests||[]}
...
@@ -224,6 +247,7 @@ const FC = (props) => {
...
@@ -224,6 +247,7 @@ const FC = (props) => {
</Tooltip>
</Tooltip>
</div>
</div>
</Spin>
</Spin>
}
</Modal>
</Modal>
)
)
}
}
...
...
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