| | |
| | | </el-button> |
| | | <el-button |
| | | slot="right" |
| | | v-permission="permission.download" |
| | | class="filter-item" |
| | | size="mini" |
| | | type="warning" |
| | | icon="el-icon-download" |
| | | :loading="downloadTableLoading" |
| | | style="margin-left: 4px !important;" |
| | | @click="toDownloadTable()" |
| | | > |
| | | 表格导出 |
| | | </el-button> |
| | | <el-button |
| | | slot="right" |
| | | v-permission="permission.divide" |
| | | class="filter-item" |
| | | size="mini" |
| | |
| | | import constant from '@/utils/constant' |
| | | import { contractTotalMoney, contractDelayTotalAmount, contractDelayTotalMoney, advancePaymentTotalMoney } from '@/api/contract/contract' |
| | | import { serviceTotalMoney, serviceDelayTotalAmount, serviceDelayTotalMoney, receivePaymentTotalMoney } from '@/api/contract/contract' |
| | | import { addWarningStatus, downloadContractAttachments } from '@/api/contract/contract' |
| | | import { addWarningStatus, downloadContractAttachments, downloadTable } from '@/api/contract/contract' |
| | | import Dict from '@/components/Dict/Dict' |
| | | import { mapGetters } from 'vuex' |
| | | import { getToken } from '@/utils/auth' |
| | |
| | | loading: false, |
| | | form: { file: [] }, |
| | | rules: { file: [{ required: true, message: '请选择文件', trigger: 'blur' }] } |
| | | } |
| | | }, |
| | | // 下载表格加载 |
| | | downloadTableLoading: false |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | }).catch(() => { |
| | | this.downloadAttachmentLoading = false |
| | | }) |
| | | }, |
| | | toDownloadTable() { |
| | | const that = this |
| | | that.downloadTableLoading = true |
| | | // 添加预警 |
| | | downloadTable({ ...that.crud.query }).then(res => { |
| | | downloadFile(res, '合同信息', 'xlsx') |
| | | that.downloadTableLoading = false |
| | | }).catch(() => { |
| | | that.downloadTableLoading = false |
| | | }) |
| | | } |
| | | } |
| | | } |