对手机号进行脱敏
This commit is contained in:
parent
4f753cd8dc
commit
44ea0bf906
|
|
@ -27,6 +27,7 @@ import {
|
|||
handleTree,
|
||||
indexContinuation,
|
||||
desensitizeIdNumber,
|
||||
desensitizePhone,
|
||||
} from '@/utils/bonus'
|
||||
// 分页组件
|
||||
import Pagination from '@/components/Pagination'
|
||||
|
|
@ -60,6 +61,7 @@ Vue.prototype.download = download
|
|||
Vue.prototype.handleTree = handleTree
|
||||
Vue.prototype.indexContinuation = indexContinuation
|
||||
Vue.prototype.desensitizeIdNumber = desensitizeIdNumber
|
||||
Vue.prototype.desensitizePhone = desensitizePhone
|
||||
// 全局组件挂载
|
||||
Vue.component('DictTag', DictTag)
|
||||
Vue.component('Pagination', Pagination)
|
||||
|
|
|
|||
|
|
@ -269,3 +269,8 @@ export function desensitizeIdNumber(idNumber) {
|
|||
// 保留前6位和最后4位(最后一位可为Xx),中间8位用*替换
|
||||
return idNumber.replace(/^(\d{6})\d{8}([\dXx]{4})$/, '$1********$2')
|
||||
}
|
||||
|
||||
// 对手机号码进行脱敏
|
||||
export function desensitizePhone(phone) {
|
||||
return phone.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export const formLabel = [
|
|||
export const columnsList = [
|
||||
{ t_props: 'subName', t_label: '分包商名称' },
|
||||
{ t_props: 'legalPerson', t_label: '法定代表人' },
|
||||
{ t_props: 'legalPersonPhone', t_label: '联系电话' },
|
||||
{ t_slot: 'legalPersonPhone', t_label: '联系电话' },
|
||||
{ t_props: 'subAddress', t_label: '营业住址' },
|
||||
{
|
||||
t_label: '营业执照',
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@
|
|||
:columnsList="columnsList"
|
||||
:request-api="getSubBaseInfoListAPI"
|
||||
>
|
||||
<template slot="legalPersonPhone" slot-scope="{ data }">
|
||||
{{ desensitizePhone(data.legalPersonPhone) }}
|
||||
</template>
|
||||
<template slot="btn" slot-scope="{ queryParams }">
|
||||
<el-button
|
||||
plain
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export const columnsList = [
|
|||
{ t_props: 'subName', t_label: '分包商名称' },
|
||||
{ t_props: 'teamName', t_label: '班组名称' },
|
||||
{ t_props: 'teamLeader', t_label: '班组长' },
|
||||
{ t_props: 'phone', t_label: '班组长联系方式' },
|
||||
{ t_slot: 'phone', t_label: '班组长联系方式' },
|
||||
]
|
||||
|
||||
export const testTableList = [
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@
|
|||
:columnsList="columnsList"
|
||||
:request-api="getTeamBaseInfoListAPI"
|
||||
>
|
||||
<template slot="phone" slot-scope="{ data }">
|
||||
{{ desensitizePhone(data.phone) }}
|
||||
</template>
|
||||
<template slot="btn" slot-scope="{ queryParams }">
|
||||
<el-button
|
||||
plain
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ export const formLabel = [
|
|||
export const columnsList = [
|
||||
{ t_props: 'name', t_label: '姓名' },
|
||||
{ t_label: '身份证', t_slot: 'idNumber' },
|
||||
{ t_props: 'phone', t_label: '联系方式' },
|
||||
{ t_slot: 'phone', t_label: '联系方式' },
|
||||
{ t_props: 'postName', t_label: '工种' },
|
||||
{
|
||||
t_props: 'proName',
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@
|
|||
<template slot="idNumber" slot-scope="{ data }">
|
||||
{{ desensitizeIdNumber(data.idNumber) }}
|
||||
</template>
|
||||
<template slot="phone" slot-scope="{ data }">
|
||||
{{ desensitizePhone(data.phone) }}
|
||||
</template>
|
||||
<template slot="btn" slot-scope="{ queryParams }">
|
||||
<el-button
|
||||
plain
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ export const formLabel = [
|
|||
export const columnsList = [
|
||||
{ t_props: 'name', t_label: '姓名' },
|
||||
{ t_label: '身份证', t_slot: 'idNumber' },
|
||||
{ t_props: 'phone', t_label: '联系方式' },
|
||||
{ t_slot: 'phone', t_label: '联系方式' },
|
||||
{ t_props: 'bankCardCode', t_label: '银行卡号' },
|
||||
{
|
||||
t_props: 'bankName',
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@
|
|||
<template slot="idNumber" slot-scope="{ data }">
|
||||
{{ desensitizeIdNumber(data.idNumber) }}
|
||||
</template>
|
||||
<template slot="phone" slot-scope="{ data }">
|
||||
{{ desensitizePhone(data.phone) }}
|
||||
</template>
|
||||
<template slot="btn" slot-scope="{ queryParams }">
|
||||
<el-button
|
||||
plain
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export const columnsList = [
|
|||
|
||||
{
|
||||
t_label: '联系方式',
|
||||
t_props: 'phone',
|
||||
t_slot: 'phone',
|
||||
},
|
||||
{ t_props: 'postName', t_label: '工种' },
|
||||
{ t_props: 'proNum', t_label: '累计入场工程数量' },
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@
|
|||
<template slot="idNumber" slot-scope="{ data }">
|
||||
{{ desensitizeIdNumber(data.idNumber) }}
|
||||
</template>
|
||||
<template slot="phone" slot-scope="{ data }">
|
||||
{{ desensitizePhone(data.phone) }}
|
||||
</template>
|
||||
<template slot="btn" slot-scope="{ queryParams }">
|
||||
<el-button
|
||||
plain
|
||||
|
|
|
|||
Loading…
Reference in New Issue