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
31d250cc
Commit
31d250cc
authored
Apr 07, 2021
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加资产要素静态页面
parent
1cc621c1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
147 additions
and
7 deletions
+147
-7
routes.js
src/routes.js
+4
-0
FactorTable.jsx
src/view/Manage/Factor/Component/FactorTable.jsx
+67
-0
FactorTable.less
src/view/Manage/Factor/Component/FactorTable.less
+7
-0
index.jsx
src/view/Manage/Factor/index.jsx
+61
-0
ImportActionTable.jsx
src/view/Manage/Model/Component/ImportActionTable.jsx
+2
-2
ModelTable.jsx
src/view/Manage/Model/Component/ModelTable.jsx
+1
-1
index.jsx
src/view/Manage/Model/index.jsx
+3
-3
index.jsx
src/view/Manage/index.jsx
+2
-1
No files found.
src/routes.js
View file @
31d250cc
...
...
@@ -18,6 +18,10 @@ export const routes = [
{
name
:
'model'
,
text
:
'数据模型'
,
},
{
name
:
'factor'
,
text
:
'资产要素'
,
}
]
}
...
...
src/view/Manage/Factor/Component/FactorTable.jsx
0 → 100644
View file @
31d250cc
import
React
,
{
useState
}
from
"react"
;
import
{
Table
}
from
'antd'
;
import
'./FactorTable.less'
;
const
FactorTable
=
(
props
)
=>
{
const
{
data
,
loading
,
onSelect
}
=
props
;
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
([]);
const
columns
=
[
{
title
:
'序号'
,
dataIndex
:
'key'
,
editable
:
false
,
render
:
(
text
,
record
,
index
)
=>
{
return
(
index
+
1
).
toString
();
}
},
{
title
:
'操作时间'
,
dataIndex
:
'time'
,
},
{
title
:
'操作人'
,
dataIndex
:
'user'
,
},
{
title
:
'操作类型'
,
dataIndex
:
'type'
,
},
{
title
:
'状态'
,
dataIndex
:
'status'
,
},
{
title
:
'变更内容'
,
dataIndex
:
'content'
},
];
const
onSelectChange
=
keys
=>
{
setSelectedRowKeys
(
keys
);
onSelect
&&
onSelect
(
keys
);
};
const
rowSelection
=
{
selectedRowKeys
,
onChange
:
onSelectChange
,
};
return
(
<
div
className=
'factor-table'
>
<
Table
loading=
{
loading
}
rowSelection=
{
rowSelection
}
columns=
{
columns
}
rowKey=
{
'id'
}
dataSource=
{
data
}
pagination=
{
false
}
/>
</
div
>
);
}
export
default
FactorTable
;
\ No newline at end of file
src/view/Manage/Factor/Component/FactorTable.less
0 → 100644
View file @
31d250cc
.factor-table {
.yy-table {
height: calc(100vh - 64px - 20px - 53px - 20px) !important;
overflow: auto !important;
}
}
\ No newline at end of file
src/view/Manage/Factor/index.jsx
0 → 100644
View file @
31d250cc
import
React
,
{
useState
}
from
'react'
;
import
{
Button
}
from
'antd'
;
import
FactorTable
from
'./Component/FactorTable'
;
const
testData
=
[
{
id
:
'1'
,
time
:
'2020-03-09 12:28:09'
,
user
:
'xxx'
,
type
:
'导入'
,
status
:
'成功'
,
content
:
'本次新增了ID、中文名称、英文名称、描述、资产形态等5个要素'
},
{
id
:
'2'
,
time
:
'2020-03-09 12:28:09'
,
user
:
'xxx'
,
type
:
'导入'
,
status
:
'成功'
,
content
:
'本次新增了ID、中文名称、英文名称、描述、资产形态等5个要素'
},
];
const
Factor
=
(
props
)
=>
{
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
tableData
,
setTableData
]
=
useState
(
testData
);
const
[
selectFactorIds
,
setSelectFactorIds
]
=
useState
([]);
const
onImportBtnClick
=
()
=>
{
}
const
onExportBtnClick
=
()
=>
{
}
const
onTableSelect
=
(
ids
)
=>
{
setSelectFactorIds
(
ids
||
[]);
}
return
(
<
div
style=
{
{
backgroundColor
:
'#fff'
}
}
>
<
div
className=
'p-3'
style=
{
{
display
:
'flex'
,
borderBottom
:
"1px solid #EFEFEF"
,
}
}
>
<
Button
type=
"primary"
className=
'ml-3'
style=
{
{
marginLeft
:
'auto'
}
}
onClick=
{
onImportBtnClick
}
>
导入
</
Button
>
<
Button
type=
"primary"
className=
'ml-3'
onClick=
{
onExportBtnClick
}
>
导出
</
Button
>
</
div
>
<
div
className=
'p-3'
>
<
FactorTable
loading=
{
loading
}
data=
{
tableData
}
onSelect=
{
onTableSelect
}
/>
</
div
>
</
div
>
);
}
export
default
Factor
;
src/view/Manage/Model/Component/ImportActionTable.jsx
View file @
31d250cc
import
React
,
{
useState
,
useCallback
,
useRef
,
useEffect
}
from
'react'
;
import
{
Table
,
Input
,
InputNumber
,
Form
,
Typography
,
Radio
,
Divider
,
Button
,
Popconfirm
,
Select
,
Row
,
Col
,
Descriptions
}
from
'antd'
;
import
{
Table
,
Input
,
InputNumber
,
Form
,
Typography
,
Radio
,
Divider
,
Button
,
Popconfirm
,
Select
,
Row
,
Col
}
from
'antd'
;
import
{
DndProvider
,
useDrag
,
useDrop
}
from
'react-dnd'
;
import
{
HTML5Backend
}
from
'react-dnd-html5-backend'
;
import
update
from
'immutability-helper'
;
import
{
generateUUID
}
from
'../../../../util'
;
import
{
dispatchLatest
}
from
'../../../../model'
;
import
{
template
}
from
'@babel/core'
;
const
{
Option
}
=
Select
;
...
...
@@ -90,6 +89,7 @@ const DatatypeInput = ({ value = {}, datatypes, onChange }) => {
onChange=
{
(
value
)
=>
{
onParameterValuesChange
(
value
,
index
);
}
}
min=
{
0
}
value=
{
parameterValues
[
index
]
}
style=
{
{
width
:
60
}
}
/>
...
...
src/view/Manage/Model/Component/ModelTable.jsx
View file @
31d250cc
import
React
,
{
useState
,
useEffect
}
from
"react"
;
import
{
Table
,
Space
,
Button
,
Tooltip
,
Modal
}
from
'antd'
;
import
{
EditOutlined
,
CheckOutlined
,
ReconciliationOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
;
import
{
EditOutlined
,
ReconciliationOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
;
import
{
dispatchLatest
}
from
'../../../../model'
;
import
{
showMessage
}
from
'../../../../util'
;
...
...
src/view/Manage/Model/index.jsx
View file @
31d250cc
...
...
@@ -93,9 +93,9 @@ class Model extends React.Component {
const
{
importModalVisible
,
exportModalVisible
,
catalogId
,
importModalAction
,
tableData
,
loadingTableData
,
modelerId
,
selectModelerIds
}
=
this
.
state
;
return
(
<
div
style=
{
{
backgroundColor
:
'#ECEEF3'
,
height
:
'100%'
}
}
>
<
Row
style=
{
{
height
:
'100%'
}
}
>
<
Col
span=
{
6
}
style=
{
{
height
:
'100%'
}
}
>
<
div
style=
{
{
backgroundColor
:
'#ECEEF3'
}
}
>
<
Row
>
<
Col
span=
{
6
}
>
<
div
className=
'mr-3'
style=
{
{
backgroundColor
:
'#fff'
}
}
>
<
ModelTree
onSelect=
{
this
.
onTreeSelect
}
/>
</
div
>
...
...
src/view/Manage/index.jsx
View file @
31d250cc
...
...
@@ -7,6 +7,7 @@ import { ManageLayout } from "../../layout";
import
Map
from
'./Map'
;
import
Model
from
'./Model'
;
import
Factor
from
'./Factor'
;
class
Manage
extends
Component
{
constructor
(
props
)
{
...
...
@@ -29,7 +30,7 @@ class Manage extends Component {
<
Switch
>
<
Route
path=
{
`${match.path}/map`
}
component=
{
Map
}
/>
<
Route
path=
{
`${match.path}/model`
}
component=
{
Model
}
/>
<
Route
path=
{
`${match.path}/factor`
}
component=
{
Factor
}
/>
</
Switch
>
)
:
(
<
GetSession
{
...
this
.
props
}
/>
...
...
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