|
@@ -1,12 +1,14 @@
|
|
|
import React, { useEffect, useRef, useState } from "react";
|
|
import React, { useEffect, useRef, useState } from "react";
|
|
|
import { useIntl } from "react-intl";
|
|
import { useIntl } from "react-intl";
|
|
|
-import { Avatar, Button, Form, Space, Typography } from "antd";
|
|
|
|
|
|
|
+import { Avatar, Button, Form, message, Space, Typography } from "antd";
|
|
|
import type { ActionType, ProColumns } from "@ant-design/pro-components";
|
|
import type { ActionType, ProColumns } from "@ant-design/pro-components";
|
|
|
import { EditableProTable, useRefFunction } from "@ant-design/pro-components";
|
|
import { EditableProTable, useRefFunction } from "@ant-design/pro-components";
|
|
|
|
|
|
|
|
import {
|
|
import {
|
|
|
IProject,
|
|
IProject,
|
|
|
ITaskData,
|
|
ITaskData,
|
|
|
|
|
+ ITaskGroupInsertRequest,
|
|
|
|
|
+ ITaskGroupResponse,
|
|
|
ITaskListResponse,
|
|
ITaskListResponse,
|
|
|
ITaskResponse,
|
|
ITaskResponse,
|
|
|
ITaskUpdateRequest,
|
|
ITaskUpdateRequest,
|
|
@@ -577,6 +579,27 @@ const TaskList = ({
|
|
|
<WorkflowModal
|
|
<WorkflowModal
|
|
|
tiger={<Button type="primary">从模版创建任务</Button>}
|
|
tiger={<Button type="primary">从模版创建任务</Button>}
|
|
|
studioName={studioName}
|
|
studioName={studioName}
|
|
|
|
|
+ onData={(data) => {
|
|
|
|
|
+ if (!projectId) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ const url = "/v2/task-group";
|
|
|
|
|
+ const values: ITaskGroupInsertRequest = {
|
|
|
|
|
+ project_id: projectId,
|
|
|
|
|
+ data: data,
|
|
|
|
|
+ };
|
|
|
|
|
+ console.info("api request", url, values);
|
|
|
|
|
+ post<ITaskGroupInsertRequest, ITaskGroupResponse>(
|
|
|
|
|
+ url,
|
|
|
|
|
+ values
|
|
|
|
|
+ ).then((json) => {
|
|
|
|
|
+ console.info("api response", json);
|
|
|
|
|
+ if (json.ok) {
|
|
|
|
|
+ message.success("ok");
|
|
|
|
|
+ actionRef.current?.reload();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }}
|
|
|
/>,
|
|
/>,
|
|
|
]}
|
|
]}
|
|
|
/>
|
|
/>
|