Merge branch 'master' of http://101.37.69.204:3000/mozhe/demo
This commit is contained in:
commit
38de730306
|
@ -79,14 +79,23 @@
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column v-for="item in dateColumns" :label="item.label" align="left" :prop="item.prop" width="110">
|
<el-table-column v-for="item in dateColumns" :label="item.label" align="left" :prop="item.prop" width="110">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tooltip v-if="scope.row.record.length > 0" placement="bottom">
|
<!-- <el-tooltip v-if="scope.row.record.length > 0" placement="bottom">
|
||||||
<template #content> 修改历史留痕:<br />
|
<template #content> 修改历史留痕:<br />
|
||||||
<li v-for="item in handleHistory(scope.row, scope.column) ">{{ item }}</li>
|
<li v-for="item in handleHistory(scope.row, scope.column) ">{{ item }}</li>
|
||||||
</template>
|
</template>
|
||||||
<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>
|
||||||
</el-tooltip>
|
</el-tooltip> -->
|
||||||
|
|
||||||
|
<el-popover v-if="scope.row.record.length > 0" @show="handleHistory(scope.row, scope.column)" placement="bottom"
|
||||||
|
title="修改历史留痕" :width="200" trigger="hover" :content="hisRecord">
|
||||||
|
<template #reference>
|
||||||
|
<el-button link @click="handleDate(scope.column, scope.row)">
|
||||||
|
{{ handleDateColumn(scope.row, scope.column) }}
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-popover>
|
||||||
|
|
||||||
<el-button v-else link @click="handleDate(scope.column, scope.row)">
|
<el-button v-else link @click="handleDate(scope.column, scope.row)">
|
||||||
{{ handleDateColumn(scope.row, scope.column) }}
|
{{ handleDateColumn(scope.row, scope.column) }}
|
||||||
|
@ -177,6 +186,7 @@ import { listPlanDetail, getPlanDetail, delPlanDetail, addPlanDetail, updatePlan
|
||||||
import { getPlanMain } from "@/api/mts/planMain";
|
import { getPlanMain } from "@/api/mts/planMain";
|
||||||
import { queryByBo } from "@/api/mts/planrecord";
|
import { queryByBo } from "@/api/mts/planrecord";
|
||||||
import { addPlanRecord, updatePlanRecord } from "@/api/mts/planRecord";
|
import { addPlanRecord, updatePlanRecord } from "@/api/mts/planRecord";
|
||||||
|
import { listPlanRecordHistory } from "@/api/mts/planRecordHistory";
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
@ -301,16 +311,23 @@ function handleDateColumn(row, column) {
|
||||||
return remark
|
return remark
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleHistory(row, column) {
|
const hisRecord = ref('')
|
||||||
|
async function handleHistory(row, column) {
|
||||||
let res = []
|
let res = []
|
||||||
if (row.record.length > 0) {
|
if (row.record.length > 0) {
|
||||||
for (const item of row.record) {
|
for (const item of row.record) {
|
||||||
if (item.recordDate == column.label) {
|
if (item.recordDate == column.label) {
|
||||||
res.push(item.remark)
|
const hisList = await listPlanRecordHistory({ recordId: item.id })
|
||||||
|
|
||||||
|
for (const his of hisList.rows) {
|
||||||
|
res.push(his.remark)
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return res
|
console.log('res', res)
|
||||||
|
hisRecord.value = res.join(',')
|
||||||
}
|
}
|
||||||
|
|
||||||
const nbsp = " "
|
const nbsp = " "
|
||||||
|
|
Loading…
Reference in New Issue