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
7907de55
Commit
7907de55
authored
Jul 15, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 'web配置登录模板参数管理'
parent
b0493a0b
Pipeline
#55492
waiting for manual action with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
408 additions
and
222 deletions
+408
-222
Tree.png
src/assets/images/title/Tree.png
+0
-0
fieldEditor.jsx
...s/bsmanager/base/tablemanager/filedConfig/fieldEditor.jsx
+247
-211
ParmarModal.jsx
src/pages/productCenter/webConfig/components/ParmarModal.jsx
+119
-0
siteConfigDrawer.js
...es/productCenter/webConfig/components/siteConfigDrawer.js
+42
-11
No files found.
src/assets/images/title/Tree.png
0 → 100644
View file @
7907de55
This diff was suppressed by a .gitattributes entry.
src/pages/bsmanager/base/tablemanager/filedConfig/fieldEditor.jsx
View file @
7907de55
...
@@ -31,6 +31,7 @@ import {
...
@@ -31,6 +31,7 @@ import {
Image
,
Image
,
}
from
'antd'
;
}
from
'antd'
;
import
AllImage
from
'@/assets/images/title/All.png'
;
import
AllImage
from
'@/assets/images/title/All.png'
;
import
TreeImage
from
'@/assets/images/title/Tree.png'
;
import
partImage
from
'@/assets/images/title/part.png'
;
import
partImage
from
'@/assets/images/title/part.png'
;
import
{
import
{
getField
,
getField
,
...
@@ -250,7 +251,7 @@ const AddModal = props => {
...
@@ -250,7 +251,7 @@ const AddModal = props => {
console
.
log
(
obj
.
choose
);
console
.
log
(
obj
.
choose
);
console
.
log
(
pep
);
console
.
log
(
pep
);
console
.
log
(
cho
);
console
.
log
(
cho
);
data
[
0
].
Config
=
pep
?
`本人
${
cho
?
'
'
:
'.n'
}
`
:
`全部
${
cho
?
''
:
'.n
'
}
`
;
data
[
0
].
Config
=
pep
?
`本人
${
cho
?
'
.n'
:
''
}
`
:
`全部
${
cho
?
'.n'
:
'
'
}
`
;
break
;
break
;
case
'业务选择器'
:
case
'业务选择器'
:
if
(
obj
.
fieldName
.
endsWith
(
'.n'
))
{
if
(
obj
.
fieldName
.
endsWith
(
'.n'
))
{
...
@@ -287,41 +288,45 @@ const AddModal = props => {
...
@@ -287,41 +288,45 @@ const AddModal = props => {
break
;
break
;
case
'选择器'
:
case
'选择器'
:
if
(
cse
)
{
if
(
cse
)
{
let
str
=
`
${
obj
.
farter
}
.
${
obj
.
farterData
}
`
;
let
str
=
cho
?
`
${
obj
.
farter
}
.
${
obj
.
farterData
}
.n`
:
`
${
obj
.
farter
}
.
${
obj
.
farterData
}
`
;
data
[
0
].
Config
=
str
;
data
[
0
].
Config
=
str
;
}
else
{
}
else
{
data
[
0
].
Config
=
obj
.
Config
?
obj
.
Config
:
''
;
console
.
log
(
obj
.
Config
);
let
str
=
cho
?
`
${
obj
.
Config
}
.n`
:
`
${
obj
.
Config
}
`
;
data
[
0
].
Config
=
str
;
}
}
break
;
break
;
case
'人员选择器'
:
case
'人员选择器'
:
if
(
popeleShape
==
'分组模态'
)
{
if
(
popeleShape
==
'分组模态'
)
{
if
(
checkboxAllID1
==
true
)
{
if
(
checkboxAllID1
==
true
)
{
if
(
obj
.
ConfigName
)
{
if
(
obj
.
ConfigName
)
{
let
str
=
cho
?
`全部ID.
${
obj
.
ConfigName
}
`
:
`全部ID.
${
obj
.
ConfigName
}
.n
`
;
let
str
=
cho
?
`全部ID.
${
obj
.
ConfigName
}
.n`
:
`全部ID.
${
obj
.
ConfigName
}
`
;
data
[
0
].
Config
=
str
;
data
[
0
].
Config
=
str
;
}
else
{
}
else
{
let
str
=
cho
?
`全部ID
`
:
`全部ID.n
`
;
let
str
=
cho
?
`全部ID
.n`
:
`全部ID
`
;
data
[
0
].
Config
=
str
;
data
[
0
].
Config
=
str
;
}
}
}
else
{
}
else
{
if
(
obj
.
ConfigName
)
{
if
(
obj
.
ConfigName
)
{
let
str
=
cho
?
`全部.
${
obj
.
ConfigName
}
`
:
`全部.
${
obj
.
ConfigName
}
.n
`
;
let
str
=
cho
?
`全部.
${
obj
.
ConfigName
}
.n`
:
`全部.
${
obj
.
ConfigName
}
`
;
data
[
0
].
Config
=
str
;
data
[
0
].
Config
=
str
;
}
else
{
}
else
{
let
str
=
cho
?
`全部
`
:
`全部.n
`
;
let
str
=
cho
?
`全部
.n`
:
`全部
`
;
data
[
0
].
Config
=
str
;
data
[
0
].
Config
=
str
;
}
}
}
}
}
else
if
(
popeleShape
==
'下拉框'
)
{
}
else
if
(
popeleShape
==
'下拉框'
)
{
let
str
=
cho
?
`
${
obj
.
Config
}
`
:
`
${
obj
.
Config
}
.n
`
;
let
str
=
cho
?
`
${
obj
.
Config
}
.n`
:
`
${
obj
.
Config
}
`
;
console
.
log
(
str
);
console
.
log
(
str
);
data
[
0
].
Config
=
str
;
data
[
0
].
Config
=
str
;
}
else
if
(
popeleShape
==
'树形模态'
)
{
}
else
if
(
popeleShape
==
'树形模态'
)
{
if
(
gl
)
{
if
(
gl
)
{
let
str
=
cho
?
`tree.
单选|非站点`
:
`tree.多选|非
站点`
;
let
str
=
cho
?
`tree.
多选|站点`
:
`tree.单选|
站点`
;
data
[
0
].
Config
=
str
;
data
[
0
].
Config
=
str
;
}
else
{
}
else
{
let
str
=
cho
?
`tree.
单选|站点`
:
`tree.多选|
站点`
;
let
str
=
cho
?
`tree.
多选|非站点`
:
`tree.单选|非
站点`
;
data
[
0
].
Config
=
str
;
data
[
0
].
Config
=
str
;
}
}
}
}
...
@@ -469,23 +474,23 @@ const AddModal = props => {
...
@@ -469,23 +474,23 @@ const AddModal = props => {
console
.
log
(
site
[
1
]);
console
.
log
(
site
[
1
]);
if
(
site
[
0
]
==
'本人'
)
{
if
(
site
[
0
]
==
'本人'
)
{
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
form
.
setFieldsValue
({
pepole
:
true
,
choose
:
false
});
setPep
(
true
);
setCho
(
false
);
}
else
{
form
.
setFieldsValue
({
pepole
:
true
,
choose
:
true
});
form
.
setFieldsValue
({
pepole
:
true
,
choose
:
true
});
setPep
(
true
);
setPep
(
true
);
setCho
(
true
);
setCho
(
true
);
}
else
{
form
.
setFieldsValue
({
pepole
:
true
,
choose
:
false
});
setPep
(
true
);
setCho
(
false
);
}
}
}
else
{
}
else
{
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
form
.
setFieldsValue
({
pepole
:
false
,
choose
:
false
});
setPep
(
false
);
setCho
(
false
);
}
else
{
form
.
setFieldsValue
({
pepole
:
false
,
choose
:
true
});
form
.
setFieldsValue
({
pepole
:
false
,
choose
:
true
});
setPep
(
false
);
setPep
(
false
);
setCho
(
true
);
setCho
(
true
);
}
else
{
form
.
setFieldsValue
({
pepole
:
false
,
choose
:
false
});
setPep
(
false
);
setCho
(
false
);
}
}
}
}
break
;
break
;
...
@@ -579,7 +584,7 @@ const AddModal = props => {
...
@@ -579,7 +584,7 @@ const AddModal = props => {
let
sele
=
res
[
0
].
data
.
root
.
Config
.
split
(
'.'
);
let
sele
=
res
[
0
].
data
.
root
.
Config
.
split
(
'.'
);
console
.
log
(
sele
[
0
]);
console
.
log
(
sele
[
0
]);
console
.
log
(
sele
[
1
]);
console
.
log
(
sele
[
1
]);
if
(
sele
[
1
])
{
if
(
sele
[
1
]
&&
sele
[
1
]
!=
'n'
)
{
form
.
setFieldsValue
({
form
.
setFieldsValue
({
Association
:
true
,
Association
:
true
,
farter
:
sele
[
0
],
farter
:
sele
[
0
],
...
@@ -594,6 +599,13 @@ const AddModal = props => {
...
@@ -594,6 +599,13 @@ const AddModal = props => {
});
});
setCse
(
false
);
setCse
(
false
);
}
}
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
form
.
setFieldsValue
({
choose
:
true
});
setCho
(
true
);
}
else
{
form
.
setFieldsValue
({
choose
:
false
});
setCho
(
false
);
}
break
;
break
;
case
'人员选择器'
:
case
'人员选择器'
:
let
pepole
=
res
[
0
].
data
.
root
.
Config
.
split
(
'.'
);
let
pepole
=
res
[
0
].
data
.
root
.
Config
.
split
(
'.'
);
...
@@ -619,11 +631,11 @@ const AddModal = props => {
...
@@ -619,11 +631,11 @@ const AddModal = props => {
});
});
}
}
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
form
.
setFieldsValue
({
choose
:
false
});
setCho
(
false
);
}
else
{
form
.
setFieldsValue
({
choose
:
true
});
form
.
setFieldsValue
({
choose
:
true
});
setCho
(
true
);
setCho
(
true
);
}
else
{
form
.
setFieldsValue
({
choose
:
false
});
setCho
(
false
);
}
}
setPopeleShape
(
'分组模态'
);
setPopeleShape
(
'分组模态'
);
}
else
if
(
pepole
[
0
]
==
'全部ID'
)
{
}
else
if
(
pepole
[
0
]
==
'全部ID'
)
{
...
@@ -647,11 +659,11 @@ const AddModal = props => {
...
@@ -647,11 +659,11 @@ const AddModal = props => {
});
});
}
}
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
form
.
setFieldsValue
({
choose
:
false
});
setCho
(
false
);
}
else
{
form
.
setFieldsValue
({
choose
:
true
});
form
.
setFieldsValue
({
choose
:
true
});
setCho
(
true
);
setCho
(
true
);
}
else
{
form
.
setFieldsValue
({
choose
:
false
});
setCho
(
false
);
}
}
setPopeleShape
(
'分组模态'
);
setPopeleShape
(
'分组模态'
);
}
else
if
(
pepole
[
0
]
==
'tree'
)
{
}
else
if
(
pepole
[
0
]
==
'tree'
)
{
...
@@ -666,21 +678,21 @@ const AddModal = props => {
...
@@ -666,21 +678,21 @@ const AddModal = props => {
PeShape
:
'树形模态'
,
PeShape
:
'树形模态'
,
All1
:
true
,
All1
:
true
,
AllID1
:
true
,
AllID1
:
true
,
guolv
:
fals
e
,
guolv
:
tru
e
,
choose
:
fals
e
,
choose
:
tru
e
,
});
});
setGl
(
fals
e
);
setGl
(
tru
e
);
setCho
(
fals
e
);
setCho
(
tru
e
);
}
else
{
}
else
{
form
.
setFieldsValue
({
form
.
setFieldsValue
({
PeShape
:
'树形模态'
,
PeShape
:
'树形模态'
,
All1
:
true
,
All1
:
true
,
AllID1
:
true
,
AllID1
:
true
,
guolv
:
tru
e
,
guolv
:
fals
e
,
choose
:
fals
e
,
choose
:
tru
e
,
});
});
setGl
(
tru
e
);
setGl
(
fals
e
);
setCho
(
fals
e
);
setCho
(
tru
e
);
}
}
}
else
{
}
else
{
if
(
tree
[
1
]
==
'站点'
)
{
if
(
tree
[
1
]
==
'站点'
)
{
...
@@ -688,21 +700,21 @@ const AddModal = props => {
...
@@ -688,21 +700,21 @@ const AddModal = props => {
PeShape
:
'树形模态'
,
PeShape
:
'树形模态'
,
All1
:
true
,
All1
:
true
,
AllID1
:
true
,
AllID1
:
true
,
guolv
:
fals
e
,
guolv
:
tru
e
,
choose
:
tru
e
,
choose
:
fals
e
,
});
});
setGl
(
fals
e
);
setGl
(
tru
e
);
setCho
(
tru
e
);
setCho
(
fals
e
);
}
else
{
}
else
{
form
.
setFieldsValue
({
form
.
setFieldsValue
({
PeShape
:
'树形模态'
,
PeShape
:
'树形模态'
,
All1
:
true
,
All1
:
true
,
AllID1
:
true
,
AllID1
:
true
,
guolv
:
tru
e
,
guolv
:
fals
e
,
choose
:
tru
e
,
choose
:
fals
e
,
});
});
setGl
(
tru
e
);
setGl
(
fals
e
);
setCho
(
tru
e
);
setCho
(
fals
e
);
}
}
}
}
setPopeleShape
(
'树形模态'
);
setPopeleShape
(
'树形模态'
);
...
@@ -718,11 +730,11 @@ const AddModal = props => {
...
@@ -718,11 +730,11 @@ const AddModal = props => {
Config
:
pepole
[
0
],
Config
:
pepole
[
0
],
});
});
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
form
.
setFieldsValue
({
choose
:
false
});
setCho
(
false
);
}
else
{
form
.
setFieldsValue
({
choose
:
true
});
form
.
setFieldsValue
({
choose
:
true
});
setCho
(
true
);
setCho
(
true
);
}
else
{
form
.
setFieldsValue
({
choose
:
false
});
setCho
(
false
);
}
}
setPopeleShape
(
'下拉框'
);
setPopeleShape
(
'下拉框'
);
}
}
...
@@ -1231,23 +1243,23 @@ const AddModal = props => {
...
@@ -1231,23 +1243,23 @@ const AddModal = props => {
console
.
log
(
site
[
1
]);
console
.
log
(
site
[
1
]);
if
(
site
[
0
]
==
'本人'
)
{
if
(
site
[
0
]
==
'本人'
)
{
if
(
aa
.
Config
.
endsWith
(
'.n'
))
{
if
(
aa
.
Config
.
endsWith
(
'.n'
))
{
form
.
setFieldsValue
({
pepole
:
true
,
choose
:
false
});
setPep
(
true
);
setCho
(
false
);
}
else
{
form
.
setFieldsValue
({
pepole
:
true
,
choose
:
true
});
form
.
setFieldsValue
({
pepole
:
true
,
choose
:
true
});
setPep
(
true
);
setPep
(
true
);
setCho
(
true
);
setCho
(
true
);
}
else
{
form
.
setFieldsValue
({
pepole
:
true
,
choose
:
false
});
setPep
(
true
);
setCho
(
false
);
}
}
}
else
{
}
else
{
if
(
aa
.
Config
.
endsWith
(
'.n'
))
{
if
(
aa
.
Config
.
endsWith
(
'.n'
))
{
form
.
setFieldsValue
({
pepole
:
false
,
choose
:
false
});
setPep
(
false
);
setCho
(
false
);
}
else
{
form
.
setFieldsValue
({
pepole
:
false
,
choose
:
true
});
form
.
setFieldsValue
({
pepole
:
false
,
choose
:
true
});
setPep
(
false
);
setPep
(
false
);
setCho
(
true
);
setCho
(
true
);
}
else
{
form
.
setFieldsValue
({
pepole
:
false
,
choose
:
false
});
setPep
(
false
);
setCho
(
false
);
}
}
}
}
break
;
break
;
...
@@ -1296,7 +1308,7 @@ const AddModal = props => {
...
@@ -1296,7 +1308,7 @@ const AddModal = props => {
case
'选择器'
:
case
'选择器'
:
console
.
log
(
aa
.
Config
);
console
.
log
(
aa
.
Config
);
let
sele
=
aa
.
Config
.
split
(
'.'
);
let
sele
=
aa
.
Config
.
split
(
'.'
);
if
(
sele
[
1
])
{
if
(
sele
[
1
]
&&
sele
[
1
]
!=
'n'
)
{
form
.
setFieldsValue
({
form
.
setFieldsValue
({
Association
:
true
,
Association
:
true
,
farter
:
sele
[
0
],
farter
:
sele
[
0
],
...
@@ -1311,6 +1323,13 @@ const AddModal = props => {
...
@@ -1311,6 +1323,13 @@ const AddModal = props => {
});
});
setCse
(
false
);
setCse
(
false
);
}
}
if
(
aa
.
Config
.
endsWith
(
'.n'
))
{
form
.
setFieldsValue
({
choose
:
true
});
setCho
(
true
);
}
else
{
form
.
setFieldsValue
({
choose
:
false
});
setCho
(
false
);
}
break
;
break
;
case
'人员选择器'
:
case
'人员选择器'
:
let
pepole
=
aa
.
Config
.
split
(
'.'
);
let
pepole
=
aa
.
Config
.
split
(
'.'
);
...
@@ -1336,11 +1355,11 @@ const AddModal = props => {
...
@@ -1336,11 +1355,11 @@ const AddModal = props => {
});
});
}
}
if
(
aa
.
endsWith
(
'.n'
))
{
if
(
aa
.
endsWith
(
'.n'
))
{
form
.
setFieldsValue
({
choose
:
false
});
setCho
(
false
);
}
else
{
form
.
setFieldsValue
({
choose
:
true
});
form
.
setFieldsValue
({
choose
:
true
});
setCho
(
true
);
setCho
(
true
);
}
else
{
form
.
setFieldsValue
({
choose
:
false
});
setCho
(
false
);
}
}
setPopeleShape
(
'分组模态'
);
setPopeleShape
(
'分组模态'
);
}
else
if
(
pepole
[
0
]
==
'全部ID'
)
{
}
else
if
(
pepole
[
0
]
==
'全部ID'
)
{
...
@@ -1364,11 +1383,11 @@ const AddModal = props => {
...
@@ -1364,11 +1383,11 @@ const AddModal = props => {
});
});
}
}
if
(
aa
.
Config
.
endsWith
(
'.n'
))
{
if
(
aa
.
Config
.
endsWith
(
'.n'
))
{
form
.
setFieldsValue
({
choose
:
false
});
setCho
(
false
);
}
else
{
form
.
setFieldsValue
({
choose
:
true
});
form
.
setFieldsValue
({
choose
:
true
});
setCho
(
true
);
setCho
(
true
);
}
else
{
form
.
setFieldsValue
({
choose
:
false
});
setCho
(
false
);
}
}
setPopeleShape
(
'分组模态'
);
setPopeleShape
(
'分组模态'
);
}
else
if
(
pepole
[
0
]
==
'tree'
)
{
}
else
if
(
pepole
[
0
]
==
'tree'
)
{
...
@@ -1383,21 +1402,21 @@ const AddModal = props => {
...
@@ -1383,21 +1402,21 @@ const AddModal = props => {
PeShape
:
'树形模态'
,
PeShape
:
'树形模态'
,
All1
:
true
,
All1
:
true
,
AllID1
:
true
,
AllID1
:
true
,
guolv
:
fals
e
,
guolv
:
tru
e
,
choose
:
fals
e
,
choose
:
tru
e
,
});
});
setGl
(
fals
e
);
setGl
(
tru
e
);
setCho
(
fals
e
);
setCho
(
tru
e
);
}
else
{
}
else
{
form
.
setFieldsValue
({
form
.
setFieldsValue
({
PeShape
:
'树形模态'
,
PeShape
:
'树形模态'
,
All1
:
true
,
All1
:
true
,
AllID1
:
true
,
AllID1
:
true
,
guolv
:
tru
e
,
guolv
:
fals
e
,
choose
:
fals
e
,
choose
:
tru
e
,
});
});
setGl
(
tru
e
);
setGl
(
fals
e
);
setCho
(
fals
e
);
setCho
(
tru
e
);
}
}
}
else
{
}
else
{
if
(
tree
[
1
]
==
'站点'
)
{
if
(
tree
[
1
]
==
'站点'
)
{
...
@@ -1405,21 +1424,21 @@ const AddModal = props => {
...
@@ -1405,21 +1424,21 @@ const AddModal = props => {
PeShape
:
'树形模态'
,
PeShape
:
'树形模态'
,
All1
:
true
,
All1
:
true
,
AllID1
:
true
,
AllID1
:
true
,
guolv
:
fals
e
,
guolv
:
tru
e
,
choose
:
tru
e
,
choose
:
fals
e
,
});
});
setGl
(
fals
e
);
setGl
(
tru
e
);
setCho
(
tru
e
);
setCho
(
fals
e
);
}
else
{
}
else
{
form
.
setFieldsValue
({
form
.
setFieldsValue
({
PeShape
:
'树形模态'
,
PeShape
:
'树形模态'
,
All1
:
true
,
All1
:
true
,
AllID1
:
true
,
AllID1
:
true
,
guolv
:
tru
e
,
guolv
:
fals
e
,
choose
:
tru
e
,
choose
:
fals
e
,
});
});
setGl
(
tru
e
);
setGl
(
fals
e
);
setCho
(
tru
e
);
setCho
(
fals
e
);
}
}
}
}
setPopeleShape
(
'树形模态'
);
setPopeleShape
(
'树形模态'
);
...
@@ -1435,11 +1454,11 @@ const AddModal = props => {
...
@@ -1435,11 +1454,11 @@ const AddModal = props => {
Config
:
pepole
[
0
],
Config
:
pepole
[
0
],
});
});
if
(
aa
.
Config
.
endsWith
(
'.n'
))
{
if
(
aa
.
Config
.
endsWith
(
'.n'
))
{
form
.
setFieldsValue
({
choose
:
false
});
setCho
(
false
);
}
else
{
form
.
setFieldsValue
({
choose
:
true
});
form
.
setFieldsValue
({
choose
:
true
});
setCho
(
true
);
setCho
(
true
);
}
else
{
form
.
setFieldsValue
({
choose
:
false
});
setCho
(
false
);
}
}
setPopeleShape
(
'下拉框'
);
setPopeleShape
(
'下拉框'
);
}
}
...
@@ -1555,23 +1574,23 @@ const AddModal = props => {
...
@@ -1555,23 +1574,23 @@ const AddModal = props => {
console
.
log
(
site
[
1
]);
console
.
log
(
site
[
1
]);
if
(
site
[
0
]
==
'本人'
)
{
if
(
site
[
0
]
==
'本人'
)
{
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
form
.
setFieldsValue
({
pepole
:
true
,
choose
:
false
});
setPep
(
true
);
setCho
(
false
);
}
else
{
form
.
setFieldsValue
({
pepole
:
true
,
choose
:
true
});
form
.
setFieldsValue
({
pepole
:
true
,
choose
:
true
});
setPep
(
true
);
setPep
(
true
);
setCho
(
true
);
setCho
(
true
);
}
else
{
form
.
setFieldsValue
({
pepole
:
true
,
choose
:
false
});
setPep
(
true
);
setCho
(
false
);
}
}
}
else
{
}
else
{
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
form
.
setFieldsValue
({
pepole
:
false
,
choose
:
false
});
setPep
(
false
);
setCho
(
false
);
}
else
{
form
.
setFieldsValue
({
pepole
:
false
,
choose
:
true
});
form
.
setFieldsValue
({
pepole
:
false
,
choose
:
true
});
setPep
(
false
);
setPep
(
false
);
setCho
(
true
);
setCho
(
true
);
}
else
{
form
.
setFieldsValue
({
pepole
:
false
,
choose
:
false
});
setPep
(
false
);
setCho
(
false
);
}
}
}
}
break
;
break
;
...
@@ -1638,7 +1657,7 @@ const AddModal = props => {
...
@@ -1638,7 +1657,7 @@ const AddModal = props => {
break
;
break
;
case
'选择器'
:
case
'选择器'
:
let
sele
=
res
[
0
].
data
.
root
.
Config
.
split
(
'.'
);
let
sele
=
res
[
0
].
data
.
root
.
Config
.
split
(
'.'
);
if
(
sele
[
1
])
{
if
(
sele
[
1
]
&&
sele
[
1
]
!=
'n'
)
{
form
.
setFieldsValue
({
form
.
setFieldsValue
({
Association
:
true
,
Association
:
true
,
farter
:
sele
[
0
],
farter
:
sele
[
0
],
...
@@ -1653,6 +1672,13 @@ const AddModal = props => {
...
@@ -1653,6 +1672,13 @@ const AddModal = props => {
});
});
setCse
(
false
);
setCse
(
false
);
}
}
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
form
.
setFieldsValue
({
choose
:
true
});
setCho
(
true
);
}
else
{
form
.
setFieldsValue
({
choose
:
false
});
setCho
(
false
);
}
break
;
break
;
case
'人员选择器'
:
case
'人员选择器'
:
let
pepole
=
res
[
0
].
data
.
root
.
Config
.
split
(
'.'
);
let
pepole
=
res
[
0
].
data
.
root
.
Config
.
split
(
'.'
);
...
@@ -1678,11 +1704,11 @@ const AddModal = props => {
...
@@ -1678,11 +1704,11 @@ const AddModal = props => {
});
});
}
}
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
form
.
setFieldsValue
({
choose
:
false
});
setCho
(
false
);
}
else
{
form
.
setFieldsValue
({
choose
:
true
});
form
.
setFieldsValue
({
choose
:
true
});
setCho
(
true
);
setCho
(
true
);
}
else
{
form
.
setFieldsValue
({
choose
:
false
});
setCho
(
false
);
}
}
setPopeleShape
(
'分组模态'
);
setPopeleShape
(
'分组模态'
);
}
else
if
(
pepole
[
0
]
==
'全部ID'
)
{
}
else
if
(
pepole
[
0
]
==
'全部ID'
)
{
...
@@ -1706,11 +1732,11 @@ const AddModal = props => {
...
@@ -1706,11 +1732,11 @@ const AddModal = props => {
});
});
}
}
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
form
.
setFieldsValue
({
choose
:
false
});
setCho
(
false
);
}
else
{
form
.
setFieldsValue
({
choose
:
true
});
form
.
setFieldsValue
({
choose
:
true
});
setCho
(
true
);
setCho
(
true
);
}
else
{
form
.
setFieldsValue
({
choose
:
false
});
setCho
(
false
);
}
}
setPopeleShape
(
'分组模态'
);
setPopeleShape
(
'分组模态'
);
}
else
if
(
pepole
[
0
]
==
'tree'
)
{
}
else
if
(
pepole
[
0
]
==
'tree'
)
{
...
@@ -1725,21 +1751,21 @@ const AddModal = props => {
...
@@ -1725,21 +1751,21 @@ const AddModal = props => {
PeShape
:
'树形模态'
,
PeShape
:
'树形模态'
,
All1
:
true
,
All1
:
true
,
AllID1
:
true
,
AllID1
:
true
,
guolv
:
fals
e
,
guolv
:
tru
e
,
choose
:
fals
e
,
choose
:
tru
e
,
});
});
setGl
(
fals
e
);
setGl
(
tru
e
);
setCho
(
fals
e
);
setCho
(
tru
e
);
}
else
{
}
else
{
form
.
setFieldsValue
({
form
.
setFieldsValue
({
PeShape
:
'树形模态'
,
PeShape
:
'树形模态'
,
All1
:
true
,
All1
:
true
,
AllID1
:
true
,
AllID1
:
true
,
guolv
:
tru
e
,
guolv
:
fals
e
,
choose
:
fals
e
,
choose
:
tru
e
,
});
});
setGl
(
tru
e
);
setGl
(
fals
e
);
setCho
(
fals
e
);
setCho
(
tru
e
);
}
}
}
else
{
}
else
{
if
(
tree
[
1
]
==
'站点'
)
{
if
(
tree
[
1
]
==
'站点'
)
{
...
@@ -1747,21 +1773,21 @@ const AddModal = props => {
...
@@ -1747,21 +1773,21 @@ const AddModal = props => {
PeShape
:
'树形模态'
,
PeShape
:
'树形模态'
,
All1
:
true
,
All1
:
true
,
AllID1
:
true
,
AllID1
:
true
,
guolv
:
fals
e
,
guolv
:
tru
e
,
choose
:
tru
e
,
choose
:
fals
e
,
});
});
setGl
(
fals
e
);
setGl
(
tru
e
);
setCho
(
tru
e
);
setCho
(
fals
e
);
}
else
{
}
else
{
form
.
setFieldsValue
({
form
.
setFieldsValue
({
PeShape
:
'树形模态'
,
PeShape
:
'树形模态'
,
All1
:
true
,
All1
:
true
,
AllID1
:
true
,
AllID1
:
true
,
guolv
:
tru
e
,
guolv
:
fals
e
,
choose
:
tru
e
,
choose
:
fals
e
,
});
});
setGl
(
tru
e
);
setGl
(
fals
e
);
setCho
(
tru
e
);
setCho
(
fals
e
);
}
}
}
}
setPopeleShape
(
'树形模态'
);
setPopeleShape
(
'树形模态'
);
...
@@ -1777,11 +1803,11 @@ const AddModal = props => {
...
@@ -1777,11 +1803,11 @@ const AddModal = props => {
Config
:
pepole
[
0
],
Config
:
pepole
[
0
],
});
});
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
form
.
setFieldsValue
({
choose
:
false
});
setCho
(
false
);
}
else
{
form
.
setFieldsValue
({
choose
:
true
});
form
.
setFieldsValue
({
choose
:
true
});
setCho
(
true
);
setCho
(
true
);
}
else
{
form
.
setFieldsValue
({
choose
:
false
});
setCho
(
false
);
}
}
setPopeleShape
(
'下拉框'
);
setPopeleShape
(
'下拉框'
);
}
}
...
@@ -1859,7 +1885,7 @@ const AddModal = props => {
...
@@ -1859,7 +1885,7 @@ const AddModal = props => {
:
`
${
obj
.
tableName
}
`
;
:
`
${
obj
.
tableName
}
`
;
break
;
break
;
case
'站点选择器'
:
case
'站点选择器'
:
data
[
0
].
Config
=
pep
?
`本人
${
cho
?
'
'
:
'.n'
}
`
:
`全部
${
cho
?
''
:
'.n
'
}
`
;
data
[
0
].
Config
=
pep
?
`本人
${
cho
?
'
.n'
:
''
}
`
:
`全部
${
cho
?
'.n'
:
'
'
}
`
;
break
;
break
;
case
'业务选择器'
:
case
'业务选择器'
:
if
(
obj
.
fieldName
.
endsWith
(
'.n'
))
{
if
(
obj
.
fieldName
.
endsWith
(
'.n'
))
{
...
@@ -1903,41 +1929,44 @@ const AddModal = props => {
...
@@ -1903,41 +1929,44 @@ const AddModal = props => {
break
;
break
;
case
'选择器'
:
case
'选择器'
:
if
(
cse
)
{
if
(
cse
)
{
let
str
=
`
${
obj
.
farter
}
.
${
obj
.
farterData
}
`
;
let
str
=
cho
?
`
${
obj
.
farter
}
.
${
obj
.
farterData
}
.n`
:
`
${
obj
.
farter
}
.
${
obj
.
farterData
}
`
;
data
[
0
].
Config
=
str
;
data
[
0
].
Config
=
str
;
}
else
{
}
else
{
data
[
0
].
Config
=
obj
.
Config
?
obj
.
Config
:
''
;
let
str
=
cho
?
`
${
obj
.
Config
}
.n`
:
`
${
obj
.
Config
}
`
;
data
[
0
].
Config
=
str
;
}
}
break
;
break
;
case
'人员选择器'
:
case
'人员选择器'
:
if
(
popeleShape
==
'分组模态'
)
{
if
(
popeleShape
==
'分组模态'
)
{
if
(
checkboxAllID1
==
true
)
{
if
(
checkboxAllID1
==
true
)
{
if
(
obj
.
ConfigName
)
{
if
(
obj
.
ConfigName
)
{
let
str
=
cho
?
`全部ID.
${
obj
.
ConfigName
}
`
:
`全部ID.
${
obj
.
ConfigName
}
.n
`
;
let
str
=
cho
?
`全部ID.
${
obj
.
ConfigName
}
.n`
:
`全部ID.
${
obj
.
ConfigName
}
`
;
data
[
0
].
Config
=
str
;
data
[
0
].
Config
=
str
;
}
else
{
}
else
{
let
str
=
cho
?
`全部ID
`
:
`全部ID.n
`
;
let
str
=
cho
?
`全部ID
.n`
:
`全部ID
`
;
data
[
0
].
Config
=
str
;
data
[
0
].
Config
=
str
;
}
}
}
else
{
}
else
{
if
(
obj
.
ConfigName
)
{
if
(
obj
.
ConfigName
)
{
let
str
=
cho
?
`全部.
${
obj
.
ConfigName
}
`
:
`全部.
${
obj
.
ConfigName
}
.n
`
;
let
str
=
cho
?
`全部.
${
obj
.
ConfigName
}
.n`
:
`全部.
${
obj
.
ConfigName
}
`
;
data
[
0
].
Config
=
str
;
data
[
0
].
Config
=
str
;
}
else
{
}
else
{
let
str
=
cho
?
`全部
`
:
`全部.n
`
;
let
str
=
cho
?
`全部
.n`
:
`全部
`
;
data
[
0
].
Config
=
str
;
data
[
0
].
Config
=
str
;
}
}
}
}
}
else
if
(
popeleShape
==
'下拉框'
)
{
}
else
if
(
popeleShape
==
'下拉框'
)
{
let
str
=
cho
?
`
${
obj
.
Config
}
`
:
`
${
obj
.
Config
}
.n
`
;
let
str
=
cho
?
`
${
obj
.
Config
}
.n`
:
`
${
obj
.
Config
}
`
;
console
.
log
(
str
);
console
.
log
(
str
);
data
[
0
].
Config
=
str
;
data
[
0
].
Config
=
str
;
}
else
if
(
popeleShape
==
'树形模态'
)
{
}
else
if
(
popeleShape
==
'树形模态'
)
{
if
(
gl
)
{
if
(
gl
)
{
let
str
=
cho
?
`tree.
单选|非站点`
:
`tree.多选|非
站点`
;
let
str
=
cho
?
`tree.
多选|站点`
:
`tree.单选|
站点`
;
data
[
0
].
Config
=
str
;
data
[
0
].
Config
=
str
;
}
else
{
}
else
{
let
str
=
cho
?
`tree.
单选|站点`
:
`tree.多选|
站点`
;
let
str
=
cho
?
`tree.
多选|非站点`
:
`tree.单选|非
站点`
;
data
[
0
].
Config
=
str
;
data
[
0
].
Config
=
str
;
}
}
}
}
...
@@ -2000,7 +2029,7 @@ const AddModal = props => {
...
@@ -2000,7 +2029,7 @@ const AddModal = props => {
setCheckboxAllID1
(
''
);
setCheckboxAllID1
(
''
);
setSynchronization
(
false
);
setSynchronization
(
false
);
setFlag
(
false
);
setFlag
(
false
);
setPopeleShape
(
'
下拉框
'
);
setPopeleShape
(
''
);
setHide
(
true
);
setHide
(
true
);
if
(
i
==
1.14
)
{
if
(
i
==
1.14
)
{
console
.
log
(
valueData
);
console
.
log
(
valueData
);
...
@@ -2224,20 +2253,21 @@ const AddModal = props => {
...
@@ -2224,20 +2253,21 @@ const AddModal = props => {
};
};
const
popeleShapeOnChange
=
e
=>
{
const
popeleShapeOnChange
=
e
=>
{
form
.
setFieldsValue
({
ConfigName
:
''
,
Config
:
''
});
console
.
log
(
e
);
console
.
log
(
e
);
setPopeleShape
(
e
.
target
.
value
);
setPopeleShape
(
e
.
target
.
value
);
let
aa
=
form
.
getFieldsValue
().
ConfigName
;
//
let aa = form.getFieldsValue().ConfigName;
let
bb
=
form
.
getFieldsValue
().
Config
;
//
let bb = form.getFieldsValue().Config;
if
(
e
.
target
.
value
==
'分组模态'
)
{
if
(
e
.
target
.
value
==
'分组模态'
)
{
if
(
bb
||
bb
==
''
||
bb
==
undefined
)
{
//
if (bb || bb == '' || bb == undefined) {
form
.
setFieldsValue
({
ConfigName
:
bb
});
//
form.setFieldsValue({ ConfigName: bb });
}
//
}
setHide
(
false
);
setHide
(
false
);
setFlag
(
true
);
setFlag
(
true
);
}
else
if
(
e
.
target
.
value
==
'下拉框'
)
{
}
else
if
(
e
.
target
.
value
==
'下拉框'
)
{
if
(
aa
||
aa
==
''
||
bb
==
undefined
)
{
//
if (aa || aa == '' || bb == undefined) {
form
.
setFieldsValue
({
Config
:
aa
});
//
form.setFieldsValue({ Config: aa });
}
//
}
setHide
(
true
);
setHide
(
true
);
setFlag
(
false
);
setFlag
(
false
);
setCheckboxAllID1
(
false
);
setCheckboxAllID1
(
false
);
...
@@ -2564,19 +2594,37 @@ const AddModal = props => {
...
@@ -2564,19 +2594,37 @@ const AddModal = props => {
case
'选择器'
:
case
'选择器'
:
return
(
return
(
<>
<>
<
Item
<
Item
labelCol=
{
{
span
:
4
}
}
label=
"配置"
>
label=
"配置"
<
div
style=
{
{
display
:
'inline-block'
,
marginRight
:
'10px'
}
}
>
name=
"Association"
<
Item
labelCol=
{
{
span
:
4
}
}
name=
"Association"
// rules=
{[{
required
:
true
,
message
:
'请输入数据字典名称'
}]}
labelCol=
{
{
span
:
4
}
}
>
style=
{
{
marginBottom
:
'0'
}
}
<
Checkbox
>
checked=
{
cse
}
<
Checkbox
onChange=
{
changeCse
}
checked=
{
cse
}
style=
{
{
marginBottom
:
'0'
}
}
onChange=
{
changeCse
}
>
style=
{
{
marginBottom
:
'0'
}
}
关联选择器
>
</
Checkbox
>
关联选择器
</
Checkbox
>
</
Item
>
</
div
>
<
div
style=
{
{
display
:
'inline-block'
,
marginRight
:
'10px'
}
}
>
<
Item
name=
"choose"
labelCol=
{
{
span
:
4
}
}
style=
{
{
marginBottom
:
'0'
}
}
>
<
Checkbox
checked=
{
cho
}
onChange=
{
changeChoose
}
style=
{
{
marginBottom
:
'0'
}
}
>
多选
</
Checkbox
>
</
Item
>
</
div
>
</
Item
>
</
Item
>
{
cse
?
(
{
cse
?
(
<
Row
>
<
Row
>
...
@@ -2603,7 +2651,7 @@ const AddModal = props => {
...
@@ -2603,7 +2651,7 @@ const AddModal = props => {
</
Row
>
</
Row
>
)
:
(
)
:
(
<
Item
label=
"数据字典"
name=
"Config"
labelCol=
{
{
span
:
4
}
}
>
<
Item
label=
"数据字典"
name=
"Config"
labelCol=
{
{
span
:
4
}
}
>
<
TextArea
allowClear
placeholder=
"请输入数据字典名称"
/>
<
Input
allowClear
placeholder=
"请输入数据字典名称"
/>
</
Item
>
</
Item
>
)
}
)
}
</>
</>
...
@@ -2659,7 +2707,7 @@ const AddModal = props => {
...
@@ -2659,7 +2707,7 @@ const AddModal = props => {
onChange=
{
changeChoose
}
onChange=
{
changeChoose
}
style=
{
{
marginBottom
:
'0'
}
}
style=
{
{
marginBottom
:
'0'
}
}
>
>
单
选
多
选
</
Checkbox
>
</
Checkbox
>
</
Item
>
</
Item
>
</
div
>
</
div
>
...
@@ -2727,31 +2775,7 @@ const AddModal = props => {
...
@@ -2727,31 +2775,7 @@ const AddModal = props => {
case
'人员选择器'
:
case
'人员选择器'
:
return
(
return
(
<>
<>
<
Item
<
Item
labelCol=
{
{
span
:
4
}
}
label=
"交互方式"
name=
"PeShape"
>
labelCol=
{
{
span
:
4
}
}
label=
"展示形态"
name=
"PeShape"
// label=
{
// <div>
// <Tooltip
// title=
{
// <>
// <span>弹窗显示人员所属机构</span>
// <Image width=
{200}
src=
{
AllImage
}
/>
//
</>
//
}
// >
// <InfoCircleOutlined
// style=
{{
// color: 'rgb(24 144 255)',
// marginRight: '5px',
//
}}
// />
// </Tooltip>
// <span>人员选择器形态</span>
// </div>
//
}
>
<
div
style=
{
{
display
:
'inline-block'
,
marginRight
:
'10px'
}
}
>
<
div
style=
{
{
display
:
'inline-block'
,
marginRight
:
'10px'
}
}
>
<
Radio
.
Group
<
Radio
.
Group
style=
{
{
marginTop
:
'0.3rem'
}
}
style=
{
{
marginTop
:
'0.3rem'
}
}
...
@@ -2759,35 +2783,50 @@ const AddModal = props => {
...
@@ -2759,35 +2783,50 @@ const AddModal = props => {
onChange=
{
popeleShapeOnChange
}
onChange=
{
popeleShapeOnChange
}
>
>
<
Radio
value=
"下拉框"
>
下拉框
</
Radio
>
<
Radio
value=
"下拉框"
>
下拉框
</
Radio
>
<
Radio
value=
"分组模态"
>
分组模态
</
Radio
>
<
Radio
value=
"分组模态"
>
<
Radio
value=
"树形模态"
>
树形模态
</
Radio
>
{
' '
}
<
Tooltip
title=
{
<>
<
span
>
分组模态显示人员所属机构
</
span
>
<
Image
width=
{
200
}
src=
{
AllImage
}
/>
</>
}
>
<
InfoCircleOutlined
style=
{
{
color
:
'rgb(24 144 255)'
,
marginRight
:
'5px'
,
marginTop
:
'-8px'
,
}
}
/>
</
Tooltip
>
分组模态
</
Radio
>
<
Radio
value=
"树形模态"
>
<
Tooltip
title=
{
<>
<
span
>
树形模态显示部门树
</
span
>
<
Image
width=
{
200
}
src=
{
TreeImage
}
/>
</>
}
>
<
InfoCircleOutlined
style=
{
{
color
:
'rgb(24 144 255)'
,
marginRight
:
'5px'
,
marginTop
:
'-8px'
,
}
}
/>
</
Tooltip
>
树形模态
</
Radio
>
</
Radio
.
Group
>
</
Radio
.
Group
>
</
div
>
</
div
>
</
Item
>
</
Item
>
<
Item
<
Item
labelCol=
{
{
span
:
4
}
}
label=
"配置"
>
labelCol=
{
{
span
:
4
}
}
// label=
{
// <div>
// <Tooltip
// title=
{
// <>
// <span>弹窗显示人员所属机构</span>
// <Image width=
{200}
src=
{
AllImage
}
/>
//
</>
//
}
// >
// <InfoCircleOutlined
// style=
{{
// color: 'rgb(24 144 255)',
// marginRight: '5px',
//
}}
// />
// </Tooltip>
// <span>配置</span>
// </div>
//
}
label
=
"配置"
>
{
/* <div style={{ display: 'inline-block', marginRight: '10px' }}>
{
/* <div style={{ display: 'inline-block', marginRight: '10px' }}>
<Item name="All1" style={{ marginBottom: '0' }}>
<Item name="All1" style={{ marginBottom: '0' }}>
<Checkbox
<Checkbox
...
@@ -2806,11 +2845,11 @@ const AddModal = props => {
...
@@ -2806,11 +2845,11 @@ const AddModal = props => {
onChange=
{
changeChoose
}
onChange=
{
changeChoose
}
style=
{
{
marginBottom
:
'0'
}
}
style=
{
{
marginBottom
:
'0'
}
}
>
>
单
选
多
选
</
Checkbox
>
</
Checkbox
>
</
Item
>
</
Item
>
</
div
>
</
div
>
<
div
style=
{
{
display
:
'inline-block'
,
marginRight
:
'10px'
}
}
>
{
/*
<div style={{ display: 'inline-block', marginRight: '10px' }}>
<Item name="AllID1" style={{ marginBottom: '0' }}>
<Item name="AllID1" style={{ marginBottom: '0' }}>
<Checkbox
<Checkbox
checked={checkboxAllID1}
checked={checkboxAllID1}
...
@@ -2821,7 +2860,7 @@ const AddModal = props => {
...
@@ -2821,7 +2860,7 @@ const AddModal = props => {
ID存储
ID存储
</Checkbox>
</Checkbox>
</Item>
</Item>
</
div
>
</div>
*/
}
</
Item
>
</
Item
>
{
(()
=>
{
{
(()
=>
{
switch
(
flag
)
{
switch
(
flag
)
{
...
@@ -2855,16 +2894,14 @@ const AddModal = props => {
...
@@ -2855,16 +2894,14 @@ const AddModal = props => {
case
1
:
case
1
:
return
(
return
(
<>
<>
<
Item
label=
"过滤"
name=
"Config"
labelCol=
{
{
span
:
4
}
}
>
<
Item
label=
"过滤"
name=
"guolv"
labelCol=
{
{
span
:
4
}
}
>
<
Item
name=
"guolv"
style=
{
{
marginBottom
:
'0'
}
}
>
<
Checkbox
<
Checkbox
checked=
{
gl
}
checked=
{
gl
}
onChange=
{
changeGl
}
onChange=
{
changeGl
}
style=
{
{
marginBottom
:
'0'
}
}
style=
{
{
marginBottom
:
'0'
}
}
>
>
本人站点
非站点
</
Checkbox
>
</
Checkbox
>
</
Item
>
</
Item
>
</
Item
>
</>
</>
);
);
...
@@ -2958,7 +2995,6 @@ const AddModal = props => {
...
@@ -2958,7 +2995,6 @@ const AddModal = props => {
case
'城市选择器'
:
case
'城市选择器'
:
case
'附件'
:
case
'附件'
:
case
'可预览附件'
:
case
'可预览附件'
:
case
'可预览图片'
:
case
'录音'
:
case
'录音'
:
case
'视频'
:
case
'视频'
:
case
'设备选择'
:
case
'设备选择'
:
...
...
src/pages/productCenter/webConfig/components/ParmarModal.jsx
0 → 100644
View file @
7907de55
import
React
,
{
useEffect
}
from
'react'
;
import
{
Modal
,
Form
,
Button
,
Input
,
Space
}
from
'antd'
;
import
{
MinusCircleOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
const
ParmarModal
=
props
=>
{
const
{
pageUrl
,
visible
,
handleCancel
,
parmarCallBack
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
useEffect
(()
=>
{
if
(
visible
)
{
// 给url通过字符串分割成表单需要的数据形式
let
parma
=
pageUrl
.
split
(
'|'
)[
1
]
?.
split
(
'&'
)
?.
map
(
item
=>
({
key
:
item
.
split
(
'='
)[
0
],
value
:
item
.
split
(
'='
)[
1
]
}));
form
.
setFieldsValue
({
parmars
:
parma
});
}
else
{
// 关闭弹窗清除表单数据
form
.
resetFields
();
}
},
[
visible
]);
// 保存
const
onFinish
=
()
=>
{
form
.
validateFields
().
then
(
validate
=>
{
if
(
validate
)
{
let
parma
=
form
.
getFieldValue
(
'parmars'
)
?.
map
(
item
=>
`
${
item
.
key
}
=
${
item
.
value
}
`
)
.
join
(
'&'
);
console
.
log
(
parma
,
'parma'
);
if
(
parma
)
{
parmarCallBack
(
`
${
pageUrl
.
split
(
'|'
)[
0
]}
|
${
parma
}
`
);
}
else
{
parmarCallBack
(
`
${
pageUrl
.
split
(
'|'
)[
0
]}
`
);
}
}
});
};
return
(
<
div
>
<
Modal
title=
"参数配置"
visible=
{
visible
}
onOk=
{
onFinish
}
onCancel=
{
handleCancel
}
maskClosable=
{
false
}
destroyOnClose
centered
>
<
div
style=
{
{
maxHeight
:
'400px'
,
overflowY
:
'scroll'
,
marginBottom
:
'10px'
}
}
>
<
Form
name=
"form"
form=
{
form
}
labelCol=
{
{
span
:
7
}
}
>
<
Form
.
List
name=
"parmars"
>
{
(
fields
,
{
add
,
remove
})
=>
(
<>
{
fields
.
map
(({
key
,
name
,
fieldKey
,
...
restField
})
=>
(
<
Space
key=
{
key
}
style=
{
{
display
:
'flex'
,
marginBottom
:
8
,
justifyContent
:
'center'
}
}
align=
"baseline"
>
<
Form
.
Item
{
...
restField
}
name=
{
[
name
,
'key'
]
}
fieldKey=
{
[
fieldKey
,
'key'
]
}
validateTrigger=
{
[
'onChange'
,
'onBlur'
]
}
rules=
{
[
{
required
:
true
,
message
:
'请填写参数名'
},
{
validator
:
()
=>
{
// 验证参数名不能重复
const
allKey
=
form
.
getFieldsValue
()
.
parmars
.
map
(
item
=>
(
item
?
item
.
key
:
''
));
const
repeatKey
=
new
Set
(
allKey
);
if
(
repeatKey
.
size
!==
allKey
.
length
)
{
return
Promise
.
reject
(
new
Error
(
'参数名重复'
));
}
return
Promise
.
resolve
();
},
},
]
}
>
<
Input
placeholder=
"请填写参数名"
/>
</
Form
.
Item
>
<
Form
.
Item
{
...
restField
}
name=
{
[
name
,
'value'
]
}
fieldKey=
{
[
fieldKey
,
'value'
]
}
rules=
{
[{
required
:
true
,
message
:
'请填写参数'
}]
}
>
<
Input
placeholder=
"请填写参数"
/>
</
Form
.
Item
>
<
MinusCircleOutlined
onClick=
{
()
=>
remove
(
name
)
}
style=
{
{
marginLeft
:
'10px'
,
fontSize
:
'20px'
}
}
/>
</
Space
>
))
}
<
Form
.
Item
>
<
Button
style=
{
{
width
:
'375px'
,
marginLeft
:
'30px'
}
}
type=
"dashed"
onClick=
{
()
=>
add
()
}
block
icon=
{
<
PlusOutlined
/>
}
>
添加参数
</
Button
>
</
Form
.
Item
>
</>
)
}
</
Form
.
List
>
</
Form
>
</
div
>
</
Modal
>
</
div
>
);
};
export
default
ParmarModal
;
src/pages/productCenter/webConfig/components/siteConfigDrawer.js
View file @
7907de55
...
@@ -22,6 +22,7 @@ import WebConfigForm from './webConfigForm';
...
@@ -22,6 +22,7 @@ import WebConfigForm from './webConfigForm';
import
ColorLinear
from
'./ColorLinear'
;
import
ColorLinear
from
'./ColorLinear'
;
import
Upload
from
'@/components/Upload'
;
import
Upload
from
'@/components/Upload'
;
import
styles
from
'./siteConfigDrawer.less'
;
import
styles
from
'./siteConfigDrawer.less'
;
import
ParmarModal
from
'./ParmarModal'
;
const
{
Option
}
=
Select
;
const
{
Option
}
=
Select
;
const
plainOptions
=
[
'搜索'
,
'消息'
,
'反馈'
];
const
plainOptions
=
[
'搜索'
,
'消息'
,
'反馈'
];
const
defaultCheckedList
=
[
'搜索'
,
'消息'
,
'反馈'
];
const
defaultCheckedList
=
[
'搜索'
,
'消息'
,
'反馈'
];
...
@@ -54,6 +55,8 @@ export default props => {
...
@@ -54,6 +55,8 @@ export default props => {
const
[
color
,
setColor
]
=
useState
(
''
);
const
[
color
,
setColor
]
=
useState
(
''
);
const
CheckboxGroup
=
Checkbox
.
Group
;
const
CheckboxGroup
=
Checkbox
.
Group
;
const
[
showAdvanced
,
setShowAdvanced
]
=
useState
(
false
);
// 是否显示高级设置
const
[
showAdvanced
,
setShowAdvanced
]
=
useState
(
false
);
// 是否显示高级设置
const
[
showParmarModal
,
setShowParmarModal
]
=
useState
(
false
);
useEffect
(()
=>
{
useEffect
(()
=>
{
onGetLoginPages
();
onGetLoginPages
();
console
.
log
(
isEdit
);
console
.
log
(
isEdit
);
...
@@ -173,10 +176,20 @@ export default props => {
...
@@ -173,10 +176,20 @@ export default props => {
setColor
(
value
);
setColor
(
value
);
form
.
setFieldsValue
({
headerPrimaryColor
:
value
});
form
.
setFieldsValue
({
headerPrimaryColor
:
value
});
};
};
const
addParama
=
()
=>
{
console
.
log
(
form
.
getFieldValue
(
'loginTemplate'
));
if
(
!
form
.
getFieldValue
(
'loginTemplate'
))
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'请先选择登录模板'
});
return
;
}
setShowParmarModal
(
true
);
};
return
(
return
(
<
Drawer
<
Drawer
title
=
{
isEdit
?
'查看/编辑网站配置'
:
'新增网站'
}
title
=
{
isEdit
?
'查看/编辑网站配置'
:
'新增网站'
}
width
=
{
5
00
}
width
=
{
6
00
}
onClose
=
{
onClose
}
onClose
=
{
onClose
}
visible
=
{
visible
}
visible
=
{
visible
}
destroyOnClose
destroyOnClose
...
@@ -192,7 +205,7 @@ export default props => {
...
@@ -192,7 +205,7 @@ export default props => {
<
Form
<
Form
form
=
{
form
}
form
=
{
form
}
labelCol
=
{{
span
:
5
}}
labelCol
=
{{
span
:
5
}}
wrapperCol
=
{{
span
:
1
8
}}
wrapperCol
=
{{
span
:
1
9
}}
initialValues
=
{{
remember
:
true
}}
initialValues
=
{{
remember
:
true
}}
>
>
<
Form
.
Item
<
Form
.
Item
...
@@ -261,15 +274,24 @@ export default props => {
...
@@ -261,15 +274,24 @@ export default props => {
>
>
<
Input
autoComplete
=
"off"
disabled
=
{
isEdit
}
/
>
<
Input
autoComplete
=
"off"
disabled
=
{
isEdit
}
/
>
<
/Form.Item
>
<
/Form.Item
>
<
Form
.
Item
label
=
"登录模板"
name
=
"loginTemplate"
>
<
Row
>
<
Select
placeholder
=
"请选择登录模板"
>
<
Col
span
=
{
20
}
>
{
loginPages
.
map
(
item
=>
(
<
Form
.
Item
label
=
"登录模板"
name
=
"loginTemplate"
labelCol
=
{{
span
:
6
}}
>
<
Option
value
=
{
item
.
value
}
key
=
{
item
.
value
}
>
<
Select
placeholder
=
"请选择登录模板"
>
{
item
.
value
}
{
loginPages
.
map
(
item
=>
(
<
/Option
>
<
Option
value
=
{
item
.
value
}
key
=
{
item
.
value
}
>
))}
{
item
.
value
}
<
/Select
>
<
/Option
>
<
/Form.Item
>
))}
<
/Select
>
<
/Form.Item
>
<
/Col
>
<
Col
span
=
{
4
}
>
<
Form
.
Item
>
<
Button
onClick
=
{
addParama
}
>
参数管理
<
/Button
>
<
/Form.Item
>
<
/Col
>
<
/Row
>
<
Divider
orientation
=
"left"
style
=
{{
borderTopColor
:
'#99bbe8'
}}
>
<
Divider
orientation
=
"left"
style
=
{{
borderTopColor
:
'#99bbe8'
}}
>
主页配置
主页配置
<
/Divider
>
<
/Divider
>
...
@@ -438,6 +460,15 @@ export default props => {
...
@@ -438,6 +460,15 @@ export default props => {
onSubumit
=
{
colorChange
}
onSubumit
=
{
colorChange
}
handleCancel
=
{()
=>
setDisplayColorPicker
(
false
)}
handleCancel
=
{()
=>
setDisplayColorPicker
(
false
)}
/
>
/
>
<
ParmarModal
pageUrl
=
{
form
.
getFieldValue
(
'loginTemplate'
)}
handleCancel
=
{()
=>
setShowParmarModal
(
false
)}
visible
=
{
showParmarModal
}
parmarCallBack
=
{
url
=>
{
form
.
setFieldsValue
({
loginTemplate
:
url
});
setShowParmarModal
(
false
);
}}
/
>
<
/Drawer
>
<
/Drawer
>
);
);
};
};
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