index.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <view id="equipmentInformation">
  3. <view class="top-table-button-box">
  4. <view :class="checkType == 1?'checkButton':''" @click="checkButton(1)">设备信息</view>
  5. <view :class="checkType == 2?'checkButton':''" @click="checkButton(2)">使用记录</view>
  6. </view>
  7. <view class="bottom-flex">
  8. <infoPage v-if="checkType == 1"></infoPage>
  9. <listPage v-if="checkType == 2"></listPage>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. import {
  15. demo1,
  16. } from '@/pages_equipmentUtilization/api/index.js'
  17. import {
  18. infoPage
  19. } from './infoPage.vue'
  20. import {
  21. listPage
  22. } from './listPage.vue'
  23. export default {
  24. components: {
  25. infoPage,
  26. listPage
  27. },
  28. data() {
  29. return {
  30. checkType:2,
  31. }
  32. },
  33. onLoad(option) {
  34. },
  35. onShow() {
  36. },
  37. mounted() {
  38. },
  39. methods: {
  40. checkButton(type){
  41. if(this.checkType != type){
  42. this.$set(this,'checkType',type);
  43. }
  44. },
  45. },
  46. }
  47. </script>
  48. <style lang="stylus" scoped>
  49. #equipmentInformation {
  50. height: 100%;
  51. flex:1;
  52. display:flex;
  53. overflow: hidden;
  54. flex-direction:column;
  55. .top-table-button-box{
  56. display: flex;
  57. border-bottom: 1rpx solid #0183FA;
  58. background-color: #fff;
  59. view{
  60. font-weigth:700;
  61. flex: 1;
  62. text-align: center;
  63. line-height:80rpx;
  64. }
  65. .checkButton{
  66. color:#0183FA;
  67. }
  68. }
  69. .bottom-flex{
  70. flex: 1;
  71. overflow: hidden;
  72. }
  73. }
  74. </style>