提交 b2cb247c 编写于 作者: Mosher's avatar Mosher

更新action-timeline组件 --- fix5

上级 27a874ea
.action-timeline { .action-timeline-table {
position: relative; width: calc(100% - 60px);
height: 100%; margin: 0 30px;
border-collapse:separate;
.action-timeline-wrapper { border-spacing:0px 40px;
padding-left: 115px; .action-timeline-thead {
color: var(--view-font-color-bright); th:nth-child(1) {
min-width: 200px;
>.action-timeline-item {
position: relative;
height: 30px;
display: list-item;
list-style: none;
top: -6px;
>.timeline-time {
position: absolute;
left: -115px;
top: 5px;
font-size: 12px;
}
>.timeline-content {
padding: 5px;
padding-left: 65px;
}
}
>.action-timeline-item::before {
position: absolute;
top: 17px;
left: 45px;
z-index: 3;
width: 7px;
height: 7px;
background-color: var(--view-button-background-color);
border: 1px solid #515a6e;
content: ' ';
border-radius: 50%;
} }
th:nth-child(2) {
>.action-timeline-item:nth-child(n+2)::after { width: 100%
position: absolute;
top: -7px;
bottom: 12px;
left: 48px;
z-index: 1;
display: block;
content: ' ';
border-left: 1px solid #515a6e;
} }
} }
.action-timeline-tbody {
.action-timeline-group-wrapper { tr {
padding-left: 200px; td {
padding-right: 30px; position: relative;
color: var(--view-font-color-bright); > .date {
display: flex;
.action-timeline-group { width: max-content;
position: relative; padding: 16px;
padding-top: 40px; font-size: 16px;
border: 2px solid #515a6e;
>.date { .arrow {
position: absolute; margin-left: 10px;
width: 150px; }
left: -170px;
border: 2px solid #515a6e;
font-size: 18px;
padding: 16px;
>.usertaskname {
max-width: 100px;
} }
>.arrow { >.date::before {
content: ' ';
display: block;
position: absolute; position: absolute;
top: 16px; right: -20px;
right: 16px; top: 30px;
cursor: pointer; height: 2px;
width: 20px;
background-color: #515a6e;
}
>.timeline {
padding: 16px;
border: 2px solid #515a6e;
min-height: 68px;
margin-left: 18px;
.action-timeline-wrapper {
padding-left: 115px;
color: var(--view-font-color-bright);
>.action-timeline-item {
position: relative;
height: 30px;
display: list-item;
list-style: none;
top: -6px;
>.timeline-time {
position: absolute;
left: -115px;
top: 5px;
font-size: 12px;
}
>.timeline-content {
padding: 5px;
padding-left: 65px;
}
}
>.action-timeline-item::before {
position: absolute;
top: 17px;
left: 45px;
z-index: 3;
width: 7px;
height: 7px;
background-color: var(--view-button-background-color);
border: 1px solid #515a6e;
content: ' ';
border-radius: 50%;
}
>.action-timeline-item:nth-child(n+2)::after {
position: absolute;
top: -7px;
bottom: 12px;
left: 48px;
z-index: 1;
display: block;
content: ' ';
border-left: 1px solid #515a6e;
}
}
} }
}
>.date::before {
content: ' ';
display: block;
position: absolute;
right: -22px;
top: 30px;
height: 2px;
width: 20px;
background-color: #515a6e;
}
>.timeline {
padding: 16px;
border: 2px solid #515a6e;
min-height: 68px;
} }
} }
} }
......
<template> <template>
<div class="action-timeline"> <div class="action-timeline">
<div class='action-timeline-group-wrapper'> <table class="action-timeline-table">
<template v-for="(usertask, usertaskIndex) in data.usertasks"> <thead class="action-timeline-thead">
<div :key='usertaskIndex' class='action-timeline-group'> <tr>
<div class='date'> <th></th>
<div class='usertaskname'>{{ usertask.userTaskName }}</div> <th></th>
<div class='arrow' @click="changeExpand(usertask)"> </tr>
<i :class="usertask.isShow ? 'el-icon-arrow-down' : 'el-icon-arrow-up' " /> </thead>
</div> <tbody class="action-timeline-tbody">
</div> <template v-for="(usertask, usertaskIndex) in data.usertasks">
<div class='timeline'> <tr :key='usertaskIndex'>
<template v-if="usertask.identitylinks && usertask.identitylinks.length > 0"> <td align="right" valign="top">
{{$t('components.appWFApproval.wait')}} <div class='date'>
<strong> <div class='usertaskname'>{{ usertask.userTaskName }}</div>
<template v-for="(identitylink, len) in usertask.identitylinks"> <div class='arrow' @click="changeExpand(usertask)">
<template v-if="identitylink.displayname"> <i :class="usertask.isShow ? 'el-icon-arrow-down' : 'el-icon-arrow-up' " />
{{ identitylink.displayname }} </div>
<template v-if="len != usertask.identitylinks.length - 1"> </div>
</td>
</template> <td>
</template> <div class='timeline'>
</template> <template v-if="usertask.identitylinks && usertask.identitylinks.length > 0">
</strong> {{$t('components.appWFApproval.wait')}}
{{$t('components.appWFApproval.handle')}} <strong>
</template> <template v-for="(identitylink, len) in usertask.identitylinks">
<template v-else> <template v-if="identitylink.displayname">
<ul class="action-timeline-wrapper"> {{ identitylink.displayname }}
<template v-if="!usertask.isShow"> <template v-if="len != usertask.identitylinks.length - 1">
<li v-if="usertask.comments && usertask.comments.length > 0" class="action-timeline-item">
<div class='timeline-time'> </template>
{{ formatDate(usertask.comments[0].time, 'MM月DD日 HH:mm') }}&nbsp;{{ usertask.comments[0].authorName }} </template>
</div> </template>
<div class='timeline-content'> </strong>
{{ usertask.comments[0].type }}&nbsp;{{ usertask.comments[0].fullMessage }} {{$t('components.appWFApproval.handle')}}
</div>
</li>
</template> </template>
<template v-else> <template v-else>
<template v-for="(comment, commentIndex) in usertask.comments"> <ul class="action-timeline-wrapper">
<li :key="commentIndex" class="action-timeline-item"> <template v-if="!usertask.isShow">
<div class='timeline-time'> <li v-if="usertask.comments && usertask.comments.length > 0" class="action-timeline-item">
{{ formatDate(comment.time, 'MM月DD日 HH:mm')}} &nbsp;{{ comment.authorName }} <div class='timeline-time'>
</div> {{ formatDate(usertask.comments[0].time, 'MM月DD日 HH:mm') }}&nbsp;{{ usertask.comments[0].authorName }}
<div class='timeline-content'> </div>
{{ comment.type }}&nbsp;{{ comment.fullMessage }} <div class='timeline-content'>
</div> {{ usertask.comments[0].type }}&nbsp;{{ usertask.comments[0].fullMessage }}
</li> </div>
</template> </li>
</template>
<template v-else>
<template v-for="(comment, commentIndex) in usertask.comments">
<li :key="commentIndex" class="action-timeline-item">
<div class='timeline-time'>
{{ formatDate(comment.time, 'MM月DD日 HH:mm')}} &nbsp;{{ comment.authorName }}
</div>
<div class='timeline-content'>
{{ comment.type }}&nbsp;{{ comment.fullMessage }}
</div>
</li>
</template>
</template>
</ul>
</template> </template>
</ul> </div>
</template> </td>
</div> </tr>
</div> </template>
</template> </tbody>
</div> </table>
</div> </div>
</template> </template>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册