Browse Source

基础框架发布: 8.2.25

前端核心发布: 8.2.90
 1) 更新前端首页
main
wangshaoping 2 months ago
parent
commit
8be506576a
  1. 4
      io.sc.engine.rule.frontend/src/remote-components/remote-components.json
  2. 9
      io.sc.engine.rule.server/src/main/java/io/sc/engine/rule/server/common/initializer/RuleEngineWorkFlowInitializer.java
  3. 7
      io.sc.platform.core.frontend/src/platform/i18n/messages.json
  4. 7
      io.sc.platform.core.frontend/src/platform/i18n/messages_tw_CN.json
  5. 7
      io.sc.platform.core.frontend/src/platform/i18n/messages_zh_CN.json
  6. 33
      io.sc.platform.core.frontend/src/platform/views/home/Announcement.vue
  7. 43
      io.sc.platform.core.frontend/src/platform/views/home/DoneTask.vue
  8. 45
      io.sc.platform.core.frontend/src/platform/views/home/FinishedTask.vue
  9. 35
      io.sc.platform.core.frontend/src/platform/views/home/Message.vue
  10. 34
      io.sc.platform.core.frontend/src/platform/views/home/Task.vue
  11. 3
      io.sc.platform.flowable/src/main/java/io/sc/platform/flowable/service/impl/ProcessQueryServiceImpl.java

4
io.sc.engine.rule.frontend/src/remote-components/remote-components.json

@ -5,4 +5,8 @@
"componentPath": "组件 .vue 文件路径" "componentPath": "组件 .vue 文件路径"
} }
*/ */
{
"component": "io.sc.engine.rule.frontend.workflow.ApprovalComponent",
"componentPath": "@/views/workflow/WorkflowApprovalComponent.vue"
}
] ]

9
io.sc.engine.rule.server/src/main/java/io/sc/engine/rule/server/common/initializer/RuleEngineWorkFlowInitializer.java

@ -58,6 +58,15 @@ public class RuleEngineWorkFlowInitializer implements ApplicationInitializer{
entity.setVersion(1); entity.setVersion(1);
entity.setCanClaimTask(false); entity.setCanClaimTask(false);
entity.setXml(getRuleEngineWorkflowXmlContent()); entity.setXml(getRuleEngineWorkflowXmlContent());
entity.setBusinessDescriptionSql("" +
"select \n" +
" CONCAT(CODE_,':',VERSION_) BUSSINESS_KEY,\n" +
" CONCAT(NAME_,'_V',VERSION_) BUSSINESS_DESCRIPTION\n" +
"from RE_RESOURCE\n" +
"where CONCAT(CODE_,':',VERSION_) in (${bussinessKeys})"
);
entity.setTaskHandFrontendModelName("io.sc.engine.rule.frontend");
entity.setTaskHandFrontendComponentName("io.sc.engine.rule.frontend.workflow.ApprovalComponent");
entity = processEntityService.add(entity); entity = processEntityService.add(entity);
processEntityService.deploy(entity.getId()); processEntityService.deploy(entity.getId());
}catch (Exception e){ }catch (Exception e){

7
io.sc.platform.core.frontend/src/platform/i18n/messages.json

@ -331,17 +331,22 @@
"home.card.task.title": "My Tasks", "home.card.task.title": "My Tasks",
"home.card.task.action.list": "all my tasks...", "home.card.task.action.list": "all my tasks...",
"home.card.task.action.process": "Process",
"home.card.doneTask.title": "My Tasks Done", "home.card.doneTask.title": "My Tasks Done",
"home.card.doneTask.action.list": "all my done tasks...", "home.card.doneTask.action.list": "all my done tasks...",
"home.card.doneTask.action.view": "View",
"home.card.finishTask.title": "My Tasks Finished", "home.card.finishTask.title": "My Tasks Finished",
"home.card.finishTask.action.list": "all my finished tasks...", "home.card.finishTask.action.list": "all my finished tasks...",
"home.card.finishTask.action.view": "View",
"home.card.message.title": "My Messages", "home.card.message.title": "My Messages",
"home.card.message.action.list": "all my messages...", "home.card.message.action.list": "all my messages...",
"home.card.message.action.reply": "Reply",
"home.card.message.chatDialog.title": "Chat with {sender}", "home.card.message.chatDialog.title": "Chat with {sender}",
"home.card.announcement.title": "Announcements", "home.card.announcement.title": "Announcements",
"home.card.announcement.action.list": "all announcements..." "home.card.announcement.action.list": "all announcements...",
"home.card.announcement.action.view": "View"
} }

7
io.sc.platform.core.frontend/src/platform/i18n/messages_tw_CN.json

@ -331,17 +331,22 @@
"home.card.task.title": "我的代辦", "home.card.task.title": "我的代辦",
"home.card.task.action.list": "顯示所有...", "home.card.task.action.list": "顯示所有...",
"home.card.task.action.process": "辦理",
"home.card.doneTask.title": "我的已辦", "home.card.doneTask.title": "我的已辦",
"home.card.doneTask.action.list": "顯示所有...", "home.card.doneTask.action.list": "顯示所有...",
"home.card.doneTask.action.view": "查看",
"home.card.finishTask.title": "我的辦結", "home.card.finishTask.title": "我的辦結",
"home.card.finishTask.action.list": "顯示所有...", "home.card.finishTask.action.list": "顯示所有...",
"home.card.finishTask.action.view": "查看",
"home.card.message.title": "我的消息", "home.card.message.title": "我的消息",
"home.card.message.action.list": "顯示所有...", "home.card.message.action.list": "顯示所有...",
"home.card.message.action.reply": "回復",
"home.card.message.chatDialog.title": "與 {sender} 的對話", "home.card.message.chatDialog.title": "與 {sender} 的對話",
"home.card.announcement.title": "系統公告", "home.card.announcement.title": "系統公告",
"home.card.announcement.action.list": "顯示所有..." "home.card.announcement.action.list": "顯示所有...",
"home.card.announcement.action.view": "查看"
} }

7
io.sc.platform.core.frontend/src/platform/i18n/messages_zh_CN.json

@ -332,17 +332,22 @@
"home.card.task.title": "我的代办", "home.card.task.title": "我的代办",
"home.card.task.action.list": "显示所有...", "home.card.task.action.list": "显示所有...",
"home.card.task.action.process": "办理",
"home.card.doneTask.title": "我的已办", "home.card.doneTask.title": "我的已办",
"home.card.doneTask.action.list": "显示所有...", "home.card.doneTask.action.list": "显示所有...",
"home.card.doneTask.action.view": "查看",
"home.card.finishTask.title": "我的办结", "home.card.finishTask.title": "我的办结",
"home.card.finishTask.action.list": "显示所有...", "home.card.finishTask.action.list": "显示所有...",
"home.card.finishTask.action.view": "查看",
"home.card.message.title": "我的消息", "home.card.message.title": "我的消息",
"home.card.message.action.list": "显示所有...", "home.card.message.action.list": "显示所有...",
"home.card.message.action.reply": "回复",
"home.card.message.chatDialog.title": "与 {sender} 的对话", "home.card.message.chatDialog.title": "与 {sender} 的对话",
"home.card.announcement.title": "系统公告", "home.card.announcement.title": "系统公告",
"home.card.announcement.action.list": "显示所有..." "home.card.announcement.action.list": "显示所有...",
"home.card.announcement.action.view": "查看"
} }

33
io.sc.platform.core.frontend/src/platform/views/home/Announcement.vue

@ -5,7 +5,8 @@
<q-icon name="bi-megaphone" size="1.3em" /> <q-icon name="bi-megaphone" size="1.3em" />
<span class="text-weight-bolder px-2">{{ $t('home.card.announcement.title') }}</span> <span class="text-weight-bolder px-2">{{ $t('home.card.announcement.title') }}</span>
<q-space /> <q-space />
<q-btn size="12px" flat no-caps :label="$t('home.card.announcement.action.list')" /> <q-btn size="12px" icon="bi-arrow-repeat" flat no-caps padding="2px 6px 2px 6px" :title="$t('refresh')" :loading="loadingRef" @click="refresh" />
<q-btn size="12px" icon="bi-justify" flat no-caps padding="2px 6px 2px 6px" :title="$t('home.card.announcement.action.list')" />
</div> </div>
</q-card-section> </q-card-section>
<q-card-section class="p-0"> <q-card-section class="p-0">
@ -16,7 +17,9 @@
<div class="truncate" style="width: 350px">{{ item.title }}</div> <div class="truncate" style="width: 350px">{{ item.title }}</div>
</td> </td>
<td width="100px">{{ item.lastModifyDateAndNowDiff }}{{ $t(item.lastModifyDateAndNowDiffUnit) }}{{ $t('before') }}</td> <td width="100px">{{ item.lastModifyDateAndNowDiff }}{{ $t(item.lastModifyDateAndNowDiffUnit) }}{{ $t('before') }}</td>
<td width="100px"><q-btn color="primary" :label="$t('view')" size="11px" @click="openAnnouncementDialog(item)" /></td> <td width="100px">
<q-btn color="primary" no-caps :label="$t('home.card.announcement.action.view')" size="11px" @click="handleTask(item)" />
</td>
</tr> </tr>
</tbody> </tbody>
</q-markup-table> </q-markup-table>
@ -26,23 +29,29 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue'; import { ref } from 'vue';
import { axios, Environment, SessionManager, I18nMessageManager, AuthenticationManager, Tools } from '@/platform'; import { axios, Environment } from '@/platform';
import AnnouncementDialog from './AnnouncementDialog.vue'; import AnnouncementDialog from './AnnouncementDialog.vue';
const itemsRef = ref([]);
const loadingRef = ref(false);
const dialogRef = ref(); const dialogRef = ref();
const unReadedAnnouncementsRef = ref([]);
const unReadedAnnouncementsTotalCountRef = ref();
const findUnReadedAnnouncements = () => { const refresh = () => {
axios.get(Environment.apiContextPath('/api/system/announcement/findUnReadedAnnouncements')).then((response) => { loadingRef.value = true;
unReadedAnnouncementsRef.value = response.data.content || []; axios
unReadedAnnouncementsTotalCountRef.value = response.data.totalElements; .get(Environment.apiContextPath('/api/system/announcement/findUnReadedAnnouncements'))
}); .then((response: any) => {
itemsRef.value = response.data.content || [];
loadingRef.value = false;
})
.catch(() => {
loadingRef.value = false;
});
}; };
const openAnnouncementDialog = (item: any) => { const handleTask = (item: any) => {
dialogRef.value.open(item); dialogRef.value.open(item);
}; };
findUnReadedAnnouncements(); refresh();
</script> </script>

43
io.sc.platform.core.frontend/src/platform/views/home/DoneTask.vue

@ -5,18 +5,19 @@
<q-icon name="bi-list-check" size="1.5em" /> <q-icon name="bi-list-check" size="1.5em" />
<span class="text-weight-bolder px-2">{{ $t('home.card.doneTask.title') }}</span> <span class="text-weight-bolder px-2">{{ $t('home.card.doneTask.title') }}</span>
<q-space /> <q-space />
<q-btn size="12px" flat no-caps :label="$t('home.card.doneTask.action.list')" /> <q-btn size="12px" icon="bi-arrow-repeat" flat no-caps padding="2px 6px 2px 6px" :title="$t('refresh')" :loading="loadingRef" @click="refresh" />
<q-btn size="12px" icon="bi-justify" flat no-caps padding="2px 6px 2px 6px" :title="$t('home.card.doneTask.action.list')" />
</div> </div>
</q-card-section> </q-card-section>
<q-card-section class="p-0"> <q-card-section class="p-0">
<q-markup-table flat dense separator="none" style="height: 130px; overflow-y: auto"> <q-markup-table flat dense separator="none" style="height: 130px; overflow-y: auto">
<tbody> <tbody>
<tr v-for="item in unCompletedTasksRef" :key="item.id" @click="handleTask(item)"> <tr v-for="item in itemsRef" :key="item.id" @click="handleTask(item)">
<td width="100%"> <td width="100%">
<div class="truncate" style="width: 350px">{{ item.businessDescription }}</div> <div class="truncate" style="width: 350px">{{ item.businessDescription }}</div>
</td> </td>
<td width="100px">{{ item.previousAssignee }}, {{ item.createTimeAndNowDiff }}{{ $t(item.createTimeAndNowDiffUnit) }}{{ $t('before') }}</td> <td width="100px">{{ item.previousAssignee }}, {{ item.createTimeAndNowDiff }}{{ $t(item.createTimeAndNowDiffUnit) }}{{ $t('before') }}</td>
<td width="100px"><q-btn color="primary" :label="$t('view')" size="11px" @click="handleTask(item)" /></td> <td width="100px"><q-btn color="primary" no-caps :label="$t('home.card.doneTask.action.view')" size="11px" @click="handleTask(item)" /></td>
</tr> </tr>
</tbody> </tbody>
</q-markup-table> </q-markup-table>
@ -24,18 +25,36 @@
</q-card> </q-card>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue'; import { h, ref, defineAsyncComponent, nextTick } from 'vue';
import { axios, Environment, SessionManager, I18nMessageManager, AuthenticationManager, Tools } from '@/platform'; import { axios, Environment, ComponentManager, Tools } from '@/platform';
const unCompletedTasksRef = ref([]); const itemsRef = ref([]);
const unCompletedTasksTotalCountRef = ref(); const loadingRef = ref(false);
const componentRef = ref();
const findUnCompletedTasks = () => { const refresh = () => {
axios.get(Environment.apiContextPath('/api/flowable/process/query/task')).then((response) => { loadingRef.value = true;
unCompletedTasksRef.value = response.data.content || []; axios
unCompletedTasksTotalCountRef.value = response.data.totalElements; .get(Environment.apiContextPath('/api/flowable/process/query/task'))
.then((response: any) => {
itemsRef.value = response.data.content || [];
loadingRef.value = false;
})
.catch(() => {
loadingRef.value = false;
});
};
const handleTask = async (item: any) => {
//
componentRef.value = null;
//
nextTick(() => {
const component = defineAsyncComponent(ComponentManager.getRemoteComponent(item.taskHandFrontendModelName, item.taskHandFrontendComponentName));
const properties = Tools.mergeObject({ taskId: item.id }, Tools.json2Object(item.taskHandFrontendComponentProperties));
componentRef.value = h(component, properties);
}); });
}; };
findUnCompletedTasks(); refresh();
</script> </script>

45
io.sc.platform.core.frontend/src/platform/views/home/FinishedTask.vue

@ -2,21 +2,22 @@
<q-card flat bordered> <q-card flat bordered>
<q-card-section class="text-info px-2 pt-1 pb-0"> <q-card-section class="text-info px-2 pt-1 pb-0">
<div class="row no-wrap items-center"> <div class="row no-wrap items-center">
<q-icon name="bi-card-list" size="1.5em" /> <q-icon name="bi-card-list" size="1.4em" />
<span class="text-weight-bolder px-2">{{ $t('home.card.finishTask.title') }}</span> <span class="text-weight-bolder px-2">{{ $t('home.card.finishTask.title') }}</span>
<q-space /> <q-space />
<q-btn size="12px" flat no-caps :label="$t('home.card.finishTask.action.list')" /> <q-btn size="12px" icon="bi-arrow-repeat" flat no-caps padding="2px 6px 2px 6px" :title="$t('refresh')" :loading="loadingRef" @click="refresh" />
<q-btn size="12px" icon="bi-justify" flat no-caps padding="2px 6px 2px 6px" :title="$t('home.card.finishTask.action.list')" />
</div> </div>
</q-card-section> </q-card-section>
<q-card-section class="p-0"> <q-card-section class="p-0">
<q-markup-table flat dense separator="none" style="height: 130px; overflow-y: auto"> <q-markup-table flat dense separator="none" style="height: 130px; overflow-y: auto">
<tbody> <tbody>
<tr v-for="item in unCompletedTasksRef" :key="item.id" @click="handleTask(item)"> <tr v-for="item in itemsRef" :key="item.id" @click="handleTask(item)">
<td width="100%"> <td width="100%">
<div class="truncate" style="width: 350px">{{ item.businessDescription }}</div> <div class="truncate" style="width: 350px">{{ item.businessDescription }}</div>
</td> </td>
<td width="100px">{{ item.previousAssignee }}, {{ item.createTimeAndNowDiff }}{{ $t(item.createTimeAndNowDiffUnit) }}{{ $t('before') }}</td> <td width="100px">{{ item.previousAssignee }}, {{ item.createTimeAndNowDiff }}{{ $t(item.createTimeAndNowDiffUnit) }}{{ $t('before') }}</td>
<td width="100px"><q-btn color="primary" :label="$t('view')" size="11px" @click="handleTask(item)" /></td> <td width="100px"><q-btn color="primary" no-caps :label="$t('home.card.finishTask.action.view')" size="11px" @click="handleTask(item)" /></td>
</tr> </tr>
</tbody> </tbody>
</q-markup-table> </q-markup-table>
@ -24,18 +25,36 @@
</q-card> </q-card>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue'; import { h, ref, defineAsyncComponent, nextTick } from 'vue';
import { axios, Environment, SessionManager, I18nMessageManager, AuthenticationManager, Tools } from '@/platform'; import { axios, Environment, ComponentManager, Tools } from '@/platform';
const unCompletedTasksRef = ref([]); const itemsRef = ref([]);
const unCompletedTasksTotalCountRef = ref(); const loadingRef = ref(false);
const componentRef = ref();
const findUnCompletedTasks = () => { const refresh = () => {
axios.get(Environment.apiContextPath('/api/flowable/process/query/task')).then((response) => { loadingRef.value = true;
unCompletedTasksRef.value = response.data.content || []; axios
unCompletedTasksTotalCountRef.value = response.data.totalElements; .get(Environment.apiContextPath('/api/flowable/process/query/task'))
.then((response: any) => {
itemsRef.value = response.data.content || [];
loadingRef.value = false;
})
.catch(() => {
loadingRef.value = false;
});
};
const handleTask = async (item: any) => {
//
componentRef.value = null;
//
nextTick(() => {
const component = defineAsyncComponent(ComponentManager.getRemoteComponent(item.taskHandFrontendModelName, item.taskHandFrontendComponentName));
const properties = Tools.mergeObject({ taskId: item.id }, Tools.json2Object(item.taskHandFrontendComponentProperties));
componentRef.value = h(component, properties);
}); });
}; };
findUnCompletedTasks(); refresh();
</script> </script>

35
io.sc.platform.core.frontend/src/platform/views/home/Message.vue

@ -5,18 +5,21 @@
<q-icon name="bi-chat-text" size="1.5em" /> <q-icon name="bi-chat-text" size="1.5em" />
<span class="text-weight-bolder px-2">{{ $t('home.card.message.title') }}</span> <span class="text-weight-bolder px-2">{{ $t('home.card.message.title') }}</span>
<q-space /> <q-space />
<q-btn size="12px" flat no-caps :label="$t('home.card.message.action.list')" /> <q-btn size="12px" icon="bi-arrow-repeat" flat no-caps padding="2px 6px 2px 6px" :title="$t('refresh')" :loading="loadingRef" @click="refresh" />
<q-btn size="12px" icon="bi-justify" flat no-caps padding="2px 6px 2px 6px" :title="$t('home.card.message.action.list')" />
</div> </div>
</q-card-section> </q-card-section>
<q-card-section class="p-0"> <q-card-section class="p-0">
<q-markup-table flat dense separator="none" style="width: 100%; height: 130px; overflow-y: auto"> <q-markup-table flat dense separator="none" style="width: 100%; height: 130px; overflow-y: auto">
<tbody> <tbody>
<tr v-for="item in unReadedNotificationsRef" :key="item.id"> <tr v-for="item in itemsRef" :key="item.id">
<td width="100%"> <td width="100%">
<div class="truncate" style="width: 350px">{{ item.content }}</div> <div class="truncate" style="width: 350px">{{ item.content }}</div>
</td> </td>
<td width="100px">{{ item.sender + ', ' + item.sendDateAndNowDiff + $t(item.sendDateAndNowDiffUnit) + $t('before') }}</td> <td width="100px">{{ item.sender + ', ' + item.sendDateAndNowDiff + $t(item.sendDateAndNowDiffUnit) + $t('before') }}</td>
<td width="100px"><q-btn color="primary" :label="$t('reply')" no-caps size="11px" @click="openChatDialog(item)" /></td> <td width="100px">
<q-btn color="primary" no-caps :label="$t('home.card.message.action.reply')" size="11px" @click="handleTask(item)" />
</td>
</tr> </tr>
</tbody> </tbody>
</q-markup-table> </q-markup-table>
@ -26,23 +29,29 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue'; import { ref } from 'vue';
import { axios, Environment, SessionManager, I18nMessageManager, AuthenticationManager, Tools } from '@/platform'; import { axios, Environment } from '@/platform';
import ChatDialog from './ChatDialog.vue'; import ChatDialog from './ChatDialog.vue';
const itemsRef = ref([]);
const loadingRef = ref(false);
const chatDialogRef = ref(); const chatDialogRef = ref();
const unReadedNotificationsRef = ref([]);
const unReadedNotificationsTotalCountRef = ref();
const findUnReadedNotifications = () => { const refresh = () => {
axios.get(Environment.apiContextPath('/api/system/notification/findUnReadedNotifications')).then((response) => { loadingRef.value = true;
unReadedNotificationsRef.value = response.data.content || []; axios
unReadedNotificationsTotalCountRef.value = response.data.totalElements; .get(Environment.apiContextPath('/api/system/notification/findUnReadedNotifications'))
}); .then((response: any) => {
itemsRef.value = response.data.content || [];
loadingRef.value = false;
})
.catch(() => {
loadingRef.value = false;
});
}; };
const openChatDialog = (item: any) => { const handleTask = (item: any) => {
chatDialogRef.value.open(item.sender); chatDialogRef.value.open(item.sender);
}; };
findUnReadedNotifications(); refresh();
</script> </script>

34
io.sc.platform.core.frontend/src/platform/views/home/Task.vue

@ -5,18 +5,19 @@
<q-icon name="bi-list-ol" size="1.5em" /> <q-icon name="bi-list-ol" size="1.5em" />
<span class="text-weight-bolder px-2">{{ $t('home.card.task.title') }}</span> <span class="text-weight-bolder px-2">{{ $t('home.card.task.title') }}</span>
<q-space /> <q-space />
<q-btn size="12px" flat no-caps :label="$t('home.card.task.action.list')" /> <q-btn size="12px" icon="bi-arrow-repeat" flat no-caps padding="2px 6px 2px 6px" :title="$t('refresh')" :loading="loadingRef" @click="refresh" />
<q-btn size="12px" icon="bi-justify" flat no-caps padding="2px 6px 2px 6px" :title="$t('home.card.task.action.list')" />
</div> </div>
</q-card-section> </q-card-section>
<q-card-section class="p-0"> <q-card-section class="p-0">
<q-markup-table flat dense separator="none" style="width: 100%; height: 130px; overflow-y: auto"> <q-markup-table flat dense separator="none" style="width: 100%; height: 130px; overflow-y: auto">
<tbody> <tbody>
<tr v-for="item in unCompletedTasksRef" :key="item.id"> <tr v-for="item in itemsRef" :key="item.id">
<td width="100%"> <td width="100%">
<div class="truncate" style="width: 350px">{{ item.businessDescription + item.businessDescription }}</div> <div class="truncate" style="width: 350px">{{ item.processDefinitionName + ' [' + item.name + '] : ' + item.businessDescription }}</div>
</td> </td>
<td width="100px">{{ item.previousAssignee + ', ' + item.createTimeAndNowDiff + $t(item.createTimeAndNowDiffUnit) + $t('before') }}</td> <td width="100px">{{ item.previousAssignee + ', ' + item.createTimeAndNowDiff + $t(item.createTimeAndNowDiffUnit) + $t('before') }}</td>
<td width="100px"><q-btn color="primary" label="办理" size="11px" @click="handleTask(item)" /></td> <td width="100px"><q-btn color="primary" no-caps :label="$t('home.card.task.action.process')" size="11px" @click="handleTask(item)" /></td>
</tr> </tr>
</tbody> </tbody>
</q-markup-table> </q-markup-table>
@ -25,19 +26,24 @@
</q-card> </q-card>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, defineAsyncComponent, defineComponent, h, render } from 'vue'; import { h, ref, defineAsyncComponent, nextTick } from 'vue';
import { axios, Environment, ComponentManager, Tools } from '@/platform'; import { axios, Environment, ComponentManager, Tools } from '@/platform';
import { nextTick } from 'vue';
const unCompletedTasksRef = ref([]); const itemsRef = ref([]);
const unCompletedTasksTotalCountRef = ref(); const loadingRef = ref(false);
const componentRef = ref(); const componentRef = ref();
const findUnCompletedTasks = () => { const refresh = () => {
axios.get(Environment.apiContextPath('/api/flowable/process/query/task')).then((response) => { loadingRef.value = true;
unCompletedTasksRef.value = response.data.content || []; axios
unCompletedTasksTotalCountRef.value = response.data.totalElements; .get(Environment.apiContextPath('/api/flowable/process/query/task'))
}); .then((response: any) => {
itemsRef.value = response.data.content || [];
loadingRef.value = false;
})
.catch(() => {
loadingRef.value = false;
});
}; };
const handleTask = async (item: any) => { const handleTask = async (item: any) => {
@ -51,5 +57,5 @@ const handleTask = async (item: any) => {
}); });
}; };
findUnCompletedTasks(); refresh();
</script> </script>

3
io.sc.platform.flowable/src/main/java/io/sc/platform/flowable/service/impl/ProcessQueryServiceImpl.java

@ -268,6 +268,8 @@ public class ProcessQueryServiceImpl implements ProcessQueryService {
query.orderByTaskName().asc(); query.orderByTaskName().asc();
} }
} }
}else{
query.orderByTaskCreateTime().desc();
} }
Pageable pageable =queryParameter.getJpaPageable(); Pageable pageable =queryParameter.getJpaPageable();
long total =query.count(); long total =query.count();
@ -375,7 +377,6 @@ public class ProcessQueryServiceImpl implements ProcessQueryService {
for(String processInstanceId : processInstanceAndBusinessMap.keySet()){ for(String processInstanceId : processInstanceAndBusinessMap.keySet()){
BusinessKeyAndDescription businessKeyAndDescription =processInstanceAndBusinessMap.get(processInstanceId); BusinessKeyAndDescription businessKeyAndDescription =processInstanceAndBusinessMap.get(processInstanceId);
if(businessKeyAndDescription.getBusinessKey().equals(bussinessKey)){ if(businessKeyAndDescription.getBusinessKey().equals(bussinessKey)){
bussinessDescription =businessKeyAndDescription.getBusinessDescription() + " : " + bussinessDescription;
businessKeyAndDescription.setBusinessDescription(bussinessDescription); businessKeyAndDescription.setBusinessDescription(bussinessDescription);
break; break;
} }

Loading…
Cancel
Save