| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- <template>
- <!-- 底部tabbar -->
- <view class="navmainbox">
- <view class="space_between">
- <view style="display: flex;align-items: center;padding: 0rpx 20rpx;">
- <image class="logo" src="/static/logo.png"></image>
- <view class="head_title">库房温湿度监测主机</view>
- </view>
- <view @click="reconnection">重连</view>
- <view class="navigation">
- <view class="navcont" :class="nowchos == index ? 'activebg' :''" v-for="(item,index) in dataList"
- :key="index" @click="gonavs(item,index)">
- <view class="card_icon_item center_in">
- <text class="iconfont icon_image" :class="[item.icon]"></text>
- </view>
- <view class="navchosbox" :class="nowchos == index ? 'activeName' :''">
- {{item.title}}
- </view>
- </view>
- <view class="navcont" @click="rebooting">
- <view class="card_icon_item_red center_in">
- <text class="iconfont icon_image icon-restart"></text>
- </view>
- <view class="navchosbox">重新启动</view>
- </view>
- </view>
- </view>
- <u-modal :show="rebootingShow" showCancelButton @confirm="confirm" @cancel="rebootingShow = false">
- <view class="slot-content">
- <view style="display: flex;align-items: center;">
- <u-icon name="error-circle-fill" color="#ff9900" size="30"></u-icon>
- <view class="circle_card">是否重新启动?</view>
- </view>
- </view>
- </u-modal>
- </view>
- </template>
- <script>
- export default {
- name: 'x-navbar',
- props: {
- nowchos: {
- type: Number,
- default () {
- return 0
- }
- },
- },
- data() {
- return {
- dataList: [{
- icon: 'icon-realtime',
- title: '实时数据',
- }, {
- icon: 'icon-lishishuju',
- title: '历史数据',
- }, {
- icon: 'icon-emergency',
- title: '报警查询',
- }, {
- icon: 'icon-shezhi',
- title: '基本设置',
- }],
- restartList: {
- icon: 'icon-restart',
- title: '重新启动',
- },
- rebootingShow: false,
- }
- },
- mounted() {
- },
- methods: {
- reconnection(){
- this.$emit('reconnection')
- },
- gonavs(e, cindex) {
- this.$emit('botomchos', cindex)
- },
- rebooting() {
- this.rebootingShow = true
- // this.$emit('rebooting')
- },
- // 确定重新启动
- confirm(){
- plus.runtime.restart()
- }
- }
- }
- </script>
- <style lang="scss">
- .navmainbox {
- background-color: #ffffff;
- width: 100%;
- border-bottom: 2rpx solid #ffffff;
- }
- .logo {
- flex: none;
- width: 30rpx;
- height: 30rpx;
- }
- .head_title {
- font-size: 9px;
- margin-left: 10rpx;
- font-weight: 600;
- }
- .navigation {
- z-index: 2;
- position: relative;
- display: flex;
- justify-content: center;
- align-items: center;
- height: 60rpx;
- padding-bottom: var(--window-bottom);
- }
- .navigation .navcont {
- cursor: pointer;
- position: relative;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- // width: 70rpx;
- margin: 0rpx 20rpx;
- height: 100%;
- border-bottom: 2rpx solid #ffffff;
- }
- .navchosbox {
- color: #727289 !important;
- margin-top: 2rpx;
- font-size: 6px;
- }
- .activeName {
- color: #3C9CFE !important;
- }
- .activebg {
- // background-color: #f4f4f5 !important;
- border-bottom: 2rpx solid #3C9CFE !important;
- }
- .card_icon_item {
- width: 15px;
- height: 15px;
- border-radius: 4px;
- background-color: #3C9CFE;
- }
- .card_icon_item_red {
- width: 15px;
- height: 15px;
- border-radius: 4px;
- background-color: #f56c6c;
- }
- .icon_image {
- z-index: 2024;
- color: #ffffff;
- font-size: 9px;
- }
- </style>
|