titleDrawer.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <template>
  2. <div>
  3. <el-drawer class="custom-drawer-form" size="900px" :with-header="false" :visible.sync="drawer" direction="rtl" :before-close="close" destroy-on-close append-to-body>
  4. <div style="padding:10px;height:100%">
  5. <el-tabs v-model="components">
  6. <el-tab-pane v-for="item in menu" :key="item.components" :label="item.name" :name="item.components"></el-tab-pane>
  7. </el-tabs>
  8. <component :is='components' style="height:calc(100% - 50px);" :isOperate='2'></component>
  9. </div>
  10. </el-drawer>
  11. </div>
  12. </template>
  13. <script>
  14. import Project from '@/views/project/index.vue'
  15. import Report from '@/views/report/components/index.vue'
  16. import patentMining from '@/views/patentMining/index.vue'
  17. export default {
  18. components: {
  19. Project,
  20. Report,
  21. patentMining
  22. },
  23. props: {},
  24. data() {
  25. return {
  26. menu:[
  27. {
  28. name:'相关专题库',
  29. components:'Project'
  30. },
  31. {
  32. name:'相关报告',
  33. components:'Report'
  34. },
  35. ],
  36. drawer:false,
  37. components:'Project',
  38. };
  39. },
  40. watch: {},
  41. computed: {},
  42. created() {},
  43. mounted() {},
  44. methods: {
  45. open(scenarioName, typeName, question){
  46. this.params = {
  47. scenarioName:scenarioName,
  48. typeName:typeName,
  49. question:question
  50. }
  51. if(typeName && typeName.indexOf('专利挖掘')!=-1){
  52. this.menu.push(
  53. {
  54. name:'专利挖掘',
  55. components:'patentMining'
  56. },
  57. )
  58. }
  59. this.drawer = true
  60. },
  61. close(){
  62. this.$emit('close')
  63. this.drawer = false
  64. this.components='Project',
  65. this.menu=[
  66. {
  67. name:'相关专题库',
  68. components:'Project'
  69. },
  70. {
  71. name:'相关报告',
  72. components:'Report'
  73. },
  74. ]
  75. }
  76. },
  77. };
  78. </script>
  79. <style lang="scss">
  80. </style>