|
@@ -240,7 +240,7 @@ const MandateSelectModal = (props: any) => {
|
|
};
|
|
};
|
|
|
|
|
|
const DispatchTaskModal = (props: any) => {
|
|
const DispatchTaskModal = (props: any) => {
|
|
- const { open, onCancel, onOK, userList } = props;
|
|
|
|
|
|
+ const { open, onCancel, onOK, userList = [] } = props;
|
|
|
|
|
|
const [form] = Form.useForm();
|
|
const [form] = Form.useForm();
|
|
|
|
|
|
@@ -325,11 +325,12 @@ const DispatchTaskModal = (props: any) => {
|
|
|
|
|
|
interface IPropsType {
|
|
interface IPropsType {
|
|
userList: IUserType[];
|
|
userList: IUserType[];
|
|
|
|
+ dispatchUserList: IUserType[];
|
|
dispatch: (args: { type: string; payload: object }) => void;
|
|
dispatch: (args: { type: string; payload: object }) => void;
|
|
}
|
|
}
|
|
|
|
|
|
function TaskDetail(props: IPropsType) {
|
|
function TaskDetail(props: IPropsType) {
|
|
- const { userList, dispatch } = props;
|
|
|
|
|
|
+ const { userList, dispatchUserList, dispatch } = props;
|
|
|
|
|
|
const location = useLocation();
|
|
const location = useLocation();
|
|
const queryParams = new URLSearchParams(location.search);
|
|
const queryParams = new URLSearchParams(location.search);
|
|
@@ -519,6 +520,8 @@ function TaskDetail(props: IPropsType) {
|
|
manual: true,
|
|
manual: true,
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ console.log('0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-', dispatchUserList);
|
|
|
|
+
|
|
// 忽略
|
|
// 忽略
|
|
const onIgnoreTaskConfirm = async (id: any, reason: string) => {
|
|
const onIgnoreTaskConfirm = async (id: any, reason: string) => {
|
|
const params = {
|
|
const params = {
|
|
@@ -631,6 +634,10 @@ function TaskDetail(props: IPropsType) {
|
|
payload: { project_id },
|
|
payload: { project_id },
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+ dispatch({
|
|
|
|
+ type: 'taskUser/fetchDispatchUserList',
|
|
|
|
+ payload: { project_id },
|
|
|
|
+ });
|
|
}, []);
|
|
}, []);
|
|
|
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
@@ -951,7 +958,7 @@ function TaskDetail(props: IPropsType) {
|
|
/>
|
|
/>
|
|
<DispatchTaskModal
|
|
<DispatchTaskModal
|
|
open={dispatchModalOpen}
|
|
open={dispatchModalOpen}
|
|
- userList={userList}
|
|
|
|
|
|
+ userList={dispatchUserList}
|
|
onCancel={() => {
|
|
onCancel={() => {
|
|
setDispatchModalOpen(false);
|
|
setDispatchModalOpen(false);
|
|
}}
|
|
}}
|
|
@@ -962,14 +969,9 @@ function TaskDetail(props: IPropsType) {
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
-export default connect(
|
|
|
|
- ({
|
|
|
|
- taskUser,
|
|
|
|
- }: any): {
|
|
|
|
- userList: IUserType[];
|
|
|
|
- } => {
|
|
|
|
- return {
|
|
|
|
- userList: taskUser.userList,
|
|
|
|
- };
|
|
|
|
- },
|
|
|
|
-)(TaskDetail);
|
|
|
|
|
|
+export default connect(({ taskUser }: any) => {
|
|
|
|
+ return {
|
|
|
|
+ userList: taskUser.userList,
|
|
|
|
+ dispatchUserList: taskUser.dispatchUserList,
|
|
|
|
+ };
|
|
|
|
+})(TaskDetail);
|