提交 2f065731 authored 作者: pengxiaohui's avatar pengxiaohui

身份证信息隐藏

上级 99c69902
......@@ -176,6 +176,10 @@ export default {
created() {
if (this.info && this.info.id) {
this.form = Object.assign({}, this.info)
if (!this.hasUpdate) {
const id = this.form.id_number
this.form.id_number = id.substr(0, 6) + '********' + id.substr(14)
}
}
},
methods: {
......
......@@ -150,8 +150,8 @@ export default {
hasSaveCourse() {
return this.permissions.includes('v1/student/save-course')
},
onlyView() {
return !this.hasImport && !this.hasExport && !this.hasDelete && !this.hasViewInfo && !this.hasViewDegree && !this.hasViewCourse
hasUpdateInfo() {
return this.permissions.includes('v1/student/update')
},
tableOptions() {
return {
......@@ -187,8 +187,7 @@ export default {
minWidth: '150px',
computed: ({ row }) => {
let id = row.id_number
console.log(this.onlyView)
if (this.onlyView) {
if (!this.hasUpdateInfo) {
id = id.substr(0, 6) + '********' + id.substr(14)
console.log(id)
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论