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

Loading…
Cancel
Save