<div style="height: 600px; overflow: auto">
<el-timeline
v-if="operationData.length > 0"
v-infinite-scroll="load"
style="overflow: auto"
>
<el-timeline-item
v-for="(operation, index) in operationData"
style="overflow: auto"
:key="index"
:icon="operation.icon"
:type="operation.type"
:color="operation.color"
:size="operation.size"
>
<div class="flexDiv">
<div>
<div style="display: flex">
<p style="margin-right: 10px">{{ operation.activityName }}</p>
<p>{{ formateStatus(operation.approveStatus) }}</p>
</div>
<p>{{ operation.operator }}</p>
</div>
<div class="detailDiv">
<p>
{{ formate(operation.createTime) }}
</p>
<p class="underline" @click="detailInfo(operation)">查看详情</p>
</div>
</div>
</el-timeline-item>
</el-timeline>
<div
v-if="finish"
style="
font-size: 16px;
color: #666666;
margin-bottom: 30px;
text-align: center;
"
>
没有数据了 (。・ω・。)
</div>
</div>
getOperationData() {
postToken(selectCompanyActivityRecord, {
companyCode: this.trData.companyCode,
page: this.page,
size: this.size,
}).then((res) => {
// console.log(res, "公司操作详情");
if (res.data.status == 1) {
this.total = res.data.total;
// console.log(this.total, "公司操作详情total");
this.operationData = this.operationData.concat(res.data.rows);
} else {
this.$message.error(res.data.msg);
}
});
},
load() {
// console.log(this.page, "加载");
this.page++;
let totalPage = Math.ceil(this.total / this.size);
if (this.page > totalPage) {
if (this.operationData.length == 0) {
this.finish = false;
} else {
this.finish = true;
}
return;
} else {
this.finish = false;
}
this.getOperationData();
},