|
|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<Modal
|
|
|
|
|
:width="74"
|
|
|
|
|
:width="78"
|
|
|
|
|
v-model="isShow"
|
|
|
|
|
title="绩效自评表">
|
|
|
|
|
|
|
|
|
|
@ -30,12 +30,12 @@
|
|
|
|
|
<td colspan="2">
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
<td colspan="3">
|
|
|
|
|
<th colspan="3">
|
|
|
|
|
全年预算数
|
|
|
|
|
</td>
|
|
|
|
|
<td colspan="2">
|
|
|
|
|
</th>
|
|
|
|
|
<th colspan="2">
|
|
|
|
|
实际支出数
|
|
|
|
|
</td>
|
|
|
|
|
</th>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr v-for="(item, index) in contractList">
|
|
|
|
|
<td colspan="2">
|
|
|
|
|
@ -57,16 +57,37 @@
|
|
|
|
|
<th style="max-width: 30%;">评价要点及评分规则</th>
|
|
|
|
|
<th>实际完成值</th>
|
|
|
|
|
<th>得分</th>
|
|
|
|
|
<th style="width: 46px;" class="no-export-xlsx">附件</th>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr v-for="(item, index) in planTargetList" :key="item.id">
|
|
|
|
|
<td :rowspan="spanArr[index]" :style="{ 'display': spanArr[index] ? '' : 'none' }">{{ (item.target && item.target.target_type_detail) ? item.target.target_type_detail.name : '' }}</td>
|
|
|
|
|
<td :rowspan="spanArr1[index]" :style="{ 'display': spanArr1[index] ? '' : 'none' }">{{ (item.target && item.target.target_type2_detail) ? item.target.target_type2_detail.name : '' }}</td>
|
|
|
|
|
<td :rowspan="spanArr[index]" v-if="spanArr[index]" :style="{ 'display': spanArr[index] ? '' : 'none' }">{{ (item.target && item.target.target_type_detail) ? item.target.target_type_detail.name : '' }}</td>
|
|
|
|
|
<td :rowspan="spanArr1[index]" v-if="spanArr1[index]" :style="{ 'display': spanArr1[index] ? '' : 'none' }">{{ (item.target && item.target.target_type2_detail) ? item.target.target_type2_detail.name : '' }}</td>
|
|
|
|
|
<td>{{ item.target ? item.target.name : '' }}</td>
|
|
|
|
|
<td>{{ targetValue(item) }}</td>
|
|
|
|
|
<td>{{ item.score }}</td>
|
|
|
|
|
<td style="max-width: 300px;">{{ (item.plan_evaluates && item.plan_evaluates.find(j => j.plan_target_id === item.id)) ? item.plan_evaluates.find(j => j.plan_target_id === item.id).evaluation_main : '' }}</td>
|
|
|
|
|
<td style="max-width: 300px;">{{ evaluationMain(item) }}</td>
|
|
|
|
|
<td>{{ actResultFormat(item) }}</td>
|
|
|
|
|
<td>{{ (item.plan_evaluates && item.plan_evaluates.find(j => j.plan_target_id === item.id)) ? item.plan_evaluates.find(j => j.plan_target_id === item.id).socre : '' }}</td>
|
|
|
|
|
<td>{{ socre(item) }}</td>
|
|
|
|
|
<td class="no-export-xlsx">
|
|
|
|
|
<el-popover
|
|
|
|
|
placement="bottom-start"
|
|
|
|
|
title="附件"
|
|
|
|
|
width="220"
|
|
|
|
|
trigger="hover">
|
|
|
|
|
<el-link slot="reference" type="primary">查看</el-link>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<div v-if="files(item).length > 0">
|
|
|
|
|
<div v-for="(file) in files(item)">
|
|
|
|
|
<el-link :href="file.url" target="_blank">{{ file.original_name }}</el-link>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else>
|
|
|
|
|
<p style="text-align: center;color: #999;">暂无附件</p>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-popover>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<th colspan="4">合计</th>
|
|
|
|
|
@ -141,7 +162,6 @@ export default {
|
|
|
|
|
|
|
|
|
|
async getBudgetDetail() {
|
|
|
|
|
this.detail = await detailBudget({ id: this.planId },true)
|
|
|
|
|
console.log('detail',this.detail)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async getPlanTarget() {
|
|
|
|
|
@ -175,7 +195,6 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.planTargetList = list;
|
|
|
|
|
console.log('plantarget',this.planTargetList)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async getContract () {
|
|
|
|
|
@ -185,17 +204,19 @@ export default {
|
|
|
|
|
page_size: 1000,
|
|
|
|
|
}))?.list?.data
|
|
|
|
|
this.contractList = res;
|
|
|
|
|
console.log('contract', res)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
exportExcel () {
|
|
|
|
|
let wb = XLSX.utils.table_to_book(this.$refs['detail-achievement-table'])
|
|
|
|
|
async exportExcel () {
|
|
|
|
|
let tableDom = this.$refs['detail-achievement-table'].cloneNode(true);
|
|
|
|
|
tableDom.querySelectorAll(".no-export-xlsx").forEach(item => {
|
|
|
|
|
item.parentNode.removeChild(item)
|
|
|
|
|
})
|
|
|
|
|
let wb = XLSX.utils.table_to_book(tableDom)
|
|
|
|
|
let wbout = XLSX.write(wb, { bookType: 'xlsx', type: 'binary' });
|
|
|
|
|
|
|
|
|
|
// 获取table中的行数
|
|
|
|
|
const table = this.$refs['detail-achievement-table'];
|
|
|
|
|
const rowCount = table.rows.length;
|
|
|
|
|
console.log(rowCount,123)
|
|
|
|
|
|
|
|
|
|
// 设置行高
|
|
|
|
|
const ws = wb.Sheets[wb.SheetNames[0]];
|
|
|
|
|
@ -214,7 +235,8 @@ export default {
|
|
|
|
|
return buf;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
saveAs(new Blob([s2ab(wbout)], { type: 'application/octet-stream' }), "绩效自评价表.xlsx")
|
|
|
|
|
await saveAs(new Blob([s2ab(wbout)], { type: 'application/octet-stream' }), "绩效自评价表.xlsx")
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
@ -242,10 +264,24 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
actResultFormat () {
|
|
|
|
|
return function(item) {
|
|
|
|
|
|
|
|
|
|
return item.plan_evaluates?.find(j => j.plan_target_id === item.id)?.result
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
socre () {
|
|
|
|
|
return function(item) {
|
|
|
|
|
return item.plan_evaluates?.find(j => j.plan_target_id === item.id)?.socre
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
evaluationMain () {
|
|
|
|
|
return function(item) {
|
|
|
|
|
return item.plan_evaluates?.find(j => j.plan_target_id === item.id)?.evaluation_main
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
files () {
|
|
|
|
|
return function(item) {
|
|
|
|
|
return item.plan_evaluates?.find(j => j.plan_target_id === item.id)?.files || []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
targetTotal () {
|
|
|
|
|
return this.planTargetList.reduce((pre, cur) => {
|
|
|
|
|
@ -296,6 +332,8 @@ thead {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
th {
|
|
|
|
|
word-break: keep-all;
|
|
|
|
|
text-align: center;
|
|
|
|
|
height: 40px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|