From 5841016a20c475e63d1d290435c8d480fb901c70 Mon Sep 17 00:00:00 2001
From: guanqb <18720758508@163.com>
Date: Mon, 19 Feb 2024 17:34:34 +0800
Subject: [PATCH] 加隐藏显示:1.取保候审手机号2.消防自查3.维修基金管理4.项目经理

---
 src/views/publicSecurity/bailReporting.vue |   27 ++++++++++++++++++++++++++-
 1 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/src/views/publicSecurity/bailReporting.vue b/src/views/publicSecurity/bailReporting.vue
index 6ebb8f3..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%">
@@ -102,7 +107,7 @@
                 editBtn: false,
                 selection: true,
                 dialogClickModal: false,
-                header:false,
+                header: false,
                 column: [{
                     span: 12,
                     label: "社区",
@@ -136,6 +141,7 @@
                     prop: "phone",
                     searchSpan: 4,
                     search: true,
+                    slot: true,
                     rules: [{
                         validator: validatorPhone,
                         trigger: 'blur'
@@ -304,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)
@@ -479,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 != '')

--
Gitblit v1.9.3