Commit 852707bbcca35e4a43c3846b7dfd5209f12ec06a
Merge remote-tracking branch 'origin/sqy_dev'
# Conflicts: # pages.json # pages/device/device.vue
Showing
5 changed files
with
32 additions
and
44 deletions
| ... | ... | @@ -20,8 +20,9 @@ |
| 20 | 20 | </u-form-item> |
| 21 | 21 | <u-form-item @click="openType"><u-input shape="circle" v-model="timeData.getType" placeholder="请选择属性" disabled disabledColor="#377DFF0D" /></u-form-item> |
| 22 | 22 | </u-form> |
| 23 | - <view class="charts-box" v-if="historyData.length"><qiun-data-charts type="area" :chartData="chartData" :opts="{ xAxis: { disabled: true }, legend: { show: false } }" /></view> | |
| 24 | - <view v-else style="display: flex;justify-content: center; align-items: center;"> | |
| 23 | + <view class="charts-box" v-show="historyData.length"><qiun-data-charts type="area" canvas2d canvasId="daskujdhasljkdcnzjkdfhuoqwlqwjhkdsamjczxnmdasd123321" :chartData="chartData" :opts="{ xAxis: { disabled: true }, legend: { show: false } }" /></view> | |
| 24 | + <view v-if="!historyData.length" style="display: flex;justify-content: center; align-items: center;"> | |
| 25 | + {{historyData.length}} | |
| 25 | 26 | <view> |
| 26 | 27 | <image src="../../../static/empty.png" style="width: 160rpx;height: 160rpx;" /> |
| 27 | 28 | <view style="text-align: center; color:#e8e8e8;padding-bottom: 30rpx;">暂无数据</view> | ... | ... |
| 1 | 1 | <template> |
| 2 | 2 | <view class="device-page"> |
| 3 | - <f-navbar> | |
| 4 | - <view slot="left"> | |
| 5 | - <view style="width: 580rpx"> | |
| 6 | - <u--input prefixIcon="search" placeholder="输入设备SN或名称搜索" border="surround" shape="circle" @change="inputChanged"></u--input> | |
| 7 | - </view> | |
| 8 | - </view> | |
| 9 | - <view @click="openSearchDialog" slot="right" class="u-flex"> | |
| 10 | - <text style="color: #333; font-size: 14px">筛选</text> | |
| 11 | - <image style="width: 40rpx; height: 40rpx" src="../../static/shaixuan.png" /> | |
| 12 | - </view> | |
| 13 | - </f-navbar> | |
| 14 | 3 | <!-- 公共组件-每个页面必须引入 --> |
| 15 | 4 | <public-module></public-module> |
| 16 | - <view class="org-sty" @click="openOrg"> | |
| 17 | - <view class="org-item"> | |
| 18 | - <view class="u-flex" style="margin-top: 26rpx; margin-left: 15rpx"><text style="color: #333; font-size: 15px; margin-left: 14rpx">组织关系</text></view> | |
| 19 | - <view style="margin-top: 20rpx; margin-left: 15rpx" class="u-flex" v-if="total"> | |
| 20 | - <image style="margin-left: 14rpx; width: 30rpx; height: 30rpx" src="../../static/org.png" /> | |
| 21 | - <text style="margin-left: 10rpx; color: #666; font-size: 12px">设备数 : {{ total }}</text> | |
| 5 | + <u-sticky> | |
| 6 | + <view class="device-top"> | |
| 7 | + <view class="search"> | |
| 8 | + <view> | |
| 9 | + <view class="search-left"><u--input prefixIcon="search" placeholder="输入设备SN或名称搜索" shape="circle" @change="inputChanged"></u--input></view> | |
| 10 | + </view> | |
| 11 | + <view @click="openSearchDialog" class="search-right"> | |
| 12 | + <text>筛选</text> | |
| 13 | + <image src="../../static/shaixuan.png" /> | |
| 14 | + </view> | |
| 15 | + </view> | |
| 16 | + <view class="org"> | |
| 17 | + <u-cell @click="openOrg" isLink title="组织关系" :border="false"> | |
| 18 | + <view slot="label" class="label" style="display: flex; align-items: center;margin-top: 20rpx;"> | |
| 19 | + <image src="../../static/org.png" style="width: 24rpx;height: 28rpx;"></image> | |
| 20 | + <view style="margin-left: 10rpx; color: #666;"> | |
| 21 | + 设备数: | |
| 22 | + <text style="margin-left: 20rpx;">{{ total }}</text> | |
| 23 | + </view> | |
| 24 | + </view> | |
| 25 | + </u-cell> | |
| 22 | 26 | </view> |
| 23 | 27 | </view> |
| 24 | - <view class="org-item"> | |
| 25 | - <image | |
| 26 | - style=" | |
| 27 | - width: 6px; | |
| 28 | - height: 10px; | |
| 29 | - float: right; | |
| 30 | - margin-right: 34rpx; | |
| 31 | - margin-top: 58rpx; | |
| 32 | - " | |
| 33 | - src="../../static/right-arrow.png" | |
| 34 | - /> | |
| 35 | - </view> | |
| 36 | - </view> | |
| 37 | - <mescroll-body ref="mescrollRef" @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback" @up="upCallback"> | |
| 28 | + </u-sticky> | |
| 29 | + <mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback"> | |
| 38 | 30 | <view class="device-list"> |
| 39 | 31 | <view @click="openDeviceDetail(item.id, item.alarmStatus, item.lastOnlineTime, item.tbDeviceId)" class="list-item" v-for="item in list" :key="item.id"> |
| 40 | 32 | <view |
| ... | ... | @@ -70,13 +62,7 @@ |
| 70 | 62 | margin-top: 5rpx; |
| 71 | 63 | margin-right: 5rpx; |
| 72 | 64 | " |
| 73 | - :src=" | |
| 74 | - item.deviceState === 'ONLINE' | |
| 75 | - ? '../../static/online.png' | |
| 76 | - : item.deviceState === 'INACTIVE' | |
| 77 | - ? '../../static/unonline.png' | |
| 78 | - : '../../static/baojing.png' | |
| 79 | - " | |
| 65 | + :src="item.deviceState === 'ONLINE' ? '../../static/online.png' : item.deviceState === 'INACTIVE' ? '../../static/unonline.png' : '../../static/baojing.png'" | |
| 80 | 66 | /> |
| 81 | 67 | |
| 82 | 68 | <view> |
| ... | ... | @@ -120,6 +106,7 @@ import fTabbar from '@/components/module/f-tabbar/f-tabbar'; |
| 120 | 106 | import fNavbar from '@/components/module/f-navbar/f-navbar'; |
| 121 | 107 | import FilterItem from './FilterItem.vue'; |
| 122 | 108 | import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js'; |
| 109 | + | |
| 123 | 110 | import { debounce } from '@/plugins/throttle.js'; |
| 124 | 111 | export default { |
| 125 | 112 | mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件) |
| ... | ... | @@ -358,4 +345,4 @@ export default { |
| 358 | 345 | } |
| 359 | 346 | } |
| 360 | 347 | } |
| 361 | -</style> | |
| 348 | +</style> | ... | ... |