Commit 922bdc3c authored by 熊成伟's avatar 熊成伟

debug

parent d5afe82b
Pipeline #15455 passed with stages
in 54 seconds
...@@ -23,8 +23,8 @@ const Backlog = (props) => { ...@@ -23,8 +23,8 @@ const Backlog = (props) => {
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [data, setData] = useState([]); const [data, setData] = useState([]);
const checkLog = (OPERATEID, UUID) => { const checkLog = (OPERATEID, UUID, FLOWTBID) => {
props.history.push(`/blank/info/${OPERATEID}/${UUID}`) props.history.push(`/blank/info/${OPERATEID}/${UUID}/${FLOWTBID}`)
}; };
const getData = (scroll) => { const getData = (scroll) => {
const pageMap ={searchWord, nowPage: current + 1, pageSize: 10}; const pageMap ={searchWord, nowPage: current + 1, pageSize: 10};
...@@ -79,7 +79,7 @@ const Backlog = (props) => { ...@@ -79,7 +79,7 @@ const Backlog = (props) => {
data.length > 0 ? data.map((item, index) => ( data.length > 0 ? data.map((item, index) => (
<div key={index}> <div key={index}>
<WhiteSpace/> <WhiteSpace/>
<TodoCard data={item} onClick={() => checkLog(item.OPERATEID, item.UUID)}/> <TodoCard data={item} onClick={() => checkLog(item.OPERATEID, item.UUID, item.FLOWTBID)}/>
</div> </div>
)) : <Empty/> )) : <Empty/>
......
...@@ -12,7 +12,7 @@ import Option from './Option'; ...@@ -12,7 +12,7 @@ import Option from './Option';
import './index.less' import './index.less'
const Process = (props) => { const Process = (props) => {
const {uuid} = props.match.params; const {uuid, FLOWTBID} = props.match.params;
const [templateId, setTemplateId] = useState(); const [templateId, setTemplateId] = useState();
const [tableId, setTableId] = useState(); const [tableId, setTableId] = useState();
...@@ -28,7 +28,8 @@ const Process = (props) => { ...@@ -28,7 +28,8 @@ const Process = (props) => {
}, []); }, []);
useEffect(() => { useEffect(() => {
const {id} = props.match.params const {id} = props.match.params;
setFlowTbId(FLOWTBID);
axiosRequest({ axiosRequest({
method: 'post', method: 'post',
url: `/idtAppServiceV6/oApp/dispatcher?operateId=${id}&formType=form`, url: `/idtAppServiceV6/oApp/dispatcher?operateId=${id}&formType=form`,
...@@ -39,7 +40,6 @@ const Process = (props) => { ...@@ -39,7 +40,6 @@ const Process = (props) => {
setTemplateId(res.property && res.property.templateId); setTemplateId(res.property && res.property.templateId);
setNodeId(res.property && res.property.curNodeId); setNodeId(res.property && res.property.curNodeId);
setOperateId(res.property && res.property.operateId); setOperateId(res.property && res.property.operateId);
setFlowTbId(res.property && res.property.flowTbId);
}); });
}, []); }, []);
......
...@@ -11,14 +11,25 @@ const SubmitDetail = (props) => { ...@@ -11,14 +11,25 @@ const SubmitDetail = (props) => {
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [disabled, setDisabled] = useState(true); const [disabled, setDisabled] = useState(true);
useEffect(() => { useEffect(() => {
setLoading(true) setLoading(true)
axiosRequest({ axiosRequest({
method: 'post', method: 'post',
url: `/idtAppServiceV6/application/interfaces/flow/getFlowJs.jsp?flowNodeId=${flowNodeId}`, url: `/idtAppServiceV6/application/interfaces/flow/getFlowJs.jsp?flowNodeId=${flowNodeId}&flowTbId=${flowTbId}`,
}).then(res => { }).then(res => {
setLoading(false) if (res.tree && res.tree.length === 0) {
setData(res) Toast.info('暂无下级办理人员, 请办结事件', 2, () => {
props.history.goBack()
})
}
if (res.btn && res.btn.NodeIn === 'true') {
setLoading(false)
setData(res)
}else {
Toast.info('事件已停止流转', 2, () => {
props.history.goBack()
})
}
}); });
}, []); }, []);
...@@ -28,12 +39,14 @@ const SubmitDetail = (props) => { ...@@ -28,12 +39,14 @@ const SubmitDetail = (props) => {
const newData = [...suData]; const newData = [...suData];
const index = newData.findIndex(item => item.XM === name.XM); const index = newData.findIndex(item => item.XM === name.XM);
checked ? newData.push({XM: name.XM, XMPY: name.XMPY}) : newData.splice(index, 1); checked ? newData.push({XM: name.XM, XMPY: name.XMPY}) : newData.splice(index, 1);
newData.length > 0 ? setDisabled(false) : setDisabled(true) newData.length > 0 ? setDisabled(false) : setDisabled(true);
setSuData(newData) setSuData(newData)
} }
const textClick = () => { const textClick = () => {
axiosRequest({ const result = String(data.btn.InUsers) !== '1' ? (suData.length === 1) : true;
!result && Toast.fail('只可选择一名人员');
result && axiosRequest({
method: 'post', method: 'post',
url: `/idtAppServiceV6/application/interfaces/flow/saveWorkFlowModel.jsp`, url: `/idtAppServiceV6/application/interfaces/flow/saveWorkFlowModel.jsp`,
body: { body: {
...@@ -50,13 +63,14 @@ const SubmitDetail = (props) => { ...@@ -50,13 +63,14 @@ const SubmitDetail = (props) => {
} }
}); });
} }
return ( return (
<div> <div>
{loading ? <WingBlank><WhiteSpace/><Skeleton/></WingBlank> : ( {loading ? <WingBlank><WhiteSpace/><Skeleton/></WingBlank> : (
<div> <div>
<div className='adMainBox'> <div className='adMainBox'>
<AddressCheckbox data={data} setName={checkName}/> <AddressCheckbox data={data.tree} setName={checkName}/>
</div> </div>
<div className="event-footer"> <div className="event-footer">
<div className={`event-footer-button ${(disabled) ? 'button-disabled' : '' }`} onClick={textClick}> <div className={`event-footer-button ${(disabled) ? 'button-disabled' : '' }`} onClick={textClick}>
......
...@@ -37,7 +37,7 @@ const ReactRouter = () => { ...@@ -37,7 +37,7 @@ const ReactRouter = () => {
<BlankLayout> <BlankLayout>
<Route path="/blank/work/:type" component={WorkDetail}/> <Route path="/blank/work/:type" component={WorkDetail}/>
<Route path="/blank/submit/:flowNodeId/:uuid/:flowTbId" component={SubmitDetail}/> <Route path="/blank/submit/:flowNodeId/:uuid/:flowTbId" component={SubmitDetail}/>
<Route path="/blank/info/:id/:uuid" component={Process}/> <Route path="/blank/info/:id/:uuid/:FLOWTBID" component={Process}/>
</BlankLayout> </BlankLayout>
}/> }/>
<Route component={NoFound}/> <Route component={NoFound}/>
......
...@@ -76,7 +76,7 @@ export const createAPI = (baseURL) => { ...@@ -76,7 +76,7 @@ export const createAPI = (baseURL) => {
} }
if (response.data || response.tree || response.success) { if (response.data || response.tree || response.success) {
return response.data ? response.data : (response.tree ? response.tree : response); return response.data ? response.data : response;
} else { } else {
return false; return false;
} }
......
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