index.vue 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. <template>
  2. <div class="height_100">
  3. <el-container>
  4. <el-aside :width="width">
  5. <div class="point" @click="getCollapse">
  6. {{ isCollapse ? '收起' : '展开' }}
  7. </div>
  8. <el-menu class="theme-dark" :default-active="activeMenu" @select="changeComponent" :collapse="!isCollapse">
  9. <el-menu-item v-for="item in menuList" :key="item.name" :index="item.name" >
  10. <i class="el-icon-film"></i>
  11. <span slot="title">{{ item.label }}</span>
  12. </el-menu-item>
  13. </el-menu>
  14. </el-aside>
  15. <el-main>
  16. <component :is='componentName' :projectId="projectId" :assProjectId="assProjectId" :reportMessage="reportMessage" :projectType="projectType" :isOnly="activeMenu=='splitPatent'?true:false" :projectName="projectName" :patentNo="patentNo" :reportType="reportType" :patentType="reportMessage.patentType" :ifSecondInvalid="reportMessage.ifSecondInvalid" @refreshData="getReportMessage"></component>
  17. </el-main>
  18. </el-container>
  19. </div>
  20. </template>
  21. <script>
  22. const loadComponent = (value)=>{
  23. return import(`@/views/${value}`)
  24. }
  25. export default {
  26. components: {},
  27. props: {
  28. },
  29. data() {
  30. return {
  31. activeMenu: 'Table',
  32. componentName: '',
  33. menuList: [
  34. // {
  35. // label: '基本信息',
  36. // name: 'Table',
  37. // path: 'report/components/details/components/basicMessage.vue'
  38. // },
  39. // {
  40. // label: '任务清单',
  41. // name: 'task',
  42. // path: 'task/components/index.vue'
  43. // }
  44. ],
  45. comments: {},
  46. isCollapse: true,
  47. width: '200px',
  48. reportMessage:{},
  49. };
  50. },
  51. watch: {},
  52. computed: {
  53. projectId() {
  54. return this.$route.query.projectId
  55. },
  56. assProjectId(){
  57. return this.$route.query.assProjectId || this.reportMessage.assoReportId
  58. },
  59. projectName() {
  60. return this.$route.query.projectName
  61. },
  62. projectType() {
  63. return this.$route.query.projectType
  64. },
  65. patentNo() {
  66. return this.$route.query.patentNo || this.reportMessage.signPatentNo
  67. },
  68. reportType() {
  69. return this.$route.query.reportType || this.reportMessage.reportType
  70. },
  71. status() {//报告状态3为完成
  72. return this.$route.query.status || this.reportMessage.status
  73. },
  74. },
  75. created() { },
  76. async mounted() {
  77. await this.getReportMessage()
  78. this.getMenu()
  79. },
  80. methods: {
  81. async getReportMessage() {
  82. let params = {
  83. searchQuery: `id=${this.projectId}`,//检索条件
  84. orderDTOList: [],
  85. }
  86. await this.$api.queryReportProject(params).then(res => {
  87. if (res.code == 200) {
  88. if (res.data.data.length > 0) {
  89. this.reportMessage = res.data.data[0]
  90. } else {
  91. this.reportMessage = {}
  92. }
  93. }
  94. }).catch(error => {
  95. this.reportMessage = {}
  96. })
  97. },
  98. getCollapse() {
  99. this.isCollapse = !this.isCollapse
  100. this.width = this.isCollapse ? '200px' : '64px'
  101. },
  102. getMenu() {
  103. //0:无效分析;1:第三方意见;2:稳定性分析;3:FTO;4:侵权;5:回避;7:无效应对
  104. var menus = [
  105. {
  106. label: '基本信息',
  107. name: 'Table',
  108. path: 'report/components/details/components/basicMessage.vue',
  109. reportType: [1,2,3,4,5]
  110. },
  111. {
  112. label: '基本信息',
  113. name: 'Table',
  114. path: 'report/components/details/components/basicMessage_official.vue',
  115. reportType: [7]
  116. },
  117. {
  118. label: '标的专利特征拆分',
  119. name: 'splitPatent',
  120. path: 'report/components/details/components/splitDetails.vue',
  121. reportType: [1,2]
  122. },
  123. //FTO和侵权
  124. {
  125. label: '标的产品信息',
  126. name: 'informationEntry',
  127. path: 'report/tort/components/informationEntry/indexMenu.vue',
  128. reportType: [3, 4]
  129. },
  130. {
  131. label: '专利与产品关联比对',
  132. name: 'productMessage',
  133. path: 'report/tort/components/tortContrast.vue',
  134. reportType: [4]
  135. },
  136. {
  137. label: '对比文件',
  138. name: 'productMessage',
  139. path: 'report/components/patentList/components/index.vue',
  140. reportType: [3]
  141. },
  142. {
  143. label: '对比结果',
  144. name: 'productResult',
  145. path: 'report/components/productResult/productResult.vue',
  146. reportType: [3, 4]
  147. },
  148. //回避设计
  149. {
  150. label: '回避设计方案',
  151. name: "avoid",
  152. path: 'report/avoid/components/avoidDirection.vue',
  153. reportType: [5]
  154. },
  155. {
  156. label: '回避设计结果',
  157. name: "direction",
  158. path: 'report/avoid/components/direction.vue',
  159. reportType: [5]
  160. },
  161. //无效应对
  162. {
  163. label: '被无效历史',
  164. name: "InvalidHistory",
  165. path: 'project/patentDetails/components/patentMessage/history/InvalidHistory.vue',
  166. reportType: [7],
  167. },
  168. {
  169. label: '权利要求管理',
  170. name: "powerManage",
  171. path: 'report/InvalidResponse/components/powerManage/powerManage.vue',
  172. reportType: [7],
  173. ifWaiGuan:1
  174. },
  175. {
  176. label: '附图管理',
  177. name: "pictureManage",
  178. path: 'report/InvalidResponse/components/pictureManage/pictureManage.vue',
  179. reportType: [7],
  180. ifWaiGuan:3
  181. },
  182. {
  183. label: '无效理由和证据',
  184. name: "reasonsAndEvidence",
  185. path: 'report/InvalidResponse/components/reasonsAndEvidence/reasonsAndEvidence.vue',
  186. reportType: [7]
  187. },
  188. {
  189. label: '无效理由和证据-三性',
  190. name: "reasonsAndEvidence2",
  191. path: 'report/InvalidResponse/components/reasonsAndEvidence/details_2.vue',
  192. reportType: [7]
  193. },
  194. {
  195. label: '无效理由和证据-非三性',
  196. name: "reasonsAndEvidence1",
  197. path: 'report/InvalidResponse/components/reasonsAndEvidence/details_1.vue',
  198. reportType: [7]
  199. },
  200. {
  201. label: '证据文献',
  202. name: "evidence",
  203. path: 'report/InvalidResponse/components/Evidence/evidence.vue',
  204. reportType: [7]
  205. },
  206. //稳定性分析和第三方意见
  207. // {
  208. // label: '标的专利特征拆分',
  209. // name: "featureSplit",
  210. // path: 'report/components/details/components/featureSplit.vue',
  211. // reportType: [1,2]
  212. // },
  213. {
  214. label: '对比文献',
  215. name: "evidence",
  216. path: 'report/InvalidResponse/components/Evidence/evidence.vue',
  217. reportType: [1,2]
  218. },
  219. {
  220. label: '对比结果',
  221. name: "comparisonResult",
  222. path: 'report/analysisAndOpinion/components/comparisonResults/index.vue',
  223. reportType: [1,2]
  224. },
  225. {
  226. label: '对比方案',
  227. name: "comparisonPlan",
  228. path: 'report/analysisAndOpinion/components/comparisonPlan/comparisonPlan.vue',
  229. reportType: [1,2]
  230. },
  231. {
  232. label: '检索记录',
  233. name: "searchRecords",
  234. path: 'report/analysisAndOpinion/components/searchRecords/searchRecords.vue',
  235. reportType: [1,2,3]
  236. },
  237. {
  238. label: '报告文档',
  239. name: "reportFile",
  240. path: 'report/components/reportFile/reportFileTable.vue',
  241. reportType: [0, 1, 2, 3, 4, 5]
  242. },
  243. ]
  244. if (this.status == 3) {
  245. let arr = [
  246. {
  247. label: '后续事项',
  248. name: "remarryMatter",
  249. path: 'report/components/matter/remarryMatter.vue',
  250. reportType: [0, 1, 2, 3, 4, 5,7]
  251. },
  252. ]
  253. menus = menus.concat(arr)
  254. }
  255. menus.push(
  256. {
  257. label: '任务清单',
  258. name: 'task',
  259. path: 'task/components/index.vue',
  260. reportType: [0, 1, 2, 3, 4, 5]
  261. }
  262. )
  263. var menu = menus.filter(item => {
  264. if(item.ifWaiGuan){
  265. if(this.reportMessage.patentType == 3){
  266. return item.reportType.indexOf(Number(this.reportType)) != -1 && item.ifWaiGuan == 3
  267. }else{
  268. return item.reportType.indexOf(Number(this.reportType)) != -1 && item.ifWaiGuan!=3
  269. }
  270. }
  271. return item.reportType.indexOf(Number(this.reportType)) != -1
  272. })
  273. // this.menuList.splice(1, 0, ...menu)
  274. this.menuList = menu
  275. this.getComponents()
  276. },
  277. getComponents() {
  278. this.menuList.forEach((item, index) => {
  279. // import(`@/views/${item.path}`).then(res => {
  280. // this.comments[item.name] = res.default
  281. // if (index == 0) {
  282. // this.componentName = this.comments[item.name]
  283. // }
  284. // })
  285. loadComponent(item.path).then(component => {
  286. this.comments[item.name] = component.default
  287. if (index == 0) {
  288. this.componentName = this.comments[item.name]
  289. }
  290. })
  291. })
  292. },
  293. changeComponent(name) {
  294. this.activeMenu = name
  295. this.componentName = this.comments[name]
  296. },
  297. },
  298. };
  299. </script>
  300. <style lang="scss" scoped>
  301. .point {
  302. line-height: 40px;
  303. text-align: center;
  304. border-bottom: 1px solid #e6e6e6;
  305. /* color: var(--color); */
  306. font-family: var(--fm);
  307. color: var(--color2);
  308. cursor: pointer;
  309. width: 100%;
  310. &:hover {
  311. background: #ecf5ff
  312. }
  313. }
  314. </style>