diff --git a/src/views/audit/project/Index.vue b/src/views/audit/project/Index.vue index 1c99747288e86b84d452b1f32dddcf51a32020a8..b90e919888d8fd9688cd0d0e7a1aa44c4b9c3e9a 100644 --- a/src/views/audit/project/Index.vue +++ b/src/views/audit/project/Index.vue @@ -117,6 +117,19 @@ export default { { title: '审核状态', dataIndex: 'auditResultName', align: 'center' }, { title: '操作', scopedSlots: { customRender: 'option' }, align: 'center', fixed: 'right', width: 120, }, ], + excelCol: [ + { title: "项目名称", dataIndex: 'projName' }, + { title: '申请编号', dataIndex: 'appNo' }, + { title: "开始时间", dataIndex: "startDate" }, + { title: "结束时间", dataIndex: "endDate" }, + { title: "申报年度", dataIndex: "reportYear" }, + { title: "项目类别", dataIndex: 'projClassName' }, + { title: "项目资金(万元)", dataIndex: "govFunding" }, + { title: '申报单位', dataIndex: 'appUnitName' }, + { title: '申报学科', dataIndex: 'knowledgeName' }, + { title: '申报人', dataIndex: 'appPersonName' }, + { title: '审核状态', dataIndex: 'auditResultName' }, + ], pagination: { pageIndex: 1, pageSize: this.$defaultPageSize, @@ -265,21 +278,23 @@ export default { this.disabledSubmit = value }, exportData () { - let column = [ - { title: "项目名称", dataIndex: 'projName' }, - //{ title: "项目编号", dataIndex: "projNo", align: 'center' }, - { title: '申请编号', dataIndex: 'appNo' }, - { title: "开始时间", dataIndex: "startDate" }, - { title: "结束时间", dataIndex: "endDate" }, - { title: "申报年度", dataIndex: "reportYear" }, - { title: "项目类别", dataIndex: 'projClassName' }, - { title: "项目资金(万元)", dataIndex: "govFunding" }, - { title: '申报单位', dataIndex: 'appUnitName' }, - { title: '申报学科', dataIndex: 'knowledgeName' }, - { title: '申报人', dataIndex: 'appPersonName' }, - { title: '审核状态', dataIndex: 'auditResultName' }, - ] - this.$ToDoExcel(`项目审核列表`, tableColumnsName(column), filterExportExcelData(column, this.tableData)) + this.loading = true; + let pars = isEmptyParams(this.searchForm); + let par = { ...pars, pageIndex: -1, pageSize: -1, } + this.$api.audit.getAuditListByPage(par).then(({ data = {} }) => { + if (data) { + const { dataList = [], total = 0 } = data; + this.pagination.total = total; + this.tableData = dataList + this.tableData.forEach(e => { + e.projClassName = e.projClass === "1" ? "一般项目" : "重点项目" + e.startDate = moment(e.startDate).format('YYYY-MM-DD') + e.endDate = moment(e.endDate).format('YYYY-MM-DD') + }) + this.$ToDoExcel(`项目审核列表`, tableColumnsName(this.excelCol), filterExportExcelData(this.excelCol, dataList)) + this.loading = false + } + }).catch(() => { this.loading = false }) } }, };