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
9ef02f96
Commit
9ef02f96
authored
Jan 14, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '修改表字段展示逻辑,记住状态,修改消息平台界面样式'
parent
09435272
Pipeline
#42731
skipped with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
10 deletions
+45
-10
filedConfig.jsx
...s/bsmanager/base/tablemanager/filedConfig/filedConfig.jsx
+19
-5
index.jsx
src/pages/bsmanager/base/tablemanager/index.jsx
+24
-4
AddModal.jsx
...nter/messageManage/templateManage/components/AddModal.jsx
+2
-1
No files found.
src/pages/bsmanager/base/tablemanager/filedConfig/filedConfig.jsx
View file @
9ef02f96
...
...
@@ -7,7 +7,11 @@ import {
PlusSquareOutlined
,
RollbackOutlined
,
}
from
'@ant-design/icons'
;
import
{
reloadTableFields
,
removeFields
,
loadUnattachedTables
}
from
'@/services/tablemanager/tablemanager'
;
import
{
reloadTableFields
,
removeFields
,
loadUnattachedTables
,
}
from
'@/services/tablemanager/tablemanager'
;
import
{
useHistory
}
from
'react-router-dom'
;
import
FieldEditor
from
'./fieldEditor'
;
import
styles
from
'./index.less'
;
...
...
@@ -29,6 +33,7 @@ const AddModal = props => {
const
[
pramFormObj
,
setPramFormObj
]
=
useState
({});
const
[
visible
,
setVisible
]
=
useState
(
false
);
// 弹窗
const
[
type
,
setType
]
=
useState
(
''
);
// 弹窗类型
const
[
chooseLine
,
setChooseLine
]
=
useState
(
''
);
const
editor
=
record
=>
{
setIsType
(
'edit'
);
setIsVisible
(
true
);
...
...
@@ -326,12 +331,15 @@ const AddModal = props => {
};
// 返回上一级
const
back
=
()
=>
{
let
{
template
,
tableScroll
}
=
props
.
location
.
state
;
console
.
log
(
props
.
location
.
state
);
let
{
template
,
tableScroll
,
keepValue
}
=
props
.
location
.
state
;
console
.
log
(
keepValue
);
history
.
push
({
pathname
:
'/bsmanger/base/tablemanger'
,
query
:
{
template
,
tableScroll
,
keepValue
,
},
});
};
...
...
@@ -343,8 +351,14 @@ const AddModal = props => {
}
else
{
data
.
splice
(
index
,
1
);
}
console
.
log
(
data
);
setSelect
(
data
);
let
arr
=
[];
arr
.
push
(
record
.
key
);
if
(
expanded
===
true
)
{
setChooseLine
(
arr
);
}
else
{
setChooseLine
([]);
}
};
// 附加
const
add
=
record
=>
{
...
...
@@ -387,8 +401,8 @@ const AddModal = props => {
expandable=
{
{
expandedRowRender
}
}
size=
"small"
rowKey=
"id"
expandedRowKeys=
{
select
.
map
(
item
=>
item
.
key
)
}
// 展开的行
defaultExpandedRowKeys=
{
0
}
// 展开的行
expandedRowKeys=
{
chooseLine
}
// 展开的行
defaultExpandedRowKeys=
{
[
0
]
}
// 展开的行
expandRowByClick
pagination=
{
false
}
scroll=
{
{
y
:
'calc(100vh - 186px)'
}
}
...
...
src/pages/bsmanager/base/tablemanager/index.jsx
View file @
9ef02f96
...
...
@@ -36,6 +36,7 @@ import AddTablelList from './components/Field/addTable';
import
AffiliateAdd
from
'./components/Field/affiliateAdd'
;
import
LoadGroup
from
'./components/Field/loadGroup'
;
import
LoadGroupNew
from
'./components/Field/loadGroupNew'
;
import
{
ChangedEvent
}
from
'gojs'
;
const
{
Search
}
=
Input
;
const
{
Option
}
=
Select
;
const
placeholder
=
'请输入表名'
;
...
...
@@ -55,6 +56,8 @@ const TableManager = props => {
const
[
select
,
setSelect
]
=
useState
([]);
const
[
selectTableName
,
setSelectTableName
]
=
useState
(
''
);
const
[
showSearchStyle
,
setShowSearchStyle
]
=
useState
(
false
);
// 是否显示模糊查询样式
const
[
chooseLine
,
setChooseLine
]
=
useState
([
0
]);
const
[
keepValue
,
setKeepValue
]
=
useState
([
0
]);
useEffect
(
record
=>
{
loadTable
(
searchValue
);
...
...
@@ -74,11 +77,13 @@ const TableManager = props => {
console
.
log
(
props
.
history
.
location
.
query
,
'props.history.location.query'
);
if
(
arr
.
length
>
0
&&
props
.
history
.
location
.
query
&&
selectTableName
==
''
)
{
console
.
log
(
234534256342
);
let
{
tableScroll
,
template
}
=
props
.
history
.
location
.
query
;
let
{
tableScroll
,
template
,
keepValue
}
=
props
.
history
.
location
.
query
;
setSelectTableName
(
template
);
setTimeout
(()
=>
{
document
.
querySelector
(
'.ant-table-body'
).
scrollTop
=
tableScroll
;
},
0
);
setChooseLine
(
keepValue
);
setKeepValue
(
keepValue
);
}
},
[
allData
]);
// 附加
...
...
@@ -132,11 +137,13 @@ const TableManager = props => {
const
fieldsConfig
=
(
record
,
e
)
=>
{
e
.
stopPropagation
();
setFormObj
(
record
);
console
.
log
(
keepValue
);
history
.
push
({
pathname
:
`/bsmanger/base/filedConfig/
${
record
.
tableName
}
`
,
state
:
{
template
:
record
,
tableScroll
:
document
.
querySelector
(
'.ant-table-body'
).
scrollTop
,
keepValue
:
keepValue
,
},
});
// setType('config');
...
...
@@ -182,7 +189,7 @@ const TableManager = props => {
Object
.
keys
(
groupData
).
map
((
item
,
index
)
=>
{
newArr
.
push
({
type
:
item
,
key
:
index
});
});
console
.
log
(
newArr
);
setAllData
(
groupData
);
setGroupArr
(
newArr
);
setSelect
(
newArr
);
...
...
@@ -360,12 +367,14 @@ const TableManager = props => {
size=
"small"
onRow=
{
record
=>
({
onDoubleClick
:
event
=>
{
console
.
log
(
keepValue
);
event
.
stopPropagation
();
history
.
push
({
pathname
:
`/bsmanger/base/filedConfig/${record.tableName}`
,
state
:
{
template
:
record
,
tableScroll
:
document
.
querySelector
(
'.ant-table-body'
).
scrollTop
,
keepValue
:
keepValue
,
},
});
},
...
...
@@ -447,7 +456,18 @@ const TableManager = props => {
data
.
splice
(
index
,
1
);
}
setSelect
(
data
);
let
arr
=
[];
arr
.
push
(
record
.
key
);
if
(
expanded
===
true
)
{
setChooseLine
(
arr
);
console
.
log
(
arr
);
setKeepValue
(
arr
);
}
else
{
setChooseLine
([]);
setKeepValue
([]);
}
};
return
(
<
Spin
tip=
"loading..."
spinning=
{
treeLoading
}
>
<
PageContainer
>
...
...
@@ -511,9 +531,9 @@ const TableManager = props => {
className=
"components-table-demo-nested"
columns=
{
columns
}
expandable=
{
{
expandedRowRender
}
}
expandedRowKeys=
{
select
.
map
(
item
=>
item
.
key
)
}
// 展开的行
defaultExpandedRowKeys=
{
[
0
]
}
expandRowByClick
// defaultExpandedRowKeys={0
}
expandedRowKeys=
{
chooseLine
}
dataSource=
{
groupArr
}
scroll=
{
{
y
:
'calc(100vh - 190px)'
}
}
size=
"small"
...
...
src/pages/platformCenter/messageManage/templateManage/components/AddModal.jsx
View file @
9ef02f96
...
...
@@ -20,6 +20,7 @@ const AddModal = props => {
form
.
resetFields
();
};
useEffect
(()
=>
{
console
.
log
(
option
);
if
(
option
)
{
setTemplateName
(
option
.
filter
(
item
=>
item
.
Type
===
'公众号'
));
form
.
setFieldsValue
({
...
...
@@ -177,7 +178,7 @@ const AddModal = props => {
]
}
>
<
Select
style=
{
{
width
:
'12
rem
'
}
}
style=
{
{
width
:
'12
0%
'
}
}
onChange=
{
value
=>
onChangeType1
(
value
)
}
placeholder=
"请选择模板名称"
>
...
...
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