Ver Fonte

导出pdf及导出专利

zhuhao há 1 ano atrás
pai
commit
0a34675046

+ 16 - 0
src/api/newApi/patent.js

@@ -215,4 +215,20 @@ export default {
   getPictureGuid(params) {
     return axios.get("/xiaoshi/patentStar/getPictureGuid", {params});
   },
+  /**
+   * 专利列表导出PDF首页
+   * @param {*} data 
+   * @returns 
+   */
+  exportPDFFirstPage(data) {
+    return axios.post("/xiaoshi/patent/exportPDFFirstPage", data);
+  },
+  /**
+   * 专利列表导出专利
+   * @param {*} data 
+   * @returns 
+   */
+  exportPatentExcel(data) {
+    return axios.post("/xiaoshi/patent/exportPatentExcel", data);
+  },
 }

+ 0 - 105
src/views/project/patentCollection/components/dialog/MergeApplicantExist.vue

@@ -1,105 +0,0 @@
-<template>
-  <div>
-    <el-dialog title="合并数据" :visible.sync="visible" width="900px" top="3vh" append-to-body destroy-on-close :before-close="close">
-      <el-form :inline="true">
-        <el-form-item label="当前名称">
-          <el-input v-model="queryParams.name" size="small" placeholder="请输入当前名称"></el-input>
-        </el-form-item>
-        <el-form-item label="标准名称">
-          <el-input v-model="queryParams.shortName" size="small" placeholder="请输入标准名称"></el-input>
-        </el-form-item>
-        <el-form-item>
-          <el-button type="" size="small" @click="getList">查询</el-button>
-        </el-form-item>
-      </el-form>
-      <el-table v-loading="loading" :data="tableData" border header-row-class-name="custom-table-header">
-        <el-table-column prop="name" label="当前名称" align="center" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="shortName" label="标准名称" align="center" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="countryName" label="国家" align="center" width="150" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="addressStr" label="地址" align="center" show-overflow-tooltip></el-table-column>
-        <el-table-column label="操作" width="80" align="center">
-          <template slot-scope="scope">
-            <el-link type="danger" @click="handleDelete(scope.row)" v-if="$permission('/workspace/folder/merge/applicationMerge/merged/remove')">移除</el-link>
-          </template>
-        </el-table-column>
-      </el-table>
-      <div class="pagination">
-        <el-pagination :current-page.sync="queryParams.current" :page-size="queryParams.size" :total="total" @current-change="handleCurrentChange" layout="total, prev, pager, next, jumper" background></el-pagination>
-      </div>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="visible = false">关 闭</el-button>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-export default {
-  data() {
-    return {
-      visible: false,
-      loading: false,
-      tableData: [],
-      total: 0,
-      queryParams: {
-        name: '',
-        country: '',
-        address: '',
-        size: 10,
-        current: 1,
-        projectId: 0,
-        order: 'desc',
-        prop: 'update_time',
-        from: 'exist',
-        mergeId: 0
-      },
-    }
-  },
-  methods: {
-    open(row) {
-      this.visible = true
-      this.queryParams.projectId = row.projectId
-      this.queryParams.mergeId = row.id
-      this.getList()
-    },
-    close() {
-      this.visible = false
-      this.$emit('close')
-    },
-    getList() {
-      this.loading = true
-      this.$api.getPatentApplicantList(this.queryParams).then(response => {
-        this.tableData = response.data.records
-        this.total = response.data.total
-        this.loading = false
-      }).catch(error => {
-        this.loading = false
-      })
-    },
-    handleCurrentChange(val) {
-      this.queryParams.current = val;
-      this.getList();
-    },
-    handleDelete(row) {
-      this.$confirm('确认删除本条数据吗?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        this.loading = true
-        this.$api.deletePatentMergeApplicant({ id: row.id, mergeId: this.queryParams.mergeId }).then(response => {
-          this.$message.success('删除成功')
-          this.loading = false
-          this.getList()
-        }).catch(error => {
-          this.loading = false
-        })
-      })
-    },
-  }
-}
-</script>
-
-<style lang="less">
-
-</style>

+ 0 - 125
src/views/project/patentCollection/components/dialog/MergeApplicantForm.vue

@@ -1,125 +0,0 @@
-<template>
-  <div>
-    <el-dialog :title="title" :visible.sync="visible" width="500px"  append-to-body destroy-on-close :before-close="close" top="10vh">
-      <div class="patent-applicant-merge-form">
-        <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="80px">
-          <el-form-item label="名称" prop="name">
-            <el-input v-model="ruleForm.name" placeholder="请输入名称"></el-input>
-          </el-form-item>
-          <el-form-item label="简称" prop="abbreviation">
-            <el-input v-model="ruleForm.abbreviation" placeholder="请输入名称"></el-input>
-          </el-form-item>
-          <el-form-item label="国家" prop="country">
-            <el-select v-model="ruleForm.country" placeholder="请选择" filterable class="width_100">
-              <el-option v-for="(item, index) in commonData.COUNTRIES" :label="item.label" :value="item.value"></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="地址" prop="addressIds">
-            <el-cascader @change="onChange" v-model="addressIds" :options="areaOptions" :props="props" class="width_100"></el-cascader>
-          </el-form-item>
-          <el-form-item label="详细地址" prop="address">
-            <el-input v-model="ruleForm.address" placeholder="请输入地址"></el-input>
-          </el-form-item>
-          <el-form-item label="备注" prop="remark">
-            <el-input v-model="ruleForm.remark" placeholder="请输入备注" type="textarea"></el-input>
-          </el-form-item>
-        </el-form>
-      </div>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="close">关 闭</el-button>
-        <el-button type="primary" @click="submit" :loading="btnLoading">下一步</el-button>
-      </div>
-    </el-dialog>
-
-    <MergeApplicantSelectDialog ref="MergeApplicantSelectDialog" @selectClose="selectClose"></MergeApplicantSelectDialog>
-  </div>
-</template>
-
-<script>
-import MergeApplicantSelectDialog from "../dialog/MergeApplicantSelect";
-export default {
-  components: {
-    MergeApplicantSelectDialog,
-  },
-  data() {
-    return {
-      commonData: {},
-      addressIds: [],
-      areaOptions: [],
-      visible: false,
-      loading: false,
-      title: '',
-      btnLoading: false,
-      props: {
-        value: 'id',
-        label: 'name'
-      },
-      ruleForm: {},
-      rules: {
-        name: [{ required: true, message: '请输入名称', trigger: 'blur' },],
-      },
-    }
-  },
-  mounted() {
-  },
-  methods: {
-    // 添加成功返回的消息
-    selectClose() {
-      this.close()
-    },
-    // 打开弹窗
-    open(form, title, commonData, areaOptions) {
-      this.ruleForm = { ...form }
-      this.commonData = commonData
-      this.areaOptions = areaOptions
-      this.visible = true
-      this.title = title
-    },
-    // 关闭弹窗
-    close() {
-      this.visible = false
-      this.$emit('close')
-    },
-    submit() {
-      this.$refs.ruleForm.validate((valid) => {
-        if (valid) {
-          this.$refs.MergeApplicantSelectDialog.open(this.ruleForm)
-          // this.btnLoading = true
-          // this.ruleForm.merge = true
-          // if (this.ruleForm.id) {
-          //   this.$api.updateMergePerson(this.ruleForm).then(response => {
-          //     this.$message.success('编辑成功')
-          //     this.btnLoading = false
-          //     this.close()
-          //   }).catch(error => {
-          //     this.btnLoading = false
-          //   })
-          // } else {
-          //   this.$api.mergePerson(this.ruleForm).then(response => {
-          //     this.$message.success('新增成功')
-          //     this.btnLoading = false
-          //     this.close()
-          //   }).catch(error => {
-          //     this.btnLoading = false
-          //   })
-          // }
-        } else {
-          // console.log('error submit!!');
-          return false;
-        }
-      });
-    },
-    onChange() {
-      this.ruleForm.provinceId = this.addressIds[0]
-      this.ruleForm.cityId = this.addressIds[1]
-      this.ruleForm.areaId = this.addressIds[2]
-    },
-  }
-}
-</script>
-
-<style lang="scss">
-.patent-applicant-merge-form {
-
-}
-</style>

+ 0 - 231
src/views/project/patentCollection/components/dialog/MergeApplicantSelect.vue

@@ -1,231 +0,0 @@
-<template>
-  <div>
-    <el-dialog title="选择申请人/权利人" :visible.sync="visible" width="900px" append-to-body destroy-on-close
-      :before-close="close" top="3vh">
-      <div class="patent-applicant-merge-select">
-        <el-form :inline="true">
-          <el-form-item label="当前名称">
-            <el-input v-model="queryParams.name" size="small" placeholder="请输入当前名称"></el-input>
-          </el-form-item>
-          <!-- <el-form-item label="标准名称">
-            <el-input v-model="queryParams.shortName" size="small" placeholder="请输入标准名称"></el-input>
-          </el-form-item> -->
-          <el-form-item>
-            <el-button type="primary" size="small" @click="getList">查询</el-button>
-          </el-form-item>
-        </el-form>
-        <el-table v-loading="loading" :data="tableData" border header-row-class-name="custom-table-header"
-          @sort-change="sortChange">
-          <el-table-column align="center" width="55">
-            <!-- <template slot="header">
-              <el-checkbox :checked="selectAll" @change="onChange3"></el-checkbox>
-            </template> -->
-            <template slot-scope="scope">
-              <el-checkbox :label="scope.row.name" @change="onChange(scope.row)" v-if="!loading"
-                :checked="ruleForm.mergedName.indexOf(scope.row.name) !== -1"></el-checkbox>
-            </template>
-          </el-table-column>
-          <el-table-column sortable="custom" prop="name" label="当前名称" align="center"
-            show-overflow-tooltip></el-table-column>
-          <!-- <el-table-column sortable="custom" prop="shortName" label="标准名称" align="center" show-overflow-tooltip></el-table-column>
-          <el-table-column sortable="custom" prop="merge" label="是否合并" align="center" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <span v-if="scope.row.merge">是</span>
-              <span v-else>否</span>
-            </template>
-          </el-table-column> -->
-          <el-table-column sortable="custom" prop="countryName" label="国家" align="center" width="150"
-            show-overflow-tooltip></el-table-column>
-          <el-table-column prop="addressStr" label="地址" align="center" show-overflow-tooltip></el-table-column>
-        </el-table>
-        <div class="pagination">
-          <el-pagination :current-page.sync="queryParams.pageNum" :page-size="queryParams.pageSize" :total="total"
-            @current-change="handleCurrentChange" layout="total, prev, pager, next, jumper" background></el-pagination>
-        </div>
-      </div>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="close">关 闭</el-button>
-        <el-button type="primary" @click="submit" :loading="btnLoading">确 定</el-button>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-export default {
-  data() {
-    return {
-      selectAll: false,
-      visible: false,
-      loading: false,
-      btnLoading: false,
-      total: 0,
-      tableData: [],
-      queryParams: {
-        name: '',
-        // shortName: '',
-        pageSize: 10,
-        pageNum: 1,
-        projectId: 0,
-        // prop: 'id',
-        // order: 'desc',
-        // from: 'select',
-        // mergeId: 0
-      },
-    }
-  },
-  mounted() {
-  },
-  methods: {
-    open(row) {
-      
-      this.ruleForm = { ...row }
-      if (row.id) {
-        
-      } else {
-        this.$set(this.ruleForm, 'mergedName', [])
-      }
-      this.visible = true
-      this.selectAll = false
-      this.queryParams.projectId = row.projectId
-      this.queryParams.pageNum = 1
-      // this.queryParams.mergeId = row.id
-      this.getList()
-    },
-    close() {
-      this.visible = false
-    },
-    sortChange({ column, prop, order }) {
-      if (!order) {
-        this.queryParams.prop = 'id'
-        this.queryParams.order = 'desc'
-        this.getList()
-        return false
-      }
-      const o = {
-        'descending': 'desc',
-        'ascending': 'asc',
-      }
-      switch (prop) {
-        case 'shortName':
-          this.queryParams.prop = 'bname'
-          break
-        case 'countryName':
-          this.queryParams.prop = 'country'
-          break
-        default:
-          this.queryParams.prop = prop
-      }
-      this.queryParams.order = o[order]
-      this.getList()
-    },
-    onChange(row) {
-      const index = this.ruleForm.mergedName.indexOf(row.name)
-      if (index === -1) {
-        this.ruleForm.mergedName.push(row.name)
-      } else {
-        this.ruleForm.mergedName.splice(index, 1)
-      }
-    },
-    onChange3() {
-      this.selectAll = !this.selectAll
-      if (this.selectAll) {
-        let params = {
-          ...this.queryParams,
-          type: 0,
-        }
-        params.pageSize = 9999999
-        this.loading = true
-        this.$api.getMergePerson(params).then(response => {
-          this.ruleForm.mergedName = response.data.data.map(item => item.name)
-          this.loading = false
-        }).catch(error => {
-          this.loading = false
-        })
-      } else {
-        this.loading = true
-        this.ruleForm.mergedName = []
-        this.$nextTick(() => {
-          this.loading = false
-        })
-      }
-    },
-    // 获取人员信息
-    getList() {
-      this.loading = true
-      let params = {
-        type: 0,
-        ...this.queryParams
-      }
-      this.$api.getMergePerson(params).then(response => {
-        this.tableData = response.data.data
-        this.total = response.data.total
-        this.loading = false
-      }).catch(error => {
-        this.loading = false
-      })
-    },
-    handleCurrentChange(val) {
-      this.queryParams.pageNum = val;
-      this.getList();
-    },
-    // 确认按钮
-    submit() {
-      if (this.ruleForm.mergedName.length === 0) {
-        this.$message.error('请选择申请人')
-        return false
-      }
-      this.btnLoading = true
-      let params = {
-        type: 0,
-        ...this.ruleForm,
-      }
-      if (this.ruleForm.id) {
-        this.$api.updateMergePerson(params).then(response => {
-          if (response.code == 200) {
-            this.$message.success('编辑成功')
-            this.btnLoading = false
-            this.$emit('selectClose')
-            this.close()
-          }
-        }).catch(error => {
-          this.btnLoading = false
-        })
-      } else {
-        this.$api.mergePerson(params).then(response => {
-          if (response.code == 200) {
-            this.$message.success('新增成功')
-            this.btnLoading = false
-            this.$emit('selectClose')
-            this.close()
-          }
-        }).catch(error => {
-          this.btnLoading = false
-        })
-      }
-
-
-      // this.$api.editPatentApplicant(this.ruleForm).then(response => {
-      //   this.$message.success('编辑成功')
-      //   this.btnLoading = false
-      //   this.close()
-      // }).catch(error => {
-      //   this.btnLoading = false
-      // })
-    },
-  }
-}
-</script>
-
-<style lang="scss">
-.patent-applicant-merge-select {
-  .pagination {
-    text-align: center;
-    margin: 20px 0;
-  }
-
-  .el-checkbox__label {
-    display: none !important;
-  }
-}
-</style>

+ 1 - 1
src/views/project/patentCollection/components/dialog/PatentBatchIndex.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-dialog title="批量标引" :visible.sync="visible" width="500px" append-to-body destroy-on-close :before-close="close">
+    <el-dialog title="批量标引" :visible.sync="visible" width="500px" append-to-body destroy-on-close :before-close="close" :close-on-click-modal="false">
       <el-container class="patent-batch-index">
         <el-main class="patent-batch-index-main">
           <el-form>

+ 0 - 248
src/views/project/patentCollection/components/drawer/MergeApplicant.vue

@@ -1,248 +0,0 @@
-<template>
-  <!-- 合并申请人、权利人 -->
-  <div class="">
-    <el-drawer class="custom-drawer-form" title="合并申请人/权利人" size="1000px" :visible.sync="drawer" direction="rtl"
-      :before-close="close" destroy-on-close>
-      <el-container class="patent-applicant-merge">
-        <el-header style="display:flex;align-items:center;justify-content: space-between;">
-          <div>
-            <mySearch style="width: 500px" :SearchFields="searchFiled" @search="search" :searchValue="searchOption">
-            </mySearch>
-          </div>
-          <div>
-            <el-button type="primary" size="small" @click="handleAdd()">新增</el-button>
-          </div>
-        </el-header>
-        <el-main class="container-common-main">
-          <el-table v-loading="loading" :data="tableData" border header-row-class-name="custom-table-header">
-            <el-table-column type="index" label="#" width="55" align="center"></el-table-column>
-            <el-table-column prop="name" label="名称" align="center" show-overflow-tooltip></el-table-column>
-            <el-table-column prop="countryName" label="国家" align="center" show-overflow-tooltip></el-table-column>
-            <el-table-column prop="addressStr" label="地址" align="center" show-overflow-tooltip></el-table-column>
-            <el-table-column prop="createTime" label="更新时间" align="center" show-overflow-tooltip>
-            </el-table-column>
-            <el-table-column prop="remark" label="备注" align="center" show-overflow-tooltip></el-table-column>
-            <el-table-column label="操作" align="center" width="150">
-              <template slot-scope="scope">
-                <el-dropdown split-button type="primary" size="small">
-                  <span @click="handleEdit(scope.row)"
-                    v-if="$permission('/workspace/folder/merge/applicationMerge/modify')">
-                    编辑</span>
-                  <span v-else :disabled="true">编辑</span>
-                  <el-dropdown-menu slot="dropdown" class="text-align_center">
-                    <el-dropdown-item divided class="color-red" @click.native="handleDelete(scope.row)"
-                      :disabled="!$permission('/workspace/folder/merge/applicationMerge/delete')">删除</el-dropdown-item>
-                  </el-dropdown-menu>
-                </el-dropdown>
-              </template>
-            </el-table-column>
-          </el-table>
-          <div class="pagination">
-            <el-pagination :current-page.sync="queryParams.pageNum" :page-size="queryParams.pageSize" :total="total"
-              @current-change="handleCurrentChange" layout="total, prev, pager, next, jumper" background></el-pagination>
-          </div>
-        </el-main>
-        <el-footer class="footer-common">
-          <el-button @click="close">关 闭</el-button>
-        </el-footer>
-      </el-container>
-    </el-drawer>
-
-    <mergeDialog ref="mergeDialog" :projectId="projectId"></mergeDialog>
-  </div>
-</template>
-
-<script>
-import mergeDialog from './merge.vue'
-export default {
-  components: {
-    mergeDialog,
-  },
-  data() {
-    return {
-      drawer: false,
-      loading: false,
-      total: 0,
-      // 表格数据源
-      tableData: [],
-      projectId: 0,
-      queryParams: {
-        pageSize: 10,
-        pageNum: 1,
-      },
-      addressIds: [],
-      //检索字段
-      searchFiled: [
-        {
-          label: '名称',
-          value: 'name',
-          type: 'String',
-        }
-      ],
-      //检索条件
-      searchOption: {},
-    }
-  },
-  mounted() {
-  },
-  methods: {
-    // 子组件传来的消息
-    close2() {
-      this.getList()
-    },
-    // 打开编辑合并申请人弹窗
-    handleEdit(row) {
-      row.mergeType = 2
-      this.$refs.mergeDialog.open(row, '编辑合并')
-    },
-    // 打开新增弹窗
-    handleAdd() {
-      this.$refs.mergeDialog.open({
-        mergeType: 2,
-      }, '新增合并')
-    },
-    // 打开抽屉弹窗
-    open(projectId) {
-      this.projectId = projectId
-      this.drawer = true
-      this.getList()
-    },
-    //获取检索条件检索
-    search(val) {
-      let params = {}
-      val.forEach(item => {
-        if (item.type == 3) {
-          params[item.value] = item.searchValue.map(itemValue => {
-            return itemValue.value
-          })
-        } else {
-          params[item.value] = item.searchValue.label
-        }
-      })
-      // 返回条件对象
-      this.searchOption = this.$commonJS.ArrayToArray(val)
-      // 调用查询接口
-      this.queryParams.current = 1
-      this.getList()
-    },
-    // 获取表格数据
-    getList() {
-      this.loading = true
-      let params = {
-       projectId:this.projectId,
-        ...this.queryParams,
-        searchQuery: this.$commonJS.objectToString(this.searchOption || {}),//检索条件
-        type: 0,//2是发明人0是申请人/权利人
-      }
-      this.$api.selectMergePerson(params).then(response => {
-        if (response.code == 200) {
-          this.tableData = response.data.data
-          this.total = response.data.total
-          this.loading = false
-        }
-      }).catch(error => {
-        this.loading = false
-      })
-    },
-    // 表格分页
-    handleCurrentChange(val) {
-      this.queryParams.pageNum = val;
-      this.getList();
-    },
-    // 关闭抽屉弹窗
-    close() {
-      this.drawer = false
-      this.$emit('mergeClose')
-    },
-    // 删除表格数据
-    handleDelete(row) {
-      this.$confirm('确认删除本条数据吗?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        this.loading = true
-        this.$api.delMergePerson({ id: row.id }).then(response => {
-          if (response.code == 200) {
-            this.$message.success('删除成功')
-            this.loading = false
-            this.getList()
-          }
-        }).catch(error => {
-          this.loading = false
-        })
-      })
-    },
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    // 打开新增合并人弹窗
-    // handleAdd() {
-    //   this.$refs.mergeApplicantFormDialog.open({
-    //     projectId: this.queryParams.projectId,
-    //     applicantIds: [],
-    //     name: '',
-    //     remark: '',
-    //     shortName: '',
-    //     country: '',
-    //     address: '',
-    //     addressIds: []
-    //   }, '新增合并申请人', this.commonData, this.areaTree)
-    // },
-    // // 打开添加申请人弹窗
-    // // handleSelect(row) {
-    // //   this.$refs.mergeApplicantSelectDialog.open(row)
-    // // },
-    // // 打开已合并申请人弹窗
-    // handleExist(row) {
-    //   this.$refs.mergeApplicantExistDialog.open(row)
-    // },
-    // 打开编辑合并申请人弹窗
-    // handleEdit(row) {
-    //   this.$refs.mergeDialog.open(2)
-    //   // row.projectId = this.projectId
-    //   // this.$refs.mergeApplicantFormDialog.open(row, '编辑合并申请人', this.commonData, this.areaTree)
-    // },
-
-  }
-}
-</script>
-
-<style lang="scss">
-.patent-applicant-merge {
-  .pagination {
-    text-align: center;
-    margin: 20px 0;
-  }
-}
-</style>

+ 1 - 1
src/views/project/patentCollection/components/drawer/MergeInventor.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 合并发明人,合并权利人/申请人 -->
   <div class="">
-    <el-drawer class="custom-drawer-form" title="合并发明人" size="1000px" :visible.sync="drawer" direction="rtl"
+    <el-drawer class="custom-drawer-form" :title="mergeType == 2?'合并发明人':'合并申请人/权利人'" size="1000px" :visible.sync="drawer" direction="rtl"
       :before-close="close" destroy-on-close>
       <el-container class="patent-inventor-merge">
         <el-header style="display:flex;align-items:center;justify-content: space-between;">

+ 0 - 229
src/views/project/patentCollection/components/drawer/MergeInventorManage.vue

@@ -1,229 +0,0 @@
-<template>
-  <div class="patent-inventor-merge-manage">
-    <el-drawer class="custom-drawer-form" title="合并发明人" size="1000px" :visible.sync="drawer" direction="rtl"
-      :before-close="close" destroy-on-close>
-      <el-container>
-        <el-header>
-          <el-form :inline="true" class="margin-left_20">
-            <el-form-item label="名称">
-              <el-input v-model="queryParams.name" size="small" placeholder="请输入当前名称"></el-input>
-            </el-form-item>
-            <el-form-item>
-              <el-button type="" size="small" @click="getList">查询</el-button>
-            </el-form-item>
-          </el-form>
-        </el-header>
-        <el-main class="container-common-main">
-          <el-table v-loading="loading" :data="tableData" border header-row-class-name="custom-table-header">
-            <el-table-column align="center" width="55">
-              <!-- <template slot="header">
-                <el-checkbox :checked="selectAll" @change="onChange3"></el-checkbox>
-              </template> -->
-              <template slot-scope="scope">
-                <el-checkbox :label="scope.row.name" @change="onChange(scope.row)" v-if="!loading"
-                  :checked="ruleForm.mergedName.indexOf(scope.row.name) !== -1"></el-checkbox>
-              </template>
-            </el-table-column>
-            <el-table-column prop="name" label="名称" align="center" show-overflow-tooltip></el-table-column>
-            <el-table-column prop="address" label="地址" align="center" show-overflow-tooltip></el-table-column>
-            <el-table-column prop="remark" label="备注" align="center" show-overflow-tooltip></el-table-column>
-          </el-table>
-          <div class="pagination">
-            <el-pagination :current-page.sync="queryParams.pageNum" :page-size="queryParams.pageSize" :total="total"
-              @current-change="handleCurrentChange" layout="total, prev, pager, next, jumper" background></el-pagination>
-          </div>
-        </el-main>
-        <el-footer class="footer-common">
-          <el-button @click="close">关 闭</el-button>
-          <el-button type="primary" @click="dialogVisible = true">确 定</el-button>
-        </el-footer>
-      </el-container>
-    </el-drawer>
-
-    <el-dialog :title="title" :visible.sync="dialogVisible" width="500px" append-to-body destroy-on-close
-      :before-close="cancel">
-      <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="55px">
-        <el-form-item label="名称" prop="name">
-          <el-input v-model="ruleForm.name" placeholder="请输入名称"></el-input>
-        </el-form-item>
-        <el-form-item label="地址" prop="address">
-          <el-input v-model="ruleForm.address" placeholder="请输入地址" type="textarea"></el-input>
-        </el-form-item>
-        <el-form-item label="备注" prop="remark">
-          <el-input v-model="ruleForm.remark" placeholder="请输入备注" type="textarea"></el-input>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="cancel">取 消</el-button>
-        <el-button type="primary" @click="submit" :loading="btnLoading">确 定</el-button>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-export default {
-  data() {
-    return {
-      selectAll: false,
-      drawer: false,
-      loading: false,
-      btnLoading: false,
-      total: 0,
-      tableData: [],
-      queryParams: {
-        name: '',
-        pageSize: 10,
-        pageNum: 1,
-        // order: 'desc',
-        // ids:'',
-      },
-      title: '',
-      dialogVisible: false,
-      ruleForm: {},
-      rules: {
-        name: [{ required: true, message: '请输入名称', trigger: 'blur' },],
-      },
-    }
-  },
-  mounted() {
-  },
-  methods: {
-    open(row, title) {
-      console.log(row);
-      this.ruleForm = { ...row }
-      if (row.id) {
-        
-      } else {
-        this.ruleForm.mergedName = []
-      }
-      this.title = title
-      this.drawer = true
-      this.selectAll = false
-      this.queryParams.projectId = row.projectId
-      this.queryParams.pageNum = 1
-      // this.queryParams.ids = row.inventorIds.toString()
-      this.getList()
-    },
-    close() {
-      this.drawer = false
-      this.$emit('close')
-    },
-    onChange2() {
-      this.ruleForm.provinceId = this.addressIds[0]
-      this.ruleForm.cityId = this.addressIds[1]
-      this.ruleForm.areaId = this.addressIds[2]
-    },
-    onChange(row) {
-      const index = this.ruleForm.mergedName.indexOf(row.name)
-      if (index === -1) {
-        this.ruleForm.mergedName.push(row.name)
-      } else {
-        this.ruleForm.mergedName.splice(index, 1)
-      }
-    },
-    onChange3() {
-      this.selectAll = !this.selectAll
-      if (this.selectAll) {
-        let params = {
-          ...this.queryParams,
-          type: 2,//发明人
-        }
-        params.pageSize = 9999999
-        this.loading = true
-        this.$api.getPatentInventorList(params).then(response => {
-          this.ruleForm.mergedName = response.data.records.map(item => item.name)
-          this.loading = false
-        }).catch(error => {
-          this.loading = false
-        })
-      } else {
-        this.loading = true
-        this.ruleForm.mergedName = []
-        this.$nextTick(() => {
-          this.loading = false
-        })
-      }
-    },
-    getList() {
-      this.loading = true
-      let params = {
-        ...this.queryParams,
-        type: 2,//发明人
-      }
-      this.$api.getMergePerson(params).then(response => {
-        if (response.code == 200) {
-          this.tableData = response.data.data
-          this.total = response.data.total
-          this.loading = false
-        }
-      }).catch(error => {
-        this.loading = false
-      })
-    },
-    handleCurrentChange(val) {
-      this.queryParams.pageNum = val;
-      this.getList();
-    },
-    cancel() {
-      this.dialogVisible = false
-    },
-    submit() {
-      if (this.ruleForm.mergedName.length === 0) {
-        this.$message.error('请选择发明人')
-        return false
-      }
-      this.$refs.ruleForm.validate((valid) => {
-        if (valid) {
-          this.btnLoading = true
-          // this.ruleForm.merge = true
-          let params = {
-            type: 2,//发明人
-            ...this.ruleForm
-          }
-          if (this.ruleForm.id) {
-            this.$api.updateMergePerson(params).then(response => {
-              if (response.code == 200) {
-                this.$message.success('编辑成功')
-                this.btnLoading = false
-                this.cancel()
-                this.close()
-              }
-            }).catch(error => {
-              this.btnLoading = false
-            })
-          } else {
-            this.$api.mergePerson(params).then(response => {
-              if (response.code == 200) {
-                this.$message.success('新增成功')
-                this.btnLoading = false
-                this.cancel()
-                this.close()
-              }
-
-            }).catch(error => {
-              this.btnLoading = false
-            })
-          }
-        } else {
-          // console.log('error submit!!');
-          return false;
-        }
-      });
-    },
-  }
-}
-</script>
-
-<style lang="scss">
-.patent-inventor-merge-manage {
-  .pagination {
-    text-align: center;
-    margin: 20px 0;
-  }
-
-  .el-checkbox__label {
-    display: none !important;
-  }
-}
-</style>

+ 29 - 16
src/views/project/patentCollection/components/drawer/merge.vue

@@ -40,7 +40,7 @@
               </template>
             </el-table-column>
           </el-table>
-          <div class="pagination">
+          <div class="pagination" style="margin-top: 20px;">
             <el-pagination :current-page.sync="queryParams.pageNum" :page-size="queryParams.pageSize" :total="total"
               @current-change="handleCurrentChange" layout="total, prev, pager, next, jumper" background></el-pagination>
           </div>
@@ -56,8 +56,9 @@
       <div class="patent-applicant-merge-select">
         <template v-if="ruleForm.id">
           <el-divider content-position="left">基本信息</el-divider>
-          <el-button type="primary" size="small" @click="handleSave"
-            style="display:flex;margin: 10px 0 10px 0px;">保存</el-button>
+          <div style="display:flex;justify-content: flex-end;margin: 10px 0 10px 0px;">
+            <el-button type="primary" size="small" @click="handleSave">保存</el-button>
+          </div>
         </template>
         <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="80px">
           <el-form-item label="名称" prop="name">
@@ -74,7 +75,7 @@
               </el-select>
             </el-form-item>
             <el-form-item label="地址" prop="province">
-              <el-cascader ref="myCascader" @change="changeCas"  v-model="ruleForm.provinceOld" :options="areaOptions"
+              <el-cascader ref="myCascader" @change="changeCas" v-model="ruleForm.provinceOld" :options="areaOptions"
                 class="width_100"></el-cascader>
             </el-form-item>
           </template>
@@ -86,7 +87,7 @@
           </el-form-item>
         </el-form>
         <template v-if="ruleForm.id">
-          <div style="margin: 10px 0 10px 0px;">
+          <div style="margin: 20px 0px;">
             <el-divider content-position="left">合并信息</el-divider>
           </div>
           <el-table :data="ruleForm.mergedName" border header-row-class-name="custom-table-header">
@@ -189,7 +190,7 @@ export default {
   },
   methods: {
     changeCas(val) {
-      this.ruleForm.province=this.$refs.myCascader.getCheckedNodes()[0].pathLabels[0]
+      this.ruleForm.province = this.$refs.myCascader.getCheckedNodes()[0].pathLabels[0]
     },
     // 移除合并人员 
     handleDelete(row) {
@@ -233,9 +234,19 @@ export default {
       this.$api.selectMergePersonDetail(params).then(res => {
         if (res.code == 200) {
           this.ruleForm = res.data
+          this.getShowProvince()
         }
       })
     },
+    // 获取省市区并显示
+    getShowProvince() {
+      if (this.ruleForm.province) {
+        let obj = this.areaOptions.find(item => {
+          return item.label == this.ruleForm.province
+        })
+        this.ruleForm.provinceOld = [obj.value]
+      }
+    },
     // 编辑合并的信息
     handleEdit(row) {
       this.getMerge(row)
@@ -246,11 +257,17 @@ export default {
     closeDialog() {
       this.$refs.ruleForm.resetFields()
       // if (this.ruleForm.needMergedName && this.ruleForm.needMergedName.length == 0) {
-        // this.ruleForm = {
-        //   needMergedName: [],
-        //   mergedName: [],
-        // }
-      // }
+      if (this.ruleForm.id) {
+        this.ruleForm = {
+          needMergedName: [],
+          mergedName: [],
+        }
+        this.$set(this, 'mergedList', [])
+        this.refresh = false
+        this.$nextTick(() => {
+          this.refresh = true
+        })
+      }
       this.visible = false
     },
     // 弹窗中的完成和保存事件
@@ -300,7 +317,6 @@ export default {
       })
     },
     onChange(row) {
-      console.log(row);
       const index = this.mergedList.indexOf(row.name)
       if (index === -1) {
         this.mergedList.push(row.name)
@@ -325,7 +341,6 @@ export default {
           this.ruleForm.mergedName.splice(index, 1)
         }
       }
-      console.log(row, this.ruleForm,this.mergedList);
     },
     // 合并事件
     handleMerge() {
@@ -335,7 +350,6 @@ export default {
         return false
       }
 
-      console.log(this.ruleForm);
       // if (this.title.indexOf('新增') != -1) {//新增
       if (this.ruleForm.needMergedName && this.ruleForm.needMergedName.length > 0) {//编辑直接合并,不填写信息
 
@@ -344,13 +358,12 @@ export default {
           for (let k in this.mergedData) {
             this.$set(this.ruleForm, [k], this.mergedData[k])
           }
+          this.getShowProvince()
         } else {
           for (let k in this.mergedData) {
             this.$set(this.ruleForm, [k], '')
           }
-          console.log(123);
         }
-        console.log(this.ruleForm);
         this.visible = true
       } else {//新增
         this.ruleForm.id = null

+ 2 - 3
src/views/project/patentCollection/components/export/components/patent.vue

@@ -78,11 +78,10 @@ export default {
         ...this.condition,//检索条件、自定义字段筛选条件、选择专利条件
         selected:this.field,
       }
-      console.log(params);
       this.btnLoading = true
-      this.$api.exportPatentList(params).then(response => {
+      this.$api.exportPatentExcel(params).then(response => {
         this.btnLoading = false
-        this.$message.success('请求成功')
+        this.$message.success('导出任务请求成功')
         //调用查询任务的方法
       }).catch(error => {
         this.btnLoading = false

+ 6 - 27
src/views/project/patentCollection/index.vue

@@ -529,12 +529,10 @@ export default {
         }
       }
       let obj = {
-        selectQuery: {
-          isAdd: this.queryParams.isAdd,
-          isDelete: this.queryParams.isDelete,
-          startNumber: this.startNumber,
-          endNumber: this.endNumber,
-        },
+        isAdd: this.queryParams.isAdd,
+        isDelete: this.queryParams.isDelete,
+        startNumber: this.startNumber,
+        endNumber: this.endNumber,
         searchQuery: this.searchStr,
         customFields: this.customFields
       }
@@ -558,7 +556,7 @@ export default {
         startNumber: this.startNumber,
         endNumber: this.endNumber,
       }
-      this.$api.pdfFirstPage(params).then(res => {
+      this.$api.exportPDFFirstPage(params).then(res => {
         if (res.code == 200) {
           const h = this.$createElement;
           this.$msgbox({
@@ -572,7 +570,7 @@ export default {
                     let router = this.$router.resolve({
                       path: '/taskList',
                       query: {
-                        projectId: this.projectId,
+                        importToId: this.projectId,
                       }
                     })
                     window.open(router.href, '_blank')
@@ -587,25 +585,6 @@ export default {
           });
         }
       })
-      // let params = JSON.parse(JSON.stringify(this.queryParams))
-      // params.tree.map(tree => {
-      //   let field = params.field.filter(item => item.key === tree.key)
-      //   if (field.length === 0) {
-      //     params.field.push(tree)
-      //   }
-      // })
-      // params.tree = undefined
-      // this.$api.pdfFirstPage(params).then(response => {
-      //   if (response.code == 200) {
-      //     const router = this.$router.resolve({
-      //       path: '/taskList',
-      //       query: {
-      //         projectId: this.projectId,
-      //       }
-      //     })
-      //     window.open(router.href, '_blank')
-      //   }
-      // })
     },
     //图表分析
     async handleAnalyses() {