|
@@ -33,7 +33,7 @@
|
|
|
</el-dropdown>
|
|
|
<el-button type="primary" class="margin-left_10 margin-right_10" size="small" @click="showField">显示栏位管理</el-button>
|
|
|
<el-button v-if="$permission.FunPermissions('xiaoshi/IPREmail')" type="primary" class="margin-right_10" size="small" @click="IPREmail">联系邮箱</el-button>
|
|
|
- <el-button type="primary" class="margin-right_10" size="small" v-loading="exportBtnLoading" @click="exportExcel">导出</el-button>
|
|
|
+ <el-button type="primary" v-if="componentType==2 && $permission.FunPermissions('xiaoshi/exportReportList')" class="margin-right_10" size="small" :loading="exportBtnLoading" @click="exportExcel">导 出</el-button>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
@@ -83,7 +83,7 @@ import patentShare from '@/views/components/drawer/Share.vue';
|
|
|
|
|
|
import IPREmailDialog from '../InvalidResponse/components/dialog/IPREmail.vue'
|
|
|
import handlePersonDialog from './dialog/handlePerson.vue'
|
|
|
-import { formatDate } from '@/utils';
|
|
|
+import { formatDate,downLoad } from '@/utils';
|
|
|
export default {
|
|
|
components: {
|
|
|
Table,
|
|
@@ -308,23 +308,11 @@ export default {
|
|
|
params.searchQuery ='reportType=(' + this.fixedSearch.reportType.join(' OR ') + ')'
|
|
|
}
|
|
|
}
|
|
|
+ this.exportBtnLoading = true
|
|
|
this.$api.exportReportList(params).then(response=>{
|
|
|
this.exportBtnLoading = false
|
|
|
- const anchor = document.createElement('a');
|
|
|
- if ('download' in anchor) {
|
|
|
- anchor.href = URL.createObjectURL(response);
|
|
|
- let now = formatDate(new Date(),"YYYY-MM-DD")
|
|
|
- anchor.setAttribute("download", now + '- 无效案件详情表.xlsx');
|
|
|
- anchor.className = "download-js-link";
|
|
|
- anchor.innerHTML = "downloading...";
|
|
|
- anchor.style.display = "none";
|
|
|
- document.body.appendChild(anchor);
|
|
|
- setTimeout(function () {
|
|
|
- anchor.click();
|
|
|
- document.body.removeChild(anchor);
|
|
|
- }, 66);
|
|
|
- return true;
|
|
|
- }
|
|
|
+ let now = formatDate(new Date(),"YYYY-MM-DD")
|
|
|
+ downLoad(response,now + '- 无效案件详情表.xlsx')
|
|
|
}).catch(error=>{
|
|
|
this.$message.error('导出失败')
|
|
|
this.exportBtnLoading = false
|