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
fb0b51c6
Commit
fb0b51c6
authored
Jun 21, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '形态时间选择器'
parent
8cd0fed4
Pipeline
#53564
waiting for manual action with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
824 additions
and
327 deletions
+824
-327
All.png
src/assets/images/title/All.png
+0
-0
part.png
src/assets/images/title/part.png
+0
-0
fieldEditor.jsx
...s/bsmanager/base/tablemanager/filedConfig/fieldEditor.jsx
+824
-327
No files found.
src/assets/images/title/All.png
0 → 100644
View file @
fb0b51c6
This diff was suppressed by a .gitattributes entry.
src/assets/images/title/part.png
0 → 100644
View file @
fb0b51c6
This diff was suppressed by a .gitattributes entry.
src/pages/bsmanager/base/tablemanager/filedConfig/fieldEditor.jsx
View file @
fb0b51c6
...
...
@@ -28,8 +28,10 @@ import {
Col
,
Row
,
TreeSelect
,
Image
,
}
from
'antd'
;
import
AllImage
from
'@/assets/images/title/All.png'
;
import
partImage
from
'@/assets/images/title/part.png'
;
import
{
getField
,
loadTableFields
,
...
...
@@ -39,7 +41,12 @@ import {
}
from
'@/services/tablemanager/tablemanager'
;
import
styles
from
'./index.less'
;
import
VerifyModal
from
'./VerifyModal'
;
import
{
PlusSquareOutlined
,
UnorderedListOutlined
,
FontColorsOutlined
}
from
'@ant-design/icons'
;
import
{
PlusSquareOutlined
,
UnorderedListOutlined
,
FontColorsOutlined
,
InfoCircleOutlined
,
}
from
'@ant-design/icons'
;
import
Tree
from
'@/components/ExpendableTree'
;
const
AddModal
=
props
=>
{
const
{
...
...
@@ -60,51 +67,9 @@ const AddModal = props => {
const
[
verification
,
setVerification
]
=
useState
([]);
const
[
Shape
,
setShape
]
=
useState
(
''
);
const
[
treeSelectValue
,
setTreeSelectValue
]
=
useState
(
undefined
);
const
[
characteristics
,
setCharacteristics
]
=
useState
([
'文本'
,
'数值'
,
'唯一值文本'
,
'多行文本'
,
'编码'
,
'地址'
,
'本人部门'
,
'本人姓名'
,
'本人ID'
,
'选择器'
,
'搜索选择器'
,
'值选择器'
,
'值复选器'
,
'业务选择器'
,
'可编辑值选择器'
,
'平铺值选择器'
,
'站点选择器'
,
'人员选择器'
,
// '人员选择器新',
'城市选择器'
,
'台账选择器'
,
'部门选择器'
,
'附件'
,
'可预览附件'
,
'图片'
,
'可预览图片'
,
'录音'
,
'视频'
,
'日期时间'
,
'日期'
,
'日期月份'
,
'日期年份'
,
'日期周'
,
'时分秒'
,
'设备选择'
,
'坐标控件'
,
'区域控件'
,
'路径控件'
,
'智能抄表'
,
'二维码识别'
,
'设备二维码'
,
'位置坐标'
,
'富文本'
,
]);
const
[
pep
,
setPep
]
=
useState
(
false
);
const
[
cho
,
setCho
]
=
useState
(
false
);
const
[
flag
,
setFlag
]
=
useState
(
false
);
const
[
characteristics1
,
setCharacteristics1
]
=
useState
([
{
...
...
@@ -168,6 +133,7 @@ const AddModal = props => {
const
[
formObj
,
setFormObj
]
=
useState
({
rule
:
[],
numerical
:
''
});
const
[
characterValue
,
setCharacterValue
]
=
useState
(
''
);
const
[
show
,
setShow
]
=
useState
(
'block'
);
const
[
hide
,
setHide
]
=
useState
(
false
);
const
[
pramData
,
setPramData
]
=
useState
({
Unit
:
''
,
ExceptionEvent
:
''
,
...
...
@@ -192,10 +158,13 @@ const AddModal = props => {
const
[
radio1
,
setRadio1
]
=
useState
(
''
);
const
[
radio3
,
setRadio3
]
=
useState
(
''
);
const
[
detail
,
setDetail
]
=
useState
(
''
);
const
[
checkboxAll1
,
setCheckboxAll1
]
=
useState
(
''
);
const
[
checkboxAllID1
,
setCheckboxAllID1
]
=
useState
(
''
);
const
{
TextArea
}
=
Input
;
const
[
form
]
=
Form
.
useForm
();
const
{
Item
}
=
Form
;
const
{
TreeNode
}
=
TreeSelect
;
const
[
timeData
,
setTimeData
]
=
useState
(
''
);
// 提交
const
onSubmit
=
()
=>
{
// 不切换树
...
...
@@ -260,6 +229,14 @@ const AddModal = props => {
?
`
${
obj
.
tableName
}
.
${
obj
.
fieldName
}
`
:
`
${
obj
.
tableName
}
`
;
break
;
case
'站点选择器'
:
console
.
log
(
obj
);
console
.
log
(
obj
.
pepole
);
console
.
log
(
obj
.
choose
);
console
.
log
(
pep
);
console
.
log
(
cho
);
data
[
0
].
Config
=
pep
?
`本人
${
cho
?
''
:
'.n'
}
`
:
`全部
${
cho
?
''
:
'.n'
}
`
;
break
;
case
'业务选择器'
:
if
(
obj
.
fieldName
.
endsWith
(
'.n'
))
{
data
[
0
].
Config
=
obj
.
fieldName
...
...
@@ -293,28 +270,54 @@ const AddModal = props => {
data
[
0
].
Config
=
`
${
data
[
0
].
Config
}
?
${
obj
.
filterName
}
='
${
obj
.
filterValue
}
'`
;
}
break
;
// case '人员选择器':
// if (radio1 == '全部') {
// if (radio3 == '全部ID') {
// if (obj.ConfigName) {
// let str =
// radio == 0 ? `全部ID.${obj.ConfigName}` : `全部ID.${obj.ConfigName}.n`;
// data[0].Config = str;
// } else {
// let str = radio == 0 ? `全部ID` : `全部ID.n`;
// data[0].Config = str;
// }
// } else {
// if (obj.ConfigName) {
// let str = radio == 0 ? `全部.${obj.ConfigName}` : `全部.${obj.ConfigName}.n`;
// data[0].Config = str;
// } else {
// let str = radio == 0 ? `全部` : `全部.n`;
// data[0].Config = str;
// }
// }
// } else {
// let str = radio == 0 ? `${obj.Config}` : `${obj.Config}.n`;
// console.log(str);
// data[0].Config = str;
// }
// break;
case
'人员选择器'
:
if
(
radio1
==
'全部'
)
{
if
(
radio3
==
'全部ID'
)
{
if
(
checkboxAll1
==
true
)
{
if
(
checkboxAllID1
==
true
)
{
if
(
obj
.
ConfigName
)
{
let
str
=
radio
==
0
?
`全部ID.
${
obj
.
ConfigName
}
`
:
`全部ID.
${
obj
.
ConfigName
}
.n`
;
let
str
=
cho
?
`全部ID.
${
obj
.
ConfigName
}
`
:
`全部ID.
${
obj
.
ConfigName
}
.n`
;
data
[
0
].
Config
=
str
;
}
else
{
let
str
=
radio
==
0
?
`全部ID`
:
`全部ID.n`
;
let
str
=
cho
?
`全部ID`
:
`全部ID.n`
;
data
[
0
].
Config
=
str
;
}
}
else
{
if
(
obj
.
ConfigName
)
{
let
str
=
radio
==
0
?
`全部.
${
obj
.
ConfigName
}
`
:
`全部.
${
obj
.
ConfigName
}
.n`
;
let
str
=
cho
?
`全部.
${
obj
.
ConfigName
}
`
:
`全部.
${
obj
.
ConfigName
}
.n`
;
data
[
0
].
Config
=
str
;
}
else
{
let
str
=
radio
==
0
?
`全部`
:
`全部.n`
;
let
str
=
cho
?
`全部`
:
`全部.n`
;
data
[
0
].
Config
=
str
;
}
}
}
else
{
let
str
=
radio
==
0
?
`
${
obj
.
Config
}
`
:
`
${
obj
.
Config
}
.n`
;
let
str
=
cho
?
`
${
obj
.
Config
}
`
:
`
${
obj
.
Config
}
.n`
;
console
.
log
(
str
);
data
[
0
].
Config
=
str
;
}
...
...
@@ -425,6 +428,31 @@ const AddModal = props => {
prefix
:
code
[
1
]
===
'undefined'
?
''
:
code
[
1
],
});
break
;
case
'站点选择器'
:
let
site
=
res
[
0
].
data
.
root
.
Config
.
split
(
'.'
);
console
.
log
(
site
[
1
]);
if
(
site
[
0
]
==
'本人'
)
{
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
});
setPep
(
true
);
setCho
(
true
);
}
}
else
{
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
});
setPep
(
false
);
setCho
(
true
);
}
}
break
;
case
'平铺值选择器'
:
case
'搜索选择器'
:
let
data
=
res
[
0
].
data
.
root
.
Config
.
split
(
'.'
);
...
...
@@ -511,63 +539,124 @@ const AddModal = props => {
setRadio
(
0
);
}
break
;
// case '人员选择器':
// let pepole = res[0].data.root.Config.split('.');
// console.log(pepole);
// form.setFieldsValue({ ShowConfig: res[0].data.root.Config });
// if (pepole[0] == '全部') {
// setRadio1('全部');
// setRadio3('0');
// if (pepole[1] != 'n') {
// form.setFieldsValue({
// All: '全部',
// AllID: '0',
// // Config: pepole[0],
// ConfigName: pepole[1],
// });
// } else {
// form.setFieldsValue({
// All: '全部',
// AllID: '0',
// // Config: pepole[0],
// ConfigName: '',
// });
// }
// } else if (pepole[0] == '全部ID') {
// setRadio1('全部');
// setRadio3('全部ID');
// if (pepole[1] != 'n') {
// form.setFieldsValue({
// All: '全部',
// AllID: '全部ID',
// // Config: pepole[0],
// ConfigName: pepole[1],
// });
// } else {
// form.setFieldsValue({
// All: '全部',
// AllID: '全部ID',
// // Config: pepole[0],
// ConfigName: '',
// });
// }
// } else {
// setRadio1('0');
// setRadio3('0');
// form.setFieldsValue({
// All: '0',
// AllID: '0',
// Config: pepole[0],
// });
// }
// if (res[0].data.root.Config.endsWith('.n')) {
// console.log(111);
// form.setFieldsValue({ check: 1 });
// setRadio(1);
// } else {
// console.log(222);
// form.setFieldsValue({ check: 0 });
// setRadio(0);
// }
// break;
case
'人员选择器'
:
let
pepole
=
res
[
0
].
data
.
root
.
Config
.
split
(
'.'
);
console
.
log
(
pepole
);
form
.
setFieldsValue
({
ShowConfig
:
res
[
0
].
data
.
root
.
Config
});
if
(
pepole
[
0
]
==
'全部'
)
{
setRadio1
(
'全部'
);
setRadio3
(
'0'
);
setHide
(
false
);
setFlag
(
true
);
setCheckboxAll1
(
true
);
if
(
pepole
[
1
]
!=
'n'
)
{
form
.
setFieldsValue
({
All
:
'全部'
,
AllID
:
'0'
,
// Config: pepole[0],
All1
:
true
,
AllID1
:
false
,
ConfigName
:
pepole
[
1
],
});
}
else
{
form
.
setFieldsValue
({
All
:
'全部'
,
AllID
:
'0'
,
// Config: pepole[0],
All1
:
true
,
AllID1
:
false
,
ConfigName
:
''
,
});
}
}
else
if
(
pepole
[
0
]
==
'全部ID'
)
{
setRadio1
(
'全部'
);
setRadio3
(
'全部ID'
);
setHide
(
false
);
setFlag
(
true
);
setCheckboxAll1
(
true
);
setCheckboxAllID1
(
true
);
if
(
pepole
[
1
]
!=
'n'
)
{
form
.
setFieldsValue
({
All
:
'全部'
,
AllID
:
'全部ID'
,
// Config: pepole[0],
All1
:
true
,
AllID1
:
true
,
ConfigName
:
pepole
[
1
],
});
}
else
{
form
.
setFieldsValue
({
All
:
'全部'
,
AllID
:
'全部ID'
,
// Config: pepole[0],
All1
:
true
,
AllID1
:
true
,
ConfigName
:
''
,
});
}
}
else
{
setRadio1
(
'0'
);
setRadio3
(
'0'
);
setCheckboxAll1
(
false
);
setCheckboxAllID1
(
false
);
setHide
(
true
);
setFlag
(
false
);
form
.
setFieldsValue
({
All
:
'0'
,
AllID
:
'0'
,
All
1
:
false
,
AllID
1
:
false
,
Config
:
pepole
[
0
],
});
}
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
console
.
log
(
1
11
);
form
.
setFieldsValue
({
ch
eck
:
1
});
set
Radio
(
1
);
console
.
log
(
1
212
);
form
.
setFieldsValue
({
ch
oose
:
false
});
set
Cho
(
false
);
}
else
{
console
.
log
(
222
);
form
.
setFieldsValue
({
ch
eck
:
0
});
set
Radio
(
0
);
console
.
log
(
3434
);
form
.
setFieldsValue
({
ch
oose
:
true
});
set
Cho
(
true
);
}
break
;
}
...
...
@@ -729,21 +818,46 @@ const AddModal = props => {
return
tempObj
;
};
const
handleCharacteristics
=
value
=>
{
form
.
setFieldsValue
({
Config
:
''
,
tableName
:
''
,
fieldName
:
''
,
filterName
:
''
,
filterValue
:
''
,
standingBook
:
''
,
check
:
0
,
AllID
:
'0'
,
All
:
'0'
,
ShowConfig
:
''
,
});
if
(
value
==
'日期'
||
value
==
'日期时间'
||
value
==
'日期月份'
||
value
==
'日期年份'
||
value
==
'日期周'
||
value
==
'时分秒'
)
{
console
.
log
(
123
);
form
.
setFieldsValue
({
Config
:
'默认为当前时间'
});
setTimeData
(
'默认为当前时间'
);
}
else
{
form
.
setFieldsValue
({
Config
:
''
,
ConfigName
:
''
,
tableName
:
''
,
fieldName
:
''
,
filterName
:
''
,
filterValue
:
''
,
standingBook
:
''
,
check
:
0
,
AllID
:
'0'
,
All
:
'0'
,
AllID1
:
''
,
All1
:
''
,
ShowConfig
:
''
,
pepole
:
''
,
choose
:
''
,
});
}
setRadio
(
0
);
setRadio3
(
'0'
);
setRadio1
(
'0'
);
setPep
(
''
);
setCho
(
''
);
setCheckboxAll1
(
''
);
setCheckboxAllID1
(
''
);
setFlag
(
false
);
setHide
(
true
);
console
.
log
(
value
);
if
(
value
==
'文本'
)
{
setDetail
(
'输入内容将显示在前端输入框提示信息中'
);
...
...
@@ -775,8 +889,6 @@ const AddModal = props => {
value
==
'视频'
)
{
form
.
setFieldsValue
({
RowSpan
:
6
});
}
else
if
(
value
==
'站点选择器'
)
{
form
.
setFieldsValue
({
Config
:
'全局.n'
});
}
else
{
if
(
pramData
.
RowSpan
)
{
form
.
setFieldsValue
({
RowSpan
:
pramData
.
RowSpan
});
...
...
@@ -1001,6 +1113,47 @@ const AddModal = props => {
setRadio
(
0
);
}
break
;
case
'站点选择器'
:
console
.
log
(
aa
.
Config
);
let
site
=
aa
.
Config
.
split
(
'.'
);
console
.
log
(
site
[
1
]);
if
(
site
[
0
]
==
'本人'
)
{
if
(
aa
.
Config
.
endsWith
(
'.n'
))
{
form
.
setFieldsValue
({
pepole
:
true
,
choose
:
false
});
setPep
(
true
);
setCho
(
false
);
}
else
{
form
.
setFieldsValue
({
pepole
:
true
,
choose
:
true
});
setPep
(
true
);
setCho
(
true
);
}
}
else
{
if
(
aa
.
Config
.
endsWith
(
'.n'
))
{
form
.
setFieldsValue
({
pepole
:
false
,
choose
:
false
});
setPep
(
false
);
setCho
(
false
);
}
else
{
form
.
setFieldsValue
({
pepole
:
false
,
choose
:
true
});
setPep
(
false
);
setCho
(
true
);
}
}
break
;
case
'部门选择器'
:
let
department
=
aa
.
Config
;
console
.
log
(
department
);
if
(
department
==
'.n'
)
{
form
.
setFieldsValue
({
check
:
1
,
});
setRadio
(
1
);
}
else
{
form
.
setFieldsValue
({
check
:
0
,
});
setRadio
(
0
);
}
break
;
case
'台账选择器'
:
let
book
=
aa
.
Config
.
split
(
'.'
);
let
ad
=
book
[
1
].
split
(
'?'
);
...
...
@@ -1028,60 +1181,118 @@ const AddModal = props => {
setRadio
(
0
);
}
break
;
// case '人员选择器':
// let pepole = aa.Config.split('.');
// // form.setFieldsValue({ ShowConfig: pepole });
// if (pepole[0] == '全部') {
// setRadio1('全部');
// setRadio3('0');
// if (pepole[1] != 'n') {
// form.setFieldsValue({
// All: '全部',
// AllID: '0',
// ConfigName: pepole[1],
// });
// } else {
// form.setFieldsValue({
// All: '全部',
// AllID: '0',
// ConfigName: '',
// });
// }
// } else if (pepole[0] == '全部ID') {
// setRadio1('全部');
// setRadio3('全部ID');
// if (pepole[1] != 'n') {
// form.setFieldsValue({
// All: '全部',
// AllID: '全部ID',
// ConfigName: pepole[1],
// });
// } else {
// form.setFieldsValue({
// All: '全部',
// AllID: '全部ID',
// ConfigName: '',
// });
// }
// } else {
// setRadio1('0');
// setRadio3('0');
// form.setFieldsValue({
// All: '0',
// AllID: '0',
// Config: pepole[0],
// });
// }
// if (aa.Config.endsWith('.n')) {
// form.setFieldsValue({
// check: 1,
// });
// setRadio(1);
// } else {
// form.setFieldsValue({
// check: 0,
// });
// setRadio(0);
// }
// break;
case
'人员选择器'
:
let
pepole
=
aa
.
Config
.
split
(
'.'
);
// form.setFieldsValue({ ShowConfig: pepole });
console
.
log
(
pepole
);
form
.
setFieldsValue
({
ShowConfig
:
aa
.
Config
});
if
(
pepole
[
0
]
==
'全部'
)
{
setRadio1
(
'全部'
);
setRadio3
(
'0'
);
setHide
(
false
);
setFlag
(
true
);
setCheckboxAll1
(
true
);
if
(
pepole
[
1
]
!=
'n'
)
{
form
.
setFieldsValue
({
All
:
'全部'
,
AllID
:
'0'
,
All
1
:
true
,
AllID
1
:
false
,
ConfigName
:
pepole
[
1
],
});
}
else
{
form
.
setFieldsValue
({
All
:
'全部'
,
AllID
:
'0'
,
All
1
:
true
,
AllID
1
:
false
,
ConfigName
:
''
,
});
}
}
else
if
(
pepole
[
0
]
==
'全部ID'
)
{
setRadio1
(
'全部'
);
setRadio3
(
'全部ID'
);
setHide
(
false
);
setFlag
(
true
);
setCheckboxAll1
(
true
);
setCheckboxAllID1
(
true
);
if
(
pepole
[
1
]
!=
'n'
)
{
form
.
setFieldsValue
({
All
:
'全部'
,
AllID
:
'全部ID'
,
All
1
:
true
,
AllID
1
:
true
,
ConfigName
:
pepole
[
1
],
});
}
else
{
form
.
setFieldsValue
({
All
:
'全部'
,
AllID
:
'全部ID'
,
All
1
:
true
,
AllID
1
:
true
,
ConfigName
:
''
,
});
}
}
else
{
setRadio1
(
'0'
);
setRadio3
(
'0'
);
setCheckboxAll1
(
false
);
setCheckboxAllID1
(
false
);
setHide
(
true
);
setFlag
(
false
);
form
.
setFieldsValue
({
All
:
'0'
,
AllID
:
'0'
,
All
1
:
false
,
AllID
1
:
false
,
Config
:
pepole
[
0
],
});
}
if
(
aa
.
Config
.
endsWith
(
'.n'
))
{
form
.
setFieldsValue
({
check
:
1
,
});
setRadio
(
1
);
form
.
setFieldsValue
({
choose
:
false
});
setCho
(
false
);
}
else
{
form
.
setFieldsValue
({
check
:
0
,
});
setRadio
(
0
);
form
.
setFieldsValue
({
choose
:
true
});
setCho
(
true
);
}
break
;
}
...
...
@@ -1155,6 +1366,32 @@ const AddModal = props => {
fieldName
:
arr
[
1
]
||
''
,
});
break
;
case
'站点选择器'
:
let
site
=
res
[
0
].
data
.
root
.
Config
.
split
(
'.'
);
console
.
log
(
res
[
0
].
data
.
root
.
Config
);
console
.
log
(
site
[
1
]);
if
(
site
[
0
]
==
'本人'
)
{
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
});
setPep
(
true
);
setCho
(
true
);
}
}
else
{
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
});
setPep
(
false
);
setCho
(
true
);
}
}
break
;
case
'业务选择器'
:
let
list
=
res
[
0
].
data
.
root
.
Config
.
split
(
'.'
);
console
.
log
(
list
);
...
...
@@ -1174,6 +1411,21 @@ const AddModal = props => {
setRadio
(
0
);
}
break
;
case
'部门选择器'
:
let
department
=
res
[
0
].
data
.
root
.
Config
;
console
.
log
(
department
);
if
(
department
==
'.n'
)
{
form
.
setFieldsValue
({
check
:
1
,
});
setRadio
(
1
);
}
else
{
form
.
setFieldsValue
({
check
:
0
,
});
setRadio
(
0
);
}
break
;
case
'台账选择器'
:
let
book
=
res
[
0
].
data
.
root
.
Config
.
split
(
'.'
);
let
ab
=
book
[
1
].
split
(
'?'
);
...
...
@@ -1201,65 +1453,123 @@ const AddModal = props => {
setRadio
(
0
);
}
break
;
// case '人员选择器':
// let pepole = res[0].data.root.Config.split('.');
// // form.setFieldsValue({ ShowConfig: pepole });
// console.log(pepole);
// if (pepole[0] == '全部') {
// setRadio1('全部');
// setRadio3('全部');
// if (pepole[1] != 'n') {
// form.setFieldsValue({
// All: '全部',
// AllID: '0',
// // Config: pepole[0],
// ConfigName: pepole[1],
// });
// } else {
// form.setFieldsValue({
// All: '全部',
// AllID: '0',
// // Config: pepole[0],
// ConfigName: '',
// });
// }
// } else if (pepole[0] == '全部ID') {
// setRadio1('全部');
// setRadio3('全部ID');
// if (pepole[1] != 'n') {
// form.setFieldsValue({
// All: '全部',
// AllID: '全部ID',
// // Config: pepole[0],
// ConfigName: pepole[1],
// });
// } else {
// form.setFieldsValue({
// All: '全部',
// AllID: '全部ID',
// // Config: pepole[0],
// ConfigName: '',
// });
// }
// } else {
// setRadio1('0');
// setRadio3('0');
// form.setFieldsValue({
// All: '0',
// AllID: '0',
// Config: pepole[0],
// });
// }
// if (res[0].data.root.Config.endsWith('.n')) {
// form.setFieldsValue({
// check: 1,
// });
// setRadio(1);
// } else {
// form.setFieldsValue({
// check: 0,
// });
// setRadio(0);
// }
// break;
case
'人员选择器'
:
let
pepole
=
res
[
0
].
data
.
root
.
Config
.
split
(
'.'
);
// form.setFieldsValue({ ShowConfig: pepole });
console
.
log
(
pepole
);
form
.
setFieldsValue
({
ShowConfig
:
res
[
0
].
data
.
root
.
Config
});
if
(
pepole
[
0
]
==
'全部'
)
{
setRadio1
(
'全部'
);
setRadio3
(
'全部'
);
setHide
(
false
);
setFlag
(
true
);
setCheckboxAll1
(
true
);
if
(
pepole
[
1
]
!=
'n'
)
{
form
.
setFieldsValue
({
All
:
'全部'
,
AllID
:
'0'
,
// Config: pepole[0],
All1
:
true
,
AllID1
:
false
,
ConfigName
:
pepole
[
1
],
});
}
else
{
form
.
setFieldsValue
({
All
:
'全部'
,
AllID
:
'0'
,
// Config: pepole[0],
All1
:
true
,
AllID1
:
false
,
ConfigName
:
''
,
});
}
}
else
if
(
pepole
[
0
]
==
'全部ID'
)
{
setRadio1
(
'全部'
);
setRadio3
(
'全部ID'
);
setHide
(
false
);
setFlag
(
true
);
setCheckboxAll1
(
true
);
setCheckboxAllID1
(
true
);
if
(
pepole
[
1
]
!=
'n'
)
{
form
.
setFieldsValue
({
All
:
'全部'
,
AllID
:
'全部ID'
,
// Config: pepole[0],
All1
:
true
,
AllID1
:
true
,
ConfigName
:
pepole
[
1
],
});
}
else
{
form
.
setFieldsValue
({
All
:
'全部'
,
AllID
:
'全部ID'
,
// Config: pepole[0],
All1
:
true
,
AllID1
:
true
,
ConfigName
:
''
,
});
}
}
else
{
setRadio1
(
'0'
);
setRadio3
(
'0'
);
setCheckboxAll1
(
false
);
setCheckboxAllID1
(
false
);
setHide
(
true
);
setFlag
(
false
);
form
.
setFieldsValue
({
All
:
'0'
,
AllID
:
'0'
,
All
1
:
false
,
AllID
1
:
false
,
Config
:
pepole
[
0
],
});
}
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
form
.
setFieldsValue
({
check
:
1
,
});
setRadio
(
1
);
form
.
setFieldsValue
({
choose
:
true
});
setCho
(
true
);
}
else
{
form
.
setFieldsValue
({
check
:
0
,
});
setRadio
(
0
);
form
.
setFieldsValue
({
choose
:
false
});
setCho
(
false
);
}
break
;
}
...
...
@@ -1327,6 +1637,9 @@ const AddModal = props => {
?
`
${
obj
.
tableName
}
.
${
obj
.
fieldName
}
`
:
`
${
obj
.
tableName
}
`
;
break
;
case
'站点选择器'
:
data
[
0
].
Config
=
pep
?
`本人
${
cho
?
''
:
'.n'
}
`
:
`全部
${
cho
?
''
:
'.n'
}
`
;
break
;
case
'业务选择器'
:
if
(
obj
.
fieldName
.
endsWith
(
'.n'
))
{
data
[
0
].
Config
=
obj
.
fieldName
...
...
@@ -1343,6 +1656,13 @@ const AddModal = props => {
}
}
break
;
case
'部门选择器'
:
if
(
obj
.
check
==
0
)
{
data
[
0
].
Config
=
''
;
}
else
{
data
[
0
].
Config
=
'.n'
;
}
break
;
case
'台账选择器'
:
if
(
obj
.
fieldName
.
endsWith
(
'.n'
))
{
data
[
0
].
Config
=
`
${
obj
.
standingBook
}
.
${
obj
.
fieldName
}
`
;
...
...
@@ -1360,33 +1680,59 @@ const AddModal = props => {
data
[
0
].
Config
=
`
${
data
[
0
].
Config
}
?
${
obj
.
filterName
}
='
${
obj
.
filterValue
}
'`
;
}
break
;
// case '人员选择器':
// console.log(obj.ConfigName);
// console.log(form.getFieldValue().ConfigName);
// console.log(radio1);
// console.log(radio3);
// console.log(form.getFieldValue().All);
// console.log(form.getFieldValue().AllID);
// if (radio1 == '全部') {
// if (radio3 == '全部ID') {
// if (obj.ConfigName) {
// let str = radio == 0 ? `全部ID.${obj.ConfigName}` : `全部ID.${obj.ConfigName}.n`;
// data[0].Config = str;
// } else {
// let str = radio == 0 ? `全部ID` : `全部ID.n`;
// data[0].Config = str;
// }
// } else {
// if (obj.ConfigName) {
// let str = radio == 0 ? `全部.${obj.ConfigName}` : `全部.${obj.ConfigName}.n`;
// data[0].Config = str;
// } else {
// let str = radio == 0 ? `全部` : `全部.n`;
// data[0].Config = str;
// }
// }
// } else {
// let str = radio == 0 ? `${obj.Config}` : `${obj.Config}.n`;
// console.log(str);
// data[0].Config = str;
// }
// break;
case
'人员选择器'
:
console
.
log
(
obj
.
ConfigName
);
console
.
log
(
form
.
getFieldValue
().
ConfigName
);
console
.
log
(
radio1
);
console
.
log
(
radio3
);
console
.
log
(
form
.
getFieldValue
().
All
);
console
.
log
(
form
.
getFieldValue
().
AllID
);
if
(
radio1
==
'全部'
)
{
if
(
radio3
==
'全部ID'
)
{
if
(
checkboxAll1
==
true
)
{
if
(
checkboxAllID1
==
true
)
{
if
(
obj
.
ConfigName
)
{
let
str
=
radio
==
0
?
`全部ID.
${
obj
.
ConfigName
}
`
:
`全部ID.
${
obj
.
ConfigName
}
.n`
;
let
str
=
cho
?
`全部ID.
${
obj
.
ConfigName
}
`
:
`全部ID.
${
obj
.
ConfigName
}
.n`
;
data
[
0
].
Config
=
str
;
}
else
{
let
str
=
radio
==
0
?
`全部ID`
:
`全部ID.n`
;
let
str
=
cho
?
`全部ID`
:
`全部ID.n`
;
data
[
0
].
Config
=
str
;
}
}
else
{
if
(
obj
.
ConfigName
)
{
let
str
=
radio
==
0
?
`全部.
${
obj
.
ConfigName
}
`
:
`全部.
${
obj
.
ConfigName
}
.n`
;
let
str
=
cho
?
`全部.
${
obj
.
ConfigName
}
`
:
`全部.
${
obj
.
ConfigName
}
.n`
;
data
[
0
].
Config
=
str
;
}
else
{
let
str
=
radio
==
0
?
`全部`
:
`全部.n`
;
let
str
=
cho
?
`全部`
:
`全部.n`
;
data
[
0
].
Config
=
str
;
}
}
}
else
{
let
str
=
radio
==
0
?
`
${
obj
.
Config
}
`
:
`
${
obj
.
Config
}
.n`
;
let
str
=
cho
?
`
${
obj
.
Config
}
`
:
`
${
obj
.
Config
}
.n`
;
console
.
log
(
str
);
data
[
0
].
Config
=
str
;
}
...
...
@@ -1415,17 +1761,31 @@ const AddModal = props => {
}
}
form
.
setFieldsValue
({
Config
:
''
,
ConfigName
:
''
,
tableName
:
''
,
fieldName
:
''
,
standingBook
:
''
,
filterName
:
''
,
filterValue
:
''
,
ConfigName
:
''
,
check
:
''
,
standingBook
:
''
,
check
:
0
,
AllID
:
'0'
,
All
:
'0'
,
AllID1
:
''
,
All1
:
''
,
ShowConfig
:
''
,
All
:
''
,
AllID
:
''
,
pepole
:
''
,
choose
:
''
,
});
setRadio
(
0
);
setRadio3
(
'0'
);
setRadio1
(
'0'
);
setPep
(
''
);
setCho
(
''
);
setCheckboxAll1
(
''
);
setCheckboxAllID1
(
''
);
setFlag
(
false
);
setHide
(
true
);
if
(
i
==
1.14
)
{
console
.
log
(
valueData
);
UpdateFields
(
valueData
).
then
(
res
=>
{
...
...
@@ -1456,6 +1816,11 @@ const AddModal = props => {
setValue1
();
};
const
timeDataOnVChange
=
e
=>
{
console
.
log
(
e
.
target
.
value
);
setTimeData
(
e
.
target
.
value
);
};
const
inputOnChange
=
e
=>
{
setValue1
();
};
...
...
@@ -1465,12 +1830,6 @@ const AddModal = props => {
};
const
onChange3
=
e
=>
{
// if (e.target.value == '全部ID') {
// form.setFieldsValue({ Config: '全部ID' });
// }
// if (e.target.value == '0' && radio1 == '全部') {
// form.setFieldsValue({ Config: '全部' });
// }
setRadio3
(
e
.
target
.
value
);
setValue1
();
};
...
...
@@ -1481,11 +1840,6 @@ const AddModal = props => {
console
.
log
(
aa
);
console
.
log
(
bb
);
if
(
e
.
target
.
value
==
'全部'
)
{
// if (radio3 == '全部ID') {
// form.setFieldsValue({ Config: '全部ID' });
// } else {
// form.setFieldsValue({ Config: '全部' });
// }
form
.
setFieldsValue
({
ConfigName
:
bb
});
}
else
{
form
.
setFieldsValue
({
Config
:
aa
,
AllID
:
'0'
});
...
...
@@ -1501,43 +1855,33 @@ const AddModal = props => {
let
cc
=
form
.
getFieldsValue
().
All
;
let
dd
=
form
.
getFieldsValue
().
AllID
;
let
ff
=
form
.
getFieldsValue
().
check
;
console
.
log
(
aa
);
console
.
log
(
bb
);
console
.
log
(
ff
);
if
(
cc
==
'全部'
)
{
if
(
dd
==
'全部ID'
)
{
if
(
bb
)
{
if
(
ff
==
1
)
{
console
.
log
(
1
);
form
.
setFieldsValue
({
ShowConfig
:
`全部ID.
${
bb
}
.n`
});
}
else
{
console
.
log
(
2
);
form
.
setFieldsValue
({
ShowConfig
:
`全部ID.
${
bb
}
`
});
}
}
else
{
if
(
ff
==
1
)
{
console
.
log
(
3
);
form
.
setFieldsValue
({
ShowConfig
:
`全部ID.n`
});
}
else
{
console
.
log
(
4
);
form
.
setFieldsValue
({
ShowConfig
:
`全部ID`
});
}
}
}
else
{
if
(
bb
)
{
if
(
ff
==
1
)
{
console
.
log
(
5
);
form
.
setFieldsValue
({
ShowConfig
:
`全部.
${
bb
}
.n`
});
}
else
{
console
.
log
(
6
);
form
.
setFieldsValue
({
ShowConfig
:
`全部.
${
bb
}
`
});
}
}
else
{
if
(
ff
==
1
)
{
console
.
log
(
7
);
form
.
setFieldsValue
({
ShowConfig
:
`全部.n`
});
}
else
{
console
.
log
(
8
);
form
.
setFieldsValue
({
ShowConfig
:
`全部`
});
}
}
...
...
@@ -1545,18 +1889,14 @@ const AddModal = props => {
}
else
{
if
(
aa
)
{
if
(
ff
==
1
)
{
console
.
log
(
9
);
form
.
setFieldsValue
({
ShowConfig
:
`
${
aa
}
.n`
});
}
else
{
console
.
log
(
10
);
form
.
setFieldsValue
({
ShowConfig
:
`
${
aa
}
`
});
}
}
else
{
if
(
ff
==
1
)
{
console
.
log
(
11
);
form
.
setFieldsValue
({
ShowConfig
:
`.n`
});
}
else
{
console
.
log
(
12
);
form
.
setFieldsValue
({
ShowConfig
:
''
});
}
}
...
...
@@ -1569,46 +1909,32 @@ const AddModal = props => {
let
cc
=
form
.
getFieldsValue
().
All
;
let
dd
=
form
.
getFieldsValue
().
AllID
;
let
ff
=
form
.
getFieldsValue
().
check
;
console
.
log
(
valueData
);
console
.
log
(
aa
);
console
.
log
(
bb
);
console
.
log
(
ff
);
console
.
log
(
cc
);
console
.
log
(
dd
);
if
(
cc
==
'全部'
)
{
if
(
dd
==
'全部ID'
)
{
if
(
aa
)
{
if
(
ff
==
1
)
{
console
.
log
(
1
);
form
.
setFieldsValue
({
ShowConfig
:
`全部ID.
${
aa
}
.n`
});
}
else
{
console
.
log
(
2
);
form
.
setFieldsValue
({
ShowConfig
:
`全部ID.
${
aa
}
`
});
}
}
else
{
if
(
ff
==
1
)
{
console
.
log
(
3
);
form
.
setFieldsValue
({
ShowConfig
:
`全部ID.n`
});
}
else
{
console
.
log
(
4
);
form
.
setFieldsValue
({
ShowConfig
:
`全部ID`
});
}
}
}
else
{
if
(
aa
)
{
if
(
ff
==
1
)
{
console
.
log
(
5
);
form
.
setFieldsValue
({
ShowConfig
:
`全部.
${
aa
}
.n`
});
}
else
{
console
.
log
(
6
);
form
.
setFieldsValue
({
ShowConfig
:
`全部.
${
aa
}
`
});
}
}
else
{
if
(
ff
==
1
)
{
console
.
log
(
7
);
form
.
setFieldsValue
({
ShowConfig
:
`全部.n`
});
}
else
{
console
.
log
(
8
);
form
.
setFieldsValue
({
ShowConfig
:
`全部`
});
}
}
...
...
@@ -1616,18 +1942,14 @@ const AddModal = props => {
}
else
{
if
(
bb
)
{
if
(
ff
==
1
)
{
console
.
log
(
9
);
form
.
setFieldsValue
({
ShowConfig
:
`
${
bb
}
.n`
});
}
else
{
console
.
log
(
10
);
form
.
setFieldsValue
({
ShowConfig
:
`
${
bb
}
`
});
}
}
else
{
if
(
ff
==
1
)
{
console
.
log
(
11
);
form
.
setFieldsValue
({
ShowConfig
:
`.n`
});
}
else
{
console
.
log
(
12
);
form
.
setFieldsValue
({
ShowConfig
:
''
});
}
}
...
...
@@ -1644,6 +1966,42 @@ const AddModal = props => {
);
};
const
changePepole
=
e
=>
{
console
.
log
(
e
.
target
.
value
);
console
.
log
(
e
.
target
.
checked
);
setPep
(
e
.
target
.
checked
);
};
const
changeChoose
=
e
=>
{
console
.
log
(
e
.
target
.
value
);
console
.
log
(
e
.
target
.
checked
);
setCho
(
e
.
target
.
checked
);
};
const
changeAll1
=
e
=>
{
let
aa
=
form
.
getFieldsValue
().
ConfigName
;
let
bb
=
form
.
getFieldsValue
().
Config
;
setCheckboxAll1
(
e
.
target
.
checked
);
if
(
e
.
target
.
checked
==
true
)
{
if
(
bb
)
{
form
.
setFieldsValue
({
ConfigName
:
bb
});
}
setHide
(
false
);
setFlag
(
true
);
}
else
{
if
(
aa
)
{
form
.
setFieldsValue
({
Config
:
aa
});
}
setHide
(
true
);
setFlag
(
false
);
setCheckboxAllID1
(
false
);
}
};
const
changeAllID1
=
e
=>
{
setCheckboxAllID1
(
e
.
target
.
checked
);
};
return
(
<>
<
Drawer
...
...
@@ -1771,7 +2129,8 @@ const AddModal = props => {
</
div
>
</
Item
>
</
Col
>
<
Col
span=
{
6
}
>
<
Col
span=
{
1
}
/>
<
Col
span=
{
5
}
>
<
Item
label=
"单位"
name=
"Unit"
labelCol=
{
{
span
:
7
}
}
>
<
Input
style=
{
{
width
:
'95%'
}
}
placeholder=
""
/>
</
Item
>
...
...
@@ -1869,12 +2228,7 @@ const AddModal = props => {
placeholder=
"用英文逗号分隔自定义的值,勾选,可设置初始值"
/>
</
Item
>
<
Item
colon=
{
false
}
name=
"check"
label=
"形态功能:"
labelCol=
{
{
span
:
3
}
}
>
<
Item
colon=
{
false
}
name=
"check"
label=
"配置:"
labelCol=
{
{
span
:
3
}
}
>
<
Radio
.
Group
onChange=
{
onChange2
}
value=
{
radio
}
defaultValue=
{
chee
}
>
<
Radio
value=
{
0
}
>
单选
</
Radio
>
<
Radio
value=
{
1
}
>
多选
</
Radio
>
...
...
@@ -1952,12 +2306,7 @@ const AddModal = props => {
</
Item
>
</
Col
>
</
Row
>
<
Item
colon=
{
false
}
name=
"check"
label=
"形态功能:"
labelCol=
{
{
span
:
3
}
}
>
<
Item
colon=
{
false
}
name=
"check"
label=
"配置:"
labelCol=
{
{
span
:
3
}
}
>
<
Radio
.
Group
onChange=
{
onChange2
}
value=
{
radio
}
defaultValue=
{
chee
}
>
<
Radio
value=
{
0
}
>
单选
</
Radio
>
<
Radio
value=
{
1
}
>
多选
</
Radio
>
...
...
@@ -1976,7 +2325,7 @@ const AddModal = props => {
>
<
TextArea
allowClear
style=
{
{
width
:
'9
2
%'
}
}
style=
{
{
width
:
'9
3
%'
}
}
placeholder=
"请输入数据字典名称"
/>
</
Item
>
...
...
@@ -1988,7 +2337,7 @@ const AddModal = props => {
<
Item
label=
"数据字典名称"
name=
"Config"
labelCol=
{
{
span
:
5
}
}
labelCol=
{
{
span
:
7
}
}
// rules=
{[{
required
:
true
,
message
:
'请输入数据字典名称'
}]}
>
<
Input
...
...
@@ -1997,12 +2346,7 @@ const AddModal = props => {
placeholder=
"请输入数据字典名称"
/>
</
Item
>
<
Item
colon=
{
false
}
name=
"check"
label=
"形态功能:"
labelCol=
{
{
span
:
3
}
}
>
<
Item
colon=
{
false
}
name=
"check"
label=
"配置:"
labelCol=
{
{
span
:
7
}
}
>
<
Radio
.
Group
onChange=
{
onChange2
}
value=
{
radio
}
defaultValue=
{
chee
}
>
<
Radio
value=
{
0
}
>
单选
</
Radio
>
<
Radio
value=
{
1
}
>
多选
</
Radio
>
...
...
@@ -2013,12 +2357,7 @@ const AddModal = props => {
case
'部门选择器'
:
return
(
<>
<
Item
colon=
{
false
}
name=
"check"
label=
"形态功能:"
labelCol=
{
{
span
:
3
}
}
>
<
Item
colon=
{
false
}
name=
"check"
label=
"配置:"
labelCol=
{
{
span
:
3
}
}
>
<
Radio
.
Group
onChange=
{
onChange2
}
value=
{
radio
}
defaultValue=
{
chee
}
>
<
Radio
value=
{
0
}
>
单选
</
Radio
>
<
Radio
value=
{
1
}
>
多选
</
Radio
>
...
...
@@ -2029,12 +2368,23 @@ const AddModal = props => {
case
'站点选择器'
:
return
(
<
Item
label=
"配置"
name=
"Config"
labelCol=
{
{
span
:
3
}
}
rules=
{
[{
required
:
true
,
message
:
'选择配置'
}]
}
label=
{
<
div
>
<
Tooltip
title=
"默认全局多选"
>
<
InfoCircleOutlined
style=
{
{
color
:
'rgb(24 144 255)'
,
marginRight
:
'2px'
,
}
}
/>
</
Tooltip
>
<
span
>
配置
</
span
>
</
div
>
}
>
<
Select
{
/*
<Select
placeholder="默认为全局.n即全局多选,.n为多选(全局时勾选由问题)"
style={{ width: '93%' }}
>
...
...
@@ -2042,7 +2392,29 @@ const AddModal = props => {
<Select.Option value="全局">全局</Select.Option>
<Select.Option value="本人.n">本人(多选)</Select.Option>
<Select.Option value="本人">本人</Select.Option>
</
Select
>
</Select> */
}
<
div
style=
{
{
display
:
'inline-block'
}
}
>
<
Item
name=
"pepole"
style=
{
{
marginBottom
:
'0'
}
}
>
<
Checkbox
checked=
{
pep
}
onChange=
{
changePepole
}
style=
{
{
marginBottom
:
'0'
}
}
>
本人
</
Checkbox
>
</
Item
>
</
div
>
<
div
style=
{
{
display
:
'inline-block'
}
}
>
<
Item
name=
"choose"
style=
{
{
marginBottom
:
'0'
}
}
>
<
Checkbox
checked=
{
cho
}
onChange=
{
changeChoose
}
style=
{
{
marginBottom
:
'0'
}
}
>
单选
</
Checkbox
>
</
Item
>
</
div
>
</
Item
>
);
case
'台账选择器'
:
...
...
@@ -2063,32 +2435,30 @@ const AddModal = props => {
<
Item
label=
"字段名"
name=
"fieldName"
labelCol=
{
{
span
:
6
}
}
labelCol=
{
{
span
:
5
}
}
rules=
{
[{
required
:
true
,
message
:
'请输入字段名'
}]
}
>
<
Input
style=
{
{
width
:
'85%'
}
}
placeholder=
"请输入字段名"
/>
</
Item
>
</
Col
>
<
Col
span=
{
12
}
>
<
Item
label=
"台账过滤
条件"
name=
"filterName"
labelCol=
{
{
span
:
9
}
}
>
<
Input
style=
{
{
width
:
'9
4
%'
}
}
placeholder=
"请输入字段名"
/>
<
Item
label=
"台账过滤
"
name=
"filterName"
labelCol=
{
{
span
:
6
}
}
>
<
Input
style=
{
{
width
:
'9
5
%'
}
}
placeholder=
"请输入字段名"
/>
</
Item
>
</
Col
>
<
Col
span=
{
3
}
>
<
span
style=
{
{
marginLeft
:
'2
5
px'
}
}
>
=
</
span
>
<
Col
span=
{
2
}
>
<
span
style=
{
{
marginLeft
:
'2
0
px'
}
}
>
=
</
span
>
</
Col
>
<
Col
span=
{
9
}
>
<
Item
name=
"filterValue"
labelCol=
{
{
span
:
5
}
}
>
<
Input
style=
{
{
width
:
'85%'
}
}
placeholder=
"请输入过滤条件"
/>
<
Item
name=
"filterValue"
>
<
Input
style=
{
{
width
:
'89%'
,
marginLeft
:
'12px'
}
}
placeholder=
"请输入过滤条件"
/>
</
Item
>
</
Col
>
</
Row
>
<
Item
colon=
{
false
}
name=
"check"
label=
"形态功能:"
labelCol=
{
{
span
:
3
}
}
>
<
Item
colon=
{
false
}
name=
"check"
label=
"配置:"
labelCol=
{
{
span
:
3
}
}
>
<
Radio
.
Group
onChange=
{
onChange2
}
value=
{
radio
}
defaultValue=
{
chee
}
>
<
Radio
value=
{
0
}
>
单选
</
Radio
>
<
Radio
value=
{
1
}
>
多选
</
Radio
>
...
...
@@ -2099,13 +2469,13 @@ const AddModal = props => {
case
'人员选择器'
:
return
(
<>
<
Item
colon=
{
false
}
label=
"全部:"
name=
"All"
labelCol=
{
{
span
:
3
}
}
>
{
/*
<Item colon={false} label="全部:" name="All" labelCol={{ span: 3 }}>
<Radio.Group onChange={onChange1} value={radio1}>
<Radio value="0">否</Radio>
<Radio value="全部">是</Radio>
</Radio.Group>
</
Item
>
{
(()
=>
{
</Item>
*/
}
{
/* {
(() => {
switch (radio1) {
case '全部':
return (
...
...
@@ -2132,25 +2502,7 @@ const AddModal = props => {
<Radio value={1}>多选</Radio>
</Radio.Group>
</Item>
{
/* <Row> */
}
{
/* <Col span={10}>
<Item
label="配置"
name="Config"
labelCol={{ span: 7 }}
rules={[
{ required: true, message: '请输入全部或全部ID' },
]}
>
<Input
allowClear
style={{ width: '100%' }}
placeholder="请输入输入全部或全部ID"
/>
</Item>
</Col> */
}
{
/* <Col span={1} /> */
}
{
/* <Col span={18}> */
}
<Item
label="角色或机构名称"
name="ConfigName"
...
...
@@ -2174,8 +2526,6 @@ const AddModal = props => {
onChange={inputOnChange}
/>
</Item>
{
/* </Col>
</Row> */
}
<Item label="配置" name="ShowConfig" labelCol={{ span: 5 }}>
<Input allowClear style={{ width: '92%' }} disabled />
...
...
@@ -2229,47 +2579,200 @@ const AddModal = props => {
</>
);
}
})()} */
}
<
Item
labelCol=
{
{
span
:
3
}
}
label=
{
<
div
>
<
Tooltip
title=
{
<>
<
span
>
默认非全部,展示形式为下拉框
</
span
>
<
Image
width=
{
200
}
src=
{
partImage
}
/>
</>
}
>
<
InfoCircleOutlined
style=
{
{
color
:
'rgb(24 144 255)'
,
marginRight
:
'5px'
,
}
}
/>
</
Tooltip
>
<
span
>
配置
</
span
>
</
div
>
}
>
<
Tooltip
title=
{
<>
<
span
>
全部,展示形式为弹窗
</
span
>
<
Image
width=
{
200
}
src=
{
AllImage
}
/>
</>
}
>
<
InfoCircleOutlined
style=
{
{
color
:
'rgb(24 144 255)'
,
marginRight
:
'5px'
,
}
}
/>
</
Tooltip
>
<
div
style=
{
{
display
:
'inline-block'
,
marginRight
:
'10px'
}
}
>
<
Item
name=
"All1"
style=
{
{
marginBottom
:
'0'
}
}
>
<
Checkbox
checked=
{
checkboxAll1
}
onChange=
{
changeAll1
}
style=
{
{
marginBottom
:
'0'
}
}
>
弹窗
</
Checkbox
>
</
Item
>
</
div
>
<
div
style=
{
{
display
:
'inline-block'
,
marginRight
:
'10px'
}
}
>
<
Item
name=
"AllID1"
style=
{
{
marginBottom
:
'0'
}
}
>
<
Checkbox
checked=
{
checkboxAllID1
}
onChange=
{
changeAllID1
}
style=
{
{
marginBottom
:
'0'
}
}
disabled=
{
hide
}
>
存储ID
</
Checkbox
>
</
Item
>
</
div
>
<
div
style=
{
{
display
:
'inline-block'
,
marginRight
:
'10px'
}
}
>
<
Item
name=
"choose"
style=
{
{
marginBottom
:
'0'
}
}
>
<
Checkbox
checked=
{
cho
}
onChange=
{
changeChoose
}
style=
{
{
marginBottom
:
'0'
}
}
>
单选
</
Checkbox
>
</
Item
>
</
div
>
{
/* <div style={{ display: 'inline-block', marginRight: '10px' }}>
<Item name="department" style={{ marginBottom: '0' }}>
<Checkbox
checked={checkboxAllID1}
onChange={changeAllID1}
style={{ marginBottom: '0' }}
disabled={hide}
>
展示部门
</Checkbox>
</Item>
</div> */
}
</
Item
>
{
(()
=>
{
switch
(
flag
)
{
case
true
:
return
(
<>
<
Item
label=
"角色|机构"
name=
"ConfigName"
labelCol=
{
{
span
:
3
}
}
rules=
{
[
{
validator
:
(
rule
,
value
)
=>
{
let
str
=
/
[
.
]
/g
;
if
(
str
.
test
(
form
.
getFieldValue
().
ConfigName
))
{
return
Promise
.
reject
(
'.作为分隔符,请勿输入'
);
}
return
Promise
.
resolve
();
},
},
]
}
>
<
Input
allowClear
style=
{
{
width
:
'93%'
}
}
placeholder=
"请输入角色或机构名称"
onChange=
{
inputOnChange
}
/>
</
Item
>
</>
);
case
false
:
return
(
<>
<
Item
label=
"角色|机构"
name=
"Config"
labelCol=
{
{
span
:
3
}
}
rules=
{
[
{
required
:
true
,
message
:
'请输入角色或机构名称'
,
},
{
validator
:
(
rule
,
value
)
=>
{
let
str
=
/
[
.
]
/g
;
if
(
str
.
test
(
form
.
getFieldValue
().
Config
))
{
return
Promise
.
reject
(
'.作为分隔符,请勿输入'
);
}
return
Promise
.
resolve
();
},
},
]
}
>
<
Input
allowClear
style=
{
{
width
:
'93%'
}
}
placeholder=
"请输入角色或机构名称"
onChange=
{
inputOnchange
}
/>
</
Item
>
</>
);
}
})()
}
</>
);
// case '日期时间':
// case '日期':
// case '日期月份':
// case '日期年份':
// case '日期周':
// case '时分秒':
// return (
// <Item label="选项" name="Config" labelCol=
{{
span
:
3
}}
>
// <Radio.Group style=
{{
marginTop
:
'0.3rem'
}}
>
// <Radio
// value="默认为空"
// defaultChecked
// style=
{{
width
:
'18rem'
,
marginBottom
:
'0.5rem'
}}
// >
// 默认为空
// </Radio>
// <Radio value="">默认为当前时间</Radio>
// <Radio value="不可选择" style=
{{
width
:
'18rem'
}}
>
// 锁定为当前时间(通过用户点击刷新)
// </Radio>
// <Radio value="不超过当前时间">不超过当前时间</Radio>
// </Radio.Group>
// </Item>
// );
// case '坐标控件':
// return (
// <Item label="选项" name="Config" labelCol=
{{
span
:
3
}}
>
// <div>
// <Checkbox
// value="当前坐标"
// style=
{{
marginRight
:
'0.2rem'
}}
// checked=
{
pramData
.
coordinates
}
// onChange=
{
e
=>
onChangeReady
(
e
,
'coordinates'
)}
// />
// 锁定为当前位置坐标
// </div>
// </Item>
// );
case
'日期时间'
:
case
'日期'
:
case
'日期月份'
:
case
'日期年份'
:
case
'日期周'
:
case
'时分秒'
:
return
(
<
Item
label=
"选项"
name=
"Config"
labelCol=
{
{
span
:
3
}
}
>
<
Radio
.
Group
style=
{
{
marginTop
:
'0.3rem'
}
}
value=
{
timeData
}
onChange=
{
timeDataOnVChange
}
>
<
Radio
value=
"默认为空"
style=
{
{
width
:
'18rem'
,
marginBottom
:
'0.5rem'
}
}
>
默认为空
</
Radio
>
<
Radio
value=
"默认为当前时间"
>
默认为当前时间
</
Radio
>
<
Radio
value=
"不可选择"
style=
{
{
width
:
'18rem'
}
}
>
锁定为当前时间
</
Radio
>
<
Radio
value=
"不超过当前时间"
>
不超过当前时间
</
Radio
>
</
Radio
.
Group
>
</
Item
>
);
case
'坐标控件'
:
return
(
<
Item
label=
"选项"
name=
"Config"
labelCol=
{
{
span
:
3
}
}
>
<
div
>
<
Checkbox
value=
"当前坐标"
style=
{
{
marginRight
:
'0.2rem'
}
}
checked=
{
pramData
.
coordinates
}
onChange=
{
e
=>
onChangeReady
(
e
,
'coordinates'
)
}
/>
锁定为当前位置坐标
</
div
>
</
Item
>
);
case
'位置坐标'
:
return
(
<
Item
label=
"字段名称"
name=
"Config"
labelCol=
{
{
span
:
3
}
}
>
...
...
@@ -2290,14 +2793,7 @@ const AddModal = props => {
case
'可预览图片'
:
case
'录音'
:
case
'视频'
:
case
'日期'
:
case
'日期时间'
:
case
'日期月份'
:
case
'日期年份'
:
case
'日期周'
:
case
'时分秒'
:
case
'设备选择'
:
case
'坐标控件'
:
case
'区域控件'
:
case
'路径控件'
:
case
'智能抄表'
:
...
...
@@ -2318,7 +2814,7 @@ const AddModal = props => {
<
Item
label=
"预设值"
labelCol=
{
{
span
:
3
}
}
>
{
/* <div className={styles.listEvent}> */
}
<
Row
>
<
Col
span=
{
1
1
}
>
<
Col
span=
{
1
0
}
>
<
Input
// style=
{{
width
:
'41%',
height
:
'1
.
8
rem
'
}}
value=
{
pramData
.
Preset
}
...
...
@@ -2327,7 +2823,7 @@ const AddModal = props => {
allowClear
/>
</
Col
>
<
Col
span=
{
1
0
}
>
<
Col
span=
{
1
3
}
>
<
Item
style=
{
{
marginLeft
:
'1rem'
}
}
label=
"验证"
...
...
@@ -2337,7 +2833,7 @@ const AddModal = props => {
<
Input
style=
{
{
width
:
'92%'
}
}
placeholder=
""
allowClear
/>
</
Item
>
</
Col
>
<
Col
span=
{
3
}
>
<
Col
span=
{
1
}
>
<
Tooltip
title=
"选择验证规则"
>
<
PlusSquareOutlined
onClick=
{
()
=>
{
...
...
@@ -2347,6 +2843,7 @@ const AddModal = props => {
fontSize
:
'24px'
,
color
:
'#1890FF'
,
marginTop
:
'8px'
,
marginLeft
:
'-10px'
,
}
}
/>
</
Tooltip
>
...
...
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