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
50f1962a
Commit
50f1962a
authored
Jul 26, 2021
by
shaoan123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化表字段模块
parent
6868f417
Pipeline
#32098
passed with stages
in 30 minutes 58 seconds
Changes
9
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
162 additions
and
54 deletions
+162
-54
index.jsx
src/pages/platformCenter/bsmanager/tablemanager/index.jsx
+0
-0
index.less
src/pages/platformCenter/bsmanager/tablemanager/index.less
+18
-0
dimensionsConfig.less
...ges/platformCenter/dimensionsConfig/dimensionsConfig.less
+4
-4
filedConfig.jsx
src/pages/platformCenter/filedConfig/filedConfig.jsx
+111
-32
index.less
src/pages/platformCenter/filedConfig/index.less
+15
-0
SchemeConfig.less
src/pages/platformCenter/schemeConfig/SchemeConfig.less
+5
-6
schemeDetail.jsx
src/pages/platformCenter/schemeDetail/schemeDetail.jsx
+0
-2
standingBook.jsx
src/pages/platformCenter/standingBook/standingBook.jsx
+8
-9
standingBook.less
src/pages/platformCenter/standingBook/standingBook.less
+1
-1
No files found.
src/pages/platformCenter/bsmanager/tablemanager/index.jsx
View file @
50f1962a
This diff is collapsed.
Click to expand it.
src/pages/platformCenter/bsmanager/tablemanager/index.less
View file @
50f1962a
...
...
@@ -2,6 +2,24 @@
display: flex;
flex-direction: column;
width: 100vm;
border: 1px solid #f0f0f0;
.lack{
background-color: rgb(255, 255, 0);
color: rgb(255, 0, 0);
}
.ant-table.ant-table-small .ant-table-tbody .ant-table-wrapper:only-child .ant-table{
margin-left: 0;
}
.ant-table.ant-table-bordered > .ant-table-container{
border: none;
}
.ant-table-thead tr th{
font-weight: 600;
color:rgba(0,0,0,0.85);
}
.clickRowStyle{
background: #cfe7fd;
}
.operate_bar {
width: 100%;
height: 60px;
...
...
src/pages/platformCenter/dimensionsConfig/dimensionsConfig.less
View file @
50f1962a
...
...
@@ -3,7 +3,9 @@
background-color: #ffffff;
display: flex;
.ant-table {
min-height: 15rem !important;
}
padding: 0.8rem;
.ant-table-thead tr th {
font-weight: 600;
...
...
@@ -98,9 +100,7 @@
cursor: pointer;
}
}
.ant-table {
min-height: 15rem !important;
}
.cardsList{
display: flex;
flex-wrap: wrap;
...
...
src/pages/platformCenter/filedConfig/filedConfig.jsx
View file @
50f1962a
...
...
@@ -24,7 +24,8 @@ const AddModal = props => {
const
[
isVisible
,
setIsVisible
]
=
useState
(
false
);
// 弹窗
const
[
isType
,
setIsType
]
=
useState
(
''
);
// 弹窗类型
const
[
itemData
,
setItemData
]
=
useState
({});
const
[
select
,
setSelect
]
=
useState
([])
const
[
selectTableName
,
setSelectTableName
]
=
useState
({})
const
editor
=
record
=>
{
setIsType
(
'edit'
);
setIsVisible
(
true
);
...
...
@@ -41,8 +42,9 @@ const AddModal = props => {
title
:
'字段名'
,
dataIndex
:
'name'
,
key
:
'name'
,
width
:
150
,
render
:
text
=>
<
a
>
{
text
}
</
a
>,
width
:
190
,
align
:
'left'
,
render
:
text
=>
<
div
style=
{
{
paddingLeft
:
'2rem'
}
}
>
{
text
}
</
div
>,
},
{
title
:
'别名'
,
...
...
@@ -72,7 +74,7 @@ const AddModal = props => {
align
:
'center'
,
width
:
200
,
},
{
title
:
'只读'
,
dataIndex
:
'readOnly'
,
...
...
@@ -122,19 +124,89 @@ const AddModal = props => {
},
];
return
<
Table
columns=
{
columns
}
dataSource=
{
allData
[
item
.
type
]
}
pagination=
{
false
}
/>;
return
<
Table
columns=
{
columns
}
onRow=
{
record
=>
{
return
{
onDoubleClick
:
event
=>
{
event
.
stopPropagation
()
editor
(
record
);
},
onClick
:
event
=>
{
event
.
stopPropagation
()
setSelectTableName
(
record
)
},
// 点击行
}
}
}
bordered
rowClassName=
{
setRowClassName
}
showHeader=
{
false
}
dataSource=
{
allData
[
item
.
type
]
}
pagination=
{
false
}
/>;
};
const
setRowClassName
=
(
record
)
=>
Object
.
entries
(
record
).
toString
()
===
Object
.
entries
(
selectTableName
).
toString
()
?
styles
.
clickRowStyle
:
''
;
const
columns
=
[
{
title
:
'类型'
,
dataIndex
:
'type'
,
key
:
'type'
,
title
:
'字段名'
,
dataIndex
:
'type'
,
key
:
'type'
,
align
:
'left'
,
width
:
150
,
render
:
text
=>
{
return
(<
div
style=
{
{
color
:
'#3764a0'
}
}
>
{
text
}
(共
{
allData
[
text
].
length
}
条)
</
div
>)
return
(<
a
>
{
text
}
(共
{
allData
[
text
]
?
allData
[
text
].
length
:
''
}
条)
</
a
>)
}
},
{
title
:
'别名'
,
dataIndex
:
'alias'
,
key
:
'alias'
,
align
:
'center'
,
width
:
200
,
},
{
title
:
'字段类型'
,
dataIndex
:
'storeType'
,
key
:
'storeType'
,
align
:
'center'
,
width
:
200
,
},
{
title
:
'形态'
,
dataIndex
:
'shape'
,
key
:
'shape'
,
align
:
'center'
,
width
:
200
,
},
{
title
:
'配置'
,
dataIndex
:
'config'
,
key
:
'config'
,
align
:
'center'
,
width
:
200
,
},
{
title
:
'只读'
,
dataIndex
:
'readOnly'
,
key
:
'readOnly'
,
align
:
'center'
,
width
:
200
,
},
{
title
:
'同步'
,
dataIndex
:
'syncEvent'
,
key
:
'syncEvent'
,
align
:
'center'
,
width
:
200
,
},
{
title
:
'操作'
,
width
:
250
,
ellipsis
:
true
,
key
:
'title'
,
align
:
'center'
,
},
];
useEffect
(()
=>
{
if
(
props
.
match
.
params
.
id
)
{
setFormObj
(
props
.
match
.
params
.
id
)
setTreeLoading
(
true
);
...
...
@@ -143,13 +215,14 @@ const AddModal = props => {
}).
then
(
res
=>
{
setTreeLoading
(
false
);
if
(
res
.
msg
===
'Ok'
)
{
let
arr
=
formateArrDataA
(
res
.
data
.
root
,
'group'
)
let
arr
=
formateArrDataA
(
res
.
data
.
root
,
'group'
)
let
newArr
=
[]
Object
.
keys
(
arr
).
map
((
item
,
index
)
=>
{
newArr
.
push
({
type
:
item
,
key
:
index
,
id
:
index
})
newArr
.
push
({
type
:
item
,
key
:
index
,
id
:
index
})
})
setAllData
(
arr
);
setTableData
(
newArr
);
setSelect
(
newArr
)
}
});
}
...
...
@@ -183,7 +256,7 @@ const AddModal = props => {
}
for
(
let
keys
in
tempObj
)
{
let
arr
=
[]
tempObj
[
keys
].
map
((
item
,
index
)
=>
{
tempObj
[
keys
].
map
((
item
,
index
)
=>
{
tempObj
[
keys
]
=
arr
;
item
.
key
=
index
arr
.
push
(
item
)
...
...
@@ -212,40 +285,46 @@ const AddModal = props => {
};
// 返回上一级
const
back
=
()
=>
{
history
.
push
(
'/platformCenter/bsmanger/tablemanger'
)
let
template
=
props
.
history
.
location
.
state
.
template
history
.
push
({
pathname
:
'/platformCenter/bsmanger/tablemanger'
,
state
:
{
template
}
})
}
const
onUnfold
=
(
expanded
,
record
)
=>
{
const
data
=
[...
select
]
let
index
=
data
.
indexOf
(
record
)
if
(
expanded
)
{
data
.
push
(
record
)
}
else
{
data
.
splice
(
index
,
1
)
}
setSelect
(
data
)
}
return
(
<
div
style=
{
{
width
:
'100vm'
,
height
:
'calc(100vh - 100px) '
,
background
:
'#ffffff'
}
}
>
<
Spin
tip=
"loading..."
spinning=
{
treeLoading
}
>
<
div
className=
{
styles
.
config
}
><
div
className=
{
styles
.
title
}
>
{
formObj
}
(字段配置)
</
div
>
<
Button
type=
"primary"
onClick=
{
back
}
>
返回
</
Button
></
div
>
<><
Spin
tip=
"loading..."
spinning=
{
treeLoading
}
>
<
div
className=
{
styles
.
containerBox
}
>
<
div
className=
{
styles
.
config
}
><
div
className=
{
styles
.
title
}
>
{
formObj
}
(字段配置)
</
div
>
<
Button
type=
"primary"
onClick=
{
back
}
>
返回
</
Button
></
div
>
<
Table
columns=
{
columns
}
dataSource=
{
tableData
}
expandable=
{
{
expandedRowRender
}
}
showHeader=
{
false
}
// pagination={{ pageSize: 10 }}
scroll=
{
{
y
:
'45rem'
}
}
size=
"small"
rowKey=
'id'
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
pageSizeOptions
:
[
10
,
20
,
50
,
100
],
defaultPageSize
:
20
,
showQuickJumper
:
true
,
showSizeChanger
:
true
,
}
}
/>
</
Spin
>
<
FieldEditor
expandedRowKeys=
{
select
.
map
(
item
=>
item
.
key
)
}
//展开的行
expandRowByClick=
{
true
}
defaultExpandAllRows=
{
true
}
pagination=
{
false
}
scroll=
{
{
y
:
'calc(100vh - 186px)'
}
}
size=
"small"
onExpand=
{
onUnfold
}
/>
</
div
>
</
Spin
><
FieldEditor
isVisible=
{
isVisible
}
isType=
{
isType
}
itemData=
{
itemData
}
formObj1=
{
formObj
}
onCancel=
{
()
=>
setIsVisible
(
false
)
}
callBackSubmit=
{
Submit
}
/>
</
div
>
callBackSubmit=
{
Submit
}
/></>
);
};
export
default
AddModal
;
src/pages/platformCenter/filedConfig/index.less
View file @
50f1962a
...
...
@@ -22,6 +22,20 @@
}
}
.containerBox {
width: 100vm;
height: calc(100vh - 90px) ;
background: #ffffff;
.ant-table.ant-table-small .ant-table-tbody .ant-table-wrapper:only-child .ant-table{
margin-left: 0;
}
.ant-table.ant-table-bordered > .ant-table-container{
border: none;
}
.clickRowStyle{
background: #cfe7fd;
}
}
.paneTitle{
font-weight: bold;
...
...
@@ -93,6 +107,7 @@
.title{
font-size: 18px;
color: rgba(0, 114, 255, 1);
font-weight: bold;
}
}
src/pages/platformCenter/schemeConfig/SchemeConfig.less
View file @
50f1962a
.container{
width: 100%;
background-color: #ffffff;
display: flex;
padding: 0.8rem;
display: flex;
.ant-table {
min-height: 15rem !important;
}
.ant-table-thead tr th {
font-weight: 600;
color: rgba(0, 0, 0, 0.85);
...
...
@@ -97,9 +98,7 @@
cursor: pointer;
}
}
.ant-table {
min-height: 15rem !important;
}
.cardsList{
display: flex;
flex-wrap: wrap;
...
...
src/pages/platformCenter/schemeDetail/schemeDetail.jsx
View file @
50f1962a
...
...
@@ -193,7 +193,6 @@ const EditModal = props => {
WebTemplateID
:
fv
.
web_template
,
PushGroup
:
fv
.
to_person
?
fv
.
to_person
.
toString
()
:
''
}
console
.
log
(
b
)
InsertMessageConfig
(
b
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
...
...
@@ -215,7 +214,6 @@ const EditModal = props => {
)
}
else
{
message
.
success
(
"保存成功"
)
}
}
else
{
...
...
src/pages/platformCenter/standingBook/standingBook.jsx
View file @
50f1962a
...
...
@@ -74,21 +74,21 @@ const standingBook = props => {
dataIndex
:
'fields'
,
key
:
'fields'
,
align
:
'center'
,
width
:
100
,
},
{
title
:
'检索字段'
,
dataIndex
:
'searchFields'
,
key
:
'searchFields'
,
align
:
'center'
,
width
:
100
,
},
{
title
:
'添加字段'
,
dataIndex
:
'addFields'
,
key
:
'addFields'
,
align
:
'center'
,
width
:
100
,
},
{
...
...
@@ -96,21 +96,21 @@ const standingBook = props => {
dataIndex
:
'editFields'
,
key
:
'editFields'
,
align
:
'center'
,
width
:
100
,
},
{
title
:
'前端字段'
,
dataIndex
:
'webFields'
,
key
:
'webFields'
,
align
:
'center'
,
width
:
100
,
},
{
title
:
'手持字段'
,
dataIndex
:
'mobileFields'
,
key
:
'mobileFields'
,
align
:
'center'
,
width
:
100
,
},
{
title
:
'操作'
,
...
...
@@ -270,11 +270,11 @@ const standingBook = props => {
</
Tooltip
>
<
hr
style=
{
{
width
:
'100%'
,
color
:
'#eeecec'
}
}
/>
{
tableData
.
length
&&
(
tableData
.
map
((
item
,
index
)
=>
{
tableData
.
length
>
0
&&
(
tableData
.
map
((
item
,
index
)
=>
{
return
<
div
className=
{
classnames
({
[
styles
.
listItem
]:
true
,
[
styles
.
pickItem
]:
item
===
pickItem
,
})
}
onClick=
{
e
=>
setPickItem
(
item
)
}
key=
{
index
}
>
{
item
}
(
{
allData
[
item
]
?
allData
[
item
].
length
:
''
}
条)
{
item
===
pickItem
?
<
RightOutlined
/>
:
''
}
</
div
>
})
}
onClick=
{
e
=>
setPickItem
(
item
)
}
key=
{
index
}
>
{
item
}
(
{
allData
[
item
]
?
allData
[
item
].
length
:
''
}
)
{
item
===
pickItem
?
<
RightOutlined
/>
:
''
}
</
div
>
})
)
}
</
div
></>
:
''
}
...
...
@@ -308,7 +308,6 @@ const standingBook = props => {
onDoubleClick
:
event
=>
{
event
.
stopPropagation
();
editor
(
record
)},
//双击
};
}
}
columns=
{
columns
}
dataSource=
{
allData
[
pickItem
]
}
// loading={tableLoading}
...
...
src/pages/platformCenter/standingBook/standingBook.less
View file @
50f1962a
...
...
@@ -99,7 +99,7 @@
}
.orgContainer{
height: calc(100vh - 74px);
width:
3
40px;
width:
2
40px;
left: 0;
top: 0;
overflow-x: hidden;
...
...
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