4604247a2e47b4348b82b00fc4f417e2d63d8434.svn-base 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <el-container>
  3. <el-tabs v-model="currentTab" class="tabItem" @tab-click="handleClick">
  4. <el-tab-pane :lazy="true"
  5. :label="option.label"
  6. :name="option.label"
  7. v-for="option in tabItems">
  8. <component
  9. :is="option.value"
  10. v-if="currentTab==option.label"
  11. :id="'f9397893dfdfd4878945757'"
  12. ></component>
  13. </el-tab-pane>
  14. </el-tabs>
  15. </el-container>
  16. </template>
  17. <script>
  18. import baseInfo from './baseInfo'
  19. import flowFile from './flowFile'
  20. import idea from './idea'
  21. import flowChart from './flowChart'
  22. export default {
  23. components: {
  24. baseInfo,
  25. flowFile,
  26. idea,
  27. flowChart
  28. },
  29. data() {
  30. return {
  31. currentTab:'基本信息',
  32. tabItems:[
  33. {
  34. label:'基本信息',
  35. value:'baseInfo'
  36. },
  37. {
  38. label:'流程附件',
  39. value:'flowFile'
  40. },
  41. {
  42. label:'岗位意见历史',
  43. value:'idea'
  44. },
  45. {
  46. label:'流程图',
  47. value:'flowChart'
  48. }
  49. ]
  50. }
  51. },
  52. computed: {
  53. },
  54. activated() {
  55. },
  56. created(){
  57. },
  58. mounted(){
  59. },
  60. methods: {
  61. handleClick(item){
  62. this.currentTab = item.label;
  63. }
  64. },
  65. watch: {
  66. }
  67. }
  68. </script>
  69. <style>
  70. .el-tabs__header{
  71. margin: 0 !important;
  72. }
  73. </style>
  74. <style scoped>
  75. .el-container {
  76. width: 100%;
  77. height:100%;
  78. }
  79. .tabItem{
  80. width: calc(100% - 20px);
  81. height:100%;
  82. margin:0 auto;
  83. }
  84. </style>