代码提交
This commit is contained in:
parent
c833d79778
commit
6e2c7023cb
|
@ -88,20 +88,20 @@
|
|||
</el-button>
|
||||
</el-tooltip> -->
|
||||
|
||||
<el-popover v-if="scope.row.record.length > 0" @before-enter="handleHistory(scope.row, scope.column)" placement="bottom"
|
||||
title="修改历史留痕" :width="200" trigger="hover">
|
||||
<el-popover v-if="handleHisShow(scope.row, scope.column)" @before-enter="handleHistory(scope.row, scope.column)"
|
||||
placement="bottom" title="修改历史留痕" :width="200" trigger="hover">
|
||||
<template #reference>
|
||||
<el-button link @click="handleDate(scope.column, scope.row)">
|
||||
{{ handleDateColumn(scope.row, scope.column) }}
|
||||
</el-button>
|
||||
</template>
|
||||
<template #default>
|
||||
<li v-for="his in hisRecord">{{ his }}</li>
|
||||
<li v-for="his in hisRecord">{{ his.createTime }}: {{ his.remark }}</li>
|
||||
</template>
|
||||
</el-popover>
|
||||
|
||||
<el-button v-else link @click="handleDate(scope.column, scope.row)">
|
||||
{{ handleDateColumn(scope.row, scope.column) }}
|
||||
<el-button link @click="handleDate(scope.column, scope.row)" style="opacity:0;" v-else>
|
||||
{{ item.label }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -314,6 +314,17 @@ function handleDateColumn(row, column) {
|
|||
return remark
|
||||
}
|
||||
|
||||
function handleHisShow(row, column) {
|
||||
if (row.record.length > 0) {
|
||||
for (const item of row.record) {
|
||||
if (item.recordDate == column.label) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
const hisRecord = ref([])
|
||||
async function handleHistory(row, column) {
|
||||
let res = []
|
||||
|
@ -323,7 +334,7 @@ async function handleHistory(row, column) {
|
|||
const hisList = await listPlanRecordHistory({ recordId: item.id })
|
||||
|
||||
for (const his of hisList.rows) {
|
||||
res.push(his.remark)
|
||||
res.push(his)
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue