Shannon_mu 3 年 前
コミット
5f4fd18a0c

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

@@ -234,7 +234,7 @@ export default {
             });
             this.$msgBox(`远程开门`, `已选${ids.length}台门禁机,其中${ids.length}台在线,是否远程开门?`)
                 .then(() => {
-                    this.$http.post('/sc-gate-web/gate/openDoor', { ids: ids }).then(({ status, data, msg }) => {
+                    this.$http.post('/sc-gate-web/gate/remoteOpenDoor', { ids: ids }).then(({ status, data, msg }) => {
                         if (0 === status) {
                             this.$message({
                                 type: 'success',

+ 68 - 47
accessControlSystem/src/views/deviceManagement/distributionRecord/index.vue

@@ -9,10 +9,10 @@
                 </el-radio-group>
                 <el-input
                     clearable
-                    placeholder="输入门禁卡号/设备名称/地址"
+                    placeholder="设备名称"
                     class="search-input"
                     v-trim
-                    v-model.trim="mixins_query.name"
+                    v-model.trim="mixins_query.deviceName"
                     v-if="chargeStatus == 1"
                 ></el-input>
                 <el-input
@@ -24,15 +24,20 @@
                     v-else
                 ></el-input>
 
-                <el-select v-model="mixins_query.householdType" clearable placeholder="名单类型">
+                <el-select v-model="mixins_query.type" clearable placeholder="名单类型">
                     <el-option :value="1" label="启用"></el-option>
                     <el-option :value="2" label="禁用"></el-option>
-                    <el-option :value="3" label="删除"></el-option>
+                    <el-option :value="0" label="删除"></el-option>
                 </el-select>
-                <el-select v-model="mixins_query.householdType" clearable placeholder="下发状态">
+                <el-select v-model="mixins_query.status" clearable placeholder="下发状态" v-if="chargeStatus == 1">
                     <el-option :value="1" label="下发中"></el-option>
                     <el-option :value="2" label="成功"></el-option>
                 </el-select>
+                <el-select v-model="mixins_query.issueStatus" clearable placeholder="下发状态" v-else>
+                    <el-option :value="0" label="下发中"></el-option>
+                    <el-option :value="1" label="成功"></el-option>
+                </el-select>
+
                 <el-date-picker
                     v-model="pickerTime"
                     value-format="yyyy-MM-dd"
@@ -61,7 +66,7 @@
                 :pageset="mixins_pageset"
                 @page-change="pageChange"
             >
-                <template slot="facepictureurl" slot-scope="scope">
+                <template slot-scope="scope" slot="facepictureurl">
                     <div class="imgVdio">
                         <el-image class="imgs" :src="scope.row.facepictureurl" :preview-src-list="[scope.row.facepictureurl]"></el-image>
                     </div>
@@ -80,71 +85,78 @@ export default {
         communityTree
     },
     data() {
+        let _this = this;
         return {
             currentId: '',
-            pickerTime: '',
+            pickerTime: [],
             chargeStatus: 1,
             cols: [
                 {
                     label: '门禁卡号',
-                    prop: ''
+                    prop: 'cardId'
                 },
                 {
-                    label: '姓名',
-                    prop: 'name'
-                },
-                {
-                    label: '卡类型',
-                    prop: ''
-                },
-                {
-                    label: '所属社区',
-                    prop: 'communityName'
+                    label: '设备名称',
+                    prop: 'deviceName'
                 },
                 {
-                    label: '设备名称',
-                    prop: ''
+                    label: '名单类型',
+                    prop: 'typeName'
                 },
                 {
                     label: '设备位置',
-                    prop: 'address'
+                    prop: 'position'
                 },
                 {
-                    label: '名单类型',
-                    prop: 'type',
+                    label: '门禁机状态',
+                    prop: 'status',
                     format(val) {
-                        switch (val) {
-                            case 0:
-                                return `删除`;
-                            case 1:
-                                return `启用`;
-                            case 2:
-                                return `禁用`;
+                        if (val == 0) {
+                            return `启用`;
+                        } else if (val == 1) {
+                            return `禁用`;
                         }
-                    },
-                    width: '80px'
+                    }
                 },
                 {
                     label: '下发状态',
-                    prop: 'issueStatus',
+                    prop: 'sendStatus',
                     format(val) {
-                        switch (val) {
-                            case 0:
-                                return `失败`;
-                            case 1:
-                                return `成功`;
+                        if (val == 0) {
+                            return `失败`;
+                        } else if (val == 1) {
+                            return `成功`;
                         }
-                    },
-                    width: '80px'
+                    }
+                },
+                {
+                    label: '到期时间',
+                    prop: 'expireTime',
+                    width: '150px',
+                    format(val) {
+                        if (!!val) {
+                            return _this.$moment(Number(val)).format('YYYY-MM-DD hh:mm:ss');
+                        }
+                    }
                 },
                 {
                     label: '操作时间',
-                    prop: 'createDate',
-                    width: '150px'
+                    prop: 'createTime',
+                    width: '150px',
+                    format(val) {
+                        if (!!val) {
+                            return _this.$moment(Number(val)).format('YYYY-MM-DD hh:mm:ss');
+                        }
+                    }
                 },
                 {
                     label: '下发时间',
-                    prop: 'issueDate',
+                    prop: 'sendTime',
+                    format(val) {
+                        if (!!val) {
+                            return _this.$moment(Number(val)).format('YYYY-MM-DD hh:mm:ss');
+                        }
+                    },
                     width: '150px'
                 }
             ],
@@ -224,7 +236,9 @@ export default {
                     width: '150px'
                 }
             ],
-            mixins_post: 'get'
+            mixins_post: 'get',
+            oneUrl: '/sc-gate-web/record/blackWhite/page',
+            twoUrl: '/sc-gate-web/record/faceRecord/page'
         };
     },
     methods: {
@@ -243,13 +257,20 @@ export default {
                 this.mixins_query.endTime = ``;
             }
         },
-        changeRadio() {
+        changeRadio(v) {
+            if (v == 1) {
+                this.mixins_dataUrl = this.oneUrl;
+            } else {
+                this.mixins_dataUrl = this.twoUrl;
+            }
             this.mixins_search();
         }
     },
-
     created() {
-        this.mixins_dataUrl = '/sc-gate-web/record/faceRecord/page'; // 分页查询接口
+        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_dataUrl = this.oneUrl; // 分页查询接口
         this.mixins_search();
     }
 };