PatentBasic.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. <template>
  2. <div class="patent-basic" @mouseup="mouseup">
  3. <el-row :gutter="24">
  4. <el-col :span="18" >
  5. <el-row :gutter="24">
  6. <el-col :span="24">
  7. <el-tabs value="0">
  8. <el-tab-pane label="摘要" name="0">
  9. <p class="common" :data-type="'摘要'+(patent.change2?'译文':'原文')" :style="setStyle()" v-html="getViewDom2(patent, 'abstractStr','摘要'+(patent.change2?'译文':'原文'))"></p>
  10. <span>
  11. <el-link v-if="projectId" type="primary" @click.native="handleChange(patent, 'abstractStr')" >
  12. <span v-if="!patent.change2">切换译文</span>
  13. <span v-else>切换原文</span>
  14. </el-link>
  15. </span>
  16. <table class="patent-basic-table">
  17. <tr v-if="$permission('/workspace/details/links')">
  18. <td width="80"><span class="patent-basic-label">外部链接:</span></td>
  19. <td>
  20. <el-link type="primary" :href="`https://worldwide.espacenet.com/patent/search?q=${patent.publicNo}`" target="_blank" v-html="getViewDom('Espacenet')" style="margin-right: 15px;"></el-link>
  21. <el-link type="primary" :href="`http://epub.cnipa.gov.cn/patent/${patent.publicNo}`" target="_blank" v-html="getViewDom('CNIPA')"></el-link>
  22. </td>
  23. </tr>
  24. <tr>
  25. <td width="80"><span class="patent-basic-label">标签:</span></td>
  26. <td>
  27. <div class="patent-label">
  28. <template >
  29. <el-tag v-if="$permission('/workspace/details/deleteLabel') && $r(projectId,[1,2])" v-for="(label, index) in patent.label" effect="dark" type="primary" size="small" closable :disable-transitions="false" @close="handleCloseLabel(index)">{{ label.name }}</el-tag>
  30. <el-tag v-else v-for="(label, index) in patent.label" effect="dark" type="primary" size="small">{{ label.name }}</el-tag>
  31. <el-input
  32. class="input-new-tag"
  33. v-if="inputLabelVisible"
  34. v-model="inputLabelValue"
  35. ref="saveLabelInput"
  36. size="mini"
  37. @keyup.enter.native="handleInputLabelConfirm"
  38. @blur="handleInputLabelConfirm"
  39. >
  40. </el-input>
  41. <el-button :disabled="!($permission('/workspace/details/addLabel') && $r(projectId,[1,2]))" v-else type="primary" size="mini" @click="showInputLabel" circle icon="el-icon-plus"></el-button>
  42. </template>
  43. </div>
  44. </td>
  45. </tr>
  46. </table>
  47. </el-tab-pane>
  48. </el-tabs>
  49. </el-col>
  50. </el-row>
  51. </el-col>
  52. <el-col :span="6">
  53. <el-card shadow="never" class="text-align_center " style="margin-top:50px;" data-type="附图">
  54. <div style="height: 200px;" class="picture">
  55. <el-image v-if="(!projectId && patent.abstractPath2)||projectId" :src="patent.abstractPath2?patent.abstractPath2:getImagePath1(patent)" :preview-src-list="[patent.abstractPath2]" :style="{width:patent.imgWidth?patent.imgWidth:'100%',height:patent.imgHeight?patent.imgHeight:'100%'}">
  56. <div slot="error" class="image-slot">
  57. <img src="https://www.patentstar.com.cn/img/Common/nopic.jpg" alt="">
  58. </div>
  59. </el-image>
  60. </div>
  61. </el-card>
  62. </el-col>
  63. </el-row>
  64. <el-row :gutter="24">
  65. <el-col :span="18" >
  66. <el-row :gutter="24">
  67. <el-col :span="24">
  68. <el-tabs value="0">
  69. <el-tab-pane label="著录项目" name="0">
  70. <el-descriptions :column=2>
  71. <el-descriptions-item label="申请号"><div class="patent-basic-value" v-html="getViewDom(patent.applicationNo,'申请号')"></div></el-descriptions-item>
  72. <el-descriptions-item label="申请日"><div class="patent-basic-value" v-html="getViewDom(patent.applicationDate,'申请日')"></div></el-descriptions-item>
  73. <el-descriptions-item label="公开号"><div class="patent-basic-value" v-html="getViewDom(patent.publicNo,'公开号')"></div></el-descriptions-item>
  74. <el-descriptions-item label="公开日"><div class="patent-basic-value" v-html="getViewDom(patent.publicDate,'公开日')"></div></el-descriptions-item>
  75. <el-descriptions-item label="授权号" v-if="patent.publicAccreditNo"><div class="patent-basic-value" v-html="getViewDom(patent.publicAccreditNo,'授权号')"></div></el-descriptions-item>
  76. <el-descriptions-item label="授权日" v-if="patent.publicAccreditDate"><div class="patent-basic-value" v-html="getViewDom(patent.publicAccreditDate,'授权日')"></div></el-descriptions-item>
  77. <el-descriptions-item label="优先权" v-if="patent.priorityNo"><div class="patent-basic-value" v-html="getViewDom(patent.priorityNo,'优先权')+ '&nbsp;&nbsp;&nbsp;&nbsp;' +getViewDom(patent.priorityDate)"></div></el-descriptions-item>
  78. </el-descriptions>
  79. </el-tab-pane>
  80. </el-tabs>
  81. </el-col>
  82. </el-row>
  83. </el-col>
  84. </el-row>
  85. <el-row :gutter="24">
  86. <el-col :span="18" >
  87. <el-row :gutter="24">
  88. <el-col :span="24">
  89. <el-tabs value="0">
  90. <el-tab-pane label="相关人" name="0">
  91. <el-descriptions :column="1">
  92. <el-descriptions-item label="申请人" labelStyle="width:90px" v-if="patent.applicant" contentStyle="display:flex;flex-direction: row;flex-wrap: wrap;justify-content: flex-start;">
  93. <div class="patent-basic-value" v-for="item in patent.applicant.filter(a => a.dataType === 2)" :key="item.name">
  94. <div class="margin-right_10">
  95. <span v-html="getViewDom(item.name,'申请人')"></span>
  96. <span v-if="item.shortName" v-html="'(标:'+getViewDom(item.shortName,'申请人')+')'"></span>
  97. </div>
  98. </div>
  99. </el-descriptions-item>
  100. <el-descriptions-item label="申请人地址" labelStyle="width:90px" v-if="patent.applicant">
  101. <div class="patent-basic-value" v-if="patent.applicant.filter(a => a.dataType === 2)[0]" v-html="getViewDom(patent.applicant.filter(a => a.dataType === 2)[0].addressStr,'申请人地址')"></div>
  102. </el-descriptions-item>
  103. <el-descriptions-item label="权利人" labelStyle="width:90px" v-if="patent.applicant && patent.applicant.filter(a => a.dataType === 1).length>0" contentStyle="display:flex;flex-direction: row;flex-wrap: wrap;justify-content: flex-start;">
  104. <div class="patent-basic-value" v-for="item in patent.applicant.filter(a => a.dataType === 1)" :key="item.name">
  105. <div class="margin-right_10">
  106. <span v-html="getViewDom(item.name,'权利人')"></span>
  107. <span v-if="item.shortName" v-html="'(标:'+getViewDom(item.shortName,'权利人')+')'"></span>
  108. </div>
  109. </div>
  110. </el-descriptions-item>
  111. <el-descriptions-item label="权利人地址" labelStyle="width:90px" v-if="patent.applicant && patent.applicant.filter(a => a.dataType === 1).length>0">
  112. <div class="patent-basic-value" v-if="patent.applicant.filter(a => a.dataType === 1)[0]" v-html="getViewDom(patent.applicant.filter(a => a.dataType === 1)[0].addressStr,'权利人地址')"></div>
  113. </el-descriptions-item>
  114. <el-descriptions-item label="发明人" labelStyle="width:90px" v-if="patent.inventor && patent.inventor.length>0" contentStyle="display:flex;flex-direction: row;flex-wrap: wrap;justify-content: flex-start;">
  115. <div class="patent-basic-value margin-right_10" v-for="item in patent.inventor" :key="item.name" v-html="getViewDom(item.name,'发明人')" ></div>
  116. </el-descriptions-item>
  117. <el-descriptions-item label="代理人" labelStyle="width:90px" v-if="patent.agent && patent.agent.length>0">
  118. <div class="patent-basic-value margin-right_10" v-for="item in patent.agent" :key="item.name" v-html="getViewDom(item.name,'代理人')"></div>
  119. </el-descriptions-item>
  120. <el-descriptions-item label="代理机构" labelStyle="width:90px" v-if="patent.agency">
  121. <div v-if="patent.agency" class="patent-basic-value" v-html="getViewDom(patent.agency.name,'代理机构')"></div>
  122. </el-descriptions-item>
  123. </el-descriptions>
  124. </el-tab-pane>
  125. </el-tabs>
  126. </el-col>
  127. </el-row>
  128. </el-col>
  129. </el-row>
  130. <el-row :gutter="24">
  131. <el-col :span="18" >
  132. <el-row :gutter="24">
  133. <el-col :span="24">
  134. <el-tabs value="0">
  135. <el-tab-pane label="分类号" name="0" v-if="patent.ipcList">
  136. <el-descriptions :column=1>
  137. <el-descriptions-item label="IPC分类号" contentStyle="display:flex;flex-direction: row;flex-wrap: wrap;justify-content: flex-start;">
  138. <div class="patent-basic-value margin-right_10" v-for="item in patent.ipcList" :key="item" v-html="getViewDom(item,'IPC分类号')"></div>
  139. </el-descriptions-item>
  140. </el-descriptions>
  141. </el-tab-pane>
  142. </el-tabs>
  143. </el-col>
  144. </el-row>
  145. </el-col>
  146. </el-row>
  147. </div>
  148. </template>
  149. <script>
  150. import { commonMixins ,addContrast } from "./mixins"
  151. import { changeTranslation ,patentKeywordsHighlight} from "@/views/workspace/folder/components/mixins";
  152. export default {
  153. mixins: [commonMixins, changeTranslation,addContrast,patentKeywordsHighlight],
  154. data() {
  155. return {
  156. inputLabelVisible: false,
  157. inputLabelValue: '',
  158. }
  159. },
  160. watch:{
  161. patent(val,oldVal){
  162. if(val!=oldVal){
  163. this.$nextTick(()=>{
  164. if(!this.projectId && !this.patent.abstractPath2 && this.patent.publicNo){
  165. var params = {
  166. patentCell:4,
  167. patentNo:this.patent.publicNo,
  168. appNo:this.patent.applicationNo,
  169. }
  170. this.$api.getPatentPart(params).then(response=>{
  171. if(response.code == 200){
  172. if(Object.keys(response.data).length>0 && response.data.image.length>0){
  173. this.$set(this.patent,'abstractPath2',response.data.image[0].url)
  174. }else{
  175. this.$set(this.patent,'abstractPath2','q')
  176. }
  177. this.getHeight(this.patent.abstractPath2, this.patent)
  178. }
  179. })
  180. }
  181. })
  182. }
  183. }
  184. },
  185. mounted() {
  186. if(!this.projectId && !this.patent.abstractPath2 && this.patent.publicNo){
  187. var params = {
  188. patentCell:4,
  189. patentNo:this.patent.publicNo,
  190. appNo:this.patent.applicationNo,
  191. }
  192. this.$api.getPatentPart(params).then(response=>{
  193. if(response.code == 200){
  194. if(Object.keys(response.data).length>0 && response.data.image.length>0){
  195. this.$set(this.patent,'abstractPath2',response.data.image[0].url)
  196. }else{
  197. this.$set(this.patent,'abstractPath2','q')
  198. }
  199. this.getHeight(this.patent.abstractPath2, this.patent)
  200. }
  201. })
  202. }
  203. },
  204. methods: {
  205. handleCloseLabel(index) {
  206. this.patent.label.splice(index, 1);
  207. this.handleSubmitLabel()
  208. },
  209. handleInputLabelConfirm() {
  210. let inputLabelValue = this.inputLabelValue;
  211. if (inputLabelValue) {
  212. this.patent.label.push({
  213. name: inputLabelValue
  214. });
  215. this.handleSubmitLabel()
  216. }
  217. this.inputLabelVisible = false;
  218. this.inputLabelValue = '';
  219. },
  220. showInputLabel() {
  221. this.inputLabelVisible = true;
  222. this.$nextTick(_ => {
  223. this.$refs.saveLabelInput.$refs.input.focus();
  224. });
  225. },
  226. handleSubmitLabel() {
  227. let data = {
  228. projectId: this.projectId,
  229. patentId: this.patent.id,
  230. type: 96,
  231. field: '54-0',
  232. selected: this.patent.label.map(item => item.name)
  233. }
  234. this.$api.updatePatentLabel(data).then(response => {
  235. this.$message.success('操作成功')
  236. }).catch(error => {
  237. })
  238. }
  239. }
  240. }
  241. </script>
  242. <style lang="scss">
  243. .patent-basic {
  244. // height: 500px;
  245. overflow: auto;
  246. height:calc(100% + 30px) ;
  247. padding-bottom: 10px;
  248. .el-image {
  249. width: 100%;
  250. }
  251. .patent-basic-label {
  252. color: #6b6868;
  253. }
  254. .patent-basic-value {
  255. }
  256. .patent-basic-table {
  257. font-size: 14px;
  258. tr {
  259. height: 30px;
  260. }
  261. }
  262. .patent-articles-patent-abstract {
  263. .common {
  264. font-size: 14px;
  265. margin-top: 0;
  266. }
  267. .title {
  268. font-weight: bold;
  269. border-bottom: 1px solid #e6e6e6;
  270. padding-bottom: 5px;
  271. margin-top: 0;
  272. margin-bottom: 5px;
  273. }
  274. }
  275. .patent-label {
  276. line-height: 35px;
  277. .el-tag {
  278. margin-left: 0;
  279. margin-right: 10px;
  280. }
  281. .input-new-tag {
  282. width: 90px;
  283. vertical-align: bottom;
  284. }
  285. }
  286. }
  287. </style>