|
|
@@ -1,6 +1,6 @@
|
|
|
import React, { useEffect, useState } from "react";
|
|
|
import style from './index.less';
|
|
|
-import { Avatar, Badge, Button, Card, Checkbox, DatePicker, Drawer, Input, Modal, Select, Space, Table, Tabs, Tag, Tooltip } from "antd";
|
|
|
+import { App, Avatar, Badge, Button, Card, Checkbox, DatePicker, Drawer, Input, Modal, Select, Space, Table, Tabs, Tag, Tooltip } from "antd";
|
|
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
|
import { IconDefinition } from "@fortawesome/free-solid-svg-icons";
|
|
|
import { getProjectGroupsAllListApi } from "../../API/groupManage";
|
|
|
@@ -15,6 +15,7 @@ import GroupErrorCountList from "../businessPlan/taskList/components/groupTask/g
|
|
|
import PreviewMsg from "../../components/previewMsg";
|
|
|
import { emoList } from "../../components/textEditor/Expression";
|
|
|
import { msToHMS } from "../groupChatSend/robot/taskList/components/groupTask/shareTabls";
|
|
|
+import { syncSendGroupTaskUserApi } from "../../API/businessPlan/create";
|
|
|
|
|
|
|
|
|
interface IProps {
|
|
|
@@ -123,14 +124,28 @@ const GroupXfCorpTabls: React.FC<{ groupList: { label: string, value: number }[]
|
|
|
const [oldQueryParams, setOldQueryParams] = useState<GetSendUserListProps>({ pageNum: 1, pageSize: 20, includeCreateBy: true, startDay: dayJs().format('YYYY-MM-DD') })
|
|
|
const { token } = useNewToken()
|
|
|
const [modal, contextHolder] = Modal.useModal();
|
|
|
+ const { message } = App.useApp()
|
|
|
|
|
|
const getSendUserList = useAjax((params) => getSendUserListApi(params))
|
|
|
+ const syncSendTaskUser = useAjax((params) => syncSendGroupTaskUserApi(params))
|
|
|
/***********************************/
|
|
|
|
|
|
useEffect(() => {
|
|
|
getSendUserList.run({ ...queryParams, projectType })
|
|
|
}, [queryParams, projectType])
|
|
|
|
|
|
+
|
|
|
+ const syncHandle = (re: { taskId: string, corpId: string }) => {
|
|
|
+ const hide = message.loading('同步中...')
|
|
|
+ syncSendTaskUser.run({ corpId: re.corpId, taskId: re.taskId }).then(res => {
|
|
|
+ hide()
|
|
|
+ if (res) {
|
|
|
+ message.success('同步成功')
|
|
|
+ getSendUserList.refresh()
|
|
|
+ }
|
|
|
+ }).catch(() => hide())
|
|
|
+ }
|
|
|
+
|
|
|
return <div>
|
|
|
{contextHolder}
|
|
|
<SearchBox
|
|
|
@@ -260,6 +275,7 @@ const GroupXfCorpTabls: React.FC<{ groupList: { label: string, value: number }[]
|
|
|
},
|
|
|
});
|
|
|
}}>任务跳转</a>
|
|
|
+ <a onClick={() => syncHandle(record)}>同步</a>
|
|
|
</Space>
|
|
|
}
|
|
|
},
|