Commit 3ff3eeb3 authored by 皮倩雯's avatar 皮倩雯

修改流程功能编辑功能问题

parent 6f589f22
Pipeline #33967 passed with stages
in 1 minute 5 seconds
...@@ -159,26 +159,28 @@ const AddFlowsModal = props => { ...@@ -159,26 +159,28 @@ const AddFlowsModal = props => {
callBackSubmit(); callBackSubmit();
// setLoading(true); // setLoading(true);
let aa = form.getFieldsValue().FlowName let aa = form.getFieldsValue().FlowName
var index=aa.lastIndexOf("\\");
aa=aa.substring(index+1,aa.length);
console.log(aa) console.log(aa)
console.log(inputValue) console.log(inputValue)
console.log(strr) console.log(strr)
if (type == 'edit') { if (type == 'add') {
CM_Event_EditEvenFlow({ let index=aa.lastIndexOf("\\");
aa=aa.substring(index+1,aa.length);
CM_Event_AddEvenFlow({
eventTypeId: formObj.ID, eventTypeId: formObj.ID,
eventFlowId: record.ID, flowName: aa,
roles: strr, roles: strr,
order: maxLength,
}) })
.then(res => { .then(res => {
// setLoading(false); // setLoading(false);
if (res.msg === '') { if (res.msg === 'Ok') {
form.resetFields(); form.resetFields();
callBackSubmit(); callBackSubmit();
notification.success({ notification.success({
message: '提示', message: '提示',
duration: 3, duration: 3,
description: '编辑成功', description: '新增成功',
}); });
} else { } else {
notification.error({ notification.error({
...@@ -192,27 +194,26 @@ const AddFlowsModal = props => { ...@@ -192,27 +194,26 @@ const AddFlowsModal = props => {
notification.error({ notification.error({
message: '提示', message: '提示',
duration: 3, duration: 3,
description: '编辑失败', description: '新增失败',
}); });
setLoading(false); // setLoading(false);
}); });
} }
if (type == 'add') { if (type == 'edit') {
CM_Event_AddEvenFlow({ CM_Event_EditEvenFlow({
eventTypeId: formObj.ID, eventTypeId: formObj.ID,
flowName: aa, eventFlowId: record.ID,
roles: strr, roles: strr,
order: maxLength,
}) })
.then(res => { .then(res => {
// setLoading(false); // setLoading(false);
if (res.msg === 'Ok') { if (res.msg === '') {
form.resetFields(); form.resetFields();
callBackSubmit(); callBackSubmit();
notification.success({ notification.success({
message: '提示', message: '提示',
duration: 3, duration: 3,
description: '新增成功', description: '编辑成功',
}); });
} else { } else {
notification.error({ notification.error({
...@@ -226,13 +227,14 @@ const AddFlowsModal = props => { ...@@ -226,13 +227,14 @@ const AddFlowsModal = props => {
notification.error({ notification.error({
message: '提示', message: '提示',
duration: 3, duration: 3,
description: '新增失败', description: '编辑失败',
}); });
// setLoading(false); setLoading(false);
}); });
} }
}; };
const getRole = () => { const getRole = () => {
......
...@@ -162,7 +162,7 @@ const ViewModal = props => { ...@@ -162,7 +162,7 @@ const ViewModal = props => {
},[visible,flag]) },[visible,flag])
const onSumbit =()=>{ const onSumbit =()=>{
callBackSubmit()
} }
const addView=()=>{ const addView=()=>{
......
...@@ -422,6 +422,9 @@ const incident = () => { ...@@ -422,6 +422,9 @@ const incident = () => {
const onOK1 =()=>{ const onOK1 =()=>{
setProcessVisible(false) setProcessVisible(false)
} }
const onOK11 =()=>{
setViewVisible(false)
}
return ( return (
<div className={styles.incidentContainer}> <div className={styles.incidentContainer}>
<div className={styles.contentContainers}> <div className={styles.contentContainers}>
...@@ -550,6 +553,7 @@ const incident = () => { ...@@ -550,6 +553,7 @@ const incident = () => {
visible={viewVisible} visible={viewVisible}
onCancel={() => setViewVisible(false)} onCancel={() => setViewVisible(false)}
title2={title2} title2={title2}
callBackSubmit={onOK11}
/> />
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment