huangmp 4 years ago
parent
commit
25513da6c0

+ 3 - 1
src/views/dashboard/onefaceaccess/comps/person-detail.vue

@@ -83,7 +83,9 @@
       };
     },
     methods:{
-      show(data){
+      show(data,title){
+        console.log(data);
+        this.options.title=title
         this.$refs.detail.show(data)
       }
     }

+ 1 - 1
src/views/dashboard/onefaceaccess/comps/resident.vue

@@ -102,7 +102,7 @@
           item.recgScore=null
         }
         item.score=item.recgScore
-        this.$refs.personDetail.show(item)
+        this.$refs.personDetail.show(item,'常住人员')
       },
       async loadStaffRecord() {
         //userType:1: 住户,2-员工,4-访客

+ 1 - 1
src/views/dashboard/onefaceaccess/comps/strange.vue

@@ -96,7 +96,7 @@
         if (item.recgScore==-1||this.$isEmpty(item.recgScore)) {
           item.recgScore=null
         }
-        this.$refs.personDetail.show(item)
+        this.$refs.personDetail.show(item,'陌生人员')
       },
       async loadSnapRecord() {
         let res = await getList(this.page.current, this.page.size)

+ 13 - 5
src/views/smartaccess/form/snap.vue

@@ -4,9 +4,11 @@
       :center="true" :visible.sync="dialogShow" width="45%" :close-on-click-modal="false" top="4%">
       <avue-form ref="avueForm" :option="option" v-model="model" @submit="submit"></avue-form>
     </el-dialog>
+    <personDetail ref="personDetail"></personDetail>
   </div>
 </template>
 <script>
+  import personDetail from "@/views/dashboard/onefaceaccess/comps/person-detail.vue"
   import {
     getDetail
   } from "@/api/estate/snaprecord.js";
@@ -14,6 +16,9 @@
     deepClone
   } from '@/util/util.js'
   export default {
+    components: {
+      personDetail
+    },
     data() {
       return {
         isAdd: false,
@@ -104,8 +109,7 @@
             {
               label: '位置信息',
               prop: 'group2',
-              column: [
-                {
+              column: [{
                   label: "所在园区",
                   prop: "agencyId",
                   cascaderItem: ['residentialId'],
@@ -142,7 +146,7 @@
                     message: "请选择所在区域",
                     trigger: "blur"
                   }]
-                },{
+                }, {
                   label: '安装位置',
                   prop: 'deviceAddress',
                   span: 12,
@@ -198,6 +202,10 @@
           });
       },
       showDialog(model, detail = true) {
+        if (detail) {
+          this.$refs.personDetail.show(model, '抓拍记录')
+          return
+        }
         this.isAdd = false
         this.model = model
         this.option.detail = detail
@@ -207,10 +215,10 @@
         this.isAdd = true
         this.dialogShow = true
         this.option.detail = false
-        setTimeout(()=>{
+        setTimeout(() => {
           this.$refs.avueForm.resetForm()
           this.model = {}
-        },20)
+        }, 20)
       },
       async submit(form, done) {
         let data = deepClone(form)