Browse Source

chore: Adapted Data

master
wangxiang 2 years ago
parent
commit
6a15d4cb10
No known key found for this signature in database
GPG Key ID: 1BA7946AB6B232E4
  1. 22
      src/views/workflow/task/TaskForm.vue
  2. 35
      src/views/workflow/task/WorkflowTimeLine.vue

22
src/views/workflow/task/TaskForm.vue

@ -13,7 +13,7 @@
<Icon icon="fa6-solid:file-lines"/>表单信息 <Icon icon="fa6-solid:file-lines"/>表单信息
</span> </span>
</template> </template>
<!-- 动态表单:内置使用枇杷表单设计器(待更新为海豚表单设计器) --> <!-- 动态表单:内置使用枇杷表单设计器(待更新为VUE3海豚表单设计器) -->
<workflow-preview-form v-if="state.formType !== '2'" <workflow-preview-form v-if="state.formType !== '2'"
ref="formPreview" ref="formPreview"
:taskFormData="state.taskFormData" :taskFormData="state.taskFormData"
@ -21,7 +21,7 @@
<!-- 外置表单:内置使用用户自定义的vue页面,手动填写页面路径即可 --> <!-- 外置表单:内置使用用户自定义的vue页面,手动填写页面路径即可 -->
<component :is="state.formPath" <component :is="state.formPath"
v-if="state.formType === '2'" v-if="state.formType === '2'"
ref="form" ref="formPreview"
:formReadOnly="state.formReadOnly" :formReadOnly="state.formReadOnly"
:businessId="state.businessId" :businessId="state.businessId"
/> />
@ -32,7 +32,7 @@
<Icon icon="fa6-solid:money-bill-wheat"/>流程信息 <Icon icon="fa6-solid:money-bill-wheat"/>流程信息
</span> </span>
</template> </template>
<WorkflowTimeLine/> <WorkflowTimeLine :history-flow-change-list="state.historyFlowChangeList"/>
</ATabPane> </ATabPane>
<ATabPane key="processChart"> <ATabPane key="processChart">
<template #tab> <template #tab>
@ -139,8 +139,14 @@
</a-card> </a-card>
</ALayoutContent> </ALayoutContent>
<footer class="workflow-form__footer" :style="getWrapFormFooterStyle"> <footer class="workflow-form__footer" :style="getWrapFormFooterStyle">
<a-button size="large" type="primary" @click="commit">审批</a-button> <template v-for="(button, index) in state.buttons" :key="index">
<a-button size="large" type="primary" danger>驳回</a-button> <!-- 渲染配置按钮 -->
<a-button v-show="button.isHide === '0'"
size="large"
type="primary"
@click="submit(button)"
>{{ button.name }}</a-button>
</template>
</footer> </footer>
<UserPicker :title="state.userPickerProps.title" <UserPicker :title="state.userPickerProps.title"
:limit="state.userPickerProps.limit" :limit="state.userPickerProps.limit"
@ -577,7 +583,7 @@
cc({ processInsId: state.processInsId }); cc({ processInsId: state.processInsId });
} }
function submit(button: WorkflowButton) { function submit(button: Partial<WorkflowButton>) {
// //
const vars: Recordable = {}; const vars: Recordable = {};
// //
@ -585,9 +591,9 @@
// //
vars.assignee = state.auditForm.assignee; vars.assignee = state.auditForm.assignee;
// //
state.auditForm.mesCode = button.code; state.auditForm.mesCode = button.code!;
// //
state.auditForm.mesName = button.name; state.auditForm.mesName = button.name!;
switch (button.code) { switch (button.code) {
// //
case '_workflow_activity_start': case '_workflow_activity_start':

35
src/views/workflow/task/WorkflowTimeLine.vue

@ -1,46 +1,41 @@
<template> <template>
<a-card :class="prefixCls" title="流程信息" :bordered="false"> <a-card :class="prefixCls" title="流程信息" :bordered="false">
<a-timeline> <a-timeline>
<a-timeline-item color="#3f9eff"> <a-timeline-item v-for="(historyFlowChange, index) in historyFlowChangeList" :key="index" color="#3f9eff">
<div class="workflow"> <div class="workflow">
<div class="timestamp">{{formatToDateTime()}}</div> <div class="timestamp">{{ getHistoricActivityInstance(historyFlowChange).endTime }}</div>
<a-card> <a-card>
<h4>{{'管理员审批'}}</h4> <h4>{{ getHistoricActivityInstance(historyFlowChange).activityName }}</h4>
<a-row :gutter="25"> <a-row :gutter="25">
<a-col class="tip" style="margin-left:10px" :span="11"> <a-col class="tip" style="margin-left:10px" :span="11">
<div class="item"> <div class="item">
<span class="label">审批人 : </span> <span class="label">审批人 : </span>
<span class="value">{{'虚拟内容'}}</span> <span class="value">{{ historyFlowChange.assigneeName }}</span>
</div> </div>
<div class="item"> <div class="item">
<span class="label">办理状态 : </span> <span class="label">办理状态 : </span>
<span class="value"> <span class="value">
<!-- <a-tag :type="historyFlowChange.activityCommentInfo.mesLevel" <a-tag :color="getActivityCommentInfo(historyFlowChange).mesLevel">{{ getActivityCommentInfo(historyFlowChange).mesName }}</a-tag>
effect="dark"
size="small"
>{{'虚拟内容}}</a-tag>-->
</span> </span>
</div> </div>
<div class="item"> <div class="item">
<span class="label">审批意见 : </span> <span class="label">审批意见 : </span>
<!-- <a-tooltip effect="dark" <a-tooltip>
:content="historyFlowChange.activityCommentInfo.message" <template #title>{{ getActivityCommentInfo(historyFlowChange).message }}</template>
placement="top-start" {{ getActivityCommentInfo(historyFlowChange).message }}
> </a-tooltip>
<span class="value">{{'虚拟内容'}}</span>
</a-tooltip>-->
</div> </div>
<div class="item"> <div class="item">
<span class="label">开始时间 : </span> <span class="label">开始时间 : </span>
<span class="value">{{'虚拟内容'}}</span> <span class="value">{{ getHistoricActivityInstance(historyFlowChange).startTime || '--' }}</span>
</div> </div>
<div class="item"> <div class="item">
<span class="label">结束时间 : </span> <span class="label">结束时间 : </span>
<span class="value">{{'虚拟内容'}}</span> <span class="value">{{ getHistoricActivityInstance(historyFlowChange).endTime || '' }}</span>
</div> </div>
<div class="item"> <div class="item">
<span class="label">用时 : </span> <span class="label">用时 : </span>
<span class="value">{{'虚拟内容'}}</span> <span class="value">{{ historyFlowChange.durationTime || '0秒' }}</span>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -60,8 +55,9 @@
import { PropType } from 'vue'; import { PropType } from 'vue';
import { Workflow } from '/@/api/platform/workflow/entity/workflow'; import { Workflow } from '/@/api/platform/workflow/entity/workflow';
import { Timeline } from 'ant-design-vue'; import { Timeline } from 'ant-design-vue';
import { formatToDateTime } from '/@/utils/dateUtil';
import { useDesign } from '/@/hooks/web/useDesign'; import { useDesign } from '/@/hooks/web/useDesign';
import {HistoricActivityInstance} from '/@/api/platform/workflow/entity/historicActivityInstance';
import {ActivityCommentInfo} from '/@/api/platform/workflow/entity/activityCommentInfo';
const ATimeline = Timeline; const ATimeline = Timeline;
const ATimelineItem = Timeline.Item; const ATimelineItem = Timeline.Item;
@ -73,6 +69,9 @@
} }
}); });
const getHistoricActivityInstance = (historyFlowChange: Workflow): HistoricActivityInstance => historyFlowChange.historicActivityInstance || {};
const getActivityCommentInfo = (historyFlowChange: Workflow): ActivityCommentInfo => historyFlowChange.activityCommentInfo || {};
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@prefix-cls: ~'@{namespace}-workflow-time-line'; @prefix-cls: ~'@{namespace}-workflow-time-line';

Loading…
Cancel
Save