From 49eb43c90d04bdadb0a46142c61ecb6eba448623 Mon Sep 17 00:00:00 2001
From: guanqb <18720758508@163.com>
Date: Tue, 20 Feb 2024 10:31:31 +0800
Subject: [PATCH] 手机号显示隐藏:1.交易登记2.报事报修3.维修基金申请4.合同管理5.维修基金审核6.网格管理7.场所管理8.网格员管理9.维修基金审核(共治)10.业委会及成员管理
---
src/views/publicSecurity/positionManage/TransactRegist.vue | 35 ++++++++++++++++++++++++++++++++++-
1 files changed, 34 insertions(+), 1 deletions(-)
diff --git a/src/views/publicSecurity/positionManage/TransactRegist.vue b/src/views/publicSecurity/positionManage/TransactRegist.vue
index f35b49b..b293891 100644
--- a/src/views/publicSecurity/positionManage/TransactRegist.vue
+++ b/src/views/publicSecurity/positionManage/TransactRegist.vue
@@ -28,6 +28,17 @@
<el-button type="warning" size="small" plain icon="el-icon-download" @click="handleExport">导出
</el-button>
</template>
+
+ <template slot-scope="{row, size}" slot="phoneNumber">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneNumberflag')"
+ v-text="textDispose(row, 'phoneNumberflag', 'phoneNumber')">
+ </el-button>
+ </template>
+ <template slot-scope="{row, size}" slot="transactionObjectTel">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'transactionObjectTelflag')"
+ v-text="textDispose(row, 'transactionObjectTelflag', 'transactionObjectTel')">
+ </el-button>
+ </template>
</avue-crud>
@@ -159,7 +170,8 @@
validator: validatorPhone,
trigger: 'blur'
}],
- align: 'center'
+ align: 'center',
+ slot: true,
},
{
width: 110,
@@ -205,6 +217,7 @@
search: true,
align: 'center',
labelWidth: 110,
+ slot: true
},
{
width: 110,
@@ -384,9 +397,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]
+ },
+
// 弹窗关闭回调
handleClose () {
this.cancelAudit()
@@ -651,6 +682,8 @@
this.page.total = data.total
this.data = data.records
this.data.forEach(item => {
+ this.$set(item, 'phoneNumberflag', false)
+ this.$set(item, 'transactionObjectTelflag', 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