|
@@ -13,6 +13,8 @@ function List(props) {
|
|
const [version, setVersion] = useState({});
|
|
const [version, setVersion] = useState({});
|
|
const [versionVisible, setVersionVisible] = useState(false);
|
|
const [versionVisible, setVersionVisible] = useState(false);
|
|
const [flowDetail, setFlowDetail] = useState();
|
|
const [flowDetail, setFlowDetail] = useState();
|
|
|
|
+ const [loading2, setLoading2] = useState(false);
|
|
|
|
+
|
|
let token = getToken();
|
|
let token = getToken();
|
|
|
|
|
|
const columns = [
|
|
const columns = [
|
|
@@ -38,10 +40,15 @@ function List(props) {
|
|
onClick={async () => {
|
|
onClick={async () => {
|
|
localStorage.excelId = record.id;
|
|
localStorage.excelId = record.id;
|
|
|
|
|
|
- const data = await queryBoomFlowDetail({ id: record.template_id });
|
|
|
|
- setFlowDetail(data);
|
|
|
|
- setVersion(record);
|
|
|
|
- setFlowVisible(true);
|
|
|
|
|
|
+ setLoading2(true);
|
|
|
|
+ try {
|
|
|
|
+ const data = await queryBoomFlowDetail({ id: record.template_id });
|
|
|
|
+ setFlowDetail(data);
|
|
|
|
+ setVersion(record);
|
|
|
|
+ setFlowVisible(true);
|
|
|
|
+ } catch (error) {
|
|
|
|
+ setLoading2(false);
|
|
|
|
+ }
|
|
// router.push(`/home/detail/${record.project_id}/${record.template_id}`);
|
|
// router.push(`/home/detail/${record.project_id}/${record.template_id}`);
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
@@ -129,7 +136,7 @@ function List(props) {
|
|
return (
|
|
return (
|
|
<div>
|
|
<div>
|
|
<Table
|
|
<Table
|
|
- loading={loading}
|
|
|
|
|
|
+ loading={loading || loading2}
|
|
rowKey="id"
|
|
rowKey="id"
|
|
dataSource={excel.list}
|
|
dataSource={excel.list}
|
|
pagination={excel.pagination}
|
|
pagination={excel.pagination}
|