| | |
| | | > |
| | | 报告生成 |
| | | </el-button> |
| | | <el-button |
| | | slot="right" |
| | | v-permission="permission.download" |
| | | class="filter-item" |
| | | size="mini" |
| | | type="primary" |
| | | icon="el-icon-download" |
| | | style="margin-left: 4px !important;" |
| | | v-loading="downloadProgressLoading" |
| | | :disabled="crud.selections.length === 0" |
| | | @click="doExportProjectProgress()" |
| | | > |
| | | 项目进度导出 |
| | | </el-button> |
| | | </crudOperation> |
| | | <!--表单组件--> |
| | | <el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="690px"> |
| | |
| | | import pagination from '@crud/Pagination' |
| | | import { mapGetters } from 'vuex' |
| | | import constant from '@/utils/constant' |
| | | import { downloadFile } from '@/utils/index' |
| | | |
| | | const defaultForm = { id: null, name: null, projectTypeId: null, projectDistinguish: null, companyId: null, requirement: null, unitCurrency: null, performanceObjectives: null, quotationPrice: null, performancePrice: null, contractPrice: null, contractPrePrice: null, projectPrice: null, liableUserId: null, liableUserIdList: [], planStartDate: null, planEndDate: null, projectStatus: null, approveStatus: null, remarks: null, createBy: null, createTime: null, updateBy: null, updateTime: null } |
| | | export default { |
| | |
| | | // 报告生成参数 |
| | | generateReportParam: { |
| | | loading: false |
| | | } |
| | | }, |
| | | // 加载 |
| | | downloadProgressLoading: false |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | }).catch(() => { |
| | | that.$message({ type: 'info', message: '已取消操作' }) |
| | | }) |
| | | }, |
| | | // 执行项目进度导出 |
| | | doExportProjectProgress() { |
| | | const that = this |
| | | const projects = that.crud.selections.map(p => p.id) |
| | | if (projects.length > 0) { |
| | | that.downloadProgressLoading = true |
| | | that.crud.crudMethod.downloadProjectProgress({ idInList: projects }).then(result => { |
| | | downloadFile(result, '项目进度导出数据', 'xlsx') |
| | | }).catch(e => { |
| | | that.$message.error(e.message) |
| | | }).finally(() => { |
| | | that.downloadProgressLoading = false; |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |