|
@@ -259,9 +259,20 @@ const Backlog = (props) => {
|
|
|
const { data, loading } = useRequest(getPendingList, {
|
|
|
defaultParams: [{ project_id: projectId }],
|
|
|
});
|
|
|
- console.log(data);
|
|
|
- const handleClick = () => {
|
|
|
- //TODO
|
|
|
+ const handleClick = (item) => {
|
|
|
+ if (item.type === 0) {
|
|
|
+ // task
|
|
|
+ UnityAction.sendMsg(
|
|
|
+ 'OpenTaskModal',
|
|
|
+ `/task-manage/pop/${projectId}?mandate_id=${item.origin_id}`,
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ // order
|
|
|
+ UnityAction.sendMsg(
|
|
|
+ 'OpenWorkOrderModal',
|
|
|
+ `/task-manage/pop/work-order/${projectId}?order_id=${item.origin_id}&order_type=${item.origin_type}`,
|
|
|
+ );
|
|
|
+ }
|
|
|
};
|
|
|
return (
|
|
|
<Box
|
|
@@ -278,7 +289,13 @@ const Backlog = (props) => {
|
|
|
{data?.map((item) => (
|
|
|
<>
|
|
|
<div className={styles.createTime}>{item.time}</div>
|
|
|
- <div className={styles.item} onClick={() => handleClick(item)}>
|
|
|
+ <div
|
|
|
+ className={styles.item}
|
|
|
+ onClick={(e) => {
|
|
|
+ e.stopPropagation();
|
|
|
+ handleClick(item);
|
|
|
+ }}
|
|
|
+ >
|
|
|
<div className={styles.point} />
|
|
|
<div className={styles.titleText}>{item.title}</div>
|
|
|
<div className={styles.bottomCon}>{item.content}</div>
|