xm-law-case-library-handler.js 778 B

123456789101112131415161718192021222324
  1. import { router } from '@/common/router-ready'
  2. export default function({ button, eventScript, context: { args, dataList, fieldInfos } }) {
  3. return new Promise((resolve) => {
  4. // 打开新建页面
  5. const wid = fieldInfos?.find((item) => item.name === 'id').value
  6. const caseId = fieldInfos?.find((item) => item.name === 'CASE_ID').value
  7. const instId= fieldInfos?.find((item) => item.name === 'instId').value
  8. if (wid) {
  9. const url = '/case-library-form?pageId=onl:a1ec7c3068a3467a817d914237727dd8 &Jid='+wid+'&caseId='+caseId+'&instId='+instId
  10. const query = {}
  11. const oRoute = router.resolve({
  12. path: url,
  13. query: {
  14. ...query,
  15. },
  16. })
  17. window.open(oRoute.href, '_blank')
  18. resolve()
  19. }
  20. })
  21. }