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

debug

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