Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
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
ReactWeb5
CivManage
Commits
3165d8ce
Commit
3165d8ce
authored
Jan 04, 2023
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 重构建表交互
parent
60258174
Pipeline
#66204
passed with stages
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
152 additions
and
4 deletions
+152
-4
ChooseTableType.jsx
...smanager/base/tablemanager/components/ChooseTableType.jsx
+66
-0
ChooseTableType.less
...manager/base/tablemanager/components/ChooseTableType.less
+61
-0
TableView.jsx
...ages/bsmanager/base/tablemanager/components/TableView.jsx
+1
-1
index.jsx
src/pages/bsmanager/base/tablemanager/index.jsx
+23
-2
WorkflowHomePage.less
...es/bsmanager/workOrder/workflowEdit/WorkflowHomePage.less
+1
-1
No files found.
src/pages/bsmanager/base/tablemanager/components/ChooseTableType.jsx
0 → 100644
View file @
3165d8ce
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Modal
}
from
'antd'
;
import
styles
from
'./ChooseTableType.less'
;
const
ChooseTableType
=
props
=>
{
const
{
defalutFields
,
visible
,
onCancel
,
onTableClick
}
=
props
;
const
[
tableList
,
setTableList
]
=
useState
([]);
useEffect
(()
=>
{
if
(
visible
)
{
let
list
=
new
Map
([]);
defalutFields
.
forEach
(
item
=>
{
let
groupChildren
=
list
.
get
(
item
.
groupName
)
||
[];
list
.
set
(
item
.
groupName
,
[...
groupChildren
,
item
]);
});
setTableList
(
Object
.
fromEntries
(
list
.
entries
()));
}
},
[
visible
]);
const
onFinish
=
()
=>
{};
const
createTable
=
val
=>
{
console
.
log
(
val
);
onCancel
();
onTableClick
(
val
);
};
return
(
<
div
>
<
Modal
visible=
{
visible
}
title=
"选择表模型"
width=
"1000px"
onOk=
{
onFinish
}
onCancel=
{
onCancel
}
maskClosable=
{
false
}
footer=
{
[]
}
destroyOnClose
centered
>
<
div
className=
{
styles
.
content
}
>
{
Object
.
keys
(
tableList
).
map
(
item
=>
(
<
div
className=
{
styles
.
groupBox
}
key=
{
item
}
>
<
div
className=
{
styles
.
headerBox
}
>
<
div
className=
{
styles
.
line
}
/>
<
div
className=
{
styles
.
groupName
}
>
{
item
}
</
div
>
</
div
>
<
div
className=
{
styles
.
tableContent
}
>
{
tableList
[
item
].
map
(
ele
=>
(
<
div
className=
{
styles
.
tableBox
}
key=
{
ele
.
value
}
onClick=
{
()
=>
createTable
(
ele
.
value
)
}
>
<
div
className=
{
styles
.
imgBox
}
>
<
img
src=
{
`${window.location.origin}/civweb4/${ele.icon}`
}
alt=
""
/>
</
div
>
<
div
className=
{
styles
.
title
}
>
{
ele
.
value
}
</
div
>
</
div
>
))
}
</
div
>
</
div
>
))
}
</
div
>
</
Modal
>
</
div
>
);
};
export
default
ChooseTableType
;
src/pages/bsmanager/base/tablemanager/components/ChooseTableType.less
0 → 100644
View file @
3165d8ce
.content {
height: 530px;
overflow-y: scroll;
.groupBox {
width: 100%;
margin-bottom: 30px;
.headerBox {
display: flex;
align-items: center;
justify-content: left;
.line {
height: 12px;
width: 3px;
background-color: #3D78FF;
}
.groupName {
margin-left: 7px;
}
}
.tableContent {
display: flex;
.tableBox {
display: flex;
flex-direction: column;
justify-content: center;
margin-right: 10px;
margin-top: 10px;
width: 100px;
cursor: pointer;
.imgBox {
display: flex;
justify-content: center;
width: 100px;
height: 50px;
img {
width: 50px;
height: 50px;
}
}
.title {
text-align: center;
margin-top: 5px;
}
}
}
}
}
\ No newline at end of file
src/pages/bsmanager/base/tablemanager/components/TableView.jsx
View file @
3165d8ce
...
...
@@ -742,7 +742,7 @@ const TableView = props => {
bordered
dataSource=
{
dataSource
}
columns=
{
columns
}
scroll=
{
{
x
:
'max-content'
,
y
:
'540px'
}
}
scroll=
{
{
y
:
'540px'
}
}
pagination=
{
false
}
id=
"box"
/>
...
...
src/pages/bsmanager/base/tablemanager/index.jsx
View file @
3165d8ce
...
...
@@ -55,6 +55,7 @@ import AddTablelList from './components/TableView';
import
AffiliateAdd
from
'./components/Field/affiliateAdd'
;
import
LoadGroup
from
'./components/Field/loadGroup'
;
import
LoadGroupNew
from
'./components/Field/loadGroupNew'
;
import
ChooseTableType
from
'./components/ChooseTableType'
;
// import { defaultFields } from './components/defaultFields';
import
styles
from
'./index.less'
;
const
{
Search
}
=
Input
;
...
...
@@ -621,7 +622,7 @@ const TableManager = props => {
style=
{
{
width
:
'300px'
}
}
/>
</
div
>
<
Dropdown
overlay=
{
menu
}
arrow
>
{
/*
<Dropdown overlay={menu} arrow>
<Button
type="primary"
icon={<BorderInnerOutlined />}
...
...
@@ -629,7 +630,18 @@ const TableManager = props => {
>
建表
</Button>
</
Dropdown
>
</Dropdown> */
}
<
Button
type=
"primary"
icon=
{
<
BorderInnerOutlined
/>
}
style=
{
{
marginLeft
:
'10px'
}
}
onClick=
{
()
=>
{
setType
(
'chooseType'
);
setVisible
(
true
);
}
}
>
建表
</
Button
>
<
Button
type=
"primary"
style=
{
{
marginLeft
:
'10px'
}
}
...
...
@@ -708,6 +720,15 @@ const TableManager = props => {
defaultFieldsList=
{
defaultFieldsList
}
tableType=
{
tableType
}
/>
<
ChooseTableType
visible=
{
visible
&&
type
===
'chooseType'
}
defalutFields=
{
defaultFieldsList
}
onCancel=
{
()
=>
setVisible
(
false
)
}
onTableClick=
{
val
=>
{
setTableType
(
val
);
AddTable
();
}
}
/>
{
visible
&&
type
===
'affiliateAdd'
&&
(
<
AffiliateAdd
visible=
{
visible
}
...
...
src/pages/bsmanager/workOrder/workflowEdit/WorkflowHomePage.less
View file @
3165d8ce
...
...
@@ -286,7 +286,7 @@
.lookDetail {
display: none;
margin-right: 1
0
px;
margin-right: 1
7
px;
}
}
...
...
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