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
ebc0a272
Commit
ebc0a272
authored
Mar 22, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
全文检索模型详情
parent
1659edc4
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
82 additions
and
51 deletions
+82
-51
App.js
src/App.js
+1
-0
axios.js
src/util/axios.js
+1
-1
ImportAction.jsx
src/view/Manage/Model/Component/ImportAction.jsx
+12
-4
ImportAction.less
src/view/Manage/Model/Component/ImportAction.less
+41
-0
ImportActionHeader.jsx
src/view/Manage/Model/Component/ImportActionHeader.jsx
+27
-25
ImportActionHeader.less
src/view/Manage/Model/Component/ImportActionHeader.less
+0
-21
No files found.
src/App.js
View file @
ebc0a272
...
@@ -88,6 +88,7 @@ export class App extends React.Component {
...
@@ -88,6 +88,7 @@ export class App extends React.Component {
modelerId
=
{
id
}
modelerId
=
{
id
}
action
=
'detail'
action
=
'detail'
terms
=
{
terms
}
terms
=
{
terms
}
reference
=
'full-search'
/>
/>
<
/AppContext.Provider
>
<
/AppContext.Provider
>
);
);
...
...
src/util/axios.js
View file @
ebc0a272
...
@@ -88,7 +88,7 @@ const callback = resp => {
...
@@ -88,7 +88,7 @@ const callback = resp => {
if
(
resp
.
status
===
401
)
{
if
(
resp
.
status
===
401
)
{
showMessage
(
'warn'
,
'session过期,请重新登录!'
);
showMessage
(
'warn'
,
'session过期,请重新登录!'
);
window
.
location
.
href
=
isSzseEnv
?
"/api/auth/login"
:
"/center-home/view/login"
window
.
location
.
href
=
isSzseEnv
?
`/api/auth/login?redirectURL=
${
encodeURIComponent
(
window
.
location
.
href
)}
`
:
"/center-home/view/login"
return
null
;
return
null
;
}
}
...
...
src/view/Manage/Model/Component/ImportAction.jsx
View file @
ebc0a272
...
@@ -2,6 +2,7 @@ import React, { useState, useEffect, useRef, useImperativeHandle } from 'react';
...
@@ -2,6 +2,7 @@ import React, { useState, useEffect, useRef, useImperativeHandle } from 'react';
import
{
Spin
,
Tabs
,
Anchor
,
Affix
,
Button
}
from
'antd'
;
import
{
Spin
,
Tabs
,
Anchor
,
Affix
,
Button
}
from
'antd'
;
import
LocalStorage
from
'local-storage'
;
import
LocalStorage
from
'local-storage'
;
import
{
Subject
}
from
'rxjs'
;
import
{
Subject
}
from
'rxjs'
;
import
classnames
from
'classnames'
;
import
ImportActionHeader
from
'./ImportActionHeader'
;
import
ImportActionHeader
from
'./ImportActionHeader'
;
import
{
ImportActionTable
}
from
'./ImportActionTable'
;
import
{
ImportActionTable
}
from
'./ImportActionTable'
;
...
@@ -18,7 +19,7 @@ import './ImportAction.less'
...
@@ -18,7 +19,7 @@ import './ImportAction.less'
export
const
importActionSubject
=
new
Subject
()
export
const
importActionSubject
=
new
Subject
()
const
ImportAction
=
React
.
forwardRef
((
props
,
ref
)
=>
{
const
ImportAction
=
React
.
forwardRef
((
props
,
ref
)
=>
{
const
{
action
,
hints
,
onChange
,
form
,
modelerId
,
terms
,
ddl
,
roughModelerData
,
versionId
,
permitCheckOut
,
catalogId
,
branchId
,
approvalModelId
,
approvalId
}
=
props
;
const
{
action
,
hints
,
onChange
,
form
,
modelerId
,
terms
,
ddl
,
roughModelerData
,
versionId
,
permitCheckOut
,
catalogId
,
branchId
,
approvalModelId
,
approvalId
,
reference
=
''
}
=
props
;
const
[
constraints
,
setConstraints
]
=
useState
([]);
const
[
constraints
,
setConstraints
]
=
useState
([]);
const
[
constraint
,
setConstraint
]
=
useState
({});
const
[
constraint
,
setConstraint
]
=
useState
({});
...
@@ -623,8 +624,9 @@ const ImportAction = React.forwardRef((props, ref) => {
...
@@ -623,8 +624,9 @@ const ImportAction = React.forwardRef((props, ref) => {
{
{
(action==='detail' && ((modelerData||{}).optionList||[]).findIndex(item => item.enabled && item.name==='查看') === -1) ? <div style={{ padding: '10px 20px', height: 60 }}>
(action==='detail' && ((modelerData||{}).optionList||[]).findIndex(item => item.enabled && item.name==='查看') === -1) ? <div style={{ padding: '10px 20px', height: 60 }}>
{loading?'':'暂无权限'}
{loading?'':'暂无权限'}
</div> : <div className='import-action'>
</div> : <div className={classnames('import-action', reference==='full-search'?'import-action-fullsearch':'')}>
<Tabs activeKey={activeValue} centered onChange={(val) => {
{
reference !== 'full-search' && <Tabs activeKey={activeValue} centered onChange={(val) => {
setActiveValue(val);
setActiveValue(val);
var targetElement = container?.querySelector(`
.
$
{
val
}
`); // 找到目标元素
var targetElement = container?.querySelector(`
.
$
{
val
}
`); // 找到目标元素
if (targetElement) {
if (targetElement) {
...
@@ -645,7 +647,8 @@ const ImportAction = React.forwardRef((props, ref) => {
...
@@ -645,7 +647,8 @@ const ImportAction = React.forwardRef((props, ref) => {
modelerData?.id && <Tabs.TabPane tab='模型评论' key="model-import-action-comment" />
modelerData?.id && <Tabs.TabPane tab='模型评论' key="model-import-action-comment" />
}
}
</Tabs>
</Tabs>
<div ref={setContainer} style={{ height: action==='edit-inherite-modal'?'60vh':'calc(100vh - 44px - 64px - 66px)', overflow: 'auto' }}>
}
<div ref={setContainer} style={{ height: action==='edit-inherite-modal'?'60vh':(reference!=='full-search'?'calc(100vh - 44px - 64px - 66px)': '100%'), overflow: 'auto' }}>
<ImportActionHeader
<ImportActionHeader
form={form}
form={form}
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'&&action!=='edit-inherited'}
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'&&action!=='edit-inherited'}
...
@@ -659,6 +662,7 @@ const ImportAction = React.forwardRef((props, ref) => {
...
@@ -659,6 +662,7 @@ const ImportAction = React.forwardRef((props, ref) => {
terms={terms}
terms={terms}
supportedPartitionTypes={supportedPartitionTypes}
supportedPartitionTypes={supportedPartitionTypes}
action={action}
action={action}
reference={reference}
/>
/>
<ImportActionTable
<ImportActionTable
modelerData={modelerData||{}}
modelerData={modelerData||{}}
...
@@ -672,6 +676,8 @@ const ImportAction = React.forwardRef((props, ref) => {
...
@@ -672,6 +676,8 @@ const ImportAction = React.forwardRef((props, ref) => {
originAction={getQueryParam(Action, props?.location?.search)}
originAction={getQueryParam(Action, props?.location?.search)}
terms={terms}
terms={terms}
/>
/>
{
reference !== 'full-search' && <React.Fragment>
<ImportActionIndex
<ImportActionIndex
modelerData={modelerData||{}}
modelerData={modelerData||{}}
constraint={constraint}
constraint={constraint}
...
@@ -698,6 +704,8 @@ const ImportAction = React.forwardRef((props, ref) => {
...
@@ -698,6 +704,8 @@ const ImportAction = React.forwardRef((props, ref) => {
action={action}
action={action}
/>
/>
}
}
</React.Fragment>
}
</div>
</div>
</div>
</div>
}
}
...
...
src/view/Manage/Model/Component/ImportAction.less
View file @
ebc0a272
...
@@ -8,4 +8,44 @@
...
@@ -8,4 +8,44 @@
width: 80%;
width: 80%;
justify-content: space-between;
justify-content: space-between;
}
}
.model-import-action-basic,
.model-import-action-technical,
.model-import-action-table,
.model-import-action-index,
.model-import-action-manage,
.model-import-action-relation,
.model-import-action-comment {
background-color: #FFF;
padding: 20px;
}
.model-import-action-technical,
.model-import-action-table,
.model-import-action-index,
.model-import-action-manage,
.model-import-action-relation,
.model-import-action-comment {
margin-top: 7px;
}
}
.import-action-fullsearch {
.model-import-action-basic,
.model-import-action-technical,
.model-import-action-table,
.model-import-action-index,
.model-import-action-manage,
.model-import-action-relation,
.model-import-action-comment {
padding: 0 20px;
}
.model-import-action-technical,
.model-import-action-table,
.model-import-action-index,
.model-import-action-manage,
.model-import-action-relation,
.model-import-action-comment {
margin-top: 0px;
}
}
}
\ No newline at end of file
src/view/Manage/Model/Component/ImportActionHeader.jsx
View file @
ebc0a272
...
@@ -50,7 +50,7 @@ const dataTypeRemark = '描述ETL框架中目标表的数据类型';
...
@@ -50,7 +50,7 @@ const dataTypeRemark = '描述ETL框架中目标表的数据类型';
const
bindingLoadRemark
=
'描述ETL框架绑定加载列表,如chain、daily、current等'
;
const
bindingLoadRemark
=
'描述ETL框架绑定加载列表,如chain、daily、current等'
;
const
ImportActionHeader
=
(
props
)
=>
{
const
ImportActionHeader
=
(
props
)
=>
{
const
{
editable
,
form
,
modelerData
,
constraints
,
templates
,
onConstraintChange
,
onTemplateChange
,
validateReports
,
onChange
,
terms
,
supportedPartitionTypes
,
action
}
=
props
;
const
{
editable
,
form
,
modelerData
,
constraints
,
templates
,
onConstraintChange
,
onTemplateChange
,
validateReports
,
onChange
,
terms
,
supportedPartitionTypes
,
action
,
reference
}
=
props
;
const
[
options
,
setOptions
]
=
useState
([]);
const
[
options
,
setOptions
]
=
useState
([]);
...
@@ -311,13 +311,28 @@ const ImportActionHeader = (props) => {
...
@@ -311,13 +311,28 @@ const ImportActionHeader = (props) => {
</
Col
>
</
Col
>
<
Col
xs=
{
24
}
sm=
{
24
}
lg=
{
12
}
xl=
{
8
}
>
<
Col
xs=
{
24
}
sm=
{
24
}
lg=
{
12
}
xl=
{
8
}
>
<
Form
.
Item
<
Form
.
Item
label=
{
<
ItemTitle
name=
'remark'
cnName=
'数据内容'
validateReports=
{
validateReports
}
/>
}
label=
"规范"
name=
"
remark
"
name=
"
easyDataModelerModelingConstraint
"
rules=
{
[{
required
:
true
,
message
:
'请
输入数据内容
!'
}]
}
rules=
{
[{
required
:
true
,
message
:
'请
选择规范
!'
}]
}
style=
{
{
marginBottom
}
}
style=
{
{
marginBottom
}
}
>
>
{
{
editable
?
<
TextArea
rows=
{
1
}
placeholder=
'描述数据表包含的业务数据,包括数据内容业务描述、表的适用范围、数据粒度、数据统计口径、数据来源等。对于原始数据表,可以说明加载的源接口信息。'
/>
:
<
span
className=
'word-wrap'
>
{
highlightSearchContentByTerms
(
modelerData
?.
remark
,
terms
)
}
</
span
>
editable
?
<
ConstraintSelect
constraints=
{
constraints
}
onChange=
{
onConstraintChange
}
onDetail=
{
()
=>
{
setRuleParams
({
visible
:
true
})
}
}
/>
:
<
div
className=
'flex'
style=
{
{
alignItems
:
'flex-start'
}
}
>
<
div
className=
'word-wrap mr-2'
>
{
modelerData
?.
easyDataModelerModelingConstraint
?.
cnName
}
</
div
>
<
div
style=
{
{
flex
:
1
,
minWidth
:
30
}
}
>
<
a
onClick=
{
()
=>
{
setRuleParams
({
visible
:
true
})
}
}
>
查看
</
a
>
</
div
>
</
div
>
}
}
</
Form
.
Item
>
</
Form
.
Item
>
</
Col
>
</
Col
>
...
@@ -345,28 +360,13 @@ const ImportActionHeader = (props) => {
...
@@ -345,28 +360,13 @@ const ImportActionHeader = (props) => {
</
Col
>
</
Col
>
<
Col
xs=
{
24
}
sm=
{
24
}
lg=
{
12
}
xl=
{
8
}
>
<
Col
xs=
{
24
}
sm=
{
24
}
lg=
{
12
}
xl=
{
8
}
>
<
Form
.
Item
<
Form
.
Item
label=
"规范"
label=
{
<
ItemTitle
name=
'remark'
cnName=
'数据内容'
validateReports=
{
validateReports
}
/>
}
name=
"
easyDataModelerModelingConstraint
"
name=
"
remark
"
rules=
{
[{
required
:
true
,
message
:
'请
选择规范
!'
}]
}
rules=
{
[{
required
:
true
,
message
:
'请
输入数据内容
!'
}]
}
style=
{
{
marginBottom
}
}
style=
{
{
marginBottom
}
}
>
>
{
{
editable
?
<
ConstraintSelect
editable
?
<
TextArea
rows=
{
1
}
placeholder=
'描述数据表包含的业务数据,包括数据内容业务描述、表的适用范围、数据粒度、数据统计口径、数据来源等。对于原始数据表,可以说明加载的源接口信息。'
/>
:
<
span
className=
'word-wrap'
>
{
highlightSearchContentByTerms
(
modelerData
?.
remark
,
terms
)
}
</
span
>
constraints=
{
constraints
}
onChange=
{
onConstraintChange
}
onDetail=
{
()
=>
{
setRuleParams
({
visible
:
true
})
}
}
/>
:
<
div
className=
'flex'
style=
{
{
alignItems
:
'flex-start'
}
}
>
<
div
className=
'word-wrap mr-2'
>
{
modelerData
?.
easyDataModelerModelingConstraint
?.
cnName
}
</
div
>
<
div
style=
{
{
flex
:
1
,
minWidth
:
30
}
}
>
<
a
onClick=
{
()
=>
{
setRuleParams
({
visible
:
true
})
}
}
>
查看
</
a
>
</
div
>
</
div
>
}
}
</
Form
.
Item
>
</
Form
.
Item
>
</
Col
>
</
Col
>
...
@@ -405,7 +405,8 @@ const ImportActionHeader = (props) => {
...
@@ -405,7 +405,8 @@ const ImportActionHeader = (props) => {
</
Row
>
</
Row
>
</
Form
>
</
Form
>
</
div
>
</
div
>
<
div
className=
'model-import-action-technical'
>
{
reference
!==
'full-search'
&&
<
div
className=
'model-import-action-technical'
>
<
Space
>
<
Space
>
<
h3
style=
{
{
width
:
120
,
marginBottom
:
0
}
}
>
技术信息
</
h3
>
<
h3
style=
{
{
width
:
120
,
marginBottom
:
0
}
}
>
技术信息
</
h3
>
{
{
...
@@ -519,6 +520,7 @@ const ImportActionHeader = (props) => {
...
@@ -519,6 +520,7 @@ const ImportActionHeader = (props) => {
</
Form
>
</
Form
>
}
}
</
div
>
</
div
>
}
<
Rule
<
Rule
{
...
ruleParams
}
{
...
ruleParams
}
onCancel=
{
()
=>
{
onCancel=
{
()
=>
{
...
...
src/view/Manage/Model/Component/ImportActionHeader.less
View file @
ebc0a272
...
@@ -8,26 +8,6 @@
...
@@ -8,26 +8,6 @@
}
}
}
}
.model-import-action-basic,
.model-import-action-technical,
.model-import-action-table,
.model-import-action-index,
.model-import-action-manage,
.model-import-action-relation,
.model-import-action-comment {
background-color: #FFF;
padding: 20px;
}
.model-import-action-technical,
.model-import-action-table,
.model-import-action-index,
.model-import-action-manage,
.model-import-action-relation,
.model-import-action-comment {
margin-top: 7px;
}
.edit-template .model-import-action-table {
.edit-template .model-import-action-table {
padding: 0;
padding: 0;
}
}
\ No newline at end of file
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