detail.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <template>
  2. <div class="ele-body">
  3. <el-card :body-style="{ padding: 0 }">
  4. <!-- tab切换 -->
  5. <!-- <div class="switch">
  6. <div class="switch_left">
  7. <ul>
  8. <li
  9. v-for="item in tabOptions"
  10. :key="item.key"
  11. :class="{ active: activeComp == item.key }"
  12. @click="activeComp = item.key"
  13. >
  14. {{ item.name }}
  15. </li>
  16. </ul>
  17. </div>
  18. <div class="right" style="padding: 10px">
  19. <el-button @click="$router.go(-1)">返回</el-button>
  20. </div>
  21. </div> -->
  22. <div class="page-title">
  23. <el-page-header @back="$router.go(-1)">
  24. <div slot="content" class="pageContent">
  25. <div>设备信息详情</div>
  26. </div>
  27. </el-page-header>
  28. </div>
  29. <div class="content-wrapper">
  30. <component :is="activeComp" :id="id" :code="code"></component>
  31. </div>
  32. </el-card>
  33. </div>
  34. </template>
  35. <script>
  36. import baseInfo from './components/baseInfo.vue';
  37. // import mould from '../components/details/mould.vue'
  38. // import maintain from '../components/details/maintain.vue'
  39. // import repair from '../components/details/repair.vue'
  40. // import malfunction from '../components/details/malfunction.vue'
  41. // import InternetRecord from '../components/details/InternetRecord.vue'
  42. // import production from '../components/details/production.vue'
  43. // import pointInspection from '../components/details/point-inspection.vue'
  44. // import internet from '../components/details/internet.vue'
  45. export default {
  46. components: {
  47. baseInfo
  48. // mould,
  49. // pointInspection,
  50. // maintain,
  51. // repair,
  52. // production,
  53. // InternetRecord,
  54. // malfunction,
  55. // internet
  56. },
  57. data () {
  58. return {
  59. // 设备主键id
  60. id: '',
  61. code: '',
  62. activeComp: 'baseInfo',
  63. tabOptions: [
  64. { key: 'baseInfo', name: '设备信息' }
  65. // { key: 'mould', name: '关联模具' },
  66. // { key: 'pointInspection', name: '巡点检记录' },
  67. // { key: 'maintain', name: '保养记录' },
  68. // { key: 'repair', name: '维修记录' },
  69. // { key: 'malfunction', name: '故障记录' },
  70. // // { key: 'production', name: '生产记录' },
  71. // { key: 'internet', name: '物联数据' }
  72. // // { key: "InternetRecord", name: "物联记录" },
  73. ]
  74. };
  75. },
  76. created () {
  77. this.id = this.$route.query.id;
  78. this.code = this.$route.query.code;
  79. }
  80. };
  81. </script>
  82. <style lang="scss" scoped>
  83. .content-wrapper {
  84. background-color: #fff;
  85. }
  86. .page-title{
  87. background: #fff;
  88. padding:26px 10px 15px;
  89. border-bottom:1px solid #eaeefb;
  90. }
  91. </style>