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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
99 additions
and
70 deletions
+99
-70
App.js
src/App.js
+1
-0
axios.js
src/util/axios.js
+1
-1
ImportAction.jsx
src/view/Manage/Model/Component/ImportAction.jsx
+56
-48
ImportAction.less
src/view/Manage/Model/Component/ImportAction.less
+41
-0
ImportActionHeader.jsx
src/view/Manage/Model/Component/ImportActionHeader.jsx
+0
-0
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,29 +624,31 @@ const ImportAction = React.forwardRef((props, ref) => {
...
@@ -623,29 +624,31 @@ 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) => {
{
setActiveValue(val);
reference !== 'full-search' && <Tabs activeKey={activeValue} centered onChange={(val) => {
var targetElement = container?.querySelector(`
.
$
{
val
}
`); // 找到目标元素
setActiveValue(val);
if (targetElement) {
var targetElement = container?.querySelector(`
.
$
{
val
}
`); // 找到目标元素
importActionSubject.next({ type: 'expand', key: val, action })
if (targetElement) {
setTimeout(() => {
importActionSubject.next({ type: 'expand', key: val, action })
animating.current = true;
setTimeout(() => {
targetElement.scrollIntoView();
animating.current = true;
}, 100)
targetElement.scrollIntoView();
}
}, 100)
}}>
}
<Tabs.TabPane tab='基本信息' key="model-import-action-basic" />
}}>
<Tabs.TabPane tab='技术信息' key="model-import-action-technical" />
<Tabs.TabPane tab='基本信息' key="model-import-action-basic" />
<Tabs.TabPane tab='数据表结构' key="model-import-action-table" />
<Tabs.TabPane tab='技术信息' key="model-import-action-technical" />
<Tabs.TabPane tab='数据表索引' key="model-import-action-index" />
<Tabs.TabPane tab='数据表结构' key="model-import-action-table" />
<Tabs.TabPane tab='管理信息' key="model-import-action-manage" />
<Tabs.TabPane tab='数据表索引' key="model-import-action-index" />
<Tabs.TabPane tab='关联对象' key="model-import-action-relation" />
<Tabs.TabPane tab='管理信息' key="model-import-action-manage" />
{
<Tabs.TabPane tab='关联对象' key="model-import-action-relation" />
modelerData?.id && <Tabs.TabPane tab='模型评论' key="model-import-action-comment" />
{
}
modelerData?.id && <Tabs.TabPane tab='模型评论' key="model-import-action-comment" />
</Tabs>
}
<div ref={setContainer} style={{ height: action==='edit-inherite-modal'?'60vh':'calc(100vh - 44px - 64px - 66px)', overflow: 'auto' }}>
</Tabs>
}
<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,31 +676,35 @@ const ImportAction = React.forwardRef((props, ref) => {
...
@@ -672,31 +676,35 @@ const ImportAction = React.forwardRef((props, ref) => {
originAction={getQueryParam(Action, props?.location?.search)}
originAction={getQueryParam(Action, props?.location?.search)}
terms={terms}
terms={terms}
/>
/>
<ImportActionIndex
modelerData={modelerData||{}}
constraint={constraint}
template={template}
types={supportedIndextypes}
validateReports={validateReports}
onChange={onIndexChange}
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'&&action!=='edit-inherited'}
terms={terms}
action={action}
/>
<ImportActionManage
form={form}
modelerData={modelerData||{}}
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'&&action!=='edit-inherited'}
action={action}
/>
<ImportActionRelation
modelerData={modelerData} action={action}
/>
{
{
modelerData?.id && <ImportActionComment
reference !== 'full-search' && <React.Fragment>
modelerData={modelerData}
<ImportActionIndex
action={action}
modelerData={modelerData||{}}
/>
constraint={constraint}
template={template}
types={supportedIndextypes}
validateReports={validateReports}
onChange={onIndexChange}
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'&&action!=='edit-inherited'}
terms={terms}
action={action}
/>
<ImportActionManage
form={form}
modelerData={modelerData||{}}
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'&&action!=='edit-inherited'}
action={action}
/>
<ImportActionRelation
modelerData={modelerData} action={action}
/>
{
modelerData?.id && <ImportActionComment
modelerData={modelerData}
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
This diff is collapsed.
Click to expand it.
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