Browse Source

修复门禁bug1

Shannon_mu 3 years ago
parent
commit
a798dbe262

+ 1 - 1
accessControlSystem/src/views/deviceManagement/accessControlMachineManagement/index.vue

@@ -90,7 +90,7 @@ export default {
                     prop: 'communityName'
                 },
                 {
-                    label: '门禁位置',
+                    label: '门禁位置',
                     prop: 'address'
                 },
                 {

+ 42 - 5
accessControlSystem/src/views/deviceManagement/accessControlMachineManagement/popups/details.vue

@@ -5,7 +5,13 @@
             <div class="tableLeft">
                 <div class="list-item" v-for="(item, index) in basic.left" :key="`basic.left${index}`">
                     <div class="list-item-label">{{ item.label }}</div>
-                    <div class="list-item-conten">{{ detailsData[item.prop] || '--' }}</div>
+                    <div class="list-item-conten" v-if="!!item.format && item.prop == 'lnglat'">
+                        {{ item.format(detailsData) || '--' }}
+                    </div>
+                    <div class="list-item-conten" v-else-if="!!item.format">
+                        {{ item.format(detailsData[item.prop]) || '--' }}
+                    </div>
+                    <div class="list-item-conten" v-else>{{ detailsData[item.prop] }}</div>
                 </div>
             </div>
             <div class="tableRight">
@@ -72,11 +78,29 @@ export default {
                     },
                     {
                         label: '门禁机类型',
-                        prop: 'deviceType'
+                        prop: 'gateType',
+                        format(row) {
+                            switch (row) {
+                                case 1:
+                                    return `围墙机`;
+                                case 2:
+                                    return `单元机`;
+                            }
+                        }
                     },
                     {
                         label: '进出门类型',
-                        prop: 'accessType'
+                        prop: 'accessType',
+                        format(row) {
+                            switch (row) {
+                                case 1:
+                                    return `进出门`;
+                                case 2:
+                                    return `进门`;
+                                case 3:
+                                    return `出门`;
+                            }
+                        }
                     },
                     {
                         label: '安装时间',
@@ -98,7 +122,15 @@ export default {
                     },
                     {
                         label: '安装方位',
-                        prop: 'installedLocation'
+                        prop: 'installedLocation',
+                        format(row) {
+                            switch (row) {
+                                case 1:
+                                    return `楼面`;
+                                case 2:
+                                    return `地下室`;
+                            }
+                        }
                     },
                     {
                         label: '重启时间',
@@ -252,13 +284,18 @@ $border: 1px solid #e0e1e3;
                 border: none;
             }
             &-label {
-                width: rem(100);
+                min-width: rem(100);
                 border-right: $border;
                 margin-left: rem(10);
             }
             &-conten {
                 width: calc(100% - #{rem(100)});
                 margin: 0 rem(10);
+                white-space: nowrap;
+
+                text-overflow: ellipsis;
+
+                overflow: hidden;
             }
         }
     }

+ 29 - 15
accessControlSystem/src/views/deviceManagement/distributionRecord/index.vue

@@ -61,6 +61,7 @@
             <zz-table
                 :settings="{ showIndex: true, stripe: true }"
                 :cols="chargeStatus == 1 ? cols : cols2"
+                :updateFlag="chargeStatus"
                 :loading="mixins_onQuery"
                 :data="mixins_list"
                 :pageset="mixins_pageset"
@@ -135,7 +136,7 @@ export default {
                     width: '150px',
                     format(val) {
                         if (!!val) {
-                            return _this.$moment(Number(val)).format('YYYY-MM-DD hh:mm:ss');
+                            return _this.$moment(Number(val)).format('YYYY-MM-DD HH:mm:ss');
                         }
                     }
                 },
@@ -145,7 +146,7 @@ export default {
                     width: '150px',
                     format(val) {
                         if (!!val) {
-                            return _this.$moment(Number(val)).format('YYYY-MM-DD hh:mm:ss');
+                            return _this.$moment(Number(val)).format('YYYY-MM-DD HH:mm:ss');
                         }
                     }
                 },
@@ -154,7 +155,7 @@ export default {
                     prop: 'sendTime',
                     format(val) {
                         if (!!val) {
-                            return _this.$moment(Number(val)).format('YYYY-MM-DD hh:mm:ss');
+                            return _this.$moment(Number(val)).format('YYYY-MM-DD HH:mm:ss');
                         }
                     },
                     width: '150px'
@@ -177,17 +178,12 @@ export default {
                             case 3:
                                 return `租客`;
                         }
-                    },
-                    width: '100px'
+                    }
                 },
                 {
                     label: '所属社区',
                     prop: 'communityName'
                 },
-                {
-                    label: '设备名称',
-                    prop: ''
-                },
                 {
                     label: '设备位置',
                     prop: 'address'
@@ -250,11 +246,20 @@ export default {
             let start = '00:00:00',
                 end = '23:59:59';
             if (!!e) {
-                this.mixins_query.startTime = `${e[0]} ${start}`;
-                this.mixins_query.endTime = `${e[1]} ${end}`;
+                if (this.chargeStatus == 1) {
+                    this.mixins_query.beginDate = `${e[0]} ${start}`;
+                } else {
+                    this.mixins_query.startDate = `${e[0]} ${start}`;
+                }
+
+                this.mixins_query.endDate = `${e[1]} ${end}`;
             } else {
-                this.mixins_query.startTime = ``;
-                this.mixins_query.endTime = ``;
+                if (this.chargeStatus == 1) {
+                    this.mixins_query.beginDate = ``;
+                } else {
+                    this.mixins_query.startDate = ``;
+                }
+                this.mixins_query.endDate = ``;
             }
         },
         changeRadio(v) {
@@ -263,13 +268,22 @@ export default {
             } else {
                 this.mixins_dataUrl = this.twoUrl;
             }
+            if (this.chargeStatus == 1) {
+                this.mixins_query.beginDate = this.mixins_query.startDate;
+                delete this.mixins_query.startDate;
+                delete this.mixins_query.name;
+            } else {
+                this.mixins_query.startDate = this.mixins_query.beginDate;
+                delete this.mixins_query.beginDate;
+                delete this.mixins_query.deviceName;
+            }
             this.mixins_search();
         }
     },
     created() {
         this.pickerTime = [this.$moment().format('YYYY-MM-DD'), this.$moment().format('YYYY-MM-DD')];
-        this.mixins_query.startTime = `${this.pickerTime[0]} 00:00:00`;
-        this.mixins_query.endTime = `${this.pickerTime[1]} 23:59:59`;
+        this.mixins_query.beginDate = `${this.pickerTime[0]} 00:00:00`;
+        this.mixins_query.endDate = `${this.pickerTime[1]} 23:59:59`;
         this.mixins_dataUrl = this.oneUrl; // 分页查询接口
         this.mixins_search();
     }

+ 6 - 8
accessControlSystem/src/views/deviceManagement/replacementRecord/index.vue

@@ -7,7 +7,7 @@
             </el-select>
             <el-date-picker
                 v-model="pickerTime"
-                value-format="yyyy-MM-dd"
+                value-format="yyyyMMdd"
                 type="daterange"
                 range-separator="至"
                 start-placeholder="开始日期"
@@ -106,17 +106,15 @@ export default {
             return newVal;
         },
         checkDateType(time) {
-            return !!time ? this.$moment(new Date(time)).format('YYYY-MM-DD') : '--';
+            return !!time ? this.$moment(new Date(time)).format('YYYYMMDD') : '--';
         },
         timeToggle(e) {
-            let start = '00:00:00',
-                end = '23:59:59';
             if (!!e) {
-                this.mixins_query.startTime = `${e[0]} ${start}`;
-                this.mixins_query.endTime = `${e[1]} ${end}`;
+                this.mixins_query.startDate = `${e[0]}`;
+                this.mixins_query.endDate = `${e[1]}`;
             } else {
-                this.mixins_query.startTime = ``;
-                this.mixins_query.endTime = ``;
+                this.mixins_query.startDate = ``;
+                this.mixins_query.endDate = ``;
             }
         },
         getorgTree() {