|
@@ -47,18 +47,57 @@ export const patentDetails = {
|
|
|
methods: {
|
|
|
//导入数据
|
|
|
exportData(value){
|
|
|
+ var dict = {
|
|
|
+ 1:'',
|
|
|
+ 2:'说明书文本',
|
|
|
+ 3:'权利要求',
|
|
|
+ 4:'附图',
|
|
|
+ 5:'pdf文档'
|
|
|
+ }
|
|
|
+ var str = `确定刷新${dict[value]}?`
|
|
|
+ this.$confirm(str, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ var params = {
|
|
|
+ patentNo:this.patent.patentNo,
|
|
|
+ refreshContent:[value]
|
|
|
+ }
|
|
|
+ this.loading = true
|
|
|
+ this.$api.refreshPatent(params).then(response=>{
|
|
|
+ if(response.code == 200){
|
|
|
+ this.$message.success('数据刷新成功')
|
|
|
+ // this.loading = false
|
|
|
+ this.getPatent()
|
|
|
+ }
|
|
|
+ }).catch(error=>{
|
|
|
+ this.$message.error('数据刷新失败')
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ //获取专利信息
|
|
|
+ getPatent(value) {
|
|
|
+ var dict = {
|
|
|
+ 1:'',
|
|
|
+ 2:'publicFullText',
|
|
|
+ 3:'claim',
|
|
|
+ 4:'pictureGuid',
|
|
|
+ 5:'pdf'
|
|
|
+ }
|
|
|
var params = {
|
|
|
- patentNo:this.patent.patentNo,
|
|
|
- refreshContent:[value]
|
|
|
+ patentNo: this.patent.patentNo
|
|
|
}
|
|
|
+ var api = 'selectPatentDetail'
|
|
|
this.loading = true
|
|
|
- this.$api.refreshPatent(params).then(response=>{
|
|
|
- if(response.code == 200){
|
|
|
- this.$message.success('数据刷新成功')
|
|
|
+ this.$api[api](params).then(response => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ this.$set(this.patent,dict[value],response.data[dict[value]])
|
|
|
this.loading = false
|
|
|
}
|
|
|
- }).catch(error=>{
|
|
|
- this.$message.error('数据刷新失败')
|
|
|
+ }).catch(error => {
|
|
|
this.loading = false
|
|
|
})
|
|
|
},
|