From 7e43f907ef8abe823c8bc24230385826b77ce81d Mon Sep 17 00:00:00 2001
From: ysn <2126564605@qq.com>
Date: Thu, 23 Apr 2026 13:04:18 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E6=95=88=E7=AE=A1=E7=90=86-=E7=BB=A9?=
=?UTF-8?q?=E6=95=88=E7=AE=A1=E7=90=86-=E7=BB=A9=E6=95=88=E5=85=AC?=
=?UTF-8?q?=E7=A4=BA-=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/prefDetail.vue | 90 ++++++++++++-------
.../performanceDisclosure.vue | 90 ++++++++++---------
2 files changed, 107 insertions(+), 73 deletions(-)
diff --git a/src/views/personnelEfficiencyManagement/performanceManagement/components/prefDetail.vue b/src/views/personnelEfficiencyManagement/performanceManagement/components/prefDetail.vue
index f173a08c..47a6be02 100644
--- a/src/views/personnelEfficiencyManagement/performanceManagement/components/prefDetail.vue
+++ b/src/views/personnelEfficiencyManagement/performanceManagement/components/prefDetail.vue
@@ -22,8 +22,12 @@
@refresh-change="refreshChange"
>
- 附件下载(明细)
- 附件下载(汇总)
+
+ 附件下载(明细)
+
+
+ 附件下载(汇总)
+
@@ -33,7 +37,7 @@ import {
detailBsEfficiencyTask,
downloadBsEfficiencyTaskTemplate,
} from '@/api/performanceManagement/dataReporting';
-import { downloadXls, downloadFile, downloadFileBlob } from '@/utils/util';
+import { downloadFileBlob } from '@/utils/util';
export default {
props: {
showDetail: {
@@ -44,12 +48,17 @@ export default {
type: Object,
default: () => ({}),
},
+ type: {
+ type: String,
+ default: '1',
+ },
},
data() {
return {
openShow: false,
loading: false,
form: {},
+ query: {},
option: {
height: 'auto',
align: 'center',
@@ -83,15 +92,12 @@ export default {
dialogWidth: 1200,
dialogClickModal: false,
searchEnter: true,
- excelBtn: false,
- filterBtn: true,
- searchShowBtn: false,
- columnSort: true,
excelBtn: true,
+ filterBtn: true,
+ searchShowBtn: true,
columnSort: true,
showOverflowTooltip: true,
searchLabelPosition: 'left',
- searchLabelPosition: 'left',
searchGutter: 24,
searchSpan: 6,
menuAlign: 'center',
@@ -105,19 +111,22 @@ export default {
total: 0,
},
data: [],
- columnData: [
- { label: '员工工号', prop: 'cardNo' },
- { label: '姓名', prop: 'name' },
- ],
+ rowData: {},
};
},
created() {
this.openShow = this.showDetail;
+ if (this.type === '2') {
+ this.query = { yearMonth: this.row.yearMonth || '' };
+ }
this.onLoad();
},
methods: {
closeDialog(val) {
this.openShow = false;
+ this.form = {};
+ this.query = {};
+ this.data = [];
this.$emit('closeDetail', val);
},
searchChange(params, done) {
@@ -132,28 +141,49 @@ export default {
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
+ this.onLoad();
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
+ this.onLoad();
},
refreshChange() {
this.onLoad();
},
onLoad() {
this.loading = true;
- const params = {
- id: this.row.id,
- ...this.query,
- };
- detailBsEfficiencyTask(params)
+ const query =
+ this.type === '1'
+ ? { id: this.row.id }
+ : {
+ employeeCodeExact: this.row.employeeCodeExact || '',
+ employeeNameExact: this.row.employeeNameExact || '',
+ status: this.row.status,
+ };
+ detailBsEfficiencyTask({ ...query, ...this.query })
.then(res => {
if (res.data.code === 200) {
this.data = res.data.data.table.tableDataList || [];
const arr = res.data.data.table.tableColumn;
- arr.push({ ...arr[0], prop: arr[0].prop + 'Exact', hide: true, search: true });
- arr.push({ ...arr[1], prop: arr[1].prop + 'Exact', hide: true, search: true });
- res.data.data.table.tableColumn = arr.map(item => ({ ...item, sortable: true }));
- this.option.column = res.data.data.table.tableColumn;
+ if (this.type === '1') {
+ arr.push({ ...arr[0], prop: arr[0].prop + 'Exact', hide: true, search: true });
+ arr.push({ ...arr[1], prop: arr[1].prop + 'Exact', hide: true, search: true });
+ } else if (this.type === '2') {
+ arr.push({
+ label: '年月',
+ prop: 'yearMonth',
+ hide: true,
+ search: true,
+ type: 'month',
+ format: 'YYYY-MM',
+ valueFormat: 'YYYY-MM',
+ });
+ }
+ this.option.column = arr.map(item => ({
+ ...item,
+ sortable: true,
+ }));
+ this.rowData = res.data.data || {};
} else {
this.data = [];
this.page.total = 0;
@@ -167,28 +197,24 @@ export default {
});
},
downloadDetail() {
- const completedTasks = this.row.subTasks.filter(task => task.status === 2);
- if (!this.row.subTasks || this.row.subTasks.length === 0 || completedTasks.length === 0) {
+ const completedTasks = this.rowData.subTasks?.filter(task => task.status == 2) || [];
+ if (completedTasks.length === 0) {
this.$message.warning('暂无可下载文件!');
return;
}
- this.row.subTasks.forEach(task => {
- if (task.attachLink != '') {
+ completedTasks.forEach(task => {
+ if (task.attachLink) {
downloadFileBlob(task.attachLink, task.taskName + '.xlsx');
- return;
}
});
},
downloadSummary() {
- if (this.row.attachLink == '') {
+ if (!this.rowData.attachLink) {
this.$message.warning('暂无可下载文件!');
return;
}
- downloadFileBlob(this.row.attachLink, this.row.taskName + '.xlsx');
+ downloadFileBlob(this.rowData.attachLink, this.rowData.taskName + '.xlsx');
},
},
};
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/views/personnelEfficiencyManagement/performanceManagement/performanceDisclosure.vue b/src/views/personnelEfficiencyManagement/performanceManagement/performanceDisclosure.vue
index cf747703..b5d5943f 100644
--- a/src/views/personnelEfficiencyManagement/performanceManagement/performanceDisclosure.vue
+++ b/src/views/personnelEfficiencyManagement/performanceManagement/performanceDisclosure.vue
@@ -17,16 +17,24 @@
@cell-click="cellClick"
>
+