export default function Index(props: any) {
    useEffect(() => {
      const getIssueDetail = (e) => {
        if (e.target.className.includes("xxxxxxxxxx")) {
          const type = e.target.dataset?.sourcetype;
          const id = e.target.dataset?.sourceid;
          switch (type) {
            case 'ISSUE':
            case 'DrawingSheet_ISSUE':
              xxxxxService.loadIssue(parseInt(id) || 0).then((res) => {
                if (res) {
                  return window.location.href = e.target.href;
                } else {
                  return message.error("aaaaaaaaaa");
                }
              }).catch((err) => {
                return message.error(err?.response?.msg ?? "系统错误");
              })
              break;
            default:
              return window.location.href = e.target.href;
          }
        }
      }
      document.addEventListener('click', getIssueDetail);
      return () => {
          document.removeEventListener('click', getIssueDetail);
      }
    }, [])
}

 

相关文章:

  • 2021-10-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-20
  • 2022-12-23
  • 2022-02-09
  • 2022-01-30
  • 2022-03-10
相关资源
相似解决方案