terminationLog.vue
3.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<template>
<div class="report-components">
<div class="title">终止记录</div>
<div class="termination-log">
<GLTable ref="mutiProRef" :hasPage="false" :tableData="terminationLogList" :tableParams="logTableParams">
<div slot="projectDetails" slot-scope="scope">
<div class="service_name">{{ `${scope.scope.serviceName}${scope.scope.serviceGrade}` }}</div>
<div class="service_Info">{{ `服务年限${scope.scope.servicePeriod}年,有效期${scope.scope.startDate} 至 ${scope.scope.endDate}` }}</div>
</div>
<div slot="reason" slot-scope="scope" style="width: 240px;">
<el-popover v-if="scope.scope.periodDetail.reason && scope.scope.periodDetail.reason.length >= Math.ceil((200 - 36) / 14) * 2" placement="top" popper-class="base-popper" trigger="hover" :content="scope.scope.periodDetail.reason">
<span slot="reference" class="line-ellipsis">
{{ scope.scope.periodDetail.reason }}
</span>
</el-popover>
<span v-else class="line-ellipsis">
{{ scope.scope.periodDetail.reason }}
</span>
</div>
</GLTable>
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
export default {
name: 'TerminationLog',
props: {
terminationLogList: Array
},
data() {
return {
logTableParams: {
listName: 'list',
tableColumns: [
{
label: '终止项目明细',
prop: '',
addHtml: 'projectDetails'
},
{
label: '终止时间',
prop: '',
formatter: cellValue => {
return `${cellValue.periodDetail.startDate} 至 ${cellValue.periodDetail.endDate}`
}
},
{
label: '终止原因',
width: 260,
addHtml: 'reason'
},
{
label: '状态',
prop: '',
width: 80,
formatter: cellValue => {
return cellValue.periodDetail?.operationType == 0 ? '终止' : cellValue.periodDetail?.operationType == 1 ? '取消' : '-'
}
},
{
label: '操作人',
prop: '',
width: 150,
formatter: cellValue => {
return cellValue.periodDetail?.updatedBy
}
},
{
label: '操作时间',
prop: '',
formatter: cellValue => {
return cellValue.periodDetail?.updatedDate ? dayjs(cellValue.periodDetail?.updatedDate).format('YYYY-MM-DD HH:mm:ss') : '--'
}
}
]
},
}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.report-components {
background: white;
margin: 20px 0 0;
.title {
padding: 0 20px;
font-size: 16px;
font-weight: 500;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #d8d8d8;
margin: 0 0;
color: #333333;
}
.termination-log{
margin: 20px;
padding-bottom: 30px;
}
.line-ellipsis{
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2 ;
}
}
</style>