123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <template>
- <view class="container">
- <view hover-class="navigator-hover" class="item">
- <view class="label">在线设备</view>
- <view class="count u-line-1">{{ statistics.today_devices }}</view>
- </view>
- <view hover-class="navigator-hover" class="item">
- <view class="label">今日警告</view>
- <view class="count u-line-1">{{ statistics.today_warns }}</view>
- </view>
- <view hover-class="navigator-hover" class="item">
- <view class="label">今日工单</view>
- <view class="count u-line-1">{{ statistics.today_orders }}</view>
- </view>
- </view>
- </template>
- <script>
- export default {
- name: 'spectaculars',
- data() {
- return {
- statistics: {
- today_devices: 0,
- today_warns: 0,
- today_orders: 0,
- }
- };
- },
- created() {
- this.getDetail()
- },
- methods: {
- getDetail() {
- this.$Http.basic({
- "id": 20230721153102,
- "content": {}
- }).then(res => {
- console.log("数据看板", res)
- if (this.cutoff(res.msg)) return;
- this.statistics = res.data;
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .container {
- display: flex;
- justify-content: space-between;
- width: 355px;
- height: 72px;
- margin: 0 auto;
- margin-top: 10px;
- .item {
- width: 112px;
- height: 72px;
- padding: 10px;
- box-sizing: border-box;
- border-radius: 4px;
- background: #FFFFFF;
- .label {
- line-height: 20px;
- font-size: 14px;
- font-family: PingFang SC-Regular, PingFang SC;
- color: #333333;
- }
- .count {
- line-height: 22px;
- font-size: 16px;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: bold;
- color: #3874F6;
- margin-top: 10px;
- }
- }
- }
- </style>
|