|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-drawer v-model="visibleDialog" class="custom-adrawer" :direction="direction" size="900" @close="handleCancel">
|
|
|
+ <el-drawer v-model="visibleDialog" class="custom-adrawer" direction="rtl" size="900" @close="handleCancel">
|
|
|
<template #header>
|
|
|
<div class="flow-header-box">
|
|
|
<div class="flow-no">编号:12138</div>
|
|
@@ -35,46 +35,21 @@
|
|
|
<div class="area-divider"></div>
|
|
|
|
|
|
<!--审批流-->
|
|
|
- <el-timeline style="margin-left: 10px">
|
|
|
- <el-timeline-item timestamp="提交" placement="top" type="success" :icon="Check">
|
|
|
- <!-- 审批完成 -->
|
|
|
- <div class="timeline-box flex-1">
|
|
|
- <div class="flex flex-align-center">
|
|
|
- <div class="timeline-box-user flex-1">
|
|
|
- <FlowNodeAvatar id="1" />
|
|
|
- <div v-if="false" class="comment">
|
|
|
- <div class="comment-content">同意</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <span class="timeline-box-date">2018-4-12 20:46:00</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-timeline-item>
|
|
|
+ <el-timeline style="margin-left: 50px">
|
|
|
+ <el-timeline-item v-for="active in activeData" :key="active.id" hollow :timestamp="active.taskName" placement="top">
|
|
|
+ <template #dot>
|
|
|
+ <FlowTypeDot :status="active.taskState" :type="active.taskType" />
|
|
|
+ </template>
|
|
|
|
|
|
- <el-timeline-item timestamp="审批" placement="top" type="success" :icon="Check">
|
|
|
<div class="timeline-box flex-1">
|
|
|
<div class="flex flex-align-center">
|
|
|
<div class="timeline-box-user flex-1">
|
|
|
<FlowNodeAvatar id="1" />
|
|
|
<div class="comment">
|
|
|
- <div class="comment-content">同意</div>
|
|
|
+ <div class="comment-content">{{ active.duration }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <span class="timeline-box-date">2018-4-12 20:46:12</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-timeline-item>
|
|
|
-
|
|
|
- <el-timeline-item timestamp="抄送" placement="top" type="success" :icon="Check">
|
|
|
- <div class="timeline-box flex-1">
|
|
|
- <div class="flex flex-align-center">
|
|
|
- <el-space wrap>
|
|
|
- <FlowNodeAvatar id="1" />
|
|
|
- <FlowNodeAvatar id="1" />
|
|
|
- <FlowNodeAvatar id="1" />
|
|
|
- </el-space>
|
|
|
-
|
|
|
- <span class="timeline-box-date">2018-4-12 20:46:32</span>
|
|
|
+ <span class="timeline-box-date">{{ formatTimestamp(active.finishTime) }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-timeline-item>
|
|
@@ -128,34 +103,42 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { computed, ref } from 'vue'
|
|
|
+import { computed, ref, onMounted } from 'vue'
|
|
|
import FlowStatusStamp from '@/components/Flow/FlowStatusStamp.vue'
|
|
|
import FlowStatusTag from '@/components/Flow/FlowStatusTag.vue'
|
|
|
import FlowNodeAvatar from '@/components/Flow/FlowNodeAvatar.vue'
|
|
|
+import FlowTypeDot from '@/components/Flow/FlowTypeDot.vue'
|
|
|
import { ChatLineSquare, Check, Close, Switch, DArrowLeft, Plus, Minus, More } from '@element-plus/icons-vue'
|
|
|
+import { processTaskListHisTaskApi } from '@/api/flow/processTask'
|
|
|
+import { formatTimestamp } from '@/utils/datetime'
|
|
|
|
|
|
-const direction = ref('rtl')
|
|
|
-const myProps = defineProps({
|
|
|
+const props = defineProps({
|
|
|
modelValue: {
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
},
|
|
|
- userIds: {
|
|
|
- type: Array,
|
|
|
- default: () => []
|
|
|
+ messageId: {
|
|
|
+ type: String,
|
|
|
+ default: undefined
|
|
|
}
|
|
|
})
|
|
|
|
|
|
-const visible = ref(false) // 弹窗显示隐藏
|
|
|
-const activeData = ref({})
|
|
|
+onMounted(() => {
|
|
|
+ processTaskListHisTaskApi(props.messageId).then(data => {
|
|
|
+ activeData.value = data
|
|
|
+ })
|
|
|
+})
|
|
|
+
|
|
|
+// 弹窗显示隐藏
|
|
|
+const visible = ref(false)
|
|
|
+const activeData = ref([])
|
|
|
|
|
|
-// 同步值
|
|
|
-const $myEmit = defineEmits(['update:modelValue', 'successFn'])
|
|
|
+const emit = defineEmits(['update:modelValue', 'successFn'])
|
|
|
|
|
|
// 关闭按钮
|
|
|
const closeDrawer = () => {
|
|
|
- $myEmit('successFn')
|
|
|
- $myEmit('update:modelValue', false)
|
|
|
+ emit('successFn')
|
|
|
+ emit('update:modelValue', false)
|
|
|
}
|
|
|
|
|
|
const handleCancel = () => {
|
|
@@ -164,10 +147,10 @@ const handleCancel = () => {
|
|
|
|
|
|
const visibleDialog = computed({
|
|
|
get() {
|
|
|
- return myProps.modelValue
|
|
|
+ return props.modelValue
|
|
|
},
|
|
|
set(val) {
|
|
|
- $myEmit('update:modelValue', val)
|
|
|
+ emit('update:modelValue', val)
|
|
|
}
|
|
|
})
|
|
|
|
|
@@ -201,16 +184,6 @@ const openComment = () => {
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
-::v-deep .el-drawer__header {
|
|
|
- padding: 0px;
|
|
|
- margin-bottom: 0 !important;
|
|
|
-}
|
|
|
-
|
|
|
-::v-deep .el-drawer__footer {
|
|
|
- padding-top: 20px;
|
|
|
- border-top: 1px solid rgba(229, 230, 235, 1);
|
|
|
-}
|
|
|
-
|
|
|
.flow-detail-container {
|
|
|
height: 100%;
|
|
|
}
|
|
@@ -237,6 +210,7 @@ const openComment = () => {
|
|
|
overflow: hidden;
|
|
|
overflow-y: auto;
|
|
|
padding: 0 20px;
|
|
|
+
|
|
|
.header-box {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
@@ -280,6 +254,8 @@ const openComment = () => {
|
|
|
|
|
|
// 时间线样式
|
|
|
.timeline-box {
|
|
|
+ padding-left: 8px;
|
|
|
+
|
|
|
&-user {
|
|
|
.name {
|
|
|
color: #1d2129;
|
|
@@ -302,7 +278,7 @@ const openComment = () => {
|
|
|
&-date {
|
|
|
margin-left: 10px;
|
|
|
left: 0;
|
|
|
- padding-right: 16px;
|
|
|
+ padding-right: 32px;
|
|
|
text-align: right;
|
|
|
transform: translate(-100%);
|
|
|
position: absolute;
|
|
@@ -314,4 +290,18 @@ const openComment = () => {
|
|
|
line-height: 1.667;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+:deep(.el-drawer__header) {
|
|
|
+ padding: 0px;
|
|
|
+ margin-bottom: 0 !important;
|
|
|
+}
|
|
|
+
|
|
|
+:deep(.el-drawer__footer) {
|
|
|
+ padding-top: 20px;
|
|
|
+ border-top: 1px solid rgba(229, 230, 235, 1);
|
|
|
+}
|
|
|
+
|
|
|
+:deep(.el-timeline .el-timeline-item__timestamp) {
|
|
|
+ padding-left: 8px;
|
|
|
+}
|
|
|
</style>
|