stationTab.vue 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <template>
  2. <view class="stationBar flex justify-between">
  3. <view class="stationBarItem" @click="changeTab('首页')">
  4. <image src="../../static/jnImage/indexPage/homeS.png" mode="" v-if="showTab === '首页'"></image>
  5. <image src="../../static/jnImage/indexPage/home.png" mode="" v-else></image>
  6. <view class="stationBarText" :style="showTab === '首页' ? 'color: #FF8902' : ''">首页</view>
  7. </view>
  8. <view class="stationBarItem" @click="changeTab('电量预测')">
  9. <image src="../../static/jnImage/indexPage/powerS.png" mode="" v-if="showTab === '电量预测'"></image>
  10. <image src="../../static/jnImage/indexPage/power.png" mode="" v-else></image>
  11. <view class="stationBarText" :style="showTab === '电量预测' ? 'color: #FF8902' : ''">电量预测</view>
  12. </view>
  13. <view class="stationBarItem" @click="changeTab('故障分类')">
  14. <image src="../../static/jnImage/indexPage/typeS.png" mode="" v-if="showTab === '故障分类'"></image>
  15. <image src="../../static/jnImage/indexPage/type.png" mode="" v-else></image>
  16. <view class="stationBarText" :style="showTab === '故障分类' ? 'color: #FF8902' : ''">故障分类</view>
  17. </view>
  18. <view class="stationBarItem" @click="changeTab('数据简报')">
  19. <image src="../../static/jnImage/indexPage/reportS.png" mode="" v-if="showTab === '数据简报'"></image>
  20. <image src="../../static/jnImage/indexPage/report.png" mode="" v-else></image>
  21. <view class="stationBarText" :style="showTab === '数据简报' ? 'color: #FF8902' : ''">数据简报</view>
  22. </view>
  23. <view class="stationBarItem" @click="changeTab('故障预警')">
  24. <image src="../../static/jnImage/indexPage/warnS.png" mode="" v-if="showTab === '故障预警'"></image>
  25. <image src="../../static/jnImage/indexPage/warn.png" mode="" v-else></image>
  26. <view class="stationBarText" :style="showTab === '故障预警' ? 'color: #FF8902' : ''">故障预警</view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. export default {
  32. data() {
  33. return {
  34. showTab: '首页'
  35. };
  36. },
  37. methods: {
  38. changeTab(it) {
  39. this.showTab = it
  40. this.$emit('stationTab', it)
  41. }
  42. }
  43. }
  44. </script>
  45. <style lang="scss">
  46. .stationBar {
  47. padding: 0 20px;
  48. height: 50px;
  49. width: 100vw;
  50. background-color: #000;
  51. position: fixed;
  52. bottom: 0;
  53. .stationBarItem {
  54. text-align: center;
  55. position: relative;
  56. top: 6px;
  57. image {
  58. width: 20px;
  59. height: 20px;
  60. }
  61. .stationBarText {
  62. color: #6A98CB;
  63. font-size: 26upx;
  64. }
  65. }
  66. }
  67. </style>