|
|
@ -62,7 +62,7 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
import { h, ref, defineAsyncComponent, nextTick } from 'vue'; |
|
|
|
import { useRouter } from 'vue-router'; |
|
|
|
import { $t, axios, Environment, ComponentManager, Tools, NotifyManager } from '@/platform'; |
|
|
|
import { $t, axios, Environment, ComponentManager, Tools, NotifyManager, QuasarTools } from '@/platform'; |
|
|
|
|
|
|
|
const emit = defineEmits(['afterRefresh']); |
|
|
|
|
|
|
@ -88,7 +88,7 @@ const changeFirstColMaxWidth = () => { |
|
|
|
const refresh = () => { |
|
|
|
loadingRef.value = true; |
|
|
|
axios |
|
|
|
.get(Environment.apiContextPath('/api/flowable/process/query/myTask')) |
|
|
|
.get(Environment.apiContextPath('/api/flowable/process/query/myTask?page=1&size=10&pageable=true')) |
|
|
|
.then((response: any) => { |
|
|
|
itemsRef.value = response.data.content || []; |
|
|
|
loadingRef.value = false; |
|
|
@ -105,7 +105,12 @@ const handle = async (item: any) => { |
|
|
|
componentRef.value = null; |
|
|
|
//重新加载组件 |
|
|
|
nextTick(() => { |
|
|
|
const component = defineAsyncComponent(ComponentManager.getRemoteComponent(item.taskHandFrontendModelName, item.taskHandFrontendComponentName)); |
|
|
|
const component = defineAsyncComponent({ |
|
|
|
loader: ComponentManager.getRemoteComponent(item.taskHandFrontendModelName, item.taskHandFrontendComponentName), |
|
|
|
onError: (error, retry, fail, attempts) => { |
|
|
|
NotifyManager.error($t('home.card.task.tip.remoteComponentLoadError')); |
|
|
|
}, |
|
|
|
}); |
|
|
|
componentRef.value = h(component, { |
|
|
|
action: 'process', |
|
|
|
task: item, |
|
|
@ -116,7 +121,7 @@ const handle = async (item: any) => { |
|
|
|
} else if (item.taskHandFrontendRouteName) { |
|
|
|
router.push({ name: item.taskHandFrontendRouteName }); |
|
|
|
} else { |
|
|
|
NotifyManager.warn($t('home.card.myTask.action.notSetting.tip')); |
|
|
|
NotifyManager.warn($t('home.card.task.tip.routeOrComponentNotSetting')); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|