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
5f3f16f2
Commit
5f3f16f2
authored
Jun 27, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '巡维保前端界面优化'
parent
4ff2023e
Pipeline
#54018
waiting for manual action with stages
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
218 additions
and
691 deletions
+218
-691
fieldEditor.jsx
...s/bsmanager/base/tablemanager/filedConfig/fieldEditor.jsx
+130
-469
AddModal.jsx
src/pages/bsmanager/maintenance/AddModal.jsx
+60
-171
ChangeAdd.jsx
src/pages/bsmanager/maintenance/ChangeAdd.jsx
+14
-8
maintenance.jsx
src/pages/bsmanager/maintenance/maintenance.jsx
+14
-43
No files found.
src/pages/bsmanager/base/tablemanager/filedConfig/fieldEditor.jsx
View file @
5f3f16f2
...
...
@@ -273,33 +273,6 @@ const AddModal = props => {
data
[
0
].
Config
=
`
${
data
[
0
].
Config
}
?
${
obj
.
filterName
}
`
;
}
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
(
checkboxAll1
==
true
)
{
if
(
checkboxAllID1
==
true
)
{
...
...
@@ -419,6 +392,30 @@ const AddModal = props => {
?
(
coordinates
=
true
)
:
(
coordinates
=
false
);
break
;
case
'日期时间'
:
case
'日期'
:
case
'日期月份'
:
case
'日期年份'
:
case
'日期周'
:
case
'时分秒'
:
if
(
res
[
0
].
data
.
root
.
Config
===
'默认为空'
)
{
form
.
setFieldsValue
({
Config
:
'默认为空'
,
});
}
else
if
(
res
[
0
].
data
.
root
.
Config
===
'锁定为当前时间'
)
{
form
.
setFieldsValue
({
Config
:
'不可选择'
,
});
}
else
if
(
res
[
0
].
data
.
root
.
Config
===
'默认为当前时间'
)
{
form
.
setFieldsValue
({
Config
:
'默认为当前时间'
,
});
}
else
if
(
res
[
0
].
data
.
root
.
Config
===
'不超过当前时间'
)
{
form
.
setFieldsValue
({
Config
:
'不超过当前时间'
,
});
}
break
;
case
'图片'
:
case
'可预览图片'
:
res
[
0
].
data
.
root
.
Preset
===
'拍照相册'
?
(
picture
=
true
)
:
(
picture
=
false
);
...
...
@@ -542,66 +539,6 @@ 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
);
...
...
@@ -653,11 +590,9 @@ const AddModal = props => {
});
}
if
(
res
[
0
].
data
.
root
.
Config
.
endsWith
(
'.n'
))
{
console
.
log
(
1212
);
form
.
setFieldsValue
({
choose
:
false
});
setCho
(
false
);
}
else
{
console
.
log
(
3434
);
form
.
setFieldsValue
({
choose
:
true
});
setCho
(
true
);
}
...
...
@@ -700,16 +635,6 @@ const AddModal = props => {
}
},
[
isVisible
]);
const
layout
=
{
layout
:
'horizontal'
,
labelCol
:
{
span
:
3
,
},
wrapperCol
:
{
span
:
30
,
},
};
const
handleChange
=
value
=>
{
form
.
setFieldsValue
({
schemename
:
value
});
};
...
...
@@ -1053,14 +978,39 @@ const AddModal = props => {
}
else
{
setDetail
(
''
);
}
console
.
log
(
aa
.
Shape
);
let
coordinates
=
false
,
picture
=
false
,
must
=
false
;
switch
(
aa
.
Shape
)
{
case
'坐标控件'
:
aa
.
Config
===
'当前坐标'
?
(
coordinates
=
true
)
:
(
coordinates
=
false
);
break
;
case
'日期时间'
:
case
'日期'
:
case
'日期月份'
:
case
'日期年份'
:
case
'日期周'
:
case
'时分秒'
:
if
(
aa
.
Config
===
'默认为空'
)
{
form
.
setFieldsValue
({
Config
:
'默认为空'
,
});
}
else
if
(
aa
.
Config
===
'锁定为当前时间'
)
{
form
.
setFieldsValue
({
Config
:
'不可选择'
,
});
}
else
if
(
aa
.
Config
===
'默认为当前时间'
)
{
form
.
setFieldsValue
({
Config
:
'默认为当前时间'
,
});
}
else
if
(
aa
.
Config
===
'不超过当前时间'
)
{
form
.
setFieldsValue
({
Config
:
'不超过当前时间'
,
});
}
break
;
case
'图片'
:
case
'可预览图片'
:
aa
.
Preset
===
'拍照相册'
?
(
picture
=
true
)
:
(
picture
=
false
);
...
...
@@ -1184,62 +1134,6 @@ 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
(
'.'
);
console
.
log
(
pepole
);
...
...
@@ -1323,6 +1217,7 @@ const AddModal = props => {
setCheckedList
(
res
[
0
].
data
.
root
.
ExceptionEventFields
.
split
(
','
));
}
setShape
(
res
[
0
].
data
.
root
.
Shape
);
console
.
log
(
res
[
0
].
data
.
root
.
Shape
);
let
coordinates
=
false
,
picture
=
false
,
must
=
false
;
...
...
@@ -1332,6 +1227,30 @@ const AddModal = props => {
?
(
coordinates
=
true
)
:
(
coordinates
=
false
);
break
;
case
'日期时间'
:
case
'日期'
:
case
'日期月份'
:
case
'日期年份'
:
case
'日期周'
:
case
'时分秒'
:
if
(
res
[
0
].
data
.
root
.
Config
===
'默认为空'
)
{
form
.
setFieldsValue
({
Config
:
'默认为空'
,
});
}
else
if
(
res
[
0
].
data
.
root
.
Config
===
'锁定为当前时间'
)
{
form
.
setFieldsValue
({
Config
:
'不可选择'
,
});
}
else
if
(
res
[
0
].
data
.
root
.
Config
===
'默认为当前时间'
)
{
form
.
setFieldsValue
({
Config
:
'默认为当前时间'
,
});
}
else
if
(
res
[
0
].
data
.
root
.
Config
===
'不超过当前时间'
)
{
form
.
setFieldsValue
({
Config
:
'不超过当前时间'
,
});
}
break
;
case
'图片'
:
case
'可预览图片'
:
res
[
0
].
data
.
root
.
Preset
===
'拍照相册'
?
(
picture
=
true
)
:
(
picture
=
false
);
...
...
@@ -1456,67 +1375,6 @@ 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
(
'.'
);
console
.
log
(
pepole
);
...
...
@@ -1683,38 +1541,6 @@ const AddModal = props => {
data
[
0
].
Config
=
`
${
data
[
0
].
Config
}
?
${
obj
.
filterName
}
`
;
}
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
'人员选择器'
:
if
(
checkboxAll1
==
true
)
{
if
(
checkboxAllID1
==
true
)
{
...
...
@@ -1970,14 +1796,10 @@ 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
);
};
...
...
@@ -1986,13 +1808,13 @@ const AddModal = props => {
let
bb
=
form
.
getFieldsValue
().
Config
;
setCheckboxAll1
(
e
.
target
.
checked
);
if
(
e
.
target
.
checked
==
true
)
{
if
(
bb
)
{
if
(
bb
||
bb
==
''
||
bb
==
undefined
)
{
form
.
setFieldsValue
({
ConfigName
:
bb
});
}
setHide
(
false
);
setFlag
(
true
);
}
else
{
if
(
aa
)
{
if
(
aa
||
aa
==
''
||
bb
==
undefined
)
{
form
.
setFieldsValue
({
Config
:
aa
});
}
setHide
(
true
);
...
...
@@ -2009,7 +1831,7 @@ const AddModal = props => {
<>
<
Drawer
title=
"修改"
width=
"
9
00px"
width=
"
10
00px"
// {...props}
visible=
{
isVisible
}
onClose=
{
onCancel
}
...
...
@@ -2051,15 +1873,15 @@ const AddModal = props => {
<
Item
label=
"字段名"
name=
"Name"
labelCol=
{
{
span
:
3
}
}
labelCol=
{
{
span
:
4
}
}
rules=
{
[{
required
:
true
,
message
:
'请输入表名'
}]
}
>
<
Input
placeholder=
"请输入别名"
disabled
style=
{
{
width
:
'93%'
}
}
/>
<
Input
placeholder=
"请输入别名"
disabled
/>
</
Item
>
<
Item
label=
"别名"
name=
"Alias"
labelCol=
{
{
span
:
3
}
}
>
<
Input
placeholder=
"请输入别名"
allowClear
style=
{
{
width
:
'93%'
}
}
/>
<
Item
label=
"别名"
name=
"Alias"
labelCol=
{
{
span
:
4
}
}
>
<
Input
placeholder=
"请输入别名"
allowClear
/>
</
Item
>
<
Item
name=
"ReadOnly"
label=
"属性"
labelCol=
{
{
span
:
3
}
}
>
<
Item
name=
"ReadOnly"
label=
"属性"
labelCol=
{
{
span
:
4
}
}
>
<
div
>
<
Checkbox
checked=
{
pramData
.
ReadOnly
}
...
...
@@ -2075,7 +1897,7 @@ const AddModal = props => {
</
Checkbox
>
</
div
>
</
Item
>
<
Item
label=
"同步"
name=
"SyncEvent"
labelCol=
{
{
span
:
3
}
}
>
<
Item
label=
"同步"
name=
"SyncEvent"
labelCol=
{
{
span
:
4
}
}
>
<
Radio
.
Group
>
<
Radio
value=
{
0
}
style=
{
{
marginRight
:
'0.5rem'
}
}
>
不同步
...
...
@@ -2088,8 +1910,8 @@ const AddModal = props => {
</
Item
>
<
Row
>
{
/* <Col span={1} /> */
}
<
Col
span=
{
1
5
}
>
<
Item
label=
"形态"
labelCol=
{
{
span
:
5
}
}
>
<
Col
span=
{
1
6
}
>
<
Item
label=
"形态"
labelCol=
{
{
span
:
6
}
}
>
<
div
className=
{
styles
.
listEvent
}
>
<
TreeSelect
style=
{
{
width
:
'95%'
}
}
...
...
@@ -2134,13 +1956,13 @@ const AddModal = props => {
</
Col
>
<
Col
span=
{
5
}
>
<
Item
label=
"单位"
name=
"Unit"
labelCol=
{
{
span
:
7
}
}
>
<
Item
label=
"单位"
name=
"Unit"
labelCol=
{
{
span
:
10
}
}
>
<
Input
style=
{
{
width
:
'95%'
}
}
placeholder=
""
/>
</
Item
>
</
Col
>
<
Col
span=
{
3
}
>
<
Item
label=
"宽"
name=
"RowSpan"
labelCol=
{
{
span
:
7
}
}
>
<
Input
style=
{
{
width
:
'87%'
}
}
placeholder=
""
/>
<
Item
label=
"宽"
name=
"RowSpan"
labelCol=
{
{
span
:
8
}
}
>
<
Input
placeholder=
""
/>
</
Item
>
</
Col
>
</
Row
>
...
...
@@ -2151,10 +1973,10 @@ const AddModal = props => {
case
'编码'
:
return
(
<>
<
Item
label=
"前缀"
name=
"prefix"
labelCol=
{
{
span
:
3
}
}
>
<
Input
style=
{
{
width
:
'93%'
}
}
placeholder=
""
allowClear
/>
<
Item
label=
"前缀"
name=
"prefix"
labelCol=
{
{
span
:
4
}
}
>
<
Input
placeholder=
""
allowClear
/>
</
Item
>
<
Item
label=
"编码方式"
name=
"code"
labelCol=
{
{
span
:
3
}
}
>
<
Item
label=
"编码方式"
name=
"code"
labelCol=
{
{
span
:
4
}
}
>
<
Radio
.
Group
>
<
Radio
value=
"年份编码"
style=
{
{
marginRight
:
'0.5rem'
}
}
>
XJ-2019-000001(前缀-年份-六位编码)
...
...
@@ -2174,10 +1996,9 @@ const AddModal = props => {
return
(
<>
{
' '
}
<
Item
label=
"可选值"
name=
"Config"
labelCol=
{
{
span
:
3
}
}
>
<
Item
label=
"可选值"
name=
"Config"
labelCol=
{
{
span
:
4
}
}
>
<
TextArea
allowClear
style=
{
{
width
:
'93%'
}
}
placeholder=
"用英文逗号分隔自定义的值,可设置初始值"
/>
</
Item
>
...
...
@@ -2206,10 +2027,9 @@ const AddModal = props => {
return
(
<>
{
' '
}
<
Item
label=
"可选值"
name=
"Config"
labelCol=
{
{
span
:
3
}
}
>
<
Item
label=
"可选值"
name=
"Config"
labelCol=
{
{
span
:
4
}
}
>
<
TextArea
allowClear
style=
{
{
width
:
'93%'
}
}
placeholder=
"用英文逗号分隔自定义的值,可编辑,可设置初始值"
/>
</
Item
>
...
...
@@ -2219,19 +2039,13 @@ const AddModal = props => {
return
(
<>
{
' '
}
<
Item
label=
"可选值"
name=
"Config"
labelCol=
{
{
span
:
3
}
}
// rules=
{[{
required
:
true
,
message
:
'请输入表名'
}]}
>
<
Item
label=
"可选值"
name=
"Config"
labelCol=
{
{
span
:
4
}
}
>
<
TextArea
allowClear
style=
{
{
width
:
'93%'
}
}
placeholder=
"用英文逗号分隔自定义的值,勾选,可设置初始值"
/>
</
Item
>
<
Item
colon=
{
false
}
name=
"check"
label=
"配置:"
labelCol=
{
{
span
:
3
}
}
>
<
Item
colon=
{
false
}
name=
"check"
label=
"配置:"
labelCol=
{
{
span
:
4
}
}
>
<
Radio
.
Group
onChange=
{
onChange2
}
value=
{
radio
}
defaultValue=
{
chee
}
>
<
Radio
value=
{
0
}
>
单选
</
Radio
>
<
Radio
value=
{
1
}
>
多选
</
Radio
>
...
...
@@ -2242,7 +2056,7 @@ const AddModal = props => {
case
'图片'
:
// case '可预览图片':
return
(
<
Item
name=
"ReadOnly"
label=
"选项"
labelCol=
{
{
span
:
3
}
}
>
<
Item
name=
"ReadOnly"
label=
"选项"
labelCol=
{
{
span
:
4
}
}
>
<
div
>
<
Checkbox
checked=
{
pramData
.
picture
}
...
...
@@ -2266,20 +2080,20 @@ const AddModal = props => {
<
Item
label=
"表名"
name=
"tableName"
labelCol=
{
{
span
:
6
}
}
labelCol=
{
{
span
:
8
}
}
rules=
{
[{
required
:
true
,
message
:
'请输入表名'
}]
}
>
<
Input
style=
{
{
width
:
'95%'
}
}
placeholder=
"请输入表名"
/>
<
Input
placeholder=
"请输入表名"
/>
</
Item
>
</
Col
>
<
Col
span=
{
12
}
>
<
Item
label=
"字段名"
name=
"fieldName"
labelCol=
{
{
span
:
5
}
}
labelCol=
{
{
span
:
8
}
}
rules=
{
[{
required
:
true
,
message
:
'请输入表名'
}]
}
>
<
Input
style=
{
{
width
:
'85%'
}
}
placeholder=
"请输入字段名"
/>
<
Input
placeholder=
"请输入字段名"
/>
</
Item
>
</
Col
>
</
Row
>
...
...
@@ -2292,24 +2106,24 @@ const AddModal = props => {
<
Item
label=
"表名"
name=
"tableName"
labelCol=
{
{
span
:
6
}
}
labelCol=
{
{
span
:
8
}
}
rules=
{
[{
required
:
true
,
message
:
'请输入表名'
}]
}
>
<
Input
style=
{
{
width
:
'95%'
}
}
placeholder=
"请输入表名"
/>
<
Input
placeholder=
"请输入表名"
/>
</
Item
>
</
Col
>
<
Col
span=
{
12
}
>
<
Item
label=
"字段名"
name=
"fieldName"
labelCol=
{
{
span
:
5
}
}
labelCol=
{
{
span
:
8
}
}
rules=
{
[{
required
:
true
,
message
:
'请输入表名'
}]
}
>
<
Input
style=
{
{
width
:
'85%'
}
}
placeholder=
"请输入字段名"
/>
<
Input
placeholder=
"请输入字段名"
/>
</
Item
>
</
Col
>
</
Row
>
<
Item
colon=
{
false
}
name=
"check"
label=
"配置:"
labelCol=
{
{
span
:
3
}
}
>
<
Item
colon=
{
false
}
name=
"check"
label=
"配置:"
labelCol=
{
{
span
:
4
}
}
>
<
Radio
.
Group
onChange=
{
onChange2
}
value=
{
radio
}
defaultValue=
{
chee
}
>
<
Radio
value=
{
0
}
>
单选
</
Radio
>
<
Radio
value=
{
1
}
>
多选
</
Radio
>
...
...
@@ -2323,14 +2137,10 @@ const AddModal = props => {
<
Item
label=
"配置"
name=
"Config"
labelCol=
{
{
span
:
3
}
}
labelCol=
{
{
span
:
4
}
}
// rules=
{[{
required
:
true
,
message
:
'请输入数据字典名称'
}]}
>
<
TextArea
allowClear
style=
{
{
width
:
'93%'
}
}
placeholder=
"请输入数据字典名称"
/>
<
TextArea
allowClear
placeholder=
"请输入数据字典名称"
/>
</
Item
>
</>
);
...
...
@@ -2340,16 +2150,12 @@ const AddModal = props => {
<
Item
label=
"数据字典名称"
name=
"Config"
labelCol=
{
{
span
:
7
}
}
labelCol=
{
{
span
:
4
}
}
// rules=
{[{
required
:
true
,
message
:
'请输入数据字典名称'
}]}
>
<
Input
allowClear
style=
{
{
width
:
'92%'
}
}
placeholder=
"请输入数据字典名称"
/>
<
Input
allowClear
placeholder=
"请输入数据字典名称"
/>
</
Item
>
<
Item
colon=
{
false
}
name=
"check"
label=
"配置:"
labelCol=
{
{
span
:
7
}
}
>
<
Item
colon=
{
false
}
name=
"check"
label=
"配置:"
labelCol=
{
{
span
:
4
}
}
>
<
Radio
.
Group
onChange=
{
onChange2
}
value=
{
radio
}
defaultValue=
{
chee
}
>
<
Radio
value=
{
0
}
>
单选
</
Radio
>
<
Radio
value=
{
1
}
>
多选
</
Radio
>
...
...
@@ -2360,7 +2166,7 @@ const AddModal = props => {
case
'部门选择器'
:
return
(
<>
<
Item
colon=
{
false
}
name=
"check"
label=
"配置:"
labelCol=
{
{
span
:
3
}
}
>
<
Item
colon=
{
false
}
name=
"check"
label=
"配置:"
labelCol=
{
{
span
:
4
}
}
>
<
Radio
.
Group
onChange=
{
onChange2
}
value=
{
radio
}
defaultValue=
{
chee
}
>
<
Radio
value=
{
0
}
>
单选
</
Radio
>
<
Radio
value=
{
1
}
>
多选
</
Radio
>
...
...
@@ -2370,24 +2176,7 @@ const AddModal = props => {
);
case
'站点选择器'
:
return
(
<
Item
name=
"Config"
labelCol=
{
{
span
:
3
}
}
// label=
{
// <div>
// <Tooltip title="默认全局多选">
// <InfoCircleOutlined
// style=
{{
// color: 'rgb(24 144 255)',
// marginRight: '2px',
//
}}
// />
// </Tooltip>
// <span>配置</span>
// </div>
//
}
label=
"配置"
>
<
Item
name=
"Config"
labelCol=
{
{
span
:
4
}
}
label=
"配置"
>
<
div
style=
{
{
display
:
'inline-block'
}
}
>
<
Item
name=
"pepole"
style=
{
{
marginBottom
:
'0'
}
}
>
<
Checkbox
...
...
@@ -2416,7 +2205,7 @@ const AddModal = props => {
return
(
<>
<
Row
>
<
Col
span=
{
1
2
}
>
<
Col
span=
{
1
6
}
>
<
Item
label=
"台账名"
name=
"standingBook"
...
...
@@ -2434,23 +2223,20 @@ const AddModal = props => {
</
Select
>
</
Item
>
</
Col
>
<
Col
span=
{
12
}
>
<
Col
span=
{
8
}
>
<
Item
label=
"字段名"
name=
"fieldName"
labelCol=
{
{
span
:
5
}
}
labelCol=
{
{
span
:
8
}
}
rules=
{
[{
required
:
true
,
message
:
'请输入字段名'
}]
}
>
<
Input
style=
{
{
width
:
'85%'
}
}
placeholder=
"请输入字段名"
/>
<
Input
placeholder=
"请输入字段名"
/>
</
Item
>
</
Col
>
</
Row
>
{
/* <Col span={12}> */
}
<
Item
label=
"台账过滤"
name=
"filterName"
labelCol=
{
{
span
:
3
}
}
>
<
TextArea
style=
{
{
width
:
'93%'
}
}
placeholder=
"示例:部门='研发一部'"
/>
<
Item
label=
"SQL过滤"
name=
"filterName"
labelCol=
{
{
span
:
4
}
}
>
<
TextArea
placeholder=
"示例:部门='研发一部'"
/>
</
Item
>
{
/* </Col> */
}
...
...
@@ -2466,7 +2252,7 @@ const AddModal = props => {
</Item>
</Col> */
}
<
Item
colon=
{
false
}
name=
"check"
label=
"配置:"
labelCol=
{
{
span
:
3
}
}
>
<
Item
colon=
{
false
}
name=
"check"
label=
"配置:"
labelCol=
{
{
span
:
4
}
}
>
<
Radio
.
Group
onChange=
{
onChange2
}
value=
{
radio
}
defaultValue=
{
chee
}
>
<
Radio
value=
{
0
}
>
单选
</
Radio
>
<
Radio
value=
{
1
}
>
多选
</
Radio
>
...
...
@@ -2477,119 +2263,8 @@ const AddModal = props => {
case
'人员选择器'
:
return
(
<>
{
/* <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> */
}
{
/* {(() => {
switch (radio1) {
case '全部':
return (
<>
<Item
colon={false}
label="全部ID:"
name="AllID"
labelCol={{ span: 3 }}
>
<Radio.Group onChange={onChange3} value={radio3}>
<Radio value="0">否</Radio>
<Radio value="全部ID">是</Radio>
</Radio.Group>
</Item>
<Item
colon={false}
name="check"
label="形态功能:"
labelCol={{ span: 3 }}
>
<Radio.Group onChange={onChange2} value={radio}>
<Radio value={0}>单选</Radio>
<Radio value={1}>多选</Radio>
</Radio.Group>
</Item>
<Item
label="角色或机构名称"
name="ConfigName"
labelCol={{ span: 5 }}
rules={[
{
validator: (rule, value) => {
let str = /[.]/g;
if (str.test(form.getFieldValue().ConfigName)) {
return Promise.reject('.作为分隔符,请勿输入');
}
return Promise.resolve();
},
},
]}
>
<Input
allowClear
style={{ width: '92%' }}
placeholder="请输入角色或机构名称"
onChange={inputOnChange}
/>
</Item>
<Item label="配置" name="ShowConfig" labelCol={{ span: 5 }}>
<Input allowClear style={{ width: '92%' }} disabled />
</Item>
</>
);
case '0':
return (
<>
<Item
colon={false}
name="check"
label="形态功能:"
labelCol={{ span: 3 }}
>
<Radio.Group onChange={onChange2} value={radio}>
<Radio value={0}>单选</Radio>
<Radio value={1}>多选</Radio>
</Radio.Group>
</Item>
<Item
label="角色或机构或部门名称"
name="Config"
labelCol={{ span: 7 }}
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>
<Item label="配置" name="ShowConfig" labelCol={{ span: 5 }}>
<Input allowClear style={{ width: '92%' }} disabled />
</Item>
</>
);
}
})()} */
}
<
Item
labelCol=
{
{
span
:
3
}
}
labelCol=
{
{
span
:
4
}
}
label=
{
<
div
>
<
Tooltip
...
...
@@ -2660,18 +2335,6 @@ const AddModal = props => {
</
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
)
{
...
...
@@ -2681,7 +2344,7 @@ const AddModal = props => {
<
Item
label=
"角色|机构"
name=
"ConfigName"
labelCol=
{
{
span
:
3
}
}
labelCol=
{
{
span
:
4
}
}
rules=
{
[
{
validator
:
(
rule
,
value
)
=>
{
...
...
@@ -2696,7 +2359,6 @@ const AddModal = props => {
>
<
Input
allowClear
style=
{
{
width
:
'93%'
}
}
placeholder=
"请输入角色或机构名称"
onChange=
{
inputOnChange
}
/>
...
...
@@ -2709,7 +2371,7 @@ const AddModal = props => {
<
Item
label=
"角色|机构"
name=
"Config"
labelCol=
{
{
span
:
3
}
}
labelCol=
{
{
span
:
4
}
}
rules=
{
[
{
required
:
true
,
...
...
@@ -2728,7 +2390,6 @@ const AddModal = props => {
>
<
Input
allowClear
style=
{
{
width
:
'93%'
}
}
placeholder=
"请输入角色或机构名称"
onChange=
{
inputOnchange
}
/>
...
...
@@ -2747,7 +2408,7 @@ const AddModal = props => {
case
'日期周'
:
case
'时分秒'
:
return
(
<
Item
label=
"选项"
name=
"Config"
labelCol=
{
{
span
:
3
}
}
>
<
Item
label=
"选项"
name=
"Config"
labelCol=
{
{
span
:
4
}
}
>
<
Radio
.
Group
style=
{
{
marginTop
:
'0.3rem'
}
}
value=
{
timeData
}
...
...
@@ -2769,7 +2430,7 @@ const AddModal = props => {
);
case
'坐标控件'
:
return
(
<
Item
label=
"选项"
name=
"Config"
labelCol=
{
{
span
:
3
}
}
>
<
Item
label=
"选项"
name=
"Config"
labelCol=
{
{
span
:
4
}
}
>
<
div
>
<
Checkbox
value=
"当前坐标"
...
...
@@ -2783,7 +2444,7 @@ const AddModal = props => {
);
case
'位置坐标'
:
return
(
<
Item
label=
"字段名称"
name=
"Config"
labelCol=
{
{
span
:
3
}
}
>
<
Item
label=
"字段名称"
name=
"Config"
labelCol=
{
{
span
:
4
}
}
>
<
Input
allowClear
style=
{
{
width
:
'93%'
}
}
...
...
@@ -2809,8 +2470,8 @@ const AddModal = props => {
return
<></>;
default
:
return
(
<
Item
label=
"配置"
name=
"Config"
labelCol=
{
{
span
:
3
}
}
>
<
TextArea
allowClear
style=
{
{
width
:
'93%'
}
}
placeholder=
{
detail
}
/>
<
Item
label=
"配置"
name=
"Config"
labelCol=
{
{
span
:
4
}
}
>
<
TextArea
allowClear
placeholder=
{
detail
}
/>
</
Item
>
);
}
...
...
@@ -2819,7 +2480,7 @@ const AddModal = props => {
{
Shape
===
'图片'
||
Shape
===
'可预览图片'
?
(
''
)
:
(
<
Item
label=
"预设值"
labelCol=
{
{
span
:
3
}
}
>
<
Item
label=
"预设值"
labelCol=
{
{
span
:
4
}
}
>
{
/* <div className={styles.listEvent}> */
}
<
Row
>
<
Col
span=
{
10
}
>
...
...
@@ -2835,7 +2496,7 @@ const AddModal = props => {
<
Item
style=
{
{
marginLeft
:
'1rem'
}
}
label=
"验证"
labelCol=
{
{
span
:
5
}
}
labelCol=
{
{
span
:
8
}
}
name=
"ValidationRule"
>
<
Input
style=
{
{
width
:
'92%'
}
}
placeholder=
""
allowClear
/>
...
...
src/pages/bsmanager/maintenance/AddModal.jsx
View file @
5f3f16f2
/* eslint-disable indent */
/* eslint-disable camelcase */
/* eslint-disable no-unused-expressions */
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Drawer
,
...
...
@@ -11,9 +14,10 @@ import {
Dropdown
,
Menu
,
Space
,
Radio
,
}
from
'antd'
;
import
{
PlusOutlined
,
DownOutlined
,
StepForwardFilled
}
from
'@ant-design/icons'
;
import
styles
from
'./maintenance.less'
;
import
ModalDrag
from
'./ModalDrag'
;
import
{
CM_XWBPlan_AccountTable
,
CM_XWBPlan_feedbackTable
,
...
...
@@ -21,7 +25,7 @@ import {
CM_XWBPlan_DataList
,
}
from
'@/services/maintenance/api'
;
import
{
CM_Event_LoadDepartmentAndRoles
}
from
'@/services/standingBook/api'
;
import
{
PlusOutlined
,
DownOutlined
,
StepForwardFilled
}
from
'@ant-design/icons'
;
import
ChangeAdd
from
'./ChangeAdd'
;
const
{
Option
}
=
Select
;
...
...
@@ -45,19 +49,22 @@ const AddModal = props => {
const
[
checkedList1
,
setCheckedList1
]
=
useState
([]);
// 最新选择数据
const
[
characterValue
,
setCharacterValue
]
=
useState
(
''
);
// 打开弹框之前数据
const
[
ff
,
setFf
]
=
useState
([]);
const
[
chee
,
setChee
]
=
useState
(
''
);
const
[
form
]
=
Form
.
useForm
();
const
{
Item
}
=
Form
;
const
{
TextArea
}
=
Input
;
useEffect
(()
=>
{
if
(
visible
)
{
getRole
();
if
(
type
===
'add'
)
{
setChee
(
'否'
);
form
.
setFieldsValue
({
isSubmit
:
'否'
,
docycle
:
'一周一次'
});
setType1
(
''
);
setType2
(
''
);
setInputValue
({
feedbackName
:
''
,
doRole
:
''
});
setFiled1
({});
form
.
resetFields
();
}
else
if
(
type
===
'edit'
)
{
CM_XWBPlan_DataList
({
id
:
formObj
.
id
}).
then
(
res
=>
{
let
data
=
res
.
data
[
0
];
...
...
@@ -68,6 +75,10 @@ const AddModal = props => {
setType2
(
data
.
accountName
);
});
}
}
else
{
setChee
(
''
);
form
.
resetFields
();
}
},
[
visible
]);
useEffect
(()
=>
{
...
...
@@ -270,12 +281,19 @@ const AddModal = props => {
setInputValue
(
inputText
);
};
// const title = <ModalDrag title="巡维保计划配置" />
const
inputType
=
value
=>
{
console
.
log
(
value
);
if
(
value
)
{
form
.
setFieldsValue
({
businessType
:
value
});
}
};
return
(
<
Drawer
title=
"巡维保计划配置"
visible=
{
visible
}
destroyOnClose
width=
"6
0
0px"
width=
"6
5
0px"
{
...
props
}
footer=
{
<
Space
>
...
...
@@ -318,22 +336,15 @@ const AddModal = props => {
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
span
style=
{
{
position
:
'absolute'
,
left
:
'1%'
,
top
:
'9%'
,
color
:
'red'
,
fontSize
:
'16px'
,
}
}
>
*
</
span
>
<
Item
label=
"业务类型"
name=
"businessType"
labelCol=
{
{
span
:
4
}
}
rules=
{
[
{
required
:
true
,
message
:
'请输入业务名称'
,
},
{
validator
:
(
rule
,
value
)
=>
{
if
(
form
.
getFieldsValue
().
businessType
==
''
)
{
...
...
@@ -344,67 +355,15 @@ const AddModal = props => {
},
]
}
>
<
div
>
<
Input
className=
"ue-editable-select-input"
onChange=
{
inputType1
}
value=
{
Type1
}
placeholder=
"选择或手动输入业务类型"
/>
<
Dropdown
placement=
"bottomRight"
style=
{
{
width
:
'430px'
}
}
overlay=
{
<
Menu
>
<
Menu
.
Item
key=
"巡检"
onClick=
{
()
=>
{
setType1
(
'巡检'
);
form
.
setFieldsValue
({
businessType
:
'巡检'
});
}
}
style=
{
{
width
:
'430px'
,
marginLeft
:
'-8px'
}
}
>
巡检
</
Menu
.
Item
>
<
Menu
.
Item
key=
"保养"
onClick=
{
()
=>
{
setType1
(
'保养'
);
form
.
setFieldsValue
({
businessType
:
'保养'
});
}
}
style=
{
{
width
:
'430px'
,
marginLeft
:
'-8px'
}
}
>
保养
</
Menu
.
Item
>
</
Menu
>
}
>
<
div
className=
{
styles
.
linkDrowp
}
onClick=
{
e
=>
e
.
preventDefault
()
}
>
<
DownOutlined
style=
{
{
fontSize
:
'12px'
,
color
:
'rgba(0, 0, 0, 0.25)'
,
marginLeft
:
'5px'
,
}
}
/>
</
div
>
</
Dropdown
>
</
div
>
<
Select
placeholder=
"选择业务类型"
onSearch=
{
inputType
}
showSearch
>
<
Option
value=
"巡检"
>
巡检
</
Option
>
<
Option
value=
"保养"
>
保养
</
Option
>
</
Select
>
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
Item
label=
"执行周期"
name=
"docycle"
labelCol=
{
{
span
:
4
}
}
rules=
{
[
{
required
:
true
,
message
:
'请选择执行周期'
,
},
]
}
>
<
Select
placeholder=
"选择计划执行周期"
onChange=
{
changTable
}
value=
{
selectValue
}
>
<
Item
label=
"执行周期"
name=
"docycle"
labelCol=
{
{
span
:
4
}
}
>
<
Select
placeholder=
"选择计划执行周期"
>
<
Option
value=
"一周一次"
>
一周一次
</
Option
>
<
Option
value=
"半月一次"
>
半月一次
</
Option
>
<
Option
value=
"一月一次"
>
一月一次
</
Option
>
...
...
@@ -415,22 +374,15 @@ const AddModal = props => {
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
span
style=
{
{
position
:
'absolute'
,
left
:
'1%'
,
top
:
'9%'
,
color
:
'red'
,
fontSize
:
'16px'
,
}
}
>
*
</
span
>
<
Item
label=
"台账名称"
name=
"accountName"
labelCol=
{
{
span
:
4
}
}
rules=
{
[
{
required
:
true
,
message
:
'请输入业务名称'
,
},
{
validator
:
(
rule
,
value
)
=>
{
if
(
form
.
getFieldsValue
().
accountName
==
''
)
{
...
...
@@ -441,73 +393,27 @@ const AddModal = props => {
},
]
}
>
<
div
>
<
Input
className=
"ue-editable-select-input"
onChange=
{
inputType2
}
value=
{
Type2
}
placeholder=
"选择此计划关联的设备台账名称"
/>
<
Dropdown
placement=
"bottomRight"
style=
{
{
width
:
'430px'
}
}
overlay=
{
<
Menu
>
{
treeData
.
length
?
(
treeData
.
map
((
item
,
index
)
=>
{
return
(
<
Menu
.
Item
onClick=
{
()
=>
{
setType2
(
item
);
form
.
setFieldsValue
({
accountName
:
item
});
}
}
style=
{
{
width
:
'430px'
,
marginLeft
:
'-8px'
}
}
key=
{
index
}
>
<
Select
placeholder=
"选择此计划关联的设备台账名称"
showSearch
>
{
treeData
?
treeData
.
map
((
item
,
index
)
=>
(
<
Option
key=
{
index
}
value=
{
item
}
>
{
item
}
</
Menu
.
Item
>
);
})
)
:
(
<
Menu
.
Item
style=
{
{
width
:
'430px'
,
marginLeft
:
'-8px'
}
}
>
<
span
style=
{
{
color
:
'red'
}
}
>
暂无数据,请先配置台账管理台账名称为设备
</
span
>
</
Menu
.
Item
>
)
}
</
Menu
>
}
>
<
div
className=
{
styles
.
linkDrowp
}
onClick=
{
e
=>
e
.
preventDefault
()
}
>
<
DownOutlined
style=
{
{
fontSize
:
'12px'
,
color
:
'rgba(0, 0, 0, 0.25)'
,
marginLeft
:
'5px'
,
}
}
/>
</
div
>
</
Dropdown
>
</
div
>
</
Option
>
))
:
''
}
</
Select
>
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
span
style=
{
{
position
:
'absolute'
,
left
:
'1%'
,
top
:
'9%'
,
color
:
'red'
,
fontSize
:
'16px'
,
}
}
>
*
</
span
>
<
Item
label=
"反馈名称"
name=
"feedbackName"
labelCol=
{
{
span
:
4
}
}
rules=
{
[
{
required
:
true
,
message
:
'请输入业务名称'
,
},
{
validator
:
(
rule
,
value
)
=>
{
if
(
inputValue
.
feedbackName
==
''
)
{
...
...
@@ -530,28 +436,21 @@ const AddModal = props => {
type=
"dashed"
onClick=
{
()
=>
pickFiled
(
'feedbackName'
)
}
icon=
{
<
PlusOutlined
style=
{
{
marginTop
:
'5px'
}
}
/>
}
style=
{
{
marginLeft
:
'
0.5rem'
,
width
:
'4rem
'
}
}
style=
{
{
marginLeft
:
'
10px'
,
width
:
'70px
'
}
}
/>
</
div
>
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
span
style=
{
{
position
:
'absolute'
,
left
:
'1%'
,
top
:
'9%'
,
color
:
'red'
,
fontSize
:
'16px'
,
}
}
>
*
</
span
>
<
Item
label=
"执行角色"
name=
"doRole"
labelCol=
{
{
span
:
4
}
}
rules=
{
[
{
required
:
true
,
message
:
'请输入业务名称'
,
},
{
validator
:
(
rule
,
value
)
=>
{
if
(
inputValue
.
doRole
==
''
)
{
...
...
@@ -574,7 +473,7 @@ const AddModal = props => {
type=
"dashed"
onClick=
{
()
=>
pickFiled1
(
'doRole'
)
}
icon=
{
<
PlusOutlined
style=
{
{
marginTop
:
'5px'
}
}
/>
}
style=
{
{
marginLeft
:
'
0.5rem'
,
width
:
'4rem
'
}
}
style=
{
{
marginLeft
:
'
10px'
,
width
:
'70px
'
}
}
/>
</
div
>
</
Item
>
...
...
@@ -609,25 +508,15 @@ const AddModal = props => {
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
Item
label=
"是否送审"
name=
"isSubmit"
labelCol=
{
{
span
:
4
}
}
rules=
{
[
{
required
:
true
,
message
:
'请选择是否送审'
,
},
]
}
>
<
Select
placeholder=
"是否送审"
onChange=
{
changTable1
}
value=
{
selectValue1
}
>
<
Option
value=
"否"
>
否
</
Option
>
<
Option
value=
"是"
>
是
</
Option
>
</
Select
>
<
Item
label=
"是否送审"
name=
"isSubmit"
labelCol=
{
{
span
:
4
}
}
>
<
Radio
.
Group
defaultValue=
{
chee
}
>
<
Radio
value=
"否"
>
否
</
Radio
>
<
Radio
value=
"是"
>
是
</
Radio
>
</
Radio
.
Group
>
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
Item
label=
"
台账过滤条件
"
name=
"filterCondition"
labelCol=
{
{
span
:
4
}
}
>
<
Item
label=
"
SQL过滤
"
name=
"filterCondition"
labelCol=
{
{
span
:
4
}
}
>
<
TextArea
placeholder=
"例如:and 泵房品牌='熊猫'"
/>
</
Item
>
</
Col
>
...
...
src/pages/bsmanager/maintenance/ChangeAdd.jsx
View file @
5f3f16f2
...
...
@@ -88,6 +88,7 @@ const ChangeAdd = props => {
console
.
log
(
indeterminate
);
if
(
type
==
'edit'
)
{
if
(
isType
!=
''
&&
isType
===
'add'
)
{
// 反馈名称
let
checkArr
=
[];
console
.
log
(
newCheckedList
);
newCheckedList
.
map
(
checkItem
=>
{
...
...
@@ -96,11 +97,12 @@ const ChangeAdd = props => {
}
});
setCheckedList
(
checkArr
);
setIndeterminate
(
!!
newCheckedList
.
length
&&
newCheckedList
.
length
<
filed
.
length
);
setCheckAll
(
newCheckedList
.
length
===
filed
.
length
);
setIndeterminate
(
!!
checkArr
.
length
&&
checkArr
.
length
<
filed
.
length
);
setCheckAll
(
checkArr
.
length
===
filed
.
length
);
let
newArr
=
characterValue
.
length
?
characterValue
.
split
(
','
)
:
[];
setSelectData
(
newArr
);
}
else
if
(
isType
===
'app'
)
{
// 执行角色
let
checkArr
=
[];
console
.
log
(
newCheckedList
);
newCheckedList
.
map
(
checkItem
=>
{
...
...
@@ -109,26 +111,30 @@ const ChangeAdd = props => {
}
});
setCheckedList
(
checkArr
);
setIndeterminate
(
!!
newCheckedList
.
length
&&
newCheckedList
.
length
<
ff
.
length
);
setCheckAll
(
newCheckedList
.
length
===
ff
.
length
);
setIndeterminate
(
!!
checkArr
.
length
&&
checkArr
.
length
<
ff
.
length
);
setCheckAll
(
checkArr
.
length
===
ff
.
length
);
let
newArr
=
characterValue
.
length
?
characterValue
.
split
(
','
)
:
[];
setSelectData
(
newArr
);
}
}
else
{
if
(
isType
!=
''
&&
isType
===
'add'
)
{
// 反馈名称
let
checkArr
=
[];
console
.
log
(
filed
);
console
.
log
(
newCheckedList
);
newCheckedList
.
map
(
checkItem
=>
{
if
(
filed
.
includes
(
checkItem
))
{
checkArr
.
push
(
checkItem
);
}
});
console
.
log
(
checkArr
);
setCheckedList
(
checkArr
);
setIndeterminate
(
false
);
setCheckAll
(
false
);
setIndeterminate
(
!!
checkArr
.
length
&&
checkArr
.
length
<
filed
.
length
);
setCheckAll
(
checkArr
.
length
===
filed
.
length
);
let
newArr
=
characterValue
.
length
?
characterValue
.
split
(
','
)
:
[];
setSelectData
(
newArr
);
}
else
if
(
isType
===
'app'
)
{
// 执行角色
let
checkArr
=
[];
console
.
log
(
newCheckedList
);
newCheckedList
.
map
(
checkItem
=>
{
...
...
@@ -137,8 +143,8 @@ const ChangeAdd = props => {
}
});
setCheckedList
(
checkArr
);
setIndeterminate
(
false
);
setCheckAll
(
false
);
setIndeterminate
(
!!
checkArr
.
length
&&
checkArr
.
length
<
ff
.
length
);
setCheckAll
(
checkArr
.
length
===
ff
.
length
);
let
newArr
=
characterValue
.
length
?
characterValue
.
split
(
','
)
:
[];
setSelectData
(
newArr
);
}
...
...
src/pages/bsmanager/maintenance/maintenance.jsx
View file @
5f3f16f2
...
...
@@ -48,7 +48,7 @@ const maintenance = () => {
title
:
'业务类型'
,
dataIndex
:
'businessType'
,
key
:
'businessType'
,
//
width: 100,
width
:
100
,
onCell
:
()
=>
({
style
:
{
maxWidth
:
100
,
...
...
@@ -69,26 +69,17 @@ const maintenance = () => {
title
:
'执行周期'
,
dataIndex
:
'docycle'
,
key
:
'docycle'
,
// width: 100,
onCell
:
()
=>
({
style
:
{
maxWidth
:
100
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
cursor
:
'pointer'
,
},
}),
width
:
100
,
align
:
'center'
,
},
{
title
:
'台账名称'
,
dataIndex
:
'accountName'
,
key
:
'accountName'
,
// width: 1
00,
width
:
2
00
,
onCell
:
()
=>
({
style
:
{
maxWidth
:
1
00
,
maxWidth
:
2
00
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
...
...
@@ -106,10 +97,9 @@ const maintenance = () => {
title
:
'反馈名称'
,
dataIndex
:
'feedbackName'
,
key
:
'feedbackName'
,
width
:
200
,
onCell
:
()
=>
({
style
:
{
maxWidth
:
200
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
...
...
@@ -127,10 +117,10 @@ const maintenance = () => {
title
:
'台账过滤条件'
,
dataIndex
:
'filterCondition'
,
key
:
'filterCondition'
,
//
width: 150,
width
:
150
,
onCell
:
()
=>
({
style
:
{
maxWidth
:
20
0
,
maxWidth
:
15
0
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
...
...
@@ -149,32 +139,22 @@ const maintenance = () => {
dataIndex
:
'isSubmit'
,
key
:
'isSubmit'
,
width
:
80
,
onCell
:
()
=>
({
style
:
{
maxWidth
:
100
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
cursor
:
'pointer'
,
},
}),
align
:
'center'
,
},
{
title
:
'执行角色'
,
dataIndex
:
'doRole'
,
key
:
'doRole'
,
width
:
300
,
align
:
'center'
,
onCell
:
()
=>
({
style
:
{
maxWidth
:
350
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
cursor
:
'pointer'
,
},
}),
align
:
'center'
,
render
:
record
=>
(
<
Tooltip
placement=
"topLeft"
title=
{
record
}
>
{
record
}
...
...
@@ -186,32 +166,32 @@ const maintenance = () => {
dataIndex
:
'produceDays'
,
key
:
'produceDays'
,
width
:
80
,
align
:
'center'
,
onCell
:
()
=>
({
style
:
{
maxWidth
:
10
0
,
maxWidth
:
8
0
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
cursor
:
'pointer'
,
},
}),
align
:
'center'
,
},
{
title
:
'在线任务量'
,
dataIndex
:
'onLines'
,
key
:
'onLines'
,
width
:
80
,
align
:
'center'
,
onCell
:
()
=>
({
style
:
{
maxWidth
:
10
0
,
maxWidth
:
8
0
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
cursor
:
'pointer'
,
},
}),
align
:
'center'
,
render
:
record
=>
(
<
Tooltip
placement=
"topLeft"
title=
{
record
}
>
{
record
}
...
...
@@ -222,16 +202,7 @@ const maintenance = () => {
title
:
'启停'
,
dataIndex
:
'doNot'
,
key
:
'doNot'
,
// width: 100,
onCell
:
()
=>
({
style
:
{
maxWidth
:
100
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
cursor
:
'pointer'
,
},
}),
width
:
80
,
align
:
'center'
,
},
{
...
...
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