This commit is contained in:
cjw 2024-02-23 13:59:33 +08:00
commit 843959b52b
1 changed files with 7 additions and 5 deletions

View File

@ -88,13 +88,16 @@
</el-button> </el-button>
</el-tooltip> --> </el-tooltip> -->
<el-popover v-if="scope.row.record.length > 0" @show="handleHistory(scope.row, scope.column)" placement="bottom" <el-popover v-if="scope.row.record.length > 0" @before-enter="handleHistory(scope.row, scope.column)" placement="bottom"
title="修改历史留痕" :width="200" trigger="hover" :content="hisRecord"> title="修改历史留痕" :width="200" trigger="hover">
<template #reference> <template #reference>
<el-button link @click="handleDate(scope.column, scope.row)"> <el-button link @click="handleDate(scope.column, scope.row)">
{{ handleDateColumn(scope.row, scope.column) }} {{ handleDateColumn(scope.row, scope.column) }}
</el-button> </el-button>
</template> </template>
<template #default>
<li v-for="his in hisRecord">{{ his }}</li>
</template>
</el-popover> </el-popover>
<el-button v-else link @click="handleDate(scope.column, scope.row)"> <el-button v-else link @click="handleDate(scope.column, scope.row)">
@ -311,7 +314,7 @@ function handleDateColumn(row, column) {
return remark return remark
} }
const hisRecord = ref('') const hisRecord = ref([])
async function handleHistory(row, column) { async function handleHistory(row, column) {
let res = [] let res = []
if (row.record.length > 0) { if (row.record.length > 0) {
@ -326,8 +329,7 @@ async function handleHistory(row, column) {
} }
} }
} }
console.log('res', res) hisRecord.value = res
hisRecord.value = res.join(',')
} }
const nbsp = "&nbsp;&nbsp;&nbsp;&nbsp;" const nbsp = "&nbsp;&nbsp;&nbsp;&nbsp;"