From ab701df859cd79ae036f8cc86268137d2c8da8ee Mon Sep 17 00:00:00 2001
From: guanqb <18720758508@163.com>
Date: Thu, 22 Feb 2024 18:00:56 +0800
Subject: [PATCH] 消防自查导出、消防自查和场所检查增加场所类别字段

---
 src/views/publicSecurity/bailReporting.vue |   31 +++++++++++++++++++++++++++++--
 1 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/src/views/publicSecurity/bailReporting.vue b/src/views/publicSecurity/bailReporting.vue
index 797e4dc..ec7c919 100644
--- a/src/views/publicSecurity/bailReporting.vue
+++ b/src/views/publicSecurity/bailReporting.vue
@@ -22,6 +22,11 @@
                     {{ showStatus(row.status).text }}
                 </el-tag>
             </template>
+            <template slot-scope="{row, size}" slot="phone">
+                <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneflag')"
+                    v-text="textDispose(row, 'phoneflag', 'phone')">
+                </el-button>
+            </template>
         </avue-crud>
 
         <el-dialog class="place-info-box audit-info-box" title="" append-to-body :visible.sync="auditBasePopup" width="60%">
@@ -88,7 +93,7 @@
                 searchShow: true,
                 searchMenuSpan: 3,
                 menuWidth: 210,
-
+                header: false,
                 height: "auto",
                 calcHeight: 54,
                 dialogWidth: 950,
@@ -102,6 +107,7 @@
                 editBtn: false,
                 selection: true,
                 dialogClickModal: false,
+                header: false,
                 column: [{
                     span: 12,
                     label: "社区",
@@ -135,6 +141,7 @@
                     prop: "phone",
                     searchSpan: 4,
                     search: true,
+                    slot: true,
                     rules: [{
                         validator: validatorPhone,
                         trigger: 'blur'
@@ -303,9 +310,27 @@
 
                 return tags
             }
+        },
+
+        textDispose () {
+            return (row, flag, type) => {
+                if (row[flag] || row[type] == null) {
+                    return row[type]
+                } else {
+                    if (type == 'principalIdCard') {
+                        return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2")
+                    } else {
+                        return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
+                    }
+                }
+            }
         }
     },
     methods: {
+        showStringDispose (row, type) {
+            row[type] = !row[type]
+        },
+
         colseDetail () {
             this.auditBasePopup = false
             this.onLoad(this.page)
@@ -478,6 +503,7 @@
                 this.page.total = data.total
                 this.data = data.records
                 this.data.forEach(item => {
+                    this.$set(item, 'phoneflag', false)
                     if (item.imageUrls && item.imageUrls != '' && item.imageUrls != null && item.imageUrls.length) {
                         var urls = []
                         var names = item.imageUrls.split(",").filter(item => item != '')
@@ -498,4 +524,5 @@
 <style>
 .avue-upload__icon {
     line-height: 6;
-}</style>
\ No newline at end of file
+}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3