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

身份证信息隐藏

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