p-personnel-orientation-navbar.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <template>
  2. <view>
  3. <view class="content">
  4. <view :style="{height:statusBarHeight + 'px'}"></view>
  5. <view class="navbar">
  6. <view class="left" @click="click_left()">
  7. <uni-icons type="arrowleft" color="#fff" size="18"></uni-icons>
  8. </view>
  9. <view class="right" @click="search()">
  10. <view class="input_box">
  11. <view class="input_icon"></view>
  12. <view class="input_text">搜索井下人员</view>
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. <!-- 占位符 -->
  18. <view :style="{height: statusBarHeight + 'px'}"></view>
  19. <view style="height: 94rpx;"></view>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. props: ['mine'],
  25. data() {
  26. return {
  27. statusBarHeight: 20,
  28. };
  29. },
  30. created() {
  31. // 获取手机系统信息
  32. const info = uni.getSystemInfoSync()
  33. // 设置状态栏高度
  34. this.statusBarHeight = info.statusBarHeight
  35. },
  36. methods: {
  37. click_left() {
  38. uni.navigateBack();
  39. },
  40. search(){
  41. uni.navigateTo({
  42. url:"../../production/personnel_orientation/search/search?mine=" + this.mine
  43. })
  44. }
  45. }
  46. }
  47. </script>
  48. <style lang="scss">
  49. .content {
  50. position: fixed;
  51. top: 0;
  52. left: 0;
  53. background-color: #009FE8;
  54. z-index: 999;
  55. }
  56. .navbar {
  57. width: 750rpx;
  58. box-sizing: border-box;
  59. padding-left: 31rpx;
  60. padding-right: 26rpx;
  61. padding-top: 14rpx;
  62. padding-bottom: 14rpx;
  63. display: flex;
  64. // justify-content: space-between;
  65. .left {
  66. width: 42rpx;
  67. line-height: 65rpx;
  68. margin-right: 15rpx;
  69. }
  70. .right {
  71. width: 620rpx;
  72. height: 65rpx;
  73. background: rgba(255, 255, 255, 0.2);
  74. border-radius: 33rpx;
  75. .input_box {
  76. display: flex;
  77. .input_icon {
  78. margin-left: 43rpx;
  79. margin-top: 16rpx;
  80. width: 34rpx;
  81. height: 34rpx;
  82. background-image: url(icon/search.png);
  83. background-size: cover;
  84. background-repeat: no-repeat;
  85. }
  86. .input_text {
  87. margin-left: 19rpx;
  88. font-size: 24rpx;
  89. font-family: PingFangSC-Regular, PingFang SC;
  90. font-weight: 400;
  91. color: #FFFFFF;
  92. line-height: 65rpx;
  93. }
  94. }
  95. }
  96. }
  97. </style>