<template> <hi-taskcenter ref="hiTask" @openfunc="openfunc" @openmonitor="openmonitorFn" :batchProcessFunc="batchProcessFuncFn" :syncBatch="syncBatch" style="background-color:#fff;padding-top:10px;box-sizing:border-box;"></hi-taskcenter> </template> <script> import "hi-taskcenter/hi-taskcenter.css"; import HiTaskcenter from "hi-taskcenter"; export default { components: { HiTaskcenter, }, data() { return { // 同步请求批处理 syncBatch: HIVUI_SETTING.syncBatch, }; }, mounted() { let me = this; document.addEventListener("iframeActiving", function (e) { //console.log(e.detail); if (top.window.__refreshTaskcenter) { top.window.__refreshTaskcenter = false; me.$refs.hiTask.taskschemeItemClick({ value: "untreated", label: me.$t('hivuiMain_taskcenter_untreated'), sel: true }); } }); }, methods: { openfunc(__data1, __data2, __data3) { if (__data2.furl) { if (top.window.customSysCofig.taskcenterCustomeropen && typeof top.window.customSysCofig.taskcenterCustomeropen == "function") { top.window.customSysCofig.taskcenterCustomeropen.call(this, __data2); } else { top.window.open(__data2.furl); } } else { top.window.SysPage.newPage(__data2.fpdisplayname, location.origin + (window._global ? "" : window.HIVUI_SETTING.serverName) + "/" + __data2.fmodelpath, { fmodelpath: __data2.fmodelpath, version: __data2.fversion, ftaskguid: __data2.ftaskguid, flowstate: __data2.flowstate, forderguid: __data2.forderguid, fnumber: __data2.fordernumber, fbzid: __data2.fbzid, pn: window.HIVUI_SETTING.projectName, }); } }, openmonitorFn(_this, __data2) {//流程监控 if (__data2 && __data2.furl) { if (top.window.customSysCofig.taskcenterCustomeropenmonitor && typeof top.window.customSysCofig.taskcenterCustomeropenmonitor == "function") { top.window.customSysCofig.taskcenterCustomeropenmonitor.call(this, _this, __data2); } } }, // 批处理 batchProcessFuncFn(config) { if (config.row && config.row.furl) { if (top.window.customSysCofig.taskcenterbatchProcess && typeof top.window.customSysCofig.taskcenterbatchProcess == "function") { return top.window.customSysCofig.taskcenterbatchProcess.call(this, this.$refs.hiTask, config); } } else { return this.$refs.hiTask.processFlow(config); } } }, }; </script>