PatentBasic.vue 13 KB

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