Browse Source

chore: Adapted Data

master
wangxiang 2 years ago
parent
commit
0506b6b552
No known key found for this signature in database
GPG Key ID: 1BA7946AB6B232E4
  1. 39
      src/views/workflow/task/workflowStep/index.vue

39
src/views/workflow/task/workflowStep/index.vue

@ -1,17 +1,12 @@
<template> <template>
<a-card :class="prefixCls" title="流转记录" :bordered="false"> <a-card :class="prefixCls" title="流转记录" :bordered="false">
<a-steps :current="current" size="small"> <a-steps :current="current" size="small" status="process">
<a-step> <a-step v-for="(historyFlowChangeStep, index) in getHistoryFlowChangeStepList"
<template #title>开始</template> :key="index"
<template #description> :title="historyFlowChangeStep.activityName"
<span>admin,2023-10-07 14:40:17</span> status="success"
</template> :description="historyFlowChangeStep.assigneeName + historyFlowChangeStep.time"
</a-step> />
<a-step title="小猫审批" description="小猫,2023-10-07 14:40:17"/>
<a-step title="小猫审批" description="小猫,2023-10-07 14:40:17"/>
<a-step title="小猫审批" description="小猫,2023-10-07 14:40:17"/>
<a-step title="小猫审批" description="小猫,2023-10-07 14:40:17"/>
<a-step title="小猫审批" description="小猫,2023-10-07 14:40:17"/>
</a-steps> </a-steps>
<BasicTable @register="registerTable"/> <BasicTable @register="registerTable"/>
</a-card> </a-card>
@ -23,13 +18,19 @@
* Copyright © 2023-2023 <a href="https://godolphinx.org">海豚生态开源社区</a> All rights reserved. * Copyright © 2023-2023 <a href="https://godolphinx.org">海豚生态开源社区</a> All rights reserved.
* author wangxiang4 * author wangxiang4
*/ */
import { PropType, ref } from 'vue'; import { computed, PropType, ref } from 'vue';
import { Workflow } from '/@/api/platform/workflow/entity/workflow'; import { Workflow } from '/@/api/platform/workflow/entity/workflow';
import { Steps } from 'ant-design-vue'; import { Steps } from 'ant-design-vue';
import { formatToDateTime } from '/@/utils/dateUtil';
import { useDesign } from '/@/hooks/web/useDesign'; import { useDesign } from '/@/hooks/web/useDesign';
import { BasicTable, useTable } from '/@/components/Table'; import { BasicTable, useTable } from '/@/components/Table';
import { columns } from './workflowStep.data'; import { columns } from './workflowStep.data';
import { HistoricActivityInstance } from '/@/api/platform/workflow/entity/historicActivityInstance';
interface HistoryFlowChangeStep {
activityName: string;
assigneeName: string;
time: string;
}
const ASteps = Steps; const ASteps = Steps;
const AStep = Steps.Step; const AStep = Steps.Step;
@ -43,15 +44,21 @@
}); });
const [registerTable, { reload }] = useTable({ const [registerTable, { reload }] = useTable({
rowKey: 'taskId',
title: '流程进度列表', title: '流程进度列表',
//api: listProcessDef, dataSource: props.historyFlowChangeList,
rowKey: 'id',
columns, columns,
useSearchForm: false, useSearchForm: false,
showTableSetting: true, showTableSetting: true,
showIndexColumn: false, showIndexColumn: false,
}); });
const getHistoricActivityInstance = (historyFlowChange: Workflow): HistoricActivityInstance => historyFlowChange.historicActivityInstance || {};
const getHistoryFlowChangeStepList = computed((): HistoryFlowChangeStep[] => props.historyFlowChangeList.map(item => ({
activityName: getHistoricActivityInstance(item).activityName,
assigneeName: (item.assigneeName || '') + ',',
time: !getHistoricActivityInstance(item).startTime ? '--' : getHistoricActivityInstance(item).startTime
})));
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

Loading…
Cancel
Save