patentMessage.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  1. <template>
  2. <div class="patent-articles" >
  3. <el-container v-loading="loading">
  4. <el-container >
  5. <el-header class="patent-articles-title">
  6. <div class="patent-articles-title-box">
  7. <div style="position:relative">
  8. <div>
  9. <span v-html="getViewDom(patent.publicNo)"></span>
  10. <el-tag type="primary" effect="dark" size="mini" class="margin-left_10">{{ patent.simpleStatus }}</el-tag>
  11. <el-tag :type="patentStatus2 == '0' ? 'info' : 'primary'" effect="dark" size="mini" class="margin-left_10"
  12. style="cursor: pointer" @click="changeStatus(patentStatus2)">{{ patentStatus[patentStatus2]
  13. }}</el-tag>
  14. </div>
  15. <div style="color: #6b6868; font-size: 15px;border-bottom: 1px solid #e6e6e6;padding-bottom: 5px;">
  16. <span v-html="getViewDom2(patent, 'name')"></span>
  17. <el-link type="primary" @click.native="handleChange(patent, 'name')" style="margin-left: 10px;margin-top: -3px;">
  18. <span v-if="!patent.change">切换译文</span>
  19. <span v-else>切换原文</span>
  20. </el-link>
  21. </div>
  22. </div>
  23. <div style=" position: relative;">
  24. <el-link v-for="item in menuList" :type="activeMenu === item.value ? 'primary' : undefined" v-if="$permission('/workspace/patent/worth')?true:item.value !='patentWorth'" :disabled="item.value === 'PatentExport' ? !$permission('/workspace/details/exportDocument'): false " @click.native="handleSelect(item.value)">{{ item.label }}</el-link>
  25. <el-link v-for="item in menuList2" :type="activeMenu === item.value ? 'primary' : undefined" :disabled="item.value === 'PatentExport' ? !$permission('/workspace/details/exportDocument'): false " @click.native="handleSelect(item.value)">{{ item.label }}</el-link>
  26. <el-tooltip class="item" effect="dark" :content="(showRight ? '隐藏' : '显示') + '右侧菜单'" placement="top" v-if="showcard==true">
  27. <i :class="showRight ? 'el-icon-s-unfold' : 'el-icon-s-fold'" style="font-size: 25px;position: absolute; right: 10px; margin-top: 5px;color: #2f2f2f; cursor: pointer" @click="showRight = !showRight"></i>
  28. </el-tooltip>
  29. </div>
  30. </div>
  31. </el-header>
  32. <el-main class="patent-articles-content" style="padding-left:30px">
  33. <div class="patent-articles-content-left" :style="{ width: showRight ? 'calc(100% - 321px)' : 'calc(100% - 21px)' }">
  34. <component :is="componentName" :project-id="projectId" :patent="patent" :patent-id="patentId" @refresh="getPatent(patent.patentNo)"></component>
  35. </div>
  36. <div class="patent-articles-content-right" v-if="showRight">
  37. <el-container>
  38. <el-header v-if="showcard==true">
  39. <div class="patent-articles-option">
  40. <el-tabs v-model="activeOption" type="card">
  41. <el-tab-pane label="标引" name="PatentField"></el-tab-pane>
  42. <!-- <el-tab-pane label="高亮" name="PatentKeywordsHighlight"></el-tab-pane> -->
  43. <!-- <el-tab-pane label="注释" name="PatentAnnotation" :disabled="!($permission('/workspace/details/notes') && $r(projectId,[1,2]))"></el-tab-pane> -->
  44. </el-tabs>
  45. </div>
  46. </el-header>
  47. <el-main>
  48. <keep-alive>
  49. <component :is="activeOption" @status="getStatus" :project-id="projectId" :patent-id="patentId" :reportId="reportId" :taskId="taskId" :patentNo1="publicNo"></component>
  50. <component :is="activeOption" @status="getStatus" :project-id="projectId" :patent-id="patentId" :reportId="reportId" :taskId="taskId" :patentNo1="publicNo"></component>
  51. </keep-alive>
  52. </el-main>
  53. </el-container>
  54. </div>
  55. </el-main>
  56. </el-container>
  57. </el-container>
  58. <div class="content-main" style="padding-left:40px"></div>
  59. </div>
  60. </template>
  61. <script>
  62. import { changeTranslation, patentKeywordsHighlight } from '@/views/components/common/mixins'
  63. import PatentList from '@/views/components/articles/components/PatentList.vue'
  64. import PatentField from '@/views/components/articles/components/PatentField'
  65. // import PatentAnnotation from './components/PatentAnnotation'
  66. import PatentBasic from "@/views/components/articles/components/PatentBasic"
  67. import PatentPDF from "@/views/components/articles/components/PatentPDF"
  68. import PatentImage from "@/views/components/articles/components/PatentImage"
  69. import PatentRight from "@/views/components/articles/components/PatentRight"
  70. import PatentInstruction from "@/views/components/articles/components/PatentInstruction"
  71. import PatentFamily from "@/views/components/articles/components/PatentFamily"
  72. import PatentStatus from "@/views/components/articles/components/PatentStatus"
  73. // import PatentKeywordsHighlight from '../components/PatentKeywordsHighlight'
  74. import PatentMessage from './patentMessage'
  75. import PatentKeywordsHighlight from "@/views/components/common/PatentKeywordsHighlight"
  76. import Examination from '@/views/components/articles/components/history/examination.vue'
  77. import File from '@/views/components/articles/components/history/file.vue'
  78. import Invalid from '@/views/components/articles/components/history/invalid.vue'
  79. import Litigation from '@/views/components/articles/components/history/litigation.vue'
  80. import Other from '@/views/components/articles/components/history/other.vue'
  81. import { getPatentCountry } from "@/utils";
  82. import Import from '@/views/components/import/index.vue'
  83. import Features from '@/views/components/articles/components/features.vue'
  84. import Permit from '@/views/components/articles/components/history/permit.vue'
  85. import ProductManage from '@/views/product/components/product.vue'
  86. import PatentWorth from '@/views/components/articles/components/history/components/echarts/components/echarts.vue'
  87. export default {
  88. mixins: [patentKeywordsHighlight, changeTranslation],
  89. components: {
  90. PatentMessage,
  91. PatentList,
  92. PatentField,
  93. // PatentAnnotation,//右侧自定义字段中右侧注释部分
  94. PatentKeywordsHighlight,
  95. PatentBasic,
  96. PatentPDF,
  97. PatentImage,
  98. PatentRight,
  99. PatentFamily,
  100. PatentStatus,
  101. PatentInstruction,
  102. Import,
  103. Features,
  104. Examination,
  105. File,
  106. Invalid,
  107. Litigation,
  108. Other,
  109. Permit,
  110. ProductManage,
  111. PatentWorth
  112. },
  113. props: ['reportId', 'patentMessage', 'publicNo','taskId',"patentStatus2A","switchValue"],
  114. // props:{
  115. // reportId:Number,
  116. // patentMessage:String,
  117. // publicNo:String,
  118. // required:true
  119. // },
  120. data() {
  121. return {
  122. patentStatus: {
  123. '0': '未读',
  124. '1': '已读'
  125. },
  126. patentStatus2: '',
  127. showcard: true,
  128. fix: false,
  129. showRight: false,
  130. patentId: parseInt(this.$route.params.id || 0),
  131. projectId: parseInt(this.$route.query.id || 0),
  132. patent: {},
  133. activeMenu: 'PatentBasic',
  134. componentName: 'PatentBasic',
  135. activeOption: 'PatentField',
  136. loading: false,
  137. patentNo:"",
  138. menuList: [
  139. {
  140. value: 'PatentBasic',
  141. label: '基础信息'
  142. },
  143. {
  144. value: 'PatentRight',
  145. label: '权利要求'
  146. },
  147. {
  148. value: 'PatentImage',
  149. label: '附图'
  150. },
  151. {
  152. value: 'PatentInstruction',
  153. label: '说明书文本'
  154. },
  155. {
  156. value: 'PatentFamily',
  157. label: '同族专利'
  158. },
  159. {
  160. value: 'PatentStatus',
  161. label: '法律状态'
  162. },
  163. {
  164. value: 'PatentPDF',
  165. label: '说明书'
  166. },
  167. // {
  168. // value: 'PatentExport',
  169. // label: '导出文档'
  170. // },
  171. {
  172. value:'Permit',
  173. label:'许可历史'
  174. },
  175. {
  176. value:'ProductManage',
  177. label:'商品化'
  178. },
  179. {
  180. value:'patentWorth',
  181. label:'价值曲线'
  182. }
  183. ],
  184. menuList2: [
  185. {
  186. value: 'Examination',
  187. label: '审查历史'
  188. },
  189. // {
  190. // value: 'File',
  191. // label: '申请案卷'
  192. // },
  193. {
  194. value: 'Invalid',
  195. label: '无效记录'
  196. },
  197. {
  198. value: 'Litigation',
  199. label: '诉讼历史'
  200. },
  201. {
  202. value: 'Other',
  203. label: '其他参考资料'
  204. },
  205. ],
  206. }
  207. },
  208. created() {
  209. //console.log(this.publicNo);
  210. },
  211. watch: {
  212. publicNo(val) {
  213. //console.log(val);
  214. this.getPatent(val)
  215. },
  216. patentStatus2(val) {
  217. let value = {
  218. patentNo: this.publicNo,
  219. patentStatus2:this.patentStatus2
  220. }
  221. this.$emit("patentStatusEmit",value)
  222. },
  223. patentStatus2A(val) {
  224. if (this.publicNo==val.patentNo) {
  225. this.patentStatus2=val.patentStatus2
  226. }
  227. },
  228. switchValue(val) {
  229. if (this.publicNo==val.patentNo) {
  230. if (val.value) {
  231. this.showcard=false
  232. } else {
  233. this.showcard=true
  234. }
  235. } else {
  236. this.showcard=true
  237. }
  238. },
  239. },
  240. mounted() {
  241. if(this.publicNo){
  242. this.getPatent(this.publicNo)
  243. }
  244. },
  245. methods: {
  246. changePageTitle() {
  247. document.title = `${this.patent.publicNo} ${this.patent.name || ''}`
  248. },
  249. async getPatent(publicNo) {
  250. //console.log(publicNo)
  251. this.loading = true
  252. const response = await this.$api.PatentByPatentNo({patentNo : publicNo})
  253. //console.log(response)
  254. this.patent = response.data
  255. if (this.taskId) {
  256. this.getPatentStatus()
  257. }
  258. const country = getPatentCountry(this.patent.patentNo)
  259. let change = false
  260. if (country !== 'CN') {
  261. change = true
  262. }
  263. this.$set(this.patent, 'change', change)
  264. this.$set(this.patent, 'change2', change)
  265. this.loading = false
  266. this.changePageTitle()
  267. },
  268. handleSelect2(index, path) {
  269. },
  270. handleSelect(index) {
  271. if (index === 'PatentExport') {
  272. const router = this.$router.resolve({
  273. path: '/export/patent',
  274. query: {
  275. id: this.projectId,
  276. patent: this.patent.id,
  277. }
  278. })
  279. window.open(router.href, '_blank');
  280. return false
  281. }
  282. this.activeMenu = index
  283. this.componentName = index
  284. },
  285. //修改已读未读
  286. changeStatus(val) {
  287. if (val == '0') {
  288. var a = {
  289. taskID: this.taskId?this.taskId:this.taskId1,
  290. patentNo:this.publicNo,
  291. }
  292. this.$api.updatePatentStatus(a).then(response => {
  293. if (response.code == 200) {
  294. this.patentStatus2 = '1'
  295. }
  296. })
  297. }
  298. },
  299. //查询任务下专利状态
  300. getPatentStatus() {
  301. var a = {
  302. taskID: this.taskId?this.taskId:this.taskId1,
  303. patentNo:this.publicNo,
  304. }
  305. this.$api.getPatentStatus(a).then(response => {
  306. //console.log("patentMessage",response.data);
  307. if (response.code == 200) {
  308. this.patentStatus2 = response.data
  309. }
  310. })
  311. },
  312. //获取状态
  313. getStatus(val) {
  314. this.patentStatus2 = val
  315. },
  316. }
  317. }
  318. </script>
  319. <style lang="scss">
  320. .content-main{
  321. width:80% !important ;
  322. background-color: skyblue !important;
  323. }
  324. .patent-articles {
  325. width: 100%;
  326. height: 100% !important;
  327. padding: 0 !important;
  328. .patent-articles-menu {
  329. }
  330. .el-menu-item.is-active {
  331. background: #ecf5ff !important;
  332. color: #409EFF!important;
  333. }
  334. .patent-articles-title {
  335. padding: 0 !important;
  336. height: 100px !important;
  337. .el-link {
  338. margin-right: 20px;
  339. }
  340. .patent-articles-title-box {
  341. font-size: 20px;
  342. width: 100%;
  343. text-align: center;
  344. }
  345. }
  346. .patent-articles-content {
  347. background: #fff;
  348. padding: 0;
  349. height: 100%;
  350. overflow: hidden;
  351. .patent-articles-content-left {
  352. float: left;
  353. height: 100%;
  354. overflow-y: auto;
  355. overflow-x: hidden;
  356. padding: 10px;
  357. }
  358. .patent-articles-content-right {
  359. width: 300px;
  360. border-left: 1px solid #e6e6e6;
  361. float: right;
  362. height: 100%;
  363. .el-header {
  364. height: 50px !important;
  365. position: relative !important;
  366. }
  367. .el-main {
  368. padding: 0 12px !important;
  369. }
  370. .el-container, .el-main {
  371. height: 100%;
  372. }
  373. .patent-articles-option {
  374. position: absolute;
  375. bottom: 0;
  376. height: 100%;
  377. left: 50px;
  378. .el-tabs {
  379. margin-top: 9px;
  380. }
  381. .el-tabs__header {
  382. margin-bottom: 0 !important;
  383. }
  384. }
  385. }
  386. }
  387. }
  388. </style>