|
@@ -10,7 +10,7 @@
|
|
|
<div class="hc-task-body relative flex">
|
|
|
<div class="hc-task-time">
|
|
|
<hc-body class="hc-task-body-card" padding="10px" scrollbar>
|
|
|
- <el-timeline class="hc-time-line">
|
|
|
+ <el-timeline v-if="rowInfo.fixedFlowId == null" class="hc-time-line">
|
|
|
<template v-for="(item, index) in flowList" :key="index">
|
|
|
<el-timeline-item :class="item.status === '2' ? 'success' : 'primary'" size="large">
|
|
|
<div class="timeline-item-icon">
|
|
@@ -22,6 +22,47 @@
|
|
|
</el-timeline-item>
|
|
|
</template>
|
|
|
</el-timeline>
|
|
|
+ <el-timeline v-else class="hc-time-line">
|
|
|
+ <template v-for="(item, index) in flowListTask" :key="index">
|
|
|
+ <el-timeline-item :class="item.status == '2' ? 'success' : 'primary'" size="large">
|
|
|
+ <div class="timeline-item-icon">
|
|
|
+ <hc-icon v-if="item.status == '2'" class="check-icon" name="check" />
|
|
|
+ </div>
|
|
|
+ <div v-if="!item.isTask" class="reply-name">
|
|
|
+ {{ item.name }}
|
|
|
+ </div>
|
|
|
+ <div v-if="item.isTask">
|
|
|
+ <div class="reply-name">
|
|
|
+ {{ item.name }}
|
|
|
+ <HcIcon v-if="item.type == 2" name="links" class="ml-2" />
|
|
|
+ <HcIcon v-if="item.type == 1" name="exchange-2" class="ml-2" />
|
|
|
+ <br>
|
|
|
+
|
|
|
+ <el-tooltip placement="right" effect="light" :visible="item.taskDetailvisible">
|
|
|
+ <template #content>
|
|
|
+ <el-timeline class="hc-time-line">
|
|
|
+ <template v-for="(item1, index1) in item.userList" :key="index1">
|
|
|
+ <el-timeline-item :class="item1.status === '2' ? 'success' : 'primary'" size="large">
|
|
|
+ <div class="timeline-item-icon">
|
|
|
+ <hc-icon v-if="item1.status === '2'" class="check-icon" name="check" />
|
|
|
+ </div>
|
|
|
+ <div class="reply-name">{{ item1.name }}</div>
|
|
|
+ <div class="reply-time">{{ item1.date }}</div>
|
|
|
+ <div class="reply-content" v-html="item1.flowValue" />
|
|
|
+ </el-timeline-item>
|
|
|
+ </template>
|
|
|
+ </el-timeline>
|
|
|
+ </template>
|
|
|
+ <el-link @click="getTaskDetail" @mouseenter="item.taskDetailvisible = true" @mouseleave="item.taskDetailvisible = false">点击查看详情</el-link>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="reply-time">{{ item.date }}</div>
|
|
|
+ <div class="reply-content" v-html="item.flowValue" />
|
|
|
+ </el-timeline-item>
|
|
|
+ </template>
|
|
|
+ </el-timeline>
|
|
|
</hc-body>
|
|
|
</div>
|
|
|
<div :id="`hc_task_table_${uuid}`" class="hc-task-table">
|
|
@@ -68,7 +109,7 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { nextTick, ref, watch } from 'vue'
|
|
|
-import { getArrValue, getObjValue, getRandom } from 'js-fast-way'
|
|
|
+import { arrUnion, getArrValue, getObjValue, getRandom } from 'js-fast-way'
|
|
|
import { useAppStore } from '~src/store'
|
|
|
import HcTaskForm from './task-form.vue'
|
|
|
import HcTaskNotes from './task-notes.vue'
|
|
@@ -111,6 +152,8 @@ watch(() => [
|
|
|
], ([key, row]) => {
|
|
|
tabsKey.value = Number(key)
|
|
|
rowInfo.value = row
|
|
|
+ console.log(rowInfo.value.fixedFlowId == null)
|
|
|
+
|
|
|
}, {
|
|
|
immediate: true,
|
|
|
deep: true,
|
|
@@ -164,6 +207,19 @@ const getTableDetail = async () => {
|
|
|
const { taskProcessInfo, taskCenterDataInfo } = getObjValue(data)
|
|
|
tableData.value = getArrValue(taskCenterDataInfo)
|
|
|
flowList.value = getArrValue(taskProcessInfo)
|
|
|
+ if (rowInfo.value.fixedFlowId) {
|
|
|
+ const list = [...flowList.value]
|
|
|
+ let firstarr = list.slice(0, 1)
|
|
|
+ let taskList = list.slice(1, list.length)
|
|
|
+ taskList.forEach((ele)=>{
|
|
|
+ ele.name = ele.taskBranchName
|
|
|
+ ele.status = ele.taskBranchStatus
|
|
|
+ ele.type = ele.taskBranchType
|
|
|
+ ele.isTask = true
|
|
|
+ })
|
|
|
+ flowListTask.value = arrUnion(firstarr, taskList)
|
|
|
+ }
|
|
|
+
|
|
|
//默认选中第一行
|
|
|
let info = {}
|
|
|
if (tableData.value.length > 0) {
|
|
@@ -180,6 +236,14 @@ const getTableDetail = async () => {
|
|
|
|
|
|
//流程信息,1待审批,2已审批
|
|
|
const flowList = ref([])
|
|
|
+//type为1流程审批,type为2是平行审批
|
|
|
+const flowListTask = ref([
|
|
|
+ { name: 'PCT', date: '2024-03-01 09:27:17', status: '2', flowValue: '上报', isTask:false },
|
|
|
+ { name: '"222"', date: '', status: '2', flowValue: '', type:1, isTask:true },
|
|
|
+ { name: '"111"', date: '', status: '1', flowValue: '', type:2, isTask:true },
|
|
|
+
|
|
|
+])
|
|
|
+const taskDetailList = ref([])
|
|
|
|
|
|
//中间计量单的表格数据
|
|
|
const middlepayTableColumn = ref([
|
|
@@ -287,6 +351,10 @@ const cancelClick = () => {
|
|
|
tableInfo.value = {}
|
|
|
emit('close')
|
|
|
}
|
|
|
+const taskDetailvisible = ref(false)
|
|
|
+const getTaskDetail = ()=>{
|
|
|
+ taskDetailvisible.value = true
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|