zhuguifei
2024-12-25 576d28de6be2d75bfd5a213874dd8d06657635b5
pages/tabBar/device.vue
@@ -19,7 +19,7 @@
                     </view>
                     <view>
                        <text
                           class="text-gray margin-right-lg">{{new Date().toLocaleDateString().replace(/\//g, '-')}}</text>
                           class="text-gray margin-right-lg">{{curDate}}</text>
                     </view>
                  </view>
@@ -62,7 +62,7 @@
         <u-skeleton class=" " rows="20" :loading="loading" :title="false">
         <u-skeleton   rows="20" :loading="loading" :title="false">
            <!-- 如果希望其他view跟着页面滚动,可以放在z-paging标签内 -->
            <view class="card-box dynamic shadow" v-for="(item,index) in dataList" :key="index"
               @click="itemClick(item)">
@@ -72,7 +72,9 @@
                     <view class="title text-cut">{{$lget(item,'name')}}</view>
                     <view class="flex title text-green text-sm">
                        <u-tag v-if="item.online" size="mini" text="在线" type="success" plain plainFill></u-tag>
                        <u-tag v-else class="" size="mini" text="停机" type="error" plain plainFill></u-tag>
                        <u-tag v-else  size="mini" text="离线" type="warning" plain plainFill></u-tag>
                        <u-tag v-if="item.online" class="margin-left-sm" size="mini" text="在线" type="success" plain plainFill></u-tag>
                        <u-tag  v-else class="margin-left-sm" size="mini" text="停机" type="error" plain plainFill></u-tag>
                     </view>
                  </view>
                  <view class="right" style="min-width: 240rpx;">
@@ -128,7 +130,11 @@
            loading: true,
            // v-model绑定的这个变量不要在分页请求结束中自己赋值!!!
            dataList: [],
            curDate:uni.$u.timeFormat(new Date(), 'yyyy-mm-dd'),
         }
      },
      onTabItemTap : function(e) {
      getApp().globalData.selectTab = e.index
      },
      methods: {
         queryList(pageNo, pageSize) {
@@ -153,7 +159,7 @@
            })
         },
         itemClick(item) {
         itemClick(item) {
            uni.navigateTo({
               url: "/pages/device/control?code="+item.code+"&clientId="+item.clientId
            })