xiaohaizhao 1 rok pred
rodič
commit
7c0e8e4d85

+ 9 - 2
pages/facility/modules/dailyRecord.vue

@@ -9,6 +9,9 @@
         <record ref="操作记录" :w_deviceid="w_deviceid" />
         <queue ref="操作队列" :w_deviceid="w_deviceid" />
         <upload-record ref="上传记录" :w_deviceid="w_deviceid" />
+        <up-line-record ref="上线记录" :w_deviceid="w_deviceid" />
+
+
         <u-action-sheet :actions="actions" cancelText="取消" :show="actionShow" @select="selectClick"
             :closeOnClickOverlay="true" :closeOnClickAction="false" @close="actionClose" />
     </view>
@@ -19,10 +22,10 @@ let page = {}
 import record from "./record.vue"
 import queue from "./queue.vue"
 import uploadRecord from "./uploadRecord.vue"
-
+import upLineRecord from "./upLineRecord.vue"
 
 export default {
-    components: { record, queue, uploadRecord },
+    components: { record, queue, uploadRecord, upLineRecord },
     name: "dailyRecord",
     props: {
         w_deviceid: String
@@ -45,6 +48,10 @@ export default {
                 name: '上传记录',
                 loading: false,
                 disabled: false
+            }, {
+                name: '上线记录',
+                loading: false,
+                disabled: false
             }],
         }
     },

+ 90 - 0
pages/facility/modules/upLineRecord.vue

@@ -0,0 +1,90 @@
+<template>
+    <view v-show="show">
+        <view class="item" hover-class="navigator-hover" v-for="item in list" :key="item.rowindex">
+            <view class="title">{{ item.createdate || ' --' }}</view>
+            <view class="row u-line-3">
+                {{ item.action == 'off' ? '离线' : '在线' }}
+            </view>
+        </view>
+    </view>
+</template>
+
+<script>
+let paging = {}
+export default {
+    name: "uploadRecord",
+    props: {
+        w_deviceid: String
+    },
+    data() {
+        return {
+            show: false,
+            uninitialized: true,
+            list: [],
+            "where": {
+                "begindate": "",
+                "enddate": ""
+            }
+        }
+    },
+    methods: {
+        getList(init = false) {
+            if (init) paging = {
+                pageNumber: 1,
+                pageTotal: 1,
+            };
+            return new Promise((resolve) => {
+                if (paging.pageNumber > paging.pageTotal) return resolve()
+                this.$Http.basic({
+                    "id": 20231123163602,
+                    "content": {
+                        "type": 1,
+                        "w_deviceid": this.w_deviceid,
+                        ...paging,
+                        "where": this.where
+                    }
+                }).then(res => {
+                    console.log('上线记录', res)
+                    resolve(!this.cutoff(res.msg));
+                    if (this.cutoff(res.msg)) return;
+                    paging.pageNumber = res.pageNumber + 1;
+                    paging.pageTotal = res.pageTotal;
+                    this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data)
+                })
+            })
+        }
+    },
+}
+</script>
+
+<style lang="scss" scoped>
+.item {
+    width: 355px;
+    margin: 0 auto 10px;
+    padding: 10px;
+    background: #fff;
+    border-radius: 4px;
+    box-sizing: border-box;
+
+    .title {
+        line-height: 21px;
+        font-size: 15px;
+        font-family: PingFang SC-Medium, PingFang SC;
+        font-weight: bold;
+        color: #333333;
+        margin-bottom: 10px;
+    }
+
+    .row {
+        line-height: 17px;
+        font-size: 12px;
+        color: #666666;
+        margin-bottom: 5px;
+    }
+}
+
+
+/deep/.u-empty {
+    z-index: 1 !important;
+}
+</style>