|
@@ -47,13 +47,25 @@
|
|
|
<!-- <el-dropdown-item @click.native="handleQuestion" v-if="$permission('/workspace/event')">事
|
|
|
件</el-dropdown-item> -->
|
|
|
<el-dropdown-item @click.native="handleField" v-disabled="false">自定义栏位管理</el-dropdown-item>
|
|
|
- <el-dropdown-item @click.native="exportPDF">导出PDF首页</el-dropdown-item>
|
|
|
+ <!-- <el-dropdown-item @click.native="exportPDF">导出PDF首页</el-dropdown-item> -->
|
|
|
+ <el-dropdown-item>
|
|
|
+ <el-dropdown trigger="hover" placement="right-start">
|
|
|
+ <p>
|
|
|
+ 导出PDF首页<i class="el-icon-arrow-right el-icon--right"></i>
|
|
|
+ </p>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item @click.native="exportPDF(false)">当前全部</el-dropdown-item>
|
|
|
+ <el-dropdown-item @click.native="exportPDF(true)">当前所选</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ </el-dropdown-item>
|
|
|
+
|
|
|
<!-- <el-dropdown-item @click.native="handleBatch"
|
|
|
:disabled="!($permission('/workspace/folder/batchUploadSpecification') && $r(projectId, [1, 2]))">批量上传说明书</el-dropdown-item>
|
|
|
<el-dropdown-item> -->
|
|
|
<el-dropdown trigger="hover" placement="right-start">
|
|
|
<p>
|
|
|
- 导出专利<i class="el-icon-arrow-right el-icon--right"></i>
|
|
|
+ 导出Excel档<i class="el-icon-arrow-right el-icon--right"></i>
|
|
|
</p>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<el-dropdown-item @click.native="handleExport(false)">当前全部</el-dropdown-item>
|
|
@@ -242,11 +254,11 @@ export default {
|
|
|
title: '图片视图',
|
|
|
btn: 'el-icon-picture-outline',
|
|
|
},
|
|
|
- {
|
|
|
- value: 'PatentPDFListView',
|
|
|
- title: 'PDF视图',
|
|
|
- btn: 'iconfont icon-pdf',
|
|
|
- }
|
|
|
+ // {
|
|
|
+ // value: 'PatentPDFListView',
|
|
|
+ // title: 'PDF视图',
|
|
|
+ // btn: 'iconfont icon-pdf',
|
|
|
+ // }
|
|
|
],
|
|
|
//选择的视图
|
|
|
viewSelected: "patent-table-list-view",
|
|
@@ -600,7 +612,7 @@ export default {
|
|
|
//导出专利
|
|
|
async handleExport(val) {
|
|
|
if (val) {
|
|
|
- if (this.startNumber < 0 && this.endNumber < 1 || this.queryParams.isAdd.length == 0) {
|
|
|
+ if ( this.endNumber < 1 || this.queryParams.isAdd.length == 0) {
|
|
|
this.$message.error('请先选择专利')
|
|
|
return false
|
|
|
}
|
|
@@ -628,18 +640,37 @@ export default {
|
|
|
window.open(router.href, '_blank')
|
|
|
},
|
|
|
//PDF首页导出
|
|
|
- exportPDF() {
|
|
|
- let params = {
|
|
|
- projectId: this.projectId,
|
|
|
- searchQuery: this.searchStr || '',//检索条件
|
|
|
- customFields: this.customFields || [],//自定义字段的检索
|
|
|
- isAdd: this.queryParams.isAdd,
|
|
|
- isDelete: this.queryParams.isDelete,
|
|
|
- startNumber: this.startNumber,
|
|
|
- // endNumber: this.endNumber,
|
|
|
- endNumber: this.total,//默认是当前全部
|
|
|
- orderDTOList:this.sort,
|
|
|
+ exportPDF(sign) {
|
|
|
+ if (sign) {
|
|
|
+ if ( this.endNumber < 1 || this.queryParams.isAdd.length == 0) {
|
|
|
+ this.$message.error('请先选择专利')
|
|
|
+ return false
|
|
|
+ }
|
|
|
}
|
|
|
+ if(sign){
|
|
|
+ var params = {
|
|
|
+ projectId: this.projectId,
|
|
|
+ searchQuery: this.searchStr || '',//检索条件
|
|
|
+ customFields: this.customFields || [],//自定义字段的检索
|
|
|
+ isAdd: this.queryParams.isAdd,
|
|
|
+ isDelete: this.queryParams.isDelete,
|
|
|
+ startNumber: this.startNumber,
|
|
|
+ endNumber: this.endNumber,
|
|
|
+ orderDTOList:this.sort,
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ var params = {
|
|
|
+ projectId: this.projectId,
|
|
|
+ searchQuery: this.searchStr || '',//检索条件
|
|
|
+ customFields: this.customFields || [],//自定义字段的检索
|
|
|
+ isAdd: [],
|
|
|
+ isDelete: [],
|
|
|
+ startNumber: 1,
|
|
|
+ endNumber: this.total,//默认是当前全部
|
|
|
+ orderDTOList:this.sort,
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
this.$api.exportPDFFirstPage(params).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
const h = this.$createElement;
|