From 0c040133d20999918d383520d5a8eb149648f814 Mon Sep 17 00:00:00 2001 From: shenzhouyu Date: Wed, 10 Jun 2026 11:24:23 +0800 Subject: [PATCH] =?UTF-8?q?pqc=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/qc/PQCResultEntry.vue | 46 ++++++++++++++----------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/src/views/modules/qc/PQCResultEntry.vue b/src/views/modules/qc/PQCResultEntry.vue index 0908b22..3a35581 100644 --- a/src/views/modules/qc/PQCResultEntry.vue +++ b/src/views/modules/qc/PQCResultEntry.vue @@ -1338,7 +1338,7 @@ export default { fixed: '', columnWidth: 120, }, - { + /*{ userId: this.$store.state.user.name, functionId: 301015, serialNumber: '301015Table1BatchRollNo', @@ -1373,7 +1373,7 @@ export default { status: true, fixed: '', columnWidth: 150, - }, + },*/ { userId: this.$store.state.user.name, functionId: 301015, @@ -1428,7 +1428,7 @@ export default { fixed: '', columnWidth: 130, }, - { + /* { userId: this.$store.state.user.name, functionId: 301015, serialNumber: '301015Table1InspectionCycle', @@ -1481,7 +1481,7 @@ export default { status: true, fixed: '', columnWidth: 150, - }, + }, */ { userId: this.$store.state.user.name, functionId: 301015, @@ -2776,12 +2776,12 @@ export default { if (this.roleList.length > 0) { let filterList = this.roleList.filter(item => item.roleName && item.roleName.indexOf('换线点检') > -1) if (filterList.length > 0) { - this.operatorData.roleId = filterList[0].roleId + this.$set(this.operatorData, 'roleId', filterList[0].roleId != null && filterList[0].roleId !== '' ? Number(filterList[0].roleId) : '') } else { - this.operatorData.roleId = this.roleList[0].roleId + this.$set(this.operatorData, 'roleId', this.roleList[0].roleId != null && this.roleList[0].roleId !== '' ? Number(this.roleList[0].roleId) : '') } } else { - this.operatorData.roleId = '' + this.$set(this.operatorData, 'roleId', '') } }, @@ -2798,13 +2798,16 @@ export default { setDefaultCollaborativeRole (callback) { const apply = () => { - if (this.roleList.length > 0) { - const roleName = this.isMhmResponsibleBu() ? this.defaultCollaborativeRoleName : '系统管理员' - const match = this.roleList.filter(item => item.roleName === roleName) - const roleId = match.length > 0 ? match[0].roleId : this.roleList[0].roleId - this.$set(this.operatorData, 'roleId', roleId != null && roleId !== '' ? Number(roleId) : '') + if (this.isMhmResponsibleBu()) { + if (this.roleList.length > 0) { + const match = this.roleList.filter(item => item.roleName === this.defaultCollaborativeRoleName) + const roleId = match.length > 0 ? match[0].roleId : this.roleList[0].roleId + this.$set(this.operatorData, 'roleId', roleId != null && roleId !== '' ? Number(roleId) : '') + } else { + this.$set(this.operatorData, 'roleId', '') + } } else { - this.$set(this.operatorData, 'roleId', '') + this.setDefaultLineInspectionRole() } callback && callback() } @@ -2887,17 +2890,18 @@ export default { this.operatorData.roleId = '' openDialog() } else { + const apply = () => { + this.setDefaultLineInspectionRole() + openDialog() + } if (this.roleList.length > 0) { - let filterList = this.roleList.filter(item => item.roleName === '机修人员') - if (filterList.length > 0) { - this.operatorData.roleId = filterList[0].roleId - } else { - this.operatorData.roleId = this.roleList[0].roleId - } + apply() } else { - this.operatorData.roleId = '' + getUserRoleList().then(({ data }) => { + this.roleList = (data && data.code === 0) ? (data.rows || []) : [] + apply() + }) } - openDialog() } },