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
687fc85f
Commit
687fc85f
authored
Jan 22, 2024
by
田翔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 代码修复
parent
7bd3d305
Pipeline
#84513
waiting for manual action with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
77 deletions
+1
-77
AddModal.jsx
src/pages/bsmanager/workOrder/incident/AddModal.jsx
+1
-77
No files found.
src/pages/bsmanager/workOrder/incident/AddModal.jsx
View file @
687fc85f
...
...
@@ -558,7 +558,6 @@ const AddModal = (props) => {
}
// if ((obj.Roles == '' || obj.Roles == undefined) && obj.CreateMode === '0' ) {
if
((
obj
.
Roles
==
''
||
obj
.
Roles
==
undefined
)
&&
value
===
0
)
{
console
.
log
(
obj
.
CreateMode
);
notification
.
warning
({
message
:
'提示'
,
description
:
'事件权限必填'
,
...
...
@@ -793,7 +792,6 @@ const AddModal = (props) => {
LoadEventFields
({
eventTableName
:
value
,
distinctFields
:
''
}).
then
(
res
=>
{
if
(
res
.
data
.
root
)
{
setNu
(
res
.
data
.
root
);
console
.
log
(
res
.
data
.
root
);
setFiled
(
formateArrDataA
(
res
.
data
.
root
,
'group'
));
ExternalSummaryField
(
res
.
data
.
root
);
ExternalReportField
(
res
.
data
.
root
);
...
...
@@ -1045,13 +1043,10 @@ const AddModal = (props) => {
}
let
list
=
{};
Object
.
keys
(
tempObj
).
forEach
(
i
=>
{
console
.
log
(
i
);
if
(
tempObj
[
i
].
length
>
0
)
{
console
.
log
(
tempObj
[
i
]);
list
[
i
]
=
[...
tempObj
[
i
]];
}
});
console
.
log
(
list
);
return
list
;
};
...
...
@@ -1070,73 +1065,10 @@ const AddModal = (props) => {
return
list
;
};
// const formateArrDataA1 = (initialArr, name) => {
// let aa = [];
// let a1 = [];
// let a2;
// let a3 = [];
// initialArr.data.map(i => {
// // console.log(i.groupType)
// a2 = i.groupType;
// // console.log(a2)
// // console.log(i.root)
// a1 = i.root;
// a1.map(j => {
// j.group = a2;
// // console.log(j)
// });
// aa.push(i.root);
// });
// // console.log(aa)
// aa.map(p => {
// // console.log(p)
// p.map(o => {
// // console.log(o)
// a3.push(o);
// });
// });
// console.log(a3);
// // 判定传参是否符合规则
// if (!(a3 instanceof Array)) {
// return '请传入正确格式的数组';
// }
// if (!name) {
// return '请传入对象属性';
// }
// //先获取一下这个数组中有多少个"name"
// let nameArr = [];
// a3.map(i => {
// if (nameArr.indexOf(i.group) === -1) {
// nameArr.push(i.group);
// }
// });
// console.log(nameArr);
// //新建一个包含多个list的结果对象
// let tempObj = {};
// // 根据不同的"name"生成多个数组
// for (let k in nameArr) {
// for (let j in a3) {
// if (a3[j].group == nameArr[k]) {
// // 每次外循环时新建一个对应"name"的数组, 内循环时当前数组不变
// tempObj[nameArr[k]] = tempObj[nameArr[k]] || [];
// tempObj[nameArr[k]].push(a3[j]);
// }
// }
// }
// for (let key in tempObj) {
// let arr = [];
// tempObj[key].map(item => {
// tempObj[key] = arr;
// arr.push(item.Name);
// });
// }
// return tempObj;
// };
const
onChange1
=
e
=>
{
setEditable
(
e
.
target
.
checked
);
};
const
onChange2
=
e
=>
{
if
(
e
===
1
&&
initWay
===
0
)
{
// message.warning('事件模型切换为工单模型流程会清空,请谨慎修改');
...
...
@@ -1303,8 +1235,6 @@ const AddModal = (props) => {
//检查该unicode码是否在处理范围之内,在则返回该码对映汉字的拼音首字母,不在则调用其它函数处理
arrResult
.
push
(
checkCh
(
ch
));
}
// setPrefixName(mkRslt(arrResult))
console
.
log
(
mkRslt
(
arrResult
));
form
.
setFieldsValue
({
Code
:
mkRslt
(
arrResult
)
});
};
...
...
@@ -1326,7 +1256,6 @@ const AddModal = (props) => {
if
(
strlen
==
1
)
{
for
(
var
k
=
0
;
k
<
arrRslt
.
length
;
k
++
)
{
arrRslt
[
k
]
+=
str
;
console
.
log
(
str
);
}
}
else
{
let
tmpArr
=
arrRslt
.
slice
(
0
);
...
...
@@ -1344,12 +1273,10 @@ const AddModal = (props) => {
}
}
let
data
=
arrRslt
.
toString
().
slice
(
0
,
6
);
console
.
log
(
arrRslt
.
toString
().
slice
(
0
,
6
));
return
data
;
};
const
inputType
=
value
=>
{
console
.
log
(
value
);
if
(
value
)
{
form
.
setFieldsValue
({
BusinessType
:
value
});
}
...
...
@@ -1582,16 +1509,13 @@ const AddModal = (props) => {
rules=
{
[
{
validator
:
(
rule
,
value
)
=>
{
console
.
log
(
checkedList1
);
let
aa
=
form
.
getFieldValue
().
SummaryFields
;
let
bb
=
[];
console
.
log
(
aa
.
split
(
','
));
aa
.
split
(
','
).
map
(
i
=>
{
if
(
i
!=
''
)
{
bb
.
push
(
i
);
}
});
console
.
log
(
bb
);
if
(
aa
==
''
)
{
return
Promise
.
reject
(
'摘要字段必选'
);
}
...
...
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