|
@@ -1,5 +1,6 @@
|
|
|
import PageContent from '@/components/PageContent';
|
|
|
import PageTitle from '@/components/PageTitle';
|
|
|
+import { getMandateIDs } from '@/services/eqSelfInspection';
|
|
|
import { GetTokenFromUrl, UnityAction } from '@/utils/utils';
|
|
|
import { connect, history, useLocation, useParams } from '@umijs/max';
|
|
|
import { Button, Form, Modal, Select, Spin, message } from 'antd';
|
|
@@ -73,6 +74,23 @@ const EqSelfInspection = (props) => {
|
|
|
form.resetFields();
|
|
|
};
|
|
|
|
|
|
+ const openTaskModal = async () => {
|
|
|
+ if (!autoReport.Id) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const mandateIDs = await getMandateIDs({
|
|
|
+ project_id: projectId,
|
|
|
+ id: autoReport.Id,
|
|
|
+ }).catch((err) => {
|
|
|
+ console.log(err);
|
|
|
+ });
|
|
|
+ if (mandateIDs?.length) {
|
|
|
+ console.log('打开任务弹窗');
|
|
|
+ } else {
|
|
|
+ message.info('未查询到相关任务');
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
useEffect(() => {
|
|
|
if (routeId) {
|
|
|
dispatch({
|
|
@@ -172,7 +190,7 @@ const EqSelfInspection = (props) => {
|
|
|
className={styles.reportBtn}
|
|
|
type="primary"
|
|
|
onClick={() => {
|
|
|
- // 打开任务弹窗
|
|
|
+ openTaskModal();
|
|
|
}}
|
|
|
>
|
|
|
查看任务
|