// 出口管制
import router from "@/router/index";
// 跳转实体清单
export const goToEntityList = () => {
  const param = {
    sanTypeId: 1
  }
  const jsonStr = JSON.stringify(param);
  const base64 = btoa(encodeURIComponent(jsonStr));
  const route = router.resolve({
    path: '/exportControl/entityList',
    query: {
      data: base64
    }
  });
  window.open(route.href, "_blank");
}
// 跳转实体清单事件
export const goToSingleEntityEvent = (id, tabName, date) => {
  window.sessionStorage.setItem("curTabName", tabName);

  const param = {
    id: id,
    sanTypeId: 1,
    date: date
  }
  const jsonStr = JSON.stringify(param);
  const base64 = btoa(encodeURIComponent(jsonStr));

  const route = router.resolve({
    path: "/exportControl/singleSanction",
    query: {
      data: base64
    }
  });
  window.open(route.href, "_blank");
}

// 跳转商业管制清单
export const goToCCLList = () => {
  const param = {
    sanTypeId: 13,
  }
  const jsonStr = JSON.stringify(param);
  const base64 = btoa(encodeURIComponent(jsonStr));
  const route = router.resolve({
    path: "/exportControl/commercialControlList",
    query: {
      data: base64
    }
  });
  window.open(route.href, "_blank");
}
