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
57678750
Commit
57678750
authored
Apr 01, 2025
by
彭俊龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:自动化工单测试
parent
8e02163a
Pipeline
#96641
failed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
15 deletions
+55
-15
index.js
...manager/workOrder/autoCase/components/CaseModify/index.js
+55
-15
No files found.
src/pages/bsmanager/workOrder/autoCase/components/CaseModify/index.js
View file @
57678750
...
@@ -13,6 +13,7 @@ import {
...
@@ -13,6 +13,7 @@ import {
InputNumber
,
InputNumber
,
Checkbox
,
Checkbox
,
message
,
message
,
Switch
}
from
'antd'
;
}
from
'antd'
;
import
'moment/dist/locale/zh-cn'
;
import
'moment/dist/locale/zh-cn'
;
import
locale
from
'antd/es/date-picker/locale/zh_CN'
;
import
locale
from
'antd/es/date-picker/locale/zh_CN'
;
...
@@ -119,7 +120,7 @@ const CaseModify = props => {
...
@@ -119,7 +120,7 @@ const CaseModify = props => {
scheduledConfig
:
{
scheduledConfig
:
{
userIds
:
[],
//用户ID
userIds
:
[],
//用户ID
roleIds
:
[],
//角色ID
roleIds
:
[],
//角色ID
Values
:
[],
//工单移交模板
values
:
[],
//工单模板提交数据
agentConfig
:
''
,
agentConfig
:
''
,
},
//定时触发
},
//定时触发
});
});
...
@@ -182,7 +183,7 @@ const CaseModify = props => {
...
@@ -182,7 +183,7 @@ const CaseModify = props => {
{
{
let
res
;
let
res
;
if
(
TriggerMethod
===
'定时触发'
)
{
if
(
TriggerMethod
===
'定时触发'
)
{
setShowForm
(
true
);
getBizMetaData
(
detail
);
getBizMetaData
(
detail
);
res
=
await
GetConditionConfigFlowNode
({
flowId
:
FlowId
});
res
=
await
GetConditionConfigFlowNode
({
flowId
:
FlowId
});
}
else
{
}
else
{
...
@@ -401,12 +402,24 @@ const CaseModify = props => {
...
@@ -401,12 +402,24 @@ const CaseModify = props => {
...
paramObj
,
...
paramObj
,
userId
:
1
,
userId
:
1
,
};
};
const
vals
=
ScheduledConfig
.
Values
setShowForm
(
vals
.
length
>
0
);
const
{
code
,
data
,
msg
}
=
await
GetBizMetaData
(
paramObj
);
const
{
code
,
data
,
msg
}
=
await
GetBizMetaData
(
paramObj
);
const
{
formJson
,
values
}
=
data
[
0
];
const
{
formJson
,
values
}
=
data
[
0
];
const
jsonObj
=
JSON
.
parse
(
formJson
)
const
jsonObj
=
JSON
.
parse
(
formJson
)
const
formValues
=
vals
.
length
>
0
?
values
.
map
(
v
=>
{
const
d
=
vals
.
find
(
x
=>
v
.
fieldName
===
x
.
fieldName
)
if
(
d
){
return
{
...
v
,
fieldValue
:
d
.
fieldValue
}
}
return
v
})
:
values
formJsonRef
.
current
=
jsonObj
formJsonRef
.
current
=
jsonObj
setSchemaValues
({
values
,
formJson
:
jsonObj
});
setSchemaValues
({
values
:
formValues
,
formJson
:
jsonObj
});
console
.
log
(
formData
,
'formDataformData'
)
}
}
};
};
...
@@ -920,7 +933,6 @@ const CaseModify = props => {
...
@@ -920,7 +933,6 @@ const CaseModify = props => {
const
handleSelectRuleType
=
(
e
,
type
)
=>
{
const
handleSelectRuleType
=
(
e
,
type
)
=>
{
const
{
checked
}
=
e
.
target
;
const
{
checked
}
=
e
.
target
;
generatePostData
({
triggerMethod
:
type
});
generatePostData
({
triggerMethod
:
type
});
setShowForm
(
type
===
'定时触发'
)
if
(
type
===
'定时触发'
)
{
if
(
type
===
'定时触发'
)
{
generatePostData
({});
generatePostData
({});
if
(
nodeNams
.
length
>
0
)
{
if
(
nodeNams
.
length
>
0
)
{
...
@@ -1200,6 +1212,7 @@ const CaseModify = props => {
...
@@ -1200,6 +1212,7 @@ const CaseModify = props => {
agentConfig
,
agentConfig
,
userIds
:
configInfo
.
userIds
,
userIds
:
configInfo
.
userIds
,
roleIds
:
configInfo
.
roleIds
,
roleIds
:
configInfo
.
roleIds
,
values
:
showForm
?
postData
.
current
.
scheduledConfig
.
values
:
[]
};
};
}
}
const
fn
=
()
=>
setloadding
(
false
);
const
fn
=
()
=>
setloadding
(
false
);
...
@@ -1561,20 +1574,39 @@ const CaseModify = props => {
...
@@ -1561,20 +1574,39 @@ const CaseModify = props => {
}
}
return
''
;
return
''
;
};
};
const
loaclPaths
=
[
'【本人姓名】'
,
'【本人电话】'
,
'【本人部门】'
]
const
onOK
=
async
()
=>
{
const
onOK
=
async
()
=>
{
console
.
log
(
formJsonRef
.
current
,
'formJsonRef.current'
);
console
.
log
(
formJsonRef
.
current
,
'formJsonRef.current'
);
if
(
isObject
(
formJsonRef
.
current
)){
if
(
isObject
(
formJsonRef
.
current
)){
const
formJsonData
=
getFormData
(
formJsonRef
.
current
);
const
formJsonData
=
getFormData
(
formJsonRef
.
current
);
if
(
isObject
(
formJsonData
)){
const
{
errors
,
formValue
}
=
await
formRef
.
current
.
getValues
();
Object
.
keys
(
formJsonData
).
forEach
(
v
=>
{
const
values
=
formValue
.
map
(
v
=>
{
if
(
formJsonData
[
v
].
widget
===
'TextInput'
){
if
(
formJsonData
[
v
.
fieldName
]){
const
{
presetValue
,
isStoreID
}
=
formJsonData
[
v
];
const
{
widget
,
presetValue
,
isStoreID
,
isMySite
}
=
formJsonData
[
v
.
fieldName
]
if
(
widget
===
'TextInput'
&&
loaclPaths
.
includes
(
presetValue
)){
return
{
fieldName
:
v
.
fieldName
,
fieldValue
:
''
,
presetValue
,
isStoreID
}
}
else
if
(
widget
===
'ComboBox'
&&
isMySite
){
return
{
fieldName
:
v
.
fieldName
,
fieldValue
:
''
,
presetValue
:
''
,
isStoreID
}
}
}
})
return
{
}
fieldName
:
v
.
fieldName
,
const
formData
=
await
formRef
.
current
.
getValues
();
fieldValue
:
v
.
fieldValue
,
console
.
log
(
formData
,
formJsonData
,
'formDataformDataformData'
);
presetValue
:
''
,
isStoreID
}
}
})
postData
.
current
.
scheduledConfig
.
Values
=
values
}
}
setFormVisible
(
false
)
setFormVisible
(
false
)
}
}
...
@@ -1933,8 +1965,16 @@ const CaseModify = props => {
...
@@ -1933,8 +1965,16 @@ const CaseModify = props => {
<
/div
>
<
/div
>
<
p
style
=
{{
color
:
'red'
}}
>
{
errorMsg
}
<
/p
>
<
p
style
=
{{
color
:
'red'
}}
>
{
errorMsg
}
<
/p
>
<
span
>
下次请求时间:
{
tip
}
<
/span
>
<
span
>
下次请求时间:
{
tip
}
<
/span
>
{
configInfo
.
triggerType
==
'定时触发'
&&
<
div
style
=
{{
marginTop
:
'10px'
}}
>
<
Space
>
<
span
>
启用工单模板:
<
/span
>
<
Switch
checkedChildren
=
"开启"
unCheckedChildren
=
"关闭"
checked
=
{
showForm
}
onChange
=
{(
e
)
=>
setShowForm
(
e
)}
/
>
<
/Space
>
<
/div
>
}
{
showForm
&&
(
{
showForm
&&
(
<
div
style
=
{{
marginTop
:
'
2
0px'
}}
>
<
div
style
=
{{
marginTop
:
'
1
0px'
}}
>
<
Space
>
<
Space
>
<
span
>
工单移交模板:
<
/span
>
<
span
>
工单移交模板:
<
/span
>
<
Button
onClick
=
{()
=>
setFormVisible
(
true
)}
>
点击查看
<
/Button
>
<
Button
onClick
=
{()
=>
setFormVisible
(
true
)}
>
点击查看
<
/Button
>
...
...
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