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

更新action-timeline组件 --- fix2

上级 89141c0e
......@@ -11,23 +11,25 @@
</div>
<div class='timeline'>
<template v-if="usertask.identitylinks && usertask.identitylinks.length > 0">
等待
{{$t('components.appWFApproval.wait')}}
<strong>
<template v-for="(identitylink, len) in usertask.identitylinks">
<template v-if="identitylink.displayname">
{{ identitylink.displayname }}
<template v-if="len != usertask.identitylinks.length - 1">
</template>
</template>
</template>
</strong>
处理
{{$t('components.appWFApproval.handle')}}
</template>
<template v-else>
<ul class="action-timeline-wrapper">
<template v-if="!usertask.isShow">
<li v-if="usertask.comments && usertask.comments.length > 0" class="action-timeline-item">
<div class='timeline-time'>
{{ formatDate(usertask.comments[0].time, 'MM月DD日 HH:mm') }} &nbsp;{{ usertask.comments[0].authorName }}
{{ formatDate(usertask.comments[0].time, 'MM月DD日 HH:mm') }}&nbsp;{{ usertask.comments[0].authorName }}
</div>
<div class='timeline-content'>
{{ usertask.comments[0].type }}&nbsp;{{ usertask.comments[0].fullMessage }}
......@@ -108,20 +110,20 @@ export default class ActionTimeline extends Vue {
this.service.GetWFHistory(this.context).then((res:any) =>{
if(res && (res.status === 200)){
this.data = res.data;
this.handleData();
this.initUIStateData();
}
})
}
}
/**
* 处理数据
* 初始化数据添加标记
*
* @memberof ActionTimeline
*/
public handleData() {
public initUIStateData() {
if(this.data && this.data.usertasks) {
this.data.usertasks.array.forEach((item: any) => {
this.data.usertasks.forEach((item: any) => {
item.isShow = true;
})
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册